From f66a3c0427f15fc89d1fcc61b4c2339da9d037f7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 16:26:32 +0200 Subject: Reapplied patch for bug18198 --- mysql-test/r/partition_error.result | 8 ++--- mysql-test/r/partition_hash.result | 14 --------- mysql-test/r/partition_mgm.result | 6 ++-- mysql-test/r/partition_pruning.result | 58 +++++++++++++++++++++++++++-------- mysql-test/r/partition_range.result | 34 ++++++++++---------- mysql-test/t/partition_error.test | 8 ++--- mysql-test/t/partition_hash.test | 12 -------- mysql-test/t/partition_mgm.test | 2 +- mysql-test/t/partition_pruning.test | 58 +++++++++++++++++++++++++---------- mysql-test/t/partition_range.test | 26 ++++++++-------- 10 files changed, 130 insertions(+), 96 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result index 4b01b759902..41829216178 100644 --- a/mysql-test/r/partition_error.result +++ b/mysql-test/r/partition_error.result @@ -25,7 +25,7 @@ partitions 3 (partition x1 values in (1,2,9,4) tablespace ts1, partition x2 values in (3, 11, 5, 7) tablespace ts2, partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3); -ERROR HY000: The PARTITION function returns the wrong type +ERROR HY000: This partition function is not allowed CREATE TABLE t1 ( a int not null, b int not null, @@ -89,7 +89,7 @@ partitions 3 (partition x1 tablespace ts1, partition x2 tablespace ts2, partition x3 tablespace ts3); -ERROR HY000: The PARTITION function returns the wrong type +ERROR HY000: This partition function is not allowed CREATE TABLE t1 ( a int not null, b int not null, @@ -422,7 +422,7 @@ partition by range (sin(a)) partitions 2 (partition x1 values less than (4), partition x2 values less than (5)); -ERROR HY000: The PARTITION function returns the wrong type +ERROR HY000: This partition function is not allowed CREATE TABLE t1 ( a int not null, b int not null, @@ -619,4 +619,4 @@ partition by range (a + (select count(*) from t1)) ERROR HY000: This partition function is not allowed create table t1 (a char(10)) partition by hash (extractvalue(a,'a')); -ERROR HY000: The PARTITION function returns the wrong type +ERROR HY000: This partition function is not allowed diff --git a/mysql-test/r/partition_hash.result b/mysql-test/r/partition_hash.result index 7ef3ee5c6c8..9a82a36d902 100644 --- a/mysql-test/r/partition_hash.result +++ b/mysql-test/r/partition_hash.result @@ -1,18 +1,4 @@ drop table if exists t1; -create table t1 (a varchar(10) charset latin1 collate latin1_bin) -partition by hash(length(a)) -partitions 10; -insert into t1 values (''),(' '),('a'),('a '),('a '); -explain partitions select * from t1 where a='a '; -id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where -explain partitions select * from t1 where a='a'; -id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where -explain partitions select * from t1 where a='a ' OR a='a'; -id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where -drop table t1; create table t1 (a int unsigned) partition by hash(a div 2) partitions 4; diff --git a/mysql-test/r/partition_mgm.result b/mysql-test/r/partition_mgm.result index 9b5a34bda50..04ac603fea7 100644 --- a/mysql-test/r/partition_mgm.result +++ b/mysql-test/r/partition_mgm.result @@ -10,13 +10,13 @@ subpartition sp01, subpartition sp02)); ERROR HY000: Wrong number of subpartitions defined, mismatch with previous setting drop table t1; CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30)) -PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2; +PARTITION BY HASH(YEAR(f_date)) PARTITIONS 2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2 */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) PARTITIONS 2 */ hello/master-data/test/t1#P#p0.MYD hello/master-data/test/t1#P#p0.MYI hello/master-data/test/t1#P#p1.MYD @@ -29,7 +29,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 1 */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) PARTITIONS 1 */ hello/master-data/test/t1#P#p0.MYD hello/master-data/test/t1#P#p0.MYI hello/master-data/test/t1.frm diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index 5fc0058356d..1143b1e4296 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -677,13 +677,12 @@ f_int1 f_int2 9 9 drop table t1; create table t1 (a char(10) binary) -partition by list(length(a)) -(partition p1 values in (1), -partition p2 values in (2), -partition p3 values in (3), -partition p4 values in (4), -partition p5 values in (5) -); +partition by list(ascii(a)) +(partition p1 values in (ascii('a')), +partition p2 values in (ascii('b')), +partition p3 values in (ascii('c')), +partition p4 values in (ascii('d')), +partition p5 values in (ascii('e'))); insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee'); select * from t1 where a>='a' and a <= 'dddd'; a @@ -848,22 +847,57 @@ id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables drop table t1; create table t1 (a int) -partition by range((a & 0xFF) << 56) ( -partition p0 values less than (0x40 << 56), -partition p1 values less than (0x80 << 56), -partition p2 values less than (0xFF << 56) +partition by range(a) ( +partition p0 values less than (64), +partition p1 values less than (128), +partition p2 values less than (255) +); +create table t2 (a int) +partition by range(a+0) ( +partition p0 values less than (64), +partition p1 values less than (128), +partition p2 values less than (255) ); insert into t1 values (0x20), (0x20), (0x41), (0x41), (0xFE), (0xFE); +insert into t2 values (0x20), (0x20), (0x41), (0x41), (0xFE), (0xFE); explain partitions select * from t1 where a=0; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where +explain partitions select * from t2 where a=0; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 p0 ALL NULL NULL NULL NULL 2 Using where explain partitions select * from t1 where a=0xFE; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p2 ALL NULL NULL NULL NULL 2 Using where -explain partitions select * from t1 where a>0xFE and a<= 0xFF; +explain partitions select * from t2 where a=0xFE; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 p2 ALL NULL NULL NULL NULL 2 Using where +explain partitions select * from t1 where a > 0xFE AND a <= 0xFF; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +explain partitions select * from t2 where a > 0xFE AND a <= 0xFF; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +explain partitions select * from t1 where a >= 0xFE AND a <= 0xFF; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p2 ALL NULL NULL NULL NULL 2 Using where +explain partitions select * from t2 where a >= 0xFE AND a <= 0xFF; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 p2 ALL NULL NULL NULL NULL 2 Using where +explain partitions select * from t1 where a < 64 AND a >= 63; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where +explain partitions select * from t2 where a < 64 AND a >= 63; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 p0 ALL NULL NULL NULL NULL 2 Using where +explain partitions select * from t1 where a <= 64 AND a >= 63; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 4 Using where +explain partitions select * from t2 where a <= 64 AND a >= 63; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 p0,p1 ALL NULL NULL NULL NULL 4 Using where drop table t1; +drop table t2; create table t1(a bigint unsigned not null) partition by range(a+0) ( partition p1 values less than (10), partition p2 values less than (20), diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result index d39b39f413a..e9ebd5ba2cf 100644 --- a/mysql-test/r/partition_range.result +++ b/mysql-test/r/partition_range.result @@ -1,36 +1,36 @@ drop table if exists t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int) -partition by range (length(a) * b) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (ascii(a) * b) +(partition p0 values less than (2), partition p1 values less than (4000)); insert into t1 values ('a ', 2),('a',3); drop table t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int) -partition by range (b* length(a) * b) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (b* ascii(a) * b) +(partition p0 values less than (2), partition p1 values less than (4000)); insert into t1 values ('a ', 2),('a',3); drop table t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b varchar(10) charset latin1 collate latin1_bin) -partition by range (length(b) * length(a)) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (ascii(b) * ascii(a)) +(partition p0 values less than (2), partition p1 values less than (40000)); insert into t1 values ('a ', 'b '),('a','b'); drop table t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b varchar(10) charset latin1 collate latin1_bin) -partition by range (length(a) * length(b)) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (ascii(a) * ascii(b)) +(partition p0 values less than (2), partition p1 values less than (40000)); insert into t1 values ('a ', 'b '),('a','b'); drop table t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b varchar(10) charset latin1 collate latin1_bin, c int) -partition by range (length(a) * c) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (ascii(a) * c) +(partition p0 values less than (2), partition p1 values less than (4000)); insert into t1 values ('a ', 'b ', 2),('a','b', 3); drop table t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b varchar(10) charset latin1 collate latin1_bin, c int) -partition by range (c * length(a)) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (c * ascii(a)) +(partition p0 values less than (2), partition p1 values less than (4000)); insert into t1 values ('a ', 'b ', 2),('a','b', 3); drop table t1; create table t1 (a int unsigned) @@ -109,7 +109,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 pnull_pnullsp0,pnull_pnullsp1,p0_p0sp0,p0_p0sp1 ALL NULL NULL NULL NULL 4 Using where explain partitions select * from t1 where a > 1; id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p1_p1sp0,p1_p1sp1 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables drop table t1; CREATE TABLE t1 ( a int not null, @@ -744,7 +744,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 18 Using where DROP TABLE t1; create table t1 (a varchar(20)) -partition by range (crc32(md5(a))) +partition by range (ascii(a)) (partition p0 values less than (100), partition p1 values less than maxvalue); insert into t1 values ("12345678901234567890"); @@ -761,16 +761,16 @@ B2345678901234567890 1234567890123456 explain partitions select * from t1 where a = "12345678901234567890"; id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where +1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where explain partitions select * from t1 where a = "12345678901234567890" OR a = "A2345678901234567890" OR a = "B2345678901234567890" OR a = "C2345678901234567890"; id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where +1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where explain partitions select * from t1 where a = "01234567890123456"; id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where +1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where select * from t1 where a = "01234567890123456"; a select * from t1 where a = "12345678901234567890" OR diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test index 20703b979f1..fa5055b2981 100644 --- a/mysql-test/t/partition_error.test +++ b/mysql-test/t/partition_error.test @@ -33,7 +33,7 @@ partitions 2; # # Partition by key list, wrong result type # ---error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a int not null, b int not null, @@ -109,7 +109,7 @@ partitions 3 # # Partition by hash, invalid result type # ---error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a int not null, b int not null, @@ -533,7 +533,7 @@ partitions 2 # # Partition by range, wrong result type of partition function # ---error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a int not null, b int not null, @@ -790,7 +790,7 @@ partition by hash (extract(hour from convert_tz(a, '+00:00', '+00:00'))); create table t1 (a int) partition by range (a + (select count(*) from t1)) (partition p1 values less than (1)); --- error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED create table t1 (a char(10)) partition by hash (extractvalue(a,'a')); diff --git a/mysql-test/t/partition_hash.test b/mysql-test/t/partition_hash.test index d3f1a5f4892..3304f30fb1a 100644 --- a/mysql-test/t/partition_hash.test +++ b/mysql-test/t/partition_hash.test @@ -9,18 +9,6 @@ drop table if exists t1; --enable_warnings -# -# BUG 18198: Partition functions handling -# -create table t1 (a varchar(10) charset latin1 collate latin1_bin) -partition by hash(length(a)) -partitions 10; -insert into t1 values (''),(' '),('a'),('a '),('a '); -explain partitions select * from t1 where a='a '; -explain partitions select * from t1 where a='a'; -explain partitions select * from t1 where a='a ' OR a='a'; -drop table t1; - # # More partition pruning tests, especially on interval walking # diff --git a/mysql-test/t/partition_mgm.test b/mysql-test/t/partition_mgm.test index 8458d47d634..a06f8d1aee5 100644 --- a/mysql-test/t/partition_mgm.test +++ b/mysql-test/t/partition_mgm.test @@ -20,7 +20,7 @@ subpartition sp01, subpartition sp02)); drop table t1; CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30)) -PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2; +PARTITION BY HASH(YEAR(f_date)) PARTITIONS 2; SHOW CREATE TABLE t1; --replace_result $MYSQLTEST_VARDIR "hello" diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test index a60846f18ff..cef57bd9356 100644 --- a/mysql-test/t/partition_pruning.test +++ b/mysql-test/t/partition_pruning.test @@ -539,13 +539,12 @@ drop table t1; # part2: bug in pruning code create table t1 (a char(10) binary) -partition by list(length(a)) - (partition p1 values in (1), - partition p2 values in (2), - partition p3 values in (3), - partition p4 values in (4), - partition p5 values in (5) -); +partition by list(ascii(a)) + (partition p1 values in (ascii('a')), + partition p2 values in (ascii('b')), + partition p3 values in (ascii('c')), + partition p4 values in (ascii('d')), + partition p5 values in (ascii('e'))); insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee'); select * from t1 where a>='a' and a <= 'dddd'; explain partitions select * from t1 where a>='a' and a <= 'dddd'; @@ -692,20 +691,47 @@ explain partitions select * from t1 where a = 18446744073709551000; explain partitions select * from t1 where a = 18446744073709551613; explain partitions select * from t1 where a = 18446744073709551614; drop table t1; - -create table t1 (a int) - partition by range((a & 0xFF) << 56) ( - partition p0 values less than (0x40 << 56), - partition p1 values less than (0x80 << 56), - partition p2 values less than (0xFF << 56) +# +# Test all variants of usage for interval_via_mapping +# and interval_via_walking +# +# t1 will use interval_via_mapping since it uses a +# monotonic function, whereas t2 will use +# interval_via_walking since the intervals are short +# and the function isn't monotonic (it is, but it isn't +# discovered in this version). +# + create table t1 (a int) + partition by range(a) ( + partition p0 values less than (64), + partition p1 values less than (128), + partition p2 values less than (255) ); -insert into t1 values (0x20), (0x20), (0x41), (0x41), (0xFE), (0xFE); +create table t2 (a int) + partition by range(a+0) ( + partition p0 values less than (64), + partition p1 values less than (128), + partition p2 values less than (255) +); + +insert into t1 values (0x20), (0x20), (0x41), (0x41), (0xFE), (0xFE); +insert into t2 values (0x20), (0x20), (0x41), (0x41), (0xFE), (0xFE); explain partitions select * from t1 where a=0; +explain partitions select * from t2 where a=0; explain partitions select * from t1 where a=0xFE; -explain partitions select * from t1 where a>0xFE and a<= 0xFF; +explain partitions select * from t2 where a=0xFE; +explain partitions select * from t1 where a > 0xFE AND a <= 0xFF; +explain partitions select * from t2 where a > 0xFE AND a <= 0xFF; +explain partitions select * from t1 where a >= 0xFE AND a <= 0xFF; +explain partitions select * from t2 where a >= 0xFE AND a <= 0xFF; +explain partitions select * from t1 where a < 64 AND a >= 63; +explain partitions select * from t2 where a < 64 AND a >= 63; +explain partitions select * from t1 where a <= 64 AND a >= 63; +explain partitions select * from t2 where a <= 64 AND a >= 63; drop table t1; - +drop table t2; + create table t1(a bigint unsigned not null) partition by range(a+0) ( partition p1 values less than (10), partition p2 values less than (20), diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test index 84f67febe8b..219637d6f81 100644 --- a/mysql-test/t/partition_range.test +++ b/mysql-test/t/partition_range.test @@ -13,42 +13,42 @@ drop table if exists t1; # BUG 18198: Various tests for partition functions # create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int) -partition by range (length(a) * b) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (ascii(a) * b) +(partition p0 values less than (2), partition p1 values less than (4000)); insert into t1 values ('a ', 2),('a',3); drop table t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int) -partition by range (b* length(a) * b) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (b* ascii(a) * b) +(partition p0 values less than (2), partition p1 values less than (4000)); insert into t1 values ('a ', 2),('a',3); drop table t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b varchar(10) charset latin1 collate latin1_bin) -partition by range (length(b) * length(a)) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (ascii(b) * ascii(a)) +(partition p0 values less than (2), partition p1 values less than (40000)); insert into t1 values ('a ', 'b '),('a','b'); drop table t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b varchar(10) charset latin1 collate latin1_bin) -partition by range (length(a) * length(b)) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (ascii(a) * ascii(b)) +(partition p0 values less than (2), partition p1 values less than (40000)); insert into t1 values ('a ', 'b '),('a','b'); drop table t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b varchar(10) charset latin1 collate latin1_bin, c int) -partition by range (length(a) * c) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (ascii(a) * c) +(partition p0 values less than (2), partition p1 values less than (4000)); insert into t1 values ('a ', 'b ', 2),('a','b', 3); drop table t1; create table t1 (a varchar(10) charset latin1 collate latin1_bin, b varchar(10) charset latin1 collate latin1_bin, c int) -partition by range (c * length(a)) -(partition p0 values less than (2), partition p1 values less than (400)); +partition by range (c * ascii(a)) +(partition p0 values less than (2), partition p1 values less than (4000)); insert into t1 values ('a ', 'b ', 2),('a','b', 3); drop table t1; @@ -734,7 +734,7 @@ DROP TABLE t1; # Bug 18198: Try with a couple of cases using VARCHAR fields in # partition function. create table t1 (a varchar(20)) -partition by range (crc32(md5(a))) +partition by range (ascii(a)) (partition p0 values less than (100), partition p1 values less than maxvalue); -- cgit v1.2.1 From ec4b50b54f436e45ab0d37eb67e7bf919ab8b02a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 14:10:37 +0200 Subject: merge error --- mysql-test/r/partition_pruning.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index 1143b1e4296..80a24bc7065 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -846,7 +846,7 @@ explain partitions select * from t1 where a = 18446744073709551614; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables drop table t1; -create table t1 (a int) +create table t1 (a int) partition by range(a) ( partition p0 values less than (64), partition p1 values less than (128), -- cgit v1.2.1 From 2ad7512a57f5a6e33d7d0f56d8067ef45df23b94 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Apr 2007 20:34:36 +0200 Subject: More test cases mysql-test/t/partition_charset.test: New test case from bug report mysql-test/t/partition_list.test: New test case from bug report mysql-test/r/partition_bug18198.result: New test case mysql-test/t/partition_bug18198.test: New test case --- mysql-test/r/partition_bug18198.result | 205 +++++++++++++++++++++++++++ mysql-test/t/partition_bug18198.test | 252 +++++++++++++++++++++++++++++++++ mysql-test/t/partition_charset.test | 7 + mysql-test/t/partition_list.test | 4 + 4 files changed, 468 insertions(+) create mode 100644 mysql-test/r/partition_bug18198.result create mode 100644 mysql-test/t/partition_bug18198.test (limited to 'mysql-test') diff --git a/mysql-test/r/partition_bug18198.result b/mysql-test/r/partition_bug18198.result new file mode 100644 index 00000000000..091de9fb853 --- /dev/null +++ b/mysql-test/r/partition_bug18198.result @@ -0,0 +1,205 @@ +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1 (a char(5) character set koi8r) +partition by list (ascii(a) mod 3) +subpartition by hash(ascii(a)) +subpartitions 3 +(partition p1 values in (1), +partition p2 values in (2), +partition p0 values in (0)); +insert into t1 values ('a'); +explain partitions select * from t1 where a = 'a'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p2_p2sp2 system NULL NULL NULL NULL 1 +select * from t1 where a = 'a'; +a +a +drop table t1; +create table t1 (a char(5) character set cp1251) +partition by list (ascii(a)) (partition pn values in (null)); +drop table t1; +create table t1 (col1 datetime) +partition by range(datediff(col1,col1)) +(partition p0 values less than (10), partition p1 values less than (30)); +drop table t1; +create table t1 (a char(5) character set big5) +partition by list (ascii(a)) (partition pn values in (null)); +ERROR HY000: This partition function is not allowed +create table t1 (a char(1)) +partition by list(ascii(a)) +(partition p1 values in (ascii('i'))); +drop table t1; +create table t1 (s1 char(5) character set latin5) +partition by list (ascii(s1)) +(partition p1 values in (1)); +set names utf8; +drop table t1; +create table t1 (col1 int) +partition by range(greatest(col1,10)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(isnull(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(least(col1,12)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(case when col1>0 then 10 else 20 end) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(ifnull(col1,5)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(nullif(col1,5)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(bit_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 char(5)) +partition by range(bit_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(char_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 char(5)) +partition by range(char_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 char(5)) +partition by range(character_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(find_in_set(col1,1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 char(5)) +partition by range(find_in_set(col1,'1')) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(instr(col1,3)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 char(5)) +partition by range(instr(col1,'3')) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 char(5)) +partition by range(length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 char(5)) +partition by range(locate(1,col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(locate(1,col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 char(5)) +partition by range(octet_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 char(5)) +partition by range(position(1 in col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(position(1 in col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 char(5)) +partition by range(strcmp(col1,2)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(strcmp(col1,2)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(crc32(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(round(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(sign(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 datetime) +partition by range(period_add(col1,5)) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 datetime, col2 datetime) +partition by range(period_diff(col1,col2)) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int, col2 int) +partition by range(period_diff(col1,col2)) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 datetime) +partition by range(timestampdiff(day,5,col1)) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 date) +partition by range(unix_timestamp(col1)) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 datetime) +partition by range(week(col1)) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 varchar(25)) +partition by range(cast(col1 as signed)) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 varchar(25)) +partition by range(convert(col1,unsigned)) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(col1 | 20) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(col1 & 20) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(col1 ^ 20) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(col1 << 20) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(col1 >> 20) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(~col1) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(bit_count(col1)) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed +create table t1 (col1 int) +partition by range(inet_aton(col1)) +(partition p0 values less than (10), partition p1 values less than (30)); +ERROR HY000: This partition function is not allowed diff --git a/mysql-test/t/partition_bug18198.test b/mysql-test/t/partition_bug18198.test new file mode 100644 index 00000000000..2d36ea4665e --- /dev/null +++ b/mysql-test/t/partition_bug18198.test @@ -0,0 +1,252 @@ +-- source include/have_partition.inc +--disable warnings +drop table if exists t1; +--enable warnings + +create table t1 (a char(5) character set koi8r) +partition by list (ascii(a) mod 3) +subpartition by hash(ascii(a)) +subpartitions 3 +(partition p1 values in (1), + partition p2 values in (2), + partition p0 values in (0)); +insert into t1 values ('a'); +explain partitions select * from t1 where a = 'a'; +select * from t1 where a = 'a'; +drop table t1; + +create table t1 (a char(5) character set cp1251) +partition by list (ascii(a)) (partition pn values in (null)); +drop table t1; + +create table t1 (col1 datetime) +partition by range(datediff(col1,col1)) +(partition p0 values less than (10), partition p1 values less than (30)); +drop table t1; + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (a char(5) character set big5) +partition by list (ascii(a)) (partition pn values in (null)); + +create table t1 (a char(1)) +partition by list(ascii(a)) +(partition p1 values in (ascii('i'))); +#insert into t1 values ('i'); +drop table t1; + +create table t1 (s1 char(5) character set latin5) +partition by list (ascii(s1)) +(partition p1 values in (1)); +set names utf8; +#insert into tn values ('¿¿'); +drop table t1; + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(greatest(col1,10)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(isnull(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(least(col1,12)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(case when col1>0 then 10 else 20 end) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(ifnull(col1,5)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(nullif(col1,5)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(bit_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 char(5)) +partition by range(bit_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(char_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 char(5)) +partition by range(char_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 char(5)) +partition by range(character_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(find_in_set(col1,1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 char(5)) +partition by range(find_in_set(col1,'1')) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(instr(col1,3)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 char(5)) +partition by range(instr(col1,'3')) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 char(5)) +partition by range(length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 char(5)) +partition by range(locate(1,col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(locate(1,col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 char(5)) +partition by range(octet_length(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 char(5)) +partition by range(position(1 in col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(position(1 in col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 char(5)) +partition by range(strcmp(col1,2)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(strcmp(col1,2)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(crc32(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(round(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(sign(col1)) +(partition p0 values less than (2), partition p1 values less than (6)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 datetime) +partition by range(period_add(col1,5)) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 datetime, col2 datetime) +partition by range(period_diff(col1,col2)) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int, col2 int) +partition by range(period_diff(col1,col2)) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 datetime) +partition by range(timestampdiff(day,5,col1)) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 date) +partition by range(unix_timestamp(col1)) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 datetime) +partition by range(week(col1)) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 varchar(25)) +partition by range(cast(col1 as signed)) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 varchar(25)) +partition by range(convert(col1,unsigned)) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(col1 | 20) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(col1 & 20) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(col1 ^ 20) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(col1 << 20) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(col1 >> 20) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(~col1) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(bit_count(col1)) +(partition p0 values less than (10), partition p1 values less than (30)); + +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (col1 int) +partition by range(inet_aton(col1)) +(partition p0 values less than (10), partition p1 values less than (30)); diff --git a/mysql-test/t/partition_charset.test b/mysql-test/t/partition_charset.test index 27d0dc87b89..5e8f128e87a 100644 --- a/mysql-test/t/partition_charset.test +++ b/mysql-test/t/partition_charset.test @@ -19,3 +19,10 @@ flush tables; set names latin1; select * from t1; drop table t1; + +create table t1 (a varchar(1), primary key (a)) +partition by list (ascii(a)) +(partition p1 values in (65)); +insert into t1 values ('A'); +replace into t1 values ('A'); +drop table t1; diff --git a/mysql-test/t/partition_list.test b/mysql-test/t/partition_list.test index 1e420cfe6ed..7d71d66f2d9 100644 --- a/mysql-test/t/partition_list.test +++ b/mysql-test/t/partition_list.test @@ -179,4 +179,8 @@ insert into t1 values (null); select * from t1; drop table t1; +-- error ER_PARTITION_FUNC_NOT_ALLOWED +create table t1 (a char(1)) +partition by list (ascii(ucase(a))) +(partition p1 values in (2)); -- cgit v1.2.1 From 2a2b1ea8258a151f2420e8b6226b3fad629956ad Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Apr 2007 18:35:16 +0200 Subject: BUG#18198 Added new test cases, fixed bugs in relation to those mysql-test/r/partition_charset.result: New test case mysql-test/r/partition_list.result: New test case mysql-test/t/partition_list.test: New test case sql/partition_info.cc: Missing initialisation sql/sql_partition.cc: key_restore made use of field->ptr in VARCHAR fields and when used with REPLACE it caused the key_restore to become against table->record[0] when buf pointed to table->record[1] --- mysql-test/r/partition_charset.result | 6 ++++++ mysql-test/r/partition_list.result | 4 ++++ mysql-test/t/partition_list.test | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_charset.result b/mysql-test/r/partition_charset.result index 665e5d55f8f..bb6cb5e3bef 100644 --- a/mysql-test/r/partition_charset.result +++ b/mysql-test/r/partition_charset.result @@ -16,3 +16,9 @@ s1 1 3 drop table t1; +create table t1 (a varchar(1), primary key (a)) +partition by list (ascii(a)) +(partition p1 values in (65)); +insert into t1 values ('A'); +replace into t1 values ('A'); +drop table t1; diff --git a/mysql-test/r/partition_list.result b/mysql-test/r/partition_list.result index e64a7a8d154..a68a67c6386 100644 --- a/mysql-test/r/partition_list.result +++ b/mysql-test/r/partition_list.result @@ -295,3 +295,7 @@ select * from t1; a 100 drop table t1; +create table t1 (a char(1)) +partition by list (ascii(ucase(a))) +(partition p1 values in (2)); +ERROR HY000: This partition function is not allowed diff --git a/mysql-test/t/partition_list.test b/mysql-test/t/partition_list.test index 7d71d66f2d9..1c76de9d55a 100644 --- a/mysql-test/t/partition_list.test +++ b/mysql-test/t/partition_list.test @@ -179,7 +179,7 @@ insert into t1 values (null); select * from t1; drop table t1; --- error ER_PARTITION_FUNC_NOT_ALLOWED +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED create table t1 (a char(1)) partition by list (ascii(ucase(a))) (partition p1 values in (2)); -- cgit v1.2.1 From e0c0cdc3faa34546479dd7d81099bc90126484d3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Apr 2007 18:46:12 +0200 Subject: Removed warnings --- mysql-test/r/partition_bug18198.result | 2 -- mysql-test/t/partition_bug18198.test | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_bug18198.result b/mysql-test/r/partition_bug18198.result index 091de9fb853..2071545dbca 100644 --- a/mysql-test/r/partition_bug18198.result +++ b/mysql-test/r/partition_bug18198.result @@ -1,6 +1,4 @@ drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' create table t1 (a char(5) character set koi8r) partition by list (ascii(a) mod 3) subpartition by hash(ascii(a)) diff --git a/mysql-test/t/partition_bug18198.test b/mysql-test/t/partition_bug18198.test index 2d36ea4665e..caf9bd560c0 100644 --- a/mysql-test/t/partition_bug18198.test +++ b/mysql-test/t/partition_bug18198.test @@ -1,7 +1,7 @@ -- source include/have_partition.inc ---disable warnings +--disable_warnings drop table if exists t1; ---enable warnings +--enable_warnings create table t1 (a char(5) character set koi8r) partition by list (ascii(a) mod 3) -- cgit v1.2.1 From ff3f8990e74e8133fb68bea7b85a60b055c9feb9 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Jun 2007 17:28:59 +0200 Subject: Disabled ascii-function mysql-test/r/partition_bug18198.result: Disabled a lot of test cases using ascii-function mysql-test/r/partition_charset.result: Disabled a lot of test cases using ascii-function mysql-test/r/partition_error.result: Disabled a lot of test cases using ascii-function mysql-test/r/partition_pruning.result: Disabled a lot of test cases using ascii-function mysql-test/r/partition_range.result: Disabled a lot of test cases using ascii-function mysql-test/t/partition_bug18198.test: Disabled a lot of test cases using ascii-function mysql-test/t/partition_charset.test: Disabled a lot of test cases using ascii-function mysql-test/t/partition_error.test: Disabled a lot of test cases using ascii-function mysql-test/t/partition_pruning.test: Disabled a lot of test cases using ascii-function mysql-test/t/partition_range.test: Disabled a lot of test cases using ascii-function --- mysql-test/r/partition_bug18198.result | 30 -------- mysql-test/r/partition_charset.result | 4 +- mysql-test/r/partition_error.result | 2 +- mysql-test/r/partition_pruning.result | 18 ----- mysql-test/r/partition_range.result | 76 -------------------- mysql-test/t/partition_bug18198.test | 33 --------- mysql-test/t/partition_charset.test | 7 +- mysql-test/t/partition_error.test | 3 +- mysql-test/t/partition_pruning.test | 22 +++--- mysql-test/t/partition_range.test | 128 ++++++++++++++++----------------- 10 files changed, 82 insertions(+), 241 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_bug18198.result b/mysql-test/r/partition_bug18198.result index 2071545dbca..18d7d904bb0 100644 --- a/mysql-test/r/partition_bug18198.result +++ b/mysql-test/r/partition_bug18198.result @@ -1,38 +1,8 @@ drop table if exists t1; -create table t1 (a char(5) character set koi8r) -partition by list (ascii(a) mod 3) -subpartition by hash(ascii(a)) -subpartitions 3 -(partition p1 values in (1), -partition p2 values in (2), -partition p0 values in (0)); -insert into t1 values ('a'); -explain partitions select * from t1 where a = 'a'; -id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p2_p2sp2 system NULL NULL NULL NULL 1 -select * from t1 where a = 'a'; -a -a -drop table t1; -create table t1 (a char(5) character set cp1251) -partition by list (ascii(a)) (partition pn values in (null)); -drop table t1; create table t1 (col1 datetime) partition by range(datediff(col1,col1)) (partition p0 values less than (10), partition p1 values less than (30)); drop table t1; -create table t1 (a char(5) character set big5) -partition by list (ascii(a)) (partition pn values in (null)); -ERROR HY000: This partition function is not allowed -create table t1 (a char(1)) -partition by list(ascii(a)) -(partition p1 values in (ascii('i'))); -drop table t1; -create table t1 (s1 char(5) character set latin5) -partition by list (ascii(s1)) -(partition p1 values in (1)); -set names utf8; -drop table t1; create table t1 (col1 int) partition by range(greatest(col1,10)) (partition p0 values less than (2), partition p1 values less than (6)); diff --git a/mysql-test/r/partition_charset.result b/mysql-test/r/partition_charset.result index bb6cb5e3bef..f8f75e8bee7 100644 --- a/mysql-test/r/partition_charset.result +++ b/mysql-test/r/partition_charset.result @@ -19,6 +19,4 @@ drop table t1; create table t1 (a varchar(1), primary key (a)) partition by list (ascii(a)) (partition p1 values in (65)); -insert into t1 values ('A'); -replace into t1 values ('A'); -drop table t1; +ERROR HY000: This partition function is not allowed diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result index 41829216178..7952c8df609 100644 --- a/mysql-test/r/partition_error.result +++ b/mysql-test/r/partition_error.result @@ -600,7 +600,7 @@ ERROR HY000: Partition constant is out of partition function domain create table t1 (v varchar(12)) partition by range (ascii(v)) (partition p0 values less than (10)); -drop table t1; +ERROR HY000: This partition function is not allowed create table t1 (a int) partition by hash (rand(a)); ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2 diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index 80a24bc7065..9595676016c 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -676,24 +676,6 @@ f_int1 f_int2 8 8 9 9 drop table t1; -create table t1 (a char(10) binary) -partition by list(ascii(a)) -(partition p1 values in (ascii('a')), -partition p2 values in (ascii('b')), -partition p3 values in (ascii('c')), -partition p4 values in (ascii('d')), -partition p5 values in (ascii('e'))); -insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee'); -select * from t1 where a>='a' and a <= 'dddd'; -a -a -bb -ccc -dddd -explain partitions select * from t1 where a>='a' and a <= 'dddd'; -id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p1,p2,p3,p4,p5 ALL NULL NULL NULL NULL 5 Using where -drop table t1; create table t1 (f_int1 integer) partition by list(abs(mod(f_int1,2))) subpartition by hash(f_int1) subpartitions 2 ( diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result index e9ebd5ba2cf..a61006e87a4 100644 --- a/mysql-test/r/partition_range.result +++ b/mysql-test/r/partition_range.result @@ -1,38 +1,4 @@ drop table if exists t1; -create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int) -partition by range (ascii(a) * b) -(partition p0 values less than (2), partition p1 values less than (4000)); -insert into t1 values ('a ', 2),('a',3); -drop table t1; -create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int) -partition by range (b* ascii(a) * b) -(partition p0 values less than (2), partition p1 values less than (4000)); -insert into t1 values ('a ', 2),('a',3); -drop table t1; -create table t1 (a varchar(10) charset latin1 collate latin1_bin, -b varchar(10) charset latin1 collate latin1_bin) -partition by range (ascii(b) * ascii(a)) -(partition p0 values less than (2), partition p1 values less than (40000)); -insert into t1 values ('a ', 'b '),('a','b'); -drop table t1; -create table t1 (a varchar(10) charset latin1 collate latin1_bin, -b varchar(10) charset latin1 collate latin1_bin) -partition by range (ascii(a) * ascii(b)) -(partition p0 values less than (2), partition p1 values less than (40000)); -insert into t1 values ('a ', 'b '),('a','b'); -drop table t1; -create table t1 (a varchar(10) charset latin1 collate latin1_bin, -b varchar(10) charset latin1 collate latin1_bin, c int) -partition by range (ascii(a) * c) -(partition p0 values less than (2), partition p1 values less than (4000)); -insert into t1 values ('a ', 'b ', 2),('a','b', 3); -drop table t1; -create table t1 (a varchar(10) charset latin1 collate latin1_bin, -b varchar(10) charset latin1 collate latin1_bin, c int) -partition by range (c * ascii(a)) -(partition p0 values less than (2), partition p1 values less than (4000)); -insert into t1 values ('a ', 'b ', 2),('a','b', 3); -drop table t1; create table t1 (a int unsigned) partition by range (a) (partition pnull values less than (0), @@ -743,45 +709,3 @@ WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 18 Using where DROP TABLE t1; -create table t1 (a varchar(20)) -partition by range (ascii(a)) -(partition p0 values less than (100), -partition p1 values less than maxvalue); -insert into t1 values ("12345678901234567890"); -insert into t1 values ("A2345678901234567890"); -insert into t1 values ("B2345678901234567890"); -insert into t1 values ("1234567890123456789"); -insert into t1 values ("1234567890123456"); -select * from t1; -a -12345678901234567890 -A2345678901234567890 -B2345678901234567890 -1234567890123456789 -1234567890123456 -explain partitions select * from t1 where a = "12345678901234567890"; -id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where -explain partitions select * from t1 where a = "12345678901234567890" OR -a = "A2345678901234567890" OR -a = "B2345678901234567890" OR -a = "C2345678901234567890"; -id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where -explain partitions select * from t1 where a = "01234567890123456"; -id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where -select * from t1 where a = "01234567890123456"; -a -select * from t1 where a = "12345678901234567890" OR -a = "A2345678901234567890" OR -a = "B2345678901234567890" OR -a = "C2345678901234567890"; -a -12345678901234567890 -A2345678901234567890 -B2345678901234567890 -select * from t1 where a = "12345678901234567890"; -a -12345678901234567890 -drop table t1; diff --git a/mysql-test/t/partition_bug18198.test b/mysql-test/t/partition_bug18198.test index caf9bd560c0..7f071c6ec9e 100644 --- a/mysql-test/t/partition_bug18198.test +++ b/mysql-test/t/partition_bug18198.test @@ -3,44 +3,11 @@ drop table if exists t1; --enable_warnings -create table t1 (a char(5) character set koi8r) -partition by list (ascii(a) mod 3) -subpartition by hash(ascii(a)) -subpartitions 3 -(partition p1 values in (1), - partition p2 values in (2), - partition p0 values in (0)); -insert into t1 values ('a'); -explain partitions select * from t1 where a = 'a'; -select * from t1 where a = 'a'; -drop table t1; - -create table t1 (a char(5) character set cp1251) -partition by list (ascii(a)) (partition pn values in (null)); -drop table t1; - create table t1 (col1 datetime) partition by range(datediff(col1,col1)) (partition p0 values less than (10), partition p1 values less than (30)); drop table t1; --- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED -create table t1 (a char(5) character set big5) -partition by list (ascii(a)) (partition pn values in (null)); - -create table t1 (a char(1)) -partition by list(ascii(a)) -(partition p1 values in (ascii('i'))); -#insert into t1 values ('i'); -drop table t1; - -create table t1 (s1 char(5) character set latin5) -partition by list (ascii(s1)) -(partition p1 values in (1)); -set names utf8; -#insert into tn values ('¿¿'); -drop table t1; - -- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED create table t1 (col1 int) partition by range(greatest(col1,10)) diff --git a/mysql-test/t/partition_charset.test b/mysql-test/t/partition_charset.test index 5e8f128e87a..6842e5268fa 100644 --- a/mysql-test/t/partition_charset.test +++ b/mysql-test/t/partition_charset.test @@ -20,9 +20,10 @@ set names latin1; select * from t1; drop table t1; +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED create table t1 (a varchar(1), primary key (a)) partition by list (ascii(a)) (partition p1 values in (65)); -insert into t1 values ('A'); -replace into t1 values ('A'); -drop table t1; +#insert into t1 values ('A'); +#replace into t1 values ('A'); +#drop table t1; diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test index fa5055b2981..5fc2097cc52 100644 --- a/mysql-test/t/partition_error.test +++ b/mysql-test/t/partition_error.test @@ -769,10 +769,11 @@ partition by range (a) # # Bug 18198 Partitions: Verify that erroneus partition functions doesn't work # +-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED create table t1 (v varchar(12)) partition by range (ascii(v)) (partition p0 values less than (10)); -drop table t1; +#drop table t1; -- error 1064 create table t1 (a int) diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test index cef57bd9356..12951c9232a 100644 --- a/mysql-test/t/partition_pruning.test +++ b/mysql-test/t/partition_pruning.test @@ -538,17 +538,17 @@ select * from t1 where f_int1 between 5 and 15 order by f_int1; drop table t1; # part2: bug in pruning code -create table t1 (a char(10) binary) -partition by list(ascii(a)) - (partition p1 values in (ascii('a')), - partition p2 values in (ascii('b')), - partition p3 values in (ascii('c')), - partition p4 values in (ascii('d')), - partition p5 values in (ascii('e'))); -insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee'); -select * from t1 where a>='a' and a <= 'dddd'; -explain partitions select * from t1 where a>='a' and a <= 'dddd'; -drop table t1; +#create table t1 (a char(10) binary) +#partition by list(ascii(a)) +# (partition p1 values in (ascii('a')), +# partition p2 values in (ascii('b')), +# partition p3 values in (ascii('c')), +# partition p4 values in (ascii('d')), +# partition p5 values in (ascii('e'))); +#insert into t1 values ('a'),('bb'),('ccc'),('dddd'),('eeEee'); +#select * from t1 where a>='a' and a <= 'dddd'; +#explain partitions select * from t1 where a>='a' and a <= 'dddd'; +#drop table t1; # BUG#18659: Assertion failure when subpartitioning is used and partition is # "IS NULL" diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test index 219637d6f81..50d850913bc 100644 --- a/mysql-test/t/partition_range.test +++ b/mysql-test/t/partition_range.test @@ -12,45 +12,45 @@ drop table if exists t1; # # BUG 18198: Various tests for partition functions # -create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int) -partition by range (ascii(a) * b) -(partition p0 values less than (2), partition p1 values less than (4000)); -insert into t1 values ('a ', 2),('a',3); -drop table t1; - -create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int) -partition by range (b* ascii(a) * b) -(partition p0 values less than (2), partition p1 values less than (4000)); -insert into t1 values ('a ', 2),('a',3); -drop table t1; - -create table t1 (a varchar(10) charset latin1 collate latin1_bin, - b varchar(10) charset latin1 collate latin1_bin) -partition by range (ascii(b) * ascii(a)) -(partition p0 values less than (2), partition p1 values less than (40000)); -insert into t1 values ('a ', 'b '),('a','b'); -drop table t1; - -create table t1 (a varchar(10) charset latin1 collate latin1_bin, - b varchar(10) charset latin1 collate latin1_bin) -partition by range (ascii(a) * ascii(b)) -(partition p0 values less than (2), partition p1 values less than (40000)); -insert into t1 values ('a ', 'b '),('a','b'); -drop table t1; - -create table t1 (a varchar(10) charset latin1 collate latin1_bin, - b varchar(10) charset latin1 collate latin1_bin, c int) -partition by range (ascii(a) * c) -(partition p0 values less than (2), partition p1 values less than (4000)); -insert into t1 values ('a ', 'b ', 2),('a','b', 3); -drop table t1; - -create table t1 (a varchar(10) charset latin1 collate latin1_bin, - b varchar(10) charset latin1 collate latin1_bin, c int) -partition by range (c * ascii(a)) -(partition p0 values less than (2), partition p1 values less than (4000)); -insert into t1 values ('a ', 'b ', 2),('a','b', 3); -drop table t1; +#create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int) +#partition by range (ascii(a) * b) +#(partition p0 values less than (2), partition p1 values less than (4000)); +#insert into t1 values ('a ', 2),('a',3); +#drop table t1; + +#create table t1 (a varchar(10) charset latin1 collate latin1_bin, b int) +#partition by range (b* ascii(a) * b) +#(partition p0 values less than (2), partition p1 values less than (4000)); +#insert into t1 values ('a ', 2),('a',3); +#drop table t1; + +#create table t1 (a varchar(10) charset latin1 collate latin1_bin, +# b varchar(10) charset latin1 collate latin1_bin) +#partition by range (ascii(b) * ascii(a)) +#(partition p0 values less than (2), partition p1 values less than (40000)); +#insert into t1 values ('a ', 'b '),('a','b'); +#drop table t1; + +#create table t1 (a varchar(10) charset latin1 collate latin1_bin, +# b varchar(10) charset latin1 collate latin1_bin) +#partition by range (ascii(a) * ascii(b)) +#(partition p0 values less than (2), partition p1 values less than (40000)); +#insert into t1 values ('a ', 'b '),('a','b'); +#drop table t1; + +#create table t1 (a varchar(10) charset latin1 collate latin1_bin, +# b varchar(10) charset latin1 collate latin1_bin, c int) +#partition by range (ascii(a) * c) +#(partition p0 values less than (2), partition p1 values less than (4000)); +#insert into t1 values ('a ', 'b ', 2),('a','b', 3); +#drop table t1; + +#create table t1 (a varchar(10) charset latin1 collate latin1_bin, +# b varchar(10) charset latin1 collate latin1_bin, c int) +#partition by range (c * ascii(a)) +#(partition p0 values less than (2), partition p1 values less than (4000)); +#insert into t1 values ('a ', 'b ', 2),('a','b', 3); +#drop table t1; # # More checks for partition pruning @@ -733,29 +733,27 @@ DROP TABLE t1; # # Bug 18198: Try with a couple of cases using VARCHAR fields in # partition function. -create table t1 (a varchar(20)) -partition by range (ascii(a)) -(partition p0 values less than (100), - partition p1 values less than maxvalue); - -insert into t1 values ("12345678901234567890"); -insert into t1 values ("A2345678901234567890"); -insert into t1 values ("B2345678901234567890"); -insert into t1 values ("1234567890123456789"); -insert into t1 values ("1234567890123456"); -select * from t1; -explain partitions select * from t1 where a = "12345678901234567890"; -explain partitions select * from t1 where a = "12345678901234567890" OR - a = "A2345678901234567890" OR - a = "B2345678901234567890" OR - a = "C2345678901234567890"; -explain partitions select * from t1 where a = "01234567890123456"; -select * from t1 where a = "01234567890123456"; -select * from t1 where a = "12345678901234567890" OR - a = "A2345678901234567890" OR - a = "B2345678901234567890" OR - a = "C2345678901234567890"; -select * from t1 where a = "12345678901234567890"; - - -drop table t1; +#create table t1 (a varchar(20)) +#partition by range (ascii(a)) +#(partition p0 values less than (100), +# partition p1 values less than maxvalue); + +#insert into t1 values ("12345678901234567890"); +#insert into t1 values ("A2345678901234567890"); +#insert into t1 values ("B2345678901234567890"); +#insert into t1 values ("1234567890123456789"); +#insert into t1 values ("1234567890123456"); +#select * from t1; +#explain partitions select * from t1 where a = "12345678901234567890"; +#explain partitions select * from t1 where a = "12345678901234567890" OR +# a = "A2345678901234567890" OR +# a = "B2345678901234567890" OR +# a = "C2345678901234567890"; +#explain partitions select * from t1 where a = "01234567890123456"; +#select * from t1 where a = "01234567890123456"; +#select * from t1 where a = "12345678901234567890" OR +# a = "A2345678901234567890" OR +# a = "B2345678901234567890" OR +# a = "C2345678901234567890"; +#select * from t1 where a = "12345678901234567890"; +#drop table t1; -- cgit v1.2.1 From 0a91dbcf53e021155e56c02ee50b4314ffad7ccd Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Jun 2007 03:22:40 +0500 Subject: BUG#28971 - ALTER TABLE followed by UPDATE for a CSV table make server crash UPDATE against CSV table may cause server crash or update a table with wrong values. CSV can write only a whole row at once. That means it must read all columns, that it is not going to update, and write them along with updated columns. But only limited set of columns was read, those that were needed for the UPDATE query. With this fix all columns are read in case we're performing an UPDATE. mysql-test/r/csv.result: A test case for BUG#28971. mysql-test/t/csv.test: A test case for BUG#28971. Flush tables is here just to make crash more probable. If we remove it, fields will have old values from previous query and server won't crash. storage/csv/ha_tina.cc: CSV engine is not capable to update single column, because it can only write a row at once. Thus we must read all columns if a table is opened for update. --- mysql-test/r/csv.result | 8 ++++++++ mysql-test/t/csv.test | 11 +++++++++++ 2 files changed, 19 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result index ede5d9a32fd..1196a264fd3 100644 --- a/mysql-test/r/csv.result +++ b/mysql-test/r/csv.result @@ -5240,3 +5240,11 @@ CREATE TABLE `bug21328` ( insert into bug21328 values (1,NULL,NULL); alter table bug21328 engine=myisam; drop table bug21328; +create table t1(a blob, b int) engine=csv; +insert into t1 values('a', 1); +flush tables; +update t1 set b=2; +select * from t1; +a b +a 2 +drop table t1; diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index 62482d576b2..922fbb0d3f1 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -1653,3 +1653,14 @@ CREATE TABLE `bug21328` ( insert into bug21328 values (1,NULL,NULL); alter table bug21328 engine=myisam; drop table bug21328; + +# +# BUG#28971 - ALTER TABLE followed by UPDATE for a CSV table make server +# crash +# +create table t1(a blob, b int) engine=csv; +insert into t1 values('a', 1); +flush tables; +update t1 set b=2; +select * from t1; +drop table t1; -- cgit v1.2.1 From 1901d1b5daac1def7a99e43717815bf7c45a2c6c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Jun 2007 17:42:03 +0200 Subject: Bug#18415 known problem when mysql-test-run.pl run ActiveState perl for windows - Select STDOUT as default handle after having cloned the child - Disable check for "$error eq $output" to ptoperly redirect $error mysql-test/lib/mtr_process.pl: Restore output to STDOUT after forking the child Since STDOUT is not redirected disable to check to see if $output is equal to $error so STDERR is properly opened to $error --- mysql-test/lib/mtr_process.pl | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index ac2e049a67c..2b6abcf004d 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -142,6 +142,7 @@ sub spawn_impl ($$$$$$$) { if ( $pid ) { + select(STDOUT) if $::glob_win32_perl; return spawn_parent_impl($pid,$mode,$path); } else @@ -163,9 +164,6 @@ sub spawn_impl ($$$$$$$) { { # Don't redirect stdout on ActiveState perl since this is # just another thread in the same process. - # Should be fixed so that the thread that is created with fork - # executes the exe in another process and wait's for it to return. - # In the meanwhile, we get all the output from mysqld's to screen } elsif ( ! open(STDOUT,$log_file_open_mode,$output) ) { @@ -175,7 +173,7 @@ sub spawn_impl ($$$$$$$) { if ( $error ) { - if ( $output eq $error ) + if ( !$::glob_win32_perl and $output eq $error ) { if ( ! open(STDERR,">&STDOUT") ) { @@ -184,15 +182,7 @@ sub spawn_impl ($$$$$$$) { } else { - if ( $::glob_win32_perl ) - { - # Don't redirect stdout on ActiveState perl since this is - # just another thread in the same process. - # Should be fixed so that the thread that is created with fork - # executes the exe in another process and wait's for it to return. - # In the meanwhile, we get all the output from mysqld's to screen - } - elsif ( ! open(STDERR,$log_file_open_mode,$error) ) + if ( ! open(STDERR,$log_file_open_mode,$error) ) { mtr_child_error("can't redirect STDERR to \"$error\": $!"); } -- cgit v1.2.1 From e148eb473222babd262eb7200621a1e1cd2b4938 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Jun 2007 15:34:21 +0500 Subject: mtr_report.pl: Ignore warning about file name having question marks. mysql-test/lib/mtr_report.pl: Ignore warning about file name having question marks. --- mysql-test/lib/mtr_report.pl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 096840eb559..84d813ca918 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -359,6 +359,10 @@ sub mtr_report_stats ($) { /skip-name-resolve mode/ or /slave SQL thread aborted/ or /Slave: .*Duplicate entry/ or + # Special case for Bug #26402 in show_check.test + # Question marks are not valid file name parts + # on Windows platforms. Ignore this error message. + /\QCan't find file: '.\test\????????.frm'\E/ or # Special case, made as specific as possible, for: # Bug #28436: Incorrect position in SHOW BINLOG EVENTS causes # server coredump -- cgit v1.2.1 From 9b8b0000cea134136d5a097629a792da593e35e0 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Jun 2007 19:22:27 +0300 Subject: Allow multiple calls to mysql_server_end() (Part of fix for Bug#25621 Error in my_thread_global_end(): 1 threads didn't exit) Give correct error message if InnoDB table is not found (This allows us to drop a an innodb table that is not in the InnoDB registery) BitKeeper/etc/ignore: added include/abi_check libmysql/libmysql.c: Allow multiple calls to mysql_server_end() (Part of fix for Bug#25621 Error in my_thread_global_end(): 1 threads didn't exit) mysql-test/r/innodb_mysql.result: Test case for drop of table that only has a .frm file mysql-test/t/innodb_mysql.test: Test case for drop of table that only has a .frm file sql/ha_innodb.cc: Give correct error message if InnoDB table is not found. (This allows us to drop a an innodb table that is not in the InnoDB registery) --- mysql-test/r/innodb_mysql.result | 8 ++++++++ mysql-test/t/innodb_mysql.test | 14 ++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 34eb831e7db..4720c7c2e2e 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -625,4 +625,12 @@ t1 CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='123' drop table t1; +create table t1 (a int) engine=innodb; +select * from t2; +ERROR 42S02: Table 'test.t2' doesn't exist +drop table t1; +drop table t2; +ERROR 42S02: Unknown table 't2' +create table t2 (a int); +drop table t2; End of 5.0 tests diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index e6d94fe1627..578a81f355e 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -605,4 +605,18 @@ alter table t1 comment '123'; show create table t1; drop table t1; +# +# Test bug when trying to drop data file which no InnoDB directory entry +# + +create table t1 (a int) engine=innodb; +copy_file $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t2.frm; +--error 1146 +select * from t2; +drop table t1; +--error 1051 +drop table t2; +create table t2 (a int); +drop table t2; + --echo End of 5.0 tests -- cgit v1.2.1 From b3b8d5165d76de270532120dd8ce2a216308c0bd Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Jun 2007 19:44:54 +0500 Subject: BUG#15787 - MySQL crashes when archive table exceeds 2GB Max compressed file size was calculated incorretly causing server crash on INSERT. With this patch we use proper max file size provided by zlib. Affects 5.0 only. sql/ha_archive.cc: When calculating max compressed file size, use the real offset size that is provided by zlib, instead of sizeof(z_off_t), which may be different from actual offset size. When we're about to write and the data file is almost full flush gzio buffer to get accurate real file size. mysql-test/r/archive-big.result: New BitKeeper file ``mysql-test/r/archive-big.result'' mysql-test/t/archive-big.test: New BitKeeper file ``mysql-test/t/archive-big.test'' --- mysql-test/r/archive-big.result | 19 +++++++++++++++++++ mysql-test/t/archive-big.test | 25 +++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 mysql-test/r/archive-big.result create mode 100644 mysql-test/t/archive-big.test (limited to 'mysql-test') diff --git a/mysql-test/r/archive-big.result b/mysql-test/r/archive-big.result new file mode 100644 index 00000000000..7dbdb490017 --- /dev/null +++ b/mysql-test/r/archive-big.result @@ -0,0 +1,19 @@ +CREATE TABLE t1(a BLOB) ENGINE=ARCHIVE; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +DROP TABLE t1; diff --git a/mysql-test/t/archive-big.test b/mysql-test/t/archive-big.test new file mode 100644 index 00000000000..414b689b180 --- /dev/null +++ b/mysql-test/t/archive-big.test @@ -0,0 +1,25 @@ +--source include/big_test.inc +--source include/have_archive.inc +CREATE TABLE t1(a BLOB) ENGINE=ARCHIVE; +--disable_query_log +INSERT INTO t1 VALUES('gt:Y;V(Wh/DM;z\'@Scyb^2u*b:8GBTan./A;D(7x(PB98IL%ipw0x=^H,>8=i%m\'heEdN:pR*o%Ywtf&x]H2[]Ex\\Bn1>\'EhfGmw56OpkO(n$VpXE2d.M#Z*XevKM$`Er;euB&2e3d-HdFlw;RobzhxMQ3EFn&aCf`5y79V/\"UmMt-t36S(aAY&Ekt.w@m4Q!G,@@]?\\:D.R;j1Kj[j*&\"n8cq6Me>@fgW_Wx$821=#0fAM@75D7\'Wi2T8W32B96C2kQ5MiO2C>NP-(!fms!;I?Biu7F?G*6o[Z54D?LCJ/H\\#+M,-;$?Rd\'-Ii`+GfW_\\5-zRc\'.M%dV`dYpOv2,\"`L;\"3u(Xk9pU8Ry79Z?fo\"K=-b7#FxX0!OS6Oma\"uZ@m1C?Q]c\\*P=z\")Hq/(xSsrd\"j&n(m{J9x#4y:KM%cSV7LZft=gzUtse$tM`#zsV35Oqsrf,=0u-q#H-@=Qc(1\\ddM6`gke>>^F{fmt(Zuey[9G=;O_tRx1zH2[Z9E5rjDL8j<)RIVX<\\Bq@\'<cbFq2;qS+q*lprp_gnv/t0$`Ep4HP>$4w-iWW35Lc7{8zxpK`+KyLKs.{Si>3#PR.,.@>Uqd%zj(wRpe,@Cm)q4D<>caAZ+[qQy9HCT_e_3sy0qw,b6#Fz`QT7Qv+a4v\'N;xxudtC+FcJ%p9``Cjt0)vJKt7JO5T10<\"-\\qK_#&2iIke<7?tY@m4Os$H((0TC/[did@K<)TU0)vJJq(eO;uj6aq>u_Z*Yi+1S6Pqo`qA*Fg\\u`_ChmkXU&SU8Pod.M{Q[[:LR=rR&\\)L.;\"1l\\i\"Z0u1)s;a_>Q^k&js+lkYY7B*FbEkr&U`hljR9cp01GUYAtRw/qz8>m:k=)M3Oy>`OMr\"Bju6A\'<:LUKWV.yJ>9Axft@va`Be\\#,RC5#EwV)]&<@gr-zQavV-ox56L_!wh&uM\\k,0Ia7\'YrYI?>W&N<{)L*).JmlZ]H0S9[I9!5)i`,N.7d\"m/:r\\UutlDH#hp!F#rIO4Q&\\*TNiO-0GWeyY/v59``ChiYbf]#,O6W8Ayk1EN;xwpQ$Vi9unNu-q#I1Q/1HZoHRGL+,<-gL\'p1;pQ\"MERQ#OO{J<-fFh^%2kP08h2T:\\LDQNpty*V\\NO(lu1(o+xMS=qMhL\"Y\'K-9tlDJ,8q`it4:g%q=sW8KWU,mng:)Yl=#3sz3\"MFWexSpauQod-G_4z;KL{Sg4c$xb`B`Dp6OpnZU$Er;er8T(^.`(:/u33ECbL5`hq%S[TsmLmkUGARYNXV*b>I:#G.Ii\\rPs\"0omXQkN&gb8+i[n@.`\'5qjERPy>Y.oty.iSD;:M[ccM6`kyI8z.gIq,vAv[Cx`Y!-\\oEDeV`dXk:uj8lFTX@qGJzW#;D(7x)UX?m2FM6][4.*%tJR@+O5T0.5_e`81./?4%Ywtcp6NjUIK\"\\512I[qOrw\'N9oOyAk%gb;:PiF]*M-3XJJp&Yxvl=&B\\0qtx(K)&#tU*hX`]4(eRHTQv,fK%l$]6/*!bYwqU5A.[j++4d*:\'OA7.yMMyI8x%>LG]\'ASczfo!G*8x&CcRPw44D>J=0s\'Wh0H`2n`uSz8@v^Sd%{n\'AWupW@v`\\/jWRv)WexSrjCK1LosuwvpS-zRf3^hu:X309h1O#WrcxX0yG0S:bf\\zyucn(jmiKs1/4YLP/4W@wcheFid=Ak&hiZft?qIRD=Cxa[*SJ[k3S.&n+zVz1t)]\'ATe(.Kq$QQ)n#PS5GJzW$Be[vi2R-$ggUS$NFPGO(Eg]#)BVmKfK#cUajs+kfBRZO[aZ$95?yqPu)\\#/`%)@G*7rh6h7oU;`]611A71-/CGwQjIj`)=>\\=X-j^tW4:euD-O1A6*h[mUsmKjZdmw9KQ9aggO7_`G!fjfFcGtAzoD>I9z0ne5mR3A2og<0v6=pIVX=_QU\'D`A^=P`rGEdO>(HvE1_sL]pD?OR3?)IvC&.R>xm?.c4n]c_5\'[%81)t@ym9C(9)[woJ_%1e5mT=m;rZJCPMornXKP3IXdp.(wTv#:?l.4\\Z2&cL0I_+N.8k@738`cRP{G+<0t+i\\oB7,r+mt&M=)N4V^H+:&J)\'\'-N&inm\\dfV]Re+>7;`Y#7-xH:(RPu.q\"DsC1f;-j[j-5`m-+/JlfAJ6h6kESR(fUU23FJ%m)tA#%.VMa*@F&#w_Xxz$5z9C+E\\*REB\\.fGjhM(vMWQpjCL9r`ggVW7GCXsctG@I2ZW)[uez]Cn1?*M1EL1I`.Zdls%PJb7&QOx:Oa$%*D\\)L.;{,YfvG<3*s8S\"Co4HTNjReh_)CWqZP_rGFjiVPna{l2HXdr8U-w@m5S,vAtS#I-BG$o8_\\63;mA6)dK+,>4)lptvwxwoLgIq-zP^hvAw^Q[Y0zH4c&&,Jt6GCZ#3w1#Ui;&Em{J;&I&vSv&GyY0xAm.5]\\-]wh)%xb_;D&*?CrB,N-1Kka*@F#o;j6am)uB&0[fo&^5&XpU7Nd6w\'I%r?zu^Y\'M6`jwAp?&8*b@R`l+\"da;=_NG[vh+3\\_I3YRmVE7#Ciq&Xr]Z0u1(lx=^I1S9^TkGXi0I`2lYW,i[j-7h7oV>n=yyueyW(Xi2R-#dYqW?n8cr>pHSK[l7cuLUHK\"\\9B#{u]Q^gnv1$[*SNkY[BsIO2EJ*)1XRpd+;.nlYU$FzbYvoNqw,a5w*]{{{\"$-WT%RS/-0JhTMb/XT#Fy[;QiEVez`OKiVRx1{I8vulDFs>qK^{vbgb<qJX^Sg3_j!Vsh3[Y0w;Sv&GxQiBJ3WF7z63;nFN7csC-SC5x1x)L-7kA@Z-gM++3]edK,4^edJ$jyH7rh8raq:clw9M\\i&o.-5c!izRe0SQavV*eK%n+{]@aQR*q,xH<2#Te)2\\aUd#o:h,4`p(J%m)q4D=E&*<3-#d[z\")Hp+r13LhN+($uT%OH\\vf\"bXoP#QXICUf((2`vW0#Z+[rT*mqssj>/l`{qISJWY@l-2Q+u>l4S.%hi\\pHQA2pkMx@m3J`,O2DCeYoIZk6_cYqU7M_{rQu)[uduHBQT4C:47W7HFeUV6F@LCJ.?60/7g.BH&x]F*7rj=/mc/TC2kQ4K_#(==Y1\"R_k\"X$?Q_n2B::Su#>P\\_NGXg\'!i\"[0t,nsw\'J*,=4*q,wF1^o:j3R01EI%o4IXbgc@NKj^yk3Ow7B*GgYg#hp#L?5+q,vC\"wdks([z#/_yl6][64@*L*\'$yen\"MFTXC%\'6uz,^\"{yoHRHQC95;h\'zaWq[TqbwX1&eXg%sHGkjY^QYNZ_QWF8$FuKO/6_d_1kVL[guAxeo)knkS=qNl^rIRB5#G&#v\\J=0qx0s&T\\TnVC.UJQ;pPv2)r6KZg{Z1\"OQ,#aPMnjLv<]I7mO\"QYN[dg]ysYC\"tS%S[Qd-HfO:oMnkQ1=TrkFWcq8V2/7ctG@J7oWF8\">Vx\'Fp/.9oS/-2Q,ySlO&fZnDB_?X(O@3u*`1jO,)(*:*]$1gBL:y(Gp,wIAI0KorsnP)lu/xArFBVmKgM,/GYm@3w0yF*8y-d>DwW-r(^/gDZy\"*L+*0P+yUw%AY%Cf]%6\"Bjt38\\NR6R!Co3FJ%o2@.^zqMfBRZO[aYz%:7D4qlMt/\"Wwy\".`&3jIke=(Go(g]\"$-TJRD;<[:E2b(4kN{OS6Pt#AaOCDks(^/e<7>n@-Ydkr\"Bir+ox6:]PYQh?=TpasE;8D0`yh{[50/;z\'DaGwQg<0v3/2KhP6ZKF]+P.fBR[Trh8rcwU%L7j>0olVGAONw;V(YnEK+.DPI]{yt\\P[Z7>oC:8IL\'o,$gja*FbCbL3XG:+eGp(ha0a(7x,a0c-Jt39cp16]X%GwQiDT]X&H!aTal%`AaM<&@UmMr$J3YO_sMa(9+dFhc<;SrlLoqpbzdh`-R@)Ho$VlCFtD0_sOjQ5Nnf8z2zCsGD^3x56OkXV+fO7aip\"Ex\\Bm-.>1t(Wg(%zl1FN9oNrz:E0[aWr`hkhIoz?`NFSPw56PplQ05WB!sU-u8Og?@d^0iM\'n&cL2P$Wsf\'&\'1^n6XByk/>/iP3IZk3T4C91*zW&M9oQ)jhQ;l?-^zsU.#]8;]KAAcWh.@;G6ri;%@UpZRjHa80&f\\z{\"(BTd\"j&m$[,_(<8F:-ortrd\"l+(\'\'0Z[=Z67R!Bit6C2iJnsy0t)_/b-N+%rB-R@*K#aK6d#qC7&SXB\"wclv6?vbhfM/;z)K&p4HSIVW48[I=4+u?m6[Qax^ONw;V(Zvj6`l\'ku0%dU^Z.jY`Z&B^;F2c\'0ZZ;Ttwy#0f@EzaZ{*N6ZJCRT5EAR\\]@bUcuIGh]xj2Nu/{OS9[H4e.Lv<]I6jBFvMWQqlN#UnP\'eTT/\'o,#cXmEL1Jb9.s/%bN@4\"G)0T>u_\\3&\\*RFJ#bUbn-)&\"p?\'@OP)q/,/FV`dZt`f_1jR:fyUy0omZY406ZNWOb*?@d_3v+b;:PiEXmEJ(\"k(uJIq(dL.=-b5v&GuG=;MXU\'Xk=\'Ejmg@F$rFATe(,DVdz^H-BH\'&&+CUf)/N%cOC?R`q?yu__?Z/prqbwW.t22A3u\'RQ$R[W\'PDEm#R_k$^=Rd,@Biq%UcuJL\"[0t+gSIRFFkoqnVB(;42?\'@PWF8&OB;C\"v\\LFWg+5d)1\\bZ#5&Vg.CI+5e.HdEf\\xqPu-nof6nU>qJX`[,`,O2EGuE1^qD9/\"Vq_gljR;l=$7,nt%I)*8z2v.t1+$m*wNXRstnO!LETW?n8bl$[-c9,liM&kt0&hgN3LgKzRe.Kpy;LS>ucn(knlWN^tU+i^\"\"!!!\"$/^rMd8%L5]_F$rGFjgM)z^I.H`3u$BbRP\"J8sh6g4`q?!#)EbGwO`w\\G0R8W9PlTA&5u#=NQ2?,X_Wsh2T9]NN{NMu5=qMgJt8Ne7x*Xcm\"OS4DcaA\\3#NH\\yvexTtvtg+5g6lKmiM$_Cinqqg3_m0;xwnIYh))/Q4HP>$5z:F4lR4GN3Q\'cK.<\'J%p7U0+&uM^qFDaCdYmDFo*u?nDzhzRh;)TV5A+O3LhM*%rC3mZZ8E3lS8ZCygt>k.8nP\"PVA\"zqNma#zn>&>I9z.gGh_\':1%bK/CI*,ACl#Xz+UU0(r7Rz=Tri=-eD].d:.r(]+TNjQ8[MN$\\1t\'U_`H&{k,/CJ,7oWE4kO)q3@*K#`I,:#:?j\'tD2hDT^^Bgjc6w(PEGt=j*\'&\'1^p?$2lVJO2GRKa,KzSh;)SNng?>X+`0c1^l0?1ohADsD5u\"6-yNS9_[0omYU#Bgi]u]OUA\'6x.k`{rMe;2*vE1_sL^wes8T\'Zyxtaipx2&aCe[xrWW%I&vV(Zvj5^bWk<%>MKnrrmLpy529h/EQMk\\i$hmne4i@>Usj@9>j(xTy0ptw$;BvY9LWU)b>K@>W%Fs?u]OTW#8=h$hkf@I3]da@Ti<*XclzG.JnqrmNw;Sw\'N:r^_DsC/\\hxLLwAuT#G\'%$#!xj/BCdYpOt)\\\"+O4S+q,wC\'/XSy3&`?TkGZrV6HJyOXOe5nVE5soZRjF\\&:8GAOLorrh8tmJc>Dx`Tf,;*Zm=%<@n5QzAjzOVF:.q\"Ey`QUn9i1Lnof4d,CMA9<`VmH\\zyubhi[i&sC0]n:j4[V#=P\\bYws]Y*ZoIYg{]@cZxvi/CI(%yfq-#aNA98L\\k0A:=b_;C#yl4R)ls#FxY1$\\0qtx%?PWG?DxZ9KM)vIGeQD>LG^)JyQazi$feK&r=pHRGJ$ip#K7nP$Xx{)Ht=h\"`L9pYLP/7bsB*GjhN/8lDH\"da=H4g5kESV:V.u5?zvf\"d_4{?aPKgL(xUz613J_(=@eeO9l?1rv%En*s9U+h[k4WAwbbL6`l%dV_^>TqatKR?$0e9)Yl?.c3mWKQ7[NR4IVX9PjKr,p%Vi7kCH#j!Up\\Z54D;=]E\"on=!(EeUZF.N%dU]W!3{DwW/xAqB0c/TD7&PKeAR[V#?X&J(&$\"wep/+,:\"4\"I3ZV%K3XG=9E1c*;0v46S&WlDGuE5pd)4g7rf,?=Qe0S.b4pd,AEtHFfUW;W/{NO(kqy3*s6JTJVW34Lc5sq`m,\'y`Tap9]Q_j\"Y)SNl^sOiM$`G\"glnhCPLjX\\H2\\_K;%BaI*/Mw?i\"[2#R]aPNu1(n%]1s\"=Qb%\"wchc=An5Pw2*vD.S=sYC\"sOl\\fmw43D=G.Jnsy/l_yi&o2?+RFFjmg@Cn1j*\'$yh$ebhyOYU%L8mH\\wi.@89S{>V{4)g\\t\\OXMZ_Tf,=4*p\'cJ*+7tmLnm[aZ!+UPqrjA@]:D*AK:xz&=F,BK4_iv?l1B>LJkd7#AaM>.e@K;%AZ-c8+hVX9Of:*^*K\"\\8;`Xy\'DdTT/)wO`xceUX?k,.?76E?J:$=KEXoNqtx&CaFvMWQph=2#S^edJ#d\\&;=\\Ahr,u:W1*xO[_ONx@j!Vvxz&:8JM)wN]k,+5e-DQOw9IGh\\rR#NEPGRGP=z\")EbFs>qK[m8h.AChlhKxF/Q4Ka/XY9JL$e[yxrV8Nb,Js0*{`NDH$n0;vl?1okN#Z*UY@n7[LMzLHcAWrcvRn\\aWmGWcm$Y$=H8x(K-7kAA^>W#=LKs0(r:_Xx$833HQD@R`n0;uk;x{\'ATe)2[^K:!1ppc%{pB7(_2pmT;g\"bUais-v=caA]:D*=;NZ^K>3#PT7NiLzOU@!xm?,Ydo(jiSE?LCI+5h9y)O:oLiVQrtp[Sqd%!qGJ\"`H*0R6R$NFSQz@fi`*EbDe[xqT-yNT>rS%Vg.CI((-HgW\\NN\"R`m.2Nu/zMIiZg\"`J3ZSqh9wz&?OP+zW$A_BggSHP`QS28bl\"RasHEcHyW(TZH<2$Y\"3x7\",UOl[`Td{ejiQ8afa6&RV=fs7L\\pEATi:z,Ydq15W>l1EL/DH#l&jqz;NWNb*>:F4lR3EBZ&En$Y!/e>@c\\)IzVy,_)BVi:wwtctD2f:)Yk6an/3Q(fZnA7/%bOCCbM9oT2:i/CH$o5Q!F\'(3e/R7U.\"Y(QFL,3ZRnZX.s)cDeV_]89W34GL.;#6)fUS&WoNs(Zvh/DK1Mt.t4j)z_K9uqZP^m/:r\\W%H\"glmb(7x,a2kQ3D@R_k$`Er;fxNZ]G-BJ/Ib931:nJb8+gTMc6uw\"1ne4h<.lc1_rHJyP_p_K;$>MLt0)tB%-R>xnB:=_PQ+wKHgW]Q[X.s)aK@?\\:D,KxF1YX2+xNWOc.R8]Sf2ZV$FwQkP+!^Co4IUU,r-xF1[aVlBBdXl=\'Eg`2kS>sW;Y6D{k*&ycbFr7Pruy(J#d^0iM$`Do1;pR(fXdr9[G1ZW-ot{5.#_Dn-)%vX6=m:qU5FBWr^bVdwQjLu7E9/w?j$dXlA7/&jr(^0jP1=%+TQu\'SR)kk[emx:N^o?&8,mpmT?wetB%,N--<*V[I;+b6#EvQmXPe7tsf*3_m/8kA;D*;1zH2ZW)^+N3Mlc-Jr-xF/TA*GjfHlrz8;a\\.d;417bn*wLQ5NkYZ>aTcvOb)9\'ST.$e](ATf+;*Xg&vT\"?X)Xi-:z*SK]sU.\"Y%Elw;Su{2u+dC[-_\':0zK@=Rg7re)0WKQ;mA5%T`jt4_MA=MQ07`hov+cAS`l(o,#dZxrZJDUakyE)5o]aTam*xPb%$$)?Ezfp(dO?*P=!&:6?vbild6trd$vX44JYgzX(SR%YvqW?pD;=\\@dbC`BcU__Dn.-9r`ju7GCZ#4z;O`w\\F*:\'O?0jTE=An3FL/A>P\\`PNx>aXr]Z.nlWN_wbaFtE3hCNCCfa90%bN<\"-]tV34K`+Jv?o>z{#+K$cWf\'\"o:i1KhSHO4S.%fb?LCL5`n/3P#Saq[:JJp&[\'CaGwRlP,$ir(bC`Be])Hr4B2m[`Uf,<,b6z8>k0B@X%B`Ckw<[?bZy{&8.xD%\'0\\hvC&-M%dVco17cq:_[.iUKVRx1zG-EVdyZ9D2d.N\'m$Y\"3x7>oD=D#tS!AgliQ8]TjEQKb3n_m2CAZ,_)D\\*SLc4nZW*_.\\n=\")FjiSFD^85@%1gBNCCgc@Q[W*]&8+gRFGr3?&;7D3lVF<7@xi*)0Q3D@Sd$vZ?gp&Z\"-]sT*je>?bYtg)-DSYI?Ae`81*z\\>Y.pty,^#)AQVA$&4n]flojKt23HUU.yLHdHuC*?Cp:fyW&L6e$uT%OGV_\\4)ieAOP%[*UV4:euE3jIi[j0A;IDVg,9{0nhBL:y%95;h\'yaWpV>j+*2YSqh:$>P\\aVh4^efQB7,nt%H\'!k){aRXIAI/Ha945Le==X,gO7^\\513LjVPm^j\'p3A3v*\\yt]Up]`PLk^sRz>[67OjQ7X@qFDbHz^Cr?yrR#MEM:th0Ib<@j!Wy+Xclx@k(r8V33HSK^xl6^aNDH!bVg+7re\'\'-Jp%Vi7j=-b3n^i!Vx#70(s;dm{I7rd\"k(tC-R>xnBj(xW(YnEK**3_l.1Nu0&eWcp03P!J9wxz&<=^J5e*8w\"3v-j_yn>\'@R_it5>wh*-AEr=m>&>H3_l*$m--;\"3x8B%.UL[gvG:*^)D_9;X44GM0A=LIhYdo*q-zSjDQNpro[W(TYG5o[Y0w=^I3[Z53?(BXx\"-\\pFFkqw,d?J;\'L0EN;wtajv8HHnzBp8^Y\'I&vStw!/gGeQFGq/.5`m*{]>Z1zI5g4d*:\'M6cvQjMyG3ayfp(g\\vfz[8@wep/-2Q,zX&H$n/5][53=yvi0FTW>gu=gu>m6YF3f4f2[^G+8x(M2Mprqf,@?Z3&aCdVbn+!]?[7\\\\=Uy.jXZ<[;Ob%&0Z_PR18csA$*CYy$5#H)0T@zu]UmP\'g\\zvg&uOf=65HN4Q#RYO]i#^@`H*3]egXabM:tg+4d(0VIIs5C5{=RiBFxV%J,:#97JP7]UtoS14S-zTnWG<8@zpJXa`AaK4ZSnZW*a90%aGyZ7:JJq*mrx/oph;)V_\\4)ha2hDWk<&CbL6cwT{:F5o_k&jr\'XpR)jhO2HVZE,CPNs(Ztcq7R{@ecDf[t`bN@6.{SjAAcVbo/1FRKb3lR7U/#_?Z0u/xBtPoe/P-+-BFwTy/ophu`aK1NzG/O(m#Tg0O&dTV8OiJr+p\']/gFbEilf@F$sL]pEB[-`,M*$m.1JeFifFh_\'<:O`xbbH#jzLKow/s(^0iN+\'y^J8rbuOd3f7usd#m.4WA!u[I<0v32={\'?MGZucp18g)+:(RNqroZUz2\"J:z+VZE)6rh:z.c6z63DzhwG7x(N7e\"ixG7trbsE7#EsD2f9#>Sh=1u-pzJ=0s&RS.\'sA#&6y2\"K>4)h_)D\\-_%-TGGls#Fz_MCI&ya[&AWwwuh.BDl\"Sc\"n5S*mt\'U`ghURx52=wl?0jRzvg%sF>DwZ;SrlLot#@[4)lr\"Bgi[k0CCe[yxoIYh&vPiHeL+/GZs^Y)SR$RXG9)[xrX>gu?pC946T*jd;7>oB7-s.{TkG[wnDB_AaM=)PA1m`vY:Rn^k)xRmUA#(<:MWQqkIfO6YG9&K0Ic?K>4)kk]m6\\SkJhUQw.orrh9vuj:xyz\"*JwI>=V\":@qGJyRiABe^.\\oB6%SYKKv<^NKj]qJYer4B3qnYRnYSsp[V%FxTttnQ\'bFs?tW8LY\\F)5kIdDcK0EPGSLb1e3f4d)7uwwr[Qc&*?@d^1m^m2FM6][79X8IIq*lrx-iTIRA0f@DvSuy,^#)ANH^+M,-?612EGt@yk3Q\'bGuD/Y[Al*zZ53>$2n^n7\\Rd)6p_j!UpZRjG`3sw%CcODGuF8%J/GXg(\'*:+c?H2YTw\'J*.EVdxV#AcTZKGa:9MZbaEm%`@Y(QHRIW]OR4GJ\"_FxZ8D2e6p_iwBw`Y$98M^sOlZ^J:$>MN$\\0qw*Yl:q[P^j&js-u8M\\i&o2@-[m9i1P)o\'aDgb<=]G)1[^K<*Xet@xg\"`MALIgTLb.SA+N.6dzefW`]:AuY;V&PKd?G*8z/jXX6%7)a;QawZ>_L@;D\'1_rIO5U6GGkniGcDdSPy=Y1#Sd&#v^Tf/IhX^Ti=.gIs6IM-2T8V/#\\2yAixE-HgXadRQ{F%{n:j7g.DPJb5v(PC@UnR.)#k%gc@PVB(:-pw.mjN\'kv6>uadVcp4GK(xZ7(Gq0/<$834JZl7dxY54GJ\"`K4_iu8Nc/VKTGGlqv\'OA6,p$RYMR9af`3rtpZO]hu>j(xW*^,SEAUkDL5^aRT27__BghZh%m*yW$BdZt`dYqT26U25R\'^2v,gO8aipw2%^6,u=dhc90!PXLTE;9HD\\+SMc5uw#4z>Y.ot{4)h^$-VOjP2A6(`82/3T4@,UMd8%K4ZSmU?t[KCL9q]Z1!K?:D)9*a5x1\"PT9\\I:&Hz\\=Uy0omYU$FwQkO\'iiWV/#[,b3oc&);2%^5,s39blyCxb_;C$\"xj-7i;#86B.[guAw`\\.iR=t]Wx$:=^NH_/^u[H6p^efQA3w.opkLr&Vi5_gmrw\'K-;%>NO\'ij]pC8/!Sg4bycaA[.gL\'q6Pt\"1t)_0e9(V`e^*K#`K4\\\\J>63:k:ulB=I>8=i%l&dU[OYStuulBB`FyZ7?sS\'[#1lYY8F<9F7\"@[5/.5an/3P\"LBFvKQ9adYpNon_o:g%sF>DwX46OoiF]*L)$sGBWr^^Bhow1$Y\"3w2)myBo9cp16[Qaxa\\.d=>^H-CL:umFQFJ\'y^I3^gnv1$Y%?PXN^qFBY{,Zh#fdJ$jv:RrmS8U.zP[\\?bUe#l-/DI))0S=oDB[-b6!=P^n4Ou-nnb\'1[b_98M\\l3LiVPog8w#5%RV=gvG:+`2lXSuz.d;56Prv#9:W-r)eM4S00>*SMgFa@UpYLP3GOeh\\wg\"d]+SJVU.!Sg3]dbDeXg)(-Jp!DvStw\"3v,fK$hnruy(K(y^K9x#5&Ubo3EDcM9mI^&7%NCBaJ/GYnFN7csB)?F&%\'4n[]Ezfmu-py:G<67PplQ04U6GHq/)!d_5$OI_+L)y\\@bXoOx=Y2)p+u?o=wmA70+&tJN/9mH\\yqS(aAZ(N9lApHQA2qo^iu<^OP%_=KF\\\'@R_jyH9!5)jfD\\,Yckqy4-$ggRC947U1/6bsD5v$?Ww\"3u\'SV9U(\\$4w.oqlNzLFWg((.Kt22C?PYQh@Cm)r7Qv+c?K@?X\'L3S01FM7dy^H,>63>!&90$[-b3lVJM\'p4EC]3!G,?I7rf-BFwU!:E.Q8\\OXPe4iDOEJ*,>5/+*.HcDbI\'\"k)xUx,_+L%iow.noe0S:dq3?\'@QZUy.gK#^@_EwSu\"5+o#PP%\\/hM\'q6Oog;+^&8+gUS%RWAzqJYfuE0[b]/iO.4[SlO&bK1Nw8G@H/MxBw\\E$ygyRg7sj@;D+BMBA`EuJL#^>Vy*VX>fp(ePC;>c_:;[@jzNT>qMfCUg/H_.]rNgGfSLa+JwD\'1`yi$e`7*fRHQ@-[j-7i8q\\Z3*s5GFhb7(Ys^Z0u/xBvW/\"WvulCEn(jk_yi*),@Bhmm^pA,TISHM-5_hp\"H,<.iVRw/qy67OiM%eZs]UtmLle9&K0JeFh`0b+BOJeEdQGP>&qNjTD91&f\\zxqR$QUY-jZchdAQVB(8(YqT0-.>4\'_71-/B@[0r$H)/N#Wwy$7*dJ$is,t4!&;8G?E\"o*SLc4n]c^1ne5jG^-WX7F>Am,+0P+ySnVE7!;I>=TsoVA{tY>dh_)BUe).Lt5`PR-\"^BffP=!\'?K>2\"NJfM/:wtcs@ypJZk5YIBOH[t]TlLr&Ubq:aaGy[8B&3iEYqV:Z=[>]Cq>wi,5c{izTnWF8$EuHCUf)0S;fwMVM[gvE0YZwh*.Hb?KACiq#H+9y(K*)0T>t\\MN\"Tj@`PMpw,eEaDjoqo[X.r$M>0ojJlkWSy2%Z%@Th8qap8YC#xgyRjG^+RD=D#uY\"*Is5E@NMv7C.WT&RVzxrV5C3roZV$Eq6Om_rGGn#S^aRU8Sz=Vy.fGic:0!OT:^Vq^cYs`gfN3P#OO\"NMw<\\@gozBn09j<#7.xF/S>sYBzk.:wsakyF+@BkzMMzJ>9@rMe=:KM\'o-%kyH8vy&?MHa:6?zubij^u\\J?bZ!+RFDbGxTv$>P[Z69ZD\"qHM/=\'Df^(?J:$>P\\`S[SlO&dSPw6:`^:@pB2n`tRtz2w42=z$2nb\"rMc2d-Ks1,,4^fi^\"\"%2hCPKfKzUslGXj4WD/WQoaxa]3{Cq?{xoGP@-\\qIVU.xG4iCK4\\[:G<3-&p6Rz=X,iVU,nv.ou&L6bsD4pg6mR05U6GIu?qHP;nI\\vco+vC)=pFIxP_o:h+4_m-.=-c8\'Vbm\'jmf?Bl\'ks*gVV0)t?tV37YC$!uZD%%\'6x.jWV/!RarE<G0S;fxP`vZ?egZm;ug((.M$]8;\\G,@AcZxrZKF_1m_tPod/O)t@v_Y&Df`2lVLVRw,dATf-@@_FxZ9F7#BfdDcPCAY\'K+.DQNr{:G7w\'L1Lk]pEAUj>1t)[{$/`%,L#^=Qaxb_m8bq6Rz@c[$4y9D-N)vKL#^=NVIK{VuumFRKa0a$#\"ztZH5mQ/2KgN/:sdxY2)q14Nr\">X&I\'\"oRg5jESS-yMQ08g+5i<*Yi+2WHBQS3@*M.9oS3;pOv1$[-a1c.O.1H\\wk8h4]aSZPb#uZ@m2DDf^)EeTT/&kv9MZccM8h0Lq\"Cn1;r[Rh;+\\vewN]hxKJnrttoS/-4[W\'OB>MMxCzh![4,yRf1YV\'U]W\"6/\'p18dwSpf1T?xmc`=G1\\b\\*P>\'?NMu6?xnB821?-\\qK_#\'7%NA86C1g@DtJM*%rB,O4Ml^sOjO/7ctGAPQ,zTp]bYtdwTy/prqc!k(uF;2(lt-p{Aiv;Y6;fvH>>Y1#R^fgW\\KEU^[4,wI>=TrjBDn,\"_G$sKVQt#=NT>rR%S[RkJkc2c.LzMN%aEr:^RbwZl2Jb7$J/FV`cU_`H\'$xdlu/zLHa:6A)BR[Uv#84=t\\NS9[J?elr!=Qe/N&e[t`dXj7i6i<(L1GXi.?4&[(K\'vN`zo@,TMd6tusbsA\'8(Zt`bPIZnC@RbyaXtg+4d\'+AK6i;$>LHdGq.(vMXX5:``Cjt1,\'y^I4bzgs4?$0b*AL?5,u=dg^$-THM,0JfM-5`m,(\"l+(%yenzDydg[sYBw^R_k#\\5+s6E=BrD5y64D931:oOt,i]u\\LFXnHUX<\\F(-Jq%T_ggWZCxcdO@3v/r\'[z%5y8dh^$,O2FL1KiUOkUGD\\+VX:Sv\'M7cxX/x@n3LeBTd#qC3od-Ij`(==Z3-\'tF:/w>c_71-0EM9nMopf6nV@yl6_e^-Zg{Z2&_MMyG1ZY6;er4D:7C/[gt:Y;Ty1x=[;Qg;+a3ob\"rMb-O1?-\\rOoh??[7:ZBrHIt:Y9MY[@k&ku48[I<1zE&(6uvwtcr=nA4y69X7D6{;H??^EwSuz1pqh=/niIi^ypHRFI{[50/<#2sz2!H.JljS>vf#hq&Z\".a)=;N\\gv@tS%PLld6uuq\\Y+_-VQt{4(dN9j;\"2sy/lb*?Cq=rU0+$l&geFieBVkA>SjDNA:?izUuse\'&)9\'RPx7B\'7#CkzMKov)[wmA5$POyCx_QYMWQpe1ZW)])Fhb5w-iUPm_p>yvg\'zfms#EvPe6qbyb^6+p$S\\X+`/_wchdC\\-a.WSz8=i)\"k&inplQ05XC&-O-0I_-UPn_sMa);402I^&5x1w8G?F$w\\F*:(UYB{pD;>aVkA:@o>\"\'=An5Pw3..7kBA_Er:G:,fJ!Z.k_zoC948ZF-Ks.\"X\"722B;@n7[LLw@n7[NS;h(#qB/^tU,p%T_ffN7_bQPzF&$###%/]m5W?m5T0-1NyBrE=@j!Vvxy!(C]4&[\'C`A_Dq8ZBvX7E8&RR)kl^sPqpbw[>^J5f-CL7i:z,Zg#ea=F.Ks0(r7Qt!76IP;oKd;6>pGK*\'#w^PWIE_4\"Ezb\\+TPqsp]aRVE$yh{X)V__@^Ae^._zrNl]k)\"fib1c,E\\&$5{=V#?X\'M9mFO@1ma!rL`\'7#BgfO7^^AcXmFN;tez`RV?tU,q\'_4#I2VE4n\\_LA=MP-*,;*Yi0EPEJ(\"m/9mH[t_]:B#!vadWco//@5*kjUJQ?&<3%Yws^^BghW[F-Jns\">Rh;*[rU0*!bWlDHz\\=V!87KYa`BaL7g0O%_?UqasF@J7mP(knkS:dr6Me=NO*uB##%/Y]LCK4YNZ]F\')8{5.#`I-=/ngAI.CL7g.FWe!c^1nc,GcC_>TmQ,$iox54B5#H*3`rD9-s,ox7>qL`(9+eJ\"^Cm*yUx+\\sZE)8#?X%ChgPoD=D\"tQu&M;xvmB?Se+<0u1)tA{sU/#[0ry4-\"];JGbAX\"2sz5,xLKr)dJ%l(n&aCfb:6?wj/@:@pA0e;1#Scyb[\'Gp/-2P)mw9HCXr^aM?4\'].d:-lhHjfDYxwnI[pLd:.s,p{Bl&josw$>OVD1d/TB.XZ>c_97F?I5e-DT\\Uvy$81*yV\";H9#@Y*Yl9oOy@gp&\\)L,1R05U6GHs7KX\\G1XOd2b#xcga4stram,\'vQlUD2g>I5f3`p?_L?3\"L@;F1[`R\\X+b;;Sv#99T#Dp7U0)xRlP+zW%Fs?sV21?+VW8IJvD\'3f9\"9=elt+hYdo(jk^sOnb&*@H-AEtHCVj;!/d:-osv\"5(dJ%n09mGV\\OUC.UM_xh\"bRV=i%m)s:]LFWg*1S:beWeyW(Wf#k%cPI]yrS*ic7\"AbU^^AfdGq/-1NyD#w`Xy%:9Pg@Cn-)(*:*]$.X\\H4d+=Vz2x;QkN%bM7e\'&*>;NXSw+]$0c0\\ddPB;>dgZl:nMniJq%Vh0Ls)bBZ(L.=,]xn@/f@H-DQLiVPlYX1$]4(fUU23IYer7Rw0x>bXuj7g2YPd.N(n(lt+iZi)&!m4R)id=@eeM5WB#$)ANFU\\Rg6kFXj6cxZ:LQ8^Y(QHVW9Nb,HkiO1A70\'n(koob%%(8$G{c],ZfxNZ\\Dx^OLqz:IDWnKeCXvr\\W{2x8E6y1w7@!xl;tdxUz75C5y52:k:r_d]\'BXwxxug(\'+@Cn-,4^gmpn]c`97GCZ%>LEWf&zdg[rU36S*lme5lP,\"bVcuKR>yt^Wx&AXy\'Gq16W@rJTNf?ExY7@xl8h/ETYE-Kt38_]8:X7D2iIkhKv?m5T0.6ao3C;@l,,8tmJdAPR.*&{k*$o5Qz>^F#n6U4>wj4WC(:0x@k\'p19i1O\"OS6L`&0`yj-3ZSo]dbCcQKb6y4*o$Ui9uoR,yQd+<2$Yy$5$NEO@2sy/la\'1_rIP8dwQkM{PVE7!:E-N\'n\'hc;9JKzRc&);-lgBOIa5z7;`[+[oDCaEr;fuE0Z_QU>oD?LDNA;AsNgDYte!eeP?*O9j6d{fo{E#rFD`?Re.HdEf\\xoHVYBvX47V6B0b+F_4y;MXSu$A_Ciou&K3U*Q@/d5soYO`xdhd>E%\"tS#J3[W)Xl;y{&:45OohAH\'\'+CPMr{=SlP*vH>9AzoA0hGcGt@va_?UtnP&bGvKN*yY0wys[MO)q3@,UNf>=W(SV7JTL^wbf^\'<;Rpb\"o>ywj5^aPMprrf/Ls.yKCOFPEGq15XAv_UlH[uexSpc&%(6w%DhiZgzX*[wj2P%[+Xdp//;z&@PUA\"zrQx6;bdU\\Q^l)yW)Xj3U,XaaEr&=CxaZ$95=sX=aYxyz$0e:-j^uZAo=s\\Si=0ry5/,.BDkxBw[Ap;m@0jSA,R>\"(APT:]NP)p-#cWh,9wz)M0B=LIhYesVw#95A)BUh2XJL!UoXJHia.WU&T[RiBG\"iyMMyF,BNDK-;%CbK2Q+wG8z2!H.G`5{?\\vevLP4J[oEEjnlYY42>$4w-j\\m7_cXj8nNt-p!Cp8[J@Ae`6\'Ys__G\"ixH;-hQ=xpLfDZ\".`\'4oavX59^VunOw9JL\"Z-gL\'q7U/%eZqR%VmHYj5[UuupV60.6ap7U1-/CFuHCT`ir)dM1GWblxBrF?I7qbsF?I2WJIr.$bQKc;45K]tY?izUre+8utlB>P\\bZ#1na{n;pQ$S_hov.r(],X_Y%@WvvpT4B0d6v\"4\"I0O&eU[NR4HREC^;D&.P3IW\\OS7S&Vi6f.G\\{%7&T]X(ROt\'SU5C3ro[Z69[G0VGANI`1hGeM2KgKzUrf/Mv;U$H((/S(Eg^\'=An3GQEEf^%6\"@`J0Nx@l.5]\\9E1a#xgxMS=qPv.q!Ahpz@ea>I:%FtB(:/v7D3n_qA+N.4\\[9D.Q9``H$q@%2hEZyyuez_I0Mv8HFdL2MoqnXMWQpg9y(K+/JgRB5\"Bl&f]#.Y_WrcuKP7[MQ1:qV9S\"Co09lCDgeHq12FN9k?2t\'V`e`4u&N;y#/d7x,b7\'T[NVKQ:h*-BJ2R04S.%ggSHO7__EvOb\'2d-IlkZ_R^bT^`L;z)L*)/O)r8S$NFSS(aA[0psslH[uduG<55IQC7,ov.r$M@85B0a\'4nZX0\"QZRn\\`OLlb,KxI=5/.7i7mKkb,Jq+nv/u48\\MN$]738af`4w-ka\'2g>:E3f6p^gox56La+GfTQv/u1+{^Dq=oEGq01DGtB(;2)p+vE-LxH9\"8:V*fO9i3U;dkr$J3[W(TV;Z?dbB_AaL8oS2;pOrz500@4\"H/IdGn{G.G`7,nv,iZgwKJr+q(dK-7mKk_yl8ez`QS02Ja3mXQn]gp$S\\W\'PEHzY.oqo\\`OIa6#G\"j#^?Z1w:Pf8y,`,Q;k7h1O\'eWdq5K]u[G1[\\Bn0:pU9T&T]X)U[LKr+mrx.iSB2oc\'-Kv?l/;xxs^\\9@uX:T{9A{rPt#@[2\"LABdXmEJ($sM_{sS\'Zz$5y8?qL^{t[H6rf-BH\'$v[E%$$&1a%(7\"?Z-gO3Mk[ft9W31\\?_G\'&\'0Z_PT9X9MZb_;C%&-P4Kc7$FvPd1]hu>h![50/9pWAxh&q:adTX?n9f&wX305XC(7y/mg?@aPKgM-1KmiJp#L=-c7%K4[V$Cjt/%cROs&PKeE`2y=Z7=m:nHZk7cvQkQ2?*P;qT0/7g/JiZgzY,gM-1Mt,p\"G\'*9%Erl2I\\ubkt.v=aXsctHCXuj:uk?2v/u5;g\"cYs^]:F3h>77OkUGCYz)J{Z1x>aVj<&A[.hM)yY3+yP_rHK#aK6f-CN@4%TcuM[djk[gvE1\\fp)kmc0XU$I.ABe])Fkoph=1x=\\=Y.pv(ST/\'q6Mc4mVD5ssj?4(eRIW^Wvuj9q]\\8?tU,ox8C*CUf,;)TT,t6GFg[tZH:&I%sE:2-)#o8``Gy\\AgkjTE;7B)?F%zl4Px;Pe4g7tmKka&1`xdmw7@#\'8*dFigO2HV\\NP,&tHDZ#3w/s([#0f@F\"k(vMYZ?`MCFr:a_=OYV(YnGRJYesQ^hr-zP^hs1/7g/IeGo%[(J#fgSK\\oC948]Q`o7X>gvC%*BS[Vz0qv%Em%_pGO7cr=l7dy\\@ecEheGmw7@ynA4zY-iYbbI%rC1c/VM[emv2*vH=8B%-Q7ZH8x*UW8Nb+E^1plR4ISL`&4n^izP\\aTbtHFfUV4=sW;Z>^H/Lt1+\"d^/d9*^)EdO=$4y9B&2f8{5*kjVOiLwC#wa^9=dieCWq\\Y+b92*ySpasGCZ%=F.Ks.\"Z*ZmA3w2)mv46Prv$>OUD1b(6v!1rx-eEbDgeGls&RQ\'cJ(%yceTR\'].b3iFZyvk7f+7q`m,(\"l/8j=)P?,VU.wAsL]rPpmWKR>wl9nKeEa@Wy)M1HZpNomVG@K:\"6,s23GQDB[+Yh\'xZ8C,L$dXi2S18e{aSZPaxaZ\'Fp-%m\'jopjFZug\'#rGGknkR9acSR)ia1f;.oro]da=F,DSYH;1zH2]efVYBuV/!Sd(0UC2gAF!hv?n:i1Lpu%G{`NEO?0l\\fp\'`=I:(QKb2iHeN6ZNXPf<4,xMP07ctGBRXIDXr\\TnWG?DuM^rNf>>\\=W$Dku5>sW;[?c^0iN*z\\%:5:et?qK^wfvIDVi7i;#6+ox9F9(YpMme5p`p:g$n1xoIW_Y$n=\")EfYi.=-c9+fO9i0Kle;2\'dQIYg#feN7am\'jmf?Bjw@p?#+M*$n4K`)?G,ADp4IVY?hxJBL:y$820:r\\Uvwxvl>-_%/\\h\"\\:D.R=rU38^Y&I&wX/yH3aycdQFI\"`K7j>2x8D1a\"uX:QmYW+eK$iq$QQ(g\\xl:r]X&L3T7OlXRrqbwV*b;=`RYNYW-ow0yApoC95>sYAuX5:es;bfZqPw303P#PQ)o(ha1c0XSy2!K>600=%;=_QXG;2)o&]2t&M<$:9Of;.mjM%dVahke<7?rPqrmO{KADo..;z)N5ZKImpo^hr0,,4bwW-q&XoNr\"@aPKhR>\"\'<X+`2m]hvAuX8GAOOzG,BI-AAbTYJCRS16XBzn={&:59_X!2w1$[*TQw418csB\'7$I-=/la&/XT!>X)YnEHyW$Er;bg`1f<52;qS,u>hyQax`Wr_gi\\pGM/?1s#Ckw?i!X$>OVF:0\"Q[[9E4o`q?#+KzSjCJ.BEs@\"zt[I:)Wcn(lw7B*CWnLla&/VNa&1`xbbK-8sf+6lLpx2$Z$;@n7ZI?@cXpQ%WqZP_rGHo$Te(+>SjERR\'cH{^Co3DBZ)TPv-oqqd\'(5pby`WpVQauSy4,xJF_2pkMxBsMa(9(Xi1Mu0%dU[LIja-P3Ka0^tS\"Bl(o)o(fYg%sD3oc%$%,Js1/6bq=oGP=#1hHjc6z4,vB\"u\\I;,b7([{%7)^0e>>Y2$Z(L0DK.=-eBRZPazj+*2[[;NZ^NIb9/\"Vsg/G^+P*N2KgN/;y#0gBNDK0FUZH9&L3S3>{#.Zeo%Z%>KDRQ$Td{flon^j#_Dm\'igO7[Q`uRt{4(dL.=*VX>gq.%fcAWr`hnrv!2v1#Wsg.FYnGQEDdSQ\"I1UC+Jt8PlWOf:,c?I4b{k*#l,\'{gp\'a@VtnMqx1zH0P-)%yen\"LBEr;chfIwH<3+uB{sS#K9tj<%AZ)QDB[.hN.4[SnWIE`:<^L@=OYTz64@*IwH;-j^tV34IW^TkGXk9nKeFha1gAH,=0t)`7*hYfuE2e5kHc?MIfM/<&C`Cjq%PMqx2#QYO`xa[)RGM1HYj1KhQ;pQzDvSv%Dku49_\\2zBn2D@WuqZLP1?-]sT,q\'^2t%K1NzF*7w%@Wur`is0\'lx>dcHzY.oqnWJJu;\\DzgtejgJv@rL]qJYdn$Z$96D7\'Ve#k&iorqe+9$CgeGp*ny>^F$w\\F)3f4c(/S>vds?rOojKox3*s6HM+,;&I\"d`7/#[.gL\'r;fxNZ\\CvSy2$XuoNt+fN2Lk\\k/<$7.xG5kIdC_=KF\\&<=_L?75D:6LFXmC@Wy&B_>P^k\'q7R{@aQP{I4c#rIP8dtD0_tRx4.(y\\@ecFlw;Tz4)mt)](Fhc;5;clx?eh]zwg\"d]*Q?&=BtOg?BjwAtRu%Eq5HQC:6A&5x/nkQ3GL.;$96A+M*\"goy=Z4.+-=.k\\k-3WC,LzRc&&+CVi4^fgX_Z(L1KhRA-XZ@l.3WB$&1d0VLXZ>_NJc?J<+]zveuD/Z]I6lMr&Wi5bwU$I+7nU>pEEg^%5z78Rw0x@iyLLw@n6V7JRC7*gVW6C3n]gq+r/)yZ52;pPw7B\'7$GzbWpS/+),=63sT-u9PjO,)).Ks-u:U(Zuh/CFvNZ`Uh4^fgXclw9KP6T0,-9wxz#-X[F+?@cXmDHyV!9?l1FN:r\\SmR19h0Lnm^l,,8tlGWae](D`@Z,a0c1]i\"[2{G-F\\$2lWPkO)s:]NMv;U\"?Y-gM++3_n3FK($rD8*dHt;`Y{-_$,M)yX-j\\n={&8-s.zOT>sU.\"Y%ElzG1VIGjeAQWC)@G\'(4iDRS.&n*t=h!\\;JE]+SISKZi)#m0:scr>t\\LF\\$5z:F6tvtg,:#;D\'/WRro\\_I1Q.**1UB)@J7mMt.w>dg]{yrU37YD&+DWoOv59[F0T>uadWg))1YV(ZueyX+dEdPC@Vsi8q\\Y-hSEBVpYLN(q6KZh&rA%/Z`XvpT3=wnFL1I^(@K>5+t:Y:QlR6Pt&PFM3S16XB{pEBY%?Rby`Ui8q\\Z4-%ju7GD\\*RFGr7M`&1b(3g:(SQ\"J7oWD/VM_v_X!1ng=529exV$G\"hq)h^!ztZG3b!n8`fa:5;h)(,AI.DOEL1Llc1_qB2kSG+>8?sQw/t0$]9*P=z#,UM`%.ULZb`@W!4$RXG:,gPP]dbDe[tae[vi2O\"PS4FFkqw-iWW1,\'xZ;Ob\'/TA*FgZm@0hIp%XsdwRmWJN,+3[[9D0^p?&:6@!ypHTQw0w;Tx/njO*zZ4-#cWj7h3ZSrjCI)-EU`fdEeV]Vur_cWk:wui3XHBNGXg&wX3/0ADydg]ypKa.XY8E6y2\"MFXh-:\"4\"F$uV-r)cGr4C90\'ij^u\\LDRR\'cL0FQJ\\rS&Z!+RC;:Pf:)ZoI[pK^\"zvdq5GHs:[D{k.6cy`TcwW,kb.RH1VF>?cZy\"*JyO\\b\\*REB[*W^UmNzI7sj?5-xH9$Ciml[aYxz&;9KSB1f?AffQC;<[>\\@cZz$2lYU&QNqx/nmZZ:LUHIt;\\H4d*:)V]TnT7Ry7;dkorri=-eD\\+XbeYk8h4\\^H+7rf,=3(h_\':1&f[vg&vRqlKnog8z.eBQXF7y2x;Sqg4e+;*]\")CY!.`(;69ZBw]MG]%4suwy{\'@PS5KZgzX)Xf#j{Q`o9co-%kzLEVbl$]727YD&.S@\':3..8pZNVLXX6@#(>CuPkR6T*jfE_70(s:JHh]wi+/IdFiiTHM/:ti7j>1t)\\%5z:H@EzdeRK`+Jv?m3Noo`sHK#bRT01@4{Cq;i,3[Z53>$3rrjBEo..:unLjWX5:cjq\"Co2>\'C_;E.O-.=-a.VPn`uU*dFjnm\\cbElzF+>9C*@F$vZ=]CsHIq+s4?#,P7\\Si>4,vC%*CVh2TV!74>xoHUU.{Sg6lIb:48ZE+AI/H`3rqd)1XRpg6kGZucq5HO9j7i8p[TtrbtIHmu-ml\\dg[rR%WoOzCsJQ;l>+US%S\\Y/pt{4(fVZF/P1J<,c9/xC!o?%5zLH`6(\\&)L.;!.c4pe/N&eZoIZk6^bQQ&]0kWT#H\'&(3g=4,yRg6lMu33DAY%@WvvqW>k/>-^\"!ysV7IO2EJ&rB.WV+ja.UL[fs9W2/5XF6tuoR+u?n:l>*SLa*Ea?Q\\^H+:\'N;vlA86B1e8#>TmQ.-5_hp\"H,>8.gK!W{2v-nrsnP\'eV\\P[]E!k(vLUHGjhQ;oJ^#\':3-*\'&(3g9#?TmNzH4g5f3`p;j1Kj\\k/;!.a*E].c4pd*8y+Zj2Nt,mm^pA/`$\'7!;JDUdxX/t/$]77M_zrMgHkiR>yt^Z,b5v&H#hp$PQ*s7OhHh[pGL-7j>1v1%`BdZrZJBNB?TmNyE(/R;h*-ACm&dRPv1\'jk]rK]rOnc)9$Es>rPu\'SR*knhBK7i9wxwoLhN,,8re%w[Cx]J:\"5\'^1nc,GdIzV{5*nzCrE:2*uD/WOf;0x>`PP$VoS3@)It9V.u8JO2FK-9sh2U@zrOqqg4d(1ZY6=n?+SHO8bp3A4w-le;0xAn4Ld==Y2&bHz^Ezca@UnS5HO7__Fzb[&>I:&GwQg=63=xoK`-Q:h),<0s(\\$4x0w8E9*cATf,<.mhEYuf&y`Ui:x\"-[m:oNs%N@4$QR/-5_it24LfE_6,r/(s@yl8e!fkhL&kw;X/w>b]0l[ccK,3\\^F#n8^X$>QawY6>pK^yoC(Ht?oA/b/Y[@j{TmP&`BbNA:>hxIAH+9z.d<8E6u{0nhCPJa4suupS0/l2KgM*&yaYy\",UOjQ4LeAPP&`A\\63:k8i6e\'+>:H>?`L<%@Vrcy`QV=l3Ox9KR=rU4;i0I`2m]fmu+fN4T0/8kA:BxbbJ+2XMVOiHi^zrR!E{hwC\'0\\emt)`4x3(koqjEU^^AaQNqy4*p(eTQ{Cp7X?k)\"iu:T$I+8tnO{I4d*6rf.HcC`?Uqczb[\'EijZdkqv(TW;\\Cw[Aj$`FvLS@%4stq_fgUS#J6j?5+s6FC]0l]n7^\\514Nqty+Zi,5czejfGid>Ak$_A_F{ddJ(zc^2rw&Eo-%k{NQ/2Moph=0r\"AcVe$o7X>fq,vB#zpFFks\'Vf$rD8)`7)dI{[528ahiZep/,->5-yOYTy2zCvU\'Wg(*6nUA\"#\':1\'jmf>;N[`S]_I0N\"Sc!j$dYqS,wD)9\'SS+o$Uf)/Q1t[I:%GwNYZVy-a.Y]LCH\'#sKX^PVD/WSx2#SbtLVQrpatJO4Orz63>zyucn(iiVS{=Uv!1nf;+`/]n=xs[OVIIq-zQbzhxLLyJ@?Z0s*cDdRMl`zn;s\\Rd*8\"86HK$fcC_;C#!u[F,EZuj6br@%2hF[#2m^m3IYfzY.mjO.0FRNmc,HfTOpmWKO.4WB$(;3-(zaXpV=fr5FEeSPx9H@I1S6Psx+]\"$+N-2P$Y\"1oiDRT13I[pIX`_A^AaOFQIYevG;3,\"_DsC1b*>zveuF8%I*/MxCzi$fc@Sc!k)xTx*Xcm%^:>fr27[MN\'ij]sS$NDK0H]#,R@,RA/a\'6x-gK!Y*Yj2Q*s7OhFaj*\'%#zoCE\'*>=Uux#6\'Z{(BY$::Sv\'L2R-%js+lmb(6soWF7x,b8(YpQ%Z\"-^xh(zdcGuE3iF]\'?LBH$q>vewN[b^7.#_@_Fy^I4_l+%p8[KCOFPDB^:C#yn?(D`@W!3y^Ex[?aRU;a]6-yMN&dUZJCOFPEI\"bT][4+t<`Z%@UoXICS][4-$geL-4[W%J,9y(IyTrh7pZSo\\^H+:\'O?-^xk1KfJxKIll^pB3str`l(q3>$2m]hwH8#=MQ1=#1jQ6V4:h+0MxC!n8dtF9,kb0[cdO!&;7D3jKp#L<)O=#2oh?;JDUcvN`xcfZpMkY]LCJ/ERNqw*\\vg%o6R%UcvRrlNyE\'-LxE+??_H,;*[rS(a@Vsf,<-eEcI%q\'C`A\\76GGlrz9C(:-nm^o=ubjr%SZLM$_Be]\'@OO%\\0qssj?3$Tao5MfDXui3ZPd-Kr*jgGic:2,$is-v>fnxi\'r=n>(Hs:[F)6smKkb-M%dXi1NxAl.1Ms&Ucs@#%0^tT)b@R^fh^ztYAuU*dHt:F6v#725Q\"J5d(/Q5MiO2C?OUA$)AOLqy529g)+:&J)(,BNCFq6NiN,(\"n5S*ny,[oFHvF8!9?pC934J\\pGO8f((1YU&OGRMgJs4@%5y64D:48X=ca@VrczdfTT*lmd3d+=7n>%8,ll]l0A7/%geIt>j+*3]b[&?MIcC]2x:LR=sZH;*]$0`%*AK;&Fq3?(AUlEM9pS26ZH:)YnDB`CgdGmzF)2]iyMR4IUS%RU9Y:Su\"88Ne7v#723HRISMd8\'SW<`Yz*P>#0d6w%B_AbSU6JSHK%l$]611C>OU?u^VtlFQHSMiN-0EQLeCVj>-d:2,$jv=`WnOzG,AH\'$zm6YH<4//<$95>u``G{aVj8pWC(7#BgfM.8mLmiKt24Lc7$I,;\'K/ASjDM;z(Flr%M?2w419i5^bVf\'$yfs6IQ>!\'=CtM_ym8dyZ9E6v$?Si>3&[(J#d^/e>>\\CrB+L&o.-4[Y2%^9:X45JZi(y_NGZrWrR\"F$tNc1_rHK#cU`e]\'@Q[W\'SS,wE-Jp%WlEM7cwStvxz%6\'[\"*M.8lFQIZm;tf%sIN-1Nv6@\"!zveuE3jHfO9g+6jBEs?vclv6=oEGq2;pNpssi<)RHSJZi*()3e0UE7#EsC.XX32>\'AUlGWds>pISITNjR9co,#d[\"+N3Ml_xdkr$K5asGBUg/Hc@R]aS[SmT=m=!(C\\,^zvdo-(xW,hWY=`R\\Y/q{=SlP+zVy-eAPQ*q00?/gIq)g\\sW:T\"Ad]*L(z_NEPCB]9=eo$Tf+7rh4^fkjTF@ONyD{l0A99Rsurcy\\Aj\"Vsg1T;dlx@iyKEYqV9T$I.ESU3:i0FU^X&Fr9[H6nU=j-4_jxD(4lO(n&aBbNA71-,7nS3?(EeTU25Py;Pf8y-c8)^*J\"^@aPKd@NJgRA0d4lQ1:nI^%3m[^I3\\_MBA_Cl#Wvuk?2v0\"Q]`NGV_];G7w&Dga6#EvPhBM>0ng=4-&o/0CFsgq-\"Z,b6\"Ae^/e;1#Te*7uth2T:_Xx\"1l\\dg\\veuC-O.3U;baFuF;2\'eXh))2]gp%Vi8oV>m7bo/1FO?+UT)bB\\1r{;H>;KM$`FwRmVD4ob#tT%OGUYC%(9\'TZLJnqsq_jwByfq.&o19i2R2:l=\'Eij]qJWY>b^4$OJc3&\\,]u^Vsh4aq=sX=a\\.b4n]ca?Q^fkjWT$I,<,b7\'XlA71.2Q*s6HM.7g2VB\'5v&FtD/XX45JZi+/H`3qnVF:0yF-HdFmx?ddL-7kEN<\"/c4n\\_NFTW;\\F(.P0;tdxTy0ptvz(Ht%:8KP7[OXQjJpy;Pb#zm;qW?m5U6F@OO%\\/k\\j(wPg0mc/R:cm#WrcvPe7uumKfJzTqasHIp*lomXPiF[z%5y4-&o1:nHV^X\"6.zP]efTR{Cp8[I>9@v^Q]d_7,q&\\\'DeXh*.Hb>I7rf-ADq9]Q\\_MBA^@`G&zfp*p)kl^qGIvC);3,{Z1{J9z,\\rPu+fK&n..:wvoKfGlrx0u/zMKot{5.$dZtafb>F+=3+t=ep)ifHo%Ywtey\\Aiu:W.v:RsskEPEI$l(o,ySlMxAoxnB:;V+gTLb/XU\'VctD2hCNA=NS8X<_ONx@k)wPb\'/TC1f:,fK$ggTOnd-ImokO(n&bGwQg:\'M8lCDlyF-F](Go(fYh*,<,d?I5g4e*9!5)jgIp(bGr9[F,EWj:umHXf#gkfD[%;?izSjDN@7/\'p18bn,&sB,N,+4`p=pNl]k-3XJInw43C8.v>gs6HJzUrg0Q19k:uk>0md2azj*\'\"qD<=]G(/O)s=j*(*:&K1JfL&o1$2pkJiZh#eafq/(uG=:KO0:sbq:acQKa2hCQS.&m\'ijZfr6HL+*2[]Cp;h)\'&(5pbx]F*7skCFwPd.M$`DkxBvY;Tw\'N:pS12GRIX_[0ppe0Q3C:9M^qIQ>\"+O6ZKIhYfuD.R=qPt(Wi0Kk`&/Z]J:$>PZV%I,7oYLR;i/DJ*.HdEf[uae\\{#*JyP\\b].a+Io\"J9uq\\Y+_,THL+*1VF;42Y-iVRx3*s5FBXxxyvj5]`J3\\[8?rMe;42;r[OYW+dEg^\'=@gmt&ODDks)a97D5w*ZoGO;saiq&UcuLVNd4mU?wh(#n4LhN,+2XMXW.w>caAZ,b5w,eC[&CaH\"glmb):+b90&e[tagdBZ(L.:y$6\'\\(DdTU4>xqOqtuulCEp02Kd>E#tPlXRpg6nU>qMf@J5e,ACk!R_k$`Dm&cN<#3t{60/;ws^]=Pb\"rMa,Jt5A*Ho$S]^Bl(n(h`0a%(:/t/\"X\"4$PP%]2u+fK&p3EEf]\"(@LAA`H%w\\E$w_VoT7Pnc\'1\\ca?Si<*V\\Q^jzQ^j\"Y\'M7ctIJt7KXZ>aXsdwRpb!l1DGuF8&L8kA1u-ov,eEdQHTQz=W&N=\'C`BdWg+2ZW*b:59^X\"5)eQDAXy\'Fm\"NLpx4-$hjb1b)9\'PEJ&vRpg5h;)TU37YD&+F_6,p&Yws^[2!J:%@Y\'L/CEo/2I^$-THJzVy.d=?aUd!fid;419i2U*P>$3rpbx]G.G])Gn\"ONw=^I1TP\\_L?88PkT@%/^uW35MiR>vg&uOe9%H\"fi_%/\\k,->2\"L@=P_m2FN8e#o7X@n;mA6,r/\'n*r4B3sw$9C&1c);.px3(ha1e9&M:r_bQPzF(.M#\\5+q-yOZW*`3pkKpzY+_,QoA0e=9G<69Y<[0omWM[dkmd4kKq#H,=2\"LA@];IBL:x\"/b.TFAS`l(o*s8Qsw#838^Z,b6!>UsnP&bJ*+9#:>hyO[\\CuOe9%FwQiEUaip\"DtJM(wO_rHM/=(HvH@G&$\"wabJ+1U@{u``EtB*FcHxP`w\\H3bx`Wsbq:bf_-UPog:\'M8kA:AtS#I.FXk8j=,`*D]1ppb!m5S*nw6=oC<@l-1Lnm[^J:{0kYY9LVNb,Jq(a>KCL9se&zhwH;0x>c_6*jfBS_hov,hUQt\"deSOpn[[CsHGkk\\l3Mmg>;MS?!\"&7\'Xk<\"1kXV)]*M/;y&.e@I1UA$)APP&'); +--enable_query_log +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +--error 0,1114 +INSERT INTO t1 SELECT * FROM t1; +DROP TABLE t1; -- cgit v1.2.1 From 279529c11c124918c2c5b82b66c00c01c5339ade Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Jun 2007 11:34:23 +0200 Subject: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB fix binlog-writing so that end_log_pos is given correctly even within transactions for both SHOW BINLOG and SHOW MASTER STATUS, that is as absolute values (from log start) rather than relative values (from transaction's start). --- Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint into sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 mysql-test/r/binlog.result: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. --- manual merge mysql-test/t/binlog.test: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. sql/log.cc: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB fix output for SHOW BINLOG EVENTS so that end_log_pos is given correctly even within transactions. do this by rewriting the commit-buffer in place. --- mysql-test/r/binlog.result | 122 +++++++++++++++++++++++++++++++++++++++++++-- mysql-test/t/binlog.test | 93 +++++++++++++++++++++++++++++++++- 2 files changed, 210 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/binlog.result b/mysql-test/r/binlog.result index 6807da16e66..41c75a2067b 100644 --- a/mysql-test/r/binlog.result +++ b/mysql-test/r/binlog.result @@ -1,6 +1,6 @@ drop table if exists t1, t2; reset master; -create table t1 (a int) engine=bdb; +create table t1 (a int) engine=innodb; create table t2 (a int) engine=innodb; begin; insert t1 values (5); @@ -10,11 +10,11 @@ insert t2 values (5); commit; show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=bdb +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=innodb master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # use `test`; insert t1 values (5) -master-bin.000001 # Query 1 # use `test`; COMMIT +master-bin.000001 # Xid 1 # COMMIT /* XID */ master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # use `test`; insert t2 values (5) master-bin.000001 # Xid 1 # COMMIT /* XID */ @@ -133,3 +133,119 @@ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 show binlog events in 'master-bin.000002' from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Query 1 # use `test`; drop table t1 +set @ac = @@autocommit; +set autocommit= 0; +reset master; +create table t1(n int) engine=innodb; +begin; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 +master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=innodb +master-bin.000001 197 Query 1 265 use `test`; BEGIN +master-bin.000001 265 Query 1 353 use `test`; insert into t1 values (1) +master-bin.000001 353 Query 1 441 use `test`; insert into t1 values (2) +master-bin.000001 441 Query 1 529 use `test`; insert into t1 values (3) +master-bin.000001 529 Xid 1 556 COMMIT /* XID */ +master-bin.000001 556 Query 1 632 use `test`; drop table t1 +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 +master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=innodb +master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (1) +master-bin.000001 285 Xid 1 312 COMMIT /* XID */ +master-bin.000001 312 Query 1 400 use `test`; insert into t1 values (2) +master-bin.000001 400 Xid 1 427 COMMIT /* XID */ +master-bin.000001 427 Query 1 515 use `test`; insert into t1 values (3) +master-bin.000001 515 Xid 1 542 COMMIT /* XID */ +master-bin.000001 542 Query 1 618 use `test`; drop table t1 +reset master; +create table t1(n int) engine=myisam; +begin; +insert into t1 values (4); +insert into t1 values (5); +insert into t1 values (6); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 +master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=myisam +master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (4) +master-bin.000001 285 Query 1 373 use `test`; insert into t1 values (5) +master-bin.000001 373 Query 1 461 use `test`; insert into t1 values (6) +master-bin.000001 461 Query 1 537 use `test`; drop table t1 +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 197 +insert into t1 values (1); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 312 +insert into t1 values (2); +insert into t1 values (3); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 542 +commit; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 542 +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 +master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=innodb +master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (1) +master-bin.000001 285 Xid 1 312 COMMIT /* XID */ +master-bin.000001 312 Query 1 400 use `test`; insert into t1 values (2) +master-bin.000001 400 Xid 1 427 COMMIT /* XID */ +master-bin.000001 427 Query 1 515 use `test`; insert into t1 values (3) +master-bin.000001 515 Xid 1 542 COMMIT /* XID */ +master-bin.000001 542 Query 1 618 use `test`; drop table t1 +set autocommit= 0; +reset master; +create table t1(n int) engine=myisam; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 197 +insert into t1 values (4); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 285 +insert into t1 values (5); +insert into t1 values (6); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 461 +commit; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 461 +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 +master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=myisam +master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (4) +master-bin.000001 285 Query 1 373 use `test`; insert into t1 values (5) +master-bin.000001 373 Query 1 461 use `test`; insert into t1 values (6) +master-bin.000001 461 Query 1 537 use `test`; drop table t1 +set session autocommit = @ac; +End of 5.0 tests diff --git a/mysql-test/t/binlog.test b/mysql-test/t/binlog.test index accfa6a577f..6271a8f95a8 100644 --- a/mysql-test/t/binlog.test +++ b/mysql-test/t/binlog.test @@ -3,7 +3,6 @@ # -- source include/have_log_bin.inc -- source include/not_embedded.inc --- source include/have_bdb.inc -- source include/have_innodb.inc -- source include/have_log_bin.inc @@ -12,7 +11,7 @@ drop table if exists t1, t2; --enable_warnings reset master; -create table t1 (a int) engine=bdb; +create table t1 (a int) engine=innodb; create table t2 (a int) engine=innodb; begin; insert t1 values (5); @@ -49,3 +48,93 @@ show binlog events in 'master-bin.000001' from 98; --replace_column 2 # 5 # show binlog events in 'master-bin.000002' from 98; +# +# Bug#22540 - Incorrect value in column End_log_pos of +# SHOW BINLOG EVENTS using InnoDB +# + +# the following tests will show that certain queries now return +# absolute offsets (from binlog start, rather than relative to +# the beginning of the current transaction). under what +# conditions it should be allowed / is sensible to put the +# slider into the middle of a transaction is not our concern +# here; we just guarantee that if and when it's done, the +# user has valid offsets to use. if the setter function still +# wants to throw a "positioning into middle of transaction" +# warning, that's its prerogative and handled elsewhere. + +set @ac = @@autocommit; + +# first show this to work for SHOW BINLOG EVENTS + +set autocommit= 0; +reset master; +create table t1(n int) engine=innodb; +begin; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ +show binlog events from 0; + +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ +show binlog events from 0; + +reset master; +create table t1(n int) engine=myisam; +begin; +insert into t1 values (4); +insert into t1 values (5); +insert into t1 values (6); +commit; +drop table t1; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ +show binlog events from 0; + +# now show this also works for SHOW MASTER STATUS +# as this is what "mysqldump --master-data=1" uses. + +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +show master status; +insert into t1 values (1); +show master status; +insert into t1 values (2); +insert into t1 values (3); +show master status; +commit; +show master status; +drop table t1; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ +show binlog events from 0; + +set autocommit= 0; +reset master; +create table t1(n int) engine=myisam; +show master status; +insert into t1 values (4); +show master status; +insert into t1 values (5); +insert into t1 values (6); + +show master status; +commit; +show master status; +drop table t1; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ +show binlog events from 0; + +set session autocommit = @ac; + +--echo End of 5.0 tests -- cgit v1.2.1 From afa96081ab05efae0a82fee86aee59a595073946 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Jun 2007 11:37:10 +0200 Subject: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB fix binlog-writing so that end_log_pos is given correctly even within transactions for both SHOW BINLOG and SHOW MASTER STATUS, that is as absolute values (from log start) rather than relative values (from transaction's start). --- Merge sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 --- Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 mysql-test/extra/binlog_tests/binlog.test: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. manual merge mysql-test/r/binlog_stm_binlog.result: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. manual merge sql/log.cc: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB fix output for SHOW BINLOG EVENTS so that end_log_pos is given correctly even within transactions. do this by rewriting the commit-buffer in place. manual merge --- mysql-test/extra/binlog_tests/binlog.test | 92 +++++++++++++++++++++++ mysql-test/r/binlog_stm_binlog.result | 118 +++++++++++++++++++++++++++++- 2 files changed, 209 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test index e838acbed35..02d5a92ea38 100644 --- a/mysql-test/extra/binlog_tests/binlog.test +++ b/mysql-test/extra/binlog_tests/binlog.test @@ -49,6 +49,98 @@ show binlog events in 'master-bin.000001' from 106; --replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\// show binlog events in 'master-bin.000002' from 106; + +# +# Bug#22540 - Incorrect value in column End_log_pos of +# SHOW BINLOG EVENTS using InnoDB +# + +# the following tests will show that certain queries now return +# absolute offsets (from binlog start, rather than relative to +# the beginning of the current transaction). under what +# conditions it should be allowed / is sensible to put the +# slider into the middle of a transaction is not our concern +# here; we just guarantee that if and when it's done, the +# user has valid offsets to use. if the setter function still +# wants to throw a "positioning into middle of transaction" +# warning, that's its prerogative and handled elsewhere. + +set @ac = @@autocommit; + +# first show this to work for SHOW BINLOG EVENTS + +set autocommit= 0; +reset master; +create table t1(n int) engine=innodb; +begin; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ +show binlog events from 0; + +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ +show binlog events from 0; + +reset master; +create table t1(n int) engine=myisam; +begin; +insert into t1 values (4); +insert into t1 values (5); +insert into t1 values (6); +commit; +drop table t1; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ +show binlog events from 0; + +# now show this also works for SHOW MASTER STATUS +# as this is what "mysqldump --master-data=1" uses. + +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +show master status; +insert into t1 values (1); +show master status; +insert into t1 values (2); +insert into t1 values (3); +show master status; +commit; +show master status; +drop table t1; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ +show binlog events from 0; + +set autocommit= 0; +reset master; +create table t1(n int) engine=myisam; +show master status; +insert into t1 values (4); +show master status; +insert into t1 values (5); +insert into t1 values (6); + +show master status; +commit; +show master status; +drop table t1; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ +show binlog events from 0; + +set session autocommit = @ac; + +--echo End of 5.0 tests + # Test of a too big SET INSERT_ID: see if the truncated value goes # into binlog (right), or the too big value (wrong); we look at the # binlog further down with SHOW BINLOG EVENTS. diff --git a/mysql-test/r/binlog_stm_binlog.result b/mysql-test/r/binlog_stm_binlog.result index 66fe3e40270..1bc7430fde0 100644 --- a/mysql-test/r/binlog_stm_binlog.result +++ b/mysql-test/r/binlog_stm_binlog.result @@ -7,7 +7,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server ver: #, Binlog ver: # master-bin.000001 106 Query 1 213 use `test`; create table t1 (a int, b int) engine=innodb master-bin.000001 213 Query 1 281 use `test`; BEGIN -master-bin.000001 281 Query 1 90 use `test`; insert into t1 values (1,2) +master-bin.000001 281 Query 1 371 use `test`; insert into t1 values (1,2) master-bin.000001 371 Xid 1 398 COMMIT /* XID */ drop table t1; drop table if exists t1, t2; @@ -145,6 +145,122 @@ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 show binlog events in 'master-bin.000002' from 106; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Query 1 # use `test`; drop table t1 +set @ac = @@autocommit; +set autocommit= 0; +reset master; +create table t1(n int) engine=innodb; +begin; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb +master-bin.000001 205 Query 1 273 use `test`; BEGIN +master-bin.000001 273 Query 1 361 use `test`; insert into t1 values (1) +master-bin.000001 361 Query 1 449 use `test`; insert into t1 values (2) +master-bin.000001 449 Query 1 537 use `test`; insert into t1 values (3) +master-bin.000001 537 Xid 1 564 COMMIT /* XID */ +master-bin.000001 564 Query 1 640 use `test`; drop table t1 +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb +master-bin.000001 205 Query 1 293 use `test`; insert into t1 values (1) +master-bin.000001 293 Xid 1 320 COMMIT /* XID */ +master-bin.000001 320 Query 1 408 use `test`; insert into t1 values (2) +master-bin.000001 408 Xid 1 435 COMMIT /* XID */ +master-bin.000001 435 Query 1 523 use `test`; insert into t1 values (3) +master-bin.000001 523 Xid 1 550 COMMIT /* XID */ +master-bin.000001 550 Query 1 626 use `test`; drop table t1 +reset master; +create table t1(n int) engine=myisam; +begin; +insert into t1 values (4); +insert into t1 values (5); +insert into t1 values (6); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=myisam +master-bin.000001 205 Query 1 293 use `test`; insert into t1 values (4) +master-bin.000001 293 Query 1 381 use `test`; insert into t1 values (5) +master-bin.000001 381 Query 1 469 use `test`; insert into t1 values (6) +master-bin.000001 469 Query 1 545 use `test`; drop table t1 +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 205 +insert into t1 values (1); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 320 +insert into t1 values (2); +insert into t1 values (3); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 550 +commit; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 550 +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb +master-bin.000001 205 Query 1 293 use `test`; insert into t1 values (1) +master-bin.000001 293 Xid 1 320 COMMIT /* XID */ +master-bin.000001 320 Query 1 408 use `test`; insert into t1 values (2) +master-bin.000001 408 Xid 1 435 COMMIT /* XID */ +master-bin.000001 435 Query 1 523 use `test`; insert into t1 values (3) +master-bin.000001 523 Xid 1 550 COMMIT /* XID */ +master-bin.000001 550 Query 1 626 use `test`; drop table t1 +set autocommit= 0; +reset master; +create table t1(n int) engine=myisam; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 205 +insert into t1 values (4); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 293 +insert into t1 values (5); +insert into t1 values (6); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 469 +commit; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 469 +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=myisam +master-bin.000001 205 Query 1 293 use `test`; insert into t1 values (4) +master-bin.000001 293 Query 1 381 use `test`; insert into t1 values (5) +master-bin.000001 381 Query 1 469 use `test`; insert into t1 values (6) +master-bin.000001 469 Query 1 545 use `test`; drop table t1 +set session autocommit = @ac; +End of 5.0 tests reset master; create table t1 (id tinyint auto_increment primary key); set insert_id=128; -- cgit v1.2.1 From 6437c0356a1d9730213183a7b8ed1dd24c3bf318 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Jun 2007 12:26:21 +0200 Subject: Bug#25657 mysql-test-run.pl kill itself under ActiveState perl - Various fixes for running mysql-test-run.pl on ActiveState perl for windows. Reading it's source in win32/win32.c helps... mysql-test/lib/mtr_process.pl: Use "real_pid" when killing the process on ActiveState perl for windows Wait blocking for the pseudo pid to exit. Change "sleep_until_file_created" to return 1 when pidfile has been created - this should avoid early wakeup if $pid was 0 mysql-test/lib/mtr_timer.pl: Wake timer process with signal 15 to avoid to avoid resource leak on ActiveState perl for windows. Install signal handler in timer process to exit gracefully mysql-test/mysql-test-run.pl: Read "real_pid" of process from pid_file - to be used when killing the process on ActiveState perl Drop the --console option to mysqld Pass "real_pid" to mtr_check_stop_server so it can select to use it Correct two argument declarations --- mysql-test/lib/mtr_process.pl | 17 ++++++++++++++++- mysql-test/lib/mtr_timer.pl | 9 +++++++-- mysql-test/mysql-test-run.pl | 27 ++++++++++++++++++--------- 3 files changed, 41 insertions(+), 12 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index e4fd3390c5f..57f9cf571bb 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -611,6 +611,11 @@ sub mtr_check_stop_servers ($) { if ( $pid ) { # Server is still alive, put it in list to be hard killed + if ($::glob_win32_perl) + { + # Kill the real process if it's known + $pid= $srv->{'real_pid'} if ($srv->{'real_pid'}); + } $kill_pids{$pid}= 1; # Write a message to the process's error log (if it has one) @@ -664,6 +669,16 @@ sub mtr_check_stop_servers ($) { } } + if ($::glob_win32_perl and $srv->{'real_pid'}) + { + # Wait for the pseudo pid - if the real_pid was known + # the pseudo pid has not been waited for yet, wai blocking + # since it's "such a simple program" + mtr_verbose("Wait for pseudo process $srv->{'pid'}"); + my $ret_pid= waitpid($srv->{'pid'}, 0); + mtr_verbose("Pseudo process $ret_pid died"); + } + $srv->{'pid'}= 0; } } @@ -1041,7 +1056,7 @@ sub sleep_until_file_created ($$$) { { if ( -r $pidfile ) { - return $pid; + return 1; } # Check if it died after the fork() was successful diff --git a/mysql-test/lib/mtr_timer.pl b/mysql-test/lib/mtr_timer.pl index 523799f7cf5..86a9f58514f 100644 --- a/mysql-test/lib/mtr_timer.pl +++ b/mysql-test/lib/mtr_timer.pl @@ -97,9 +97,14 @@ sub mtr_timer_start($$$) { # clearing the signal handler. $SIG{INT}= 'DEFAULT'; + $SIG{TERM}= sub { + mtr_verbose("timer woke up, exiting!"); + exit(0); + }; + $0= "mtr_timer(timers,$name,$duration)"; - mtr_verbose("timer child $name, sleep $duration"); sleep($duration); + mtr_verbose("timer expired after $duration seconds"); exit(0); } } @@ -118,7 +123,7 @@ sub mtr_timer_stop ($$) { # FIXME as Cygwin reuses pids fast, maybe check that is # the expected process somehow?! - kill(9, $tpid); + kill(15, $tpid); # As the timers are so simple programs, we trust them to terminate, # and use blocking wait for it. We wait just to avoid a zombie. diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 08090e5b96f..c58ed308bd8 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2579,10 +2579,19 @@ sub ndbcluster_wait_started($$){ sub mysqld_wait_started($){ my $mysqld= shift; - my $res= sleep_until_file_created($mysqld->{'path_pid'}, - $mysqld->{'start_timeout'}, - $mysqld->{'pid'}); - return $res == 0; + if (sleep_until_file_created($mysqld->{'path_pid'}, + $mysqld->{'start_timeout'}, + $mysqld->{'pid'}) == 0) + { + # Failed to wait for pid file + return 1; + } + + # Get the "real pid" of the process, it will be used for killing + # the process in ActiveState's perl on windows + $mysqld->{'real_pid'}= mtr_get_pid_from_file($mysqld->{'path_pid'}); + + return 0; } @@ -3720,7 +3729,6 @@ sub mysqld_arguments ($$$$) { mtr_add_arg($args, "%s--no-defaults", $prefix); - mtr_add_arg($args, "%s--console", $prefix); mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir); mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir); @@ -4093,6 +4101,7 @@ sub stop_all_servers () { push(@kill_pids,{ pid => $mysqld->{'pid'}, + real_pid => $mysqld->{'real_pid'}, pidfile => $mysqld->{'path_pid'}, sockfile => $mysqld->{'path_sock'}, port => $mysqld->{'port'}, @@ -4300,6 +4309,7 @@ sub run_testcase_stop_servers($$$) { push(@kill_pids,{ pid => $mysqld->{'pid'}, + real_pid => $mysqld->{'real_pid'}, pidfile => $mysqld->{'path_pid'}, sockfile => $mysqld->{'path_sock'}, port => $mysqld->{'port'}, @@ -4351,6 +4361,7 @@ sub run_testcase_stop_servers($$$) { push(@kill_pids,{ pid => $mysqld->{'pid'}, + real_pid => $mysqld->{'real_pid'}, pidfile => $mysqld->{'path_pid'}, sockfile => $mysqld->{'path_sock'}, port => $mysqld->{'port'}, @@ -4775,12 +4786,10 @@ sub run_mysqltest ($) { mtr_add_arg($args, "%s", $_) for @args_saved; } - mtr_add_arg($args, "--test-file"); - mtr_add_arg($args, $tinfo->{'path'}); + mtr_add_arg($args, "--test-file=%s", $tinfo->{'path'}); if ( defined $tinfo->{'result_file'} ) { - mtr_add_arg($args, "--result-file"); - mtr_add_arg($args, $tinfo->{'result_file'}); + mtr_add_arg($args, "--result-file=%s", $tinfo->{'result_file'}); } if ( $opt_record ) -- cgit v1.2.1 From ae398d995a925e8bc2fe096f4c6fe55618a58543 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Jun 2007 13:15:43 +0200 Subject: Bug #29245: Bad Merge Caused Error Codes Conflict between 5.0/5.1 Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/backup.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/events_bugs.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/events_trans.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_dd_basic.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_dd_ddl.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_gis.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/ndb_row_format.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_extraCol_innodb.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_extraCol_myisam.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_incident.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_ndb_extraCol.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_row_tabledefs_2myisam.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_row_tabledefs_3innodb.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/rpl_sp.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/select.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/show_check.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/sp.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/sp_gis.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/sp_trans.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/type_timestamp.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/warnings.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/r/xml.result: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/t/grant.test: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 mysql-test/t/partition_grant.test: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 sql/mysql_priv.h: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 sql/share/errmsg.txt: Fix some error messages so that all error codes are equivalent in 5.0 and 5.1 --- mysql-test/r/backup.result | 2 +- mysql-test/r/events_bugs.result | 16 +++++++-------- mysql-test/r/events_trans.result | 2 +- mysql-test/r/ndb_dd_basic.result | 6 +++--- mysql-test/r/ndb_dd_ddl.result | 2 +- mysql-test/r/ndb_gis.result | 4 ++-- mysql-test/r/ndb_row_format.result | 2 +- mysql-test/r/rpl_extraCol_innodb.result | 28 +++++++++++++-------------- mysql-test/r/rpl_extraCol_myisam.result | 28 +++++++++++++-------------- mysql-test/r/rpl_incident.result | 4 ++-- mysql-test/r/rpl_ndb_extraCol.result | 28 +++++++++++++-------------- mysql-test/r/rpl_row_tabledefs_2myisam.result | 16 +++++++-------- mysql-test/r/rpl_row_tabledefs_3innodb.result | 16 +++++++-------- mysql-test/r/rpl_sp.result | 2 +- mysql-test/r/select.result | 2 +- mysql-test/r/show_check.result | 2 +- mysql-test/r/sp.result | 8 ++++---- mysql-test/r/sp_gis.result | 4 ++-- mysql-test/r/sp_trans.result | 2 +- mysql-test/r/type_timestamp.result | 14 +++++++------- mysql-test/r/warnings.result | 2 +- mysql-test/r/xml.result | 18 ++++++++--------- mysql-test/t/grant.test | 2 +- mysql-test/t/partition_grant.test | 4 ++-- 24 files changed, 107 insertions(+), 107 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/backup.result b/mysql-test/r/backup.result index 154b577e61f..4de599f3af7 100644 --- a/mysql-test/r/backup.result +++ b/mysql-test/r/backup.result @@ -36,7 +36,7 @@ restore table t1 from '../bogus'; Table Op Msg_type Msg_text t1 restore error Failed copying .frm file Warnings: -Warning 1543 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1287 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X) restore table t1 from '../tmp'; Table Op Msg_type Msg_text diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index fae530f556b..541502607c1 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -31,7 +31,7 @@ create event e_55 on schedule at 10000101000000 do drop table t; ERROR HY000: Incorrect AT value: '10000101000000' create event e_55 on schedule at 20000101000000 do drop table t; Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +Note 1585 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created show events; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator create event e_55 on schedule at 20200101000000 starts 10000101000000 do drop table t; @@ -457,22 +457,22 @@ CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO SELECT 1; Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +Note 1585 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' DISABLE DO SELECT 1; Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +Note 1585 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO SELECT 1; Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +Note 1585 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE DO SELECT 1; Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +Note 1585 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 @@ -482,19 +482,19 @@ The following should succeed giving a warning. ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE; Warnings: -Note 1533 Event execution time is in the past. Event has been disabled +Note 1541 Event execution time is in the past. Event has been disabled CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DO SELECT 1; Warnings: -Note 1533 Event execution time is in the past. Event has been disabled +Note 1541 Event execution time is in the past. Event has been disabled CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00' ON COMPLETION PRESERVE DO SELECT 1; Warnings: -Note 1533 Event execution time is in the past. Event has been disabled +Note 1541 Event execution time is in the past. Event has been disabled The following should succeed without warnings. ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'; ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' diff --git a/mysql-test/r/events_trans.result b/mysql-test/r/events_trans.result index a9829db0c61..1f87bcea68e 100644 --- a/mysql-test/r/events_trans.result +++ b/mysql-test/r/events_trans.result @@ -63,7 +63,7 @@ begin work; insert into t1 (a) values ("OK: create event if not exists"); create event if not exists e1 on schedule every 2 day do select 2; Warnings: -Note 1526 Event 'e1' already exists +Note 1534 Event 'e1' already exists rollback work; select * from t1; a diff --git a/mysql-test/r/ndb_dd_basic.result b/mysql-test/r/ndb_dd_basic.result index 7aeb156869b..bc1762ce407 100644 --- a/mysql-test/r/ndb_dd_basic.result +++ b/mysql-test/r/ndb_dd_basic.result @@ -5,20 +5,20 @@ INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=MYISAM; Warnings: -Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Error 1475 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' ALTER LOGFILE GROUP lg1 ADD UNDOFILE 'undofile02.dat' INITIAL_SIZE = 4M ENGINE=XYZ; Warnings: Warning 1286 Unknown table engine 'XYZ' -Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Error 1475 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' CREATE TABLESPACE ts1 ADD DATAFILE 'datafile.dat' USE LOGFILE GROUP lg1 INITIAL_SIZE 12M; Warnings: -Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Error 1475 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' set storage_engine=ndb; CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' diff --git a/mysql-test/r/ndb_dd_ddl.result b/mysql-test/r/ndb_dd_ddl.result index 67857d39ab6..55f1f56fd0c 100644 --- a/mysql-test/r/ndb_dd_ddl.result +++ b/mysql-test/r/ndb_dd_ddl.result @@ -16,7 +16,7 @@ ERROR HY000: Failed to create LOGFILE GROUP SHOW WARNINGS; Level Code Message Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB -Error 1516 Failed to create LOGFILE GROUP +Error 1525 Failed to create LOGFILE GROUP CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' INITIAL_SIZE 1M diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index 3af7b71d72d..54f1fc23489 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -463,7 +463,7 @@ drop table t1; End of 4.1 tests CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); Warnings: -Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); @@ -1013,7 +1013,7 @@ drop table t1; End of 4.1 tests CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); Warnings: -Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); diff --git a/mysql-test/r/ndb_row_format.result b/mysql-test/r/ndb_row_format.result index ae165d87c5c..37c239986f6 100644 --- a/mysql-test/r/ndb_row_format.result +++ b/mysql-test/r/ndb_row_format.result @@ -8,7 +8,7 @@ ENGINE=NDB; ERROR HY000: Can't create table 'test.t1' (errno: 138) SHOW WARNINGS; Level Code Message -Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute' +Error 1475 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute' Error 1005 Can't create table 'test.t1' (errno: 138) CREATE TABLE t1 ( a INT KEY, diff --git a/mysql-test/r/rpl_extraCol_innodb.result b/mysql-test/r/rpl_extraCol_innodb.result index cfce12b594e..c3159987b30 100644 --- a/mysql-test/r/rpl_extraCol_innodb.result +++ b/mysql-test/r/rpl_extraCol_innodb.result @@ -72,7 +72,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -90,7 +90,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -134,7 +134,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -152,7 +152,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -196,7 +196,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 Skip_Counter 0 Exec_Master_Log_Pos # @@ -214,7 +214,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -257,7 +257,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -275,7 +275,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** @@ -369,7 +369,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 Skip_Counter 0 Exec_Master_Log_Pos # @@ -387,7 +387,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -430,7 +430,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 Skip_Counter 0 Exec_Master_Log_Pos # @@ -448,7 +448,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -755,7 +755,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 Skip_Counter 0 Exec_Master_Log_Pos # @@ -773,7 +773,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; diff --git a/mysql-test/r/rpl_extraCol_myisam.result b/mysql-test/r/rpl_extraCol_myisam.result index b250911368c..9d6c3ed5d33 100644 --- a/mysql-test/r/rpl_extraCol_myisam.result +++ b/mysql-test/r/rpl_extraCol_myisam.result @@ -72,7 +72,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -90,7 +90,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -134,7 +134,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -152,7 +152,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -196,7 +196,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 Skip_Counter 0 Exec_Master_Log_Pos # @@ -214,7 +214,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -257,7 +257,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -275,7 +275,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** @@ -369,7 +369,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 Skip_Counter 0 Exec_Master_Log_Pos # @@ -387,7 +387,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -430,7 +430,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 Skip_Counter 0 Exec_Master_Log_Pos # @@ -448,7 +448,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -755,7 +755,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 Skip_Counter 0 Exec_Master_Log_Pos # @@ -773,7 +773,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; diff --git a/mysql-test/r/rpl_incident.result b/mysql-test/r/rpl_incident.result index 9d82798b5f4..84fd9c0ee4f 100644 --- a/mysql-test/r/rpl_incident.result +++ b/mysql-test/r/rpl_incident.result @@ -44,7 +44,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1586 +Last_Errno 1587 Last_Error The incident LOST_EVENTS occured on the master. Message: Skip_Counter 0 Exec_Master_Log_Pos # @@ -62,7 +62,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1586 +Last_SQL_Errno 1587 Last_SQL_Error The incident LOST_EVENTS occured on the master. Message: SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; diff --git a/mysql-test/r/rpl_ndb_extraCol.result b/mysql-test/r/rpl_ndb_extraCol.result index 5afc9c1db77..edb4dfbf392 100644 --- a/mysql-test/r/rpl_ndb_extraCol.result +++ b/mysql-test/r/rpl_ndb_extraCol.result @@ -72,7 +72,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -90,7 +90,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -134,7 +134,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -152,7 +152,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -196,7 +196,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 Skip_Counter 0 Exec_Master_Log_Pos # @@ -214,7 +214,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -257,7 +257,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 Skip_Counter 0 Exec_Master_Log_Pos # @@ -275,7 +275,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** @@ -369,7 +369,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 Skip_Counter 0 Exec_Master_Log_Pos # @@ -387,7 +387,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -430,7 +430,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 Skip_Counter 0 Exec_Master_Log_Pos # @@ -448,7 +448,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -756,7 +756,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 Skip_Counter 0 Exec_Master_Log_Pos # @@ -774,7 +774,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; diff --git a/mysql-test/r/rpl_row_tabledefs_2myisam.result b/mysql-test/r/rpl_row_tabledefs_2myisam.result index d8ff1907e28..eb0c1cdc81d 100644 --- a/mysql-test/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/r/rpl_row_tabledefs_2myisam.result @@ -165,7 +165,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns Skip_Counter 0 Exec_Master_Log_Pos # @@ -183,7 +183,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -208,7 +208,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # @@ -226,7 +226,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -251,7 +251,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # @@ -269,7 +269,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -294,7 +294,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # @@ -312,7 +312,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; diff --git a/mysql-test/r/rpl_row_tabledefs_3innodb.result b/mysql-test/r/rpl_row_tabledefs_3innodb.result index 17c591327c2..287ab072e3d 100644 --- a/mysql-test/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/r/rpl_row_tabledefs_3innodb.result @@ -165,7 +165,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns Skip_Counter 0 Exec_Master_Log_Pos # @@ -183,7 +183,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -208,7 +208,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # @@ -226,7 +226,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -251,7 +251,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # @@ -269,7 +269,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -294,7 +294,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1523 +Last_Errno 1532 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4 Skip_Counter 0 Exec_Master_Log_Pos # @@ -312,7 +312,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error -Last_SQL_Errno 1523 +Last_SQL_Errno 1532 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result index 208c46c5fab..323926e2a9e 100644 --- a/mysql-test/r/rpl_sp.result +++ b/mysql-test/r/rpl_sp.result @@ -181,7 +181,7 @@ end| ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) set global log_bin_trust_routine_creators=1; Warnings: -Warning 1543 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead +Warning 1287 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead set global log_bin_trust_function_creators=0; set global log_bin_trust_function_creators=1; set global log_bin_trust_function_creators=1; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 92ceca2162f..a148d1029df 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -3492,7 +3492,7 @@ SELECT 0.9888889889 * 1.011111411911; 0.9998769417899202067879 prepare stmt from 'select 1 as " a "'; Warnings: -Warning 1548 Leading spaces are removed from name ' a ' +Warning 1466 Leading spaces are removed from name ' a ' execute stmt; a 1 diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 66cd929ee05..c07aadff042 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -712,7 +712,7 @@ drop database mysqltest; show full plugin; show warnings; Level Code Message -Warning 1543 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW PLUGINS' instead +Warning 1287 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW PLUGINS' instead show plugin; show plugins; create database `mysqlttest\1`; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 98d73f7536c..558daec5c30 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -5665,7 +5665,7 @@ drop function if exists pi; create function pi() returns varchar(50) return "pie, my favorite desert."; Warnings: -Note 1581 This function 'pi' has the same name as a native function +Note 1582 This function 'pi' has the same name as a native function SET @save_sql_mode=@@sql_mode; SET SQL_MODE='IGNORE_SPACE'; select pi(), pi (); @@ -5714,15 +5714,15 @@ use test; create function `database`() returns varchar(50) return "Stored function database"; Warnings: -Note 1581 This function 'database' has the same name as a native function +Note 1582 This function 'database' has the same name as a native function create function `current_user`() returns varchar(50) return "Stored function current_user"; Warnings: -Note 1581 This function 'current_user' has the same name as a native function +Note 1582 This function 'current_user' has the same name as a native function create function md5(x varchar(50)) returns varchar(50) return "Stored function md5"; Warnings: -Note 1581 This function 'md5' has the same name as a native function +Note 1582 This function 'md5' has the same name as a native function SET SQL_MODE='IGNORE_SPACE'; select database(), database (); database() database () diff --git a/mysql-test/r/sp_gis.result b/mysql-test/r/sp_gis.result index fddf2a6bc18..b4fe0872d64 100644 --- a/mysql-test/r/sp_gis.result +++ b/mysql-test/r/sp_gis.result @@ -7,11 +7,11 @@ return 1; create function x() returns int return 2; Warnings: -Note 1581 This function 'x' has the same name as a native function +Note 1582 This function 'x' has the same name as a native function create function y() returns int return 3; Warnings: -Note 1581 This function 'y' has the same name as a native function +Note 1582 This function 'y' has the same name as a native function select a(); a() 1 diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result index a0d687e565b..abd454ac907 100644 --- a/mysql-test/r/sp_trans.result +++ b/mysql-test/r/sp_trans.result @@ -535,7 +535,7 @@ use db_bug7787| CREATE PROCEDURE p1() SHOW INNODB STATUS; | Warnings: -Warning 1543 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead +Warning 1287 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost| DROP DATABASE db_bug7787| drop user user_bug7787@localhost| diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index c075a199dae..7caf7e78fe9 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -101,13 +101,13 @@ create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6), t8 timestamp(8), t10 timestamp(10), t12 timestamp(12), t14 timestamp(14)); Warnings: -Warning 1543 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1543 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1543 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1543 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1543 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1543 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1543 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead insert t1 values (0,0,0,0,0,0,0), ("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index 01b1c77887f..2929328a9b1 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -168,7 +168,7 @@ max_error_count 10 drop table t1; set table_type=MYISAM; Warnings: -Warning 1543 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead +Warning 1287 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead create table t1 (a int); insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); update t1 set a='abc'; diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index f71b8cadabb..95ad19a886f 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -647,32 +647,32 @@ select extractValue('a','/a'); extractValue('a','/a') NULL Warnings: -Warning 1513 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT' +Warning 1522 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT' select extractValue('a<','/a'); extractValue('a<','/a') NULL Warnings: -Warning 1513 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)' +Warning 1522 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)' select extractValue('aaaa' wanted)' +Warning 1522 Incorrect XML value: 'parse error at line 1 pos 8: END-OF-INPUT unexpected ('>' wanted)' select extractValue('a','/a'); extractValue('a','/a') NULL Warnings: -Warning 1513 Incorrect XML value: 'parse error at line 1 pos 12: '' unexpected (END-OF-INPUT wanted)' +Warning 1522 Incorrect XML value: 'parse error at line 1 pos 12: '' unexpected (END-OF-INPUT wanted)' select extractValue('a','/a'); extractValue('a','/a') NULL Warnings: -Warning 1513 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)' +Warning 1522 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)' select extractValue('1','position()'); ERROR HY000: XPATH syntax error: '' select extractValue('1','last()'); @@ -723,17 +723,17 @@ select extractValue('<01>10:39:15<02>140','//* extractValue('<01>10:39:15<02>140','//*') NULL Warnings: -Warning 1513 Incorrect XML value: 'parse error at line 1 pos 13: unknown token unexpected (ident or '/' wanted)' +Warning 1522 Incorrect XML value: 'parse error at line 1 pos 13: unknown token unexpected (ident or '/' wanted)' select extractValue('<.>test','//*'); extractValue('<.>test','//*') NULL Warnings: -Warning 1513 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)' +Warning 1522 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)' select extractValue('<->test','//*'); extractValue('<->test','//*') NULL Warnings: -Warning 1513 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)' +Warning 1522 Incorrect XML value: 'parse error at line 1 pos 2: unknown token unexpected (ident or '/' wanted)' select extractValue('<:>test','//*'); extractValue('<:>test','//*') test diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 17c5f1bbe8f..e33712e1ebf 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -1271,6 +1271,6 @@ grant select on test.* to юзер_юзер@localhost; --exec $MYSQL --default-character-set=utf8 --user=юзер_юзер -e "select user()" revoke all on test.* from юзер_юзер@localhost; drop user юзер_юзер@localhost; ---error 1573 +--error ER_WRONG_STRING_LENGTH grant select on test.* to очень_длинный_юзер@localhost; set names default; diff --git a/mysql-test/t/partition_grant.test b/mysql-test/t/partition_grant.test index 0d30ad01c7a..cf944e507fd 100644 --- a/mysql-test/t/partition_grant.test +++ b/mysql-test/t/partition_grant.test @@ -63,13 +63,13 @@ insert into t1 values (1); grant alter on mysqltest_1.* to mysqltest_1@localhost; connect (conn4,localhost,mysqltest_1,,mysqltest_1); connection conn4; ---error 1514 +--error ER_NO_PARTITION_FOR_GIVEN_VALUE alter table t1 partition by list (s1) (partition p1 values in (2)); connection default; grant select, alter on mysqltest_1.* to mysqltest_1@localhost; disconnect conn4; connect (conn5,localhost,mysqltest_1,,mysqltest_1); ---error 1514 +--error ER_NO_PARTITION_FOR_GIVEN_VALUE alter table t1 partition by list (s1) (partition p1 values in (2)); disconnect conn5; connection default; -- cgit v1.2.1 From 5d1d9f11d72f0f0f2f29b21e0f9af8caf9326818 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Jun 2007 20:33:53 -0400 Subject: Bug #29307 status.test fails with different Table_locks_immediate Added more sleep time befoe reap to allow query to be executed. mysql-test/t/status.test: Added more sleep time befoe reap to allow query to be executed. --- mysql-test/t/status.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 3f7671b18d4..6fcb82e160d 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -25,7 +25,7 @@ connection con1; --send update t1 set n = 3; connection con2; -sleep 0.5; +sleep 1; unlock tables; connection con1; reap; -- cgit v1.2.1 From 094c3d17d9125529c6b19d524da3567406a26db0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Jun 2007 21:10:51 -0400 Subject: Bug #29307 status.test fails with different Table_locks_immediate Instead of sleeping for a fixed period of time, we wait until the other query is executing. --- mysql-test/t/status.test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 746d3a352a4..1208393aa09 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -22,11 +22,14 @@ connection con2; lock tables t1 read; unlock tables; lock tables t1 read; +let $ID= `select connection_id()`; connection con1; --send update t1 set n = 3; connection con2; -sleep 0.5; +# wait for the other query to start executing +let $wait_condition= select 1 from INFORMATION_SCHEMA.PROCESSLIST where ID = $ID and STATE = 0; +--source include/wait_condition.inc unlock tables; connection con1; reap; -- cgit v1.2.1 From 3a42a50fd8333478a7bfce8aab5425a614701882 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jun 2007 08:18:24 +0200 Subject: Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint into mysql.com:/home/ram/work/b29079/b29079.5.0 --- Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB fix binlog-writing so that end_log_pos is given correctly even within transactions for both SHOW BINLOG and SHOW MASTER STATUS, that is as absolute values (from log start) rather than relative values (from transaction's start). --- Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint into sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 --- Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB end_log_pos data within a transaction are relative to the start of the transaction rather than absolute. we fix those groups in situ before writing the log out. additional comments and handling for groups with very large single events, as suggested by Guilhem. --- Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint into amd64.(none):/src/bug24732/my50-bug24732 --- Merge maint1.mysql.com:/data/localhome/tsmith/bk/50 into maint1.mysql.com:/data/localhome/tsmith/bk/maint/50 --- Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB end_log_pos data within a transaction are relative to the start of the transaction rather than absolute. we fix those groups in situ before writing the log out. additional comments and handling for groups with very large single events, as suggested by Guilhem. --- Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint into sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 --- Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 --- Merge sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 mysql-test/r/rpl_truncate_7ndb.result: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB fix output for SHOW BINLOG EVENTS so that end_log_pos is given correctly even within transactions. do this by rewriting the commit-buffer in place. --- Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB end_log_pos data within a transaction are relative to the start of the transaction rather than absolute. we fix those groups in situ before writing the log out. additional comments and handling for groups with very large single events, as suggested by Guilhem. --- Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB end_log_pos data within a transaction are relative to the start of the transaction rather than absolute. we fix those groups in situ before writing the log out. additional comments and handling for groups with very large single events, as suggested by Guilhem. --- manual merge sql/log.cc: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that output for SHOW BINLOG EVENTS is no correct even within transactions. --- mysql-test/r/rpl_truncate_7ndb.result | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_truncate_7ndb.result b/mysql-test/r/rpl_truncate_7ndb.result index 62ace911e45..602c4d55ac5 100644 --- a/mysql-test/r/rpl_truncate_7ndb.result +++ b/mysql-test/r/rpl_truncate_7ndb.result @@ -32,11 +32,11 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB master-bin.000001 223 Query 1 287 BEGIN -master-bin.000001 287 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 327 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 385 Write_rows 1 157 table_id: # -master-bin.000001 444 Write_rows 1 195 table_id: # -master-bin.000001 482 Write_rows 1 233 table_id: # flags: STMT_END_F +master-bin.000001 287 Table_map 1 327 table_id: # (test.t1) +master-bin.000001 327 Table_map 1 385 table_id: # (mysql.ndb_apply_status) +master-bin.000001 385 Write_rows 1 444 table_id: # +master-bin.000001 444 Write_rows 1 482 table_id: # +master-bin.000001 482 Write_rows 1 520 table_id: # flags: STMT_END_F master-bin.000001 520 Query 1 585 COMMIT master-bin.000001 585 Query 1 665 use `test`; TRUNCATE TABLE t1 master-bin.000001 665 Query 1 741 use `test`; DROP TABLE t1 @@ -69,27 +69,27 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB master-bin.000001 223 Query 1 287 BEGIN -master-bin.000001 287 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 327 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 385 Write_rows 1 157 table_id: # -master-bin.000001 444 Write_rows 1 195 table_id: # -master-bin.000001 482 Write_rows 1 233 table_id: # flags: STMT_END_F +master-bin.000001 287 Table_map 1 327 table_id: # (test.t1) +master-bin.000001 327 Table_map 1 385 table_id: # (mysql.ndb_apply_status) +master-bin.000001 385 Write_rows 1 444 table_id: # +master-bin.000001 444 Write_rows 1 482 table_id: # +master-bin.000001 482 Write_rows 1 520 table_id: # flags: STMT_END_F master-bin.000001 520 Query 1 585 COMMIT master-bin.000001 585 Query 1 665 use `test`; TRUNCATE TABLE t1 master-bin.000001 665 Query 1 741 use `test`; DROP TABLE t1 master-bin.000001 741 Query 1 858 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB master-bin.000001 858 Query 1 922 BEGIN -master-bin.000001 922 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 962 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1020 Write_rows 1 157 table_id: # -master-bin.000001 1079 Write_rows 1 195 table_id: # -master-bin.000001 1117 Write_rows 1 233 table_id: # flags: STMT_END_F +master-bin.000001 922 Table_map 1 962 table_id: # (test.t1) +master-bin.000001 962 Table_map 1 1020 table_id: # (mysql.ndb_apply_status) +master-bin.000001 1020 Write_rows 1 1079 table_id: # +master-bin.000001 1079 Write_rows 1 1117 table_id: # +master-bin.000001 1117 Write_rows 1 1155 table_id: # flags: STMT_END_F master-bin.000001 1155 Query 1 1220 COMMIT master-bin.000001 1220 Query 1 1284 BEGIN -master-bin.000001 1284 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 1324 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1382 Write_rows 1 157 table_id: # -master-bin.000001 1441 Delete_rows 1 191 table_id: # -master-bin.000001 1475 Delete_rows 1 225 table_id: # flags: STMT_END_F +master-bin.000001 1284 Table_map 1 1324 table_id: # (test.t1) +master-bin.000001 1324 Table_map 1 1382 table_id: # (mysql.ndb_apply_status) +master-bin.000001 1382 Write_rows 1 1441 table_id: # +master-bin.000001 1441 Delete_rows 1 1475 table_id: # +master-bin.000001 1475 Delete_rows 1 1509 table_id: # flags: STMT_END_F master-bin.000001 1509 Query 1 1574 COMMIT master-bin.000001 1574 Query 1 1650 use `test`; DROP TABLE t1 -- cgit v1.2.1 From a38b1ae7c9e7b237acb4daf63edc4d2406478e57 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jun 2007 13:19:34 +0500 Subject: BUG#29207 - archive table reported as corrupt by check table (P1) CHECK TABLE against ARCHIVE table may falsely report table corruption, or cause server crash. Fixed by using proper buffer for CHECK TABLE. Affects both 5.0 and 5.1. mysql-test/r/archive.result: A test case for BUG#28916. mysql-test/t/archive.test: A test case for BUG#28916. sql/ha_archive.cc: We call Field::get_length() from get_row(). Field::get_length() assumes that the row was read into table->record[0] buffer, which is not the case when we check a table. As a result we get wrongly initialized blob length. Use table->record[0] as record buffer for check table instead. --- mysql-test/r/archive.result | 7 +++++++ mysql-test/t/archive.test | 9 +++++++++ 2 files changed, 16 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index d89cecedcdd..b6a313ddf1a 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12364,3 +12364,10 @@ select * from t1; i 1 drop table t1; +create table t1(a longblob) engine=archive; +insert into t1 set a=''; +insert into t1 set a='a'; +check table t1 extended; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 0ffbfab3d4f..61033fca3f7 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1374,3 +1374,12 @@ insert into t1 values (1); repair table t1 use_frm; select * from t1; drop table t1; + +# +# BUG#29207 - archive table reported as corrupt by check table +# +create table t1(a longblob) engine=archive; +insert into t1 set a=''; +insert into t1 set a='a'; +check table t1 extended; +drop table t1; -- cgit v1.2.1 From 2a76abce96bed0b60274e443a0922534ee610b59 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jun 2007 16:20:00 +0500 Subject: Fix for bug #29353: inserting a negative value to a csv table leads to the table corruption Problem: we believe a number cannot start with '-' ['+'] sign reading rows. Fix: let field->store() check given values. mysql-test/r/csv.result: Fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - test result. mysql-test/t/csv.test: Fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - test case. storage/csv/ha_tina.cc: Fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - code optimization: removed unnecessary file_buff->get_value() calls. - let field->store() check given value correctness. --- mysql-test/r/csv.result | 31 +++++++++++++++++++++++++++++++ mysql-test/t/csv.test | 25 +++++++++++++++++++++++++ 2 files changed, 56 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result index 34dc1cb5b2e..e7cdd612a25 100644 --- a/mysql-test/r/csv.result +++ b/mysql-test/r/csv.result @@ -5261,3 +5261,34 @@ CREATE TABLE `bug21328` ( insert into bug21328 values (1,NULL,NULL); alter table bug21328 engine=myisam; drop table bug21328; +create table t1(a int) engine=csv; +insert into t1 values(-1), (-123.34), (2), (-23); +select * from t1; +a +-1 +-123 +2 +-23 +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +create table t1(a int, b int) engine=csv; +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair Warning Data truncated for column 'a' at row 1 +test.t1 repair status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +select * from t1; +a b +1 0 +-200 1 +-1 -1 +-1 -100 +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +End of 5.1 tests diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index c7c7f3e13ab..6d24b38ee10 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -1674,3 +1674,28 @@ CREATE TABLE `bug21328` ( insert into bug21328 values (1,NULL,NULL); alter table bug21328 engine=myisam; drop table bug21328; + +# +# Bug #29353: negative values +# +create table t1(a int) engine=csv; +insert into t1 values(-1), (-123.34), (2), (-23); +select * from t1; +check table t1; +drop table t1; + +create table t1(a int, b int) engine=csv; +--write_file $MYSQLTEST_VARDIR/master-data/test/t1.CSV +1, 1E-2 +-2E2, .9 +-10E-1, -.9 +-1, -100.1 +1a, -2b +EOF +repair table t1; +check table t1; +select * from t1; +check table t1; +drop table t1; + +--echo End of 5.1 tests -- cgit v1.2.1 From f0ccaddf8b786d3bc3f0702d9a48161e47a80537 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jun 2007 14:04:29 +0200 Subject: Bug#24924: shared-memory-base-name that is too long causes buffer overflow show that shm communication still works on windows, and that we can't overflow the base-name. mysql-test/t/windows_shm-master.opt: Bug#24924: shared-memory-base-name that is too long causes buffer overflow start a server with shm communication if we're on windows. mysql-test/t/windows_shm.test: Bug#24924: shared-memory-base-name that is too long causes buffer overflow .opt has started a server with shm communication if we're on windows. now start a client with shm and connect to that server. --- mysql-test/r/windows_shm.result | 2 ++ mysql-test/t/windows_shm-master.opt | 1 + mysql-test/t/windows_shm.test | 9 +++++++++ 3 files changed, 12 insertions(+) create mode 100644 mysql-test/r/windows_shm.result create mode 100644 mysql-test/t/windows_shm-master.opt create mode 100644 mysql-test/t/windows_shm.test (limited to 'mysql-test') diff --git a/mysql-test/r/windows_shm.result b/mysql-test/r/windows_shm.result new file mode 100644 index 00000000000..c60049bece8 --- /dev/null +++ b/mysql-test/r/windows_shm.result @@ -0,0 +1,2 @@ +mysqld is alive +End of 5.0 tests. diff --git a/mysql-test/t/windows_shm-master.opt b/mysql-test/t/windows_shm-master.opt new file mode 100644 index 00000000000..4476ea16360 --- /dev/null +++ b/mysql-test/t/windows_shm-master.opt @@ -0,0 +1 @@ +--skip-grant-tables --loose-shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --loose-shared-memory=1 diff --git a/mysql-test/t/windows_shm.test b/mysql-test/t/windows_shm.test new file mode 100644 index 00000000000..203471aac56 --- /dev/null +++ b/mysql-test/t/windows_shm.test @@ -0,0 +1,9 @@ +# Windows-specific tests +--source include/windows.inc + +# +# Bug #24924: shared-memory-base-name that is too long causes buffer overflow +# +--exec $MYSQLADMIN --no-defaults --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ping + +--echo End of 5.0 tests. -- cgit v1.2.1 From a40e44efed0794ed91e7d454743fdaa7d6099f45 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jun 2007 14:28:02 +0200 Subject: WL#3933 Split main test suite to rpl, rpl_ndb and ndb - Update mysql-test-run.pl to collect tests from several suites - Group test into suites - Add suite.opt file mysql-test/suite/ndb/r/ndb_multi.result: Rename: mysql-test/r/ndb_multi.result -> mysql-test/suite/ndb/r/ndb_multi.result mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test: Rename: mysql-test/t/rpl_replicate_ignore_db.test -> mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test mysql-test/suite/rpl/t/rpl_row_trig001.test: Rename: mysql-test/t/rpl_row_trig001.test -> mysql-test/suite/rpl/t/rpl_row_trig001.test mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result: Rename: mysql-test/r/rpl_ndb_sp003.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result mysql-test/suite/binlog/r/binlog_stm_insert_select.result: Rename: mysql-test/r/binlog_stm_insert_select.result -> mysql-test/suite/binlog/r/binlog_stm_insert_select.result mysql-test/suite/ndb/t/ndb_condition_pushdown.test: Rename: mysql-test/t/ndb_condition_pushdown.test -> mysql-test/suite/ndb/t/ndb_condition_pushdown.test mysql-test/suite/ndb/t/ndb_dd_dump.test: Rename: mysql-test/t/ndb_dd_dump.test -> mysql-test/suite/ndb/t/ndb_dd_dump.test mysql-test/suite/ndb/t/ndb_partition_range.test: Rename: mysql-test/t/ndb_partition_range.test -> mysql-test/suite/ndb/t/ndb_partition_range.test mysql-test/suite/ndb/t/strict_autoinc_5ndb.test: Rename: mysql-test/t/strict_autoinc_5ndb.test -> mysql-test/suite/ndb/t/strict_autoinc_5ndb.test mysql-test/suite/rpl/r/rpl_commit_after_flush.result: Rename: mysql-test/r/rpl_commit_after_flush.result -> mysql-test/suite/rpl/r/rpl_commit_after_flush.result mysql-test/suite/rpl/r/rpl_view.result: Rename: mysql-test/r/rpl_view.result -> mysql-test/suite/rpl/r/rpl_view.result mysql-test/suite/rpl/t/rpl_insert_select.test: Rename: mysql-test/t/rpl_insert_select.test -> mysql-test/suite/rpl/t/rpl_insert_select.test mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt: Rename: mysql-test/t/rpl_load_from_master-slave.opt -> mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt mysql-test/suite/rpl/t/rpl_many_optimize.test: Rename: mysql-test/t/rpl_many_optimize.test -> mysql-test/suite/rpl/t/rpl_many_optimize.test mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test: Rename: mysql-test/t/rpl_mixed_ddl_dml.test -> mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test mysql-test/suite/rpl/t/rpl_multi_delete.test: Rename: mysql-test/t/rpl_multi_delete.test -> mysql-test/suite/rpl/t/rpl_multi_delete.test mysql-test/suite/rpl/t/rpl_row_log_innodb.test: Rename: mysql-test/t/rpl_row_log_innodb.test -> mysql-test/suite/rpl/t/rpl_row_log_innodb.test mysql-test/suite/rpl/t/rpl_row_reset_slave.test: Rename: mysql-test/t/rpl_row_reset_slave.test -> mysql-test/suite/rpl/t/rpl_row_reset_slave.test mysql-test/suite/rpl/t/rpl_row_stop_middle.test: Rename: mysql-test/t/rpl_row_stop_middle.test -> mysql-test/suite/rpl/t/rpl_row_stop_middle.test mysql-test/suite/rpl/t/rpl_stm_log-master.opt: Rename: mysql-test/t/rpl_stm_log-master.opt -> mysql-test/suite/rpl/t/rpl_stm_log-master.opt mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result: Rename: mysql-test/r/rpl_ndb_delete_nowhere.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test: Rename: mysql-test/t/rpl_ndb_sync.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Rename: mysql-test/r/binlog_row_mix_innodb_myisam.result -> mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result mysql-test/suite/ndb/r/ndb_dd_alter.result: Rename: mysql-test/r/ndb_dd_alter.result -> mysql-test/suite/ndb/r/ndb_dd_alter.result mysql-test/suite/ndb/r/ndb_index_unique.result: Rename: mysql-test/r/ndb_index_unique.result -> mysql-test/suite/ndb/r/ndb_index_unique.result mysql-test/suite/ndb/r/ndb_rename.result: Rename: mysql-test/r/ndb_rename.result -> mysql-test/suite/ndb/r/ndb_rename.result mysql-test/suite/ndb/r/ndb_update.result: Rename: mysql-test/r/ndb_update.result -> mysql-test/suite/ndb/r/ndb_update.result mysql-test/suite/ndb/r/ndb_view.result: Rename: mysql-test/r/ndb_view.result -> mysql-test/suite/ndb/r/ndb_view.result mysql-test/suite/ndb/t/ndb_alter_table2.test: Rename: mysql-test/t/ndb_alter_table2.test -> mysql-test/suite/ndb/t/ndb_alter_table2.test mysql-test/suite/ndb/t/ndb_autodiscover.test: Rename: mysql-test/t/ndb_autodiscover.test -> mysql-test/suite/ndb/t/ndb_autodiscover.test mysql-test/suite/ndb/t/ndb_binlog_discover.test: Rename: mysql-test/t/ndb_binlog_discover.test -> mysql-test/suite/ndb/t/ndb_binlog_discover.test mysql-test/suite/ndb/t/ndb_binlog_multi.test: Rename: mysql-test/t/ndb_binlog_multi.test -> mysql-test/suite/ndb/t/ndb_binlog_multi.test mysql-test/suite/ndb/t/ndb_cache_multi.test: Rename: mysql-test/t/ndb_cache_multi.test -> mysql-test/suite/ndb/t/ndb_cache_multi.test mysql-test/suite/ndb/t/ndb_partition_error2-master.opt: Rename: mysql-test/t/ndb_partition_error2-master.opt -> mysql-test/suite/ndb/t/ndb_partition_error2-master.opt mysql-test/suite/rpl/r/rpl000001.a.result: Rename: mysql-test/r/rpl000001.a.result -> mysql-test/suite/rpl/r/rpl000001.a.result mysql-test/suite/rpl/r/rpl_alter.result: Rename: mysql-test/r/rpl_alter.result -> mysql-test/suite/rpl/r/rpl_alter.result mysql-test/suite/rpl/r/rpl_insert_ignore.result: Rename: mysql-test/r/rpl_insert_ignore.result -> mysql-test/suite/rpl/r/rpl_insert_ignore.result mysql-test/suite/rpl/r/rpl_relayspace.result: Rename: mysql-test/r/rpl_relayspace.result -> mysql-test/suite/rpl/r/rpl_relayspace.result mysql-test/suite/rpl/r/rpl_row_func001.result: Rename: mysql-test/r/rpl_row_func001.result -> mysql-test/suite/rpl/r/rpl_row_func001.result mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: Rename: mysql-test/r/rpl_row_inexist_tbl.result -> mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result: Rename: mysql-test/r/rpl_stm_insert_delayed.result -> mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result mysql-test/suite/rpl/t/rpl_create_database.test: Rename: mysql-test/t/rpl_create_database.test -> mysql-test/suite/rpl/t/rpl_create_database.test mysql-test/suite/rpl/t/rpl_dual_pos_advance-master.opt: Rename: mysql-test/t/rpl_dual_pos_advance-master.opt -> mysql-test/suite/rpl/t/rpl_dual_pos_advance-master.opt mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh: Rename: mysql-test/t/rpl_flushlog_loop-slave.sh -> mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh mysql-test/suite/rpl/t/rpl_ignore_grant.test: Rename: mysql-test/t/rpl_ignore_grant.test -> mysql-test/suite/rpl/t/rpl_ignore_grant.test mysql-test/suite/rpl/t/rpl_multi_update2-slave.opt: Rename: mysql-test/t/rpl_multi_update2-slave.opt -> mysql-test/suite/rpl/t/rpl_multi_update2-slave.opt mysql-test/suite/rpl/t/rpl_multi_update4.test: Rename: mysql-test/t/rpl_multi_update4.test -> mysql-test/suite/rpl/t/rpl_multi_update4.test mysql-test/suite/rpl/t/rpl_rewrt_db.test: Rename: mysql-test/t/rpl_rewrt_db.test -> mysql-test/suite/rpl/t/rpl_rewrt_db.test mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt: Rename: mysql-test/t/rpl_rotate_logs-master.opt -> mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt mysql-test/suite/rpl/t/rpl_row_4_bytes.test: Rename: mysql-test/t/rpl_row_4_bytes.test -> mysql-test/suite/rpl/t/rpl_row_4_bytes.test mysql-test/suite/rpl/t/rpl_row_create_table-slave.opt: Rename: mysql-test/t/rpl_row_create_table-slave.opt -> mysql-test/suite/rpl/t/rpl_row_create_table-slave.opt mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test: Rename: mysql-test/t/rpl_row_flsh_tbls.test -> mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test mysql-test/suite/rpl/t/rpl_row_func003.test: Rename: mysql-test/t/rpl_row_func003.test -> mysql-test/suite/rpl/t/rpl_row_func003.test mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test: Rename: mysql-test/t/rpl_row_sp007_innodb.test -> mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test mysql-test/suite/rpl/t/rpl_row_stop_middle_update-slave.opt: Rename: mysql-test/t/rpl_row_stop_middle_update-slave.opt -> mysql-test/suite/rpl/t/rpl_row_stop_middle_update-slave.opt mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test: Rename: mysql-test/t/rpl_row_tabledefs_3innodb.test -> mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test mysql-test/suite/rpl/t/rpl_ssl1.test: Rename: mysql-test/t/rpl_ssl1.test -> mysql-test/suite/rpl/t/rpl_ssl1.test mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test: Rename: mysql-test/t/rpl_stm_max_relay_size.test -> mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test mysql-test/suite/rpl/t/rpl_stm_mystery22.test: Rename: mysql-test/t/rpl_stm_mystery22.test -> mysql-test/suite/rpl/t/rpl_stm_mystery22.test mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test: Rename: mysql-test/t/rpl_truncate_7ndb_2.test -> mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test mysql-test/suite/rpl/t/rpl_variables.test: Rename: mysql-test/t/rpl_variables.test -> mysql-test/suite/rpl/t/rpl_variables.test mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result: Rename: mysql-test/r/rpl_ndb_auto_inc.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result: Rename: mysql-test/r/rpl_ndb_do_db.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result: Rename: mysql-test/r/rpl_truncate_7ndb.result -> mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test: Rename: mysql-test/t/rpl_ndb_do_table.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test: Rename: mysql-test/t/rpl_ndb_multi.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test mysql-test/suite/binlog/r/binlog_row_blackhole.result: Rename: mysql-test/r/binlog_row_blackhole.result -> mysql-test/suite/binlog/r/binlog_row_blackhole.result mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result: Rename: mysql-test/r/binlog_row_ctype_cp932.result -> mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result mysql-test/suite/binlog/r/binlog_row_insert_select.result: Rename: mysql-test/r/binlog_row_insert_select.result -> mysql-test/suite/binlog/r/binlog_row_insert_select.result mysql-test/suite/binlog/r/binlog_stm_ps.result: Rename: mysql-test/r/binlog_stm_ps.result -> mysql-test/suite/binlog/r/binlog_stm_ps.result mysql-test/suite/binlog/t/binlog_row_binlog-master.opt: Rename: mysql-test/t/binlog_row_binlog-master.opt -> mysql-test/suite/binlog/t/binlog_row_binlog-master.opt mysql-test/suite/binlog/t/binlog_row_innodb_stat-master.opt: Rename: mysql-test/t/binlog_row_innodb_stat-master.opt -> mysql-test/suite/binlog/t/binlog_row_innodb_stat-master.opt mysql-test/suite/binlog/t/binlog_row_innodb_stat.test: Rename: mysql-test/t/binlog_row_innodb_stat.test -> mysql-test/suite/binlog/t/binlog_row_innodb_stat.test mysql-test/suite/binlog/t/binlog_stm_ctype_ucs.test: Rename: mysql-test/t/binlog_stm_ctype_ucs.test -> mysql-test/suite/binlog/t/binlog_stm_ctype_ucs.test mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result: Rename: mysql-test/r/ndb_binlog_ddl_multi.result -> mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result mysql-test/suite/ndb/r/ndb_dd_backuprestore.result: Rename: mysql-test/r/ndb_dd_backuprestore.result -> mysql-test/suite/ndb/r/ndb_dd_backuprestore.result mysql-test/suite/ndb/r/ndb_index_ordered.result: Rename: mysql-test/r/ndb_index_ordered.result -> mysql-test/suite/ndb/r/ndb_index_ordered.result mysql-test/suite/ndb/r/ndb_lock.result: Rename: mysql-test/r/ndb_lock.result -> mysql-test/suite/ndb/r/ndb_lock.result mysql-test/suite/ndb/r/ndb_partition_range.result: Rename: mysql-test/r/ndb_partition_range.result -> mysql-test/suite/ndb/r/ndb_partition_range.result mysql-test/suite/ndb/r/ndb_replace.result: Rename: mysql-test/r/ndb_replace.result -> mysql-test/suite/ndb/r/ndb_replace.result mysql-test/suite/ndb/t/ndb_alter_table3.test: Rename: mysql-test/t/ndb_alter_table3.test -> mysql-test/suite/ndb/t/ndb_alter_table3.test mysql-test/suite/ndb/t/ndb_binlog_basic.test: Rename: mysql-test/t/ndb_binlog_basic.test -> mysql-test/suite/ndb/t/ndb_binlog_basic.test mysql-test/suite/ndb/t/ndb_bitfield.test: Rename: mysql-test/t/ndb_bitfield.test -> mysql-test/suite/ndb/t/ndb_bitfield.test mysql-test/suite/ndb/t/ndb_blob_partition.test: Rename: mysql-test/t/ndb_blob_partition.test -> mysql-test/suite/ndb/t/ndb_blob_partition.test mysql-test/suite/ndb/t/ndb_cache.test: Rename: mysql-test/t/ndb_cache.test -> mysql-test/suite/ndb/t/ndb_cache.test mysql-test/suite/ndb/t/ndb_cache2.test: Rename: mysql-test/t/ndb_cache2.test -> mysql-test/suite/ndb/t/ndb_cache2.test mysql-test/suite/ndb/t/ndb_dd_alter.test: Rename: mysql-test/t/ndb_dd_alter.test -> mysql-test/suite/ndb/t/ndb_dd_alter.test mysql-test/suite/ndb/t/ndb_dd_backuprestore.test: Rename: mysql-test/t/ndb_dd_backuprestore.test -> mysql-test/suite/ndb/t/ndb_dd_backuprestore.test mysql-test/suite/ndb/t/ndb_limit.test: Rename: mysql-test/t/ndb_limit.test -> mysql-test/suite/ndb/t/ndb_limit.test mysql-test/suite/ndb/t/ndb_minmax.test: Rename: mysql-test/t/ndb_minmax.test -> mysql-test/suite/ndb/t/ndb_minmax.test mysql-test/suite/ndb/t/ndb_partition_list.test: Rename: mysql-test/t/ndb_partition_list.test -> mysql-test/suite/ndb/t/ndb_partition_list.test mysql-test/suite/ndb/t/ndb_restore_partition.test: Rename: mysql-test/t/ndb_restore_partition.test -> mysql-test/suite/ndb/t/ndb_restore_partition.test mysql-test/suite/ndb/t/ndb_restore_print.test: Rename: mysql-test/t/ndb_restore_print.test -> mysql-test/suite/ndb/t/ndb_restore_print.test mysql-test/suite/rpl/r/rpl000001.b.result: Rename: mysql-test/r/rpl000001.b.result -> mysql-test/suite/rpl/r/rpl000001.b.result mysql-test/suite/rpl/r/rpl000017.result: Rename: mysql-test/r/rpl000017.result -> mysql-test/suite/rpl/r/rpl000017.result mysql-test/suite/rpl/r/rpl_bit.result: Rename: mysql-test/r/rpl_bit.result -> mysql-test/suite/rpl/r/rpl_bit.result mysql-test/suite/rpl/r/rpl_dual_pos_advance.result: Rename: mysql-test/r/rpl_dual_pos_advance.result -> mysql-test/suite/rpl/r/rpl_dual_pos_advance.result mysql-test/suite/rpl/r/rpl_failed_optimize.result: Rename: mysql-test/r/rpl_failed_optimize.result -> mysql-test/suite/rpl/r/rpl_failed_optimize.result mysql-test/suite/rpl/r/rpl_ignore_table_update.result: Rename: mysql-test/r/rpl_ignore_table_update.result -> mysql-test/suite/rpl/r/rpl_ignore_table_update.result mysql-test/suite/rpl/r/rpl_insert_id_pk.result: Rename: mysql-test/r/rpl_insert_id_pk.result -> mysql-test/suite/rpl/r/rpl_insert_id_pk.result mysql-test/suite/rpl/r/rpl_known_bugs_detection.result: Rename: mysql-test/r/rpl_known_bugs_detection.result -> mysql-test/suite/rpl/r/rpl_known_bugs_detection.result mysql-test/suite/rpl/r/rpl_loaddata.result: Rename: mysql-test/r/rpl_loaddata.result -> mysql-test/suite/rpl/r/rpl_loaddata.result mysql-test/suite/rpl/r/rpl_redirect.result: Rename: mysql-test/r/rpl_redirect.result -> mysql-test/suite/rpl/r/rpl_redirect.result mysql-test/suite/rpl/r/rpl_row_NOW.result: Rename: mysql-test/r/rpl_row_NOW.result -> mysql-test/suite/rpl/r/rpl_row_NOW.result mysql-test/suite/rpl/r/rpl_row_func002.result: Rename: mysql-test/r/rpl_row_func002.result -> mysql-test/suite/rpl/r/rpl_row_func002.result mysql-test/suite/rpl/r/rpl_row_loaddata_m.result: Rename: mysql-test/r/rpl_row_loaddata_m.result -> mysql-test/suite/rpl/r/rpl_row_loaddata_m.result mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result: Rename: mysql-test/r/rpl_row_stop_middle_update.result -> mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result mysql-test/suite/rpl/r/rpl_row_trig001.result: Rename: mysql-test/r/rpl_row_trig001.result -> mysql-test/suite/rpl/r/rpl_row_trig001.result mysql-test/suite/rpl/r/rpl_stm_no_op.result: Rename: mysql-test/r/rpl_stm_no_op.result -> mysql-test/suite/rpl/r/rpl_stm_no_op.result mysql-test/suite/rpl/r/rpl_truncate_3innodb.result: Rename: mysql-test/r/rpl_truncate_3innodb.result -> mysql-test/suite/rpl/r/rpl_truncate_3innodb.result mysql-test/suite/rpl/t/rpl000011.test: Rename: mysql-test/t/rpl000011.test -> mysql-test/suite/rpl/t/rpl000011.test mysql-test/suite/rpl/t/rpl_alter_db.test: Rename: mysql-test/t/rpl_alter_db.test -> mysql-test/suite/rpl/t/rpl_alter_db.test mysql-test/suite/rpl/t/rpl_delete_no_where.test: Rename: mysql-test/t/rpl_delete_no_where.test -> mysql-test/suite/rpl/t/rpl_delete_no_where.test mysql-test/suite/rpl/t/rpl_dual_pos_advance.test: Rename: mysql-test/t/rpl_dual_pos_advance.test -> mysql-test/suite/rpl/t/rpl_dual_pos_advance.test mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt: Rename: mysql-test/t/rpl_flushlog_loop-master.opt -> mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh: Rename: mysql-test/t/rpl_flushlog_loop-master.sh -> mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh mysql-test/suite/rpl/t/rpl_get_lock.test: Rename: mysql-test/t/rpl_get_lock.test -> mysql-test/suite/rpl/t/rpl_get_lock.test mysql-test/suite/rpl/t/rpl_ignore_grant-slave.opt: Rename: mysql-test/t/rpl_ignore_grant-slave.opt -> mysql-test/suite/rpl/t/rpl_ignore_grant-slave.opt mysql-test/suite/rpl/t/rpl_incident.test: Rename: mysql-test/t/rpl_incident.test -> mysql-test/suite/rpl/t/rpl_incident.test mysql-test/suite/rpl/t/rpl_insert_ignore-slave.opt: Rename: mysql-test/t/rpl_insert_ignore-slave.opt -> mysql-test/suite/rpl/t/rpl_insert_ignore-slave.opt mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt: Rename: mysql-test/t/rpl_known_bugs_detection-master.opt -> mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt mysql-test/suite/rpl/t/rpl_loaddata_m.test: Rename: mysql-test/t/rpl_loaddata_m.test -> mysql-test/suite/rpl/t/rpl_loaddata_m.test mysql-test/suite/rpl/t/rpl_loaddata_s-slave.opt: Rename: mysql-test/t/rpl_loaddata_s-slave.opt -> mysql-test/suite/rpl/t/rpl_loaddata_s-slave.opt mysql-test/suite/rpl/t/rpl_loadfile.test: Rename: mysql-test/t/rpl_loadfile.test -> mysql-test/suite/rpl/t/rpl_loadfile.test mysql-test/suite/rpl/t/rpl_read_only.test: Rename: mysql-test/t/rpl_read_only.test -> mysql-test/suite/rpl/t/rpl_read_only.test mysql-test/suite/rpl/t/rpl_redirect.test: Rename: mysql-test/t/rpl_redirect.test -> mysql-test/suite/rpl/t/rpl_redirect.test mysql-test/suite/rpl/t/rpl_relay_space_innodb.test: Rename: mysql-test/t/rpl_relay_space_innodb.test -> mysql-test/suite/rpl/t/rpl_relay_space_innodb.test mysql-test/suite/rpl/t/rpl_row_basic_11bugs-master.opt: Rename: mysql-test/t/rpl_row_basic_11bugs-master.opt -> mysql-test/suite/rpl/t/rpl_row_basic_11bugs-master.opt mysql-test/suite/rpl/t/rpl_row_err_daisychain-slave.opt: Rename: mysql-test/t/rpl_row_err_daisychain-slave.opt -> mysql-test/suite/rpl/t/rpl_row_err_daisychain-slave.opt mysql-test/suite/rpl/t/rpl_row_log-slave.opt: Rename: mysql-test/t/rpl_row_log-slave.opt -> mysql-test/suite/rpl/t/rpl_row_log-slave.opt mysql-test/suite/rpl/t/rpl_row_mysqlbinlog-master.opt: Rename: mysql-test/t/rpl_row_mysqlbinlog-master.opt -> mysql-test/suite/rpl/t/rpl_row_mysqlbinlog-master.opt mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test: Rename: mysql-test/t/rpl_row_sp006_InnoDB.test -> mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test mysql-test/suite/rpl/t/rpl_row_sp007_innodb-slave.opt: Rename: mysql-test/t/rpl_row_sp007_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_sp007_innodb-slave.opt mysql-test/suite/rpl/t/rpl_row_stop_middle_update-master.opt: Rename: mysql-test/t/rpl_row_stop_middle_update-master.opt -> mysql-test/suite/rpl/t/rpl_row_stop_middle_update-master.opt mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb-slave.opt: Rename: mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb-slave.opt mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt: Rename: mysql-test/t/rpl_sp_effects-slave.opt -> mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt mysql-test/suite/rpl/t/rpl_sp_effects.test: Rename: mysql-test/t/rpl_sp_effects.test -> mysql-test/suite/rpl/t/rpl_sp_effects.test mysql-test/suite/rpl/t/rpl_sporadic_master-master.opt: Rename: mysql-test/t/rpl_sporadic_master-master.opt -> mysql-test/suite/rpl/t/rpl_sporadic_master-master.opt mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test: Rename: mysql-test/t/rpl_switch_stm_row_mixed.test -> mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test mysql-test/suite/rpl/t/rpl_temporary.test: Rename: mysql-test/t/rpl_temporary.test -> mysql-test/suite/rpl/t/rpl_temporary.test mysql-test/suite/rpl/t/rpl_timezone-master.opt: Rename: mysql-test/t/rpl_timezone-master.opt -> mysql-test/suite/rpl/t/rpl_timezone-master.opt mysql-test/suite/rpl/t/rpl_trigger.test: Rename: mysql-test/t/rpl_trigger.test -> mysql-test/suite/rpl/t/rpl_trigger.test mysql-test/suite/rpl/t/rpl_trunc_temp.test: Rename: mysql-test/t/rpl_trunc_temp.test -> mysql-test/suite/rpl/t/rpl_trunc_temp.test mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result: Rename: mysql-test/r/rpl_ndb_bank.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result: Rename: mysql-test/r/rpl_ndb_blob.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result: Rename: mysql-test/r/rpl_ndb_blob2.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result: Rename: mysql-test/r/rpl_ndb_relayrotate.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test: Rename: mysql-test/t/rpl_ndb_2innodb.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test: Rename: mysql-test/t/rpl_ndb_charset.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test: Rename: mysql-test/t/rpl_ndb_dd_basic.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test: Rename: mysql-test/t/rpl_ndb_ddl.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test: Rename: mysql-test/t/rpl_ndb_delete_nowhere.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt: Rename: mysql-test/t/rpl_ndb_do_db-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt: Rename: mysql-test/t/rpl_ndb_innodb2ndb-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt: Rename: mysql-test/t/rpl_ndb_log-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt: Rename: mysql-test/t/rpl_ndb_relayrotate-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test: Rename: mysql-test/t/rpl_ndb_sp006.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test: Rename: mysql-test/t/rpl_ndb_trig004.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result: Rename: mysql-test/r/binlog_stm_ctype_cp932.result -> mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result mysql-test/suite/ndb/r/ndb_basic.result: Rename: mysql-test/r/ndb_basic.result -> mysql-test/suite/ndb/r/ndb_basic.result mysql-test/suite/ndb/r/ndb_binlog_log_bin.result: Rename: mysql-test/r/ndb_binlog_log_bin.result -> mysql-test/suite/ndb/r/ndb_binlog_log_bin.result mysql-test/suite/ndb/r/ndb_cursor.result: Rename: mysql-test/r/ndb_cursor.result -> mysql-test/suite/ndb/r/ndb_cursor.result mysql-test/suite/ndb/r/ndb_dd_basic.result: Rename: mysql-test/r/ndb_dd_basic.result -> mysql-test/suite/ndb/r/ndb_dd_basic.result mysql-test/suite/ndb/r/ndb_dd_sql_features.result: Rename: mysql-test/r/ndb_dd_sql_features.result -> mysql-test/suite/ndb/r/ndb_dd_sql_features.result mysql-test/suite/ndb/r/ndb_gis.result: Rename: mysql-test/r/ndb_gis.result -> mysql-test/suite/ndb/r/ndb_gis.result mysql-test/suite/ndb/r/ndb_load.result: Rename: mysql-test/r/ndb_load.result -> mysql-test/suite/ndb/r/ndb_load.result mysql-test/suite/ndb/r/ndb_multi_row.result: Rename: mysql-test/r/ndb_multi_row.result -> mysql-test/suite/ndb/r/ndb_multi_row.result mysql-test/suite/ndb/r/ndb_trigger.result: Rename: mysql-test/r/ndb_trigger.result -> mysql-test/suite/ndb/r/ndb_trigger.result mysql-test/suite/ndb/r/ndb_types.result: Rename: mysql-test/r/ndb_types.result -> mysql-test/suite/ndb/r/ndb_types.result mysql-test/suite/ndb/t/ndb_alter_table.test: Rename: mysql-test/t/ndb_alter_table.test -> mysql-test/suite/ndb/t/ndb_alter_table.test mysql-test/suite/ndb/t/ndb_basic.test: Rename: mysql-test/t/ndb_basic.test -> mysql-test/suite/ndb/t/ndb_basic.test mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt: Rename: mysql-test/t/ndb_binlog_ignore_db-master.opt -> mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt mysql-test/suite/ndb/t/ndb_blob.test: Rename: mysql-test/t/ndb_blob.test -> mysql-test/suite/ndb/t/ndb_blob.test mysql-test/suite/ndb/t/ndb_dd_ddl.test: Rename: mysql-test/t/ndb_dd_ddl.test -> mysql-test/suite/ndb/t/ndb_dd_ddl.test mysql-test/suite/ndb/t/ndb_dd_disk2memory.test: Rename: mysql-test/t/ndb_dd_disk2memory.test -> mysql-test/suite/ndb/t/ndb_dd_disk2memory.test mysql-test/suite/ndb/t/ndb_index_unique.test: Rename: mysql-test/t/ndb_index_unique.test -> mysql-test/suite/ndb/t/ndb_index_unique.test mysql-test/suite/ndb/t/ndb_read_multi_range.test: Rename: mysql-test/t/ndb_read_multi_range.test -> mysql-test/suite/ndb/t/ndb_read_multi_range.test mysql-test/suite/ndb/t/ndb_row_format.test: Rename: mysql-test/t/ndb_row_format.test -> mysql-test/suite/ndb/t/ndb_row_format.test mysql-test/suite/rpl/r/rpl_alter_db.result: Rename: mysql-test/r/rpl_alter_db.result -> mysql-test/suite/rpl/r/rpl_alter_db.result mysql-test/suite/rpl/r/rpl_drop_db.result: Rename: mysql-test/r/rpl_drop_db.result -> mysql-test/suite/rpl/r/rpl_drop_db.result mysql-test/suite/rpl/r/rpl_log_pos.result: Rename: mysql-test/r/rpl_log_pos.result -> mysql-test/suite/rpl/r/rpl_log_pos.result mysql-test/suite/rpl/r/rpl_multi_update3.result: Rename: mysql-test/r/rpl_multi_update3.result -> mysql-test/suite/rpl/r/rpl_multi_update3.result mysql-test/suite/rpl/r/rpl_rewrt_db.result: Rename: mysql-test/r/rpl_rewrt_db.result -> mysql-test/suite/rpl/r/rpl_rewrt_db.result mysql-test/suite/rpl/r/rpl_row_create_table.result: Rename: mysql-test/r/rpl_row_create_table.result -> mysql-test/suite/rpl/r/rpl_row_create_table.result mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result: Rename: mysql-test/r/rpl_row_flsh_tbls.result -> mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result mysql-test/suite/rpl/r/rpl_row_func003.result: Rename: mysql-test/r/rpl_row_func003.result -> mysql-test/suite/rpl/r/rpl_row_func003.result mysql-test/suite/rpl/r/rpl_row_sp008.result: Rename: mysql-test/r/rpl_row_sp008.result -> mysql-test/suite/rpl/r/rpl_row_sp008.result mysql-test/suite/rpl/r/rpl_row_trig002.result: Rename: mysql-test/r/rpl_row_trig002.result -> mysql-test/suite/rpl/r/rpl_row_trig002.result mysql-test/suite/rpl/r/rpl_sp004.result: Rename: mysql-test/r/rpl_sp004.result -> mysql-test/suite/rpl/r/rpl_sp004.result mysql-test/suite/rpl/r/rpl_ssl.result: Rename: mysql-test/r/rpl_ssl.result -> mysql-test/suite/rpl/r/rpl_ssl.result mysql-test/suite/rpl/r/rpl_stm_EE_err2.result: Rename: mysql-test/r/rpl_stm_EE_err2.result -> mysql-test/suite/rpl/r/rpl_stm_EE_err2.result mysql-test/suite/rpl/r/rpl_stm_multi_query.result: Rename: mysql-test/r/rpl_stm_multi_query.result -> mysql-test/suite/rpl/r/rpl_stm_multi_query.result mysql-test/suite/rpl/t/rpl000013.test: Rename: mysql-test/t/rpl000013.test -> mysql-test/suite/rpl/t/rpl000013.test mysql-test/suite/rpl/t/rpl000017-slave.opt: Rename: mysql-test/t/rpl000017-slave.opt -> mysql-test/suite/rpl/t/rpl000017-slave.opt mysql-test/suite/rpl/t/rpl_drop_db.test: Rename: mysql-test/t/rpl_drop_db.test -> mysql-test/suite/rpl/t/rpl_drop_db.test mysql-test/suite/rpl/t/rpl_flushlog_loop.test: Rename: mysql-test/t/rpl_flushlog_loop.test -> mysql-test/suite/rpl/t/rpl_flushlog_loop.test mysql-test/suite/rpl/t/rpl_load_from_master.test: Rename: mysql-test/t/rpl_load_from_master.test -> mysql-test/suite/rpl/t/rpl_load_from_master.test mysql-test/suite/rpl/t/rpl_locale.test: Rename: mysql-test/t/rpl_locale.test -> mysql-test/suite/rpl/t/rpl_locale.test mysql-test/suite/rpl/t/rpl_multi_delete-slave.opt: Rename: mysql-test/t/rpl_multi_delete-slave.opt -> mysql-test/suite/rpl/t/rpl_multi_delete-slave.opt mysql-test/suite/rpl/t/rpl_rotate_logs.test: Rename: mysql-test/t/rpl_rotate_logs.test -> mysql-test/suite/rpl/t/rpl_rotate_logs.test mysql-test/suite/rpl/t/rpl_row_NOW.test: Rename: mysql-test/t/rpl_row_NOW.test -> mysql-test/suite/rpl/t/rpl_row_NOW.test mysql-test/suite/rpl/t/rpl_row_err_daisychain-master.opt: Rename: mysql-test/t/rpl_row_err_daisychain-master.opt -> mysql-test/suite/rpl/t/rpl_row_err_daisychain-master.opt mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test: Rename: mysql-test/t/rpl_row_inexist_tbl.test -> mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test mysql-test/suite/rpl/t/rpl_row_mystery22.test: Rename: mysql-test/t/rpl_row_mystery22.test -> mysql-test/suite/rpl/t/rpl_row_mystery22.test mysql-test/suite/rpl/t/rpl_row_sp003.test: Rename: mysql-test/t/rpl_row_sp003.test -> mysql-test/suite/rpl/t/rpl_row_sp003.test mysql-test/suite/rpl/t/rpl_row_sp011.test: Rename: mysql-test/t/rpl_row_sp011.test -> mysql-test/suite/rpl/t/rpl_row_sp011.test mysql-test/suite/rpl/t/rpl_server_id1.test: Rename: mysql-test/t/rpl_server_id1.test -> mysql-test/suite/rpl/t/rpl_server_id1.test mysql-test/suite/rpl/t/rpl_session_var.test: Rename: mysql-test/t/rpl_session_var.test -> mysql-test/suite/rpl/t/rpl_session_var.test mysql-test/suite/rpl/t/rpl_skip_error.test: Rename: mysql-test/t/rpl_skip_error.test -> mysql-test/suite/rpl/t/rpl_skip_error.test mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result: Rename: mysql-test/r/rpl_ndb_commit_afterflush.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test: Rename: mysql-test/t/rpl_ndb_do_db.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt: Rename: mysql-test/t/rpl_ndb_innodb2ndb-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt: Rename: mysql-test/t/rpl_ndb_multi_update2-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test: Rename: mysql-test/t/rpl_ndb_multi_update2.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result: Rename: mysql-test/r/binlog_statement_insert_delayed.result -> mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result mysql-test/suite/binlog/t/binlog_row_blackhole.test: Rename: mysql-test/t/binlog_row_blackhole.test -> mysql-test/suite/binlog/t/binlog_row_blackhole.test mysql-test/suite/ndb/r/ndb_limit.result: Rename: mysql-test/r/ndb_limit.result -> mysql-test/suite/ndb/r/ndb_limit.result mysql-test/suite/ndb/t/ndb_dd_basic.test: Rename: mysql-test/t/ndb_dd_basic.test -> mysql-test/suite/ndb/t/ndb_dd_basic.test mysql-test/suite/ndb/t/ndb_types.test: Rename: mysql-test/t/ndb_types.test -> mysql-test/suite/ndb/t/ndb_types.test mysql-test/suite/ndb/t/ndb_update.test: Rename: mysql-test/t/ndb_update.test -> mysql-test/suite/ndb/t/ndb_update.test mysql-test/suite/rpl/r/rpl_extraCol_innodb.result: Rename: mysql-test/r/rpl_extraCol_innodb.result -> mysql-test/suite/rpl/r/rpl_extraCol_innodb.result mysql-test/suite/rpl/r/rpl_loaddata_charset.result: Rename: mysql-test/r/rpl_loaddata_charset.result -> mysql-test/suite/rpl/r/rpl_loaddata_charset.result mysql-test/suite/rpl/r/rpl_loaddata_m.result: Rename: mysql-test/r/rpl_loaddata_m.result -> mysql-test/suite/rpl/r/rpl_loaddata_m.result mysql-test/suite/rpl/r/rpl_multi_delete.result: Rename: mysql-test/r/rpl_multi_delete.result -> mysql-test/suite/rpl/r/rpl_multi_delete.result mysql-test/suite/rpl/r/rpl_multi_delete2.result: Rename: mysql-test/r/rpl_multi_delete2.result -> mysql-test/suite/rpl/r/rpl_multi_delete2.result mysql-test/suite/rpl/r/rpl_row_sp009.result: Rename: mysql-test/r/rpl_row_sp009.result -> mysql-test/suite/rpl/r/rpl_row_sp009.result mysql-test/suite/rpl/r/rpl_row_sp010.result: Rename: mysql-test/r/rpl_row_sp010.result -> mysql-test/suite/rpl/r/rpl_row_sp010.result mysql-test/suite/rpl/r/rpl_set_charset.result: Rename: mysql-test/r/rpl_set_charset.result -> mysql-test/suite/rpl/r/rpl_set_charset.result mysql-test/suite/rpl/r/rpl_skip_error.result: Rename: mysql-test/r/rpl_skip_error.result -> mysql-test/suite/rpl/r/rpl_skip_error.result mysql-test/suite/rpl/r/rpl_stm_charset.result: Rename: mysql-test/r/rpl_stm_charset.result -> mysql-test/suite/rpl/r/rpl_stm_charset.result mysql-test/suite/rpl/r/rpl_trigger.result: Rename: mysql-test/r/rpl_trigger.result -> mysql-test/suite/rpl/r/rpl_trigger.result mysql-test/suite/rpl/t/rpl_auto_increment-master.opt: Rename: mysql-test/t/rpl_auto_increment-master.opt -> mysql-test/suite/rpl/t/rpl_auto_increment-master.opt mysql-test/suite/rpl/t/rpl_bit_npk.test: Rename: mysql-test/t/rpl_bit_npk.test -> mysql-test/suite/rpl/t/rpl_bit_npk.test mysql-test/suite/rpl/t/rpl_extraCol_innodb.test: Rename: mysql-test/t/rpl_extraCol_innodb.test -> mysql-test/suite/rpl/t/rpl_extraCol_innodb.test mysql-test/suite/rpl/t/rpl_free_items-slave.opt: Rename: mysql-test/t/rpl_free_items-slave.opt -> mysql-test/suite/rpl/t/rpl_free_items-slave.opt mysql-test/suite/rpl/t/rpl_init_slave.test: Rename: mysql-test/t/rpl_init_slave.test -> mysql-test/suite/rpl/t/rpl_init_slave.test mysql-test/suite/rpl/t/rpl_packet-slave.opt: Rename: mysql-test/t/rpl_packet-slave.opt -> mysql-test/suite/rpl/t/rpl_packet-slave.opt mysql-test/suite/rpl/t/rpl_relay_space_innodb-slave.opt: Rename: mysql-test/t/rpl_relay_space_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_relay_space_innodb-slave.opt mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi: Rename: mysql-test/t/rpl_rotate_logs.slave-mi -> mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi mysql-test/suite/rpl/t/rpl_row_USER.test: Rename: mysql-test/t/rpl_row_USER.test -> mysql-test/suite/rpl/t/rpl_row_USER.test mysql-test/suite/rpl/t/rpl_row_delayed_ins.test: Rename: mysql-test/t/rpl_row_delayed_ins.test -> mysql-test/suite/rpl/t/rpl_row_delayed_ins.test mysql-test/suite/rpl/t/rpl_row_sp002_innodb-slave.opt: Rename: mysql-test/t/rpl_row_sp002_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_sp002_innodb-slave.opt mysql-test/suite/rpl/t/rpl_row_trig002.test: Rename: mysql-test/t/rpl_row_trig002.test -> mysql-test/suite/rpl/t/rpl_row_trig002.test mysql-test/suite/rpl/t/rpl_sf.test: Rename: mysql-test/t/rpl_sf.test -> mysql-test/suite/rpl/t/rpl_sf.test mysql-test/suite/rpl/t/rpl_stm_no_op.test: Rename: mysql-test/t/rpl_stm_no_op.test -> mysql-test/suite/rpl/t/rpl_stm_no_op.test mysql-test/suite/rpl/t/rpl_udf-slave.opt: Rename: mysql-test/t/rpl_udf-slave.opt -> mysql-test/suite/rpl/t/rpl_udf-slave.opt mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result: Rename: mysql-test/r/rpl_ndb_dd_partitions.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result: Rename: mysql-test/r/rpl_ndb_multi.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result: Rename: mysql-test/r/rpl_ndb_rep_ignore.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result: Rename: mysql-test/r/rpl_ndb_sp006.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt: Rename: mysql-test/t/rpl_ndb_2myisam-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test: Rename: mysql-test/t/rpl_ndb_idempotent.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test: Rename: mysql-test/t/rpl_ndb_sp003.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test mysql-test/suite/binlog/r/binlog_row_binlog.result: Rename: mysql-test/r/binlog_row_binlog.result -> mysql-test/suite/binlog/r/binlog_row_binlog.result mysql-test/suite/binlog/r/binlog_stm_blackhole.result: Rename: mysql-test/r/binlog_stm_blackhole.result -> mysql-test/suite/binlog/r/binlog_stm_blackhole.result mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Rename: mysql-test/r/binlog_stm_mix_innodb_myisam.result -> mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result mysql-test/suite/binlog/t/binlog_row_drop_tmp_tbl.test: Rename: mysql-test/t/binlog_row_drop_tmp_tbl.test -> mysql-test/suite/binlog/t/binlog_row_drop_tmp_tbl.test mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam-master.opt: Rename: mysql-test/t/binlog_row_mix_innodb_myisam-master.opt -> mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam-master.opt mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test: Rename: mysql-test/t/binlog_statement_insert_delayed.test -> mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt: Rename: mysql-test/t/binlog_stm_binlog-master.opt -> mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt mysql-test/suite/ndb/r/ndb_alter_table2.result: Rename: mysql-test/r/ndb_alter_table2.result -> mysql-test/suite/ndb/r/ndb_alter_table2.result mysql-test/suite/ndb/r/ndb_blob.result: Rename: mysql-test/r/ndb_blob.result -> mysql-test/suite/ndb/r/ndb_blob.result mysql-test/suite/ndb/r/ndb_cache_multi2.result: Rename: mysql-test/r/ndb_cache_multi2.result -> mysql-test/suite/ndb/r/ndb_cache_multi2.result mysql-test/suite/ndb/r/ndb_config2.result: Rename: mysql-test/r/ndb_config2.result -> mysql-test/suite/ndb/r/ndb_config2.result mysql-test/suite/ndb/t/ndb_truncate.test: Rename: mysql-test/t/ndb_truncate.test -> mysql-test/suite/ndb/t/ndb_truncate.test mysql-test/suite/ndb/t/ndbapi.test: Rename: mysql-test/t/ndbapi.test -> mysql-test/suite/ndb/t/ndbapi.test mysql-test/suite/rpl/r/rpl_charset_sjis.result: Rename: mysql-test/r/rpl_charset_sjis.result -> mysql-test/suite/rpl/r/rpl_charset_sjis.result mysql-test/suite/rpl/r/rpl_extraCol_myisam.result: Rename: mysql-test/r/rpl_extraCol_myisam.result -> mysql-test/suite/rpl/r/rpl_extraCol_myisam.result mysql-test/suite/rpl/r/rpl_locale.result: Rename: mysql-test/r/rpl_locale.result -> mysql-test/suite/rpl/r/rpl_locale.result mysql-test/suite/rpl/r/rpl_multi_update2.result: Rename: mysql-test/r/rpl_multi_update2.result -> mysql-test/suite/rpl/r/rpl_multi_update2.result mysql-test/suite/rpl/r/rpl_relay_space_innodb.result: Rename: mysql-test/r/rpl_relay_space_innodb.result -> mysql-test/suite/rpl/r/rpl_relay_space_innodb.result mysql-test/suite/rpl/r/rpl_row_insert_delayed.result: Rename: mysql-test/r/rpl_row_insert_delayed.result -> mysql-test/suite/rpl/r/rpl_row_insert_delayed.result mysql-test/suite/rpl/r/rpl_row_log_innodb.result: Rename: mysql-test/r/rpl_row_log_innodb.result -> mysql-test/suite/rpl/r/rpl_row_log_innodb.result mysql-test/suite/rpl/r/rpl_row_multi_query.result: Rename: mysql-test/r/rpl_row_multi_query.result -> mysql-test/suite/rpl/r/rpl_row_multi_query.result mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result: Rename: mysql-test/r/rpl_row_tabledefs_3innodb.result -> mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result mysql-test/suite/rpl/r/rpl_row_trig003.result: Rename: mysql-test/r/rpl_row_trig003.result -> mysql-test/suite/rpl/r/rpl_row_trig003.result mysql-test/suite/rpl/r/rpl_row_until.result: Rename: mysql-test/r/rpl_row_until.result -> mysql-test/suite/rpl/r/rpl_row_until.result mysql-test/suite/rpl/t/rpl_empty_master_crash-master.opt: Rename: mysql-test/t/rpl_empty_master_crash-master.opt -> mysql-test/suite/rpl/t/rpl_empty_master_crash-master.opt mysql-test/suite/rpl/t/rpl_free_items.test: Rename: mysql-test/t/rpl_free_items.test -> mysql-test/suite/rpl/t/rpl_free_items.test mysql-test/suite/rpl/t/rpl_ps.test: Rename: mysql-test/t/rpl_ps.test -> mysql-test/suite/rpl/t/rpl_ps.test mysql-test/suite/rpl/t/rpl_relay_space_myisam.test: Rename: mysql-test/t/rpl_relay_space_myisam.test -> mysql-test/suite/rpl/t/rpl_relay_space_myisam.test mysql-test/suite/rpl/t/rpl_relayrotate.test: Rename: mysql-test/t/rpl_relayrotate.test -> mysql-test/suite/rpl/t/rpl_relayrotate.test mysql-test/suite/rpl/t/rpl_relayspace.test: Rename: mysql-test/t/rpl_relayspace.test -> mysql-test/suite/rpl/t/rpl_relayspace.test mysql-test/suite/rpl/t/rpl_row_sp003-master.opt: Rename: mysql-test/t/rpl_row_sp003-master.opt -> mysql-test/suite/rpl/t/rpl_row_sp003-master.opt mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result: Rename: mysql-test/r/rpl_ndb_sync.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result: Rename: mysql-test/r/rpl_ndbapi_multi.result -> mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test: Rename: mysql-test/t/rpl_ndb_2myisam.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test: Rename: mysql-test/t/rpl_ndb_func003.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test: Rename: mysql-test/t/rpl_ndb_innodb_trans.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test: Rename: mysql-test/t/rpl_ndb_load.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test: Rename: mysql-test/t/rpl_truncate_7ndb.test -> mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test: Rename: mysql-test/t/binlog_row_mix_innodb_myisam.test -> mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test mysql-test/suite/binlog/t/binlog_stm_binlog.test: Rename: mysql-test/t/binlog_stm_binlog.test -> mysql-test/suite/binlog/t/binlog_stm_binlog.test mysql-test/suite/binlog/t/binlog_stm_ctype_cp932.test: Rename: mysql-test/t/binlog_stm_ctype_cp932.test -> mysql-test/suite/binlog/t/binlog_stm_ctype_cp932.test mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt: Rename: mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt -> mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test: Rename: mysql-test/t/binlog_stm_mix_innodb_myisam.test -> mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test mysql-test/suite/ndb/r/ndb_alter_table3.result: Rename: mysql-test/r/ndb_alter_table3.result -> mysql-test/suite/ndb/r/ndb_alter_table3.result mysql-test/suite/ndb/r/ndb_autodiscover2.result: Rename: mysql-test/r/ndb_autodiscover2.result -> mysql-test/suite/ndb/r/ndb_autodiscover2.result mysql-test/suite/ndb/r/ndb_backup_print.result: Rename: mysql-test/r/ndb_backup_print.result -> mysql-test/suite/ndb/r/ndb_backup_print.result mysql-test/suite/ndb/r/ndb_binlog_basic.result: Rename: mysql-test/r/ndb_binlog_basic.result -> mysql-test/suite/ndb/r/ndb_binlog_basic.result mysql-test/suite/ndb/r/ndb_condition_pushdown.result: Rename: mysql-test/r/ndb_condition_pushdown.result -> mysql-test/suite/ndb/r/ndb_condition_pushdown.result mysql-test/suite/ndb/r/ndb_dd_ddl.result: Rename: mysql-test/r/ndb_dd_ddl.result -> mysql-test/suite/ndb/r/ndb_dd_ddl.result mysql-test/suite/ndb/r/ndb_dd_dump.result: Rename: mysql-test/r/ndb_dd_dump.result -> mysql-test/suite/ndb/r/ndb_dd_dump.result mysql-test/suite/ndb/r/ndb_loaddatalocal.result: Rename: mysql-test/r/ndb_loaddatalocal.result -> mysql-test/suite/ndb/r/ndb_loaddatalocal.result mysql-test/suite/ndb/r/ndb_restore_compat.result: Rename: mysql-test/r/ndb_restore_compat.result -> mysql-test/suite/ndb/r/ndb_restore_compat.result mysql-test/suite/ndb/r/ndb_row_format.result: Rename: mysql-test/r/ndb_row_format.result -> mysql-test/suite/ndb/r/ndb_row_format.result mysql-test/suite/ndb/r/ndb_sp.result: Rename: mysql-test/r/ndb_sp.result -> mysql-test/suite/ndb/r/ndb_sp.result mysql-test/suite/ndb/r/ndb_temporary.result: Rename: mysql-test/r/ndb_temporary.result -> mysql-test/suite/ndb/r/ndb_temporary.result mysql-test/suite/ndb/r/ps_7ndb.result: Rename: mysql-test/r/ps_7ndb.result -> mysql-test/suite/ndb/r/ps_7ndb.result mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test: Rename: mysql-test/t/ndb_binlog_ddl_multi.test -> mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test mysql-test/suite/ndb/t/ndb_cache_multi2.test: Rename: mysql-test/t/ndb_cache_multi2.test -> mysql-test/suite/ndb/t/ndb_cache_multi2.test mysql-test/suite/ndb/t/ndb_charset.test: Rename: mysql-test/t/ndb_charset.test -> mysql-test/suite/ndb/t/ndb_charset.test mysql-test/suite/ndb/t/ndb_dd_sql_features.test: Rename: mysql-test/t/ndb_dd_sql_features.test -> mysql-test/suite/ndb/t/ndb_dd_sql_features.test mysql-test/suite/ndb/t/ndb_loaddatalocal.test: Rename: mysql-test/t/ndb_loaddatalocal.test -> mysql-test/suite/ndb/t/ndb_loaddatalocal.test mysql-test/suite/ndb/t/ndb_multi_row.test: Rename: mysql-test/t/ndb_multi_row.test -> mysql-test/suite/ndb/t/ndb_multi_row.test mysql-test/suite/ndb/t/ndb_restore.test: Rename: mysql-test/t/ndb_restore.test -> mysql-test/suite/ndb/t/ndb_restore.test mysql-test/suite/ndb/t/partition_03ndb.test: Rename: mysql-test/t/partition_03ndb.test -> mysql-test/suite/ndb/t/partition_03ndb.test mysql-test/suite/ndb/t/ps_7ndb.test: Rename: mysql-test/t/ps_7ndb.test -> mysql-test/suite/ndb/t/ps_7ndb.test mysql-test/suite/rpl/r/rpl000013.result: Rename: mysql-test/r/rpl000013.result -> mysql-test/suite/rpl/r/rpl000013.result mysql-test/suite/rpl/r/rpl_auto_increment_11932.result: Rename: mysql-test/r/rpl_auto_increment_11932.result -> mysql-test/suite/rpl/r/rpl_auto_increment_11932.result mysql-test/suite/rpl/r/rpl_change_master.result: Rename: mysql-test/r/rpl_change_master.result -> mysql-test/suite/rpl/r/rpl_change_master.result mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result: Rename: mysql-test/r/rpl_foreign_key_innodb.result -> mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result mysql-test/suite/rpl/r/rpl_insert_select.result: Rename: mysql-test/r/rpl_insert_select.result -> mysql-test/suite/rpl/r/rpl_insert_select.result mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result: Rename: mysql-test/r/rpl_mixed_ddl_dml.result -> mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result mysql-test/suite/rpl/r/rpl_replicate_do.result: Rename: mysql-test/r/rpl_replicate_do.result -> mysql-test/suite/rpl/r/rpl_replicate_do.result mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result: Rename: mysql-test/r/rpl_row_basic_2myisam.result -> mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result mysql-test/suite/rpl/r/rpl_row_sp011.result: Rename: mysql-test/r/rpl_row_sp011.result -> mysql-test/suite/rpl/r/rpl_row_sp011.result mysql-test/suite/rpl/r/rpl_row_trig004.result: Rename: mysql-test/r/rpl_row_trig004.result -> mysql-test/suite/rpl/r/rpl_row_trig004.result mysql-test/suite/rpl/r/rpl_slave_status.result: Rename: mysql-test/r/rpl_slave_status.result -> mysql-test/suite/rpl/r/rpl_slave_status.result mysql-test/suite/rpl/r/rpl_stm_log.result: Rename: mysql-test/r/rpl_stm_log.result -> mysql-test/suite/rpl/r/rpl_stm_log.result mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result: Rename: mysql-test/r/rpl_stm_max_relay_size.result -> mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result: Rename: mysql-test/r/rpl_switch_stm_row_mixed.result -> mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result mysql-test/suite/rpl/r/rpl_temp_table.result: Rename: mysql-test/r/rpl_temp_table.result -> mysql-test/suite/rpl/r/rpl_temp_table.result mysql-test/suite/rpl/r/rpl_timezone.result: Rename: mysql-test/r/rpl_timezone.result -> mysql-test/suite/rpl/r/rpl_timezone.result mysql-test/suite/rpl/t/rpl000017-slave.sh: Rename: mysql-test/t/rpl000017-slave.sh -> mysql-test/suite/rpl/t/rpl000017-slave.sh mysql-test/suite/rpl/t/rpl000018-slave.opt: Rename: mysql-test/t/rpl000018-slave.opt -> mysql-test/suite/rpl/t/rpl000018-slave.opt mysql-test/suite/rpl/t/rpl_auto_increment_11932.test: Rename: mysql-test/t/rpl_auto_increment_11932.test -> mysql-test/suite/rpl/t/rpl_auto_increment_11932.test mysql-test/suite/rpl/t/rpl_commit_after_flush.test: Rename: mysql-test/t/rpl_commit_after_flush.test -> mysql-test/suite/rpl/t/rpl_commit_after_flush.test mysql-test/suite/rpl/t/rpl_create_database-master.opt: Rename: mysql-test/t/rpl_create_database-master.opt -> mysql-test/suite/rpl/t/rpl_create_database-master.opt mysql-test/suite/rpl/t/rpl_deadlock_innodb-slave.opt: Rename: mysql-test/t/rpl_deadlock_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_deadlock_innodb-slave.opt mysql-test/suite/rpl/t/rpl_drop.test: Rename: mysql-test/t/rpl_drop.test -> mysql-test/suite/rpl/t/rpl_drop.test mysql-test/suite/rpl/t/rpl_empty_master_crash.test: Rename: mysql-test/t/rpl_empty_master_crash.test -> mysql-test/suite/rpl/t/rpl_empty_master_crash.test mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt: Rename: mysql-test/t/rpl_flushlog_loop-slave.opt -> mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt mysql-test/suite/rpl/t/rpl_ignore_table_update.test: Rename: mysql-test/t/rpl_ignore_table_update.test -> mysql-test/suite/rpl/t/rpl_ignore_table_update.test mysql-test/suite/rpl/t/rpl_innodb.test: Rename: mysql-test/t/rpl_innodb.test -> mysql-test/suite/rpl/t/rpl_innodb.test mysql-test/suite/rpl/t/rpl_known_bugs_detection.test: Rename: mysql-test/t/rpl_known_bugs_detection.test -> mysql-test/suite/rpl/t/rpl_known_bugs_detection.test mysql-test/suite/rpl/t/rpl_multi_update4-slave.opt: Rename: mysql-test/t/rpl_multi_update4-slave.opt -> mysql-test/suite/rpl/t/rpl_multi_update4-slave.opt mysql-test/suite/rpl/t/rpl_packet-master.opt: Rename: mysql-test/t/rpl_packet-master.opt -> mysql-test/suite/rpl/t/rpl_packet-master.opt mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt: Rename: mysql-test/t/rpl_row_4_bytes-master.opt -> mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test: Rename: mysql-test/t/rpl_row_basic_3innodb.test -> mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test mysql-test/suite/rpl/t/rpl_row_func001.test: Rename: mysql-test/t/rpl_row_func001.test -> mysql-test/suite/rpl/t/rpl_row_func001.test mysql-test/suite/rpl/t/rpl_row_func003-slave.opt: Rename: mysql-test/t/rpl_row_func003-slave.opt -> mysql-test/suite/rpl/t/rpl_row_func003-slave.opt mysql-test/suite/rpl/t/rpl_row_until.test: Rename: mysql-test/t/rpl_row_until.test -> mysql-test/suite/rpl/t/rpl_row_until.test mysql-test/suite/rpl/t/rpl_set_charset.test: Rename: mysql-test/t/rpl_set_charset.test -> mysql-test/suite/rpl/t/rpl_set_charset.test mysql-test/suite/rpl/t/rpl_skip_error-slave.opt: Rename: mysql-test/t/rpl_skip_error-slave.opt -> mysql-test/suite/rpl/t/rpl_skip_error-slave.opt mysql-test/suite/rpl/t/rpl_slave_status.test: Rename: mysql-test/t/rpl_slave_status.test -> mysql-test/suite/rpl/t/rpl_slave_status.test mysql-test/suite/rpl/t/rpl_sp-master.opt: Rename: mysql-test/t/rpl_sp-master.opt -> mysql-test/suite/rpl/t/rpl_sp-master.opt mysql-test/suite/rpl/t/rpl_sp004.test: Rename: mysql-test/t/rpl_sp004.test -> mysql-test/suite/rpl/t/rpl_sp004.test mysql-test/suite/rpl/t/rpl_start_stop_slave.test: Rename: mysql-test/t/rpl_start_stop_slave.test -> mysql-test/suite/rpl/t/rpl_start_stop_slave.test mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test: Rename: mysql-test/t/rpl_stm_flsh_tbls.test -> mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test mysql-test/suite/rpl/t/rpl_stm_log.test: Rename: mysql-test/t/rpl_stm_log.test -> mysql-test/suite/rpl/t/rpl_stm_log.test mysql-test/suite/rpl/t/rpl_truncate_2myisam.test: Rename: mysql-test/t/rpl_truncate_2myisam.test -> mysql-test/suite/rpl/t/rpl_truncate_2myisam.test mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result: Rename: mysql-test/r/rpl_ndb_UUID.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result: Rename: mysql-test/r/rpl_ndb_insert_ignore.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test: Rename: mysql-test/t/rpl_ndb_circular.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test: Rename: mysql-test/t/rpl_ndb_commit_afterflush.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test: Rename: mysql-test/t/rpl_ndb_relayrotate.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt: Rename: mysql-test/t/rpl_ndb_rep_ignore-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result: Rename: mysql-test/r/binlog_stm_ctype_ucs.result -> mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test: Rename: mysql-test/t/binlog_stm_drop_tmp_tbl.test -> mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test mysql-test/suite/binlog/t/binlog_stm_innodb_stat-master.opt: Rename: mysql-test/t/binlog_stm_innodb_stat-master.opt -> mysql-test/suite/binlog/t/binlog_stm_innodb_stat-master.opt mysql-test/suite/ndb/r/loaddata_autocom_ndb.result: Rename: mysql-test/r/loaddata_autocom_ndb.result -> mysql-test/suite/ndb/r/loaddata_autocom_ndb.result mysql-test/suite/ndb/r/ndb_autodiscover3.result: Rename: mysql-test/r/ndb_autodiscover3.result -> mysql-test/suite/ndb/r/ndb_autodiscover3.result mysql-test/suite/ndb/r/ndb_binlog_basic2.result: Rename: mysql-test/r/ndb_binlog_basic2.result -> mysql-test/suite/ndb/r/ndb_binlog_basic2.result mysql-test/suite/ndb/r/ndb_blob_partition.result: Rename: mysql-test/r/ndb_blob_partition.result -> mysql-test/suite/ndb/r/ndb_blob_partition.result mysql-test/suite/ndb/r/ndb_insert.result: Rename: mysql-test/r/ndb_insert.result -> mysql-test/suite/ndb/r/ndb_insert.result mysql-test/suite/ndb/r/ndb_partition_error2.result: Rename: mysql-test/r/ndb_partition_error2.result -> mysql-test/suite/ndb/r/ndb_partition_error2.result mysql-test/suite/ndb/r/ndb_partition_list.result: Rename: mysql-test/r/ndb_partition_list.result -> mysql-test/suite/ndb/r/ndb_partition_list.result mysql-test/suite/ndb/r/ndb_restore_print.result: Rename: mysql-test/r/ndb_restore_print.result -> mysql-test/suite/ndb/r/ndb_restore_print.result mysql-test/suite/ndb/r/ndb_transaction.result: Rename: mysql-test/r/ndb_transaction.result -> mysql-test/suite/ndb/r/ndb_transaction.result mysql-test/suite/ndb/r/partition_03ndb.result: Rename: mysql-test/r/partition_03ndb.result -> mysql-test/suite/ndb/r/partition_03ndb.result mysql-test/suite/ndb/t/loaddata_autocom_ndb.test: Rename: mysql-test/t/loaddata_autocom_ndb.test -> mysql-test/suite/ndb/t/loaddata_autocom_ndb.test mysql-test/suite/ndb/t/ndb_autodiscover3.test: Rename: mysql-test/t/ndb_autodiscover3.test -> mysql-test/suite/ndb/t/ndb_autodiscover3.test mysql-test/suite/ndb/t/ndb_config2.test: Rename: mysql-test/t/ndb_config2.test -> mysql-test/suite/ndb/t/ndb_config2.test mysql-test/suite/ndb/t/ndb_cursor.test: Rename: mysql-test/t/ndb_cursor.test -> mysql-test/suite/ndb/t/ndb_cursor.test mysql-test/suite/ndb/t/ndb_database.test: Rename: mysql-test/t/ndb_database.test -> mysql-test/suite/ndb/t/ndb_database.test mysql-test/suite/ndb/t/ndb_index_ordered.test: Rename: mysql-test/t/ndb_index_ordered.test -> mysql-test/suite/ndb/t/ndb_index_ordered.test mysql-test/suite/ndb/t/ndb_restore_partition-master.opt: Rename: mysql-test/t/ndb_restore_partition-master.opt -> mysql-test/suite/ndb/t/ndb_restore_partition-master.opt mysql-test/suite/rpl/r/rpl_000015.result: Rename: mysql-test/r/rpl_000015.result -> mysql-test/suite/rpl/r/rpl_000015.result mysql-test/suite/rpl/r/rpl_bit_npk.result: Rename: mysql-test/r/rpl_bit_npk.result -> mysql-test/suite/rpl/r/rpl_bit_npk.result mysql-test/suite/rpl/r/rpl_critical_errors.result: Rename: mysql-test/r/rpl_critical_errors.result -> mysql-test/suite/rpl/r/rpl_critical_errors.result mysql-test/suite/rpl/r/rpl_delete_no_where.result: Rename: mysql-test/r/rpl_delete_no_where.result -> mysql-test/suite/rpl/r/rpl_delete_no_where.result mysql-test/suite/rpl/r/rpl_do_grant.result: Rename: mysql-test/r/rpl_do_grant.result -> mysql-test/suite/rpl/r/rpl_do_grant.result mysql-test/suite/rpl/r/rpl_events.result: Rename: mysql-test/r/rpl_events.result -> mysql-test/suite/rpl/r/rpl_events.result mysql-test/suite/rpl/r/rpl_get_lock.result: Rename: mysql-test/r/rpl_get_lock.result -> mysql-test/suite/rpl/r/rpl_get_lock.result mysql-test/suite/rpl/r/rpl_incident.result: Rename: mysql-test/r/rpl_incident.result -> mysql-test/suite/rpl/r/rpl_incident.result mysql-test/suite/rpl/r/rpl_init_slave.result: Rename: mysql-test/r/rpl_init_slave.result -> mysql-test/suite/rpl/r/rpl_init_slave.result mysql-test/suite/rpl/r/rpl_insert.result: Rename: mysql-test/r/rpl_insert.result -> mysql-test/suite/rpl/r/rpl_insert.result mysql-test/suite/rpl/r/rpl_insert_id.result: Rename: mysql-test/r/rpl_insert_id.result -> mysql-test/suite/rpl/r/rpl_insert_id.result mysql-test/suite/rpl/r/rpl_loaddata_s.result: Rename: mysql-test/r/rpl_loaddata_s.result -> mysql-test/suite/rpl/r/rpl_loaddata_s.result mysql-test/suite/rpl/r/rpl_multi_update4.result: Rename: mysql-test/r/rpl_multi_update4.result -> mysql-test/suite/rpl/r/rpl_multi_update4.result mysql-test/suite/rpl/r/rpl_optimize.result: Rename: mysql-test/r/rpl_optimize.result -> mysql-test/suite/rpl/r/rpl_optimize.result mysql-test/suite/rpl/r/rpl_row_blob_innodb.result: Rename: mysql-test/r/rpl_row_blob_innodb.result -> mysql-test/suite/rpl/r/rpl_row_blob_innodb.result mysql-test/suite/rpl/r/rpl_row_charset.result: Rename: mysql-test/r/rpl_row_charset.result -> mysql-test/suite/rpl/r/rpl_row_charset.result mysql-test/suite/rpl/r/rpl_row_drop.result: Rename: mysql-test/r/rpl_row_drop.result -> mysql-test/suite/rpl/r/rpl_row_drop.result mysql-test/suite/rpl/r/rpl_row_sp001.result: Rename: mysql-test/r/rpl_row_sp001.result -> mysql-test/suite/rpl/r/rpl_row_sp001.result mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result: Rename: mysql-test/r/rpl_row_sp006_InnoDB.result -> mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result mysql-test/suite/rpl/r/rpl_row_sp012.result: Rename: mysql-test/r/rpl_row_sp012.result -> mysql-test/suite/rpl/r/rpl_row_sp012.result mysql-test/suite/rpl/r/rpl_row_stop_middle.result: Rename: mysql-test/r/rpl_row_stop_middle.result -> mysql-test/suite/rpl/r/rpl_row_stop_middle.result mysql-test/suite/rpl/r/rpl_sp_effects.result: Rename: mysql-test/r/rpl_sp_effects.result -> mysql-test/suite/rpl/r/rpl_sp_effects.result mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result: Rename: mysql-test/r/rpl_stm_flsh_tbls.result -> mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result mysql-test/suite/rpl/r/rpl_stm_mystery22.result: Rename: mysql-test/r/rpl_stm_mystery22.result -> mysql-test/suite/rpl/r/rpl_stm_mystery22.result mysql-test/suite/rpl/t/rpl000010.test: Rename: mysql-test/t/rpl000010.test -> mysql-test/suite/rpl/t/rpl000010.test mysql-test/suite/rpl/t/rpl000017.test: Rename: mysql-test/t/rpl000017.test -> mysql-test/suite/rpl/t/rpl000017.test mysql-test/suite/rpl/t/rpl_000015.slave-mi: Rename: mysql-test/t/rpl_000015.slave-mi -> mysql-test/suite/rpl/t/rpl_000015.slave-mi mysql-test/suite/rpl/t/rpl_EE_err.test: Rename: mysql-test/t/rpl_EE_err.test -> mysql-test/suite/rpl/t/rpl_EE_err.test mysql-test/suite/rpl/t/rpl_LD_INFILE.test: Rename: mysql-test/t/rpl_LD_INFILE.test -> mysql-test/suite/rpl/t/rpl_LD_INFILE.test mysql-test/suite/rpl/t/rpl_charset_sjis.test: Rename: mysql-test/t/rpl_charset_sjis.test -> mysql-test/suite/rpl/t/rpl_charset_sjis.test mysql-test/suite/rpl/t/rpl_create_database-slave.opt: Rename: mysql-test/t/rpl_create_database-slave.opt -> mysql-test/suite/rpl/t/rpl_create_database-slave.opt mysql-test/suite/rpl/t/rpl_err_ignoredtable.test: Rename: mysql-test/t/rpl_err_ignoredtable.test -> mysql-test/suite/rpl/t/rpl_err_ignoredtable.test mysql-test/suite/rpl/t/rpl_extraCol_innodb-master.opt: Rename: mysql-test/t/rpl_extraCol_innodb-master.opt -> mysql-test/suite/rpl/t/rpl_extraCol_innodb-master.opt mysql-test/suite/rpl/t/rpl_extraCol_myisam.test: Rename: mysql-test/t/rpl_extraCol_myisam.test -> mysql-test/suite/rpl/t/rpl_extraCol_myisam.test mysql-test/suite/rpl/t/rpl_failed_optimize.test: Rename: mysql-test/t/rpl_failed_optimize.test -> mysql-test/suite/rpl/t/rpl_failed_optimize.test mysql-test/suite/rpl/t/rpl_foreign_key_innodb-slave.opt: Rename: mysql-test/t/rpl_foreign_key_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_foreign_key_innodb-slave.opt mysql-test/suite/rpl/t/rpl_insert_id-slave.opt: Rename: mysql-test/t/rpl_insert_id-slave.opt -> mysql-test/suite/rpl/t/rpl_insert_id-slave.opt mysql-test/suite/rpl/t/rpl_load_table_from_master.test: Rename: mysql-test/t/rpl_load_table_from_master.test -> mysql-test/suite/rpl/t/rpl_load_table_from_master.test mysql-test/suite/rpl/t/rpl_loaddata.test: Rename: mysql-test/t/rpl_loaddata.test -> mysql-test/suite/rpl/t/rpl_loaddata.test mysql-test/suite/rpl/t/rpl_loaddata_s.test: Rename: mysql-test/t/rpl_loaddata_s.test -> mysql-test/suite/rpl/t/rpl_loaddata_s.test mysql-test/suite/rpl/t/rpl_master_pos_wait.test: Rename: mysql-test/t/rpl_master_pos_wait.test -> mysql-test/suite/rpl/t/rpl_master_pos_wait.test mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh: Rename: mysql-test/t/rpl_misc_functions-slave.sh -> mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh mysql-test/suite/rpl/t/rpl_multi_update2.test: Rename: mysql-test/t/rpl_multi_update2.test -> mysql-test/suite/rpl/t/rpl_multi_update2.test mysql-test/suite/rpl/t/rpl_packet.test: Rename: mysql-test/t/rpl_packet.test -> mysql-test/suite/rpl/t/rpl_packet.test mysql-test/suite/rpl/t/rpl_relay_space_innodb-master.opt: Rename: mysql-test/t/rpl_relay_space_innodb-master.opt -> mysql-test/suite/rpl/t/rpl_relay_space_innodb-master.opt mysql-test/suite/rpl/t/rpl_row_basic_11bugs-slave.opt: Rename: mysql-test/t/rpl_row_basic_11bugs-slave.opt -> mysql-test/suite/rpl/t/rpl_row_basic_11bugs-slave.opt mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt: Rename: mysql-test/t/rpl_row_inexist_tbl-slave.opt -> mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt mysql-test/suite/rpl/t/rpl_row_insert_delayed.test: Rename: mysql-test/t/rpl_row_insert_delayed.test -> mysql-test/suite/rpl/t/rpl_row_insert_delayed.test mysql-test/suite/rpl/t/rpl_row_log_innodb-slave.opt: Rename: mysql-test/t/rpl_row_log_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_log_innodb-slave.opt mysql-test/suite/rpl/t/rpl_row_max_relay_size.test: Rename: mysql-test/t/rpl_row_max_relay_size.test -> mysql-test/suite/rpl/t/rpl_row_max_relay_size.test mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test: Rename: mysql-test/t/rpl_row_sp002_innodb.test -> mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test mysql-test/suite/rpl/t/rpl_row_sp003-slave.opt: Rename: mysql-test/t/rpl_row_sp003-slave.opt -> mysql-test/suite/rpl/t/rpl_row_sp003-slave.opt mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB-slave.opt: Rename: mysql-test/t/rpl_row_sp006_InnoDB-slave.opt -> mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB-slave.opt mysql-test/suite/rpl/t/rpl_row_sp012.test: Rename: mysql-test/t/rpl_row_sp012.test -> mysql-test/suite/rpl/t/rpl_row_sp012.test mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test: Rename: mysql-test/t/rpl_row_stop_middle_update.test -> mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test: Rename: mysql-test/t/rpl_row_tabledefs_2myisam.test -> mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test mysql-test/suite/rpl/t/rpl_row_trig003.test: Rename: mysql-test/t/rpl_row_trig003.test -> mysql-test/suite/rpl/t/rpl_row_trig003.test mysql-test/suite/rpl/t/rpl_server_id2.test: Rename: mysql-test/t/rpl_server_id2.test -> mysql-test/suite/rpl/t/rpl_server_id2.test mysql-test/suite/rpl/t/rpl_sporadic_master.test: Rename: mysql-test/t/rpl_sporadic_master.test -> mysql-test/suite/rpl/t/rpl_sporadic_master.test mysql-test/suite/rpl/t/rpl_stm_000001.test: Rename: mysql-test/t/rpl_stm_000001.test -> mysql-test/suite/rpl/t/rpl_stm_000001.test mysql-test/suite/rpl/t/rpl_stm_reset_slave.test: Rename: mysql-test/t/rpl_stm_reset_slave.test -> mysql-test/suite/rpl/t/rpl_stm_reset_slave.test mysql-test/suite/rpl/t/rpl_temp_table.test: Rename: mysql-test/t/rpl_temp_table.test -> mysql-test/suite/rpl/t/rpl_temp_table.test mysql-test/suite/rpl/t/rpl_timezone-slave.opt: Rename: mysql-test/t/rpl_timezone-slave.opt -> mysql-test/suite/rpl/t/rpl_timezone-slave.opt mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result: Rename: mysql-test/r/rpl_ndb_2innodb.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result: Rename: mysql-test/r/rpl_ndb_circular.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result: Rename: mysql-test/r/rpl_ndb_innodb_trans.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test: Rename: mysql-test/t/rpl_ndb_blob2.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt: Rename: mysql-test/t/rpl_ndb_do_table-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test: Rename: mysql-test/t/rpl_ndb_innodb2ndb.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test: Rename: mysql-test/t/rpl_ndb_insert_ignore.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test: Rename: mysql-test/t/rpl_ndb_multi_update3.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test: Rename: mysql-test/t/rpl_ndb_myisam2ndb.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result: Rename: mysql-test/r/binlog_stm_drop_tmp_tbl.result -> mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result: Rename: mysql-test/r/binlog_stm_innodb_stat.result -> mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result mysql-test/suite/binlog/t/binlog_stm_blackhole.test: Rename: mysql-test/t/binlog_stm_blackhole.test -> mysql-test/suite/binlog/t/binlog_stm_blackhole.test mysql-test/suite/binlog/t/binlog_stm_insert_select.test: Rename: mysql-test/t/binlog_stm_insert_select.test -> mysql-test/suite/binlog/t/binlog_stm_insert_select.test mysql-test/suite/ndb/r/ndb_binlog_discover.result: Rename: mysql-test/r/ndb_binlog_discover.result -> mysql-test/suite/ndb/r/ndb_binlog_discover.result mysql-test/suite/ndb/r/ndb_bitfield.result: Rename: mysql-test/r/ndb_bitfield.result -> mysql-test/suite/ndb/r/ndb_bitfield.result mysql-test/suite/ndb/r/ndb_minmax.result: Rename: mysql-test/r/ndb_minmax.result -> mysql-test/suite/ndb/r/ndb_minmax.result mysql-test/suite/ndb/r/ndb_single_user.result: Rename: mysql-test/r/ndb_single_user.result -> mysql-test/suite/ndb/r/ndb_single_user.result mysql-test/suite/ndb/r/ndb_subquery.result: Rename: mysql-test/r/ndb_subquery.result -> mysql-test/suite/ndb/r/ndb_subquery.result mysql-test/suite/ndb/t/ndb_binlog_log_bin.test: Rename: mysql-test/t/ndb_binlog_log_bin.test -> mysql-test/suite/ndb/t/ndb_binlog_log_bin.test mysql-test/suite/ndb/t/ndb_config.test: Rename: mysql-test/t/ndb_config.test -> mysql-test/suite/ndb/t/ndb_config.test mysql-test/suite/ndb/t/ndb_replace.test: Rename: mysql-test/t/ndb_replace.test -> mysql-test/suite/ndb/t/ndb_replace.test mysql-test/suite/ndb/t/ndb_transaction.test: Rename: mysql-test/t/ndb_transaction.test -> mysql-test/suite/ndb/t/ndb_transaction.test mysql-test/suite/ndb/t/ndb_trigger.test: Rename: mysql-test/t/ndb_trigger.test -> mysql-test/suite/ndb/t/ndb_trigger.test mysql-test/suite/ndb/t/ndb_view.test: Rename: mysql-test/t/ndb_view.test -> mysql-test/suite/ndb/t/ndb_view.test mysql-test/suite/rpl/r/rpl000011.result: Rename: mysql-test/r/rpl000011.result -> mysql-test/suite/rpl/r/rpl000011.result mysql-test/suite/rpl/r/rpl_free_items.result: Rename: mysql-test/r/rpl_free_items.result -> mysql-test/suite/rpl/r/rpl_free_items.result mysql-test/suite/rpl/r/rpl_ignore_revoke.result: Rename: mysql-test/r/rpl_ignore_revoke.result -> mysql-test/suite/rpl/r/rpl_ignore_revoke.result mysql-test/suite/rpl/r/rpl_innodb.result: Rename: mysql-test/r/rpl_innodb.result -> mysql-test/suite/rpl/r/rpl_innodb.result mysql-test/suite/rpl/r/rpl_loadfile.result: Rename: mysql-test/r/rpl_loadfile.result -> mysql-test/suite/rpl/r/rpl_loadfile.result mysql-test/suite/rpl/r/rpl_multi_update.result: Rename: mysql-test/r/rpl_multi_update.result -> mysql-test/suite/rpl/r/rpl_multi_update.result mysql-test/suite/rpl/r/rpl_ps.result: Rename: mysql-test/r/rpl_ps.result -> mysql-test/suite/rpl/r/rpl_ps.result mysql-test/suite/rpl/r/rpl_read_only.result: Rename: mysql-test/r/rpl_read_only.result -> mysql-test/suite/rpl/r/rpl_read_only.result mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result: Rename: mysql-test/r/rpl_replicate_ignore_db.result -> mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result mysql-test/suite/rpl/r/rpl_row_4_bytes.result: Rename: mysql-test/r/rpl_row_4_bytes.result -> mysql-test/suite/rpl/r/rpl_row_4_bytes.result mysql-test/suite/rpl/r/rpl_row_USER.result: Rename: mysql-test/r/rpl_row_USER.result -> mysql-test/suite/rpl/r/rpl_row_USER.result mysql-test/suite/rpl/r/rpl_row_UUID.result: Rename: mysql-test/r/rpl_row_UUID.result -> mysql-test/suite/rpl/r/rpl_row_UUID.result mysql-test/suite/rpl/r/rpl_row_blob_myisam.result: Rename: mysql-test/r/rpl_row_blob_myisam.result -> mysql-test/suite/rpl/r/rpl_row_blob_myisam.result mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result: Rename: mysql-test/r/rpl_row_err_ignoredtable.result -> mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result: Rename: mysql-test/r/rpl_row_sp002_innodb.result -> mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result: Rename: mysql-test/r/rpl_row_sp007_innodb.result -> mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result mysql-test/suite/rpl/r/rpl_ssl1.result: Rename: mysql-test/r/rpl_ssl1.result -> mysql-test/suite/rpl/r/rpl_ssl1.result mysql-test/suite/rpl/r/rpl_stm_000001.result: Rename: mysql-test/r/rpl_stm_000001.result -> mysql-test/suite/rpl/r/rpl_stm_000001.result mysql-test/suite/rpl/r/rpl_truncate_2myisam.result: Rename: mysql-test/r/rpl_truncate_2myisam.result -> mysql-test/suite/rpl/r/rpl_truncate_2myisam.result mysql-test/suite/rpl/t/rpl000018-master.opt: Rename: mysql-test/t/rpl000018-master.opt -> mysql-test/suite/rpl/t/rpl000018-master.opt mysql-test/suite/rpl/t/rpl_000015.test: Rename: mysql-test/t/rpl_000015.test -> mysql-test/suite/rpl/t/rpl_000015.test mysql-test/suite/rpl/t/rpl_drop_temp.test: Rename: mysql-test/t/rpl_drop_temp.test -> mysql-test/suite/rpl/t/rpl_drop_temp.test mysql-test/suite/rpl/t/rpl_err_ignoredtable-slave.opt: Rename: mysql-test/t/rpl_err_ignoredtable-slave.opt -> mysql-test/suite/rpl/t/rpl_err_ignoredtable-slave.opt mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt: Rename: mysql-test/t/rpl_failed_optimize-master.opt -> mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test: Rename: mysql-test/t/rpl_foreign_key_innodb.test -> mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test mysql-test/suite/rpl/t/rpl_ignore_table.test: Rename: mysql-test/t/rpl_ignore_table.test -> mysql-test/suite/rpl/t/rpl_ignore_table.test mysql-test/suite/rpl/t/rpl_ignore_table_update-slave.opt: Rename: mysql-test/t/rpl_ignore_table_update-slave.opt -> mysql-test/suite/rpl/t/rpl_ignore_table_update-slave.opt mysql-test/suite/rpl/t/rpl_incident-master.opt: Rename: mysql-test/t/rpl_incident-master.opt -> mysql-test/suite/rpl/t/rpl_incident-master.opt mysql-test/suite/rpl/t/rpl_insert_id_pk-slave.opt: Rename: mysql-test/t/rpl_insert_id_pk-slave.opt -> mysql-test/suite/rpl/t/rpl_insert_id_pk-slave.opt mysql-test/suite/rpl/t/rpl_loaddata_m-master.opt: Rename: mysql-test/t/rpl_loaddata_m-master.opt -> mysql-test/suite/rpl/t/rpl_loaddata_m-master.opt mysql-test/suite/rpl/t/rpl_loaddatalocal.test: Rename: mysql-test/t/rpl_loaddatalocal.test -> mysql-test/suite/rpl/t/rpl_loaddatalocal.test mysql-test/suite/rpl/t/rpl_misc_functions.test: Rename: mysql-test/t/rpl_misc_functions.test -> mysql-test/suite/rpl/t/rpl_misc_functions.test mysql-test/suite/rpl/t/rpl_multi_update.test: Rename: mysql-test/t/rpl_multi_update.test -> mysql-test/suite/rpl/t/rpl_multi_update.test mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test: Rename: mysql-test/t/rpl_row_basic_11bugs.test -> mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test mysql-test/suite/rpl/t/rpl_row_blob_innodb-slave.opt: Rename: mysql-test/t/rpl_row_blob_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_blob_innodb-slave.opt mysql-test/suite/rpl/t/rpl_row_log-master.opt: Rename: mysql-test/t/rpl_row_log-master.opt -> mysql-test/suite/rpl/t/rpl_row_log-master.opt mysql-test/suite/rpl/t/rpl_row_sp001.test: Rename: mysql-test/t/rpl_row_sp001.test -> mysql-test/suite/rpl/t/rpl_row_sp001.test mysql-test/suite/rpl/t/rpl_row_sp002_innodb-master.opt: Rename: mysql-test/t/rpl_row_sp002_innodb-master.opt -> mysql-test/suite/rpl/t/rpl_row_sp002_innodb-master.opt mysql-test/suite/rpl/t/rpl_row_sp008.test: Rename: mysql-test/t/rpl_row_sp008.test -> mysql-test/suite/rpl/t/rpl_row_sp008.test mysql-test/suite/rpl/t/rpl_sp-slave.opt: Rename: mysql-test/t/rpl_sp-slave.opt -> mysql-test/suite/rpl/t/rpl_sp-slave.opt mysql-test/suite/rpl/t/rpl_stm_000001-slave.opt: Rename: mysql-test/t/rpl_stm_000001-slave.opt -> mysql-test/suite/rpl/t/rpl_stm_000001-slave.opt mysql-test/suite/rpl/t/rpl_timezone.test: Rename: mysql-test/t/rpl_timezone.test -> mysql-test/suite/rpl/t/rpl_timezone.test mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result: Rename: mysql-test/r/rpl_ndb_2myisam.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result: Rename: mysql-test/r/rpl_ndb_basic.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result: Rename: mysql-test/r/rpl_ndb_extraCol.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result: Rename: mysql-test/r/rpl_ndb_idempotent.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result: Rename: mysql-test/r/rpl_ndb_log.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result: Rename: mysql-test/r/rpl_ndb_row_001.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result: Rename: mysql-test/r/rpl_ndb_stm_innodb.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt: Rename: mysql-test/t/rpl_ndb_2innodb-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test: Rename: mysql-test/t/rpl_ndb_blob.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test: Rename: mysql-test/t/rpl_ndb_dd_advance.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt: Rename: mysql-test/t/rpl_ndb_innodb_trans-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt: Rename: mysql-test/t/rpl_ndb_myisam2ndb-slave.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test: Rename: mysql-test/t/rpl_ndb_rep_ignore.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test: Rename: mysql-test/t/rpl_ndb_stm_innodb.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test: Rename: mysql-test/t/rpl_ndbapi_multi.test -> mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test mysql-test/suite/binlog/r/binlog_killed.result: Rename: mysql-test/r/binlog_killed.result -> mysql-test/suite/binlog/r/binlog_killed.result mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result: Rename: mysql-test/r/binlog_row_ctype_ucs.result -> mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result mysql-test/suite/binlog/r/binlog_stm_binlog.result: Rename: mysql-test/r/binlog_stm_binlog.result -> mysql-test/suite/binlog/r/binlog_stm_binlog.result mysql-test/suite/binlog/t/binlog_row_ctype_ucs.test: Rename: mysql-test/t/binlog_row_ctype_ucs.test -> mysql-test/suite/binlog/t/binlog_row_ctype_ucs.test mysql-test/suite/binlog/t/binlog_stm_innodb_stat.test: Rename: mysql-test/t/binlog_stm_innodb_stat.test -> mysql-test/suite/binlog/t/binlog_stm_innodb_stat.test mysql-test/suite/binlog/t/binlog_stm_ps.test: Rename: mysql-test/t/binlog_stm_ps.test -> mysql-test/suite/binlog/t/binlog_stm_ps.test mysql-test/suite/ndb/r/ndb_cache.result: Rename: mysql-test/r/ndb_cache.result -> mysql-test/suite/ndb/r/ndb_cache.result mysql-test/suite/ndb/r/ndb_charset.result: Rename: mysql-test/r/ndb_charset.result -> mysql-test/suite/ndb/r/ndb_charset.result mysql-test/suite/ndb/r/ndb_config.result: Rename: mysql-test/r/ndb_config.result -> mysql-test/suite/ndb/r/ndb_config.result mysql-test/suite/ndb/r/ndb_dd_disk2memory.result: Rename: mysql-test/r/ndb_dd_disk2memory.result -> mysql-test/suite/ndb/r/ndb_dd_disk2memory.result mysql-test/suite/ndb/r/ndb_index.result: Rename: mysql-test/r/ndb_index.result -> mysql-test/suite/ndb/r/ndb_index.result mysql-test/suite/ndb/r/ndb_partition_key.result: Rename: mysql-test/r/ndb_partition_key.result -> mysql-test/suite/ndb/r/ndb_partition_key.result mysql-test/suite/ndb/r/strict_autoinc_5ndb.result: Rename: mysql-test/r/strict_autoinc_5ndb.result -> mysql-test/suite/ndb/r/strict_autoinc_5ndb.result mysql-test/suite/ndb/t/ndb_backup_print.test: Rename: mysql-test/t/ndb_backup_print.test -> mysql-test/suite/ndb/t/ndb_backup_print.test mysql-test/suite/ndb/t/ndb_binlog_basic2.test: Rename: mysql-test/t/ndb_binlog_basic2.test -> mysql-test/suite/ndb/t/ndb_binlog_basic2.test mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test: Rename: mysql-test/t/ndb_binlog_ignore_db.test -> mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test mysql-test/suite/ndb/t/ndb_insert.test: Rename: mysql-test/t/ndb_insert.test -> mysql-test/suite/ndb/t/ndb_insert.test mysql-test/suite/ndb/t/ndb_load.test: Rename: mysql-test/t/ndb_load.test -> mysql-test/suite/ndb/t/ndb_load.test mysql-test/suite/ndb/t/ndb_multi.test: Rename: mysql-test/t/ndb_multi.test -> mysql-test/suite/ndb/t/ndb_multi.test mysql-test/suite/ndb/t/ndb_partition_error.test: Rename: mysql-test/t/ndb_partition_error.test -> mysql-test/suite/ndb/t/ndb_partition_error.test mysql-test/suite/ndb/t/ndb_partition_error2.test: Rename: mysql-test/t/ndb_partition_error2.test -> mysql-test/suite/ndb/t/ndb_partition_error2.test mysql-test/suite/ndb/t/ndb_partition_key.test: Rename: mysql-test/t/ndb_partition_key.test -> mysql-test/suite/ndb/t/ndb_partition_key.test mysql-test/suite/ndb/t/ndb_rename.test: Rename: mysql-test/t/ndb_rename.test -> mysql-test/suite/ndb/t/ndb_rename.test mysql-test/suite/ndb/t/ndb_single_user.test: Rename: mysql-test/t/ndb_single_user.test -> mysql-test/suite/ndb/t/ndb_single_user.test mysql-test/suite/rpl/r/rpl000010.result: Rename: mysql-test/r/rpl000010.result -> mysql-test/suite/rpl/r/rpl000010.result mysql-test/suite/rpl/r/rpl_EE_err.result: Rename: mysql-test/r/rpl_EE_err.result -> mysql-test/suite/rpl/r/rpl_EE_err.result mysql-test/suite/rpl/r/rpl_ddl.result: Rename: mysql-test/r/rpl_ddl.result -> mysql-test/suite/rpl/r/rpl_ddl.result mysql-test/suite/rpl/r/rpl_deadlock_innodb.result: Rename: mysql-test/r/rpl_deadlock_innodb.result -> mysql-test/suite/rpl/r/rpl_deadlock_innodb.result mysql-test/suite/rpl/r/rpl_drop.result: Rename: mysql-test/r/rpl_drop.result -> mysql-test/suite/rpl/r/rpl_drop.result mysql-test/suite/rpl/r/rpl_drop_temp.result: Rename: mysql-test/r/rpl_drop_temp.result -> mysql-test/suite/rpl/r/rpl_drop_temp.result mysql-test/suite/rpl/r/rpl_many_optimize.result: Rename: mysql-test/r/rpl_many_optimize.result -> mysql-test/suite/rpl/r/rpl_many_optimize.result mysql-test/suite/rpl/r/rpl_multi_engine.result: Rename: mysql-test/r/rpl_multi_engine.result -> mysql-test/suite/rpl/r/rpl_multi_engine.result mysql-test/suite/rpl/r/rpl_packet.result: Rename: mysql-test/r/rpl_packet.result -> mysql-test/suite/rpl/r/rpl_packet.result mysql-test/suite/rpl/r/rpl_relayrotate.result: Rename: mysql-test/r/rpl_relayrotate.result -> mysql-test/suite/rpl/r/rpl_relayrotate.result mysql-test/suite/rpl/r/rpl_row_basic_8partition.result: Rename: mysql-test/r/rpl_row_basic_8partition.result -> mysql-test/suite/rpl/r/rpl_row_basic_8partition.result mysql-test/suite/rpl/r/rpl_row_log.result: Rename: mysql-test/r/rpl_row_log.result -> mysql-test/suite/rpl/r/rpl_row_log.result mysql-test/suite/rpl/r/rpl_row_sp003.result: Rename: mysql-test/r/rpl_row_sp003.result -> mysql-test/suite/rpl/r/rpl_row_sp003.result mysql-test/suite/rpl/r/rpl_row_view01.result: Rename: mysql-test/r/rpl_row_view01.result -> mysql-test/suite/rpl/r/rpl_row_view01.result mysql-test/suite/rpl/r/rpl_session_var.result: Rename: mysql-test/r/rpl_session_var.result -> mysql-test/suite/rpl/r/rpl_session_var.result mysql-test/suite/rpl/r/rpl_sporadic_master.result: Rename: mysql-test/r/rpl_sporadic_master.result -> mysql-test/suite/rpl/r/rpl_sporadic_master.result mysql-test/suite/rpl/r/rpl_udf.result: Rename: mysql-test/r/rpl_udf.result -> mysql-test/suite/rpl/r/rpl_udf.result mysql-test/suite/rpl/r/rpl_variables.result: Rename: mysql-test/r/rpl_variables.result -> mysql-test/suite/rpl/r/rpl_variables.result mysql-test/suite/rpl/t/rpl_auto_increment-slave.opt: Rename: mysql-test/t/rpl_auto_increment-slave.opt -> mysql-test/suite/rpl/t/rpl_auto_increment-slave.opt mysql-test/suite/rpl/t/rpl_auto_increment.test: Rename: mysql-test/t/rpl_auto_increment.test -> mysql-test/suite/rpl/t/rpl_auto_increment.test mysql-test/suite/rpl/t/rpl_bit.test: Rename: mysql-test/t/rpl_bit.test -> mysql-test/suite/rpl/t/rpl_bit.test mysql-test/suite/rpl/t/rpl_critical_errors.test: Rename: mysql-test/t/rpl_critical_errors.test -> mysql-test/suite/rpl/t/rpl_critical_errors.test mysql-test/suite/rpl/t/rpl_ddl.test: Rename: mysql-test/t/rpl_ddl.test -> mysql-test/suite/rpl/t/rpl_ddl.test mysql-test/suite/rpl/t/rpl_do_grant.test: Rename: mysql-test/t/rpl_do_grant.test -> mysql-test/suite/rpl/t/rpl_do_grant.test mysql-test/suite/rpl/t/rpl_extraCol_innodb-slave.opt: Rename: mysql-test/t/rpl_extraCol_innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_extraCol_innodb-slave.opt mysql-test/suite/rpl/t/rpl_ignore_revoke.test: Rename: mysql-test/t/rpl_ignore_revoke.test -> mysql-test/suite/rpl/t/rpl_ignore_revoke.test mysql-test/suite/rpl/t/rpl_init_slave-slave.opt: Rename: mysql-test/t/rpl_init_slave-slave.opt -> mysql-test/suite/rpl/t/rpl_init_slave-slave.opt mysql-test/suite/rpl/t/rpl_log_pos.test: Rename: mysql-test/t/rpl_log_pos.test -> mysql-test/suite/rpl/t/rpl_log_pos.test mysql-test/suite/rpl/t/rpl_multi_delete2-slave.opt: Rename: mysql-test/t/rpl_multi_delete2-slave.opt -> mysql-test/suite/rpl/t/rpl_multi_delete2-slave.opt mysql-test/suite/rpl/t/rpl_multi_update3.test: Rename: mysql-test/t/rpl_multi_update3.test -> mysql-test/suite/rpl/t/rpl_multi_update3.test mysql-test/suite/rpl/t/rpl_optimize.test: Rename: mysql-test/t/rpl_optimize.test -> mysql-test/suite/rpl/t/rpl_optimize.test mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test: Rename: mysql-test/t/rpl_rbr_to_sbr.test -> mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test mysql-test/suite/rpl/t/rpl_replicate_do-slave.opt: Rename: mysql-test/t/rpl_replicate_do-slave.opt -> mysql-test/suite/rpl/t/rpl_replicate_do-slave.opt mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt: Rename: mysql-test/t/rpl_rewrt_db-slave.opt -> mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh: Rename: mysql-test/t/rpl_rotate_logs-slave.sh -> mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh mysql-test/suite/rpl/t/rpl_row_UUID.test: Rename: mysql-test/t/rpl_row_UUID.test -> mysql-test/suite/rpl/t/rpl_row_UUID.test mysql-test/suite/rpl/t/rpl_row_blob_innodb.test: Rename: mysql-test/t/rpl_row_blob_innodb.test -> mysql-test/suite/rpl/t/rpl_row_blob_innodb.test mysql-test/suite/rpl/t/rpl_row_create_table.test: Rename: mysql-test/t/rpl_row_create_table.test -> mysql-test/suite/rpl/t/rpl_row_create_table.test mysql-test/suite/rpl/t/rpl_row_func002.test: Rename: mysql-test/t/rpl_row_func002.test -> mysql-test/suite/rpl/t/rpl_row_func002.test mysql-test/suite/rpl/t/rpl_row_log.test: Rename: mysql-test/t/rpl_row_log.test -> mysql-test/suite/rpl/t/rpl_row_log.test mysql-test/suite/rpl/t/rpl_row_log_innodb-master.opt: Rename: mysql-test/t/rpl_row_log_innodb-master.opt -> mysql-test/suite/rpl/t/rpl_row_log_innodb-master.opt mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Rename: mysql-test/t/rpl_row_mysqlbinlog.test -> mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test mysql-test/suite/rpl/t/rpl_row_sp005.test: Rename: mysql-test/t/rpl_row_sp005.test -> mysql-test/suite/rpl/t/rpl_row_sp005.test mysql-test/suite/rpl/t/rpl_server_id2-slave.opt: Rename: mysql-test/t/rpl_server_id2-slave.opt -> mysql-test/suite/rpl/t/rpl_server_id2-slave.opt mysql-test/suite/rpl/t/rpl_sp.test: Rename: mysql-test/t/rpl_sp.test -> mysql-test/suite/rpl/t/rpl_sp.test mysql-test/suite/rpl/t/rpl_ssl.test: Rename: mysql-test/t/rpl_ssl.test -> mysql-test/suite/rpl/t/rpl_ssl.test mysql-test/suite/rpl/t/rpl_stm_EE_err2.test: Rename: mysql-test/t/rpl_stm_EE_err2.test -> mysql-test/suite/rpl/t/rpl_stm_EE_err2.test mysql-test/suite/rpl/t/rpl_stm_multi_query.test: Rename: mysql-test/t/rpl_stm_multi_query.test -> mysql-test/suite/rpl/t/rpl_stm_multi_query.test mysql-test/suite/rpl/t/rpl_udf-master.opt: Rename: mysql-test/t/rpl_udf-master.opt -> mysql-test/suite/rpl/t/rpl_udf-master.opt mysql-test/suite/rpl/t/rpl_udf.test: Rename: mysql-test/t/rpl_udf.test -> mysql-test/suite/rpl/t/rpl_udf.test mysql-test/suite/rpl/t/rpl_user_variables.test: Rename: mysql-test/t/rpl_user_variables.test -> mysql-test/suite/rpl/t/rpl_user_variables.test mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result: Rename: mysql-test/r/rpl_ndb_dd_basic.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result: Rename: mysql-test/r/rpl_ndb_ddl.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result: Rename: mysql-test/r/rpl_ndb_do_table.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result: Rename: mysql-test/r/rpl_ndb_func003.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result: Rename: mysql-test/r/rpl_ndb_load.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result: Rename: mysql-test/r/rpl_ndb_multi_update2.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result: Rename: mysql-test/r/rpl_ndb_multi_update3.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result: Rename: mysql-test/r/rpl_row_basic_7ndb.result -> mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt: Rename: mysql-test/t/rpl_ndb_2myisam-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test: Rename: mysql-test/t/rpl_ndb_auto_inc.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test: Rename: mysql-test/t/rpl_ndb_basic.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test: Rename: mysql-test/t/rpl_ndb_dd_partitions.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test: Rename: mysql-test/t/rpl_ndb_log.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-master.opt: Rename: mysql-test/t/rpl_ndb_myisam2ndb-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-master.opt mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test: Rename: mysql-test/t/rpl_row_basic_7ndb.test -> mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result: Rename: mysql-test/r/binlog_row_drop_tmp_tbl.result -> mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result mysql-test/suite/binlog/r/binlog_row_innodb_stat.result: Rename: mysql-test/r/binlog_row_innodb_stat.result -> mysql-test/suite/binlog/r/binlog_row_innodb_stat.result mysql-test/suite/binlog/t/binlog_killed.test: Rename: mysql-test/t/binlog_killed.test -> mysql-test/suite/binlog/t/binlog_killed.test mysql-test/suite/binlog/t/binlog_row_ctype_cp932.test: Rename: mysql-test/t/binlog_row_ctype_cp932.test -> mysql-test/suite/binlog/t/binlog_row_ctype_cp932.test mysql-test/suite/binlog/t/binlog_row_insert_select.test: Rename: mysql-test/t/binlog_row_insert_select.test -> mysql-test/suite/binlog/t/binlog_row_insert_select.test mysql-test/suite/ndb/r/ndb_alter_table.result: Rename: mysql-test/r/ndb_alter_table.result -> mysql-test/suite/ndb/r/ndb_alter_table.result mysql-test/suite/ndb/r/ndb_binlog_multi.result: Rename: mysql-test/r/ndb_binlog_multi.result -> mysql-test/suite/ndb/r/ndb_binlog_multi.result mysql-test/suite/ndb/r/ndb_cache2.result: Rename: mysql-test/r/ndb_cache2.result -> mysql-test/suite/ndb/r/ndb_cache2.result mysql-test/suite/ndb/r/ndb_database.result: Rename: mysql-test/r/ndb_database.result -> mysql-test/suite/ndb/r/ndb_database.result mysql-test/suite/ndb/r/ndb_grant.result: Rename: mysql-test/r/ndb_grant.result -> mysql-test/suite/ndb/r/ndb_grant.result mysql-test/suite/ndb/r/ndb_restore.result: Rename: mysql-test/r/ndb_restore.result -> mysql-test/suite/ndb/r/ndb_restore.result mysql-test/suite/ndb/r/ndb_restore_partition.result: Rename: mysql-test/r/ndb_restore_partition.result -> mysql-test/suite/ndb/r/ndb_restore_partition.result mysql-test/suite/ndb/r/ndbapi.result: Rename: mysql-test/r/ndbapi.result -> mysql-test/suite/ndb/r/ndbapi.result mysql-test/suite/ndb/t/ndb_autodiscover2-master.opt: Rename: mysql-test/t/ndb_autodiscover2-master.opt -> mysql-test/suite/ndb/t/ndb_autodiscover2-master.opt mysql-test/suite/ndb/t/ndb_autodiscover2.test: Rename: mysql-test/t/ndb_autodiscover2.test -> mysql-test/suite/ndb/t/ndb_autodiscover2.test mysql-test/suite/ndb/t/ndb_index.test: Rename: mysql-test/t/ndb_index.test -> mysql-test/suite/ndb/t/ndb_index.test mysql-test/suite/ndb/t/ndb_lock.test: Rename: mysql-test/t/ndb_lock.test -> mysql-test/suite/ndb/t/ndb_lock.test mysql-test/suite/ndb/t/ndb_restore_compat.test: Rename: mysql-test/t/ndb_restore_compat.test -> mysql-test/suite/ndb/t/ndb_restore_compat.test mysql-test/suite/ndb/t/ndb_sp.test: Rename: mysql-test/t/ndb_sp.test -> mysql-test/suite/ndb/t/ndb_sp.test mysql-test/suite/ndb/t/ndb_subquery.test: Rename: mysql-test/t/ndb_subquery.test -> mysql-test/suite/ndb/t/ndb_subquery.test mysql-test/suite/ndb/t/ndb_temporary.test: Rename: mysql-test/t/ndb_temporary.test -> mysql-test/suite/ndb/t/ndb_temporary.test mysql-test/suite/rpl/r/rpl_LD_INFILE.result: Rename: mysql-test/r/rpl_LD_INFILE.result -> mysql-test/suite/rpl/r/rpl_LD_INFILE.result mysql-test/suite/rpl/r/rpl_auto_increment.result: Rename: mysql-test/r/rpl_auto_increment.result -> mysql-test/suite/rpl/r/rpl_auto_increment.result mysql-test/suite/rpl/r/rpl_create_database.result: Rename: mysql-test/r/rpl_create_database.result -> mysql-test/suite/rpl/r/rpl_create_database.result mysql-test/suite/rpl/r/rpl_critical_errors.result.txt: Rename: mysql-test/r/rpl_critical_errors.result.txt -> mysql-test/suite/rpl/r/rpl_critical_errors.result.txt mysql-test/suite/rpl/r/rpl_empty_master_crash.result: Rename: mysql-test/r/rpl_empty_master_crash.result -> mysql-test/suite/rpl/r/rpl_empty_master_crash.result mysql-test/suite/rpl/r/rpl_flushlog_loop.result: Rename: mysql-test/r/rpl_flushlog_loop.result -> mysql-test/suite/rpl/r/rpl_flushlog_loop.result mysql-test/suite/rpl/r/rpl_ignore_table.result: Rename: mysql-test/r/rpl_ignore_table.result -> mysql-test/suite/rpl/r/rpl_ignore_table.result mysql-test/suite/rpl/r/rpl_load_table_from_master.result: Rename: mysql-test/r/rpl_load_table_from_master.result -> mysql-test/suite/rpl/r/rpl_load_table_from_master.result mysql-test/suite/rpl/r/rpl_loaddata_simple.result: Rename: mysql-test/r/rpl_loaddata_simple.result -> mysql-test/suite/rpl/r/rpl_loaddata_simple.result mysql-test/suite/rpl/r/rpl_loaddatalocal.result: Rename: mysql-test/r/rpl_loaddatalocal.result -> mysql-test/suite/rpl/r/rpl_loaddatalocal.result mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result: Rename: mysql-test/r/rpl_rbr_to_sbr.result -> mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result mysql-test/suite/rpl/r/rpl_relay_space_myisam.result: Rename: mysql-test/r/rpl_relay_space_myisam.result -> mysql-test/suite/rpl/r/rpl_relay_space_myisam.result mysql-test/suite/rpl/r/rpl_rotate_logs.result: Rename: mysql-test/r/rpl_rotate_logs.result -> mysql-test/suite/rpl/r/rpl_rotate_logs.result mysql-test/suite/rpl/r/rpl_row_001.result: Rename: mysql-test/r/rpl_row_001.result -> mysql-test/suite/rpl/r/rpl_row_001.result mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt: Rename: mysql-test/r/rpl_row_basic_11bugs-master.opt -> mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt: Rename: mysql-test/r/rpl_row_basic_11bugs-slave.opt -> mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result: Rename: mysql-test/r/rpl_row_basic_3innodb.result -> mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result mysql-test/suite/rpl/r/rpl_row_delayed_ins.result: Rename: mysql-test/r/rpl_row_delayed_ins.result -> mysql-test/suite/rpl/r/rpl_row_delayed_ins.result mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result: Rename: mysql-test/r/rpl_row_mysqlbinlog.result -> mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result mysql-test/suite/rpl/r/rpl_row_mystery22.result: Rename: mysql-test/r/rpl_row_mystery22.result -> mysql-test/suite/rpl/r/rpl_row_mystery22.result mysql-test/suite/rpl/r/rpl_row_reset_slave.result: Rename: mysql-test/r/rpl_row_reset_slave.result -> mysql-test/suite/rpl/r/rpl_row_reset_slave.result mysql-test/suite/rpl/r/rpl_row_sp005.result: Rename: mysql-test/r/rpl_row_sp005.result -> mysql-test/suite/rpl/r/rpl_row_sp005.result mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result: Rename: mysql-test/r/rpl_row_tabledefs_7ndb.result -> mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result mysql-test/suite/rpl/r/rpl_server_id2.result: Rename: mysql-test/r/rpl_server_id2.result -> mysql-test/suite/rpl/r/rpl_server_id2.result mysql-test/suite/rpl/r/rpl_sp.result: Rename: mysql-test/r/rpl_sp.result -> mysql-test/suite/rpl/r/rpl_sp.result mysql-test/suite/rpl/r/rpl_temporary.result: Rename: mysql-test/r/rpl_temporary.result -> mysql-test/suite/rpl/r/rpl_temporary.result mysql-test/suite/rpl/r/rpl_trunc_temp.result: Rename: mysql-test/r/rpl_trunc_temp.result -> mysql-test/suite/rpl/r/rpl_trunc_temp.result mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result: Rename: mysql-test/r/rpl_truncate_7ndb_2.result -> mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result mysql-test/suite/rpl/r/rpl_user_variables.result: Rename: mysql-test/r/rpl_user_variables.result -> mysql-test/suite/rpl/r/rpl_user_variables.result mysql-test/suite/rpl/t/rpl000010-slave.opt: Rename: mysql-test/t/rpl000010-slave.opt -> mysql-test/suite/rpl/t/rpl000010-slave.opt mysql-test/suite/rpl/t/rpl_alter.test: Rename: mysql-test/t/rpl_alter.test -> mysql-test/suite/rpl/t/rpl_alter.test mysql-test/suite/rpl/t/rpl_deadlock_innodb.test: Rename: mysql-test/t/rpl_deadlock_innodb.test -> mysql-test/suite/rpl/t/rpl_deadlock_innodb.test mysql-test/suite/rpl/t/rpl_events.test: Rename: mysql-test/t/rpl_events.test -> mysql-test/suite/rpl/t/rpl_events.test mysql-test/suite/rpl/t/rpl_ignore_revoke-slave.opt: Rename: mysql-test/t/rpl_ignore_revoke-slave.opt -> mysql-test/suite/rpl/t/rpl_ignore_revoke-slave.opt mysql-test/suite/rpl/t/rpl_ignore_table-slave.opt: Rename: mysql-test/t/rpl_ignore_table-slave.opt -> mysql-test/suite/rpl/t/rpl_ignore_table-slave.opt mysql-test/suite/rpl/t/rpl_insert.test: Rename: mysql-test/t/rpl_insert.test -> mysql-test/suite/rpl/t/rpl_insert.test mysql-test/suite/rpl/t/rpl_insert_id.test: Rename: mysql-test/t/rpl_insert_id.test -> mysql-test/suite/rpl/t/rpl_insert_id.test mysql-test/suite/rpl/t/rpl_insert_id_pk.test: Rename: mysql-test/t/rpl_insert_id_pk.test -> mysql-test/suite/rpl/t/rpl_insert_id_pk.test mysql-test/suite/rpl/t/rpl_insert_ignore.test: Rename: mysql-test/t/rpl_insert_ignore.test -> mysql-test/suite/rpl/t/rpl_insert_ignore.test mysql-test/suite/rpl/t/rpl_loaddata_charset.test: Rename: mysql-test/t/rpl_loaddata_charset.test -> mysql-test/suite/rpl/t/rpl_loaddata_charset.test mysql-test/suite/rpl/t/rpl_loaddata_simple.test: Rename: mysql-test/t/rpl_loaddata_simple.test -> mysql-test/suite/rpl/t/rpl_loaddata_simple.test mysql-test/suite/rpl/t/rpl_multi_delete2.test: Rename: mysql-test/t/rpl_multi_delete2.test -> mysql-test/suite/rpl/t/rpl_multi_delete2.test mysql-test/suite/rpl/t/rpl_multi_engine-slave.opt: Rename: mysql-test/t/rpl_multi_engine-slave.opt -> mysql-test/suite/rpl/t/rpl_multi_engine-slave.opt mysql-test/suite/rpl/t/rpl_read_only-slave.opt: Rename: mysql-test/t/rpl_read_only-slave.opt -> mysql-test/suite/rpl/t/rpl_read_only-slave.opt mysql-test/suite/rpl/t/rpl_relayrotate-slave.opt: Rename: mysql-test/t/rpl_relayrotate-slave.opt -> mysql-test/suite/rpl/t/rpl_relayrotate-slave.opt mysql-test/suite/rpl/t/rpl_replicate_do.test: Rename: mysql-test/t/rpl_replicate_do.test -> mysql-test/suite/rpl/t/rpl_replicate_do.test mysql-test/suite/rpl/t/rpl_replicate_ignore_db-slave.opt: Rename: mysql-test/t/rpl_replicate_ignore_db-slave.opt -> mysql-test/suite/rpl/t/rpl_replicate_ignore_db-slave.opt mysql-test/suite/rpl/t/rpl_row_001.test: Rename: mysql-test/t/rpl_row_001.test -> mysql-test/suite/rpl/t/rpl_row_001.test mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test: Rename: mysql-test/t/rpl_row_basic_2myisam.test -> mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test mysql-test/suite/rpl/t/rpl_row_basic_3innodb-slave.opt: Rename: mysql-test/t/rpl_row_basic_3innodb-slave.opt -> mysql-test/suite/rpl/t/rpl_row_basic_3innodb-slave.opt mysql-test/suite/rpl/t/rpl_row_basic_8partition.test: Rename: mysql-test/t/rpl_row_basic_8partition.test -> mysql-test/suite/rpl/t/rpl_row_basic_8partition.test mysql-test/suite/rpl/t/rpl_row_charset.test: Rename: mysql-test/t/rpl_row_charset.test -> mysql-test/suite/rpl/t/rpl_row_charset.test mysql-test/suite/rpl/t/rpl_row_drop.test: Rename: mysql-test/t/rpl_row_drop.test -> mysql-test/suite/rpl/t/rpl_row_drop.test mysql-test/suite/rpl/t/rpl_row_trig004.test: Rename: mysql-test/t/rpl_row_trig004.test -> mysql-test/suite/rpl/t/rpl_row_trig004.test mysql-test/suite/rpl/t/rpl_row_view01.test: Rename: mysql-test/t/rpl_row_view01.test -> mysql-test/suite/rpl/t/rpl_row_view01.test mysql-test/suite/rpl/t/rpl_sp_effects-master.opt: Rename: mysql-test/t/rpl_sp_effects-master.opt -> mysql-test/suite/rpl/t/rpl_sp_effects-master.opt mysql-test/suite/rpl/t/rpl_stm_charset.test: Rename: mysql-test/t/rpl_stm_charset.test -> mysql-test/suite/rpl/t/rpl_stm_charset.test mysql-test/suite/rpl/t/rpl_stm_log-slave.opt: Rename: mysql-test/t/rpl_stm_log-slave.opt -> mysql-test/suite/rpl/t/rpl_stm_log-slave.opt mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt: Rename: mysql-test/t/rpl_truncate_7ndb_2-master.opt -> mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt mysql-test/suite/rpl/t/rpl_variables-master.opt: Rename: mysql-test/t/rpl_variables-master.opt -> mysql-test/suite/rpl/t/rpl_variables-master.opt mysql-test/suite/rpl/t/rpl_view-slave.opt: Rename: mysql-test/t/rpl_view-slave.opt -> mysql-test/suite/rpl/t/rpl_view-slave.opt mysql-test/suite/rpl/t/rpl_view.test: Rename: mysql-test/t/rpl_view.test -> mysql-test/suite/rpl/t/rpl_view.test mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result: Rename: mysql-test/r/rpl_ndb_charset.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result: Rename: mysql-test/r/rpl_ndb_circular_simplex.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result: Rename: mysql-test/r/rpl_ndb_dd_advance.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result: Rename: mysql-test/r/rpl_ndb_trig004.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt: Rename: mysql-test/t/rpl_ndb_2innodb-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test: Rename: mysql-test/t/rpl_ndb_UUID.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test: Rename: mysql-test/t/rpl_ndb_circular_simplex.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test: Rename: mysql-test/t/rpl_ndb_extraCol.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt: Rename: mysql-test/t/rpl_ndb_stm_innodb-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt mysql-test/suite/binlog/t/binlog_row_binlog.test: Rename: mysql-test/t/binlog_row_binlog.test -> mysql-test/suite/binlog/t/binlog_row_binlog.test mysql-test/suite/ndb/r/ndb_autodiscover.result: Rename: mysql-test/r/ndb_autodiscover.result -> mysql-test/suite/ndb/r/ndb_autodiscover.result mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result: Rename: mysql-test/r/ndb_binlog_ignore_db.result -> mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result mysql-test/suite/ndb/r/ndb_cache_multi.result: Rename: mysql-test/r/ndb_cache_multi.result -> mysql-test/suite/ndb/r/ndb_cache_multi.result mysql-test/suite/ndb/r/ndb_partition_error.result: Rename: mysql-test/r/ndb_partition_error.result -> mysql-test/suite/ndb/r/ndb_partition_error.result mysql-test/suite/ndb/r/ndb_read_multi_range.result: Rename: mysql-test/r/ndb_read_multi_range.result -> mysql-test/suite/ndb/r/ndb_read_multi_range.result mysql-test/suite/ndb/r/ndb_truncate.result: Rename: mysql-test/r/ndb_truncate.result -> mysql-test/suite/ndb/r/ndb_truncate.result mysql-test/suite/ndb/t/ndb_gis.test: Rename: mysql-test/t/ndb_gis.test -> mysql-test/suite/ndb/t/ndb_gis.test mysql-test/suite/ndb/t/ndb_grant.later: Rename: mysql-test/t/ndb_grant.later -> mysql-test/suite/ndb/t/ndb_grant.later mysql-test/suite/rpl/r/rpl_err_ignoredtable.result: Rename: mysql-test/r/rpl_err_ignoredtable.result -> mysql-test/suite/rpl/r/rpl_err_ignoredtable.result mysql-test/suite/rpl/r/rpl_ignore_grant.result: Rename: mysql-test/r/rpl_ignore_grant.result -> mysql-test/suite/rpl/r/rpl_ignore_grant.result mysql-test/suite/rpl/r/rpl_load_from_master.result: Rename: mysql-test/r/rpl_load_from_master.result -> mysql-test/suite/rpl/r/rpl_load_from_master.result mysql-test/suite/rpl/r/rpl_master_pos_wait.result: Rename: mysql-test/r/rpl_master_pos_wait.result -> mysql-test/suite/rpl/r/rpl_master_pos_wait.result mysql-test/suite/rpl/r/rpl_misc_functions.result: Rename: mysql-test/r/rpl_misc_functions.result -> mysql-test/suite/rpl/r/rpl_misc_functions.result mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result: Rename: mysql-test/r/rpl_row_basic_11bugs.result -> mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result mysql-test/suite/rpl/r/rpl_row_max_relay_size.result: Rename: mysql-test/r/rpl_row_max_relay_size.result -> mysql-test/suite/rpl/r/rpl_row_max_relay_size.result mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result: Rename: mysql-test/r/rpl_row_tabledefs_2myisam.result -> mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result mysql-test/suite/rpl/r/rpl_server_id1.result: Rename: mysql-test/r/rpl_server_id1.result -> mysql-test/suite/rpl/r/rpl_server_id1.result mysql-test/suite/rpl/r/rpl_sf.result: Rename: mysql-test/r/rpl_sf.result -> mysql-test/suite/rpl/r/rpl_sf.result mysql-test/suite/rpl/r/rpl_start_stop_slave.result: Rename: mysql-test/r/rpl_start_stop_slave.result -> mysql-test/suite/rpl/r/rpl_start_stop_slave.result mysql-test/suite/rpl/r/rpl_stm_reset_slave.result: Rename: mysql-test/r/rpl_stm_reset_slave.result -> mysql-test/suite/rpl/r/rpl_stm_reset_slave.result mysql-test/suite/rpl/r/rpl_stm_until.result: Rename: mysql-test/r/rpl_stm_until.result -> mysql-test/suite/rpl/r/rpl_stm_until.result mysql-test/suite/rpl/t/rpl_000015-slave.sh: Rename: mysql-test/t/rpl_000015-slave.sh -> mysql-test/suite/rpl/t/rpl_000015-slave.sh mysql-test/suite/rpl/t/rpl_change_master.test: Rename: mysql-test/t/rpl_change_master.test -> mysql-test/suite/rpl/t/rpl_change_master.test mysql-test/suite/rpl/t/rpl_drop_temp-slave.opt: Rename: mysql-test/t/rpl_drop_temp-slave.opt -> mysql-test/suite/rpl/t/rpl_drop_temp-slave.opt mysql-test/suite/rpl/t/rpl_multi_engine.test: Rename: mysql-test/t/rpl_multi_engine.test -> mysql-test/suite/rpl/t/rpl_multi_engine.test mysql-test/suite/rpl/t/rpl_relayspace-slave.opt: Rename: mysql-test/t/rpl_relayspace-slave.opt -> mysql-test/suite/rpl/t/rpl_relayspace-slave.opt mysql-test/suite/rpl/t/rpl_row_blob_myisam.test: Rename: mysql-test/t/rpl_row_blob_myisam.test -> mysql-test/suite/rpl/t/rpl_row_blob_myisam.test mysql-test/suite/rpl/t/rpl_row_sp009.test: Rename: mysql-test/t/rpl_row_sp009.test -> mysql-test/suite/rpl/t/rpl_row_sp009.test mysql-test/suite/rpl/t/rpl_row_sp010.test: Rename: mysql-test/t/rpl_row_sp010.test -> mysql-test/suite/rpl/t/rpl_row_sp010.test mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test: Rename: mysql-test/t/rpl_stm_insert_delayed.test -> mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test mysql-test/suite/rpl/t/rpl_stm_until.test: Rename: mysql-test/t/rpl_stm_until.test -> mysql-test/suite/rpl/t/rpl_stm_until.test mysql-test/suite/rpl/t/rpl_truncate_3innodb.test: Rename: mysql-test/t/rpl_truncate_3innodb.test -> mysql-test/suite/rpl/t/rpl_truncate_3innodb.test mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test: Rename: mysql-test/t/rpl_ndb_bank.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test: Rename: mysql-test/t/rpl_ndb_row_001.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test mysql-test/lib/mtr_cases.pl: Reorganize collect function to collect from more than one suite Add new function collect_one_suite Set name of test to . mysql-test/lib/mtr_report.pl: Determine name of files from "result_file" name mysql-test/mysql-test-run.pl: Collect tests from suites main, binlog, rpl, rpl_ndb and ndb as default. Add --suites as a synonym of --suite and allow a semicolon separated list of suite names to be passed to it. Determine name of files to cleanup from "result_file" name Update usage Add possibility to add a suite.opt file mysql-test/t/disabled.def: Move disabled testcases to their respective suite mysql-test/suite/funcs_1/t/suite.opt: New BitKeeper file ``mysql-test/suite/funcs_1/t/suite.opt'' mysql-test/suite/funcs_2/t/suite.opt: New BitKeeper file ``mysql-test/suite/funcs_2/t/suite.opt'' mysql-test/suite/ndb/t/disabled.def: New BitKeeper file ``mysql-test/suite/ndb/t/disabled.def'' mysql-test/suite/rpl/t/disabled.def: New BitKeeper file ``mysql-test/suite/rpl/t/disabled.def'' mysql-test/suite/rpl_ndb/t/disabled.def: New BitKeeper file ``mysql-test/suite/rpl_ndb/t/disabled.def'' --- mysql-test/lib/mtr_cases.pl | 241 +- mysql-test/lib/mtr_report.pl | 27 +- mysql-test/mysql-test-run.pl | 50 +- mysql-test/r/binlog_killed.result | 12 - mysql-test/r/binlog_row_binlog.result | 339 - mysql-test/r/binlog_row_blackhole.result | 155 - mysql-test/r/binlog_row_ctype_cp932.result | 11377 ------------------- mysql-test/r/binlog_row_ctype_ucs.result | 19 - mysql-test/r/binlog_row_drop_tmp_tbl.result | 17 - mysql-test/r/binlog_row_innodb_stat.result | 39 - mysql-test/r/binlog_row_insert_select.result | 25 - mysql-test/r/binlog_row_mix_innodb_myisam.result | 415 - .../r/binlog_statement_insert_delayed.result | 29 - mysql-test/r/binlog_stm_binlog.result | 237 - mysql-test/r/binlog_stm_blackhole.result | 155 - mysql-test/r/binlog_stm_ctype_cp932.result | 11377 ------------------- mysql-test/r/binlog_stm_ctype_ucs.result | 27 - mysql-test/r/binlog_stm_drop_tmp_tbl.result | 21 - mysql-test/r/binlog_stm_innodb_stat.result | 39 - mysql-test/r/binlog_stm_insert_select.result | 24 - mysql-test/r/binlog_stm_mix_innodb_myisam.result | 382 - mysql-test/r/binlog_stm_ps.result | 20 - mysql-test/r/loaddata_autocom_ndb.result | 23 - mysql-test/r/ndb_alter_table.result | 401 - mysql-test/r/ndb_alter_table2.result | 41 - mysql-test/r/ndb_alter_table3.result | 35 - mysql-test/r/ndb_autodiscover.result | 397 - mysql-test/r/ndb_autodiscover2.result | 13 - mysql-test/r/ndb_autodiscover3.result | 53 - mysql-test/r/ndb_backup_print.result | 64 - mysql-test/r/ndb_basic.result | 901 -- mysql-test/r/ndb_binlog_basic.result | 51 - mysql-test/r/ndb_binlog_basic2.result | 12 - mysql-test/r/ndb_binlog_ddl_multi.result | 196 - mysql-test/r/ndb_binlog_discover.result | 17 - mysql-test/r/ndb_binlog_ignore_db.result | 11 - mysql-test/r/ndb_binlog_log_bin.result | 80 - mysql-test/r/ndb_binlog_multi.result | 84 - mysql-test/r/ndb_bitfield.result | 224 - mysql-test/r/ndb_blob.result | 570 - mysql-test/r/ndb_blob_partition.result | 104 - mysql-test/r/ndb_cache.result | 191 - mysql-test/r/ndb_cache2.result | 623 - mysql-test/r/ndb_cache_multi.result | 74 - mysql-test/r/ndb_cache_multi2.result | 75 - mysql-test/r/ndb_charset.result | 320 - mysql-test/r/ndb_condition_pushdown.result | 1892 --- mysql-test/r/ndb_config.result | 14 - mysql-test/r/ndb_config2.result | 1 - mysql-test/r/ndb_cursor.result | 40 - mysql-test/r/ndb_database.result | 13 - mysql-test/r/ndb_dd_alter.result | 560 - mysql-test/r/ndb_dd_backuprestore.result | 487 - mysql-test/r/ndb_dd_basic.result | 510 - mysql-test/r/ndb_dd_ddl.result | 240 - mysql-test/r/ndb_dd_disk2memory.result | 505 - mysql-test/r/ndb_dd_dump.result | 218 - mysql-test/r/ndb_dd_sql_features.result | 599 - mysql-test/r/ndb_gis.result | 1100 -- mysql-test/r/ndb_grant.result | 444 - mysql-test/r/ndb_index.result | 154 - mysql-test/r/ndb_index_ordered.result | 854 -- mysql-test/r/ndb_index_unique.result | 692 -- mysql-test/r/ndb_insert.result | 828 -- mysql-test/r/ndb_limit.result | 72 - mysql-test/r/ndb_load.result | 80 - mysql-test/r/ndb_loaddatalocal.result | 46 - mysql-test/r/ndb_lock.result | 200 - mysql-test/r/ndb_minmax.result | 120 - mysql-test/r/ndb_multi.result | 123 - mysql-test/r/ndb_multi_row.result | 67 - mysql-test/r/ndb_partition_error.result | 47 - mysql-test/r/ndb_partition_error2.result | 3 - mysql-test/r/ndb_partition_key.result | 255 - mysql-test/r/ndb_partition_list.result | 51 - mysql-test/r/ndb_partition_range.result | 263 - mysql-test/r/ndb_read_multi_range.result | 475 - mysql-test/r/ndb_rename.result | 24 - mysql-test/r/ndb_replace.result | 99 - mysql-test/r/ndb_restore.result | 485 - mysql-test/r/ndb_restore_compat.result | 114 - mysql-test/r/ndb_restore_partition.result | 469 - mysql-test/r/ndb_restore_print.result | 321 - mysql-test/r/ndb_row_format.result | 65 - mysql-test/r/ndb_single_user.result | 119 - mysql-test/r/ndb_sp.result | 44 - mysql-test/r/ndb_subquery.result | 92 - mysql-test/r/ndb_temporary.result | 21 - mysql-test/r/ndb_transaction.result | 257 - mysql-test/r/ndb_trigger.result | 315 - mysql-test/r/ndb_truncate.result | 23 - mysql-test/r/ndb_types.result | 76 - mysql-test/r/ndb_update.result | 42 - mysql-test/r/ndb_view.result | 24 - mysql-test/r/ndbapi.result | 22 - mysql-test/r/partition_03ndb.result | 1361 --- mysql-test/r/ps_7ndb.result | 3127 ----- mysql-test/r/rpl000001.a.result | 3 - mysql-test/r/rpl000001.b.result | 2 - mysql-test/r/rpl000010.result | 14 - mysql-test/r/rpl000011.result | 16 - mysql-test/r/rpl000013.result | 28 - mysql-test/r/rpl000017.result | 18 - mysql-test/r/rpl_000015.result | 34 - mysql-test/r/rpl_EE_err.result | 11 - mysql-test/r/rpl_LD_INFILE.result | 117 - mysql-test/r/rpl_alter.result | 21 - mysql-test/r/rpl_alter_db.result | 8 - mysql-test/r/rpl_auto_increment.result | 229 - mysql-test/r/rpl_auto_increment_11932.result | 47 - mysql-test/r/rpl_bit.result | 138 - mysql-test/r/rpl_bit_npk.result | 169 - mysql-test/r/rpl_change_master.result | 26 - mysql-test/r/rpl_charset_sjis.result | 26 - mysql-test/r/rpl_commit_after_flush.result | 13 - mysql-test/r/rpl_create_database.result | 70 - mysql-test/r/rpl_critical_errors.result | 1 - mysql-test/r/rpl_critical_errors.result.txt | 56 - mysql-test/r/rpl_ddl.result | 1616 --- mysql-test/r/rpl_deadlock_innodb.result | 199 - mysql-test/r/rpl_delete_no_where.result | 15 - mysql-test/r/rpl_do_grant.result | 91 - mysql-test/r/rpl_drop.result | 10 - mysql-test/r/rpl_drop_db.result | 38 - mysql-test/r/rpl_drop_temp.result | 13 - mysql-test/r/rpl_dual_pos_advance.result | 22 - mysql-test/r/rpl_empty_master_crash.result | 12 - mysql-test/r/rpl_err_ignoredtable.result | 42 - mysql-test/r/rpl_events.result | 165 - mysql-test/r/rpl_extraCol_innodb.result | 749 -- mysql-test/r/rpl_extraCol_myisam.result | 749 -- mysql-test/r/rpl_failed_optimize.result | 24 - mysql-test/r/rpl_flushlog_loop.result | 54 - mysql-test/r/rpl_foreign_key_innodb.result | 42 - mysql-test/r/rpl_free_items.result | 10 - mysql-test/r/rpl_get_lock.result | 35 - mysql-test/r/rpl_ignore_grant.result | 37 - mysql-test/r/rpl_ignore_revoke.result | 30 - mysql-test/r/rpl_ignore_table.result | 140 - mysql-test/r/rpl_ignore_table_update.result | 23 - mysql-test/r/rpl_incident.result | 106 - mysql-test/r/rpl_init_slave.result | 27 - mysql-test/r/rpl_innodb.result | 37 - mysql-test/r/rpl_insert.result | 23 - mysql-test/r/rpl_insert_id.result | 538 - mysql-test/r/rpl_insert_id_pk.result | 76 - mysql-test/r/rpl_insert_ignore.result | 70 - mysql-test/r/rpl_insert_select.result | 17 - mysql-test/r/rpl_known_bugs_detection.result | 135 - mysql-test/r/rpl_load_from_master.result | 139 - mysql-test/r/rpl_load_table_from_master.result | 51 - mysql-test/r/rpl_loaddata.result | 92 - mysql-test/r/rpl_loaddata_charset.result | 37 - mysql-test/r/rpl_loaddata_m.result | 38 - mysql-test/r/rpl_loaddata_s.result | 15 - mysql-test/r/rpl_loaddata_simple.result | 153 - mysql-test/r/rpl_loaddatalocal.result | 31 - mysql-test/r/rpl_loadfile.result | 227 - mysql-test/r/rpl_locale.result | 20 - mysql-test/r/rpl_log_pos.result | 99 - mysql-test/r/rpl_many_optimize.result | 9 - mysql-test/r/rpl_master_pos_wait.result | 18 - mysql-test/r/rpl_misc_functions.result | 46 - mysql-test/r/rpl_mixed_ddl_dml.result | 46 - mysql-test/r/rpl_multi_delete.result | 22 - mysql-test/r/rpl_multi_delete2.result | 44 - mysql-test/r/rpl_multi_engine.result | 366 - mysql-test/r/rpl_multi_update.result | 27 - mysql-test/r/rpl_multi_update2.result | 55 - mysql-test/r/rpl_multi_update3.result | 197 - mysql-test/r/rpl_multi_update4.result | 25 - mysql-test/r/rpl_ndb_2innodb.result | 855 -- mysql-test/r/rpl_ndb_2myisam.result | 855 -- mysql-test/r/rpl_ndb_UUID.result | 40 - mysql-test/r/rpl_ndb_auto_inc.result | 170 - mysql-test/r/rpl_ndb_bank.result | 120 - mysql-test/r/rpl_ndb_basic.result | 227 - mysql-test/r/rpl_ndb_blob.result | 135 - mysql-test/r/rpl_ndb_blob2.result | 156 - mysql-test/r/rpl_ndb_charset.result | 201 - mysql-test/r/rpl_ndb_circular.result | 95 - mysql-test/r/rpl_ndb_circular_simplex.result | 97 - mysql-test/r/rpl_ndb_commit_afterflush.result | 13 - mysql-test/r/rpl_ndb_dd_advance.result | 417 - mysql-test/r/rpl_ndb_dd_basic.result | 72 - mysql-test/r/rpl_ndb_dd_partitions.result | 726 -- mysql-test/r/rpl_ndb_ddl.result | 1616 --- mysql-test/r/rpl_ndb_delete_nowhere.result | 15 - mysql-test/r/rpl_ndb_do_db.result | 58 - mysql-test/r/rpl_ndb_do_table.result | 26 - mysql-test/r/rpl_ndb_extraCol.result | 750 -- mysql-test/r/rpl_ndb_func003.result | 29 - mysql-test/r/rpl_ndb_idempotent.result | 73 - mysql-test/r/rpl_ndb_innodb_trans.result | 103 - mysql-test/r/rpl_ndb_insert_ignore.result | 70 - mysql-test/r/rpl_ndb_load.result | 42 - mysql-test/r/rpl_ndb_log.result | 151 - mysql-test/r/rpl_ndb_multi.result | 55 - mysql-test/r/rpl_ndb_multi_update2.result | 55 - mysql-test/r/rpl_ndb_multi_update3.result | 197 - mysql-test/r/rpl_ndb_relayrotate.result | 16 - mysql-test/r/rpl_ndb_rep_ignore.result | 54 - mysql-test/r/rpl_ndb_row_001.result | 55 - mysql-test/r/rpl_ndb_sp003.result | 49 - mysql-test/r/rpl_ndb_sp006.result | 46 - mysql-test/r/rpl_ndb_stm_innodb.result | 37 - mysql-test/r/rpl_ndb_sync.result | 96 - mysql-test/r/rpl_ndb_trig004.result | 30 - mysql-test/r/rpl_ndbapi_multi.result | 8 - mysql-test/r/rpl_optimize.result | 27 - mysql-test/r/rpl_packet.result | 32 - mysql-test/r/rpl_ps.result | 30 - mysql-test/r/rpl_rbr_to_sbr.result | 67 - mysql-test/r/rpl_read_only.result | 116 - mysql-test/r/rpl_redirect.result | 41 - mysql-test/r/rpl_relay_space_innodb.result | 25 - mysql-test/r/rpl_relay_space_myisam.result | 25 - mysql-test/r/rpl_relayrotate.result | 16 - mysql-test/r/rpl_relayspace.result | 19 - mysql-test/r/rpl_replicate_do.result | 77 - mysql-test/r/rpl_replicate_ignore_db.result | 23 - mysql-test/r/rpl_rewrt_db.result | 94 - mysql-test/r/rpl_rotate_logs.result | 97 - mysql-test/r/rpl_row_001.result | 55 - mysql-test/r/rpl_row_4_bytes.result | 27 - mysql-test/r/rpl_row_NOW.result | 29 - mysql-test/r/rpl_row_USER.result | 38 - mysql-test/r/rpl_row_UUID.result | 40 - mysql-test/r/rpl_row_basic_11bugs-master.opt | 1 - mysql-test/r/rpl_row_basic_11bugs-slave.opt | 1 - mysql-test/r/rpl_row_basic_11bugs.result | 220 - mysql-test/r/rpl_row_basic_2myisam.result | 418 - mysql-test/r/rpl_row_basic_3innodb.result | 418 - mysql-test/r/rpl_row_basic_7ndb.result | 418 - mysql-test/r/rpl_row_basic_8partition.result | 655 -- mysql-test/r/rpl_row_blob_innodb.result | 156 - mysql-test/r/rpl_row_blob_myisam.result | 156 - mysql-test/r/rpl_row_charset.result | 201 - mysql-test/r/rpl_row_create_table.result | 403 - mysql-test/r/rpl_row_delayed_ins.result | 32 - mysql-test/r/rpl_row_drop.result | 56 - mysql-test/r/rpl_row_err_ignoredtable.result | 44 - mysql-test/r/rpl_row_flsh_tbls.result | 33 - mysql-test/r/rpl_row_func001.result | 30 - mysql-test/r/rpl_row_func002.result | 26 - mysql-test/r/rpl_row_func003.result | 29 - mysql-test/r/rpl_row_inexist_tbl.result | 55 - mysql-test/r/rpl_row_insert_delayed.result | 48 - mysql-test/r/rpl_row_loaddata_m.result | 20 - mysql-test/r/rpl_row_log.result | 116 - mysql-test/r/rpl_row_log_innodb.result | 124 - mysql-test/r/rpl_row_max_relay_size.result | 281 - mysql-test/r/rpl_row_multi_query.result | 37 - mysql-test/r/rpl_row_mysqlbinlog.result | 352 - mysql-test/r/rpl_row_mystery22.result | 30 - mysql-test/r/rpl_row_reset_slave.result | 32 - mysql-test/r/rpl_row_sp001.result | 85 - mysql-test/r/rpl_row_sp002_innodb.result | 239 - mysql-test/r/rpl_row_sp003.result | 49 - mysql-test/r/rpl_row_sp005.result | 100 - mysql-test/r/rpl_row_sp006_InnoDB.result | 46 - mysql-test/r/rpl_row_sp007_innodb.result | 50 - mysql-test/r/rpl_row_sp008.result | 34 - mysql-test/r/rpl_row_sp009.result | 77 - mysql-test/r/rpl_row_sp010.result | 56 - mysql-test/r/rpl_row_sp011.result | 69 - mysql-test/r/rpl_row_sp012.result | 59 - mysql-test/r/rpl_row_stop_middle.result | 26 - mysql-test/r/rpl_row_stop_middle_update.result | 16 - mysql-test/r/rpl_row_tabledefs_2myisam.result | 389 - mysql-test/r/rpl_row_tabledefs_3innodb.result | 389 - mysql-test/r/rpl_row_tabledefs_7ndb.result | 288 - mysql-test/r/rpl_row_trig001.result | 30 - mysql-test/r/rpl_row_trig002.result | 69 - mysql-test/r/rpl_row_trig003.result | 83 - mysql-test/r/rpl_row_trig004.result | 30 - mysql-test/r/rpl_row_until.result | 190 - mysql-test/r/rpl_row_view01.result | 101 - mysql-test/r/rpl_server_id1.result | 19 - mysql-test/r/rpl_server_id2.result | 21 - mysql-test/r/rpl_session_var.result | 43 - mysql-test/r/rpl_set_charset.result | 48 - mysql-test/r/rpl_sf.result | 23 - mysql-test/r/rpl_skip_error.result | 16 - mysql-test/r/rpl_slave_status.result | 58 - mysql-test/r/rpl_sp.result | 536 - mysql-test/r/rpl_sp004.result | 93 - mysql-test/r/rpl_sp_effects.result | 238 - mysql-test/r/rpl_sporadic_master.result | 26 - mysql-test/r/rpl_ssl.result | 99 - mysql-test/r/rpl_ssl1.result | 146 - mysql-test/r/rpl_start_stop_slave.result | 12 - mysql-test/r/rpl_stm_000001.result | 82 - mysql-test/r/rpl_stm_EE_err2.result | 13 - mysql-test/r/rpl_stm_charset.result | 270 - mysql-test/r/rpl_stm_flsh_tbls.result | 33 - mysql-test/r/rpl_stm_insert_delayed.result | 88 - mysql-test/r/rpl_stm_log.result | 115 - mysql-test/r/rpl_stm_max_relay_size.result | 279 - mysql-test/r/rpl_stm_multi_query.result | 32 - mysql-test/r/rpl_stm_mystery22.result | 31 - mysql-test/r/rpl_stm_no_op.result | 52 - mysql-test/r/rpl_stm_reset_slave.result | 32 - mysql-test/r/rpl_stm_until.result | 190 - mysql-test/r/rpl_switch_stm_row_mixed.result | 1017 -- mysql-test/r/rpl_temp_table.result | 48 - mysql-test/r/rpl_temporary.result | 106 - mysql-test/r/rpl_timezone.result | 107 - mysql-test/r/rpl_trigger.result | 973 -- mysql-test/r/rpl_trunc_temp.result | 22 - mysql-test/r/rpl_truncate_2myisam.result | 196 - mysql-test/r/rpl_truncate_3innodb.result | 208 - mysql-test/r/rpl_truncate_7ndb.result | 95 - mysql-test/r/rpl_truncate_7ndb_2.result | 91 - mysql-test/r/rpl_udf.result | 310 - mysql-test/r/rpl_user_variables.result | 266 - mysql-test/r/rpl_variables.result | 19 - mysql-test/r/rpl_view.result | 104 - mysql-test/r/strict_autoinc_5ndb.result | 28 - mysql-test/suite/binlog/r/binlog_killed.result | 12 + mysql-test/suite/binlog/r/binlog_row_binlog.result | 339 + .../suite/binlog/r/binlog_row_blackhole.result | 155 + .../suite/binlog/r/binlog_row_ctype_cp932.result | 11377 +++++++++++++++++++ .../suite/binlog/r/binlog_row_ctype_ucs.result | 19 + .../suite/binlog/r/binlog_row_drop_tmp_tbl.result | 17 + .../suite/binlog/r/binlog_row_innodb_stat.result | 39 + .../suite/binlog/r/binlog_row_insert_select.result | 25 + .../binlog/r/binlog_row_mix_innodb_myisam.result | 415 + .../r/binlog_statement_insert_delayed.result | 29 + mysql-test/suite/binlog/r/binlog_stm_binlog.result | 237 + .../suite/binlog/r/binlog_stm_blackhole.result | 155 + .../suite/binlog/r/binlog_stm_ctype_cp932.result | 11377 +++++++++++++++++++ .../suite/binlog/r/binlog_stm_ctype_ucs.result | 27 + .../suite/binlog/r/binlog_stm_drop_tmp_tbl.result | 21 + .../suite/binlog/r/binlog_stm_innodb_stat.result | 39 + .../suite/binlog/r/binlog_stm_insert_select.result | 24 + .../binlog/r/binlog_stm_mix_innodb_myisam.result | 382 + mysql-test/suite/binlog/r/binlog_stm_ps.result | 20 + mysql-test/suite/binlog/t/binlog_killed.test | 248 + .../suite/binlog/t/binlog_row_binlog-master.opt | 1 + mysql-test/suite/binlog/t/binlog_row_binlog.test | 5 + .../suite/binlog/t/binlog_row_blackhole.test | 11 + .../suite/binlog/t/binlog_row_ctype_cp932.test | 5 + .../suite/binlog/t/binlog_row_ctype_ucs.test | 6 + .../suite/binlog/t/binlog_row_drop_tmp_tbl.test | 5 + .../binlog/t/binlog_row_innodb_stat-master.opt | 1 + .../suite/binlog/t/binlog_row_innodb_stat.test | 5 + .../suite/binlog/t/binlog_row_insert_select.test | 10 + .../t/binlog_row_mix_innodb_myisam-master.opt | 1 + .../binlog/t/binlog_row_mix_innodb_myisam.test | 32 + .../binlog/t/binlog_statement_insert_delayed.test | 9 + .../suite/binlog/t/binlog_stm_binlog-master.opt | 1 + mysql-test/suite/binlog/t/binlog_stm_binlog.test | 18 + .../suite/binlog/t/binlog_stm_blackhole.test | 6 + .../suite/binlog/t/binlog_stm_ctype_cp932.test | 6 + .../suite/binlog/t/binlog_stm_ctype_ucs.test | 6 + .../suite/binlog/t/binlog_stm_drop_tmp_tbl.test | 5 + .../binlog/t/binlog_stm_innodb_stat-master.opt | 1 + .../suite/binlog/t/binlog_stm_innodb_stat.test | 5 + .../suite/binlog/t/binlog_stm_insert_select.test | 5 + .../t/binlog_stm_mix_innodb_myisam-master.opt | 1 + .../binlog/t/binlog_stm_mix_innodb_myisam.test | 24 + mysql-test/suite/binlog/t/binlog_stm_ps.test | 26 + mysql-test/suite/funcs_1/t/suite.opt | 2 + mysql-test/suite/funcs_2/t/suite.opt | 2 + mysql-test/suite/ndb/r/loaddata_autocom_ndb.result | 23 + mysql-test/suite/ndb/r/ndb_alter_table.result | 401 + mysql-test/suite/ndb/r/ndb_alter_table2.result | 41 + mysql-test/suite/ndb/r/ndb_alter_table3.result | 35 + mysql-test/suite/ndb/r/ndb_autodiscover.result | 397 + mysql-test/suite/ndb/r/ndb_autodiscover2.result | 13 + mysql-test/suite/ndb/r/ndb_autodiscover3.result | 53 + mysql-test/suite/ndb/r/ndb_backup_print.result | 64 + mysql-test/suite/ndb/r/ndb_basic.result | 901 ++ mysql-test/suite/ndb/r/ndb_binlog_basic.result | 51 + mysql-test/suite/ndb/r/ndb_binlog_basic2.result | 12 + mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result | 196 + mysql-test/suite/ndb/r/ndb_binlog_discover.result | 17 + mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result | 11 + mysql-test/suite/ndb/r/ndb_binlog_log_bin.result | 80 + mysql-test/suite/ndb/r/ndb_binlog_multi.result | 84 + mysql-test/suite/ndb/r/ndb_bitfield.result | 224 + mysql-test/suite/ndb/r/ndb_blob.result | 570 + mysql-test/suite/ndb/r/ndb_blob_partition.result | 104 + mysql-test/suite/ndb/r/ndb_cache.result | 191 + mysql-test/suite/ndb/r/ndb_cache2.result | 623 + mysql-test/suite/ndb/r/ndb_cache_multi.result | 74 + mysql-test/suite/ndb/r/ndb_cache_multi2.result | 75 + mysql-test/suite/ndb/r/ndb_charset.result | 320 + .../suite/ndb/r/ndb_condition_pushdown.result | 1892 +++ mysql-test/suite/ndb/r/ndb_config.result | 14 + mysql-test/suite/ndb/r/ndb_config2.result | 1 + mysql-test/suite/ndb/r/ndb_cursor.result | 40 + mysql-test/suite/ndb/r/ndb_database.result | 13 + mysql-test/suite/ndb/r/ndb_dd_alter.result | 560 + mysql-test/suite/ndb/r/ndb_dd_backuprestore.result | 487 + mysql-test/suite/ndb/r/ndb_dd_basic.result | 510 + mysql-test/suite/ndb/r/ndb_dd_ddl.result | 240 + mysql-test/suite/ndb/r/ndb_dd_disk2memory.result | 505 + mysql-test/suite/ndb/r/ndb_dd_dump.result | 218 + mysql-test/suite/ndb/r/ndb_dd_sql_features.result | 599 + mysql-test/suite/ndb/r/ndb_gis.result | 1100 ++ mysql-test/suite/ndb/r/ndb_grant.result | 444 + mysql-test/suite/ndb/r/ndb_index.result | 154 + mysql-test/suite/ndb/r/ndb_index_ordered.result | 854 ++ mysql-test/suite/ndb/r/ndb_index_unique.result | 692 ++ mysql-test/suite/ndb/r/ndb_insert.result | 828 ++ mysql-test/suite/ndb/r/ndb_limit.result | 72 + mysql-test/suite/ndb/r/ndb_load.result | 80 + mysql-test/suite/ndb/r/ndb_loaddatalocal.result | 46 + mysql-test/suite/ndb/r/ndb_lock.result | 200 + mysql-test/suite/ndb/r/ndb_minmax.result | 120 + mysql-test/suite/ndb/r/ndb_multi.result | 123 + mysql-test/suite/ndb/r/ndb_multi_row.result | 67 + mysql-test/suite/ndb/r/ndb_partition_error.result | 47 + mysql-test/suite/ndb/r/ndb_partition_error2.result | 3 + mysql-test/suite/ndb/r/ndb_partition_key.result | 255 + mysql-test/suite/ndb/r/ndb_partition_list.result | 51 + mysql-test/suite/ndb/r/ndb_partition_range.result | 263 + mysql-test/suite/ndb/r/ndb_read_multi_range.result | 475 + mysql-test/suite/ndb/r/ndb_rename.result | 24 + mysql-test/suite/ndb/r/ndb_replace.result | 99 + mysql-test/suite/ndb/r/ndb_restore.result | 485 + mysql-test/suite/ndb/r/ndb_restore_compat.result | 114 + .../suite/ndb/r/ndb_restore_partition.result | 469 + mysql-test/suite/ndb/r/ndb_restore_print.result | 321 + mysql-test/suite/ndb/r/ndb_row_format.result | 65 + mysql-test/suite/ndb/r/ndb_single_user.result | 119 + mysql-test/suite/ndb/r/ndb_sp.result | 44 + mysql-test/suite/ndb/r/ndb_subquery.result | 92 + mysql-test/suite/ndb/r/ndb_temporary.result | 21 + mysql-test/suite/ndb/r/ndb_transaction.result | 257 + mysql-test/suite/ndb/r/ndb_trigger.result | 315 + mysql-test/suite/ndb/r/ndb_truncate.result | 23 + mysql-test/suite/ndb/r/ndb_types.result | 76 + mysql-test/suite/ndb/r/ndb_update.result | 42 + mysql-test/suite/ndb/r/ndb_view.result | 24 + mysql-test/suite/ndb/r/ndbapi.result | 22 + mysql-test/suite/ndb/r/partition_03ndb.result | 1361 +++ mysql-test/suite/ndb/r/ps_7ndb.result | 3127 +++++ mysql-test/suite/ndb/r/strict_autoinc_5ndb.result | 28 + mysql-test/suite/ndb/t/disabled.def | 23 + mysql-test/suite/ndb/t/loaddata_autocom_ndb.test | 4 + mysql-test/suite/ndb/t/ndb_alter_table.test | 439 + mysql-test/suite/ndb/t/ndb_alter_table2.test | 85 + mysql-test/suite/ndb/t/ndb_alter_table3.test | 49 + mysql-test/suite/ndb/t/ndb_autodiscover.test | 548 + .../suite/ndb/t/ndb_autodiscover2-master.opt | 1 + mysql-test/suite/ndb/t/ndb_autodiscover2.test | 21 + mysql-test/suite/ndb/t/ndb_autodiscover3.test | 86 + mysql-test/suite/ndb/t/ndb_backup_print.test | 66 + mysql-test/suite/ndb/t/ndb_basic.test | 843 ++ mysql-test/suite/ndb/t/ndb_binlog_basic.test | 72 + mysql-test/suite/ndb/t/ndb_binlog_basic2.test | 15 + mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test | 191 + mysql-test/suite/ndb/t/ndb_binlog_discover.test | 36 + .../suite/ndb/t/ndb_binlog_ignore_db-master.opt | 1 + mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test | 16 + mysql-test/suite/ndb/t/ndb_binlog_log_bin.test | 50 + mysql-test/suite/ndb/t/ndb_binlog_multi.test | 83 + mysql-test/suite/ndb/t/ndb_bitfield.test | 124 + mysql-test/suite/ndb/t/ndb_blob.test | 499 + mysql-test/suite/ndb/t/ndb_blob_partition.test | 97 + mysql-test/suite/ndb/t/ndb_cache.test | 122 + mysql-test/suite/ndb/t/ndb_cache2.test | 361 + mysql-test/suite/ndb/t/ndb_cache_multi.test | 72 + mysql-test/suite/ndb/t/ndb_cache_multi2.test | 126 + mysql-test/suite/ndb/t/ndb_charset.test | 257 + mysql-test/suite/ndb/t/ndb_condition_pushdown.test | 1756 +++ mysql-test/suite/ndb/t/ndb_config.test | 23 + mysql-test/suite/ndb/t/ndb_config2.test | 7 + mysql-test/suite/ndb/t/ndb_cursor.test | 47 + mysql-test/suite/ndb/t/ndb_database.test | 24 + mysql-test/suite/ndb/t/ndb_dd_alter.test | 274 + mysql-test/suite/ndb/t/ndb_dd_backuprestore.test | 349 + mysql-test/suite/ndb/t/ndb_dd_basic.test | 454 + mysql-test/suite/ndb/t/ndb_dd_ddl.test | 363 + mysql-test/suite/ndb/t/ndb_dd_disk2memory.test | 292 + mysql-test/suite/ndb/t/ndb_dd_dump.test | 288 + mysql-test/suite/ndb/t/ndb_dd_sql_features.test | 551 + mysql-test/suite/ndb/t/ndb_gis.test | 5 + mysql-test/suite/ndb/t/ndb_grant.later | 385 + mysql-test/suite/ndb/t/ndb_index.test | 131 + mysql-test/suite/ndb/t/ndb_index_ordered.test | 480 + mysql-test/suite/ndb/t/ndb_index_unique.test | 361 + mysql-test/suite/ndb/t/ndb_insert.test | 779 ++ mysql-test/suite/ndb/t/ndb_limit.test | 85 + mysql-test/suite/ndb/t/ndb_load.test | 24 + mysql-test/suite/ndb/t/ndb_loaddatalocal.test | 70 + mysql-test/suite/ndb/t/ndb_lock.test | 269 + mysql-test/suite/ndb/t/ndb_minmax.test | 65 + mysql-test/suite/ndb/t/ndb_multi.test | 126 + mysql-test/suite/ndb/t/ndb_multi_row.test | 76 + mysql-test/suite/ndb/t/ndb_partition_error.test | 74 + .../suite/ndb/t/ndb_partition_error2-master.opt | 1 + mysql-test/suite/ndb/t/ndb_partition_error2.test | 14 + mysql-test/suite/ndb/t/ndb_partition_key.test | 229 + mysql-test/suite/ndb/t/ndb_partition_list.test | 68 + mysql-test/suite/ndb/t/ndb_partition_range.test | 264 + mysql-test/suite/ndb/t/ndb_read_multi_range.test | 319 + mysql-test/suite/ndb/t/ndb_rename.test | 36 + mysql-test/suite/ndb/t/ndb_replace.test | 104 + mysql-test/suite/ndb/t/ndb_restore.test | 403 + mysql-test/suite/ndb/t/ndb_restore_compat.test | 61 + .../suite/ndb/t/ndb_restore_partition-master.opt | 1 + mysql-test/suite/ndb/t/ndb_restore_partition.test | 375 + mysql-test/suite/ndb/t/ndb_restore_print.test | 189 + mysql-test/suite/ndb/t/ndb_row_format.test | 86 + mysql-test/suite/ndb/t/ndb_single_user.test | 174 + mysql-test/suite/ndb/t/ndb_sp.test | 42 + mysql-test/suite/ndb/t/ndb_subquery.test | 79 + mysql-test/suite/ndb/t/ndb_temporary.test | 38 + mysql-test/suite/ndb/t/ndb_transaction.test | 298 + mysql-test/suite/ndb/t/ndb_trigger.test | 221 + mysql-test/suite/ndb/t/ndb_truncate.test | 41 + mysql-test/suite/ndb/t/ndb_types.test | 85 + mysql-test/suite/ndb/t/ndb_update.test | 41 + mysql-test/suite/ndb/t/ndb_view.test | 29 + mysql-test/suite/ndb/t/ndbapi.test | 44 + mysql-test/suite/ndb/t/partition_03ndb.test | 26 + mysql-test/suite/ndb/t/ps_7ndb.test | 25 + mysql-test/suite/ndb/t/strict_autoinc_5ndb.test | 10 + mysql-test/suite/rpl/r/rpl000001.a.result | 3 + mysql-test/suite/rpl/r/rpl000001.b.result | 2 + mysql-test/suite/rpl/r/rpl000010.result | 14 + mysql-test/suite/rpl/r/rpl000011.result | 16 + mysql-test/suite/rpl/r/rpl000013.result | 28 + mysql-test/suite/rpl/r/rpl000017.result | 18 + mysql-test/suite/rpl/r/rpl_000015.result | 34 + mysql-test/suite/rpl/r/rpl_EE_err.result | 11 + mysql-test/suite/rpl/r/rpl_LD_INFILE.result | 117 + mysql-test/suite/rpl/r/rpl_alter.result | 21 + mysql-test/suite/rpl/r/rpl_alter_db.result | 8 + mysql-test/suite/rpl/r/rpl_auto_increment.result | 229 + .../suite/rpl/r/rpl_auto_increment_11932.result | 47 + mysql-test/suite/rpl/r/rpl_bit.result | 138 + mysql-test/suite/rpl/r/rpl_bit_npk.result | 169 + mysql-test/suite/rpl/r/rpl_change_master.result | 26 + mysql-test/suite/rpl/r/rpl_charset_sjis.result | 26 + .../suite/rpl/r/rpl_commit_after_flush.result | 13 + mysql-test/suite/rpl/r/rpl_create_database.result | 70 + mysql-test/suite/rpl/r/rpl_critical_errors.result | 1 + .../suite/rpl/r/rpl_critical_errors.result.txt | 56 + mysql-test/suite/rpl/r/rpl_ddl.result | 1616 +++ mysql-test/suite/rpl/r/rpl_deadlock_innodb.result | 199 + mysql-test/suite/rpl/r/rpl_delete_no_where.result | 15 + mysql-test/suite/rpl/r/rpl_do_grant.result | 91 + mysql-test/suite/rpl/r/rpl_drop.result | 10 + mysql-test/suite/rpl/r/rpl_drop_db.result | 38 + mysql-test/suite/rpl/r/rpl_drop_temp.result | 13 + mysql-test/suite/rpl/r/rpl_dual_pos_advance.result | 22 + .../suite/rpl/r/rpl_empty_master_crash.result | 12 + mysql-test/suite/rpl/r/rpl_err_ignoredtable.result | 42 + mysql-test/suite/rpl/r/rpl_events.result | 165 + mysql-test/suite/rpl/r/rpl_extraCol_innodb.result | 749 ++ mysql-test/suite/rpl/r/rpl_extraCol_myisam.result | 749 ++ mysql-test/suite/rpl/r/rpl_failed_optimize.result | 24 + mysql-test/suite/rpl/r/rpl_flushlog_loop.result | 54 + .../suite/rpl/r/rpl_foreign_key_innodb.result | 42 + mysql-test/suite/rpl/r/rpl_free_items.result | 10 + mysql-test/suite/rpl/r/rpl_get_lock.result | 35 + mysql-test/suite/rpl/r/rpl_ignore_grant.result | 37 + mysql-test/suite/rpl/r/rpl_ignore_revoke.result | 30 + mysql-test/suite/rpl/r/rpl_ignore_table.result | 140 + .../suite/rpl/r/rpl_ignore_table_update.result | 23 + mysql-test/suite/rpl/r/rpl_incident.result | 106 + mysql-test/suite/rpl/r/rpl_init_slave.result | 27 + mysql-test/suite/rpl/r/rpl_innodb.result | 37 + mysql-test/suite/rpl/r/rpl_insert.result | 23 + mysql-test/suite/rpl/r/rpl_insert_id.result | 538 + mysql-test/suite/rpl/r/rpl_insert_id_pk.result | 76 + mysql-test/suite/rpl/r/rpl_insert_ignore.result | 70 + mysql-test/suite/rpl/r/rpl_insert_select.result | 17 + .../suite/rpl/r/rpl_known_bugs_detection.result | 135 + mysql-test/suite/rpl/r/rpl_load_from_master.result | 139 + .../suite/rpl/r/rpl_load_table_from_master.result | 51 + mysql-test/suite/rpl/r/rpl_loaddata.result | 92 + mysql-test/suite/rpl/r/rpl_loaddata_charset.result | 37 + mysql-test/suite/rpl/r/rpl_loaddata_m.result | 38 + mysql-test/suite/rpl/r/rpl_loaddata_s.result | 15 + mysql-test/suite/rpl/r/rpl_loaddata_simple.result | 153 + mysql-test/suite/rpl/r/rpl_loaddatalocal.result | 31 + mysql-test/suite/rpl/r/rpl_loadfile.result | 227 + mysql-test/suite/rpl/r/rpl_locale.result | 20 + mysql-test/suite/rpl/r/rpl_log_pos.result | 99 + mysql-test/suite/rpl/r/rpl_many_optimize.result | 9 + mysql-test/suite/rpl/r/rpl_master_pos_wait.result | 18 + mysql-test/suite/rpl/r/rpl_misc_functions.result | 46 + mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result | 46 + mysql-test/suite/rpl/r/rpl_multi_delete.result | 22 + mysql-test/suite/rpl/r/rpl_multi_delete2.result | 44 + mysql-test/suite/rpl/r/rpl_multi_engine.result | 366 + mysql-test/suite/rpl/r/rpl_multi_update.result | 27 + mysql-test/suite/rpl/r/rpl_multi_update2.result | 55 + mysql-test/suite/rpl/r/rpl_multi_update3.result | 197 + mysql-test/suite/rpl/r/rpl_multi_update4.result | 25 + mysql-test/suite/rpl/r/rpl_optimize.result | 27 + mysql-test/suite/rpl/r/rpl_packet.result | 32 + mysql-test/suite/rpl/r/rpl_ps.result | 30 + mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result | 67 + mysql-test/suite/rpl/r/rpl_read_only.result | 116 + mysql-test/suite/rpl/r/rpl_redirect.result | 41 + .../suite/rpl/r/rpl_relay_space_innodb.result | 25 + .../suite/rpl/r/rpl_relay_space_myisam.result | 25 + mysql-test/suite/rpl/r/rpl_relayrotate.result | 16 + mysql-test/suite/rpl/r/rpl_relayspace.result | 19 + mysql-test/suite/rpl/r/rpl_replicate_do.result | 77 + .../suite/rpl/r/rpl_replicate_ignore_db.result | 23 + mysql-test/suite/rpl/r/rpl_rewrt_db.result | 94 + mysql-test/suite/rpl/r/rpl_rotate_logs.result | 97 + mysql-test/suite/rpl/r/rpl_row_001.result | 55 + mysql-test/suite/rpl/r/rpl_row_4_bytes.result | 27 + mysql-test/suite/rpl/r/rpl_row_NOW.result | 29 + mysql-test/suite/rpl/r/rpl_row_USER.result | 38 + mysql-test/suite/rpl/r/rpl_row_UUID.result | 40 + .../suite/rpl/r/rpl_row_basic_11bugs-master.opt | 1 + .../suite/rpl/r/rpl_row_basic_11bugs-slave.opt | 1 + mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result | 220 + .../suite/rpl/r/rpl_row_basic_2myisam.result | 418 + .../suite/rpl/r/rpl_row_basic_3innodb.result | 418 + .../suite/rpl/r/rpl_row_basic_8partition.result | 655 ++ mysql-test/suite/rpl/r/rpl_row_blob_innodb.result | 156 + mysql-test/suite/rpl/r/rpl_row_blob_myisam.result | 156 + mysql-test/suite/rpl/r/rpl_row_charset.result | 201 + mysql-test/suite/rpl/r/rpl_row_create_table.result | 403 + mysql-test/suite/rpl/r/rpl_row_delayed_ins.result | 32 + mysql-test/suite/rpl/r/rpl_row_drop.result | 56 + .../suite/rpl/r/rpl_row_err_ignoredtable.result | 44 + mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result | 33 + mysql-test/suite/rpl/r/rpl_row_func001.result | 30 + mysql-test/suite/rpl/r/rpl_row_func002.result | 26 + mysql-test/suite/rpl/r/rpl_row_func003.result | 29 + mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result | 55 + .../suite/rpl/r/rpl_row_insert_delayed.result | 48 + mysql-test/suite/rpl/r/rpl_row_loaddata_m.result | 20 + mysql-test/suite/rpl/r/rpl_row_log.result | 116 + mysql-test/suite/rpl/r/rpl_row_log_innodb.result | 124 + .../suite/rpl/r/rpl_row_max_relay_size.result | 281 + mysql-test/suite/rpl/r/rpl_row_multi_query.result | 37 + mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result | 352 + mysql-test/suite/rpl/r/rpl_row_mystery22.result | 30 + mysql-test/suite/rpl/r/rpl_row_reset_slave.result | 32 + mysql-test/suite/rpl/r/rpl_row_sp001.result | 85 + mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result | 239 + mysql-test/suite/rpl/r/rpl_row_sp003.result | 49 + mysql-test/suite/rpl/r/rpl_row_sp005.result | 100 + mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result | 46 + mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result | 50 + mysql-test/suite/rpl/r/rpl_row_sp008.result | 34 + mysql-test/suite/rpl/r/rpl_row_sp009.result | 77 + mysql-test/suite/rpl/r/rpl_row_sp010.result | 56 + mysql-test/suite/rpl/r/rpl_row_sp011.result | 69 + mysql-test/suite/rpl/r/rpl_row_sp012.result | 59 + mysql-test/suite/rpl/r/rpl_row_stop_middle.result | 26 + .../suite/rpl/r/rpl_row_stop_middle_update.result | 16 + .../suite/rpl/r/rpl_row_tabledefs_2myisam.result | 389 + .../suite/rpl/r/rpl_row_tabledefs_3innodb.result | 389 + .../suite/rpl/r/rpl_row_tabledefs_7ndb.result | 288 + mysql-test/suite/rpl/r/rpl_row_trig001.result | 30 + mysql-test/suite/rpl/r/rpl_row_trig002.result | 69 + mysql-test/suite/rpl/r/rpl_row_trig003.result | 83 + mysql-test/suite/rpl/r/rpl_row_trig004.result | 30 + mysql-test/suite/rpl/r/rpl_row_until.result | 190 + mysql-test/suite/rpl/r/rpl_row_view01.result | 101 + mysql-test/suite/rpl/r/rpl_server_id1.result | 19 + mysql-test/suite/rpl/r/rpl_server_id2.result | 21 + mysql-test/suite/rpl/r/rpl_session_var.result | 43 + mysql-test/suite/rpl/r/rpl_set_charset.result | 48 + mysql-test/suite/rpl/r/rpl_sf.result | 23 + mysql-test/suite/rpl/r/rpl_skip_error.result | 16 + mysql-test/suite/rpl/r/rpl_slave_status.result | 58 + mysql-test/suite/rpl/r/rpl_sp.result | 536 + mysql-test/suite/rpl/r/rpl_sp004.result | 93 + mysql-test/suite/rpl/r/rpl_sp_effects.result | 238 + mysql-test/suite/rpl/r/rpl_sporadic_master.result | 26 + mysql-test/suite/rpl/r/rpl_ssl.result | 99 + mysql-test/suite/rpl/r/rpl_ssl1.result | 146 + mysql-test/suite/rpl/r/rpl_start_stop_slave.result | 12 + mysql-test/suite/rpl/r/rpl_stm_000001.result | 82 + mysql-test/suite/rpl/r/rpl_stm_EE_err2.result | 13 + mysql-test/suite/rpl/r/rpl_stm_charset.result | 270 + mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result | 33 + .../suite/rpl/r/rpl_stm_insert_delayed.result | 88 + mysql-test/suite/rpl/r/rpl_stm_log.result | 115 + .../suite/rpl/r/rpl_stm_max_relay_size.result | 279 + mysql-test/suite/rpl/r/rpl_stm_multi_query.result | 32 + mysql-test/suite/rpl/r/rpl_stm_mystery22.result | 31 + mysql-test/suite/rpl/r/rpl_stm_no_op.result | 52 + mysql-test/suite/rpl/r/rpl_stm_reset_slave.result | 32 + mysql-test/suite/rpl/r/rpl_stm_until.result | 190 + .../suite/rpl/r/rpl_switch_stm_row_mixed.result | 1017 ++ mysql-test/suite/rpl/r/rpl_temp_table.result | 48 + mysql-test/suite/rpl/r/rpl_temporary.result | 106 + mysql-test/suite/rpl/r/rpl_timezone.result | 107 + mysql-test/suite/rpl/r/rpl_trigger.result | 973 ++ mysql-test/suite/rpl/r/rpl_trunc_temp.result | 22 + mysql-test/suite/rpl/r/rpl_truncate_2myisam.result | 196 + mysql-test/suite/rpl/r/rpl_truncate_3innodb.result | 208 + mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result | 91 + mysql-test/suite/rpl/r/rpl_udf.result | 310 + mysql-test/suite/rpl/r/rpl_user_variables.result | 266 + mysql-test/suite/rpl/r/rpl_variables.result | 19 + mysql-test/suite/rpl/r/rpl_view.result | 104 + mysql-test/suite/rpl/t/disabled.def | 15 + mysql-test/suite/rpl/t/rpl000010-slave.opt | 1 + mysql-test/suite/rpl/t/rpl000010.test | 19 + mysql-test/suite/rpl/t/rpl000011.test | 17 + mysql-test/suite/rpl/t/rpl000013.test | 53 + mysql-test/suite/rpl/t/rpl000017-slave.opt | 1 + mysql-test/suite/rpl/t/rpl000017-slave.sh | 12 + mysql-test/suite/rpl/t/rpl000017.test | 22 + mysql-test/suite/rpl/t/rpl000018-master.opt | 1 + mysql-test/suite/rpl/t/rpl000018-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_000015-slave.sh | 1 + mysql-test/suite/rpl/t/rpl_000015.slave-mi | 1 + mysql-test/suite/rpl/t/rpl_000015.test | 48 + mysql-test/suite/rpl/t/rpl_EE_err.test | 7 + mysql-test/suite/rpl/t/rpl_LD_INFILE.test | 38 + mysql-test/suite/rpl/t/rpl_alter.test | 24 + mysql-test/suite/rpl/t/rpl_alter_db.test | 10 + .../suite/rpl/t/rpl_auto_increment-master.opt | 1 + .../suite/rpl/t/rpl_auto_increment-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_auto_increment.test | 12 + .../suite/rpl/t/rpl_auto_increment_11932.test | 63 + mysql-test/suite/rpl/t/rpl_bit.test | 94 + mysql-test/suite/rpl/t/rpl_bit_npk.test | 116 + mysql-test/suite/rpl/t/rpl_change_master.test | 37 + mysql-test/suite/rpl/t/rpl_charset_sjis.test | 25 + mysql-test/suite/rpl/t/rpl_commit_after_flush.test | 11 + .../suite/rpl/t/rpl_create_database-master.opt | 1 + .../suite/rpl/t/rpl_create_database-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_create_database.test | 72 + mysql-test/suite/rpl/t/rpl_critical_errors.test | 66 + mysql-test/suite/rpl/t/rpl_ddl.test | 32 + .../suite/rpl/t/rpl_deadlock_innodb-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_deadlock_innodb.test | 11 + mysql-test/suite/rpl/t/rpl_delete_no_where.test | 6 + mysql-test/suite/rpl/t/rpl_do_grant.test | 114 + mysql-test/suite/rpl/t/rpl_drop.test | 16 + mysql-test/suite/rpl/t/rpl_drop_db.test | 61 + mysql-test/suite/rpl/t/rpl_drop_temp-slave.opt | 2 + mysql-test/suite/rpl/t/rpl_drop_temp.test | 27 + .../suite/rpl/t/rpl_dual_pos_advance-master.opt | 1 + mysql-test/suite/rpl/t/rpl_dual_pos_advance.test | 114 + .../suite/rpl/t/rpl_empty_master_crash-master.opt | 1 + mysql-test/suite/rpl/t/rpl_empty_master_crash.test | 15 + .../suite/rpl/t/rpl_err_ignoredtable-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_err_ignoredtable.test | 66 + mysql-test/suite/rpl/t/rpl_events.test | 47 + .../suite/rpl/t/rpl_extraCol_innodb-master.opt | 1 + .../suite/rpl/t/rpl_extraCol_innodb-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_extraCol_innodb.test | 13 + mysql-test/suite/rpl/t/rpl_extraCol_myisam.test | 12 + .../suite/rpl/t/rpl_failed_optimize-master.opt | 1 + mysql-test/suite/rpl/t/rpl_failed_optimize.test | 11 + .../suite/rpl/t/rpl_flushlog_loop-master.opt | 1 + mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh | 5 + mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh | 4 + mysql-test/suite/rpl/t/rpl_flushlog_loop.test | 50 + .../suite/rpl/t/rpl_foreign_key_innodb-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test | 11 + mysql-test/suite/rpl/t/rpl_free_items-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_free_items.test | 22 + mysql-test/suite/rpl/t/rpl_get_lock.test | 43 + mysql-test/suite/rpl/t/rpl_ignore_grant-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_ignore_grant.test | 59 + mysql-test/suite/rpl/t/rpl_ignore_revoke-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_ignore_revoke.test | 51 + mysql-test/suite/rpl/t/rpl_ignore_table-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_ignore_table.test | 164 + .../suite/rpl/t/rpl_ignore_table_update-slave.opt | 1 + .../suite/rpl/t/rpl_ignore_table_update.test | 38 + mysql-test/suite/rpl/t/rpl_incident-master.opt | 1 + mysql-test/suite/rpl/t/rpl_incident.test | 42 + mysql-test/suite/rpl/t/rpl_init_slave-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_init_slave.test | 34 + mysql-test/suite/rpl/t/rpl_innodb.test | 48 + mysql-test/suite/rpl/t/rpl_insert.test | 44 + mysql-test/suite/rpl/t/rpl_insert_id-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_insert_id.test | 11 + mysql-test/suite/rpl/t/rpl_insert_id_pk-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_insert_id_pk.test | 11 + mysql-test/suite/rpl/t/rpl_insert_ignore-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_insert_ignore.test | 8 + mysql-test/suite/rpl/t/rpl_insert_select.test | 19 + .../rpl/t/rpl_known_bugs_detection-master.opt | 1 + .../suite/rpl/t/rpl_known_bugs_detection.test | 93 + .../suite/rpl/t/rpl_load_from_master-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_load_from_master.test | 180 + .../suite/rpl/t/rpl_load_table_from_master.test | 98 + mysql-test/suite/rpl/t/rpl_loaddata.test | 7 + mysql-test/suite/rpl/t/rpl_loaddata_charset.test | 33 + mysql-test/suite/rpl/t/rpl_loaddata_m-master.opt | 1 + mysql-test/suite/rpl/t/rpl_loaddata_m.test | 52 + mysql-test/suite/rpl/t/rpl_loaddata_s-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_loaddata_s.test | 28 + mysql-test/suite/rpl/t/rpl_loaddata_simple.test | 14 + mysql-test/suite/rpl/t/rpl_loaddatalocal.test | 65 + mysql-test/suite/rpl/t/rpl_loadfile.test | 52 + mysql-test/suite/rpl/t/rpl_locale.test | 24 + mysql-test/suite/rpl/t/rpl_log_pos.test | 57 + mysql-test/suite/rpl/t/rpl_many_optimize.test | 22 + mysql-test/suite/rpl/t/rpl_master_pos_wait.test | 18 + mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh | 1 + mysql-test/suite/rpl/t/rpl_misc_functions.test | 103 + mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test | 46 + mysql-test/suite/rpl/t/rpl_multi_delete-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_multi_delete.test | 26 + mysql-test/suite/rpl/t/rpl_multi_delete2-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_multi_delete2.test | 68 + mysql-test/suite/rpl/t/rpl_multi_engine-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_multi_engine.test | 108 + mysql-test/suite/rpl/t/rpl_multi_update.test | 7 + mysql-test/suite/rpl/t/rpl_multi_update2-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_multi_update2.test | 9 + mysql-test/suite/rpl/t/rpl_multi_update3.test | 9 + mysql-test/suite/rpl/t/rpl_multi_update4-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_multi_update4.test | 45 + mysql-test/suite/rpl/t/rpl_optimize.test | 54 + mysql-test/suite/rpl/t/rpl_packet-master.opt | 1 + mysql-test/suite/rpl/t/rpl_packet-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_packet.test | 80 + mysql-test/suite/rpl/t/rpl_ps.test | 51 + mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test | 47 + mysql-test/suite/rpl/t/rpl_read_only-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_read_only.test | 113 + mysql-test/suite/rpl/t/rpl_redirect.test | 47 + .../suite/rpl/t/rpl_relay_space_innodb-master.opt | 1 + .../suite/rpl/t/rpl_relay_space_innodb-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_relay_space_innodb.test | 22 + mysql-test/suite/rpl/t/rpl_relay_space_myisam.test | 21 + mysql-test/suite/rpl/t/rpl_relayrotate-slave.opt | 3 + mysql-test/suite/rpl/t/rpl_relayrotate.test | 10 + mysql-test/suite/rpl/t/rpl_relayspace-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_relayspace.test | 34 + mysql-test/suite/rpl/t/rpl_replicate_do-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_replicate_do.test | 92 + .../suite/rpl/t/rpl_replicate_ignore_db-slave.opt | 1 + .../suite/rpl/t/rpl_replicate_ignore_db.test | 30 + mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_rewrt_db.test | 84 + mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt | 1 + mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh | 2 + mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi | 1 + mysql-test/suite/rpl/t/rpl_rotate_logs.test | 175 + mysql-test/suite/rpl/t/rpl_row_001.test | 7 + mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt | 1 + mysql-test/suite/rpl/t/rpl_row_4_bytes.test | 33 + mysql-test/suite/rpl/t/rpl_row_NOW.test | 74 + mysql-test/suite/rpl/t/rpl_row_USER.test | 60 + mysql-test/suite/rpl/t/rpl_row_UUID.test | 7 + .../suite/rpl/t/rpl_row_basic_11bugs-master.opt | 2 + .../suite/rpl/t/rpl_row_basic_11bugs-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test | 186 + mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test | 3 + .../suite/rpl/t/rpl_row_basic_3innodb-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test | 6 + .../suite/rpl/t/rpl_row_basic_8partition.test | 210 + .../suite/rpl/t/rpl_row_blob_innodb-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_blob_innodb.test | 12 + mysql-test/suite/rpl/t/rpl_row_blob_myisam.test | 11 + mysql-test/suite/rpl/t/rpl_row_charset.test | 7 + .../suite/rpl/t/rpl_row_create_table-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_create_table.test | 236 + mysql-test/suite/rpl/t/rpl_row_delayed_ins.test | 7 + mysql-test/suite/rpl/t/rpl_row_drop.test | 48 + .../suite/rpl/t/rpl_row_err_daisychain-master.opt | 1 + .../suite/rpl/t/rpl_row_err_daisychain-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test | 17 + mysql-test/suite/rpl/t/rpl_row_func001.test | 57 + mysql-test/suite/rpl/t/rpl_row_func002.test | 104 + mysql-test/suite/rpl/t/rpl_row_func003-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_func003.test | 11 + .../suite/rpl/t/rpl_row_inexist_tbl-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test | 35 + mysql-test/suite/rpl/t/rpl_row_insert_delayed.test | 14 + mysql-test/suite/rpl/t/rpl_row_log-master.opt | 1 + mysql-test/suite/rpl/t/rpl_row_log-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_log.test | 16 + .../suite/rpl/t/rpl_row_log_innodb-master.opt | 1 + .../suite/rpl/t/rpl_row_log_innodb-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_log_innodb.test | 13 + mysql-test/suite/rpl/t/rpl_row_max_relay_size.test | 11 + .../suite/rpl/t/rpl_row_mysqlbinlog-master.opt | 1 + mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test | 348 + mysql-test/suite/rpl/t/rpl_row_mystery22.test | 45 + mysql-test/suite/rpl/t/rpl_row_reset_slave.test | 5 + mysql-test/suite/rpl/t/rpl_row_sp001.test | 146 + .../suite/rpl/t/rpl_row_sp002_innodb-master.opt | 1 + .../suite/rpl/t/rpl_row_sp002_innodb-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test | 11 + mysql-test/suite/rpl/t/rpl_row_sp003-master.opt | 1 + mysql-test/suite/rpl/t/rpl_row_sp003-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_sp003.test | 11 + mysql-test/suite/rpl/t/rpl_row_sp005.test | 110 + .../suite/rpl/t/rpl_row_sp006_InnoDB-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test | 11 + .../suite/rpl/t/rpl_row_sp007_innodb-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test | 11 + mysql-test/suite/rpl/t/rpl_row_sp008.test | 57 + mysql-test/suite/rpl/t/rpl_row_sp009.test | 105 + mysql-test/suite/rpl/t/rpl_row_sp010.test | 80 + mysql-test/suite/rpl/t/rpl_row_sp011.test | 111 + mysql-test/suite/rpl/t/rpl_row_sp012.test | 75 + mysql-test/suite/rpl/t/rpl_row_stop_middle.test | 44 + .../rpl/t/rpl_row_stop_middle_update-master.opt | 1 + .../rpl/t/rpl_row_stop_middle_update-slave.opt | 1 + .../suite/rpl/t/rpl_row_stop_middle_update.test | 31 + .../suite/rpl/t/rpl_row_tabledefs_2myisam.test | 8 + .../rpl/t/rpl_row_tabledefs_3innodb-slave.opt | 1 + .../suite/rpl/t/rpl_row_tabledefs_3innodb.test | 9 + mysql-test/suite/rpl/t/rpl_row_trig001.test | 100 + mysql-test/suite/rpl/t/rpl_row_trig002.test | 80 + mysql-test/suite/rpl/t/rpl_row_trig003.test | 152 + mysql-test/suite/rpl/t/rpl_row_trig004.test | 18 + mysql-test/suite/rpl/t/rpl_row_until.test | 87 + mysql-test/suite/rpl/t/rpl_row_view01.test | 89 + mysql-test/suite/rpl/t/rpl_server_id1.test | 26 + mysql-test/suite/rpl/t/rpl_server_id2-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_server_id2.test | 26 + mysql-test/suite/rpl/t/rpl_session_var.test | 42 + mysql-test/suite/rpl/t/rpl_set_charset.test | 35 + mysql-test/suite/rpl/t/rpl_sf.test | 70 + mysql-test/suite/rpl/t/rpl_skip_error-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_skip_error.test | 29 + mysql-test/suite/rpl/t/rpl_slave_status.test | 58 + mysql-test/suite/rpl/t/rpl_sp-master.opt | 1 + mysql-test/suite/rpl/t/rpl_sp-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_sp.test | 585 + mysql-test/suite/rpl/t/rpl_sp004.test | 97 + mysql-test/suite/rpl/t/rpl_sp_effects-master.opt | 1 + mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_sp_effects.test | 211 + .../suite/rpl/t/rpl_sporadic_master-master.opt | 1 + mysql-test/suite/rpl/t/rpl_sporadic_master.test | 29 + mysql-test/suite/rpl/t/rpl_ssl.test | 71 + mysql-test/suite/rpl/t/rpl_ssl1.test | 97 + mysql-test/suite/rpl/t/rpl_start_stop_slave.test | 36 + mysql-test/suite/rpl/t/rpl_stm_000001-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_stm_000001.test | 2 + mysql-test/suite/rpl/t/rpl_stm_EE_err2.test | 8 + mysql-test/suite/rpl/t/rpl_stm_charset.test | 2 + mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test | 8 + mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test | 20 + mysql-test/suite/rpl/t/rpl_stm_log-master.opt | 1 + mysql-test/suite/rpl/t/rpl_stm_log-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_stm_log.test | 8 + mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test | 11 + mysql-test/suite/rpl/t/rpl_stm_multi_query.test | 12 + mysql-test/suite/rpl/t/rpl_stm_mystery22.test | 66 + mysql-test/suite/rpl/t/rpl_stm_no_op.test | 93 + mysql-test/suite/rpl/t/rpl_stm_reset_slave.test | 6 + mysql-test/suite/rpl/t/rpl_stm_until.test | 88 + .../suite/rpl/t/rpl_switch_stm_row_mixed.test | 568 + mysql-test/suite/rpl/t/rpl_temp_table.test | 59 + mysql-test/suite/rpl/t/rpl_temporary.test | 215 + mysql-test/suite/rpl/t/rpl_timezone-master.opt | 1 + mysql-test/suite/rpl/t/rpl_timezone-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_timezone.test | 142 + mysql-test/suite/rpl/t/rpl_trigger.test | 477 + mysql-test/suite/rpl/t/rpl_trunc_temp.test | 35 + mysql-test/suite/rpl/t/rpl_truncate_2myisam.test | 4 + mysql-test/suite/rpl/t/rpl_truncate_3innodb.test | 6 + .../suite/rpl/t/rpl_truncate_7ndb_2-master.opt | 1 + mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test | 6 + mysql-test/suite/rpl/t/rpl_udf-master.opt | 1 + mysql-test/suite/rpl/t/rpl_udf-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_udf.test | 22 + mysql-test/suite/rpl/t/rpl_user_variables.test | 362 + mysql-test/suite/rpl/t/rpl_variables-master.opt | 1 + mysql-test/suite/rpl/t/rpl_variables.test | 20 + mysql-test/suite/rpl/t/rpl_view-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_view.test | 167 + mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result | 855 ++ mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result | 855 ++ mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result | 40 + mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result | 170 + mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result | 120 + mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result | 227 + mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result | 135 + mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result | 156 + mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result | 201 + mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result | 95 + .../rpl_ndb/r/rpl_ndb_circular_simplex.result | 97 + .../rpl_ndb/r/rpl_ndb_commit_afterflush.result | 13 + .../suite/rpl_ndb/r/rpl_ndb_dd_advance.result | 417 + mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result | 72 + .../suite/rpl_ndb/r/rpl_ndb_dd_partitions.result | 726 ++ mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result | 1616 +++ .../suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result | 15 + mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result | 58 + mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result | 26 + mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result | 750 ++ mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result | 29 + .../suite/rpl_ndb/r/rpl_ndb_idempotent.result | 73 + .../suite/rpl_ndb/r/rpl_ndb_innodb_trans.result | 103 + .../suite/rpl_ndb/r/rpl_ndb_insert_ignore.result | 70 + mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result | 42 + mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result | 151 + mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result | 55 + .../suite/rpl_ndb/r/rpl_ndb_multi_update2.result | 55 + .../suite/rpl_ndb/r/rpl_ndb_multi_update3.result | 197 + .../suite/rpl_ndb/r/rpl_ndb_relayrotate.result | 16 + .../suite/rpl_ndb/r/rpl_ndb_rep_ignore.result | 54 + mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result | 55 + mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result | 49 + mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result | 46 + .../suite/rpl_ndb/r/rpl_ndb_stm_innodb.result | 37 + mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result | 96 + mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result | 30 + mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result | 8 + .../suite/rpl_ndb/r/rpl_row_basic_7ndb.result | 418 + .../suite/rpl_ndb/r/rpl_truncate_7ndb.result | 95 + mysql-test/suite/rpl_ndb/t/disabled.def | 27 + .../suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt | 1 + .../suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test | 16 + .../suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt | 1 + .../suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test | 13 + mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test | 6 + mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test | 118 + mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test | 181 + mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test | 261 + mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test | 142 + mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test | 9 + mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test | 6 + mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test | 57 + .../suite/rpl_ndb/t/rpl_ndb_circular_simplex.test | 82 + .../suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test | 9 + mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test | 581 + mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test | 85 + .../suite/rpl_ndb/t/rpl_ndb_dd_partitions.test | 310 + mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test | 33 + .../suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test | 8 + mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test | 57 + .../suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test | 46 + mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test | 13 + mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test | 12 + mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test | 117 + .../suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt | 1 + .../suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test | 16 + .../suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt | 1 + .../suite/rpl_ndb/t/rpl_ndb_innodb_trans.test | 66 + .../suite/rpl_ndb/t/rpl_ndb_insert_ignore.test | 8 + mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test | 66 + mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test | 12 + mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test | 71 + .../rpl_ndb/t/rpl_ndb_multi_update2-slave.opt | 1 + .../suite/rpl_ndb/t/rpl_ndb_multi_update2.test | 12 + .../suite/rpl_ndb/t/rpl_ndb_multi_update3.test | 8 + .../suite/rpl_ndb/t/rpl_ndb_myisam2ndb-master.opt | 1 + .../suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test | 15 + .../suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt | 3 + .../suite/rpl_ndb/t/rpl_ndb_relayrotate.test | 8 + .../suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test | 58 + mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test | 6 + mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test | 9 + mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test | 9 + .../suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test | 62 + mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test | 104 + mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test | 15 + mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test | 11 + mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test | 5 + mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test | 71 + mysql-test/t/binlog_killed.test | 248 - mysql-test/t/binlog_row_binlog-master.opt | 1 - mysql-test/t/binlog_row_binlog.test | 5 - mysql-test/t/binlog_row_blackhole.test | 11 - mysql-test/t/binlog_row_ctype_cp932.test | 5 - mysql-test/t/binlog_row_ctype_ucs.test | 6 - mysql-test/t/binlog_row_drop_tmp_tbl.test | 5 - mysql-test/t/binlog_row_innodb_stat-master.opt | 1 - mysql-test/t/binlog_row_innodb_stat.test | 5 - mysql-test/t/binlog_row_insert_select.test | 10 - .../t/binlog_row_mix_innodb_myisam-master.opt | 1 - mysql-test/t/binlog_row_mix_innodb_myisam.test | 32 - mysql-test/t/binlog_statement_insert_delayed.test | 9 - mysql-test/t/binlog_stm_binlog-master.opt | 1 - mysql-test/t/binlog_stm_binlog.test | 18 - mysql-test/t/binlog_stm_blackhole.test | 6 - mysql-test/t/binlog_stm_ctype_cp932.test | 6 - mysql-test/t/binlog_stm_ctype_ucs.test | 6 - mysql-test/t/binlog_stm_drop_tmp_tbl.test | 5 - mysql-test/t/binlog_stm_innodb_stat-master.opt | 1 - mysql-test/t/binlog_stm_innodb_stat.test | 5 - mysql-test/t/binlog_stm_insert_select.test | 5 - .../t/binlog_stm_mix_innodb_myisam-master.opt | 1 - mysql-test/t/binlog_stm_mix_innodb_myisam.test | 24 - mysql-test/t/binlog_stm_ps.test | 26 - mysql-test/t/disabled.def | 23 - mysql-test/t/loaddata_autocom_ndb.test | 4 - mysql-test/t/ndb_alter_table.test | 439 - mysql-test/t/ndb_alter_table2.test | 85 - mysql-test/t/ndb_alter_table3.test | 49 - mysql-test/t/ndb_autodiscover.test | 548 - mysql-test/t/ndb_autodiscover2-master.opt | 1 - mysql-test/t/ndb_autodiscover2.test | 21 - mysql-test/t/ndb_autodiscover3.test | 86 - mysql-test/t/ndb_backup_print.test | 66 - mysql-test/t/ndb_basic.test | 843 -- mysql-test/t/ndb_binlog_basic.test | 72 - mysql-test/t/ndb_binlog_basic2.test | 15 - mysql-test/t/ndb_binlog_ddl_multi.test | 191 - mysql-test/t/ndb_binlog_discover.test | 36 - mysql-test/t/ndb_binlog_ignore_db-master.opt | 1 - mysql-test/t/ndb_binlog_ignore_db.test | 16 - mysql-test/t/ndb_binlog_log_bin.test | 50 - mysql-test/t/ndb_binlog_multi.test | 83 - mysql-test/t/ndb_bitfield.test | 124 - mysql-test/t/ndb_blob.test | 499 - mysql-test/t/ndb_blob_partition.test | 97 - mysql-test/t/ndb_cache.test | 122 - mysql-test/t/ndb_cache2.test | 361 - mysql-test/t/ndb_cache_multi.test | 72 - mysql-test/t/ndb_cache_multi2.test | 126 - mysql-test/t/ndb_charset.test | 257 - mysql-test/t/ndb_condition_pushdown.test | 1756 --- mysql-test/t/ndb_config.test | 23 - mysql-test/t/ndb_config2.test | 7 - mysql-test/t/ndb_cursor.test | 47 - mysql-test/t/ndb_database.test | 24 - mysql-test/t/ndb_dd_alter.test | 274 - mysql-test/t/ndb_dd_backuprestore.test | 349 - mysql-test/t/ndb_dd_basic.test | 454 - mysql-test/t/ndb_dd_ddl.test | 363 - mysql-test/t/ndb_dd_disk2memory.test | 292 - mysql-test/t/ndb_dd_dump.test | 288 - mysql-test/t/ndb_dd_sql_features.test | 551 - mysql-test/t/ndb_gis.test | 5 - mysql-test/t/ndb_grant.later | 385 - mysql-test/t/ndb_index.test | 131 - mysql-test/t/ndb_index_ordered.test | 480 - mysql-test/t/ndb_index_unique.test | 361 - mysql-test/t/ndb_insert.test | 779 -- mysql-test/t/ndb_limit.test | 85 - mysql-test/t/ndb_load.test | 24 - mysql-test/t/ndb_loaddatalocal.test | 70 - mysql-test/t/ndb_lock.test | 269 - mysql-test/t/ndb_minmax.test | 65 - mysql-test/t/ndb_multi.test | 126 - mysql-test/t/ndb_multi_row.test | 76 - mysql-test/t/ndb_partition_error.test | 74 - mysql-test/t/ndb_partition_error2-master.opt | 1 - mysql-test/t/ndb_partition_error2.test | 14 - mysql-test/t/ndb_partition_key.test | 229 - mysql-test/t/ndb_partition_list.test | 68 - mysql-test/t/ndb_partition_range.test | 264 - mysql-test/t/ndb_read_multi_range.test | 319 - mysql-test/t/ndb_rename.test | 36 - mysql-test/t/ndb_replace.test | 104 - mysql-test/t/ndb_restore.test | 403 - mysql-test/t/ndb_restore_compat.test | 61 - mysql-test/t/ndb_restore_partition-master.opt | 1 - mysql-test/t/ndb_restore_partition.test | 375 - mysql-test/t/ndb_restore_print.test | 189 - mysql-test/t/ndb_row_format.test | 86 - mysql-test/t/ndb_single_user.test | 174 - mysql-test/t/ndb_sp.test | 42 - mysql-test/t/ndb_subquery.test | 79 - mysql-test/t/ndb_temporary.test | 38 - mysql-test/t/ndb_transaction.test | 298 - mysql-test/t/ndb_trigger.test | 221 - mysql-test/t/ndb_truncate.test | 41 - mysql-test/t/ndb_types.test | 85 - mysql-test/t/ndb_update.test | 41 - mysql-test/t/ndb_view.test | 29 - mysql-test/t/ndbapi.test | 44 - mysql-test/t/partition_03ndb.test | 26 - mysql-test/t/ps_7ndb.test | 25 - mysql-test/t/rpl000010-slave.opt | 1 - mysql-test/t/rpl000010.test | 19 - mysql-test/t/rpl000011.test | 17 - mysql-test/t/rpl000013.test | 53 - mysql-test/t/rpl000017-slave.opt | 1 - mysql-test/t/rpl000017-slave.sh | 12 - mysql-test/t/rpl000017.test | 22 - mysql-test/t/rpl000018-master.opt | 1 - mysql-test/t/rpl000018-slave.opt | 1 - mysql-test/t/rpl_000015-slave.sh | 1 - mysql-test/t/rpl_000015.slave-mi | 1 - mysql-test/t/rpl_000015.test | 48 - mysql-test/t/rpl_EE_err.test | 7 - mysql-test/t/rpl_LD_INFILE.test | 38 - mysql-test/t/rpl_alter.test | 24 - mysql-test/t/rpl_alter_db.test | 10 - mysql-test/t/rpl_auto_increment-master.opt | 1 - mysql-test/t/rpl_auto_increment-slave.opt | 1 - mysql-test/t/rpl_auto_increment.test | 12 - mysql-test/t/rpl_auto_increment_11932.test | 63 - mysql-test/t/rpl_bit.test | 94 - mysql-test/t/rpl_bit_npk.test | 116 - mysql-test/t/rpl_change_master.test | 37 - mysql-test/t/rpl_charset_sjis.test | 25 - mysql-test/t/rpl_commit_after_flush.test | 11 - mysql-test/t/rpl_create_database-master.opt | 1 - mysql-test/t/rpl_create_database-slave.opt | 1 - mysql-test/t/rpl_create_database.test | 72 - mysql-test/t/rpl_critical_errors.test | 66 - mysql-test/t/rpl_ddl.test | 32 - mysql-test/t/rpl_deadlock_innodb-slave.opt | 1 - mysql-test/t/rpl_deadlock_innodb.test | 11 - mysql-test/t/rpl_delete_no_where.test | 6 - mysql-test/t/rpl_do_grant.test | 114 - mysql-test/t/rpl_drop.test | 16 - mysql-test/t/rpl_drop_db.test | 61 - mysql-test/t/rpl_drop_temp-slave.opt | 2 - mysql-test/t/rpl_drop_temp.test | 27 - mysql-test/t/rpl_dual_pos_advance-master.opt | 1 - mysql-test/t/rpl_dual_pos_advance.test | 114 - mysql-test/t/rpl_empty_master_crash-master.opt | 1 - mysql-test/t/rpl_empty_master_crash.test | 15 - mysql-test/t/rpl_err_ignoredtable-slave.opt | 1 - mysql-test/t/rpl_err_ignoredtable.test | 66 - mysql-test/t/rpl_events.test | 47 - mysql-test/t/rpl_extraCol_innodb-master.opt | 1 - mysql-test/t/rpl_extraCol_innodb-slave.opt | 1 - mysql-test/t/rpl_extraCol_innodb.test | 13 - mysql-test/t/rpl_extraCol_myisam.test | 12 - mysql-test/t/rpl_failed_optimize-master.opt | 1 - mysql-test/t/rpl_failed_optimize.test | 11 - mysql-test/t/rpl_flushlog_loop-master.opt | 1 - mysql-test/t/rpl_flushlog_loop-master.sh | 5 - mysql-test/t/rpl_flushlog_loop-slave.opt | 1 - mysql-test/t/rpl_flushlog_loop-slave.sh | 4 - mysql-test/t/rpl_flushlog_loop.test | 50 - mysql-test/t/rpl_foreign_key_innodb-slave.opt | 1 - mysql-test/t/rpl_foreign_key_innodb.test | 11 - mysql-test/t/rpl_free_items-slave.opt | 1 - mysql-test/t/rpl_free_items.test | 22 - mysql-test/t/rpl_get_lock.test | 43 - mysql-test/t/rpl_ignore_grant-slave.opt | 1 - mysql-test/t/rpl_ignore_grant.test | 59 - mysql-test/t/rpl_ignore_revoke-slave.opt | 1 - mysql-test/t/rpl_ignore_revoke.test | 51 - mysql-test/t/rpl_ignore_table-slave.opt | 1 - mysql-test/t/rpl_ignore_table.test | 164 - mysql-test/t/rpl_ignore_table_update-slave.opt | 1 - mysql-test/t/rpl_ignore_table_update.test | 38 - mysql-test/t/rpl_incident-master.opt | 1 - mysql-test/t/rpl_incident.test | 42 - mysql-test/t/rpl_init_slave-slave.opt | 1 - mysql-test/t/rpl_init_slave.test | 34 - mysql-test/t/rpl_innodb.test | 48 - mysql-test/t/rpl_insert.test | 44 - mysql-test/t/rpl_insert_id-slave.opt | 1 - mysql-test/t/rpl_insert_id.test | 11 - mysql-test/t/rpl_insert_id_pk-slave.opt | 1 - mysql-test/t/rpl_insert_id_pk.test | 11 - mysql-test/t/rpl_insert_ignore-slave.opt | 1 - mysql-test/t/rpl_insert_ignore.test | 8 - mysql-test/t/rpl_insert_select.test | 19 - mysql-test/t/rpl_known_bugs_detection-master.opt | 1 - mysql-test/t/rpl_known_bugs_detection.test | 93 - mysql-test/t/rpl_load_from_master-slave.opt | 1 - mysql-test/t/rpl_load_from_master.test | 180 - mysql-test/t/rpl_load_table_from_master.test | 98 - mysql-test/t/rpl_loaddata.test | 7 - mysql-test/t/rpl_loaddata_charset.test | 33 - mysql-test/t/rpl_loaddata_m-master.opt | 1 - mysql-test/t/rpl_loaddata_m.test | 52 - mysql-test/t/rpl_loaddata_s-slave.opt | 1 - mysql-test/t/rpl_loaddata_s.test | 28 - mysql-test/t/rpl_loaddata_simple.test | 14 - mysql-test/t/rpl_loaddatalocal.test | 65 - mysql-test/t/rpl_loadfile.test | 52 - mysql-test/t/rpl_locale.test | 24 - mysql-test/t/rpl_log_pos.test | 57 - mysql-test/t/rpl_many_optimize.test | 22 - mysql-test/t/rpl_master_pos_wait.test | 18 - mysql-test/t/rpl_misc_functions-slave.sh | 1 - mysql-test/t/rpl_misc_functions.test | 103 - mysql-test/t/rpl_mixed_ddl_dml.test | 46 - mysql-test/t/rpl_multi_delete-slave.opt | 1 - mysql-test/t/rpl_multi_delete.test | 26 - mysql-test/t/rpl_multi_delete2-slave.opt | 1 - mysql-test/t/rpl_multi_delete2.test | 68 - mysql-test/t/rpl_multi_engine-slave.opt | 1 - mysql-test/t/rpl_multi_engine.test | 108 - mysql-test/t/rpl_multi_update.test | 7 - mysql-test/t/rpl_multi_update2-slave.opt | 1 - mysql-test/t/rpl_multi_update2.test | 9 - mysql-test/t/rpl_multi_update3.test | 9 - mysql-test/t/rpl_multi_update4-slave.opt | 1 - mysql-test/t/rpl_multi_update4.test | 45 - mysql-test/t/rpl_ndb_2innodb-master.opt | 1 - mysql-test/t/rpl_ndb_2innodb-slave.opt | 1 - mysql-test/t/rpl_ndb_2innodb.test | 16 - mysql-test/t/rpl_ndb_2myisam-master.opt | 1 - mysql-test/t/rpl_ndb_2myisam-slave.opt | 1 - mysql-test/t/rpl_ndb_2myisam.test | 13 - mysql-test/t/rpl_ndb_UUID.test | 6 - mysql-test/t/rpl_ndb_auto_inc.test | 118 - mysql-test/t/rpl_ndb_bank.test | 181 - mysql-test/t/rpl_ndb_basic.test | 261 - mysql-test/t/rpl_ndb_blob.test | 142 - mysql-test/t/rpl_ndb_blob2.test | 9 - mysql-test/t/rpl_ndb_charset.test | 6 - mysql-test/t/rpl_ndb_circular.test | 57 - mysql-test/t/rpl_ndb_circular_simplex.test | 82 - mysql-test/t/rpl_ndb_commit_afterflush.test | 9 - mysql-test/t/rpl_ndb_dd_advance.test | 581 - mysql-test/t/rpl_ndb_dd_basic.test | 85 - mysql-test/t/rpl_ndb_dd_partitions.test | 310 - mysql-test/t/rpl_ndb_ddl.test | 33 - mysql-test/t/rpl_ndb_delete_nowhere.test | 8 - mysql-test/t/rpl_ndb_do_db-slave.opt | 1 - mysql-test/t/rpl_ndb_do_db.test | 57 - mysql-test/t/rpl_ndb_do_table-slave.opt | 1 - mysql-test/t/rpl_ndb_do_table.test | 46 - mysql-test/t/rpl_ndb_extraCol.test | 13 - mysql-test/t/rpl_ndb_func003.test | 12 - mysql-test/t/rpl_ndb_idempotent.test | 117 - mysql-test/t/rpl_ndb_innodb2ndb-master.opt | 1 - mysql-test/t/rpl_ndb_innodb2ndb-slave.opt | 1 - mysql-test/t/rpl_ndb_innodb2ndb.test | 16 - mysql-test/t/rpl_ndb_innodb_trans-slave.opt | 1 - mysql-test/t/rpl_ndb_innodb_trans.test | 66 - mysql-test/t/rpl_ndb_insert_ignore.test | 8 - mysql-test/t/rpl_ndb_load.test | 66 - mysql-test/t/rpl_ndb_log-master.opt | 1 - mysql-test/t/rpl_ndb_log.test | 12 - mysql-test/t/rpl_ndb_multi.test | 71 - mysql-test/t/rpl_ndb_multi_update2-slave.opt | 1 - mysql-test/t/rpl_ndb_multi_update2.test | 12 - mysql-test/t/rpl_ndb_multi_update3.test | 8 - mysql-test/t/rpl_ndb_myisam2ndb-master.opt | 1 - mysql-test/t/rpl_ndb_myisam2ndb-slave.opt | 1 - mysql-test/t/rpl_ndb_myisam2ndb.test | 15 - mysql-test/t/rpl_ndb_relayrotate-slave.opt | 3 - mysql-test/t/rpl_ndb_relayrotate.test | 8 - mysql-test/t/rpl_ndb_rep_ignore-slave.opt | 1 - mysql-test/t/rpl_ndb_rep_ignore.test | 58 - mysql-test/t/rpl_ndb_row_001.test | 6 - mysql-test/t/rpl_ndb_sp003.test | 9 - mysql-test/t/rpl_ndb_sp006.test | 9 - mysql-test/t/rpl_ndb_stm_innodb-master.opt | 1 - mysql-test/t/rpl_ndb_stm_innodb.test | 62 - mysql-test/t/rpl_ndb_sync.test | 104 - mysql-test/t/rpl_ndb_trig004.test | 15 - mysql-test/t/rpl_ndbapi_multi.test | 11 - mysql-test/t/rpl_optimize.test | 54 - mysql-test/t/rpl_packet-master.opt | 1 - mysql-test/t/rpl_packet-slave.opt | 1 - mysql-test/t/rpl_packet.test | 80 - mysql-test/t/rpl_ps.test | 51 - mysql-test/t/rpl_rbr_to_sbr.test | 47 - mysql-test/t/rpl_read_only-slave.opt | 1 - mysql-test/t/rpl_read_only.test | 113 - mysql-test/t/rpl_redirect.test | 47 - mysql-test/t/rpl_relay_space_innodb-master.opt | 1 - mysql-test/t/rpl_relay_space_innodb-slave.opt | 1 - mysql-test/t/rpl_relay_space_innodb.test | 22 - mysql-test/t/rpl_relay_space_myisam.test | 21 - mysql-test/t/rpl_relayrotate-slave.opt | 3 - mysql-test/t/rpl_relayrotate.test | 10 - mysql-test/t/rpl_relayspace-slave.opt | 1 - mysql-test/t/rpl_relayspace.test | 34 - mysql-test/t/rpl_replicate_do-slave.opt | 1 - mysql-test/t/rpl_replicate_do.test | 92 - mysql-test/t/rpl_replicate_ignore_db-slave.opt | 1 - mysql-test/t/rpl_replicate_ignore_db.test | 30 - mysql-test/t/rpl_rewrt_db-slave.opt | 1 - mysql-test/t/rpl_rewrt_db.test | 84 - mysql-test/t/rpl_rotate_logs-master.opt | 1 - mysql-test/t/rpl_rotate_logs-slave.sh | 2 - mysql-test/t/rpl_rotate_logs.slave-mi | 1 - mysql-test/t/rpl_rotate_logs.test | 175 - mysql-test/t/rpl_row_001.test | 7 - mysql-test/t/rpl_row_4_bytes-master.opt | 1 - mysql-test/t/rpl_row_4_bytes.test | 33 - mysql-test/t/rpl_row_NOW.test | 74 - mysql-test/t/rpl_row_USER.test | 60 - mysql-test/t/rpl_row_UUID.test | 7 - mysql-test/t/rpl_row_basic_11bugs-master.opt | 2 - mysql-test/t/rpl_row_basic_11bugs-slave.opt | 1 - mysql-test/t/rpl_row_basic_11bugs.test | 186 - mysql-test/t/rpl_row_basic_2myisam.test | 3 - mysql-test/t/rpl_row_basic_3innodb-slave.opt | 1 - mysql-test/t/rpl_row_basic_3innodb.test | 6 - mysql-test/t/rpl_row_basic_7ndb.test | 5 - mysql-test/t/rpl_row_basic_8partition.test | 210 - mysql-test/t/rpl_row_blob_innodb-slave.opt | 1 - mysql-test/t/rpl_row_blob_innodb.test | 12 - mysql-test/t/rpl_row_blob_myisam.test | 11 - mysql-test/t/rpl_row_charset.test | 7 - mysql-test/t/rpl_row_create_table-slave.opt | 1 - mysql-test/t/rpl_row_create_table.test | 236 - mysql-test/t/rpl_row_delayed_ins.test | 7 - mysql-test/t/rpl_row_drop.test | 48 - mysql-test/t/rpl_row_err_daisychain-master.opt | 1 - mysql-test/t/rpl_row_err_daisychain-slave.opt | 1 - mysql-test/t/rpl_row_flsh_tbls.test | 17 - mysql-test/t/rpl_row_func001.test | 57 - mysql-test/t/rpl_row_func002.test | 104 - mysql-test/t/rpl_row_func003-slave.opt | 1 - mysql-test/t/rpl_row_func003.test | 11 - mysql-test/t/rpl_row_inexist_tbl-slave.opt | 1 - mysql-test/t/rpl_row_inexist_tbl.test | 35 - mysql-test/t/rpl_row_insert_delayed.test | 14 - mysql-test/t/rpl_row_log-master.opt | 1 - mysql-test/t/rpl_row_log-slave.opt | 1 - mysql-test/t/rpl_row_log.test | 16 - mysql-test/t/rpl_row_log_innodb-master.opt | 1 - mysql-test/t/rpl_row_log_innodb-slave.opt | 1 - mysql-test/t/rpl_row_log_innodb.test | 13 - mysql-test/t/rpl_row_max_relay_size.test | 11 - mysql-test/t/rpl_row_mysqlbinlog-master.opt | 1 - mysql-test/t/rpl_row_mysqlbinlog.test | 348 - mysql-test/t/rpl_row_mystery22.test | 45 - mysql-test/t/rpl_row_reset_slave.test | 5 - mysql-test/t/rpl_row_sp001.test | 146 - mysql-test/t/rpl_row_sp002_innodb-master.opt | 1 - mysql-test/t/rpl_row_sp002_innodb-slave.opt | 1 - mysql-test/t/rpl_row_sp002_innodb.test | 11 - mysql-test/t/rpl_row_sp003-master.opt | 1 - mysql-test/t/rpl_row_sp003-slave.opt | 1 - mysql-test/t/rpl_row_sp003.test | 11 - mysql-test/t/rpl_row_sp005.test | 110 - mysql-test/t/rpl_row_sp006_InnoDB-slave.opt | 1 - mysql-test/t/rpl_row_sp006_InnoDB.test | 11 - mysql-test/t/rpl_row_sp007_innodb-slave.opt | 1 - mysql-test/t/rpl_row_sp007_innodb.test | 11 - mysql-test/t/rpl_row_sp008.test | 57 - mysql-test/t/rpl_row_sp009.test | 105 - mysql-test/t/rpl_row_sp010.test | 80 - mysql-test/t/rpl_row_sp011.test | 111 - mysql-test/t/rpl_row_sp012.test | 75 - mysql-test/t/rpl_row_stop_middle.test | 44 - mysql-test/t/rpl_row_stop_middle_update-master.opt | 1 - mysql-test/t/rpl_row_stop_middle_update-slave.opt | 1 - mysql-test/t/rpl_row_stop_middle_update.test | 31 - mysql-test/t/rpl_row_tabledefs_2myisam.test | 8 - mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt | 1 - mysql-test/t/rpl_row_tabledefs_3innodb.test | 9 - mysql-test/t/rpl_row_trig001.test | 100 - mysql-test/t/rpl_row_trig002.test | 80 - mysql-test/t/rpl_row_trig003.test | 152 - mysql-test/t/rpl_row_trig004.test | 18 - mysql-test/t/rpl_row_until.test | 87 - mysql-test/t/rpl_row_view01.test | 89 - mysql-test/t/rpl_server_id1.test | 26 - mysql-test/t/rpl_server_id2-slave.opt | 1 - mysql-test/t/rpl_server_id2.test | 26 - mysql-test/t/rpl_session_var.test | 42 - mysql-test/t/rpl_set_charset.test | 35 - mysql-test/t/rpl_sf.test | 70 - mysql-test/t/rpl_skip_error-slave.opt | 1 - mysql-test/t/rpl_skip_error.test | 29 - mysql-test/t/rpl_slave_status.test | 58 - mysql-test/t/rpl_sp-master.opt | 1 - mysql-test/t/rpl_sp-slave.opt | 1 - mysql-test/t/rpl_sp.test | 585 - mysql-test/t/rpl_sp004.test | 97 - mysql-test/t/rpl_sp_effects-master.opt | 1 - mysql-test/t/rpl_sp_effects-slave.opt | 1 - mysql-test/t/rpl_sp_effects.test | 211 - mysql-test/t/rpl_sporadic_master-master.opt | 1 - mysql-test/t/rpl_sporadic_master.test | 29 - mysql-test/t/rpl_ssl.test | 71 - mysql-test/t/rpl_ssl1.test | 97 - mysql-test/t/rpl_start_stop_slave.test | 36 - mysql-test/t/rpl_stm_000001-slave.opt | 1 - mysql-test/t/rpl_stm_000001.test | 2 - mysql-test/t/rpl_stm_EE_err2.test | 8 - mysql-test/t/rpl_stm_charset.test | 2 - mysql-test/t/rpl_stm_flsh_tbls.test | 8 - mysql-test/t/rpl_stm_insert_delayed.test | 20 - mysql-test/t/rpl_stm_log-master.opt | 1 - mysql-test/t/rpl_stm_log-slave.opt | 1 - mysql-test/t/rpl_stm_log.test | 8 - mysql-test/t/rpl_stm_max_relay_size.test | 11 - mysql-test/t/rpl_stm_multi_query.test | 12 - mysql-test/t/rpl_stm_mystery22.test | 66 - mysql-test/t/rpl_stm_no_op.test | 93 - mysql-test/t/rpl_stm_reset_slave.test | 6 - mysql-test/t/rpl_stm_until.test | 88 - mysql-test/t/rpl_switch_stm_row_mixed.test | 568 - mysql-test/t/rpl_temp_table.test | 59 - mysql-test/t/rpl_temporary.test | 215 - mysql-test/t/rpl_timezone-master.opt | 1 - mysql-test/t/rpl_timezone-slave.opt | 1 - mysql-test/t/rpl_timezone.test | 142 - mysql-test/t/rpl_trigger.test | 477 - mysql-test/t/rpl_trunc_temp.test | 35 - mysql-test/t/rpl_truncate_2myisam.test | 4 - mysql-test/t/rpl_truncate_3innodb.test | 6 - mysql-test/t/rpl_truncate_7ndb.test | 71 - mysql-test/t/rpl_truncate_7ndb_2-master.opt | 1 - mysql-test/t/rpl_truncate_7ndb_2.test | 6 - mysql-test/t/rpl_udf-master.opt | 1 - mysql-test/t/rpl_udf-slave.opt | 1 - mysql-test/t/rpl_udf.test | 22 - mysql-test/t/rpl_user_variables.test | 362 - mysql-test/t/rpl_variables-master.opt | 1 - mysql-test/t/rpl_variables.test | 20 - mysql-test/t/rpl_view-slave.opt | 1 - mysql-test/t/rpl_view.test | 167 - mysql-test/t/strict_autoinc_5ndb.test | 10 - 1507 files changed, 106261 insertions(+), 106185 deletions(-) delete mode 100644 mysql-test/r/binlog_killed.result delete mode 100644 mysql-test/r/binlog_row_binlog.result delete mode 100644 mysql-test/r/binlog_row_blackhole.result delete mode 100644 mysql-test/r/binlog_row_ctype_cp932.result delete mode 100644 mysql-test/r/binlog_row_ctype_ucs.result delete mode 100644 mysql-test/r/binlog_row_drop_tmp_tbl.result delete mode 100644 mysql-test/r/binlog_row_innodb_stat.result delete mode 100644 mysql-test/r/binlog_row_insert_select.result delete mode 100644 mysql-test/r/binlog_row_mix_innodb_myisam.result delete mode 100644 mysql-test/r/binlog_statement_insert_delayed.result delete mode 100644 mysql-test/r/binlog_stm_binlog.result delete mode 100644 mysql-test/r/binlog_stm_blackhole.result delete mode 100755 mysql-test/r/binlog_stm_ctype_cp932.result delete mode 100644 mysql-test/r/binlog_stm_ctype_ucs.result delete mode 100644 mysql-test/r/binlog_stm_drop_tmp_tbl.result delete mode 100644 mysql-test/r/binlog_stm_innodb_stat.result delete mode 100644 mysql-test/r/binlog_stm_insert_select.result delete mode 100644 mysql-test/r/binlog_stm_mix_innodb_myisam.result delete mode 100644 mysql-test/r/binlog_stm_ps.result delete mode 100644 mysql-test/r/loaddata_autocom_ndb.result delete mode 100644 mysql-test/r/ndb_alter_table.result delete mode 100644 mysql-test/r/ndb_alter_table2.result delete mode 100644 mysql-test/r/ndb_alter_table3.result delete mode 100644 mysql-test/r/ndb_autodiscover.result delete mode 100644 mysql-test/r/ndb_autodiscover2.result delete mode 100644 mysql-test/r/ndb_autodiscover3.result delete mode 100644 mysql-test/r/ndb_backup_print.result delete mode 100644 mysql-test/r/ndb_basic.result delete mode 100644 mysql-test/r/ndb_binlog_basic.result delete mode 100644 mysql-test/r/ndb_binlog_basic2.result delete mode 100644 mysql-test/r/ndb_binlog_ddl_multi.result delete mode 100644 mysql-test/r/ndb_binlog_discover.result delete mode 100644 mysql-test/r/ndb_binlog_ignore_db.result delete mode 100644 mysql-test/r/ndb_binlog_log_bin.result delete mode 100644 mysql-test/r/ndb_binlog_multi.result delete mode 100644 mysql-test/r/ndb_bitfield.result delete mode 100644 mysql-test/r/ndb_blob.result delete mode 100644 mysql-test/r/ndb_blob_partition.result delete mode 100644 mysql-test/r/ndb_cache.result delete mode 100644 mysql-test/r/ndb_cache2.result delete mode 100644 mysql-test/r/ndb_cache_multi.result delete mode 100644 mysql-test/r/ndb_cache_multi2.result delete mode 100644 mysql-test/r/ndb_charset.result delete mode 100644 mysql-test/r/ndb_condition_pushdown.result delete mode 100644 mysql-test/r/ndb_config.result delete mode 100644 mysql-test/r/ndb_config2.result delete mode 100644 mysql-test/r/ndb_cursor.result delete mode 100644 mysql-test/r/ndb_database.result delete mode 100644 mysql-test/r/ndb_dd_alter.result delete mode 100644 mysql-test/r/ndb_dd_backuprestore.result delete mode 100644 mysql-test/r/ndb_dd_basic.result delete mode 100644 mysql-test/r/ndb_dd_ddl.result delete mode 100644 mysql-test/r/ndb_dd_disk2memory.result delete mode 100644 mysql-test/r/ndb_dd_dump.result delete mode 100644 mysql-test/r/ndb_dd_sql_features.result delete mode 100644 mysql-test/r/ndb_gis.result delete mode 100644 mysql-test/r/ndb_grant.result delete mode 100644 mysql-test/r/ndb_index.result delete mode 100644 mysql-test/r/ndb_index_ordered.result delete mode 100644 mysql-test/r/ndb_index_unique.result delete mode 100644 mysql-test/r/ndb_insert.result delete mode 100644 mysql-test/r/ndb_limit.result delete mode 100644 mysql-test/r/ndb_load.result delete mode 100644 mysql-test/r/ndb_loaddatalocal.result delete mode 100644 mysql-test/r/ndb_lock.result delete mode 100644 mysql-test/r/ndb_minmax.result delete mode 100644 mysql-test/r/ndb_multi.result delete mode 100644 mysql-test/r/ndb_multi_row.result delete mode 100644 mysql-test/r/ndb_partition_error.result delete mode 100644 mysql-test/r/ndb_partition_error2.result delete mode 100644 mysql-test/r/ndb_partition_key.result delete mode 100644 mysql-test/r/ndb_partition_list.result delete mode 100644 mysql-test/r/ndb_partition_range.result delete mode 100644 mysql-test/r/ndb_read_multi_range.result delete mode 100644 mysql-test/r/ndb_rename.result delete mode 100644 mysql-test/r/ndb_replace.result delete mode 100644 mysql-test/r/ndb_restore.result delete mode 100644 mysql-test/r/ndb_restore_compat.result delete mode 100644 mysql-test/r/ndb_restore_partition.result delete mode 100644 mysql-test/r/ndb_restore_print.result delete mode 100644 mysql-test/r/ndb_row_format.result delete mode 100644 mysql-test/r/ndb_single_user.result delete mode 100644 mysql-test/r/ndb_sp.result delete mode 100644 mysql-test/r/ndb_subquery.result delete mode 100644 mysql-test/r/ndb_temporary.result delete mode 100644 mysql-test/r/ndb_transaction.result delete mode 100644 mysql-test/r/ndb_trigger.result delete mode 100644 mysql-test/r/ndb_truncate.result delete mode 100644 mysql-test/r/ndb_types.result delete mode 100644 mysql-test/r/ndb_update.result delete mode 100644 mysql-test/r/ndb_view.result delete mode 100644 mysql-test/r/ndbapi.result delete mode 100644 mysql-test/r/partition_03ndb.result delete mode 100644 mysql-test/r/ps_7ndb.result delete mode 100644 mysql-test/r/rpl000001.a.result delete mode 100644 mysql-test/r/rpl000001.b.result delete mode 100644 mysql-test/r/rpl000010.result delete mode 100644 mysql-test/r/rpl000011.result delete mode 100644 mysql-test/r/rpl000013.result delete mode 100644 mysql-test/r/rpl000017.result delete mode 100644 mysql-test/r/rpl_000015.result delete mode 100644 mysql-test/r/rpl_EE_err.result delete mode 100644 mysql-test/r/rpl_LD_INFILE.result delete mode 100644 mysql-test/r/rpl_alter.result delete mode 100644 mysql-test/r/rpl_alter_db.result delete mode 100644 mysql-test/r/rpl_auto_increment.result delete mode 100644 mysql-test/r/rpl_auto_increment_11932.result delete mode 100644 mysql-test/r/rpl_bit.result delete mode 100644 mysql-test/r/rpl_bit_npk.result delete mode 100644 mysql-test/r/rpl_change_master.result delete mode 100644 mysql-test/r/rpl_charset_sjis.result delete mode 100644 mysql-test/r/rpl_commit_after_flush.result delete mode 100644 mysql-test/r/rpl_create_database.result delete mode 100644 mysql-test/r/rpl_critical_errors.result delete mode 100644 mysql-test/r/rpl_critical_errors.result.txt delete mode 100644 mysql-test/r/rpl_ddl.result delete mode 100644 mysql-test/r/rpl_deadlock_innodb.result delete mode 100644 mysql-test/r/rpl_delete_no_where.result delete mode 100644 mysql-test/r/rpl_do_grant.result delete mode 100644 mysql-test/r/rpl_drop.result delete mode 100644 mysql-test/r/rpl_drop_db.result delete mode 100644 mysql-test/r/rpl_drop_temp.result delete mode 100644 mysql-test/r/rpl_dual_pos_advance.result delete mode 100644 mysql-test/r/rpl_empty_master_crash.result delete mode 100644 mysql-test/r/rpl_err_ignoredtable.result delete mode 100644 mysql-test/r/rpl_events.result delete mode 100644 mysql-test/r/rpl_extraCol_innodb.result delete mode 100644 mysql-test/r/rpl_extraCol_myisam.result delete mode 100644 mysql-test/r/rpl_failed_optimize.result delete mode 100644 mysql-test/r/rpl_flushlog_loop.result delete mode 100644 mysql-test/r/rpl_foreign_key_innodb.result delete mode 100644 mysql-test/r/rpl_free_items.result delete mode 100644 mysql-test/r/rpl_get_lock.result delete mode 100644 mysql-test/r/rpl_ignore_grant.result delete mode 100644 mysql-test/r/rpl_ignore_revoke.result delete mode 100644 mysql-test/r/rpl_ignore_table.result delete mode 100644 mysql-test/r/rpl_ignore_table_update.result delete mode 100644 mysql-test/r/rpl_incident.result delete mode 100644 mysql-test/r/rpl_init_slave.result delete mode 100644 mysql-test/r/rpl_innodb.result delete mode 100644 mysql-test/r/rpl_insert.result delete mode 100644 mysql-test/r/rpl_insert_id.result delete mode 100644 mysql-test/r/rpl_insert_id_pk.result delete mode 100644 mysql-test/r/rpl_insert_ignore.result delete mode 100644 mysql-test/r/rpl_insert_select.result delete mode 100644 mysql-test/r/rpl_known_bugs_detection.result delete mode 100644 mysql-test/r/rpl_load_from_master.result delete mode 100644 mysql-test/r/rpl_load_table_from_master.result delete mode 100644 mysql-test/r/rpl_loaddata.result delete mode 100644 mysql-test/r/rpl_loaddata_charset.result delete mode 100644 mysql-test/r/rpl_loaddata_m.result delete mode 100644 mysql-test/r/rpl_loaddata_s.result delete mode 100644 mysql-test/r/rpl_loaddata_simple.result delete mode 100644 mysql-test/r/rpl_loaddatalocal.result delete mode 100644 mysql-test/r/rpl_loadfile.result delete mode 100644 mysql-test/r/rpl_locale.result delete mode 100644 mysql-test/r/rpl_log_pos.result delete mode 100644 mysql-test/r/rpl_many_optimize.result delete mode 100644 mysql-test/r/rpl_master_pos_wait.result delete mode 100644 mysql-test/r/rpl_misc_functions.result delete mode 100644 mysql-test/r/rpl_mixed_ddl_dml.result delete mode 100644 mysql-test/r/rpl_multi_delete.result delete mode 100644 mysql-test/r/rpl_multi_delete2.result delete mode 100644 mysql-test/r/rpl_multi_engine.result delete mode 100644 mysql-test/r/rpl_multi_update.result delete mode 100644 mysql-test/r/rpl_multi_update2.result delete mode 100644 mysql-test/r/rpl_multi_update3.result delete mode 100644 mysql-test/r/rpl_multi_update4.result delete mode 100644 mysql-test/r/rpl_ndb_2innodb.result delete mode 100644 mysql-test/r/rpl_ndb_2myisam.result delete mode 100644 mysql-test/r/rpl_ndb_UUID.result delete mode 100644 mysql-test/r/rpl_ndb_auto_inc.result delete mode 100644 mysql-test/r/rpl_ndb_bank.result delete mode 100644 mysql-test/r/rpl_ndb_basic.result delete mode 100644 mysql-test/r/rpl_ndb_blob.result delete mode 100644 mysql-test/r/rpl_ndb_blob2.result delete mode 100644 mysql-test/r/rpl_ndb_charset.result delete mode 100644 mysql-test/r/rpl_ndb_circular.result delete mode 100644 mysql-test/r/rpl_ndb_circular_simplex.result delete mode 100644 mysql-test/r/rpl_ndb_commit_afterflush.result delete mode 100644 mysql-test/r/rpl_ndb_dd_advance.result delete mode 100644 mysql-test/r/rpl_ndb_dd_basic.result delete mode 100644 mysql-test/r/rpl_ndb_dd_partitions.result delete mode 100644 mysql-test/r/rpl_ndb_ddl.result delete mode 100644 mysql-test/r/rpl_ndb_delete_nowhere.result delete mode 100644 mysql-test/r/rpl_ndb_do_db.result delete mode 100644 mysql-test/r/rpl_ndb_do_table.result delete mode 100644 mysql-test/r/rpl_ndb_extraCol.result delete mode 100644 mysql-test/r/rpl_ndb_func003.result delete mode 100644 mysql-test/r/rpl_ndb_idempotent.result delete mode 100644 mysql-test/r/rpl_ndb_innodb_trans.result delete mode 100644 mysql-test/r/rpl_ndb_insert_ignore.result delete mode 100644 mysql-test/r/rpl_ndb_load.result delete mode 100644 mysql-test/r/rpl_ndb_log.result delete mode 100644 mysql-test/r/rpl_ndb_multi.result delete mode 100644 mysql-test/r/rpl_ndb_multi_update2.result delete mode 100644 mysql-test/r/rpl_ndb_multi_update3.result delete mode 100644 mysql-test/r/rpl_ndb_relayrotate.result delete mode 100644 mysql-test/r/rpl_ndb_rep_ignore.result delete mode 100644 mysql-test/r/rpl_ndb_row_001.result delete mode 100644 mysql-test/r/rpl_ndb_sp003.result delete mode 100644 mysql-test/r/rpl_ndb_sp006.result delete mode 100644 mysql-test/r/rpl_ndb_stm_innodb.result delete mode 100644 mysql-test/r/rpl_ndb_sync.result delete mode 100644 mysql-test/r/rpl_ndb_trig004.result delete mode 100644 mysql-test/r/rpl_ndbapi_multi.result delete mode 100644 mysql-test/r/rpl_optimize.result delete mode 100644 mysql-test/r/rpl_packet.result delete mode 100644 mysql-test/r/rpl_ps.result delete mode 100644 mysql-test/r/rpl_rbr_to_sbr.result delete mode 100644 mysql-test/r/rpl_read_only.result delete mode 100644 mysql-test/r/rpl_redirect.result delete mode 100644 mysql-test/r/rpl_relay_space_innodb.result delete mode 100644 mysql-test/r/rpl_relay_space_myisam.result delete mode 100644 mysql-test/r/rpl_relayrotate.result delete mode 100644 mysql-test/r/rpl_relayspace.result delete mode 100644 mysql-test/r/rpl_replicate_do.result delete mode 100644 mysql-test/r/rpl_replicate_ignore_db.result delete mode 100644 mysql-test/r/rpl_rewrt_db.result delete mode 100644 mysql-test/r/rpl_rotate_logs.result delete mode 100644 mysql-test/r/rpl_row_001.result delete mode 100644 mysql-test/r/rpl_row_4_bytes.result delete mode 100644 mysql-test/r/rpl_row_NOW.result delete mode 100644 mysql-test/r/rpl_row_USER.result delete mode 100644 mysql-test/r/rpl_row_UUID.result delete mode 100644 mysql-test/r/rpl_row_basic_11bugs-master.opt delete mode 100644 mysql-test/r/rpl_row_basic_11bugs-slave.opt delete mode 100644 mysql-test/r/rpl_row_basic_11bugs.result delete mode 100644 mysql-test/r/rpl_row_basic_2myisam.result delete mode 100644 mysql-test/r/rpl_row_basic_3innodb.result delete mode 100644 mysql-test/r/rpl_row_basic_7ndb.result delete mode 100644 mysql-test/r/rpl_row_basic_8partition.result delete mode 100644 mysql-test/r/rpl_row_blob_innodb.result delete mode 100644 mysql-test/r/rpl_row_blob_myisam.result delete mode 100644 mysql-test/r/rpl_row_charset.result delete mode 100644 mysql-test/r/rpl_row_create_table.result delete mode 100644 mysql-test/r/rpl_row_delayed_ins.result delete mode 100644 mysql-test/r/rpl_row_drop.result delete mode 100644 mysql-test/r/rpl_row_err_ignoredtable.result delete mode 100644 mysql-test/r/rpl_row_flsh_tbls.result delete mode 100644 mysql-test/r/rpl_row_func001.result delete mode 100644 mysql-test/r/rpl_row_func002.result delete mode 100644 mysql-test/r/rpl_row_func003.result delete mode 100644 mysql-test/r/rpl_row_inexist_tbl.result delete mode 100644 mysql-test/r/rpl_row_insert_delayed.result delete mode 100644 mysql-test/r/rpl_row_loaddata_m.result delete mode 100644 mysql-test/r/rpl_row_log.result delete mode 100644 mysql-test/r/rpl_row_log_innodb.result delete mode 100644 mysql-test/r/rpl_row_max_relay_size.result delete mode 100644 mysql-test/r/rpl_row_multi_query.result delete mode 100644 mysql-test/r/rpl_row_mysqlbinlog.result delete mode 100644 mysql-test/r/rpl_row_mystery22.result delete mode 100644 mysql-test/r/rpl_row_reset_slave.result delete mode 100644 mysql-test/r/rpl_row_sp001.result delete mode 100644 mysql-test/r/rpl_row_sp002_innodb.result delete mode 100644 mysql-test/r/rpl_row_sp003.result delete mode 100644 mysql-test/r/rpl_row_sp005.result delete mode 100644 mysql-test/r/rpl_row_sp006_InnoDB.result delete mode 100644 mysql-test/r/rpl_row_sp007_innodb.result delete mode 100644 mysql-test/r/rpl_row_sp008.result delete mode 100644 mysql-test/r/rpl_row_sp009.result delete mode 100644 mysql-test/r/rpl_row_sp010.result delete mode 100644 mysql-test/r/rpl_row_sp011.result delete mode 100644 mysql-test/r/rpl_row_sp012.result delete mode 100644 mysql-test/r/rpl_row_stop_middle.result delete mode 100644 mysql-test/r/rpl_row_stop_middle_update.result delete mode 100644 mysql-test/r/rpl_row_tabledefs_2myisam.result delete mode 100644 mysql-test/r/rpl_row_tabledefs_3innodb.result delete mode 100644 mysql-test/r/rpl_row_tabledefs_7ndb.result delete mode 100644 mysql-test/r/rpl_row_trig001.result delete mode 100644 mysql-test/r/rpl_row_trig002.result delete mode 100644 mysql-test/r/rpl_row_trig003.result delete mode 100644 mysql-test/r/rpl_row_trig004.result delete mode 100644 mysql-test/r/rpl_row_until.result delete mode 100644 mysql-test/r/rpl_row_view01.result delete mode 100644 mysql-test/r/rpl_server_id1.result delete mode 100644 mysql-test/r/rpl_server_id2.result delete mode 100644 mysql-test/r/rpl_session_var.result delete mode 100644 mysql-test/r/rpl_set_charset.result delete mode 100644 mysql-test/r/rpl_sf.result delete mode 100644 mysql-test/r/rpl_skip_error.result delete mode 100644 mysql-test/r/rpl_slave_status.result delete mode 100644 mysql-test/r/rpl_sp.result delete mode 100644 mysql-test/r/rpl_sp004.result delete mode 100644 mysql-test/r/rpl_sp_effects.result delete mode 100644 mysql-test/r/rpl_sporadic_master.result delete mode 100644 mysql-test/r/rpl_ssl.result delete mode 100644 mysql-test/r/rpl_ssl1.result delete mode 100644 mysql-test/r/rpl_start_stop_slave.result delete mode 100644 mysql-test/r/rpl_stm_000001.result delete mode 100644 mysql-test/r/rpl_stm_EE_err2.result delete mode 100644 mysql-test/r/rpl_stm_charset.result delete mode 100644 mysql-test/r/rpl_stm_flsh_tbls.result delete mode 100644 mysql-test/r/rpl_stm_insert_delayed.result delete mode 100644 mysql-test/r/rpl_stm_log.result delete mode 100644 mysql-test/r/rpl_stm_max_relay_size.result delete mode 100644 mysql-test/r/rpl_stm_multi_query.result delete mode 100644 mysql-test/r/rpl_stm_mystery22.result delete mode 100644 mysql-test/r/rpl_stm_no_op.result delete mode 100644 mysql-test/r/rpl_stm_reset_slave.result delete mode 100644 mysql-test/r/rpl_stm_until.result delete mode 100644 mysql-test/r/rpl_switch_stm_row_mixed.result delete mode 100644 mysql-test/r/rpl_temp_table.result delete mode 100644 mysql-test/r/rpl_temporary.result delete mode 100644 mysql-test/r/rpl_timezone.result delete mode 100644 mysql-test/r/rpl_trigger.result delete mode 100644 mysql-test/r/rpl_trunc_temp.result delete mode 100644 mysql-test/r/rpl_truncate_2myisam.result delete mode 100644 mysql-test/r/rpl_truncate_3innodb.result delete mode 100644 mysql-test/r/rpl_truncate_7ndb.result delete mode 100644 mysql-test/r/rpl_truncate_7ndb_2.result delete mode 100644 mysql-test/r/rpl_udf.result delete mode 100644 mysql-test/r/rpl_user_variables.result delete mode 100644 mysql-test/r/rpl_variables.result delete mode 100644 mysql-test/r/rpl_view.result delete mode 100644 mysql-test/r/strict_autoinc_5ndb.result create mode 100644 mysql-test/suite/binlog/r/binlog_killed.result create mode 100644 mysql-test/suite/binlog/r/binlog_row_binlog.result create mode 100644 mysql-test/suite/binlog/r/binlog_row_blackhole.result create mode 100644 mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result create mode 100644 mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result create mode 100644 mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result create mode 100644 mysql-test/suite/binlog/r/binlog_row_innodb_stat.result create mode 100644 mysql-test/suite/binlog/r/binlog_row_insert_select.result create mode 100644 mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result create mode 100644 mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result create mode 100644 mysql-test/suite/binlog/r/binlog_stm_binlog.result create mode 100644 mysql-test/suite/binlog/r/binlog_stm_blackhole.result create mode 100755 mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result create mode 100644 mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result create mode 100644 mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result create mode 100644 mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result create mode 100644 mysql-test/suite/binlog/r/binlog_stm_insert_select.result create mode 100644 mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result create mode 100644 mysql-test/suite/binlog/r/binlog_stm_ps.result create mode 100644 mysql-test/suite/binlog/t/binlog_killed.test create mode 100644 mysql-test/suite/binlog/t/binlog_row_binlog-master.opt create mode 100644 mysql-test/suite/binlog/t/binlog_row_binlog.test create mode 100644 mysql-test/suite/binlog/t/binlog_row_blackhole.test create mode 100644 mysql-test/suite/binlog/t/binlog_row_ctype_cp932.test create mode 100644 mysql-test/suite/binlog/t/binlog_row_ctype_ucs.test create mode 100644 mysql-test/suite/binlog/t/binlog_row_drop_tmp_tbl.test create mode 100644 mysql-test/suite/binlog/t/binlog_row_innodb_stat-master.opt create mode 100644 mysql-test/suite/binlog/t/binlog_row_innodb_stat.test create mode 100644 mysql-test/suite/binlog/t/binlog_row_insert_select.test create mode 100644 mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam-master.opt create mode 100644 mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test create mode 100644 mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test create mode 100644 mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt create mode 100644 mysql-test/suite/binlog/t/binlog_stm_binlog.test create mode 100644 mysql-test/suite/binlog/t/binlog_stm_blackhole.test create mode 100644 mysql-test/suite/binlog/t/binlog_stm_ctype_cp932.test create mode 100644 mysql-test/suite/binlog/t/binlog_stm_ctype_ucs.test create mode 100644 mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test create mode 100644 mysql-test/suite/binlog/t/binlog_stm_innodb_stat-master.opt create mode 100644 mysql-test/suite/binlog/t/binlog_stm_innodb_stat.test create mode 100644 mysql-test/suite/binlog/t/binlog_stm_insert_select.test create mode 100644 mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt create mode 100644 mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test create mode 100644 mysql-test/suite/binlog/t/binlog_stm_ps.test create mode 100644 mysql-test/suite/funcs_1/t/suite.opt create mode 100644 mysql-test/suite/funcs_2/t/suite.opt create mode 100644 mysql-test/suite/ndb/r/loaddata_autocom_ndb.result create mode 100644 mysql-test/suite/ndb/r/ndb_alter_table.result create mode 100644 mysql-test/suite/ndb/r/ndb_alter_table2.result create mode 100644 mysql-test/suite/ndb/r/ndb_alter_table3.result create mode 100644 mysql-test/suite/ndb/r/ndb_autodiscover.result create mode 100644 mysql-test/suite/ndb/r/ndb_autodiscover2.result create mode 100644 mysql-test/suite/ndb/r/ndb_autodiscover3.result create mode 100644 mysql-test/suite/ndb/r/ndb_backup_print.result create mode 100644 mysql-test/suite/ndb/r/ndb_basic.result create mode 100644 mysql-test/suite/ndb/r/ndb_binlog_basic.result create mode 100644 mysql-test/suite/ndb/r/ndb_binlog_basic2.result create mode 100644 mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result create mode 100644 mysql-test/suite/ndb/r/ndb_binlog_discover.result create mode 100644 mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result create mode 100644 mysql-test/suite/ndb/r/ndb_binlog_log_bin.result create mode 100644 mysql-test/suite/ndb/r/ndb_binlog_multi.result create mode 100644 mysql-test/suite/ndb/r/ndb_bitfield.result create mode 100644 mysql-test/suite/ndb/r/ndb_blob.result create mode 100644 mysql-test/suite/ndb/r/ndb_blob_partition.result create mode 100644 mysql-test/suite/ndb/r/ndb_cache.result create mode 100644 mysql-test/suite/ndb/r/ndb_cache2.result create mode 100644 mysql-test/suite/ndb/r/ndb_cache_multi.result create mode 100644 mysql-test/suite/ndb/r/ndb_cache_multi2.result create mode 100644 mysql-test/suite/ndb/r/ndb_charset.result create mode 100644 mysql-test/suite/ndb/r/ndb_condition_pushdown.result create mode 100644 mysql-test/suite/ndb/r/ndb_config.result create mode 100644 mysql-test/suite/ndb/r/ndb_config2.result create mode 100644 mysql-test/suite/ndb/r/ndb_cursor.result create mode 100644 mysql-test/suite/ndb/r/ndb_database.result create mode 100644 mysql-test/suite/ndb/r/ndb_dd_alter.result create mode 100644 mysql-test/suite/ndb/r/ndb_dd_backuprestore.result create mode 100644 mysql-test/suite/ndb/r/ndb_dd_basic.result create mode 100644 mysql-test/suite/ndb/r/ndb_dd_ddl.result create mode 100644 mysql-test/suite/ndb/r/ndb_dd_disk2memory.result create mode 100644 mysql-test/suite/ndb/r/ndb_dd_dump.result create mode 100644 mysql-test/suite/ndb/r/ndb_dd_sql_features.result create mode 100644 mysql-test/suite/ndb/r/ndb_gis.result create mode 100644 mysql-test/suite/ndb/r/ndb_grant.result create mode 100644 mysql-test/suite/ndb/r/ndb_index.result create mode 100644 mysql-test/suite/ndb/r/ndb_index_ordered.result create mode 100644 mysql-test/suite/ndb/r/ndb_index_unique.result create mode 100644 mysql-test/suite/ndb/r/ndb_insert.result create mode 100644 mysql-test/suite/ndb/r/ndb_limit.result create mode 100644 mysql-test/suite/ndb/r/ndb_load.result create mode 100644 mysql-test/suite/ndb/r/ndb_loaddatalocal.result create mode 100644 mysql-test/suite/ndb/r/ndb_lock.result create mode 100644 mysql-test/suite/ndb/r/ndb_minmax.result create mode 100644 mysql-test/suite/ndb/r/ndb_multi.result create mode 100644 mysql-test/suite/ndb/r/ndb_multi_row.result create mode 100644 mysql-test/suite/ndb/r/ndb_partition_error.result create mode 100644 mysql-test/suite/ndb/r/ndb_partition_error2.result create mode 100644 mysql-test/suite/ndb/r/ndb_partition_key.result create mode 100644 mysql-test/suite/ndb/r/ndb_partition_list.result create mode 100644 mysql-test/suite/ndb/r/ndb_partition_range.result create mode 100644 mysql-test/suite/ndb/r/ndb_read_multi_range.result create mode 100644 mysql-test/suite/ndb/r/ndb_rename.result create mode 100644 mysql-test/suite/ndb/r/ndb_replace.result create mode 100644 mysql-test/suite/ndb/r/ndb_restore.result create mode 100644 mysql-test/suite/ndb/r/ndb_restore_compat.result create mode 100644 mysql-test/suite/ndb/r/ndb_restore_partition.result create mode 100644 mysql-test/suite/ndb/r/ndb_restore_print.result create mode 100644 mysql-test/suite/ndb/r/ndb_row_format.result create mode 100644 mysql-test/suite/ndb/r/ndb_single_user.result create mode 100644 mysql-test/suite/ndb/r/ndb_sp.result create mode 100644 mysql-test/suite/ndb/r/ndb_subquery.result create mode 100644 mysql-test/suite/ndb/r/ndb_temporary.result create mode 100644 mysql-test/suite/ndb/r/ndb_transaction.result create mode 100644 mysql-test/suite/ndb/r/ndb_trigger.result create mode 100644 mysql-test/suite/ndb/r/ndb_truncate.result create mode 100644 mysql-test/suite/ndb/r/ndb_types.result create mode 100644 mysql-test/suite/ndb/r/ndb_update.result create mode 100644 mysql-test/suite/ndb/r/ndb_view.result create mode 100644 mysql-test/suite/ndb/r/ndbapi.result create mode 100644 mysql-test/suite/ndb/r/partition_03ndb.result create mode 100644 mysql-test/suite/ndb/r/ps_7ndb.result create mode 100644 mysql-test/suite/ndb/r/strict_autoinc_5ndb.result create mode 100644 mysql-test/suite/ndb/t/disabled.def create mode 100644 mysql-test/suite/ndb/t/loaddata_autocom_ndb.test create mode 100644 mysql-test/suite/ndb/t/ndb_alter_table.test create mode 100644 mysql-test/suite/ndb/t/ndb_alter_table2.test create mode 100644 mysql-test/suite/ndb/t/ndb_alter_table3.test create mode 100644 mysql-test/suite/ndb/t/ndb_autodiscover.test create mode 100644 mysql-test/suite/ndb/t/ndb_autodiscover2-master.opt create mode 100644 mysql-test/suite/ndb/t/ndb_autodiscover2.test create mode 100644 mysql-test/suite/ndb/t/ndb_autodiscover3.test create mode 100644 mysql-test/suite/ndb/t/ndb_backup_print.test create mode 100644 mysql-test/suite/ndb/t/ndb_basic.test create mode 100644 mysql-test/suite/ndb/t/ndb_binlog_basic.test create mode 100644 mysql-test/suite/ndb/t/ndb_binlog_basic2.test create mode 100644 mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test create mode 100644 mysql-test/suite/ndb/t/ndb_binlog_discover.test create mode 100644 mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt create mode 100644 mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test create mode 100644 mysql-test/suite/ndb/t/ndb_binlog_log_bin.test create mode 100644 mysql-test/suite/ndb/t/ndb_binlog_multi.test create mode 100644 mysql-test/suite/ndb/t/ndb_bitfield.test create mode 100644 mysql-test/suite/ndb/t/ndb_blob.test create mode 100644 mysql-test/suite/ndb/t/ndb_blob_partition.test create mode 100644 mysql-test/suite/ndb/t/ndb_cache.test create mode 100644 mysql-test/suite/ndb/t/ndb_cache2.test create mode 100644 mysql-test/suite/ndb/t/ndb_cache_multi.test create mode 100644 mysql-test/suite/ndb/t/ndb_cache_multi2.test create mode 100644 mysql-test/suite/ndb/t/ndb_charset.test create mode 100644 mysql-test/suite/ndb/t/ndb_condition_pushdown.test create mode 100644 mysql-test/suite/ndb/t/ndb_config.test create mode 100644 mysql-test/suite/ndb/t/ndb_config2.test create mode 100644 mysql-test/suite/ndb/t/ndb_cursor.test create mode 100644 mysql-test/suite/ndb/t/ndb_database.test create mode 100644 mysql-test/suite/ndb/t/ndb_dd_alter.test create mode 100644 mysql-test/suite/ndb/t/ndb_dd_backuprestore.test create mode 100644 mysql-test/suite/ndb/t/ndb_dd_basic.test create mode 100644 mysql-test/suite/ndb/t/ndb_dd_ddl.test create mode 100644 mysql-test/suite/ndb/t/ndb_dd_disk2memory.test create mode 100644 mysql-test/suite/ndb/t/ndb_dd_dump.test create mode 100644 mysql-test/suite/ndb/t/ndb_dd_sql_features.test create mode 100644 mysql-test/suite/ndb/t/ndb_gis.test create mode 100644 mysql-test/suite/ndb/t/ndb_grant.later create mode 100644 mysql-test/suite/ndb/t/ndb_index.test create mode 100644 mysql-test/suite/ndb/t/ndb_index_ordered.test create mode 100644 mysql-test/suite/ndb/t/ndb_index_unique.test create mode 100644 mysql-test/suite/ndb/t/ndb_insert.test create mode 100644 mysql-test/suite/ndb/t/ndb_limit.test create mode 100644 mysql-test/suite/ndb/t/ndb_load.test create mode 100644 mysql-test/suite/ndb/t/ndb_loaddatalocal.test create mode 100644 mysql-test/suite/ndb/t/ndb_lock.test create mode 100644 mysql-test/suite/ndb/t/ndb_minmax.test create mode 100644 mysql-test/suite/ndb/t/ndb_multi.test create mode 100644 mysql-test/suite/ndb/t/ndb_multi_row.test create mode 100644 mysql-test/suite/ndb/t/ndb_partition_error.test create mode 100644 mysql-test/suite/ndb/t/ndb_partition_error2-master.opt create mode 100644 mysql-test/suite/ndb/t/ndb_partition_error2.test create mode 100644 mysql-test/suite/ndb/t/ndb_partition_key.test create mode 100644 mysql-test/suite/ndb/t/ndb_partition_list.test create mode 100644 mysql-test/suite/ndb/t/ndb_partition_range.test create mode 100644 mysql-test/suite/ndb/t/ndb_read_multi_range.test create mode 100644 mysql-test/suite/ndb/t/ndb_rename.test create mode 100644 mysql-test/suite/ndb/t/ndb_replace.test create mode 100644 mysql-test/suite/ndb/t/ndb_restore.test create mode 100644 mysql-test/suite/ndb/t/ndb_restore_compat.test create mode 100644 mysql-test/suite/ndb/t/ndb_restore_partition-master.opt create mode 100644 mysql-test/suite/ndb/t/ndb_restore_partition.test create mode 100644 mysql-test/suite/ndb/t/ndb_restore_print.test create mode 100644 mysql-test/suite/ndb/t/ndb_row_format.test create mode 100644 mysql-test/suite/ndb/t/ndb_single_user.test create mode 100644 mysql-test/suite/ndb/t/ndb_sp.test create mode 100644 mysql-test/suite/ndb/t/ndb_subquery.test create mode 100644 mysql-test/suite/ndb/t/ndb_temporary.test create mode 100644 mysql-test/suite/ndb/t/ndb_transaction.test create mode 100644 mysql-test/suite/ndb/t/ndb_trigger.test create mode 100644 mysql-test/suite/ndb/t/ndb_truncate.test create mode 100644 mysql-test/suite/ndb/t/ndb_types.test create mode 100644 mysql-test/suite/ndb/t/ndb_update.test create mode 100644 mysql-test/suite/ndb/t/ndb_view.test create mode 100644 mysql-test/suite/ndb/t/ndbapi.test create mode 100644 mysql-test/suite/ndb/t/partition_03ndb.test create mode 100644 mysql-test/suite/ndb/t/ps_7ndb.test create mode 100644 mysql-test/suite/ndb/t/strict_autoinc_5ndb.test create mode 100644 mysql-test/suite/rpl/r/rpl000001.a.result create mode 100644 mysql-test/suite/rpl/r/rpl000001.b.result create mode 100644 mysql-test/suite/rpl/r/rpl000010.result create mode 100644 mysql-test/suite/rpl/r/rpl000011.result create mode 100644 mysql-test/suite/rpl/r/rpl000013.result create mode 100644 mysql-test/suite/rpl/r/rpl000017.result create mode 100644 mysql-test/suite/rpl/r/rpl_000015.result create mode 100644 mysql-test/suite/rpl/r/rpl_EE_err.result create mode 100644 mysql-test/suite/rpl/r/rpl_LD_INFILE.result create mode 100644 mysql-test/suite/rpl/r/rpl_alter.result create mode 100644 mysql-test/suite/rpl/r/rpl_alter_db.result create mode 100644 mysql-test/suite/rpl/r/rpl_auto_increment.result create mode 100644 mysql-test/suite/rpl/r/rpl_auto_increment_11932.result create mode 100644 mysql-test/suite/rpl/r/rpl_bit.result create mode 100644 mysql-test/suite/rpl/r/rpl_bit_npk.result create mode 100644 mysql-test/suite/rpl/r/rpl_change_master.result create mode 100644 mysql-test/suite/rpl/r/rpl_charset_sjis.result create mode 100644 mysql-test/suite/rpl/r/rpl_commit_after_flush.result create mode 100644 mysql-test/suite/rpl/r/rpl_create_database.result create mode 100644 mysql-test/suite/rpl/r/rpl_critical_errors.result create mode 100644 mysql-test/suite/rpl/r/rpl_critical_errors.result.txt create mode 100644 mysql-test/suite/rpl/r/rpl_ddl.result create mode 100644 mysql-test/suite/rpl/r/rpl_deadlock_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_delete_no_where.result create mode 100644 mysql-test/suite/rpl/r/rpl_do_grant.result create mode 100644 mysql-test/suite/rpl/r/rpl_drop.result create mode 100644 mysql-test/suite/rpl/r/rpl_drop_db.result create mode 100644 mysql-test/suite/rpl/r/rpl_drop_temp.result create mode 100644 mysql-test/suite/rpl/r/rpl_dual_pos_advance.result create mode 100644 mysql-test/suite/rpl/r/rpl_empty_master_crash.result create mode 100644 mysql-test/suite/rpl/r/rpl_err_ignoredtable.result create mode 100644 mysql-test/suite/rpl/r/rpl_events.result create mode 100644 mysql-test/suite/rpl/r/rpl_extraCol_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_extraCol_myisam.result create mode 100644 mysql-test/suite/rpl/r/rpl_failed_optimize.result create mode 100644 mysql-test/suite/rpl/r/rpl_flushlog_loop.result create mode 100644 mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_free_items.result create mode 100644 mysql-test/suite/rpl/r/rpl_get_lock.result create mode 100644 mysql-test/suite/rpl/r/rpl_ignore_grant.result create mode 100644 mysql-test/suite/rpl/r/rpl_ignore_revoke.result create mode 100644 mysql-test/suite/rpl/r/rpl_ignore_table.result create mode 100644 mysql-test/suite/rpl/r/rpl_ignore_table_update.result create mode 100644 mysql-test/suite/rpl/r/rpl_incident.result create mode 100644 mysql-test/suite/rpl/r/rpl_init_slave.result create mode 100644 mysql-test/suite/rpl/r/rpl_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_insert.result create mode 100644 mysql-test/suite/rpl/r/rpl_insert_id.result create mode 100644 mysql-test/suite/rpl/r/rpl_insert_id_pk.result create mode 100644 mysql-test/suite/rpl/r/rpl_insert_ignore.result create mode 100644 mysql-test/suite/rpl/r/rpl_insert_select.result create mode 100644 mysql-test/suite/rpl/r/rpl_known_bugs_detection.result create mode 100644 mysql-test/suite/rpl/r/rpl_load_from_master.result create mode 100644 mysql-test/suite/rpl/r/rpl_load_table_from_master.result create mode 100644 mysql-test/suite/rpl/r/rpl_loaddata.result create mode 100644 mysql-test/suite/rpl/r/rpl_loaddata_charset.result create mode 100644 mysql-test/suite/rpl/r/rpl_loaddata_m.result create mode 100644 mysql-test/suite/rpl/r/rpl_loaddata_s.result create mode 100644 mysql-test/suite/rpl/r/rpl_loaddata_simple.result create mode 100644 mysql-test/suite/rpl/r/rpl_loaddatalocal.result create mode 100644 mysql-test/suite/rpl/r/rpl_loadfile.result create mode 100644 mysql-test/suite/rpl/r/rpl_locale.result create mode 100644 mysql-test/suite/rpl/r/rpl_log_pos.result create mode 100644 mysql-test/suite/rpl/r/rpl_many_optimize.result create mode 100644 mysql-test/suite/rpl/r/rpl_master_pos_wait.result create mode 100644 mysql-test/suite/rpl/r/rpl_misc_functions.result create mode 100644 mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result create mode 100644 mysql-test/suite/rpl/r/rpl_multi_delete.result create mode 100644 mysql-test/suite/rpl/r/rpl_multi_delete2.result create mode 100644 mysql-test/suite/rpl/r/rpl_multi_engine.result create mode 100644 mysql-test/suite/rpl/r/rpl_multi_update.result create mode 100644 mysql-test/suite/rpl/r/rpl_multi_update2.result create mode 100644 mysql-test/suite/rpl/r/rpl_multi_update3.result create mode 100644 mysql-test/suite/rpl/r/rpl_multi_update4.result create mode 100644 mysql-test/suite/rpl/r/rpl_optimize.result create mode 100644 mysql-test/suite/rpl/r/rpl_packet.result create mode 100644 mysql-test/suite/rpl/r/rpl_ps.result create mode 100644 mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result create mode 100644 mysql-test/suite/rpl/r/rpl_read_only.result create mode 100644 mysql-test/suite/rpl/r/rpl_redirect.result create mode 100644 mysql-test/suite/rpl/r/rpl_relay_space_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_relay_space_myisam.result create mode 100644 mysql-test/suite/rpl/r/rpl_relayrotate.result create mode 100644 mysql-test/suite/rpl/r/rpl_relayspace.result create mode 100644 mysql-test/suite/rpl/r/rpl_replicate_do.result create mode 100644 mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result create mode 100644 mysql-test/suite/rpl/r/rpl_rewrt_db.result create mode 100644 mysql-test/suite/rpl/r/rpl_rotate_logs.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_001.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_4_bytes.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_NOW.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_USER.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_UUID.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt create mode 100644 mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt create mode 100644 mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_basic_8partition.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_blob_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_blob_myisam.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_charset.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_create_table.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_delayed_ins.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_drop.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_func001.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_func002.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_func003.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_insert_delayed.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_loaddata_m.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_log.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_log_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_max_relay_size.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_multi_query.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_mystery22.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_reset_slave.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp001.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp003.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp005.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp008.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp009.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp010.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp011.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_sp012.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_stop_middle.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_trig001.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_trig002.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_trig003.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_trig004.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_until.result create mode 100644 mysql-test/suite/rpl/r/rpl_row_view01.result create mode 100644 mysql-test/suite/rpl/r/rpl_server_id1.result create mode 100644 mysql-test/suite/rpl/r/rpl_server_id2.result create mode 100644 mysql-test/suite/rpl/r/rpl_session_var.result create mode 100644 mysql-test/suite/rpl/r/rpl_set_charset.result create mode 100644 mysql-test/suite/rpl/r/rpl_sf.result create mode 100644 mysql-test/suite/rpl/r/rpl_skip_error.result create mode 100644 mysql-test/suite/rpl/r/rpl_slave_status.result create mode 100644 mysql-test/suite/rpl/r/rpl_sp.result create mode 100644 mysql-test/suite/rpl/r/rpl_sp004.result create mode 100644 mysql-test/suite/rpl/r/rpl_sp_effects.result create mode 100644 mysql-test/suite/rpl/r/rpl_sporadic_master.result create mode 100644 mysql-test/suite/rpl/r/rpl_ssl.result create mode 100644 mysql-test/suite/rpl/r/rpl_ssl1.result create mode 100644 mysql-test/suite/rpl/r/rpl_start_stop_slave.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_000001.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_EE_err2.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_charset.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_log.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_multi_query.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_mystery22.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_no_op.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_reset_slave.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_until.result create mode 100644 mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result create mode 100644 mysql-test/suite/rpl/r/rpl_temp_table.result create mode 100644 mysql-test/suite/rpl/r/rpl_temporary.result create mode 100644 mysql-test/suite/rpl/r/rpl_timezone.result create mode 100644 mysql-test/suite/rpl/r/rpl_trigger.result create mode 100644 mysql-test/suite/rpl/r/rpl_trunc_temp.result create mode 100644 mysql-test/suite/rpl/r/rpl_truncate_2myisam.result create mode 100644 mysql-test/suite/rpl/r/rpl_truncate_3innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result create mode 100644 mysql-test/suite/rpl/r/rpl_udf.result create mode 100644 mysql-test/suite/rpl/r/rpl_user_variables.result create mode 100644 mysql-test/suite/rpl/r/rpl_variables.result create mode 100644 mysql-test/suite/rpl/r/rpl_view.result create mode 100644 mysql-test/suite/rpl/t/disabled.def create mode 100644 mysql-test/suite/rpl/t/rpl000010-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl000010.test create mode 100644 mysql-test/suite/rpl/t/rpl000011.test create mode 100644 mysql-test/suite/rpl/t/rpl000013.test create mode 100644 mysql-test/suite/rpl/t/rpl000017-slave.opt create mode 100755 mysql-test/suite/rpl/t/rpl000017-slave.sh create mode 100644 mysql-test/suite/rpl/t/rpl000017.test create mode 100644 mysql-test/suite/rpl/t/rpl000018-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl000018-slave.opt create mode 100755 mysql-test/suite/rpl/t/rpl_000015-slave.sh create mode 100644 mysql-test/suite/rpl/t/rpl_000015.slave-mi create mode 100644 mysql-test/suite/rpl/t/rpl_000015.test create mode 100644 mysql-test/suite/rpl/t/rpl_EE_err.test create mode 100644 mysql-test/suite/rpl/t/rpl_LD_INFILE.test create mode 100644 mysql-test/suite/rpl/t/rpl_alter.test create mode 100644 mysql-test/suite/rpl/t/rpl_alter_db.test create mode 100644 mysql-test/suite/rpl/t/rpl_auto_increment-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_auto_increment-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_auto_increment.test create mode 100644 mysql-test/suite/rpl/t/rpl_auto_increment_11932.test create mode 100644 mysql-test/suite/rpl/t/rpl_bit.test create mode 100644 mysql-test/suite/rpl/t/rpl_bit_npk.test create mode 100644 mysql-test/suite/rpl/t/rpl_change_master.test create mode 100644 mysql-test/suite/rpl/t/rpl_charset_sjis.test create mode 100644 mysql-test/suite/rpl/t/rpl_commit_after_flush.test create mode 100644 mysql-test/suite/rpl/t/rpl_create_database-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_create_database-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_create_database.test create mode 100644 mysql-test/suite/rpl/t/rpl_critical_errors.test create mode 100644 mysql-test/suite/rpl/t/rpl_ddl.test create mode 100644 mysql-test/suite/rpl/t/rpl_deadlock_innodb-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_deadlock_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_delete_no_where.test create mode 100644 mysql-test/suite/rpl/t/rpl_do_grant.test create mode 100644 mysql-test/suite/rpl/t/rpl_drop.test create mode 100644 mysql-test/suite/rpl/t/rpl_drop_db.test create mode 100644 mysql-test/suite/rpl/t/rpl_drop_temp-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_drop_temp.test create mode 100644 mysql-test/suite/rpl/t/rpl_dual_pos_advance-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_dual_pos_advance.test create mode 100644 mysql-test/suite/rpl/t/rpl_empty_master_crash-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_empty_master_crash.test create mode 100644 mysql-test/suite/rpl/t/rpl_err_ignoredtable-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_err_ignoredtable.test create mode 100644 mysql-test/suite/rpl/t/rpl_events.test create mode 100644 mysql-test/suite/rpl/t/rpl_extraCol_innodb-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_extraCol_innodb-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_extraCol_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_extraCol_myisam.test create mode 100644 mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_failed_optimize.test create mode 100644 mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt create mode 100755 mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh create mode 100644 mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt create mode 100755 mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh create mode 100644 mysql-test/suite/rpl/t/rpl_flushlog_loop.test create mode 100644 mysql-test/suite/rpl/t/rpl_foreign_key_innodb-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_free_items-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_free_items.test create mode 100644 mysql-test/suite/rpl/t/rpl_get_lock.test create mode 100644 mysql-test/suite/rpl/t/rpl_ignore_grant-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_ignore_grant.test create mode 100644 mysql-test/suite/rpl/t/rpl_ignore_revoke-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_ignore_revoke.test create mode 100644 mysql-test/suite/rpl/t/rpl_ignore_table-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_ignore_table.test create mode 100644 mysql-test/suite/rpl/t/rpl_ignore_table_update-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_ignore_table_update.test create mode 100644 mysql-test/suite/rpl/t/rpl_incident-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_incident.test create mode 100644 mysql-test/suite/rpl/t/rpl_init_slave-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_init_slave.test create mode 100644 mysql-test/suite/rpl/t/rpl_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_insert.test create mode 100644 mysql-test/suite/rpl/t/rpl_insert_id-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_insert_id.test create mode 100644 mysql-test/suite/rpl/t/rpl_insert_id_pk-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_insert_id_pk.test create mode 100644 mysql-test/suite/rpl/t/rpl_insert_ignore-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_insert_ignore.test create mode 100644 mysql-test/suite/rpl/t/rpl_insert_select.test create mode 100644 mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_known_bugs_detection.test create mode 100644 mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_load_from_master.test create mode 100644 mysql-test/suite/rpl/t/rpl_load_table_from_master.test create mode 100644 mysql-test/suite/rpl/t/rpl_loaddata.test create mode 100644 mysql-test/suite/rpl/t/rpl_loaddata_charset.test create mode 100644 mysql-test/suite/rpl/t/rpl_loaddata_m-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_loaddata_m.test create mode 100644 mysql-test/suite/rpl/t/rpl_loaddata_s-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_loaddata_s.test create mode 100644 mysql-test/suite/rpl/t/rpl_loaddata_simple.test create mode 100644 mysql-test/suite/rpl/t/rpl_loaddatalocal.test create mode 100644 mysql-test/suite/rpl/t/rpl_loadfile.test create mode 100644 mysql-test/suite/rpl/t/rpl_locale.test create mode 100644 mysql-test/suite/rpl/t/rpl_log_pos.test create mode 100644 mysql-test/suite/rpl/t/rpl_many_optimize.test create mode 100644 mysql-test/suite/rpl/t/rpl_master_pos_wait.test create mode 100755 mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh create mode 100644 mysql-test/suite/rpl/t/rpl_misc_functions.test create mode 100644 mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test create mode 100644 mysql-test/suite/rpl/t/rpl_multi_delete-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_multi_delete.test create mode 100644 mysql-test/suite/rpl/t/rpl_multi_delete2-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_multi_delete2.test create mode 100644 mysql-test/suite/rpl/t/rpl_multi_engine-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_multi_engine.test create mode 100644 mysql-test/suite/rpl/t/rpl_multi_update.test create mode 100644 mysql-test/suite/rpl/t/rpl_multi_update2-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_multi_update2.test create mode 100644 mysql-test/suite/rpl/t/rpl_multi_update3.test create mode 100644 mysql-test/suite/rpl/t/rpl_multi_update4-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_multi_update4.test create mode 100644 mysql-test/suite/rpl/t/rpl_optimize.test create mode 100644 mysql-test/suite/rpl/t/rpl_packet-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_packet-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_packet.test create mode 100644 mysql-test/suite/rpl/t/rpl_ps.test create mode 100644 mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test create mode 100644 mysql-test/suite/rpl/t/rpl_read_only-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_read_only.test create mode 100644 mysql-test/suite/rpl/t/rpl_redirect.test create mode 100644 mysql-test/suite/rpl/t/rpl_relay_space_innodb-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_relay_space_innodb-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_relay_space_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_relay_space_myisam.test create mode 100644 mysql-test/suite/rpl/t/rpl_relayrotate-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_relayrotate.test create mode 100644 mysql-test/suite/rpl/t/rpl_relayspace-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_relayspace.test create mode 100644 mysql-test/suite/rpl/t/rpl_replicate_do-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_replicate_do.test create mode 100644 mysql-test/suite/rpl/t/rpl_replicate_ignore_db-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test create mode 100644 mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_rewrt_db.test create mode 100644 mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt create mode 100755 mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh create mode 100644 mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi create mode 100644 mysql-test/suite/rpl/t/rpl_rotate_logs.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_001.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_4_bytes.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_NOW.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_USER.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_UUID.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_basic_11bugs-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_basic_11bugs-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_basic_3innodb-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_basic_8partition.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_blob_innodb-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_blob_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_blob_myisam.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_charset.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_create_table-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_create_table.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_delayed_ins.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_drop.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_err_daisychain-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_err_daisychain-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_func001.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_func002.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_func003-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_func003.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_insert_delayed.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_log-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_log-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_log.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_log_innodb-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_log_innodb-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_log_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_max_relay_size.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_mysqlbinlog-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_mystery22.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_reset_slave.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp001.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp002_innodb-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp002_innodb-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp003-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp003-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp003.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp005.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp007_innodb-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp008.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp009.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp010.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp011.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_sp012.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_stop_middle.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_stop_middle_update-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_stop_middle_update-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_trig001.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_trig002.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_trig003.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_trig004.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_until.test create mode 100644 mysql-test/suite/rpl/t/rpl_row_view01.test create mode 100644 mysql-test/suite/rpl/t/rpl_server_id1.test create mode 100644 mysql-test/suite/rpl/t/rpl_server_id2-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_server_id2.test create mode 100644 mysql-test/suite/rpl/t/rpl_session_var.test create mode 100644 mysql-test/suite/rpl/t/rpl_set_charset.test create mode 100644 mysql-test/suite/rpl/t/rpl_sf.test create mode 100644 mysql-test/suite/rpl/t/rpl_skip_error-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_skip_error.test create mode 100644 mysql-test/suite/rpl/t/rpl_slave_status.test create mode 100644 mysql-test/suite/rpl/t/rpl_sp-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_sp-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_sp.test create mode 100644 mysql-test/suite/rpl/t/rpl_sp004.test create mode 100644 mysql-test/suite/rpl/t/rpl_sp_effects-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_sp_effects.test create mode 100644 mysql-test/suite/rpl/t/rpl_sporadic_master-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_sporadic_master.test create mode 100644 mysql-test/suite/rpl/t/rpl_ssl.test create mode 100644 mysql-test/suite/rpl/t/rpl_ssl1.test create mode 100644 mysql-test/suite/rpl/t/rpl_start_stop_slave.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_000001-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_stm_000001.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_EE_err2.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_charset.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_log-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_stm_log-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_stm_log.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_multi_query.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_mystery22.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_no_op.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_reset_slave.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_until.test create mode 100644 mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test create mode 100644 mysql-test/suite/rpl/t/rpl_temp_table.test create mode 100644 mysql-test/suite/rpl/t/rpl_temporary.test create mode 100644 mysql-test/suite/rpl/t/rpl_timezone-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_timezone-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_timezone.test create mode 100644 mysql-test/suite/rpl/t/rpl_trigger.test create mode 100644 mysql-test/suite/rpl/t/rpl_trunc_temp.test create mode 100644 mysql-test/suite/rpl/t/rpl_truncate_2myisam.test create mode 100644 mysql-test/suite/rpl/t/rpl_truncate_3innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test create mode 100644 mysql-test/suite/rpl/t/rpl_udf-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_udf-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_udf.test create mode 100644 mysql-test/suite/rpl/t/rpl_user_variables.test create mode 100644 mysql-test/suite/rpl/t/rpl_variables-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_variables.test create mode 100644 mysql-test/suite/rpl/t/rpl_view-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_view.test create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result create mode 100644 mysql-test/suite/rpl_ndb/t/disabled.def create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-master.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test delete mode 100644 mysql-test/t/binlog_killed.test delete mode 100644 mysql-test/t/binlog_row_binlog-master.opt delete mode 100644 mysql-test/t/binlog_row_binlog.test delete mode 100644 mysql-test/t/binlog_row_blackhole.test delete mode 100644 mysql-test/t/binlog_row_ctype_cp932.test delete mode 100644 mysql-test/t/binlog_row_ctype_ucs.test delete mode 100644 mysql-test/t/binlog_row_drop_tmp_tbl.test delete mode 100644 mysql-test/t/binlog_row_innodb_stat-master.opt delete mode 100644 mysql-test/t/binlog_row_innodb_stat.test delete mode 100644 mysql-test/t/binlog_row_insert_select.test delete mode 100644 mysql-test/t/binlog_row_mix_innodb_myisam-master.opt delete mode 100644 mysql-test/t/binlog_row_mix_innodb_myisam.test delete mode 100644 mysql-test/t/binlog_statement_insert_delayed.test delete mode 100644 mysql-test/t/binlog_stm_binlog-master.opt delete mode 100644 mysql-test/t/binlog_stm_binlog.test delete mode 100644 mysql-test/t/binlog_stm_blackhole.test delete mode 100644 mysql-test/t/binlog_stm_ctype_cp932.test delete mode 100644 mysql-test/t/binlog_stm_ctype_ucs.test delete mode 100644 mysql-test/t/binlog_stm_drop_tmp_tbl.test delete mode 100644 mysql-test/t/binlog_stm_innodb_stat-master.opt delete mode 100644 mysql-test/t/binlog_stm_innodb_stat.test delete mode 100644 mysql-test/t/binlog_stm_insert_select.test delete mode 100644 mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt delete mode 100644 mysql-test/t/binlog_stm_mix_innodb_myisam.test delete mode 100644 mysql-test/t/binlog_stm_ps.test delete mode 100644 mysql-test/t/loaddata_autocom_ndb.test delete mode 100644 mysql-test/t/ndb_alter_table.test delete mode 100644 mysql-test/t/ndb_alter_table2.test delete mode 100644 mysql-test/t/ndb_alter_table3.test delete mode 100644 mysql-test/t/ndb_autodiscover.test delete mode 100644 mysql-test/t/ndb_autodiscover2-master.opt delete mode 100644 mysql-test/t/ndb_autodiscover2.test delete mode 100644 mysql-test/t/ndb_autodiscover3.test delete mode 100644 mysql-test/t/ndb_backup_print.test delete mode 100644 mysql-test/t/ndb_basic.test delete mode 100644 mysql-test/t/ndb_binlog_basic.test delete mode 100644 mysql-test/t/ndb_binlog_basic2.test delete mode 100644 mysql-test/t/ndb_binlog_ddl_multi.test delete mode 100644 mysql-test/t/ndb_binlog_discover.test delete mode 100644 mysql-test/t/ndb_binlog_ignore_db-master.opt delete mode 100644 mysql-test/t/ndb_binlog_ignore_db.test delete mode 100644 mysql-test/t/ndb_binlog_log_bin.test delete mode 100644 mysql-test/t/ndb_binlog_multi.test delete mode 100644 mysql-test/t/ndb_bitfield.test delete mode 100644 mysql-test/t/ndb_blob.test delete mode 100644 mysql-test/t/ndb_blob_partition.test delete mode 100644 mysql-test/t/ndb_cache.test delete mode 100644 mysql-test/t/ndb_cache2.test delete mode 100644 mysql-test/t/ndb_cache_multi.test delete mode 100644 mysql-test/t/ndb_cache_multi2.test delete mode 100644 mysql-test/t/ndb_charset.test delete mode 100644 mysql-test/t/ndb_condition_pushdown.test delete mode 100644 mysql-test/t/ndb_config.test delete mode 100644 mysql-test/t/ndb_config2.test delete mode 100644 mysql-test/t/ndb_cursor.test delete mode 100644 mysql-test/t/ndb_database.test delete mode 100644 mysql-test/t/ndb_dd_alter.test delete mode 100644 mysql-test/t/ndb_dd_backuprestore.test delete mode 100644 mysql-test/t/ndb_dd_basic.test delete mode 100644 mysql-test/t/ndb_dd_ddl.test delete mode 100644 mysql-test/t/ndb_dd_disk2memory.test delete mode 100644 mysql-test/t/ndb_dd_dump.test delete mode 100644 mysql-test/t/ndb_dd_sql_features.test delete mode 100644 mysql-test/t/ndb_gis.test delete mode 100644 mysql-test/t/ndb_grant.later delete mode 100644 mysql-test/t/ndb_index.test delete mode 100644 mysql-test/t/ndb_index_ordered.test delete mode 100644 mysql-test/t/ndb_index_unique.test delete mode 100644 mysql-test/t/ndb_insert.test delete mode 100644 mysql-test/t/ndb_limit.test delete mode 100644 mysql-test/t/ndb_load.test delete mode 100644 mysql-test/t/ndb_loaddatalocal.test delete mode 100644 mysql-test/t/ndb_lock.test delete mode 100644 mysql-test/t/ndb_minmax.test delete mode 100644 mysql-test/t/ndb_multi.test delete mode 100644 mysql-test/t/ndb_multi_row.test delete mode 100644 mysql-test/t/ndb_partition_error.test delete mode 100644 mysql-test/t/ndb_partition_error2-master.opt delete mode 100644 mysql-test/t/ndb_partition_error2.test delete mode 100644 mysql-test/t/ndb_partition_key.test delete mode 100644 mysql-test/t/ndb_partition_list.test delete mode 100644 mysql-test/t/ndb_partition_range.test delete mode 100644 mysql-test/t/ndb_read_multi_range.test delete mode 100644 mysql-test/t/ndb_rename.test delete mode 100644 mysql-test/t/ndb_replace.test delete mode 100644 mysql-test/t/ndb_restore.test delete mode 100644 mysql-test/t/ndb_restore_compat.test delete mode 100644 mysql-test/t/ndb_restore_partition-master.opt delete mode 100644 mysql-test/t/ndb_restore_partition.test delete mode 100644 mysql-test/t/ndb_restore_print.test delete mode 100644 mysql-test/t/ndb_row_format.test delete mode 100644 mysql-test/t/ndb_single_user.test delete mode 100644 mysql-test/t/ndb_sp.test delete mode 100644 mysql-test/t/ndb_subquery.test delete mode 100644 mysql-test/t/ndb_temporary.test delete mode 100644 mysql-test/t/ndb_transaction.test delete mode 100644 mysql-test/t/ndb_trigger.test delete mode 100644 mysql-test/t/ndb_truncate.test delete mode 100644 mysql-test/t/ndb_types.test delete mode 100644 mysql-test/t/ndb_update.test delete mode 100644 mysql-test/t/ndb_view.test delete mode 100644 mysql-test/t/ndbapi.test delete mode 100644 mysql-test/t/partition_03ndb.test delete mode 100644 mysql-test/t/ps_7ndb.test delete mode 100644 mysql-test/t/rpl000010-slave.opt delete mode 100644 mysql-test/t/rpl000010.test delete mode 100644 mysql-test/t/rpl000011.test delete mode 100644 mysql-test/t/rpl000013.test delete mode 100644 mysql-test/t/rpl000017-slave.opt delete mode 100755 mysql-test/t/rpl000017-slave.sh delete mode 100644 mysql-test/t/rpl000017.test delete mode 100644 mysql-test/t/rpl000018-master.opt delete mode 100644 mysql-test/t/rpl000018-slave.opt delete mode 100755 mysql-test/t/rpl_000015-slave.sh delete mode 100644 mysql-test/t/rpl_000015.slave-mi delete mode 100644 mysql-test/t/rpl_000015.test delete mode 100644 mysql-test/t/rpl_EE_err.test delete mode 100644 mysql-test/t/rpl_LD_INFILE.test delete mode 100644 mysql-test/t/rpl_alter.test delete mode 100644 mysql-test/t/rpl_alter_db.test delete mode 100644 mysql-test/t/rpl_auto_increment-master.opt delete mode 100644 mysql-test/t/rpl_auto_increment-slave.opt delete mode 100644 mysql-test/t/rpl_auto_increment.test delete mode 100644 mysql-test/t/rpl_auto_increment_11932.test delete mode 100644 mysql-test/t/rpl_bit.test delete mode 100644 mysql-test/t/rpl_bit_npk.test delete mode 100644 mysql-test/t/rpl_change_master.test delete mode 100644 mysql-test/t/rpl_charset_sjis.test delete mode 100644 mysql-test/t/rpl_commit_after_flush.test delete mode 100644 mysql-test/t/rpl_create_database-master.opt delete mode 100644 mysql-test/t/rpl_create_database-slave.opt delete mode 100644 mysql-test/t/rpl_create_database.test delete mode 100644 mysql-test/t/rpl_critical_errors.test delete mode 100644 mysql-test/t/rpl_ddl.test delete mode 100644 mysql-test/t/rpl_deadlock_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_deadlock_innodb.test delete mode 100644 mysql-test/t/rpl_delete_no_where.test delete mode 100644 mysql-test/t/rpl_do_grant.test delete mode 100644 mysql-test/t/rpl_drop.test delete mode 100644 mysql-test/t/rpl_drop_db.test delete mode 100644 mysql-test/t/rpl_drop_temp-slave.opt delete mode 100644 mysql-test/t/rpl_drop_temp.test delete mode 100644 mysql-test/t/rpl_dual_pos_advance-master.opt delete mode 100644 mysql-test/t/rpl_dual_pos_advance.test delete mode 100644 mysql-test/t/rpl_empty_master_crash-master.opt delete mode 100644 mysql-test/t/rpl_empty_master_crash.test delete mode 100644 mysql-test/t/rpl_err_ignoredtable-slave.opt delete mode 100644 mysql-test/t/rpl_err_ignoredtable.test delete mode 100644 mysql-test/t/rpl_events.test delete mode 100644 mysql-test/t/rpl_extraCol_innodb-master.opt delete mode 100644 mysql-test/t/rpl_extraCol_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_extraCol_innodb.test delete mode 100644 mysql-test/t/rpl_extraCol_myisam.test delete mode 100644 mysql-test/t/rpl_failed_optimize-master.opt delete mode 100644 mysql-test/t/rpl_failed_optimize.test delete mode 100644 mysql-test/t/rpl_flushlog_loop-master.opt delete mode 100755 mysql-test/t/rpl_flushlog_loop-master.sh delete mode 100644 mysql-test/t/rpl_flushlog_loop-slave.opt delete mode 100755 mysql-test/t/rpl_flushlog_loop-slave.sh delete mode 100644 mysql-test/t/rpl_flushlog_loop.test delete mode 100644 mysql-test/t/rpl_foreign_key_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_foreign_key_innodb.test delete mode 100644 mysql-test/t/rpl_free_items-slave.opt delete mode 100644 mysql-test/t/rpl_free_items.test delete mode 100644 mysql-test/t/rpl_get_lock.test delete mode 100644 mysql-test/t/rpl_ignore_grant-slave.opt delete mode 100644 mysql-test/t/rpl_ignore_grant.test delete mode 100644 mysql-test/t/rpl_ignore_revoke-slave.opt delete mode 100644 mysql-test/t/rpl_ignore_revoke.test delete mode 100644 mysql-test/t/rpl_ignore_table-slave.opt delete mode 100644 mysql-test/t/rpl_ignore_table.test delete mode 100644 mysql-test/t/rpl_ignore_table_update-slave.opt delete mode 100644 mysql-test/t/rpl_ignore_table_update.test delete mode 100644 mysql-test/t/rpl_incident-master.opt delete mode 100644 mysql-test/t/rpl_incident.test delete mode 100644 mysql-test/t/rpl_init_slave-slave.opt delete mode 100644 mysql-test/t/rpl_init_slave.test delete mode 100644 mysql-test/t/rpl_innodb.test delete mode 100644 mysql-test/t/rpl_insert.test delete mode 100644 mysql-test/t/rpl_insert_id-slave.opt delete mode 100644 mysql-test/t/rpl_insert_id.test delete mode 100644 mysql-test/t/rpl_insert_id_pk-slave.opt delete mode 100644 mysql-test/t/rpl_insert_id_pk.test delete mode 100644 mysql-test/t/rpl_insert_ignore-slave.opt delete mode 100644 mysql-test/t/rpl_insert_ignore.test delete mode 100644 mysql-test/t/rpl_insert_select.test delete mode 100644 mysql-test/t/rpl_known_bugs_detection-master.opt delete mode 100644 mysql-test/t/rpl_known_bugs_detection.test delete mode 100644 mysql-test/t/rpl_load_from_master-slave.opt delete mode 100644 mysql-test/t/rpl_load_from_master.test delete mode 100644 mysql-test/t/rpl_load_table_from_master.test delete mode 100644 mysql-test/t/rpl_loaddata.test delete mode 100644 mysql-test/t/rpl_loaddata_charset.test delete mode 100644 mysql-test/t/rpl_loaddata_m-master.opt delete mode 100644 mysql-test/t/rpl_loaddata_m.test delete mode 100644 mysql-test/t/rpl_loaddata_s-slave.opt delete mode 100644 mysql-test/t/rpl_loaddata_s.test delete mode 100644 mysql-test/t/rpl_loaddata_simple.test delete mode 100644 mysql-test/t/rpl_loaddatalocal.test delete mode 100644 mysql-test/t/rpl_loadfile.test delete mode 100644 mysql-test/t/rpl_locale.test delete mode 100644 mysql-test/t/rpl_log_pos.test delete mode 100644 mysql-test/t/rpl_many_optimize.test delete mode 100644 mysql-test/t/rpl_master_pos_wait.test delete mode 100755 mysql-test/t/rpl_misc_functions-slave.sh delete mode 100644 mysql-test/t/rpl_misc_functions.test delete mode 100644 mysql-test/t/rpl_mixed_ddl_dml.test delete mode 100644 mysql-test/t/rpl_multi_delete-slave.opt delete mode 100644 mysql-test/t/rpl_multi_delete.test delete mode 100644 mysql-test/t/rpl_multi_delete2-slave.opt delete mode 100644 mysql-test/t/rpl_multi_delete2.test delete mode 100644 mysql-test/t/rpl_multi_engine-slave.opt delete mode 100644 mysql-test/t/rpl_multi_engine.test delete mode 100644 mysql-test/t/rpl_multi_update.test delete mode 100644 mysql-test/t/rpl_multi_update2-slave.opt delete mode 100644 mysql-test/t/rpl_multi_update2.test delete mode 100644 mysql-test/t/rpl_multi_update3.test delete mode 100644 mysql-test/t/rpl_multi_update4-slave.opt delete mode 100644 mysql-test/t/rpl_multi_update4.test delete mode 100644 mysql-test/t/rpl_ndb_2innodb-master.opt delete mode 100644 mysql-test/t/rpl_ndb_2innodb-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_2innodb.test delete mode 100644 mysql-test/t/rpl_ndb_2myisam-master.opt delete mode 100644 mysql-test/t/rpl_ndb_2myisam-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_2myisam.test delete mode 100644 mysql-test/t/rpl_ndb_UUID.test delete mode 100644 mysql-test/t/rpl_ndb_auto_inc.test delete mode 100644 mysql-test/t/rpl_ndb_bank.test delete mode 100644 mysql-test/t/rpl_ndb_basic.test delete mode 100644 mysql-test/t/rpl_ndb_blob.test delete mode 100644 mysql-test/t/rpl_ndb_blob2.test delete mode 100644 mysql-test/t/rpl_ndb_charset.test delete mode 100644 mysql-test/t/rpl_ndb_circular.test delete mode 100644 mysql-test/t/rpl_ndb_circular_simplex.test delete mode 100644 mysql-test/t/rpl_ndb_commit_afterflush.test delete mode 100644 mysql-test/t/rpl_ndb_dd_advance.test delete mode 100644 mysql-test/t/rpl_ndb_dd_basic.test delete mode 100644 mysql-test/t/rpl_ndb_dd_partitions.test delete mode 100644 mysql-test/t/rpl_ndb_ddl.test delete mode 100644 mysql-test/t/rpl_ndb_delete_nowhere.test delete mode 100644 mysql-test/t/rpl_ndb_do_db-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_do_db.test delete mode 100644 mysql-test/t/rpl_ndb_do_table-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_do_table.test delete mode 100644 mysql-test/t/rpl_ndb_extraCol.test delete mode 100644 mysql-test/t/rpl_ndb_func003.test delete mode 100644 mysql-test/t/rpl_ndb_idempotent.test delete mode 100644 mysql-test/t/rpl_ndb_innodb2ndb-master.opt delete mode 100644 mysql-test/t/rpl_ndb_innodb2ndb-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_innodb2ndb.test delete mode 100644 mysql-test/t/rpl_ndb_innodb_trans-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_innodb_trans.test delete mode 100644 mysql-test/t/rpl_ndb_insert_ignore.test delete mode 100644 mysql-test/t/rpl_ndb_load.test delete mode 100644 mysql-test/t/rpl_ndb_log-master.opt delete mode 100644 mysql-test/t/rpl_ndb_log.test delete mode 100644 mysql-test/t/rpl_ndb_multi.test delete mode 100644 mysql-test/t/rpl_ndb_multi_update2-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_multi_update2.test delete mode 100644 mysql-test/t/rpl_ndb_multi_update3.test delete mode 100644 mysql-test/t/rpl_ndb_myisam2ndb-master.opt delete mode 100644 mysql-test/t/rpl_ndb_myisam2ndb-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_myisam2ndb.test delete mode 100644 mysql-test/t/rpl_ndb_relayrotate-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_relayrotate.test delete mode 100644 mysql-test/t/rpl_ndb_rep_ignore-slave.opt delete mode 100644 mysql-test/t/rpl_ndb_rep_ignore.test delete mode 100644 mysql-test/t/rpl_ndb_row_001.test delete mode 100644 mysql-test/t/rpl_ndb_sp003.test delete mode 100644 mysql-test/t/rpl_ndb_sp006.test delete mode 100644 mysql-test/t/rpl_ndb_stm_innodb-master.opt delete mode 100644 mysql-test/t/rpl_ndb_stm_innodb.test delete mode 100644 mysql-test/t/rpl_ndb_sync.test delete mode 100644 mysql-test/t/rpl_ndb_trig004.test delete mode 100644 mysql-test/t/rpl_ndbapi_multi.test delete mode 100644 mysql-test/t/rpl_optimize.test delete mode 100644 mysql-test/t/rpl_packet-master.opt delete mode 100644 mysql-test/t/rpl_packet-slave.opt delete mode 100644 mysql-test/t/rpl_packet.test delete mode 100644 mysql-test/t/rpl_ps.test delete mode 100644 mysql-test/t/rpl_rbr_to_sbr.test delete mode 100644 mysql-test/t/rpl_read_only-slave.opt delete mode 100644 mysql-test/t/rpl_read_only.test delete mode 100644 mysql-test/t/rpl_redirect.test delete mode 100644 mysql-test/t/rpl_relay_space_innodb-master.opt delete mode 100644 mysql-test/t/rpl_relay_space_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_relay_space_innodb.test delete mode 100644 mysql-test/t/rpl_relay_space_myisam.test delete mode 100644 mysql-test/t/rpl_relayrotate-slave.opt delete mode 100644 mysql-test/t/rpl_relayrotate.test delete mode 100644 mysql-test/t/rpl_relayspace-slave.opt delete mode 100644 mysql-test/t/rpl_relayspace.test delete mode 100644 mysql-test/t/rpl_replicate_do-slave.opt delete mode 100644 mysql-test/t/rpl_replicate_do.test delete mode 100644 mysql-test/t/rpl_replicate_ignore_db-slave.opt delete mode 100644 mysql-test/t/rpl_replicate_ignore_db.test delete mode 100644 mysql-test/t/rpl_rewrt_db-slave.opt delete mode 100644 mysql-test/t/rpl_rewrt_db.test delete mode 100644 mysql-test/t/rpl_rotate_logs-master.opt delete mode 100755 mysql-test/t/rpl_rotate_logs-slave.sh delete mode 100644 mysql-test/t/rpl_rotate_logs.slave-mi delete mode 100644 mysql-test/t/rpl_rotate_logs.test delete mode 100644 mysql-test/t/rpl_row_001.test delete mode 100644 mysql-test/t/rpl_row_4_bytes-master.opt delete mode 100644 mysql-test/t/rpl_row_4_bytes.test delete mode 100644 mysql-test/t/rpl_row_NOW.test delete mode 100644 mysql-test/t/rpl_row_USER.test delete mode 100644 mysql-test/t/rpl_row_UUID.test delete mode 100644 mysql-test/t/rpl_row_basic_11bugs-master.opt delete mode 100644 mysql-test/t/rpl_row_basic_11bugs-slave.opt delete mode 100644 mysql-test/t/rpl_row_basic_11bugs.test delete mode 100644 mysql-test/t/rpl_row_basic_2myisam.test delete mode 100644 mysql-test/t/rpl_row_basic_3innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_basic_3innodb.test delete mode 100644 mysql-test/t/rpl_row_basic_7ndb.test delete mode 100644 mysql-test/t/rpl_row_basic_8partition.test delete mode 100644 mysql-test/t/rpl_row_blob_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_blob_innodb.test delete mode 100644 mysql-test/t/rpl_row_blob_myisam.test delete mode 100644 mysql-test/t/rpl_row_charset.test delete mode 100644 mysql-test/t/rpl_row_create_table-slave.opt delete mode 100644 mysql-test/t/rpl_row_create_table.test delete mode 100644 mysql-test/t/rpl_row_delayed_ins.test delete mode 100644 mysql-test/t/rpl_row_drop.test delete mode 100644 mysql-test/t/rpl_row_err_daisychain-master.opt delete mode 100644 mysql-test/t/rpl_row_err_daisychain-slave.opt delete mode 100644 mysql-test/t/rpl_row_flsh_tbls.test delete mode 100644 mysql-test/t/rpl_row_func001.test delete mode 100644 mysql-test/t/rpl_row_func002.test delete mode 100644 mysql-test/t/rpl_row_func003-slave.opt delete mode 100644 mysql-test/t/rpl_row_func003.test delete mode 100644 mysql-test/t/rpl_row_inexist_tbl-slave.opt delete mode 100644 mysql-test/t/rpl_row_inexist_tbl.test delete mode 100644 mysql-test/t/rpl_row_insert_delayed.test delete mode 100644 mysql-test/t/rpl_row_log-master.opt delete mode 100644 mysql-test/t/rpl_row_log-slave.opt delete mode 100644 mysql-test/t/rpl_row_log.test delete mode 100644 mysql-test/t/rpl_row_log_innodb-master.opt delete mode 100644 mysql-test/t/rpl_row_log_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_log_innodb.test delete mode 100644 mysql-test/t/rpl_row_max_relay_size.test delete mode 100644 mysql-test/t/rpl_row_mysqlbinlog-master.opt delete mode 100644 mysql-test/t/rpl_row_mysqlbinlog.test delete mode 100644 mysql-test/t/rpl_row_mystery22.test delete mode 100644 mysql-test/t/rpl_row_reset_slave.test delete mode 100644 mysql-test/t/rpl_row_sp001.test delete mode 100644 mysql-test/t/rpl_row_sp002_innodb-master.opt delete mode 100644 mysql-test/t/rpl_row_sp002_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_sp002_innodb.test delete mode 100644 mysql-test/t/rpl_row_sp003-master.opt delete mode 100644 mysql-test/t/rpl_row_sp003-slave.opt delete mode 100644 mysql-test/t/rpl_row_sp003.test delete mode 100644 mysql-test/t/rpl_row_sp005.test delete mode 100644 mysql-test/t/rpl_row_sp006_InnoDB-slave.opt delete mode 100644 mysql-test/t/rpl_row_sp006_InnoDB.test delete mode 100644 mysql-test/t/rpl_row_sp007_innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_sp007_innodb.test delete mode 100644 mysql-test/t/rpl_row_sp008.test delete mode 100644 mysql-test/t/rpl_row_sp009.test delete mode 100644 mysql-test/t/rpl_row_sp010.test delete mode 100644 mysql-test/t/rpl_row_sp011.test delete mode 100644 mysql-test/t/rpl_row_sp012.test delete mode 100644 mysql-test/t/rpl_row_stop_middle.test delete mode 100644 mysql-test/t/rpl_row_stop_middle_update-master.opt delete mode 100644 mysql-test/t/rpl_row_stop_middle_update-slave.opt delete mode 100644 mysql-test/t/rpl_row_stop_middle_update.test delete mode 100644 mysql-test/t/rpl_row_tabledefs_2myisam.test delete mode 100644 mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt delete mode 100644 mysql-test/t/rpl_row_tabledefs_3innodb.test delete mode 100644 mysql-test/t/rpl_row_trig001.test delete mode 100644 mysql-test/t/rpl_row_trig002.test delete mode 100644 mysql-test/t/rpl_row_trig003.test delete mode 100644 mysql-test/t/rpl_row_trig004.test delete mode 100644 mysql-test/t/rpl_row_until.test delete mode 100644 mysql-test/t/rpl_row_view01.test delete mode 100644 mysql-test/t/rpl_server_id1.test delete mode 100644 mysql-test/t/rpl_server_id2-slave.opt delete mode 100644 mysql-test/t/rpl_server_id2.test delete mode 100644 mysql-test/t/rpl_session_var.test delete mode 100644 mysql-test/t/rpl_set_charset.test delete mode 100644 mysql-test/t/rpl_sf.test delete mode 100644 mysql-test/t/rpl_skip_error-slave.opt delete mode 100644 mysql-test/t/rpl_skip_error.test delete mode 100644 mysql-test/t/rpl_slave_status.test delete mode 100644 mysql-test/t/rpl_sp-master.opt delete mode 100644 mysql-test/t/rpl_sp-slave.opt delete mode 100644 mysql-test/t/rpl_sp.test delete mode 100644 mysql-test/t/rpl_sp004.test delete mode 100644 mysql-test/t/rpl_sp_effects-master.opt delete mode 100644 mysql-test/t/rpl_sp_effects-slave.opt delete mode 100644 mysql-test/t/rpl_sp_effects.test delete mode 100644 mysql-test/t/rpl_sporadic_master-master.opt delete mode 100644 mysql-test/t/rpl_sporadic_master.test delete mode 100644 mysql-test/t/rpl_ssl.test delete mode 100644 mysql-test/t/rpl_ssl1.test delete mode 100644 mysql-test/t/rpl_start_stop_slave.test delete mode 100644 mysql-test/t/rpl_stm_000001-slave.opt delete mode 100644 mysql-test/t/rpl_stm_000001.test delete mode 100644 mysql-test/t/rpl_stm_EE_err2.test delete mode 100644 mysql-test/t/rpl_stm_charset.test delete mode 100644 mysql-test/t/rpl_stm_flsh_tbls.test delete mode 100644 mysql-test/t/rpl_stm_insert_delayed.test delete mode 100644 mysql-test/t/rpl_stm_log-master.opt delete mode 100644 mysql-test/t/rpl_stm_log-slave.opt delete mode 100644 mysql-test/t/rpl_stm_log.test delete mode 100644 mysql-test/t/rpl_stm_max_relay_size.test delete mode 100644 mysql-test/t/rpl_stm_multi_query.test delete mode 100644 mysql-test/t/rpl_stm_mystery22.test delete mode 100644 mysql-test/t/rpl_stm_no_op.test delete mode 100644 mysql-test/t/rpl_stm_reset_slave.test delete mode 100644 mysql-test/t/rpl_stm_until.test delete mode 100644 mysql-test/t/rpl_switch_stm_row_mixed.test delete mode 100644 mysql-test/t/rpl_temp_table.test delete mode 100644 mysql-test/t/rpl_temporary.test delete mode 100644 mysql-test/t/rpl_timezone-master.opt delete mode 100644 mysql-test/t/rpl_timezone-slave.opt delete mode 100644 mysql-test/t/rpl_timezone.test delete mode 100644 mysql-test/t/rpl_trigger.test delete mode 100644 mysql-test/t/rpl_trunc_temp.test delete mode 100644 mysql-test/t/rpl_truncate_2myisam.test delete mode 100644 mysql-test/t/rpl_truncate_3innodb.test delete mode 100644 mysql-test/t/rpl_truncate_7ndb.test delete mode 100644 mysql-test/t/rpl_truncate_7ndb_2-master.opt delete mode 100644 mysql-test/t/rpl_truncate_7ndb_2.test delete mode 100644 mysql-test/t/rpl_udf-master.opt delete mode 100644 mysql-test/t/rpl_udf-slave.opt delete mode 100644 mysql-test/t/rpl_udf.test delete mode 100644 mysql-test/t/rpl_user_variables.test delete mode 100644 mysql-test/t/rpl_variables-master.opt delete mode 100644 mysql-test/t/rpl_variables.test delete mode 100644 mysql-test/t/rpl_view-slave.opt delete mode 100644 mysql-test/t/rpl_view.test delete mode 100644 mysql-test/t/strict_autoinc_5ndb.test (limited to 'mysql-test') diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index 11ff85818a7..13708a5a3af 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -23,7 +23,8 @@ use IO::File(); use strict; sub collect_test_cases ($); -sub collect_one_test_case ($$$$$$$); +sub collect_one_suite ($$); +sub collect_one_test_case ($$$$$$$$$); sub mtr_options_from_test_file($$); @@ -34,7 +35,120 @@ sub mtr_options_from_test_file($$); ############################################################################## sub collect_test_cases ($) { - my $suite= shift; # Test suite name + my $suites= shift; # Semicolon separated list of test suites + my $cases = []; # Array of hash + + foreach my $suite (split(",", $suites)) + { + collect_one_suite($suite, $cases); + } + + + if ( @::opt_cases ) + { + # Check that the tests specified was found + # in at least one suite + foreach my $tname ( @::opt_cases ) + { + my $found= 0; + foreach my $test ( @$cases ) + { + if ( mtr_match_extension($test->{'name'}, $tname) ) + { + $found= 1; + } + } + if ( not $found ) + { + mtr_error("Could not find $tname in any suite"); + } + } + } + + if ( $::opt_reorder ) + { + # Reorder the test cases in an order that will make them faster to run + my %sort_criteria; + + # Make a mapping of test name to a string that represents how that test + # should be sorted among the other tests. Put the most important criterion + # first, then a sub-criterion, then sub-sub-criterion, et c. + foreach my $tinfo (@$cases) + { + my @criteria = (); + + # Look for tests that muct be in run in a defined order + # that is defined by test having the same name except for + # the ending digit + + # Put variables into hash + my $test_name= $tinfo->{'name'}; + my $depend_on_test_name; + if ( $test_name =~ /^([\D]+)([0-9]{1})$/ ) + { + my $base_name= $1; + my $idx= $2; + mtr_verbose("$test_name => $base_name idx=$idx"); + if ( $idx > 1 ) + { + $idx-= 1; + $base_name= "$base_name$idx"; + mtr_verbose("New basename $base_name"); + } + + foreach my $tinfo2 (@$cases) + { + if ( $tinfo2->{'name'} eq $base_name ) + { + mtr_verbose("found dependent test $tinfo2->{'name'}"); + $depend_on_test_name=$base_name; + } + } + } + + if ( defined $depend_on_test_name ) + { + mtr_verbose("Giving $test_name same critera as $depend_on_test_name"); + $sort_criteria{$test_name} = $sort_criteria{$depend_on_test_name}; + } + else + { + # + # Append the criteria for sorting, in order of importance. + # + push(@criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0")); + # Group test with equal options together. + # Ending with "~" makes empty sort later than filled + push(@criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~"); + + $sort_criteria{$test_name} = join(" ", @criteria); + } + } + + @$cases = sort { + $sort_criteria{$a->{'name'}} . $a->{'name'} cmp + $sort_criteria{$b->{'name'}} . $b->{'name'}; } @$cases; + + if ( $::opt_script_debug ) + { + # For debugging the sort-order + foreach my $tinfo (@$cases) + { + print("$sort_criteria{$tinfo->{'name'}} -> \t$tinfo->{'name'}\n"); + } + } + } + + return $cases; + +} + +sub collect_one_suite($$) +{ + my $suite= shift; # Test suite name + my $cases= shift; # List of test cases + + mtr_verbose("Collecting: $suite"); my $testdir; my $resdir; @@ -50,12 +164,8 @@ sub collect_test_cases ($) { $resdir= "$::glob_mysql_test_dir/suite/$suite/r"; } - my $cases = []; # Array of hash, will be array of C struct - - opendir(TESTDIR, $testdir) or mtr_error("Can't open dir \"$testdir\": $!"); - # ---------------------------------------------------------------------- - # Disable some tests listed in disabled.def + # Build a hash of disabled testcases for this suite # ---------------------------------------------------------------------- my %disabled; if ( open(DISABLED, "$testdir/disabled.def" ) ) @@ -71,11 +181,19 @@ sub collect_test_cases ($) { close DISABLED; } + # Read suite.opt file + my $suite_opt_file= "$testdir/suite.opt"; + my $suite_opts= []; + if ( -f $suite_opt_file ) + { + $suite_opts= mtr_get_opts_from_file($suite_opt_file); + } + if ( @::opt_cases ) { + # Collect in specified order, no sort foreach my $tname ( @::opt_cases ) { - # Run in specified order, no sort my $elem= undef; my $component_id= undef; @@ -122,7 +240,8 @@ sub collect_test_cases ($) { } elsif ( ! $mysqld_test_exists and ! $im_test_exists ) { - mtr_error("Test case $tname is not found"); + # Silently skip, could exist in another suite + next; } elsif ( $mysqld_test_exists ) { @@ -136,13 +255,15 @@ sub collect_test_cases ($) { } } - collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%disabled, - $component_id); + collect_one_test_case($testdir,$resdir,$suite,$tname, + $elem,$cases,\%disabled,$component_id, + $suite_opts); } - closedir TESTDIR; } else { + opendir(TESTDIR, $testdir) or mtr_error("Can't open dir \"$testdir\": $!"); + foreach my $elem ( sort readdir(TESTDIR) ) { my $component_id= undef; @@ -165,87 +286,13 @@ sub collect_test_cases ($) { next if $::opt_do_test and ! defined mtr_match_prefix($elem,$::opt_do_test); - collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%disabled, - $component_id); + collect_one_test_case($testdir,$resdir,$suite,$tname, + $elem,$cases,\%disabled,$component_id, + $suite_opts); } closedir TESTDIR; } - # Reorder the test cases in an order that will make them faster to run - if ( $::opt_reorder ) - { - - my %sort_criteria; - - # Make a mapping of test name to a string that represents how that test - # should be sorted among the other tests. Put the most important criterion - # first, then a sub-criterion, then sub-sub-criterion, et c. - foreach my $tinfo (@$cases) - { - my @criteria = (); - - # Look for tests that muct be in run in a defined order - # that is defined by test having the same name except for - # the ending digit - - # Put variables into hash - my $test_name= $tinfo->{'name'}; - my $depend_on_test_name; - if ( $test_name =~ /^([\D]+)([0-9]{1})$/ ) - { - my $base_name= $1; - my $idx= $2; - mtr_verbose("$test_name => $base_name idx=$idx"); - if ( $idx > 1 ) - { - $idx-= 1; - $base_name= "$base_name$idx"; - mtr_verbose("New basename $base_name"); - } - - foreach my $tinfo2 (@$cases) - { - if ( $tinfo2->{'name'} eq $base_name ) - { - mtr_verbose("found dependent test $tinfo2->{'name'}"); - $depend_on_test_name=$base_name; - } - } - } - - if ( defined $depend_on_test_name ) - { - mtr_verbose("Giving $test_name same critera as $depend_on_test_name"); - $sort_criteria{$test_name} = $sort_criteria{$depend_on_test_name}; - } - else - { - # - # Append the criteria for sorting, in order of importance. - # - push(@criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0")); - # Group test with equal options together. - # Ending with "~" makes empty sort later than filled - push(@criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~"); - - $sort_criteria{$test_name} = join(" ", @criteria); - } - } - - @$cases = sort { - $sort_criteria{$a->{'name'}} . $a->{'name'} cmp - $sort_criteria{$b->{'name'}} . $b->{'name'}; } @$cases; - - if ( $::opt_script_debug ) - { - # For debugging the sort-order - foreach my $tinfo (@$cases) - { - print("$sort_criteria{$tinfo->{'name'}} -> \t$tinfo->{'name'}\n"); - } - } - } - return $cases; } @@ -257,14 +304,16 @@ sub collect_test_cases ($) { ############################################################################## -sub collect_one_test_case($$$$$$$) { +sub collect_one_test_case($$$$$$$$$) { my $testdir= shift; my $resdir= shift; + my $suite= shift; my $tname= shift; my $elem= shift; my $cases= shift; my $disabled=shift; my $component_id= shift; + my $suite_opts= shift; my $path= "$testdir/$elem"; @@ -279,7 +328,7 @@ sub collect_one_test_case($$$$$$$) { my $tinfo= {}; - $tinfo->{'name'}= $tname; + $tinfo->{'name'}= "$suite.$tname"; $tinfo->{'result_file'}= "$resdir/$tname.result"; $tinfo->{'component_id'} = $component_id; push(@$cases, $tinfo); @@ -334,6 +383,15 @@ sub collect_one_test_case($$$$$$$) { $tinfo->{'slave_opt'}= []; $tinfo->{'slave_mi'}= []; + # Add suite opts + foreach my $opt ( @$suite_opts ) + { + mtr_verbose($opt); + push(@{$tinfo->{'master_opt'}}, $opt); + push(@{$tinfo->{'slave_opt'}}, $opt); + } + + # Add master opts if ( -f $master_opt_file ) { @@ -394,6 +452,7 @@ sub collect_one_test_case($$$$$$$) { } } + # Add slave opts if ( -f $slave_opt_file ) { my $slave_opt= mtr_get_opts_from_file($slave_opt_file); diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 096840eb559..d60f8967256 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -48,30 +48,15 @@ sub mtr_verbose (@); # We can't use diff -u or diff -a as these are not portable sub mtr_show_failed_diff ($) { - my $result_file_name= shift; + my $tinfo= shift; # The reject and log files have been dumped to # to filenames based on the result_file's name - my $tname= basename($result_file_name); - $tname=~ s/\..*$//; - - my $reject_file= "r/$tname.reject"; - my $result_file= "r/$tname.result"; - my $log_file= "$::opt_vardir/log/$tname.log"; - my $eval_file= "r/$tname.eval"; - - if ( $::opt_suite ne "main" ) - { - $reject_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$reject_file"; - $result_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$result_file"; - $eval_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$eval_file"; - $log_file= "$::glob_mysql_test_dir/suite/$::opt_suite/$log_file"; - } - - if ( -f $eval_file ) - { - $result_file= $eval_file; - } + my $base_file= mtr_match_extension($tinfo->{'result_file'}, + "result"); # Trim extension + my $reject_file= "$base_file.reject"; + my $result_file= "$base_file.result"; + my $log_file= "$base_file.log"; my $diffopts= $::opt_udiff ? "-u" : "-c"; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 970790f4141..085feb524c4 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -132,7 +132,7 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG'}; our $default_vardir; our $opt_usage; -our $opt_suite; +our $opt_suites= "main,binlog,rpl,rpl_ndb,ndb"; # Default suites to run our $opt_script_debug= 0; # Script debugging, enable with --script-debug our $opt_verbose= 0; # Verbose output, enable with --verbose @@ -404,7 +404,7 @@ sub main () { else { # Figure out which tests we are going to run - my $tests= collect_test_cases($opt_suite); + my $tests= collect_test_cases($opt_suites); # Turn off NDB and other similar options if no tests use it my ($need_ndbcluster,$need_im); @@ -458,7 +458,7 @@ sub main () { run_report_features(); } - run_suite($opt_suite, $tests); + run_tests($tests); } mtr_exit(0); @@ -474,7 +474,6 @@ sub command_line_setup () { # These are defaults for things that are set on the command line - $opt_suite= "main"; # Special default suite my $opt_comment; $opt_master_myport= 9306; @@ -534,7 +533,7 @@ sub command_line_setup () { 'skip-slave-binlog' => \$opt_skip_slave_binlog, 'do-test=s' => \$opt_do_test, 'start-from=s' => \$opt_start_from, - 'suite=s' => \$opt_suite, + 'suite|suites=s' => \$opt_suites, 'skip-rpl' => \$opt_skip_rpl, 'skip-im' => \$opt_skip_im, 'skip-test=s' => \$opt_skip_test, @@ -2797,19 +2796,17 @@ sub run_benchmarks ($) { ############################################################################## # -# Run the test suite +# Run the tests # ############################################################################## -sub run_suite () { - my ($suite, $tests)= @_; +sub run_tests () { + my ($tests)= @_; mtr_print_thick_line(); mtr_timer_start($glob_timers,"suite", 60 * $opt_suite_timeout); - mtr_report("Starting Tests in the '$suite' suite"); - mtr_report_tests_not_skipped_though_disabled($tests); mtr_print_header(); @@ -3272,18 +3269,14 @@ sub run_testcase_check_skip_test($) sub do_before_run_mysqltest($) { my $tinfo= shift; - my $tname= $tinfo->{'name'}; # Remove old files produced by mysqltest - my $result_dir= "r"; - if ( $opt_suite ne "main" ) - { - $result_dir= "suite/$opt_suite/r"; - } - unlink("$result_dir/$tname.reject"); - unlink("$result_dir/$tname.progress"); - unlink("$result_dir/$tname.log"); - unlink("$result_dir/$tname.warnings"); + my $base_file= mtr_match_extension($tinfo->{'result_file'}, + "result"); # Trim extension + unlink("$base_file.reject"); + unlink("$base_file.progress"); + unlink("$base_file.log"); + unlink("$base_file.warnings"); if (!$opt_extern) { @@ -3302,7 +3295,6 @@ sub do_before_run_mysqltest($) sub do_after_run_mysqltest($) { my $tinfo= shift; - my $tname= $tinfo->{'name'}; # Save info from this testcase run to mysqltest.log mtr_appendfile_to_file($path_current_test_log, $path_mysqltest_log) @@ -3626,7 +3618,7 @@ sub report_failure_and_restart ($) { my $tinfo= shift; mtr_report_test_failed($tinfo); - mtr_show_failed_diff($tinfo->{'result_file'}); + mtr_show_failed_diff($tinfo); print "\n"; if ( $opt_force ) { @@ -3766,15 +3758,7 @@ sub mysqld_arguments ($$$$) { if ( $mysql_version_id >= 50036) { # By default, prevent the started mysqld to access files outside of vardir - my $secure_file_dir= $opt_vardir; - if ( $opt_suite ne "main" ) - { - # When running a suite other than default allow the mysqld - # access to subdirs of mysql-test/ in order to make it possible - # to "load data" from the suites data/ directory. - $secure_file_dir= $glob_mysql_test_dir; - } - mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $secure_file_dir); + mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $opt_vardir); } if ( $mysql_version_id >= 50000 ) @@ -5147,7 +5131,9 @@ Options to control what test suites or cases to run ndb-extra Run extra tests from ndb directory do-test=PREFIX Run test cases which name are prefixed with PREFIX start-from=PREFIX Run test cases starting from test prefixed with PREFIX - suite=NAME Run the test suite named NAME. The default is "main" + suite[s]=NAME1,..,NAMEN Collect tests in suites from the comma separated + list of suite names. + The default is: "$opt_suites" skip-rpl Skip the replication test cases. skip-im Don't start IM, and skip the IM test cases skip-test=PREFIX Skip test cases which name are prefixed with PREFIX diff --git a/mysql-test/r/binlog_killed.result b/mysql-test/r/binlog_killed.result deleted file mode 100644 index ba4f38fb4c1..00000000000 --- a/mysql-test/r/binlog_killed.result +++ /dev/null @@ -1,12 +0,0 @@ -create table t1 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB; -create table t2 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=MyISAM; -create table t3 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB; -select get_lock("a", 20); -get_lock("a", 20) -1 -reset master; -insert into t2 values (null, null), (null, get_lock("a", 10)); -select @result /* must be zero either way */; -@result -0 -drop table t1,t2,t3; diff --git a/mysql-test/r/binlog_row_binlog.result b/mysql-test/r/binlog_row_binlog.result deleted file mode 100644 index 6fcaad010d2..00000000000 --- a/mysql-test/r/binlog_row_binlog.result +++ /dev/null @@ -1,339 +0,0 @@ -drop table if exists t1, t2; -reset master; -create table t1 (a int) engine=innodb; -create table t2 (a int) engine=innodb; -begin; -insert t1 values (5); -commit; -begin; -insert t2 values (5); -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb -master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -drop table t1,t2; -reset master; -create table t1 (n int) engine=innodb; -begin; -commit; -drop table t1; -show binlog events in 'master-bin.000001' from 106; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb -master-bin.000001 # Query 1 # use `test`; BEGIN -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Xid 1 # COMMIT /* xid= */ -master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 -show binlog events in 'master-bin.000002' from 106; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Query 1 # use `test`; drop table t1 -reset master; -create table t1 (id tinyint auto_increment primary key); -set insert_id=128; -insert into t1 values(null); -Warnings: -Warning 1264 Out of range value for column 'id' at row 1 -select * from t1; -id -127 -drop table t1; -create table t1 (a int); -create table if not exists t2 select * from t1; -create temporary table tt1 (a int); -create table if not exists t3 like tt1; -USE mysql; -INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test'); -UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'; -DELETE FROM user WHERE host='localhost' AND user='@#@'; -use test; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( - `a` int(11) DEFAULT NULL -) -master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( - `a` int(11) DEFAULT NULL -) -master-bin.000001 # Table_map # # table_id: # (mysql.user) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysql.user) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysql.user) -master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -drop table t1,t2,t3,tt1; -create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; -set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; -insert delayed into t1 values (207); -insert delayed into t1 values (null); -insert delayed into t1 values (300); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( - `a` int(11) DEFAULT NULL -) -master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( - `a` int(11) DEFAULT NULL -) -master-bin.000001 # Table_map # # table_id: # (mysql.user) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysql.user) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysql.user) -master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */ -master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -insert delayed into t1 values (null),(null),(null),(null); -insert delayed into t1 values (null),(null),(400),(null); -11 == 11 -select * from t1; -a -207 -208 -300 -301 -302 -303 -304 -305 -306 -400 -401 -drop table t1; -reset master; -drop table if exists t3; -create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 346 -insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); -insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); -insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); -insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); -show master status /* must show new binlog index after rotating */; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000002 106 -drop table t3; diff --git a/mysql-test/r/binlog_row_blackhole.result b/mysql-test/r/binlog_row_blackhole.result deleted file mode 100644 index e58f4648470..00000000000 --- a/mysql-test/r/binlog_row_blackhole.result +++ /dev/null @@ -1,155 +0,0 @@ -drop table if exists t1,t2; -CREATE TABLE t1 ( -Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, -Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL -) ENGINE=blackhole; -INSERT INTO t1 VALUES (9410,9412); -select period from t1; -period -select * from t1; -Period Varor_period -select t1.* from t1; -Period Varor_period -CREATE TABLE t2 ( -auto int NOT NULL auto_increment, -fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL, -companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL, -fld3 char(30) DEFAULT '' NOT NULL, -fld4 char(35) DEFAULT '' NOT NULL, -fld5 char(35) DEFAULT '' NOT NULL, -fld6 char(4) DEFAULT '' NOT NULL, -primary key (auto) -) ENGINE=blackhole; -INSERT INTO t2 VALUES (1192,068305,00,'Colombo','hardware','colicky',''); -INSERT INTO t2 VALUES (1193,000000,00,'nondecreasing','implant','thrillingly',''); -select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"; -fld3 -select fld3 from t2 where fld3 like "%cultivation" ; -fld3 -select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3; -fld3 companynr -select fld3,companynr from t2 where companynr = 58 order by fld3; -fld3 companynr -select fld3 from t2 order by fld3 desc limit 10; -fld3 -select fld3 from t2 order by fld3 desc limit 5; -fld3 -select fld3 from t2 order by fld3 desc limit 5,5; -fld3 -select t2.fld3 from t2 where fld3 = 'honeysuckle'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'h%le'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%'; -fld3 -select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; -fld3 -select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3; -fld1 fld3 -DROP TABLE t1; -CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)); -INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), -('Full-text indexes', 'are called collections'), -('Only MyISAM tables','support collections'), -('Function MATCH ... AGAINST()','is used to do a search'), -('Full-text search in MySQL', 'implements vector space model'); -SHOW INDEX FROM t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 1 a 1 a NULL NULL NULL NULL YES FULLTEXT -t1 1 a 2 b NULL NULL NULL NULL YES FULLTEXT -select * from t1 where MATCH(a,b) AGAINST ("collections"); -a b -Only MyISAM tables support collections -Full-text indexes are called collections -explain extended select * from t1 where MATCH(a,b) AGAINST ("collections"); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 fulltext a a 0 1 100.00 Using where -Warnings: -Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against (_latin1'collections')) -select * from t1 where MATCH(a,b) AGAINST ("indexes"); -a b -Full-text indexes are called collections -select * from t1 where MATCH(a,b) AGAINST ("indexes collections"); -a b -Full-text indexes are called collections -Only MyISAM tables support collections -select * from t1 where MATCH(a,b) AGAINST ("only"); -a b -reset master; -drop table t1,t2; -create table t1 (a int) engine=blackhole; -delete from t1 where a=10; -update t1 set a=11 where a=15; -insert into t1 values(1); -insert ignore into t1 values(1); -replace into t1 values(100); -create table t2 (a varchar(200)) engine=blackhole; -load data infile '../std_data_ln/words.dat' into table t2; -alter table t1 add b int; -alter table t1 drop b; -create table t3 like t1; -insert into t1 select * from t3; -replace into t1 select * from t3; -select * from t1; -a -select * from t2; -a -select * from t3; -a -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; drop table t1,t2 -master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; alter table t1 add b int -master-bin.000001 # Query # # use `test`; alter table t1 drop b -master-bin.000001 # Query # # use `test`; create table t3 like t1 -drop table t1,t2,t3; -CREATE TABLE t1(a INT) ENGINE=BLACKHOLE; -INSERT DELAYED INTO t1 VALUES(1); -DROP TABLE t1; -CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE; -DELETE FROM t1 WHERE a=10; -ALTER TABLE t1 ADD INDEX(a); -DELETE FROM t1 WHERE a=10; -ALTER TABLE t1 DROP INDEX a; -ALTER TABLE t1 ADD UNIQUE INDEX(a); -DELETE FROM t1 WHERE a=10; -ALTER TABLE t1 DROP INDEX a; -ALTER TABLE t1 ADD PRIMARY KEY(a); -DELETE FROM t1 WHERE a=10; -DROP TABLE t1; -reset master; -create table t1 (a int) engine=blackhole; -set autocommit=0; -start transaction; -insert into t1 values(1); -commit; -start transaction; -insert into t1 values(2); -rollback; -set autocommit=1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; COMMIT -drop table if exists t1; diff --git a/mysql-test/r/binlog_row_ctype_cp932.result b/mysql-test/r/binlog_row_ctype_cp932.result deleted file mode 100644 index ca70f98c0e6..00000000000 --- a/mysql-test/r/binlog_row_ctype_cp932.result +++ /dev/null @@ -1,11377 +0,0 @@ -drop table if exists t1; -drop table if exists t2; -drop table if exists t3; -drop table if exists t4; -set names cp932; -set character_set_database = cp932; -CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = cp932; -INSERT INTO t1 VALUES -(0x05),(0x7E),(0x815C),(0x815F),(0x8160),(0x8161),(0x817C),(0x8191),(0x8192),(0x81CA); -INSERT INTO t1 VALUES -(0x8740),(0x8741),(0x8742),(0x8743),(0x8744),(0x8745),(0x8746),(0x8747), -(0x8748),(0x8749),(0x874A),(0x874B),(0x874C),(0x874D),(0x874E),(0x874F), -(0x8750),(0x8751),(0x8752),(0x8753),(0x8754),(0x8755),(0x8756),(0x8757), -(0x8758),(0x8759),(0x875A),(0x875B),(0x875C),(0x875D),(0x875F), -(0x8760),(0x8761),(0x8762),(0x8763),(0x8764),(0x8765),(0x8766),(0x8767), -(0x8768),(0x8769),(0x876A),(0x876B),(0x876C),(0x876D),(0x876E),(0x876F), -(0x8770),(0x8771),(0x8772),(0x8773),(0x8774),(0x8775),(0x877E), -(0x8780),(0x8781),(0x8782),(0x8783),(0x8784),(0x8785),(0x8786),(0x8787), -(0x8788),(0x8789),(0x878A),(0x878B),(0x878C),(0x878D),(0x878E),(0x878F), -(0x8790),(0x8791),(0x8792),(0x8793),(0x8794),(0x8795),(0x8796),(0x8797), -(0x8798),(0x8799),(0x879A),(0x879B),(0x879C); -INSERT INTO t1 VALUES -(0xED40),(0xED41),(0xED42),(0xED43),(0xED44),(0xED45),(0xED46),(0xED47), -(0xED48),(0xED49),(0xED4A),(0xED4B),(0xED4C),(0xED4D),(0xED4E),(0xED4F), -(0xED50),(0xED51),(0xED52),(0xED53),(0xED54),(0xED55),(0xED56),(0xED57), -(0xED58),(0xED59),(0xED5A),(0xED5B),(0xED5C),(0xED5D),(0xED5E),(0xED5F), -(0xED60),(0xED61),(0xED62),(0xED63),(0xED64),(0xED65),(0xED66),(0xED67), -(0xED68),(0xED69),(0xED6A),(0xED6B),(0xED6C),(0xED6D),(0xED6E),(0xED6F), -(0xED70),(0xED71),(0xED72),(0xED73),(0xED74),(0xED75),(0xED76),(0xED77), -(0xED78),(0xED79),(0xED7A),(0xED7B),(0xED7C),(0xED7D),(0xED7E), -(0xED80),(0xED81),(0xED82),(0xED83),(0xED84),(0xED85),(0xED86),(0xED87), -(0xED88),(0xED89),(0xED8A),(0xED8B),(0xED8C),(0xED8D),(0xED8E),(0xED8F), -(0xED90),(0xED91),(0xED92),(0xED93),(0xED94),(0xED95),(0xED96),(0xED97), -(0xED98),(0xED99),(0xED9A),(0xED9B),(0xED9C),(0xED9D),(0xED9E),(0xED9F), -(0xEDA0),(0xEDA1),(0xEDA2),(0xEDA3),(0xEDA4),(0xEDA5),(0xEDA6),(0xEDA7), -(0xEDA8),(0xEDA9),(0xEDAA),(0xEDAB),(0xEDAC),(0xEDAD),(0xEDAE),(0xEDAF), -(0xEDB0),(0xEDB1),(0xEDB2),(0xEDB3),(0xEDB4),(0xEDB5),(0xEDB6),(0xEDB7), -(0xEDB8),(0xEDB9),(0xEDBA),(0xEDBB),(0xEDBC),(0xEDBD),(0xEDBE),(0xEDBF), -(0xEDC0),(0xEDC1),(0xEDC2),(0xEDC3),(0xEDC4),(0xEDC5),(0xEDC6),(0xEDC7), -(0xEDC8),(0xEDC9),(0xEDCA),(0xEDCB),(0xEDCC),(0xEDCD),(0xEDCE),(0xEDCF), -(0xEDD0),(0xEDD1),(0xEDD2),(0xEDD3),(0xEDD4),(0xEDD5),(0xEDD6),(0xEDD7), -(0xEDD8),(0xEDD9),(0xEDDA),(0xEDDB),(0xEDDC),(0xEDDD),(0xEDDE),(0xEDDF), -(0xEDE0),(0xEDE1),(0xEDE2),(0xEDE3),(0xEDE4),(0xEDE5),(0xEDE6),(0xEDE7), -(0xEDE8),(0xEDE9),(0xEDEA),(0xEDEB),(0xEDEC),(0xEDED),(0xEDEE),(0xEDEF), -(0xEDF0),(0xEDF1),(0xEDF2),(0xEDF3),(0xEDF4),(0xEDF5),(0xEDF6),(0xEDF7), -(0xEDF8),(0xEDF9),(0xEDFA),(0xEDFB),(0xEDFC), -(0xEE40),(0xEE41),(0xEE42),(0xEE43),(0xEE44),(0xEE45),(0xEE46),(0xEE47), -(0xEE48),(0xEE49),(0xEE4A),(0xEE4B),(0xEE4C),(0xEE4D),(0xEE4E),(0xEE4F), -(0xEE50),(0xEE51),(0xEE52),(0xEE53),(0xEE54),(0xEE55),(0xEE56),(0xEE57), -(0xEE58),(0xEE59),(0xEE5A),(0xEE5B),(0xEE5C),(0xEE5D),(0xEE5E),(0xEE5F), -(0xEE60),(0xEE61),(0xEE62),(0xEE63),(0xEE64),(0xEE65),(0xEE66),(0xEE67), -(0xEE68),(0xEE69),(0xEE6A),(0xEE6B),(0xEE6C),(0xEE6D),(0xEE6E),(0xEE6F), -(0xEE70),(0xEE71),(0xEE72),(0xEE73),(0xEE74),(0xEE75),(0xEE76),(0xEE77), -(0xEE78),(0xEE79),(0xEE7A),(0xEE7B),(0xEE7C),(0xEE7D),(0xEE7E), -(0xEE80),(0xEE81),(0xEE82),(0xEE83),(0xEE84),(0xEE85),(0xEE86),(0xEE87), -(0xEE88),(0xEE89),(0xEE8A),(0xEE8B),(0xEE8C),(0xEE8D),(0xEE8E),(0xEE8F), -(0xEE90),(0xEE91),(0xEE92),(0xEE93),(0xEE94),(0xEE95),(0xEE96),(0xEE97), -(0xEE98),(0xEE99),(0xEE9A),(0xEE9B),(0xEE9C),(0xEE9D),(0xEE9E),(0xEE9F), -(0xEEA0),(0xEEA1),(0xEEA2),(0xEEA3),(0xEEA4),(0xEEA5),(0xEEA6),(0xEEA7), -(0xEEA8),(0xEEA9),(0xEEAA),(0xEEAB),(0xEEAC),(0xEEAD),(0xEEAE),(0xEEAF), -(0xEEB0),(0xEEB1),(0xEEB2),(0xEEB3),(0xEEB4),(0xEEB5),(0xEEB6),(0xEEB7), -(0xEEB8),(0xEEB9),(0xEEBA),(0xEEBB),(0xEEBC),(0xEEBD),(0xEEBE),(0xEEBF), -(0xEEC0),(0xEEC1),(0xEEC2),(0xEEC3),(0xEEC4),(0xEEC5),(0xEEC6),(0xEEC7), -(0xEEC8),(0xEEC9),(0xEECA),(0xEECB),(0xEECC),(0xEECD),(0xEECE),(0xEECF), -(0xEED0),(0xEED1),(0xEED2),(0xEED3),(0xEED4),(0xEED5),(0xEED6),(0xEED7), -(0xEED8),(0xEED9),(0xEEDA),(0xEEDB),(0xEEDC),(0xEEDD),(0xEEDE),(0xEEDF), -(0xEEE0),(0xEEE1),(0xEEE2),(0xEEE3),(0xEEE4),(0xEEE5),(0xEEE6),(0xEEE7), -(0xEEE8),(0xEEE9),(0xEEEA),(0xEEEB),(0xEEEC),(0xEEEF), -(0xEEF0),(0xEEF1),(0xEEF2),(0xEEF3),(0xEEF4),(0xEEF5),(0xEEF6),(0xEEF7), -(0xEEF8),(0xEEF9),(0xEEFA),(0xEEFB),(0xEEFC); -INSERT INTO t1 VALUES -(0xFA40),(0xFA41),(0xFA42),(0xFA43),(0xFA44),(0xFA45),(0xFA46),(0xFA47), -(0xFA48),(0xFA49),(0xFA4A),(0xFA4B),(0xFA4C),(0xFA4D),(0xFA4E),(0xFA4F), -(0xFA50),(0xFA51),(0xFA52),(0xFA53),(0xFA54),(0xFA55),(0xFA56),(0xFA57), -(0xFA58),(0xFA59),(0xFA5A),(0xFA5B),(0xFA5C),(0xFA5D),(0xFA5E),(0xFA5F), -(0xFA60),(0xFA61),(0xFA62),(0xFA63),(0xFA64),(0xFA65),(0xFA66),(0xFA67), -(0xFA68),(0xFA69),(0xFA6A),(0xFA6B),(0xFA6C),(0xFA6D),(0xFA6E),(0xFA6F), -(0xFA70),(0xFA71),(0xFA72),(0xFA73),(0xFA74),(0xFA75),(0xFA76),(0xFA77), -(0xFA78),(0xFA79),(0xFA7A),(0xFA7B),(0xFA7C),(0xFA7D),(0xFA7E), -(0xFA80),(0xFA81),(0xFA82),(0xFA83),(0xFA84),(0xFA85),(0xFA86),(0xFA87), -(0xFA88),(0xFA89),(0xFA8A),(0xFA8B),(0xFA8C),(0xFA8D),(0xFA8E),(0xFA8F), -(0xFA90),(0xFA91),(0xFA92),(0xFA93),(0xFA94),(0xFA95),(0xFA96),(0xFA97), -(0xFA98),(0xFA99),(0xFA9A),(0xFA9B),(0xFA9C),(0xFA9D),(0xFA9E),(0xFA9F), -(0xFAA0),(0xFAA1),(0xFAA2),(0xFAA3),(0xFAA4),(0xFAA5),(0xFAA6),(0xFAA7), -(0xFAA8),(0xFAA9),(0xFAAA),(0xFAAB),(0xFAAC),(0xFAAD),(0xFAAE),(0xFAAF), -(0xFAB0),(0xFAB1),(0xFAB2),(0xFAB3),(0xFAB4),(0xFAB5),(0xFAB6),(0xFAB7), -(0xFAB8),(0xFAB9),(0xFABA),(0xFABB),(0xFABC),(0xFABD),(0xFABE),(0xFABF), -(0xFAC0),(0xFAC1),(0xFAC2),(0xFAC3),(0xFAC4),(0xFAC5),(0xFAC6),(0xFAC7), -(0xFAC8),(0xFAC9),(0xFACA),(0xFACB),(0xFACC),(0xFACD),(0xFACE),(0xFACF), -(0xFAD0),(0xFAD1),(0xFAD2),(0xFAD3),(0xFAD4),(0xFAD5),(0xFAD6),(0xFAD7), -(0xFAD8),(0xFAD9),(0xFADA),(0xFADB),(0xFADC),(0xFADD),(0xFADE),(0xFADF), -(0xFAE0),(0xFAE1),(0xFAE2),(0xFAE3),(0xFAE4),(0xFAE5),(0xFAE6),(0xFAE7), -(0xFAE8),(0xFAE9),(0xFAEA),(0xFAEB),(0xFAEC),(0xFAED),(0xFAEE),(0xFAEF), -(0xFAF0),(0xFAF1),(0xFAF2),(0xFAF3),(0xFAF4),(0xFAF5),(0xFAF6),(0xFAF7), -(0xFAF8),(0xFAF9),(0xFAFA),(0xFAFB),(0xFAFC), -(0xFB40),(0xFB41),(0xFB42),(0xFB43),(0xFB44),(0xFB45),(0xFB46),(0xFB47), -(0xFB48),(0xFB49),(0xFB4A),(0xFB4B),(0xFB4C),(0xFB4D),(0xFB4E),(0xFB4F), -(0xFB50),(0xFB51),(0xFB52),(0xFB53),(0xFB54),(0xFB55),(0xFB56),(0xFB57), -(0xFB58),(0xFB59),(0xFB5A),(0xFB5B),(0xFB5C),(0xFB5D),(0xFB5E),(0xFB5F), -(0xFB60),(0xFB61),(0xFB62),(0xFB63),(0xFB64),(0xFB65),(0xFB66),(0xFB67), -(0xFB68),(0xFB69),(0xFB6A),(0xFB6B),(0xFB6C),(0xFB6D),(0xFB6E),(0xFB6F), -(0xFB70),(0xFB71),(0xFB72),(0xFB73),(0xFB74),(0xFB75),(0xFB76),(0xFB77), -(0xFB78),(0xFB79),(0xFB7A),(0xFB7B),(0xFB7C),(0xFB7D),(0xFB7E), -(0xFB80),(0xFB81),(0xFB82),(0xFB83),(0xFB84),(0xFB85),(0xFB86),(0xFB87), -(0xFB88),(0xFB89),(0xFB8A),(0xFB8B),(0xFB8C),(0xFB8D),(0xFB8E),(0xFB8F), -(0xFB90),(0xFB91),(0xFB92),(0xFB93),(0xFB94),(0xFB95),(0xFB96),(0xFB97), -(0xFB98),(0xFB99),(0xFB9A),(0xFB9B),(0xFB9C),(0xFB9D),(0xFB9E),(0xFB9F), -(0xFBA0),(0xFBA1),(0xFBA2),(0xFBA3),(0xFBA4),(0xFBA5),(0xFBA6),(0xFBA7), -(0xFBA8),(0xFBA9),(0xFBAA),(0xFBAB),(0xFBAC),(0xFBAD),(0xFBAE),(0xFBAF), -(0xFBB0),(0xFBB1),(0xFBB2),(0xFBB3),(0xFBB4),(0xFBB5),(0xFBB6),(0xFBB7), -(0xFBB8),(0xFBB9),(0xFBBA),(0xFBBB),(0xFBBC),(0xFBBD),(0xFBBE),(0xFBBF), -(0xFBC0),(0xFBC1),(0xFBC2),(0xFBC3),(0xFBC4),(0xFBC5),(0xFBC6),(0xFBC7), -(0xFBC8),(0xFBC9),(0xFBCA),(0xFBCB),(0xFBCC),(0xFBCD),(0xFBCE),(0xFBCF), -(0xFBD0),(0xFBD1),(0xFBD2),(0xFBD3),(0xFBD4),(0xFBD5),(0xFBD6),(0xFBD7), -(0xFBD8),(0xFBD9),(0xFBDA),(0xFBDB),(0xFBDC),(0xFBDD),(0xFBDE),(0xFBDF), -(0xFBE0),(0xFBE1),(0xFBE2),(0xFBE3),(0xFBE4),(0xFBE5),(0xFBE6),(0xFBE7), -(0xFBE8),(0xFBE9),(0xFBEA),(0xFBEB),(0xFBEC),(0xFBED),(0xFBEE),(0xFBEF), -(0xFBF0),(0xFBF1),(0xFBF2),(0xFBF3),(0xFBF4),(0xFBF5),(0xFBF6),(0xFBF7), -(0xFBF8),(0xFBF9),(0xFBFA),(0xFBFB),(0xFBFC), -(0xFC40),(0xFC41),(0xFC42),(0xFC43),(0xFC44),(0xFC45),(0xFC46),(0xFC47), -(0xFC48),(0xFC49),(0xFC4A),(0xFC4B); -INSERT INTO t1 VALUES -(0xF040),(0xF041),(0xF042),(0xF043),(0xF044),(0xF045),(0xF046),(0xF047), -(0xF048),(0xF049),(0xF04A),(0xF04B),(0xF04C),(0xF04D),(0xF04E),(0xF04F), -(0xF050),(0xF051),(0xF052),(0xF053),(0xF054),(0xF055),(0xF056),(0xF057), -(0xF058),(0xF059),(0xF05A),(0xF05B),(0xF05C),(0xF05D),(0xF05E),(0xF05F), -(0xF060),(0xF061),(0xF062),(0xF063),(0xF064),(0xF065),(0xF066),(0xF067), -(0xF068),(0xF069),(0xF06A),(0xF06B),(0xF06C),(0xF06D),(0xF06E),(0xF06F), -(0xF070),(0xF071),(0xF072),(0xF073),(0xF074),(0xF075),(0xF076),(0xF077), -(0xF078),(0xF079),(0xF07A),(0xF07B),(0xF07C),(0xF07D),(0xF07E), -(0xF080),(0xF081),(0xF082),(0xF083),(0xF084),(0xF085),(0xF086),(0xF087), -(0xF088),(0xF089),(0xF08A),(0xF08B),(0xF08C),(0xF08D),(0xF08E),(0xF08F), -(0xF090),(0xF091),(0xF092),(0xF093),(0xF094),(0xF095),(0xF096),(0xF097), -(0xF098),(0xF099),(0xF09A),(0xF09B),(0xF09C),(0xF09D),(0xF09E),(0xF09F), -(0xF0A0),(0xF0A1),(0xF0A2),(0xF0A3),(0xF0A4),(0xF0A5),(0xF0A6),(0xF0A7), -(0xF0A8),(0xF0A9),(0xF0AA),(0xF0AB),(0xF0AC),(0xF0AD),(0xF0AE),(0xF0AF), -(0xF0B0),(0xF0B1),(0xF0B2),(0xF0B3),(0xF0B4),(0xF0B5),(0xF0B6),(0xF0B7), -(0xF0B8),(0xF0B9),(0xF0BA),(0xF0BB),(0xF0BC),(0xF0BD),(0xF0BE),(0xF0BF), -(0xF0C0),(0xF0C1),(0xF0C2),(0xF0C3),(0xF0C4),(0xF0C5),(0xF0C6),(0xF0C7), -(0xF0C8),(0xF0C9),(0xF0CA),(0xF0CB),(0xF0CC),(0xF0CD),(0xF0CE),(0xF0CF), -(0xF0D0),(0xF0D1),(0xF0D2),(0xF0D3),(0xF0D4),(0xF0D5),(0xF0D6),(0xF0D7), -(0xF0D8),(0xF0D9),(0xF0DA),(0xF0DB),(0xF0DC),(0xF0DD),(0xF0DE),(0xF0DF), -(0xF0E0),(0xF0E1),(0xF0E2),(0xF0E3),(0xF0E4),(0xF0E5),(0xF0E6),(0xF0E7), -(0xF0E8),(0xF0E9),(0xF0EA),(0xF0EB),(0xF0EC),(0xF0ED),(0xF0EE),(0xF0EF), -(0xF0F0),(0xF0F1),(0xF0F2),(0xF0F3),(0xF0F4),(0xF0F5),(0xF0F6),(0xF0F7), -(0xF0F8),(0xF0F9),(0xF0FA),(0xF0FB),(0xF0FC), -(0xF140),(0xF141),(0xF142),(0xF143),(0xF144),(0xF145),(0xF146),(0xF147), -(0xF148),(0xF149),(0xF14A),(0xF14B),(0xF14C),(0xF14D),(0xF14E),(0xF14F), -(0xF150),(0xF151),(0xF152),(0xF153),(0xF154),(0xF155),(0xF156),(0xF157), -(0xF158),(0xF159),(0xF15A),(0xF15B),(0xF15C),(0xF15D),(0xF15E),(0xF15F), -(0xF160),(0xF161),(0xF162),(0xF163),(0xF164),(0xF165),(0xF166),(0xF167), -(0xF168),(0xF169),(0xF16A),(0xF16B),(0xF16C),(0xF16D),(0xF16E),(0xF16F), -(0xF170),(0xF171),(0xF172),(0xF173),(0xF174),(0xF175),(0xF176),(0xF177), -(0xF178),(0xF179),(0xF17A),(0xF17B),(0xF17C),(0xF17D),(0xF17E), -(0xF180),(0xF181),(0xF182),(0xF183),(0xF184),(0xF185),(0xF186),(0xF187), -(0xF188),(0xF189),(0xF18A),(0xF18B),(0xF18C),(0xF18D),(0xF18E),(0xF18F), -(0xF190),(0xF191),(0xF192),(0xF193),(0xF194),(0xF195),(0xF196),(0xF197), -(0xF198),(0xF199),(0xF19A),(0xF19B),(0xF19C),(0xF19D),(0xF19E),(0xF19F), -(0xF1A0),(0xF1A1),(0xF1A2),(0xF1A3),(0xF1A4),(0xF1A5),(0xF1A6),(0xF1A7), -(0xF1A8),(0xF1A9),(0xF1AA),(0xF1AB),(0xF1AC),(0xF1AD),(0xF1AE),(0xF1AF), -(0xF1B0),(0xF1B1),(0xF1B2),(0xF1B3),(0xF1B4),(0xF1B5),(0xF1B6),(0xF1B7), -(0xF1B8),(0xF1B9),(0xF1BA),(0xF1BB),(0xF1BC),(0xF1BD),(0xF1BE),(0xF1BF), -(0xF1C0),(0xF1C1),(0xF1C2),(0xF1C3),(0xF1C4),(0xF1C5),(0xF1C6),(0xF1C7), -(0xF1C8),(0xF1C9),(0xF1CA),(0xF1CB),(0xF1CC),(0xF1CD),(0xF1CE),(0xF1CF), -(0xF1D0),(0xF1D1),(0xF1D2),(0xF1D3),(0xF1D4),(0xF1D5),(0xF1D6),(0xF1D7), -(0xF1D8),(0xF1D9),(0xF1DA),(0xF1DB),(0xF1DC),(0xF1DD),(0xF1DE),(0xF1DF), -(0xF1E0),(0xF1E1),(0xF1E2),(0xF1E3),(0xF1E4),(0xF1E5),(0xF1E6),(0xF1E7), -(0xF1E8),(0xF1E9),(0xF1EA),(0xF1EB),(0xF1EC),(0xF1ED),(0xF1EE),(0xF1EF), -(0xF1F0),(0xF1F1),(0xF1F2),(0xF1F3),(0xF1F4),(0xF1F5),(0xF1F6),(0xF1F7), -(0xF1F8),(0xF1F9),(0xF1FA),(0xF1FB),(0xF1FC), -(0xF240),(0xF241),(0xF242),(0xF243),(0xF244),(0xF245),(0xF246),(0xF247), -(0xF248),(0xF249),(0xF24A),(0xF24B),(0xF24C),(0xF24D),(0xF24E),(0xF24F), -(0xF250),(0xF251),(0xF252),(0xF253),(0xF254),(0xF255),(0xF256),(0xF257), -(0xF258),(0xF259),(0xF25A),(0xF25B),(0xF25C),(0xF25D),(0xF25E),(0xF25F), -(0xF260),(0xF261),(0xF262),(0xF263),(0xF264),(0xF265),(0xF266),(0xF267), -(0xF268),(0xF269),(0xF26A),(0xF26B),(0xF26C),(0xF26D),(0xF26E),(0xF26F), -(0xF270),(0xF271),(0xF272),(0xF273),(0xF274),(0xF275),(0xF276),(0xF277), -(0xF278),(0xF279),(0xF27A),(0xF27B),(0xF27C),(0xF27D),(0xF27E), -(0xF280),(0xF281),(0xF282),(0xF283),(0xF284),(0xF285),(0xF286),(0xF287), -(0xF288),(0xF289),(0xF28A),(0xF28B),(0xF28C),(0xF28D),(0xF28E),(0xF28F), -(0xF290),(0xF291),(0xF292),(0xF293),(0xF294),(0xF295),(0xF296),(0xF297), -(0xF298),(0xF299),(0xF29A),(0xF29B),(0xF29C),(0xF29D),(0xF29E),(0xF29F), -(0xF2A0),(0xF2A1),(0xF2A2),(0xF2A3),(0xF2A4),(0xF2A5),(0xF2A6),(0xF2A7), -(0xF2A8),(0xF2A9),(0xF2AA),(0xF2AB),(0xF2AC),(0xF2AD),(0xF2AE),(0xF2AF), -(0xF2B0),(0xF2B1),(0xF2B2),(0xF2B3),(0xF2B4),(0xF2B5),(0xF2B6),(0xF2B7), -(0xF2B8),(0xF2B9),(0xF2BA),(0xF2BB),(0xF2BC),(0xF2BD),(0xF2BE),(0xF2BF), -(0xF2C0),(0xF2C1),(0xF2C2),(0xF2C3),(0xF2C4),(0xF2C5),(0xF2C6),(0xF2C7), -(0xF2C8),(0xF2C9),(0xF2CA),(0xF2CB),(0xF2CC),(0xF2CD),(0xF2CE),(0xF2CF), -(0xF2D0),(0xF2D1),(0xF2D2),(0xF2D3),(0xF2D4),(0xF2D5),(0xF2D6),(0xF2D7), -(0xF2D8),(0xF2D9),(0xF2DA),(0xF2DB),(0xF2DC),(0xF2DD),(0xF2DE),(0xF2DF), -(0xF2E0),(0xF2E1),(0xF2E2),(0xF2E3),(0xF2E4),(0xF2E5),(0xF2E6),(0xF2E7), -(0xF2E8),(0xF2E9),(0xF2EA),(0xF2EB),(0xF2EC),(0xF2ED),(0xF2EE),(0xF2EF), -(0xF2F0),(0xF2F1),(0xF2F2),(0xF2F3),(0xF2F4),(0xF2F5),(0xF2F6),(0xF2F7), -(0xF2F8),(0xF2F9),(0xF2FA),(0xF2FB),(0xF2FC), -(0xF340),(0xF341),(0xF342),(0xF343),(0xF344),(0xF345),(0xF346),(0xF347), -(0xF348),(0xF349),(0xF34A),(0xF34B),(0xF34C),(0xF34D),(0xF34E),(0xF34F), -(0xF350),(0xF351),(0xF352),(0xF353),(0xF354),(0xF355),(0xF356),(0xF357), -(0xF358),(0xF359),(0xF35A),(0xF35B),(0xF35C),(0xF35D),(0xF35E),(0xF35F), -(0xF360),(0xF361),(0xF362),(0xF363),(0xF364),(0xF365),(0xF366),(0xF367), -(0xF368),(0xF369),(0xF36A),(0xF36B),(0xF36C),(0xF36D),(0xF36E),(0xF36F), -(0xF370),(0xF371),(0xF372),(0xF373),(0xF374),(0xF375),(0xF376),(0xF377), -(0xF378),(0xF379),(0xF37A),(0xF37B),(0xF37C),(0xF37D),(0xF37E), -(0xF380),(0xF381),(0xF382),(0xF383),(0xF384),(0xF385),(0xF386),(0xF387), -(0xF388),(0xF389),(0xF38A),(0xF38B),(0xF38C),(0xF38D),(0xF38E),(0xF38F), -(0xF390),(0xF391),(0xF392),(0xF393),(0xF394),(0xF395),(0xF396),(0xF397), -(0xF398),(0xF399),(0xF39A),(0xF39B),(0xF39C),(0xF39D),(0xF39E),(0xF39F), -(0xF3A0),(0xF3A1),(0xF3A2),(0xF3A3),(0xF3A4),(0xF3A5),(0xF3A6),(0xF3A7), -(0xF3A8),(0xF3A9),(0xF3AA),(0xF3AB),(0xF3AC),(0xF3AD),(0xF3AE),(0xF3AF), -(0xF3B0),(0xF3B1),(0xF3B2),(0xF3B3),(0xF3B4),(0xF3B5),(0xF3B6),(0xF3B7), -(0xF3B8),(0xF3B9),(0xF3BA),(0xF3BB),(0xF3BC),(0xF3BD),(0xF3BE),(0xF3BF), -(0xF3C0),(0xF3C1),(0xF3C2),(0xF3C3),(0xF3C4),(0xF3C5),(0xF3C6),(0xF3C7), -(0xF3C8),(0xF3C9),(0xF3CA),(0xF3CB),(0xF3CC),(0xF3CD),(0xF3CE),(0xF3CF), -(0xF3D0),(0xF3D1),(0xF3D2),(0xF3D3),(0xF3D4),(0xF3D5),(0xF3D6),(0xF3D7), -(0xF3D8),(0xF3D9),(0xF3DA),(0xF3DB),(0xF3DC),(0xF3DD),(0xF3DE),(0xF3DF), -(0xF3E0),(0xF3E1),(0xF3E2),(0xF3E3),(0xF3E4),(0xF3E5),(0xF3E6),(0xF3E7), -(0xF3E8),(0xF3E9),(0xF3EA),(0xF3EB),(0xF3EC),(0xF3ED),(0xF3EE),(0xF3EF), -(0xF3F0),(0xF3F1),(0xF3F2),(0xF3F3),(0xF3F4),(0xF3F5),(0xF3F6),(0xF3F7), -(0xF3F8),(0xF3F9),(0xF3FA),(0xF3FB),(0xF3FC), -(0xF440),(0xF441),(0xF442),(0xF443),(0xF444),(0xF445),(0xF446),(0xF447), -(0xF448),(0xF449),(0xF44A),(0xF44B),(0xF44C),(0xF44D),(0xF44E),(0xF44F), -(0xF450),(0xF451),(0xF452),(0xF453),(0xF454),(0xF455),(0xF456),(0xF457), -(0xF458),(0xF459),(0xF45A),(0xF45B),(0xF45C),(0xF45D),(0xF45E),(0xF45F), -(0xF460),(0xF461),(0xF462),(0xF463),(0xF464),(0xF465),(0xF466),(0xF467), -(0xF468),(0xF469),(0xF46A),(0xF46B),(0xF46C),(0xF46D),(0xF46E),(0xF46F), -(0xF470),(0xF471),(0xF472),(0xF473),(0xF474),(0xF475),(0xF476),(0xF477), -(0xF478),(0xF479),(0xF47A),(0xF47B),(0xF47C),(0xF47D),(0xF47E), -(0xF480),(0xF481),(0xF482),(0xF483),(0xF484),(0xF485),(0xF486),(0xF487), -(0xF488),(0xF489),(0xF48A),(0xF48B),(0xF48C),(0xF48D),(0xF48E),(0xF48F), -(0xF490),(0xF491),(0xF492),(0xF493),(0xF494),(0xF495),(0xF496),(0xF497), -(0xF498),(0xF499),(0xF49A),(0xF49B),(0xF49C),(0xF49D),(0xF49E),(0xF49F), -(0xF4A0),(0xF4A1),(0xF4A2),(0xF4A3),(0xF4A4),(0xF4A5),(0xF4A6),(0xF4A7), -(0xF4A8),(0xF4A9),(0xF4AA),(0xF4AB),(0xF4AC),(0xF4AD),(0xF4AE),(0xF4AF), -(0xF4B0),(0xF4B1),(0xF4B2),(0xF4B3),(0xF4B4),(0xF4B5),(0xF4B6),(0xF4B7), -(0xF4B8),(0xF4B9),(0xF4BA),(0xF4BB),(0xF4BC),(0xF4BD),(0xF4BE),(0xF4BF), -(0xF4C0),(0xF4C1),(0xF4C2),(0xF4C3),(0xF4C4),(0xF4C5),(0xF4C6),(0xF4C7), -(0xF4C8),(0xF4C9),(0xF4CA),(0xF4CB),(0xF4CC),(0xF4CD),(0xF4CE),(0xF4CF), -(0xF4D0),(0xF4D1),(0xF4D2),(0xF4D3),(0xF4D4),(0xF4D5),(0xF4D6),(0xF4D7), -(0xF4D8),(0xF4D9),(0xF4DA),(0xF4DB),(0xF4DC),(0xF4DD),(0xF4DE),(0xF4DF), -(0xF4E0),(0xF4E1),(0xF4E2),(0xF4E3),(0xF4E4),(0xF4E5),(0xF4E6),(0xF4E7), -(0xF4E8),(0xF4E9),(0xF4EA),(0xF4EB),(0xF4EC),(0xF4ED),(0xF4EE),(0xF4EF), -(0xF4F0),(0xF4F1),(0xF4F2),(0xF4F3),(0xF4F4),(0xF4F5),(0xF4F6),(0xF4F7), -(0xF4F8),(0xF4F9),(0xF4FA),(0xF4FB),(0xF4FC), -(0xF540),(0xF541),(0xF542),(0xF543),(0xF544),(0xF545),(0xF546),(0xF547), -(0xF548),(0xF549),(0xF54A),(0xF54B),(0xF54C),(0xF54D),(0xF54E),(0xF54F), -(0xF550),(0xF551),(0xF552),(0xF553),(0xF554),(0xF555),(0xF556),(0xF557), -(0xF558),(0xF559),(0xF55A),(0xF55B),(0xF55C),(0xF55D),(0xF55E),(0xF55F), -(0xF560),(0xF561),(0xF562),(0xF563),(0xF564),(0xF565),(0xF566),(0xF567), -(0xF568),(0xF569),(0xF56A),(0xF56B),(0xF56C),(0xF56D),(0xF56E),(0xF56F), -(0xF570),(0xF571),(0xF572),(0xF573),(0xF574),(0xF575),(0xF576),(0xF577), -(0xF578),(0xF579),(0xF57A),(0xF57B),(0xF57C),(0xF57D),(0xF57E), -(0xF580),(0xF581),(0xF582),(0xF583),(0xF584),(0xF585),(0xF586),(0xF587), -(0xF588),(0xF589),(0xF58A),(0xF58B),(0xF58C),(0xF58D),(0xF58E),(0xF58F), -(0xF590),(0xF591),(0xF592),(0xF593),(0xF594),(0xF595),(0xF596),(0xF597), -(0xF598),(0xF599),(0xF59A),(0xF59B),(0xF59C),(0xF59D),(0xF59E),(0xF59F), -(0xF5A0),(0xF5A1),(0xF5A2),(0xF5A3),(0xF5A4),(0xF5A5),(0xF5A6),(0xF5A7), -(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE),(0xF5AF), -(0xF5B0),(0xF5B1),(0xF5B2),(0xF5B3),(0xF5B4),(0xF5B5),(0xF5B6),(0xF5B7), -(0xF5B8),(0xF5B9),(0xF5BA),(0xF5BB),(0xF5BC),(0xF5BD),(0xF5BE),(0xF5BF), -(0xF5C0),(0xF5C1),(0xF5C2),(0xF5C3),(0xF5C4),(0xF5C5),(0xF5C6),(0xF5C7), -(0xF5C8),(0xF5C9),(0xF5CA),(0xF5CB),(0xF5CC),(0xF5CD),(0xF5CE),(0xF5CF), -(0xF5D0),(0xF5D1),(0xF5D2),(0xF5D3),(0xF5D4),(0xF5D5),(0xF5D6),(0xF5D7), -(0xF5D8),(0xF5D9),(0xF5DA),(0xF5DB),(0xF5DC),(0xF5DD),(0xF5DE),(0xF5DF), -(0xF5E0),(0xF5E1),(0xF5E2),(0xF5E3),(0xF5E4),(0xF5E5),(0xF5E6),(0xF5E7), -(0xF5E8),(0xF5E9),(0xF5EA),(0xF5EB),(0xF5EC),(0xF5ED),(0xF5EE),(0xF5EF), -(0xF5F0),(0xF5F1),(0xF5F2),(0xF5F3),(0xF5F4),(0xF5F5),(0xF5F6),(0xF5F7), -(0xF5F8),(0xF5F9),(0xF5FA),(0xF5FB),(0xF5FC), -(0xF640),(0xF641),(0xF642),(0xF643),(0xF644),(0xF645),(0xF646),(0xF647), -(0xF648),(0xF649),(0xF64A),(0xF64B),(0xF64C),(0xF64D),(0xF64E),(0xF64F), -(0xF650),(0xF651),(0xF652),(0xF653),(0xF654),(0xF655),(0xF656),(0xF657), -(0xF658),(0xF659),(0xF65A),(0xF65B),(0xF65C),(0xF65D),(0xF65E),(0xF65F), -(0xF660),(0xF661),(0xF662),(0xF663),(0xF664),(0xF665),(0xF666),(0xF667), -(0xF668),(0xF669),(0xF66A),(0xF66B),(0xF66C),(0xF66D),(0xF66E),(0xF66F), -(0xF670),(0xF671),(0xF672),(0xF673),(0xF674),(0xF675),(0xF676),(0xF677), -(0xF678),(0xF679),(0xF67A),(0xF67B),(0xF67C),(0xF67D),(0xF67E), -(0xF680),(0xF681),(0xF682),(0xF683),(0xF684),(0xF685),(0xF686),(0xF687), -(0xF688),(0xF689),(0xF68A),(0xF68B),(0xF68C),(0xF68D),(0xF68E),(0xF68F), -(0xF690),(0xF691),(0xF692),(0xF693),(0xF694),(0xF695),(0xF696),(0xF697), -(0xF698),(0xF699),(0xF69A),(0xF69B),(0xF69C),(0xF69D),(0xF69E),(0xF69F), -(0xF6A0),(0xF6A1),(0xF6A2),(0xF6A3),(0xF6A4),(0xF6A5),(0xF6A6),(0xF6A7), -(0xF6A8),(0xF6A9),(0xF6AA),(0xF6AB),(0xF6AC),(0xF6AD),(0xF6AE),(0xF6AF), -(0xF6B0),(0xF6B1),(0xF6B2),(0xF6B3),(0xF6B4),(0xF6B5),(0xF6B6),(0xF6B7), -(0xF6B8),(0xF6B9),(0xF6BA),(0xF6BB),(0xF6BC),(0xF6BD),(0xF6BE),(0xF6BF), -(0xF6C0),(0xF6C1),(0xF6C2),(0xF6C3),(0xF6C4),(0xF6C5),(0xF6C6),(0xF6C7), -(0xF6C8),(0xF6C9),(0xF6CA),(0xF6CB),(0xF6CC),(0xF6CD),(0xF6CE),(0xF6CF), -(0xF6D0),(0xF6D1),(0xF6D2),(0xF6D3),(0xF6D4),(0xF6D5),(0xF6D6),(0xF6D7), -(0xF6D8),(0xF6D9),(0xF6DA),(0xF6DB),(0xF6DC),(0xF6DD),(0xF6DE),(0xF6DF), -(0xF6E0),(0xF6E1),(0xF6E2),(0xF6E3),(0xF6E4),(0xF6E5),(0xF6E6),(0xF6E7), -(0xF6E8),(0xF6E9),(0xF6EA),(0xF6EB),(0xF6EC),(0xF6ED),(0xF6EE),(0xF6EF), -(0xF6F0),(0xF6F1),(0xF6F2),(0xF6F3),(0xF6F4),(0xF6F5),(0xF6F6),(0xF6F7), -(0xF6F8),(0xF6F9),(0xF6FA),(0xF6FB),(0xF6FC), -(0xF740),(0xF741),(0xF742),(0xF743),(0xF744),(0xF745),(0xF746),(0xF747), -(0xF748),(0xF749),(0xF74A),(0xF74B),(0xF74C),(0xF74D),(0xF74E),(0xF74F), -(0xF750),(0xF751),(0xF752),(0xF753),(0xF754),(0xF755),(0xF756),(0xF757), -(0xF758),(0xF759),(0xF75A),(0xF75B),(0xF75C),(0xF75D),(0xF75E),(0xF75F), -(0xF760),(0xF761),(0xF762),(0xF763),(0xF764),(0xF765),(0xF766),(0xF767), -(0xF768),(0xF769),(0xF76A),(0xF76B),(0xF76C),(0xF76D),(0xF76E),(0xF76F), -(0xF770),(0xF771),(0xF772),(0xF773),(0xF774),(0xF775),(0xF776),(0xF777), -(0xF778),(0xF779),(0xF77A),(0xF77B),(0xF77C),(0xF77D),(0xF77E), -(0xF780),(0xF781),(0xF782),(0xF783),(0xF784),(0xF785),(0xF786),(0xF787), -(0xF788),(0xF789),(0xF78A),(0xF78B),(0xF78C),(0xF78D),(0xF78E),(0xF78F), -(0xF790),(0xF791),(0xF792),(0xF793),(0xF794),(0xF795),(0xF796),(0xF797), -(0xF798),(0xF799),(0xF79A),(0xF79B),(0xF79C),(0xF79D),(0xF79E),(0xF79F), -(0xF7A0),(0xF7A1),(0xF7A2),(0xF7A3),(0xF7A4),(0xF7A5),(0xF7A6),(0xF7A7), -(0xF7A8),(0xF7A9),(0xF7AA),(0xF7AB),(0xF7AC),(0xF7AD),(0xF7AE),(0xF7AF), -(0xF7B0),(0xF7B1),(0xF7B2),(0xF7B3),(0xF7B4),(0xF7B5),(0xF7B6),(0xF7B7), -(0xF7B8),(0xF7B9),(0xF7BA),(0xF7BB),(0xF7BC),(0xF7BD),(0xF7BE),(0xF7BF), -(0xF7C0),(0xF7C1),(0xF7C2),(0xF7C3),(0xF7C4),(0xF7C5),(0xF7C6),(0xF7C7), -(0xF7C8),(0xF7C9),(0xF7CA),(0xF7CB),(0xF7CC),(0xF7CD),(0xF7CE),(0xF7CF), -(0xF7D0),(0xF7D1),(0xF7D2),(0xF7D3),(0xF7D4),(0xF7D5),(0xF7D6),(0xF7D7), -(0xF7D8),(0xF7D9),(0xF7DA),(0xF7DB),(0xF7DC),(0xF7DD),(0xF7DE),(0xF7DF), -(0xF7E0),(0xF7E1),(0xF7E2),(0xF7E3),(0xF7E4),(0xF7E5),(0xF7E6),(0xF7E7), -(0xF7E8),(0xF7E9),(0xF7EA),(0xF7EB),(0xF7EC),(0xF7ED),(0xF7EE),(0xF7EF), -(0xF7F0),(0xF7F1),(0xF7F2),(0xF7F3),(0xF7F4),(0xF7F5),(0xF7F6),(0xF7F7), -(0xF7F8),(0xF7F9),(0xF7FA),(0xF7FB),(0xF7FC), -(0xF840),(0xF841),(0xF842),(0xF843),(0xF844),(0xF845),(0xF846),(0xF847), -(0xF848),(0xF849),(0xF84A),(0xF84B),(0xF84C),(0xF84D),(0xF84E),(0xF84F), -(0xF850),(0xF851),(0xF852),(0xF853),(0xF854),(0xF855),(0xF856),(0xF857), -(0xF858),(0xF859),(0xF85A),(0xF85B),(0xF85C),(0xF85D),(0xF85E),(0xF85F), -(0xF860),(0xF861),(0xF862),(0xF863),(0xF864),(0xF865),(0xF866),(0xF867), -(0xF868),(0xF869),(0xF86A),(0xF86B),(0xF86C),(0xF86D),(0xF86E),(0xF86F), -(0xF870),(0xF871),(0xF872),(0xF873),(0xF874),(0xF875),(0xF876),(0xF877), -(0xF878),(0xF879),(0xF87A),(0xF87B),(0xF87C),(0xF87D),(0xF87E), -(0xF880),(0xF881),(0xF882),(0xF883),(0xF884),(0xF885),(0xF886),(0xF887), -(0xF888),(0xF889),(0xF88A),(0xF88B),(0xF88C),(0xF88D),(0xF88E),(0xF88F), -(0xF890),(0xF891),(0xF892),(0xF893),(0xF894),(0xF895),(0xF896),(0xF897), -(0xF898),(0xF899),(0xF89A),(0xF89B),(0xF89C),(0xF89D),(0xF89E),(0xF89F), -(0xF8A0),(0xF8A1),(0xF8A2),(0xF8A3),(0xF8A4),(0xF8A5),(0xF8A6),(0xF8A7), -(0xF8A8),(0xF8A9),(0xF8AA),(0xF8AB),(0xF8AC),(0xF8AD),(0xF8AE),(0xF8AF), -(0xF8B0),(0xF8B1),(0xF8B2),(0xF8B3),(0xF8B4),(0xF8B5),(0xF8B6),(0xF8B7), -(0xF8B8),(0xF8B9),(0xF8BA),(0xF8BB),(0xF8BC),(0xF8BD),(0xF8BE),(0xF8BF), -(0xF8C0),(0xF8C1),(0xF8C2),(0xF8C3),(0xF8C4),(0xF8C5),(0xF8C6),(0xF8C7), -(0xF8C8),(0xF8C9),(0xF8CA),(0xF8CB),(0xF8CC),(0xF8CD),(0xF8CE),(0xF8CF), -(0xF8D0),(0xF8D1),(0xF8D2),(0xF8D3),(0xF8D4),(0xF8D5),(0xF8D6),(0xF8D7), -(0xF8D8),(0xF8D9),(0xF8DA),(0xF8DB),(0xF8DC),(0xF8DD),(0xF8DE),(0xF8DF), -(0xF8E0),(0xF8E1),(0xF8E2),(0xF8E3),(0xF8E4),(0xF8E5),(0xF8E6),(0xF8E7), -(0xF8E8),(0xF8E9),(0xF8EA),(0xF8EB),(0xF8EC),(0xF8ED),(0xF8EE),(0xF8EF), -(0xF8F0),(0xF8F1),(0xF8F2),(0xF8F3),(0xF8F4),(0xF8F5),(0xF8F6),(0xF8F7), -(0xF8F8),(0xF8F9),(0xF8FA),(0xF8FB),(0xF8FC), -(0xF940),(0xF941),(0xF942),(0xF943),(0xF944),(0xF945),(0xF946),(0xF947), -(0xF948),(0xF949),(0xF94A),(0xF94B),(0xF94C),(0xF94D),(0xF94E),(0xF94F), -(0xF950),(0xF951),(0xF952),(0xF953),(0xF954),(0xF955),(0xF956),(0xF957), -(0xF958),(0xF959),(0xF95A),(0xF95B),(0xF95C),(0xF95D),(0xF95E),(0xF95F), -(0xF960),(0xF961),(0xF962),(0xF963),(0xF964),(0xF965),(0xF966),(0xF967), -(0xF968),(0xF969),(0xF96A),(0xF96B),(0xF96C),(0xF96D),(0xF96E),(0xF96F), -(0xF970),(0xF971),(0xF972),(0xF973),(0xF974),(0xF975),(0xF976),(0xF977), -(0xF978),(0xF979),(0xF97A),(0xF97B),(0xF97C),(0xF97D),(0xF97E), -(0xF980),(0xF981),(0xF982),(0xF983),(0xF984),(0xF985),(0xF986),(0xF987), -(0xF988),(0xF989),(0xF98A),(0xF98B),(0xF98C),(0xF98D),(0xF98E),(0xF98F), -(0xF990),(0xF991),(0xF992),(0xF993),(0xF994),(0xF995),(0xF996),(0xF997), -(0xF998),(0xF999),(0xF99A),(0xF99B),(0xF99C),(0xF99D),(0xF99E),(0xF99F), -(0xF9A0),(0xF9A1),(0xF9A2),(0xF9A3),(0xF9A4),(0xF9A5),(0xF9A6),(0xF9A7), -(0xF9A8),(0xF9A9),(0xF9AA),(0xF9AB),(0xF9AC),(0xF9AD),(0xF9AE),(0xF9AF), -(0xF9B0),(0xF9B1),(0xF9B2),(0xF9B3),(0xF9B4),(0xF9B5),(0xF9B6),(0xF9B7), -(0xF9B8),(0xF9B9),(0xF9BA),(0xF9BB),(0xF9BC),(0xF9BD),(0xF9BE),(0xF9BF), -(0xF9C0),(0xF9C1),(0xF9C2),(0xF9C3),(0xF9C4),(0xF9C5),(0xF9C6),(0xF9C7), -(0xF9C8),(0xF9C9),(0xF9CA),(0xF9CB),(0xF9CC),(0xF9CD),(0xF9CE),(0xF9CF), -(0xF9D0),(0xF9D1),(0xF9D2),(0xF9D3),(0xF9D4),(0xF9D5),(0xF9D6),(0xF9D7), -(0xF9D8),(0xF9D9),(0xF9DA),(0xF9DB),(0xF9DC),(0xF9DD),(0xF9DE),(0xF9DF), -(0xF9E0),(0xF9E1),(0xF9E2),(0xF9E3),(0xF9E4),(0xF9E5),(0xF9E6),(0xF9E7), -(0xF9E8),(0xF9E9),(0xF9EA),(0xF9EB),(0xF9EC),(0xF9ED),(0xF9EE),(0xF9EF), -(0xF9F0),(0xF9F1),(0xF9F2),(0xF9F3),(0xF9F4),(0xF9F5),(0xF9F6),(0xF9F7), -(0xF9F8),(0xF9F9),(0xF9FA),(0xF9FB),(0xF9FC); -SELECT HEX(c1) FROM t1; -HEX(c1) -05 -7E -815C -815F -8160 -8161 -817C -8191 -8192 -81CA -8740 -8741 -8742 -8743 -8744 -8745 -8746 -8747 -8748 -8749 -874A -874B -874C -874D -874E -874F -8750 -8751 -8752 -8753 -8754 -8755 -8756 -8757 -8758 -8759 -875A -875B -875C -875D -875F -8760 -8761 -8762 -8763 -8764 -8765 -8766 -8767 -8768 -8769 -876A -876B -876C -876D -876E -876F -8770 -8771 -8772 -8773 -8774 -8775 -877E -8780 -8781 -8782 -8783 -8784 -8785 -8786 -8787 -8788 -8789 -878A -878B -878C -878D -878E -878F -8790 -8791 -8792 -8793 -8794 -8795 -8796 -8797 -8798 -8799 -879A -879B -879C -ED40 -ED41 -ED42 -ED43 -ED44 -ED45 -ED46 -ED47 -ED48 -ED49 -ED4A -ED4B -ED4C -ED4D -ED4E -ED4F -ED50 -ED51 -ED52 -ED53 -ED54 -ED55 -ED56 -ED57 -ED58 -ED59 -ED5A -ED5B -ED5C -ED5D -ED5E -ED5F -ED60 -ED61 -ED62 -ED63 -ED64 -ED65 -ED66 -ED67 -ED68 -ED69 -ED6A -ED6B -ED6C -ED6D -ED6E -ED6F -ED70 -ED71 -ED72 -ED73 -ED74 -ED75 -ED76 -ED77 -ED78 -ED79 -ED7A -ED7B -ED7C -ED7D -ED7E -ED80 -ED81 -ED82 -ED83 -ED84 -ED85 -ED86 -ED87 -ED88 -ED89 -ED8A -ED8B -ED8C -ED8D -ED8E -ED8F -ED90 -ED91 -ED92 -ED93 -ED94 -ED95 -ED96 -ED97 -ED98 -ED99 -ED9A -ED9B -ED9C -ED9D -ED9E -ED9F -EDA0 -EDA1 -EDA2 -EDA3 -EDA4 -EDA5 -EDA6 -EDA7 -EDA8 -EDA9 -EDAA -EDAB -EDAC -EDAD -EDAE -EDAF -EDB0 -EDB1 -EDB2 -EDB3 -EDB4 -EDB5 -EDB6 -EDB7 -EDB8 -EDB9 -EDBA -EDBB -EDBC -EDBD -EDBE -EDBF -EDC0 -EDC1 -EDC2 -EDC3 -EDC4 -EDC5 -EDC6 -EDC7 -EDC8 -EDC9 -EDCA -EDCB -EDCC -EDCD -EDCE -EDCF -EDD0 -EDD1 -EDD2 -EDD3 -EDD4 -EDD5 -EDD6 -EDD7 -EDD8 -EDD9 -EDDA -EDDB -EDDC -EDDD -EDDE -EDDF -EDE0 -EDE1 -EDE2 -EDE3 -EDE4 -EDE5 -EDE6 -EDE7 -EDE8 -EDE9 -EDEA -EDEB -EDEC -EDED -EDEE -EDEF -EDF0 -EDF1 -EDF2 -EDF3 -EDF4 -EDF5 -EDF6 -EDF7 -EDF8 -EDF9 -EDFA -EDFB -EDFC -EE40 -EE41 -EE42 -EE43 -EE44 -EE45 -EE46 -EE47 -EE48 -EE49 -EE4A -EE4B -EE4C -EE4D -EE4E -EE4F -EE50 -EE51 -EE52 -EE53 -EE54 -EE55 -EE56 -EE57 -EE58 -EE59 -EE5A -EE5B -EE5C -EE5D -EE5E -EE5F -EE60 -EE61 -EE62 -EE63 -EE64 -EE65 -EE66 -EE67 -EE68 -EE69 -EE6A -EE6B -EE6C -EE6D -EE6E -EE6F -EE70 -EE71 -EE72 -EE73 -EE74 -EE75 -EE76 -EE77 -EE78 -EE79 -EE7A -EE7B -EE7C -EE7D -EE7E -EE80 -EE81 -EE82 -EE83 -EE84 -EE85 -EE86 -EE87 -EE88 -EE89 -EE8A -EE8B -EE8C -EE8D -EE8E -EE8F -EE90 -EE91 -EE92 -EE93 -EE94 -EE95 -EE96 -EE97 -EE98 -EE99 -EE9A -EE9B -EE9C -EE9D -EE9E -EE9F -EEA0 -EEA1 -EEA2 -EEA3 -EEA4 -EEA5 -EEA6 -EEA7 -EEA8 -EEA9 -EEAA -EEAB -EEAC -EEAD -EEAE -EEAF -EEB0 -EEB1 -EEB2 -EEB3 -EEB4 -EEB5 -EEB6 -EEB7 -EEB8 -EEB9 -EEBA -EEBB -EEBC -EEBD -EEBE -EEBF -EEC0 -EEC1 -EEC2 -EEC3 -EEC4 -EEC5 -EEC6 -EEC7 -EEC8 -EEC9 -EECA -EECB -EECC -EECD -EECE -EECF -EED0 -EED1 -EED2 -EED3 -EED4 -EED5 -EED6 -EED7 -EED8 -EED9 -EEDA -EEDB -EEDC -EEDD -EEDE -EEDF -EEE0 -EEE1 -EEE2 -EEE3 -EEE4 -EEE5 -EEE6 -EEE7 -EEE8 -EEE9 -EEEA -EEEB -EEEC -EEEF -EEF0 -EEF1 -EEF2 -EEF3 -EEF4 -EEF5 -EEF6 -EEF7 -EEF8 -EEF9 -EEFA -EEFB -EEFC -FA40 -FA41 -FA42 -FA43 -FA44 -FA45 -FA46 -FA47 -FA48 -FA49 -FA4A -FA4B -FA4C -FA4D -FA4E -FA4F -FA50 -FA51 -FA52 -FA53 -FA54 -FA55 -FA56 -FA57 -FA58 -FA59 -FA5A -FA5B -FA5C -FA5D -FA5E -FA5F -FA60 -FA61 -FA62 -FA63 -FA64 -FA65 -FA66 -FA67 -FA68 -FA69 -FA6A -FA6B -FA6C -FA6D -FA6E -FA6F -FA70 -FA71 -FA72 -FA73 -FA74 -FA75 -FA76 -FA77 -FA78 -FA79 -FA7A -FA7B -FA7C -FA7D -FA7E -FA80 -FA81 -FA82 -FA83 -FA84 -FA85 -FA86 -FA87 -FA88 -FA89 -FA8A -FA8B -FA8C -FA8D -FA8E -FA8F -FA90 -FA91 -FA92 -FA93 -FA94 -FA95 -FA96 -FA97 -FA98 -FA99 -FA9A -FA9B -FA9C -FA9D -FA9E -FA9F -FAA0 -FAA1 -FAA2 -FAA3 -FAA4 -FAA5 -FAA6 -FAA7 -FAA8 -FAA9 -FAAA -FAAB -FAAC -FAAD -FAAE -FAAF -FAB0 -FAB1 -FAB2 -FAB3 -FAB4 -FAB5 -FAB6 -FAB7 -FAB8 -FAB9 -FABA -FABB -FABC -FABD -FABE -FABF -FAC0 -FAC1 -FAC2 -FAC3 -FAC4 -FAC5 -FAC6 -FAC7 -FAC8 -FAC9 -FACA -FACB -FACC -FACD -FACE -FACF -FAD0 -FAD1 -FAD2 -FAD3 -FAD4 -FAD5 -FAD6 -FAD7 -FAD8 -FAD9 -FADA -FADB -FADC -FADD -FADE -FADF -FAE0 -FAE1 -FAE2 -FAE3 -FAE4 -FAE5 -FAE6 -FAE7 -FAE8 -FAE9 -FAEA -FAEB -FAEC -FAED -FAEE -FAEF -FAF0 -FAF1 -FAF2 -FAF3 -FAF4 -FAF5 -FAF6 -FAF7 -FAF8 -FAF9 -FAFA -FAFB -FAFC -FB40 -FB41 -FB42 -FB43 -FB44 -FB45 -FB46 -FB47 -FB48 -FB49 -FB4A -FB4B -FB4C -FB4D -FB4E -FB4F -FB50 -FB51 -FB52 -FB53 -FB54 -FB55 -FB56 -FB57 -FB58 -FB59 -FB5A -FB5B -FB5C -FB5D -FB5E -FB5F -FB60 -FB61 -FB62 -FB63 -FB64 -FB65 -FB66 -FB67 -FB68 -FB69 -FB6A -FB6B -FB6C -FB6D -FB6E -FB6F -FB70 -FB71 -FB72 -FB73 -FB74 -FB75 -FB76 -FB77 -FB78 -FB79 -FB7A -FB7B -FB7C -FB7D -FB7E -FB80 -FB81 -FB82 -FB83 -FB84 -FB85 -FB86 -FB87 -FB88 -FB89 -FB8A -FB8B -FB8C -FB8D -FB8E -FB8F -FB90 -FB91 -FB92 -FB93 -FB94 -FB95 -FB96 -FB97 -FB98 -FB99 -FB9A -FB9B -FB9C -FB9D -FB9E -FB9F -FBA0 -FBA1 -FBA2 -FBA3 -FBA4 -FBA5 -FBA6 -FBA7 -FBA8 -FBA9 -FBAA -FBAB -FBAC -FBAD -FBAE -FBAF -FBB0 -FBB1 -FBB2 -FBB3 -FBB4 -FBB5 -FBB6 -FBB7 -FBB8 -FBB9 -FBBA -FBBB -FBBC -FBBD -FBBE -FBBF -FBC0 -FBC1 -FBC2 -FBC3 -FBC4 -FBC5 -FBC6 -FBC7 -FBC8 -FBC9 -FBCA -FBCB -FBCC -FBCD -FBCE -FBCF -FBD0 -FBD1 -FBD2 -FBD3 -FBD4 -FBD5 -FBD6 -FBD7 -FBD8 -FBD9 -FBDA -FBDB -FBDC -FBDD -FBDE -FBDF -FBE0 -FBE1 -FBE2 -FBE3 -FBE4 -FBE5 -FBE6 -FBE7 -FBE8 -FBE9 -FBEA -FBEB -FBEC -FBED -FBEE -FBEF -FBF0 -FBF1 -FBF2 -FBF3 -FBF4 -FBF5 -FBF6 -FBF7 -FBF8 -FBF9 -FBFA -FBFB -FBFC -FC40 -FC41 -FC42 -FC43 -FC44 -FC45 -FC46 -FC47 -FC48 -FC49 -FC4A -FC4B -F040 -F041 -F042 -F043 -F044 -F045 -F046 -F047 -F048 -F049 -F04A -F04B -F04C -F04D -F04E -F04F -F050 -F051 -F052 -F053 -F054 -F055 -F056 -F057 -F058 -F059 -F05A -F05B -F05C -F05D -F05E -F05F -F060 -F061 -F062 -F063 -F064 -F065 -F066 -F067 -F068 -F069 -F06A -F06B -F06C -F06D -F06E -F06F -F070 -F071 -F072 -F073 -F074 -F075 -F076 -F077 -F078 -F079 -F07A -F07B -F07C -F07D -F07E -F080 -F081 -F082 -F083 -F084 -F085 -F086 -F087 -F088 -F089 -F08A -F08B -F08C -F08D -F08E -F08F -F090 -F091 -F092 -F093 -F094 -F095 -F096 -F097 -F098 -F099 -F09A -F09B -F09C -F09D -F09E -F09F -F0A0 -F0A1 -F0A2 -F0A3 -F0A4 -F0A5 -F0A6 -F0A7 -F0A8 -F0A9 -F0AA -F0AB -F0AC -F0AD -F0AE -F0AF -F0B0 -F0B1 -F0B2 -F0B3 -F0B4 -F0B5 -F0B6 -F0B7 -F0B8 -F0B9 -F0BA -F0BB -F0BC -F0BD -F0BE -F0BF -F0C0 -F0C1 -F0C2 -F0C3 -F0C4 -F0C5 -F0C6 -F0C7 -F0C8 -F0C9 -F0CA -F0CB -F0CC -F0CD -F0CE -F0CF -F0D0 -F0D1 -F0D2 -F0D3 -F0D4 -F0D5 -F0D6 -F0D7 -F0D8 -F0D9 -F0DA -F0DB -F0DC -F0DD -F0DE -F0DF -F0E0 -F0E1 -F0E2 -F0E3 -F0E4 -F0E5 -F0E6 -F0E7 -F0E8 -F0E9 -F0EA -F0EB -F0EC -F0ED -F0EE -F0EF -F0F0 -F0F1 -F0F2 -F0F3 -F0F4 -F0F5 -F0F6 -F0F7 -F0F8 -F0F9 -F0FA -F0FB -F0FC -F140 -F141 -F142 -F143 -F144 -F145 -F146 -F147 -F148 -F149 -F14A -F14B -F14C -F14D -F14E -F14F -F150 -F151 -F152 -F153 -F154 -F155 -F156 -F157 -F158 -F159 -F15A -F15B -F15C -F15D -F15E -F15F -F160 -F161 -F162 -F163 -F164 -F165 -F166 -F167 -F168 -F169 -F16A -F16B -F16C -F16D -F16E -F16F -F170 -F171 -F172 -F173 -F174 -F175 -F176 -F177 -F178 -F179 -F17A -F17B -F17C -F17D -F17E -F180 -F181 -F182 -F183 -F184 -F185 -F186 -F187 -F188 -F189 -F18A -F18B -F18C -F18D -F18E -F18F -F190 -F191 -F192 -F193 -F194 -F195 -F196 -F197 -F198 -F199 -F19A -F19B -F19C -F19D -F19E -F19F -F1A0 -F1A1 -F1A2 -F1A3 -F1A4 -F1A5 -F1A6 -F1A7 -F1A8 -F1A9 -F1AA -F1AB -F1AC -F1AD -F1AE -F1AF -F1B0 -F1B1 -F1B2 -F1B3 -F1B4 -F1B5 -F1B6 -F1B7 -F1B8 -F1B9 -F1BA -F1BB -F1BC -F1BD -F1BE -F1BF -F1C0 -F1C1 -F1C2 -F1C3 -F1C4 -F1C5 -F1C6 -F1C7 -F1C8 -F1C9 -F1CA -F1CB -F1CC -F1CD -F1CE -F1CF -F1D0 -F1D1 -F1D2 -F1D3 -F1D4 -F1D5 -F1D6 -F1D7 -F1D8 -F1D9 -F1DA -F1DB -F1DC -F1DD -F1DE -F1DF -F1E0 -F1E1 -F1E2 -F1E3 -F1E4 -F1E5 -F1E6 -F1E7 -F1E8 -F1E9 -F1EA -F1EB -F1EC -F1ED -F1EE -F1EF -F1F0 -F1F1 -F1F2 -F1F3 -F1F4 -F1F5 -F1F6 -F1F7 -F1F8 -F1F9 -F1FA -F1FB -F1FC -F240 -F241 -F242 -F243 -F244 -F245 -F246 -F247 -F248 -F249 -F24A -F24B -F24C -F24D -F24E -F24F -F250 -F251 -F252 -F253 -F254 -F255 -F256 -F257 -F258 -F259 -F25A -F25B -F25C -F25D -F25E -F25F -F260 -F261 -F262 -F263 -F264 -F265 -F266 -F267 -F268 -F269 -F26A -F26B -F26C -F26D -F26E -F26F -F270 -F271 -F272 -F273 -F274 -F275 -F276 -F277 -F278 -F279 -F27A -F27B -F27C -F27D -F27E -F280 -F281 -F282 -F283 -F284 -F285 -F286 -F287 -F288 -F289 -F28A -F28B -F28C -F28D -F28E -F28F -F290 -F291 -F292 -F293 -F294 -F295 -F296 -F297 -F298 -F299 -F29A -F29B -F29C -F29D -F29E -F29F -F2A0 -F2A1 -F2A2 -F2A3 -F2A4 -F2A5 -F2A6 -F2A7 -F2A8 -F2A9 -F2AA -F2AB -F2AC -F2AD -F2AE -F2AF -F2B0 -F2B1 -F2B2 -F2B3 -F2B4 -F2B5 -F2B6 -F2B7 -F2B8 -F2B9 -F2BA -F2BB -F2BC -F2BD -F2BE -F2BF -F2C0 -F2C1 -F2C2 -F2C3 -F2C4 -F2C5 -F2C6 -F2C7 -F2C8 -F2C9 -F2CA -F2CB -F2CC -F2CD -F2CE -F2CF -F2D0 -F2D1 -F2D2 -F2D3 -F2D4 -F2D5 -F2D6 -F2D7 -F2D8 -F2D9 -F2DA -F2DB -F2DC -F2DD -F2DE -F2DF -F2E0 -F2E1 -F2E2 -F2E3 -F2E4 -F2E5 -F2E6 -F2E7 -F2E8 -F2E9 -F2EA -F2EB -F2EC -F2ED -F2EE -F2EF -F2F0 -F2F1 -F2F2 -F2F3 -F2F4 -F2F5 -F2F6 -F2F7 -F2F8 -F2F9 -F2FA -F2FB -F2FC -F340 -F341 -F342 -F343 -F344 -F345 -F346 -F347 -F348 -F349 -F34A -F34B -F34C -F34D -F34E -F34F -F350 -F351 -F352 -F353 -F354 -F355 -F356 -F357 -F358 -F359 -F35A -F35B -F35C -F35D -F35E -F35F -F360 -F361 -F362 -F363 -F364 -F365 -F366 -F367 -F368 -F369 -F36A -F36B -F36C -F36D -F36E -F36F -F370 -F371 -F372 -F373 -F374 -F375 -F376 -F377 -F378 -F379 -F37A -F37B -F37C -F37D -F37E -F380 -F381 -F382 -F383 -F384 -F385 -F386 -F387 -F388 -F389 -F38A -F38B -F38C -F38D -F38E -F38F -F390 -F391 -F392 -F393 -F394 -F395 -F396 -F397 -F398 -F399 -F39A -F39B -F39C -F39D -F39E -F39F -F3A0 -F3A1 -F3A2 -F3A3 -F3A4 -F3A5 -F3A6 -F3A7 -F3A8 -F3A9 -F3AA -F3AB -F3AC -F3AD -F3AE -F3AF -F3B0 -F3B1 -F3B2 -F3B3 -F3B4 -F3B5 -F3B6 -F3B7 -F3B8 -F3B9 -F3BA -F3BB -F3BC -F3BD -F3BE -F3BF -F3C0 -F3C1 -F3C2 -F3C3 -F3C4 -F3C5 -F3C6 -F3C7 -F3C8 -F3C9 -F3CA -F3CB -F3CC -F3CD -F3CE -F3CF -F3D0 -F3D1 -F3D2 -F3D3 -F3D4 -F3D5 -F3D6 -F3D7 -F3D8 -F3D9 -F3DA -F3DB -F3DC -F3DD -F3DE -F3DF -F3E0 -F3E1 -F3E2 -F3E3 -F3E4 -F3E5 -F3E6 -F3E7 -F3E8 -F3E9 -F3EA -F3EB -F3EC -F3ED -F3EE -F3EF -F3F0 -F3F1 -F3F2 -F3F3 -F3F4 -F3F5 -F3F6 -F3F7 -F3F8 -F3F9 -F3FA -F3FB -F3FC -F440 -F441 -F442 -F443 -F444 -F445 -F446 -F447 -F448 -F449 -F44A -F44B -F44C -F44D -F44E -F44F -F450 -F451 -F452 -F453 -F454 -F455 -F456 -F457 -F458 -F459 -F45A -F45B -F45C -F45D -F45E -F45F -F460 -F461 -F462 -F463 -F464 -F465 -F466 -F467 -F468 -F469 -F46A -F46B -F46C -F46D -F46E -F46F -F470 -F471 -F472 -F473 -F474 -F475 -F476 -F477 -F478 -F479 -F47A -F47B -F47C -F47D -F47E -F480 -F481 -F482 -F483 -F484 -F485 -F486 -F487 -F488 -F489 -F48A -F48B -F48C -F48D -F48E -F48F -F490 -F491 -F492 -F493 -F494 -F495 -F496 -F497 -F498 -F499 -F49A -F49B -F49C -F49D -F49E -F49F -F4A0 -F4A1 -F4A2 -F4A3 -F4A4 -F4A5 -F4A6 -F4A7 -F4A8 -F4A9 -F4AA -F4AB -F4AC -F4AD -F4AE -F4AF -F4B0 -F4B1 -F4B2 -F4B3 -F4B4 -F4B5 -F4B6 -F4B7 -F4B8 -F4B9 -F4BA -F4BB -F4BC -F4BD -F4BE -F4BF -F4C0 -F4C1 -F4C2 -F4C3 -F4C4 -F4C5 -F4C6 -F4C7 -F4C8 -F4C9 -F4CA -F4CB -F4CC -F4CD -F4CE -F4CF -F4D0 -F4D1 -F4D2 -F4D3 -F4D4 -F4D5 -F4D6 -F4D7 -F4D8 -F4D9 -F4DA -F4DB -F4DC -F4DD -F4DE -F4DF -F4E0 -F4E1 -F4E2 -F4E3 -F4E4 -F4E5 -F4E6 -F4E7 -F4E8 -F4E9 -F4EA -F4EB -F4EC -F4ED -F4EE -F4EF -F4F0 -F4F1 -F4F2 -F4F3 -F4F4 -F4F5 -F4F6 -F4F7 -F4F8 -F4F9 -F4FA -F4FB -F4FC -F540 -F541 -F542 -F543 -F544 -F545 -F546 -F547 -F548 -F549 -F54A -F54B -F54C -F54D -F54E -F54F -F550 -F551 -F552 -F553 -F554 -F555 -F556 -F557 -F558 -F559 -F55A -F55B -F55C -F55D -F55E -F55F -F560 -F561 -F562 -F563 -F564 -F565 -F566 -F567 -F568 -F569 -F56A -F56B -F56C -F56D -F56E -F56F -F570 -F571 -F572 -F573 -F574 -F575 -F576 -F577 -F578 -F579 -F57A -F57B -F57C -F57D -F57E -F580 -F581 -F582 -F583 -F584 -F585 -F586 -F587 -F588 -F589 -F58A -F58B -F58C -F58D -F58E -F58F -F590 -F591 -F592 -F593 -F594 -F595 -F596 -F597 -F598 -F599 -F59A -F59B -F59C -F59D -F59E -F59F -F5A0 -F5A1 -F5A2 -F5A3 -F5A4 -F5A5 -F5A6 -F5A7 -F5A8 -F5A9 -F5AA -F5AB -F5AC -F5AD -F5AE -F5AF -F5B0 -F5B1 -F5B2 -F5B3 -F5B4 -F5B5 -F5B6 -F5B7 -F5B8 -F5B9 -F5BA -F5BB -F5BC -F5BD -F5BE -F5BF -F5C0 -F5C1 -F5C2 -F5C3 -F5C4 -F5C5 -F5C6 -F5C7 -F5C8 -F5C9 -F5CA -F5CB -F5CC -F5CD -F5CE -F5CF -F5D0 -F5D1 -F5D2 -F5D3 -F5D4 -F5D5 -F5D6 -F5D7 -F5D8 -F5D9 -F5DA -F5DB -F5DC -F5DD -F5DE -F5DF -F5E0 -F5E1 -F5E2 -F5E3 -F5E4 -F5E5 -F5E6 -F5E7 -F5E8 -F5E9 -F5EA -F5EB -F5EC -F5ED -F5EE -F5EF -F5F0 -F5F1 -F5F2 -F5F3 -F5F4 -F5F5 -F5F6 -F5F7 -F5F8 -F5F9 -F5FA -F5FB -F5FC -F640 -F641 -F642 -F643 -F644 -F645 -F646 -F647 -F648 -F649 -F64A -F64B -F64C -F64D -F64E -F64F -F650 -F651 -F652 -F653 -F654 -F655 -F656 -F657 -F658 -F659 -F65A -F65B -F65C -F65D -F65E -F65F -F660 -F661 -F662 -F663 -F664 -F665 -F666 -F667 -F668 -F669 -F66A -F66B -F66C -F66D -F66E -F66F -F670 -F671 -F672 -F673 -F674 -F675 -F676 -F677 -F678 -F679 -F67A -F67B -F67C -F67D -F67E -F680 -F681 -F682 -F683 -F684 -F685 -F686 -F687 -F688 -F689 -F68A -F68B -F68C -F68D -F68E -F68F -F690 -F691 -F692 -F693 -F694 -F695 -F696 -F697 -F698 -F699 -F69A -F69B -F69C -F69D -F69E -F69F -F6A0 -F6A1 -F6A2 -F6A3 -F6A4 -F6A5 -F6A6 -F6A7 -F6A8 -F6A9 -F6AA -F6AB -F6AC -F6AD -F6AE -F6AF -F6B0 -F6B1 -F6B2 -F6B3 -F6B4 -F6B5 -F6B6 -F6B7 -F6B8 -F6B9 -F6BA -F6BB -F6BC -F6BD -F6BE -F6BF -F6C0 -F6C1 -F6C2 -F6C3 -F6C4 -F6C5 -F6C6 -F6C7 -F6C8 -F6C9 -F6CA -F6CB -F6CC -F6CD -F6CE -F6CF -F6D0 -F6D1 -F6D2 -F6D3 -F6D4 -F6D5 -F6D6 -F6D7 -F6D8 -F6D9 -F6DA -F6DB -F6DC -F6DD -F6DE -F6DF -F6E0 -F6E1 -F6E2 -F6E3 -F6E4 -F6E5 -F6E6 -F6E7 -F6E8 -F6E9 -F6EA -F6EB -F6EC -F6ED -F6EE -F6EF -F6F0 -F6F1 -F6F2 -F6F3 -F6F4 -F6F5 -F6F6 -F6F7 -F6F8 -F6F9 -F6FA -F6FB -F6FC -F740 -F741 -F742 -F743 -F744 -F745 -F746 -F747 -F748 -F749 -F74A -F74B -F74C -F74D -F74E -F74F -F750 -F751 -F752 -F753 -F754 -F755 -F756 -F757 -F758 -F759 -F75A -F75B -F75C -F75D -F75E -F75F -F760 -F761 -F762 -F763 -F764 -F765 -F766 -F767 -F768 -F769 -F76A -F76B -F76C -F76D -F76E -F76F -F770 -F771 -F772 -F773 -F774 -F775 -F776 -F777 -F778 -F779 -F77A -F77B -F77C -F77D -F77E -F780 -F781 -F782 -F783 -F784 -F785 -F786 -F787 -F788 -F789 -F78A -F78B -F78C -F78D -F78E -F78F -F790 -F791 -F792 -F793 -F794 -F795 -F796 -F797 -F798 -F799 -F79A -F79B -F79C -F79D -F79E -F79F -F7A0 -F7A1 -F7A2 -F7A3 -F7A4 -F7A5 -F7A6 -F7A7 -F7A8 -F7A9 -F7AA -F7AB -F7AC -F7AD -F7AE -F7AF -F7B0 -F7B1 -F7B2 -F7B3 -F7B4 -F7B5 -F7B6 -F7B7 -F7B8 -F7B9 -F7BA -F7BB -F7BC -F7BD -F7BE -F7BF -F7C0 -F7C1 -F7C2 -F7C3 -F7C4 -F7C5 -F7C6 -F7C7 -F7C8 -F7C9 -F7CA -F7CB -F7CC -F7CD -F7CE -F7CF -F7D0 -F7D1 -F7D2 -F7D3 -F7D4 -F7D5 -F7D6 -F7D7 -F7D8 -F7D9 -F7DA -F7DB -F7DC -F7DD -F7DE -F7DF -F7E0 -F7E1 -F7E2 -F7E3 -F7E4 -F7E5 -F7E6 -F7E7 -F7E8 -F7E9 -F7EA -F7EB -F7EC -F7ED -F7EE -F7EF -F7F0 -F7F1 -F7F2 -F7F3 -F7F4 -F7F5 -F7F6 -F7F7 -F7F8 -F7F9 -F7FA -F7FB -F7FC -F840 -F841 -F842 -F843 -F844 -F845 -F846 -F847 -F848 -F849 -F84A -F84B -F84C -F84D -F84E -F84F -F850 -F851 -F852 -F853 -F854 -F855 -F856 -F857 -F858 -F859 -F85A -F85B -F85C -F85D -F85E -F85F -F860 -F861 -F862 -F863 -F864 -F865 -F866 -F867 -F868 -F869 -F86A -F86B -F86C -F86D -F86E -F86F -F870 -F871 -F872 -F873 -F874 -F875 -F876 -F877 -F878 -F879 -F87A -F87B -F87C -F87D -F87E -F880 -F881 -F882 -F883 -F884 -F885 -F886 -F887 -F888 -F889 -F88A -F88B -F88C -F88D -F88E -F88F -F890 -F891 -F892 -F893 -F894 -F895 -F896 -F897 -F898 -F899 -F89A -F89B -F89C -F89D -F89E -F89F -F8A0 -F8A1 -F8A2 -F8A3 -F8A4 -F8A5 -F8A6 -F8A7 -F8A8 -F8A9 -F8AA -F8AB -F8AC -F8AD -F8AE -F8AF -F8B0 -F8B1 -F8B2 -F8B3 -F8B4 -F8B5 -F8B6 -F8B7 -F8B8 -F8B9 -F8BA -F8BB -F8BC -F8BD -F8BE -F8BF -F8C0 -F8C1 -F8C2 -F8C3 -F8C4 -F8C5 -F8C6 -F8C7 -F8C8 -F8C9 -F8CA -F8CB -F8CC -F8CD -F8CE -F8CF -F8D0 -F8D1 -F8D2 -F8D3 -F8D4 -F8D5 -F8D6 -F8D7 -F8D8 -F8D9 -F8DA -F8DB -F8DC -F8DD -F8DE -F8DF -F8E0 -F8E1 -F8E2 -F8E3 -F8E4 -F8E5 -F8E6 -F8E7 -F8E8 -F8E9 -F8EA -F8EB -F8EC -F8ED -F8EE -F8EF -F8F0 -F8F1 -F8F2 -F8F3 -F8F4 -F8F5 -F8F6 -F8F7 -F8F8 -F8F9 -F8FA -F8FB -F8FC -F940 -F941 -F942 -F943 -F944 -F945 -F946 -F947 -F948 -F949 -F94A -F94B -F94C -F94D -F94E -F94F -F950 -F951 -F952 -F953 -F954 -F955 -F956 -F957 -F958 -F959 -F95A -F95B -F95C -F95D -F95E -F95F -F960 -F961 -F962 -F963 -F964 -F965 -F966 -F967 -F968 -F969 -F96A -F96B -F96C -F96D -F96E -F96F -F970 -F971 -F972 -F973 -F974 -F975 -F976 -F977 -F978 -F979 -F97A -F97B -F97C -F97D -F97E -F980 -F981 -F982 -F983 -F984 -F985 -F986 -F987 -F988 -F989 -F98A -F98B -F98C -F98D -F98E -F98F -F990 -F991 -F992 -F993 -F994 -F995 -F996 -F997 -F998 -F999 -F99A -F99B -F99C -F99D -F99E -F99F -F9A0 -F9A1 -F9A2 -F9A3 -F9A4 -F9A5 -F9A6 -F9A7 -F9A8 -F9A9 -F9AA -F9AB -F9AC -F9AD -F9AE -F9AF -F9B0 -F9B1 -F9B2 -F9B3 -F9B4 -F9B5 -F9B6 -F9B7 -F9B8 -F9B9 -F9BA -F9BB -F9BC -F9BD -F9BE -F9BF -F9C0 -F9C1 -F9C2 -F9C3 -F9C4 -F9C5 -F9C6 -F9C7 -F9C8 -F9C9 -F9CA -F9CB -F9CC -F9CD -F9CE -F9CF -F9D0 -F9D1 -F9D2 -F9D3 -F9D4 -F9D5 -F9D6 -F9D7 -F9D8 -F9D9 -F9DA -F9DB -F9DC -F9DD -F9DE -F9DF -F9E0 -F9E1 -F9E2 -F9E3 -F9E4 -F9E5 -F9E6 -F9E7 -F9E8 -F9E9 -F9EA -F9EB -F9EC -F9ED -F9EE -F9EF -F9F0 -F9F1 -F9F2 -F9F3 -F9F4 -F9F5 -F9F6 -F9F7 -F9F8 -F9F9 -F9FA -F9FB -F9FC -CREATE TABLE t2 SELECT CONVERT(c1 USING ucs2) AS c1 FROM t1; -SELECT HEX(c1) FROM t2; -HEX(c1) -0005 -007E -2015 -FF3C -FF5E -2225 -FF0D -FFE0 -FFE1 -FFE2 -2460 -2461 -2462 -2463 -2464 -2465 -2466 -2467 -2468 -2469 -246A -246B -246C -246D -246E -246F -2470 -2471 -2472 -2473 -2160 -2161 -2162 -2163 -2164 -2165 -2166 -2167 -2168 -2169 -3349 -3314 -3322 -334D -3318 -3327 -3303 -3336 -3351 -3357 -330D -3326 -3323 -332B -334A -333B -339C -339D -339E -338E -338F -33C4 -33A1 -337B -301D -301F -2116 -33CD -2121 -32A4 -32A5 -32A6 -32A7 -32A8 -3231 -3232 -3239 -337E -337D -337C -2252 -2261 -222B -222E -2211 -221A -22A5 -2220 -221F -22BF -2235 -2229 -222A -7E8A -891C -9348 -9288 -84DC -4FC9 -70BB -6631 -68C8 -92F9 -66FB -5F45 -4E28 -4EE1 -4EFC -4F00 -4F03 -4F39 -4F56 -4F92 -4F8A -4F9A -4F94 -4FCD -5040 -5022 -4FFF -501E -5046 -5070 -5042 -5094 -50F4 -50D8 -514A -5164 -519D -51BE -51EC -5215 -529C -52A6 -52C0 -52DB -5300 -5307 -5324 -5372 -5393 -53B2 -53DD -FA0E -549C -548A -54A9 -54FF -5586 -5759 -5765 -57AC -57C8 -57C7 -FA0F -FA10 -589E -58B2 -590B -5953 -595B -595D -5963 -59A4 -59BA -5B56 -5BC0 -752F -5BD8 -5BEC -5C1E -5CA6 -5CBA -5CF5 -5D27 -5D53 -FA11 -5D42 -5D6D -5DB8 -5DB9 -5DD0 -5F21 -5F34 -5F67 -5FB7 -5FDE -605D -6085 -608A -60DE -60D5 -6120 -60F2 -6111 -6137 -6130 -6198 -6213 -62A6 -63F5 -6460 -649D -64CE -654E -6600 -6615 -663B -6609 -662E -661E -6624 -6665 -6657 -6659 -FA12 -6673 -6699 -66A0 -66B2 -66BF -66FA -670E -F929 -6766 -67BB -6852 -67C0 -6801 -6844 -68CF -FA13 -6968 -FA14 -6998 -69E2 -6A30 -6A6B -6A46 -6A73 -6A7E -6AE2 -6AE4 -6BD6 -6C3F -6C5C -6C86 -6C6F -6CDA -6D04 -6D87 -6D6F -6D96 -6DAC -6DCF -6DF8 -6DF2 -6DFC -6E39 -6E5C -6E27 -6E3C -6EBF -6F88 -6FB5 -6FF5 -7005 -7007 -7028 -7085 -70AB -710F -7104 -715C -7146 -7147 -FA15 -71C1 -71FE -72B1 -72BE -7324 -FA16 -7377 -73BD -73C9 -73D6 -73E3 -73D2 -7407 -73F5 -7426 -742A -7429 -742E -7462 -7489 -749F -7501 -756F -7682 -769C -769E -769B -76A6 -FA17 -7746 -52AF -7821 -784E -7864 -787A -7930 -FA18 -FA19 -FA1A -7994 -FA1B -799B -7AD1 -7AE7 -FA1C -7AEB -7B9E -FA1D -7D48 -7D5C -7DB7 -7DA0 -7DD6 -7E52 -7F47 -7FA1 -FA1E -8301 -8362 -837F -83C7 -83F6 -8448 -84B4 -8553 -8559 -856B -FA1F -85B0 -FA20 -FA21 -8807 -88F5 -8A12 -8A37 -8A79 -8AA7 -8ABE -8ADF -FA22 -8AF6 -8B53 -8B7F -8CF0 -8CF4 -8D12 -8D76 -FA23 -8ECF -FA24 -FA25 -9067 -90DE -FA26 -9115 -9127 -91DA -91D7 -91DE -91ED -91EE -91E4 -91E5 -9206 -9210 -920A -923A -9240 -923C -924E -9259 -9251 -9239 -9267 -92A7 -9277 -9278 -92E7 -92D7 -92D9 -92D0 -FA27 -92D5 -92E0 -92D3 -9325 -9321 -92FB -FA28 -931E -92FF -931D -9302 -9370 -9357 -93A4 -93C6 -93DE -93F8 -9431 -9445 -9448 -9592 -F9DC -FA29 -969D -96AF -9733 -973B -9743 -974D -974F -9751 -9755 -9857 -9865 -FA2A -FA2B -9927 -FA2C -999E -9A4E -9AD9 -9ADC -9B75 -9B72 -9B8F -9BB1 -9BBB -9C00 -9D70 -9D6B -FA2D -9E19 -9ED1 -2170 -2171 -2172 -2173 -2174 -2175 -2176 -2177 -2178 -2179 -FFE2 -FFE4 -FF07 -FF02 -2170 -2171 -2172 -2173 -2174 -2175 -2176 -2177 -2178 -2179 -2160 -2161 -2162 -2163 -2164 -2165 -2166 -2167 -2168 -2169 -FFE2 -FFE4 -FF07 -FF02 -3231 -2116 -2121 -2235 -7E8A -891C -9348 -9288 -84DC -4FC9 -70BB -6631 -68C8 -92F9 -66FB -5F45 -4E28 -4EE1 -4EFC -4F00 -4F03 -4F39 -4F56 -4F92 -4F8A -4F9A -4F94 -4FCD -5040 -5022 -4FFF -501E -5046 -5070 -5042 -5094 -50F4 -50D8 -514A -5164 -519D -51BE -51EC -5215 -529C -52A6 -52C0 -52DB -5300 -5307 -5324 -5372 -5393 -53B2 -53DD -FA0E -549C -548A -54A9 -54FF -5586 -5759 -5765 -57AC -57C8 -57C7 -FA0F -FA10 -589E -58B2 -590B -5953 -595B -595D -5963 -59A4 -59BA -5B56 -5BC0 -752F -5BD8 -5BEC -5C1E -5CA6 -5CBA -5CF5 -5D27 -5D53 -FA11 -5D42 -5D6D -5DB8 -5DB9 -5DD0 -5F21 -5F34 -5F67 -5FB7 -5FDE -605D -6085 -608A -60DE -60D5 -6120 -60F2 -6111 -6137 -6130 -6198 -6213 -62A6 -63F5 -6460 -649D -64CE -654E -6600 -6615 -663B -6609 -662E -661E -6624 -6665 -6657 -6659 -FA12 -6673 -6699 -66A0 -66B2 -66BF -66FA -670E -F929 -6766 -67BB -6852 -67C0 -6801 -6844 -68CF -FA13 -6968 -FA14 -6998 -69E2 -6A30 -6A6B -6A46 -6A73 -6A7E -6AE2 -6AE4 -6BD6 -6C3F -6C5C -6C86 -6C6F -6CDA -6D04 -6D87 -6D6F -6D96 -6DAC -6DCF -6DF8 -6DF2 -6DFC -6E39 -6E5C -6E27 -6E3C -6EBF -6F88 -6FB5 -6FF5 -7005 -7007 -7028 -7085 -70AB -710F -7104 -715C -7146 -7147 -FA15 -71C1 -71FE -72B1 -72BE -7324 -FA16 -7377 -73BD -73C9 -73D6 -73E3 -73D2 -7407 -73F5 -7426 -742A -7429 -742E -7462 -7489 -749F -7501 -756F -7682 -769C -769E -769B -76A6 -FA17 -7746 -52AF -7821 -784E -7864 -787A -7930 -FA18 -FA19 -FA1A -7994 -FA1B -799B -7AD1 -7AE7 -FA1C -7AEB -7B9E -FA1D -7D48 -7D5C -7DB7 -7DA0 -7DD6 -7E52 -7F47 -7FA1 -FA1E -8301 -8362 -837F -83C7 -83F6 -8448 -84B4 -8553 -8559 -856B -FA1F -85B0 -FA20 -FA21 -8807 -88F5 -8A12 -8A37 -8A79 -8AA7 -8ABE -8ADF -FA22 -8AF6 -8B53 -8B7F -8CF0 -8CF4 -8D12 -8D76 -FA23 -8ECF -FA24 -FA25 -9067 -90DE -FA26 -9115 -9127 -91DA -91D7 -91DE -91ED -91EE -91E4 -91E5 -9206 -9210 -920A -923A -9240 -923C -924E -9259 -9251 -9239 -9267 -92A7 -9277 -9278 -92E7 -92D7 -92D9 -92D0 -FA27 -92D5 -92E0 -92D3 -9325 -9321 -92FB -FA28 -931E -92FF -931D -9302 -9370 -9357 -93A4 -93C6 -93DE -93F8 -9431 -9445 -9448 -9592 -F9DC -FA29 -969D -96AF -9733 -973B -9743 -974D -974F -9751 -9755 -9857 -9865 -FA2A -FA2B -9927 -FA2C -999E -9A4E -9AD9 -9ADC -9B75 -9B72 -9B8F -9BB1 -9BBB -9C00 -9D70 -9D6B -FA2D -9E19 -9ED1 -E000 -E001 -E002 -E003 -E004 -E005 -E006 -E007 -E008 -E009 -E00A -E00B -E00C -E00D -E00E -E00F -E010 -E011 -E012 -E013 -E014 -E015 -E016 -E017 -E018 -E019 -E01A -E01B -E01C -E01D -E01E -E01F -E020 -E021 -E022 -E023 -E024 -E025 -E026 -E027 -E028 -E029 -E02A -E02B -E02C -E02D -E02E -E02F -E030 -E031 -E032 -E033 -E034 -E035 -E036 -E037 -E038 -E039 -E03A -E03B -E03C -E03D -E03E -E03F -E040 -E041 -E042 -E043 -E044 -E045 -E046 -E047 -E048 -E049 -E04A -E04B -E04C -E04D -E04E -E04F -E050 -E051 -E052 -E053 -E054 -E055 -E056 -E057 -E058 -E059 -E05A -E05B -E05C -E05D -E05E -E05F -E060 -E061 -E062 -E063 -E064 -E065 -E066 -E067 -E068 -E069 -E06A -E06B -E06C -E06D -E06E -E06F -E070 -E071 -E072 -E073 -E074 -E075 -E076 -E077 -E078 -E079 -E07A -E07B -E07C -E07D -E07E -E07F -E080 -E081 -E082 -E083 -E084 -E085 -E086 -E087 -E088 -E089 -E08A -E08B -E08C -E08D -E08E -E08F -E090 -E091 -E092 -E093 -E094 -E095 -E096 -E097 -E098 -E099 -E09A -E09B -E09C -E09D -E09E -E09F -E0A0 -E0A1 -E0A2 -E0A3 -E0A4 -E0A5 -E0A6 -E0A7 -E0A8 -E0A9 -E0AA -E0AB -E0AC -E0AD -E0AE -E0AF -E0B0 -E0B1 -E0B2 -E0B3 -E0B4 -E0B5 -E0B6 -E0B7 -E0B8 -E0B9 -E0BA -E0BB -E0BC -E0BD -E0BE -E0BF -E0C0 -E0C1 -E0C2 -E0C3 -E0C4 -E0C5 -E0C6 -E0C7 -E0C8 -E0C9 -E0CA -E0CB -E0CC -E0CD -E0CE -E0CF -E0D0 -E0D1 -E0D2 -E0D3 -E0D4 -E0D5 -E0D6 -E0D7 -E0D8 -E0D9 -E0DA -E0DB -E0DC -E0DD -E0DE -E0DF -E0E0 -E0E1 -E0E2 -E0E3 -E0E4 -E0E5 -E0E6 -E0E7 -E0E8 -E0E9 -E0EA -E0EB -E0EC -E0ED -E0EE -E0EF -E0F0 -E0F1 -E0F2 -E0F3 -E0F4 -E0F5 -E0F6 -E0F7 -E0F8 -E0F9 -E0FA -E0FB -E0FC -E0FD -E0FE -E0FF -E100 -E101 -E102 -E103 -E104 -E105 -E106 -E107 -E108 -E109 -E10A -E10B -E10C -E10D -E10E -E10F -E110 -E111 -E112 -E113 -E114 -E115 -E116 -E117 -E118 -E119 -E11A -E11B -E11C -E11D -E11E -E11F -E120 -E121 -E122 -E123 -E124 -E125 -E126 -E127 -E128 -E129 -E12A -E12B -E12C -E12D -E12E -E12F -E130 -E131 -E132 -E133 -E134 -E135 -E136 -E137 -E138 -E139 -E13A -E13B -E13C -E13D -E13E -E13F -E140 -E141 -E142 -E143 -E144 -E145 -E146 -E147 -E148 -E149 -E14A -E14B -E14C -E14D -E14E -E14F -E150 -E151 -E152 -E153 -E154 -E155 -E156 -E157 -E158 -E159 -E15A -E15B -E15C -E15D -E15E -E15F -E160 -E161 -E162 -E163 -E164 -E165 -E166 -E167 -E168 -E169 -E16A -E16B -E16C -E16D -E16E -E16F -E170 -E171 -E172 -E173 -E174 -E175 -E176 -E177 -E178 -E179 -E17A -E17B -E17C -E17D -E17E -E17F -E180 -E181 -E182 -E183 -E184 -E185 -E186 -E187 -E188 -E189 -E18A -E18B -E18C -E18D -E18E -E18F -E190 -E191 -E192 -E193 -E194 -E195 -E196 -E197 -E198 -E199 -E19A -E19B -E19C -E19D -E19E -E19F -E1A0 -E1A1 -E1A2 -E1A3 -E1A4 -E1A5 -E1A6 -E1A7 -E1A8 -E1A9 -E1AA -E1AB -E1AC -E1AD -E1AE -E1AF -E1B0 -E1B1 -E1B2 -E1B3 -E1B4 -E1B5 -E1B6 -E1B7 -E1B8 -E1B9 -E1BA -E1BB -E1BC -E1BD -E1BE -E1BF -E1C0 -E1C1 -E1C2 -E1C3 -E1C4 -E1C5 -E1C6 -E1C7 -E1C8 -E1C9 -E1CA -E1CB -E1CC -E1CD -E1CE -E1CF -E1D0 -E1D1 -E1D2 -E1D3 -E1D4 -E1D5 -E1D6 -E1D7 -E1D8 -E1D9 -E1DA -E1DB -E1DC -E1DD -E1DE -E1DF -E1E0 -E1E1 -E1E2 -E1E3 -E1E4 -E1E5 -E1E6 -E1E7 -E1E8 -E1E9 -E1EA -E1EB -E1EC -E1ED -E1EE -E1EF -E1F0 -E1F1 -E1F2 -E1F3 -E1F4 -E1F5 -E1F6 -E1F7 -E1F8 -E1F9 -E1FA -E1FB -E1FC -E1FD -E1FE -E1FF -E200 -E201 -E202 -E203 -E204 -E205 -E206 -E207 -E208 -E209 -E20A -E20B -E20C -E20D -E20E -E20F -E210 -E211 -E212 -E213 -E214 -E215 -E216 -E217 -E218 -E219 -E21A -E21B -E21C -E21D -E21E -E21F -E220 -E221 -E222 -E223 -E224 -E225 -E226 -E227 -E228 -E229 -E22A -E22B -E22C -E22D -E22E -E22F -E230 -E231 -E232 -E233 -E234 -E235 -E236 -E237 -E238 -E239 -E23A -E23B -E23C -E23D -E23E -E23F -E240 -E241 -E242 -E243 -E244 -E245 -E246 -E247 -E248 -E249 -E24A -E24B -E24C -E24D -E24E -E24F -E250 -E251 -E252 -E253 -E254 -E255 -E256 -E257 -E258 -E259 -E25A -E25B -E25C -E25D -E25E -E25F -E260 -E261 -E262 -E263 -E264 -E265 -E266 -E267 -E268 -E269 -E26A -E26B -E26C -E26D -E26E -E26F -E270 -E271 -E272 -E273 -E274 -E275 -E276 -E277 -E278 -E279 -E27A -E27B -E27C -E27D -E27E -E27F -E280 -E281 -E282 -E283 -E284 -E285 -E286 -E287 -E288 -E289 -E28A -E28B -E28C -E28D -E28E -E28F -E290 -E291 -E292 -E293 -E294 -E295 -E296 -E297 -E298 -E299 -E29A -E29B -E29C -E29D -E29E -E29F -E2A0 -E2A1 -E2A2 -E2A3 -E2A4 -E2A5 -E2A6 -E2A7 -E2A8 -E2A9 -E2AA -E2AB -E2AC -E2AD -E2AE -E2AF -E2B0 -E2B1 -E2B2 -E2B3 -E2B4 -E2B5 -E2B6 -E2B7 -E2B8 -E2B9 -E2BA -E2BB -E2BC -E2BD -E2BE -E2BF -E2C0 -E2C1 -E2C2 -E2C3 -E2C4 -E2C5 -E2C6 -E2C7 -E2C8 -E2C9 -E2CA -E2CB -E2CC -E2CD -E2CE -E2CF -E2D0 -E2D1 -E2D2 -E2D3 -E2D4 -E2D5 -E2D6 -E2D7 -E2D8 -E2D9 -E2DA -E2DB -E2DC -E2DD -E2DE -E2DF -E2E0 -E2E1 -E2E2 -E2E3 -E2E4 -E2E5 -E2E6 -E2E7 -E2E8 -E2E9 -E2EA -E2EB -E2EC -E2ED -E2EE -E2EF -E2F0 -E2F1 -E2F2 -E2F3 -E2F4 -E2F5 -E2F6 -E2F7 -E2F8 -E2F9 -E2FA -E2FB -E2FC -E2FD -E2FE -E2FF -E300 -E301 -E302 -E303 -E304 -E305 -E306 -E307 -E308 -E309 -E30A -E30B -E30C -E30D -E30E -E30F -E310 -E311 -E312 -E313 -E314 -E315 -E316 -E317 -E318 -E319 -E31A -E31B -E31C -E31D -E31E -E31F -E320 -E321 -E322 -E323 -E324 -E325 -E326 -E327 -E328 -E329 -E32A -E32B -E32C -E32D -E32E -E32F -E330 -E331 -E332 -E333 -E334 -E335 -E336 -E337 -E338 -E339 -E33A -E33B -E33C -E33D -E33E -E33F -E340 -E341 -E342 -E343 -E344 -E345 -E346 -E347 -E348 -E349 -E34A -E34B -E34C -E34D -E34E -E34F -E350 -E351 -E352 -E353 -E354 -E355 -E356 -E357 -E358 -E359 -E35A -E35B -E35C -E35D -E35E -E35F -E360 -E361 -E362 -E363 -E364 -E365 -E366 -E367 -E368 -E369 -E36A -E36B -E36C -E36D -E36E -E36F -E370 -E371 -E372 -E373 -E374 -E375 -E376 -E377 -E378 -E379 -E37A -E37B -E37C -E37D -E37E -E37F -E380 -E381 -E382 -E383 -E384 -E385 -E386 -E387 -E388 -E389 -E38A -E38B -E38C -E38D -E38E -E38F -E390 -E391 -E392 -E393 -E394 -E395 -E396 -E397 -E398 -E399 -E39A -E39B -E39C -E39D -E39E -E39F -E3A0 -E3A1 -E3A2 -E3A3 -E3A4 -E3A5 -E3A6 -E3A7 -E3A8 -E3A9 -E3AA -E3AB -E3AC -E3AD -E3AE -E3AF -E3B0 -E3B1 -E3B2 -E3B3 -E3B4 -E3B5 -E3B6 -E3B7 -E3B8 -E3B9 -E3BA -E3BB -E3BC -E3BD -E3BE -E3BF -E3C0 -E3C1 -E3C2 -E3C3 -E3C4 -E3C5 -E3C6 -E3C7 -E3C8 -E3C9 -E3CA -E3CB -E3CC -E3CD -E3CE -E3CF -E3D0 -E3D1 -E3D2 -E3D3 -E3D4 -E3D5 -E3D6 -E3D7 -E3D8 -E3D9 -E3DA -E3DB -E3DC -E3DD -E3DE -E3DF -E3E0 -E3E1 -E3E2 -E3E3 -E3E4 -E3E5 -E3E6 -E3E7 -E3E8 -E3E9 -E3EA -E3EB -E3EC -E3ED -E3EE -E3EF -E3F0 -E3F1 -E3F2 -E3F3 -E3F4 -E3F5 -E3F6 -E3F7 -E3F8 -E3F9 -E3FA -E3FB -E3FC -E3FD -E3FE -E3FF -E400 -E401 -E402 -E403 -E404 -E405 -E406 -E407 -E408 -E409 -E40A -E40B -E40C -E40D -E40E -E40F -E410 -E411 -E412 -E413 -E414 -E415 -E416 -E417 -E418 -E419 -E41A -E41B -E41C -E41D -E41E -E41F -E420 -E421 -E422 -E423 -E424 -E425 -E426 -E427 -E428 -E429 -E42A -E42B -E42C -E42D -E42E -E42F -E430 -E431 -E432 -E433 -E434 -E435 -E436 -E437 -E438 -E439 -E43A -E43B -E43C -E43D -E43E -E43F -E440 -E441 -E442 -E443 -E444 -E445 -E446 -E447 -E448 -E449 -E44A -E44B -E44C -E44D -E44E -E44F -E450 -E451 -E452 -E453 -E454 -E455 -E456 -E457 -E458 -E459 -E45A -E45B -E45C -E45D -E45E -E45F -E460 -E461 -E462 -E463 -E464 -E465 -E466 -E467 -E468 -E469 -E46A -E46B -E46C -E46D -E46E -E46F -E470 -E471 -E472 -E473 -E474 -E475 -E476 -E477 -E478 -E479 -E47A -E47B -E47C -E47D -E47E -E47F -E480 -E481 -E482 -E483 -E484 -E485 -E486 -E487 -E488 -E489 -E48A -E48B -E48C -E48D -E48E -E48F -E490 -E491 -E492 -E493 -E494 -E495 -E496 -E497 -E498 -E499 -E49A -E49B -E49C -E49D -E49E -E49F -E4A0 -E4A1 -E4A2 -E4A3 -E4A4 -E4A5 -E4A6 -E4A7 -E4A8 -E4A9 -E4AA -E4AB -E4AC -E4AD -E4AE -E4AF -E4B0 -E4B1 -E4B2 -E4B3 -E4B4 -E4B5 -E4B6 -E4B7 -E4B8 -E4B9 -E4BA -E4BB -E4BC -E4BD -E4BE -E4BF -E4C0 -E4C1 -E4C2 -E4C3 -E4C4 -E4C5 -E4C6 -E4C7 -E4C8 -E4C9 -E4CA -E4CB -E4CC -E4CD -E4CE -E4CF -E4D0 -E4D1 -E4D2 -E4D3 -E4D4 -E4D5 -E4D6 -E4D7 -E4D8 -E4D9 -E4DA -E4DB -E4DC -E4DD -E4DE -E4DF -E4E0 -E4E1 -E4E2 -E4E3 -E4E4 -E4E5 -E4E6 -E4E7 -E4E8 -E4E9 -E4EA -E4EB -E4EC -E4ED -E4EE -E4EF -E4F0 -E4F1 -E4F2 -E4F3 -E4F4 -E4F5 -E4F6 -E4F7 -E4F8 -E4F9 -E4FA -E4FB -E4FC -E4FD -E4FE -E4FF -E500 -E501 -E502 -E503 -E504 -E505 -E506 -E507 -E508 -E509 -E50A -E50B -E50C -E50D -E50E -E50F -E510 -E511 -E512 -E513 -E514 -E515 -E516 -E517 -E518 -E519 -E51A -E51B -E51C -E51D -E51E -E51F -E520 -E521 -E522 -E523 -E524 -E525 -E526 -E527 -E528 -E529 -E52A -E52B -E52C -E52D -E52E -E52F -E530 -E531 -E532 -E533 -E534 -E535 -E536 -E537 -E538 -E539 -E53A -E53B -E53C -E53D -E53E -E53F -E540 -E541 -E542 -E543 -E544 -E545 -E546 -E547 -E548 -E549 -E54A -E54B -E54C -E54D -E54E -E54F -E550 -E551 -E552 -E553 -E554 -E555 -E556 -E557 -E558 -E559 -E55A -E55B -E55C -E55D -E55E -E55F -E560 -E561 -E562 -E563 -E564 -E565 -E566 -E567 -E568 -E569 -E56A -E56B -E56C -E56D -E56E -E56F -E570 -E571 -E572 -E573 -E574 -E575 -E576 -E577 -E578 -E579 -E57A -E57B -E57C -E57D -E57E -E57F -E580 -E581 -E582 -E583 -E584 -E585 -E586 -E587 -E588 -E589 -E58A -E58B -E58C -E58D -E58E -E58F -E590 -E591 -E592 -E593 -E594 -E595 -E596 -E597 -E598 -E599 -E59A -E59B -E59C -E59D -E59E -E59F -E5A0 -E5A1 -E5A2 -E5A3 -E5A4 -E5A5 -E5A6 -E5A7 -E5A8 -E5A9 -E5AA -E5AB -E5AC -E5AD -E5AE -E5AF -E5B0 -E5B1 -E5B2 -E5B3 -E5B4 -E5B5 -E5B6 -E5B7 -E5B8 -E5B9 -E5BA -E5BB -E5BC -E5BD -E5BE -E5BF -E5C0 -E5C1 -E5C2 -E5C3 -E5C4 -E5C5 -E5C6 -E5C7 -E5C8 -E5C9 -E5CA -E5CB -E5CC -E5CD -E5CE -E5CF -E5D0 -E5D1 -E5D2 -E5D3 -E5D4 -E5D5 -E5D6 -E5D7 -E5D8 -E5D9 -E5DA -E5DB -E5DC -E5DD -E5DE -E5DF -E5E0 -E5E1 -E5E2 -E5E3 -E5E4 -E5E5 -E5E6 -E5E7 -E5E8 -E5E9 -E5EA -E5EB -E5EC -E5ED -E5EE -E5EF -E5F0 -E5F1 -E5F2 -E5F3 -E5F4 -E5F5 -E5F6 -E5F7 -E5F8 -E5F9 -E5FA -E5FB -E5FC -E5FD -E5FE -E5FF -E600 -E601 -E602 -E603 -E604 -E605 -E606 -E607 -E608 -E609 -E60A -E60B -E60C -E60D -E60E -E60F -E610 -E611 -E612 -E613 -E614 -E615 -E616 -E617 -E618 -E619 -E61A -E61B -E61C -E61D -E61E -E61F -E620 -E621 -E622 -E623 -E624 -E625 -E626 -E627 -E628 -E629 -E62A -E62B -E62C -E62D -E62E -E62F -E630 -E631 -E632 -E633 -E634 -E635 -E636 -E637 -E638 -E639 -E63A -E63B -E63C -E63D -E63E -E63F -E640 -E641 -E642 -E643 -E644 -E645 -E646 -E647 -E648 -E649 -E64A -E64B -E64C -E64D -E64E -E64F -E650 -E651 -E652 -E653 -E654 -E655 -E656 -E657 -E658 -E659 -E65A -E65B -E65C -E65D -E65E -E65F -E660 -E661 -E662 -E663 -E664 -E665 -E666 -E667 -E668 -E669 -E66A -E66B -E66C -E66D -E66E -E66F -E670 -E671 -E672 -E673 -E674 -E675 -E676 -E677 -E678 -E679 -E67A -E67B -E67C -E67D -E67E -E67F -E680 -E681 -E682 -E683 -E684 -E685 -E686 -E687 -E688 -E689 -E68A -E68B -E68C -E68D -E68E -E68F -E690 -E691 -E692 -E693 -E694 -E695 -E696 -E697 -E698 -E699 -E69A -E69B -E69C -E69D -E69E -E69F -E6A0 -E6A1 -E6A2 -E6A3 -E6A4 -E6A5 -E6A6 -E6A7 -E6A8 -E6A9 -E6AA -E6AB -E6AC -E6AD -E6AE -E6AF -E6B0 -E6B1 -E6B2 -E6B3 -E6B4 -E6B5 -E6B6 -E6B7 -E6B8 -E6B9 -E6BA -E6BB -E6BC -E6BD -E6BE -E6BF -E6C0 -E6C1 -E6C2 -E6C3 -E6C4 -E6C5 -E6C6 -E6C7 -E6C8 -E6C9 -E6CA -E6CB -E6CC -E6CD -E6CE -E6CF -E6D0 -E6D1 -E6D2 -E6D3 -E6D4 -E6D5 -E6D6 -E6D7 -E6D8 -E6D9 -E6DA -E6DB -E6DC -E6DD -E6DE -E6DF -E6E0 -E6E1 -E6E2 -E6E3 -E6E4 -E6E5 -E6E6 -E6E7 -E6E8 -E6E9 -E6EA -E6EB -E6EC -E6ED -E6EE -E6EF -E6F0 -E6F1 -E6F2 -E6F3 -E6F4 -E6F5 -E6F6 -E6F7 -E6F8 -E6F9 -E6FA -E6FB -E6FC -E6FD -E6FE -E6FF -E700 -E701 -E702 -E703 -E704 -E705 -E706 -E707 -E708 -E709 -E70A -E70B -E70C -E70D -E70E -E70F -E710 -E711 -E712 -E713 -E714 -E715 -E716 -E717 -E718 -E719 -E71A -E71B -E71C -E71D -E71E -E71F -E720 -E721 -E722 -E723 -E724 -E725 -E726 -E727 -E728 -E729 -E72A -E72B -E72C -E72D -E72E -E72F -E730 -E731 -E732 -E733 -E734 -E735 -E736 -E737 -E738 -E739 -E73A -E73B -E73C -E73D -E73E -E73F -E740 -E741 -E742 -E743 -E744 -E745 -E746 -E747 -E748 -E749 -E74A -E74B -E74C -E74D -E74E -E74F -E750 -E751 -E752 -E753 -E754 -E755 -E756 -E757 -CREATE TABLE t3 SELECT CONVERT(c1 USING cp932) AS c1 FROM t2; -SELECT HEX(c1) FROM t3; -HEX(c1) -05 -7E -815C -815F -8160 -8161 -817C -8191 -8192 -81CA -8740 -8741 -8742 -8743 -8744 -8745 -8746 -8747 -8748 -8749 -874A -874B -874C -874D -874E -874F -8750 -8751 -8752 -8753 -8754 -8755 -8756 -8757 -8758 -8759 -875A -875B -875C -875D -875F -8760 -8761 -8762 -8763 -8764 -8765 -8766 -8767 -8768 -8769 -876A -876B -876C -876D -876E -876F -8770 -8771 -8772 -8773 -8774 -8775 -877E -8780 -8781 -8782 -8783 -8784 -8785 -8786 -8787 -8788 -8789 -878A -878B -878C -878D -878E -878F -81E0 -81DF -81E7 -8793 -8794 -81E3 -81DB -81DA -8798 -8799 -81E6 -81BF -81BE -FA5C -FA5D -FA5E -FA5F -FA60 -FA61 -FA62 -FA63 -FA64 -FA65 -FA66 -FA67 -FA68 -FA69 -FA6A -FA6B -FA6C -FA6D -FA6E -FA6F -FA70 -FA71 -FA72 -FA73 -FA74 -FA75 -FA76 -FA77 -FA78 -FA79 -FA7A -FA7B -FA7C -FA7D -FA7E -FA80 -FA81 -FA82 -FA83 -FA84 -FA85 -FA86 -FA87 -FA88 -FA89 -FA8A -FA8B -FA8C -FA8D -FA8E -FA8F -FA90 -FA91 -FA92 -FA93 -FA94 -FA95 -FA96 -FA97 -FA98 -FA99 -FA9A -FA9B -FA9C -FA9D -FA9E -FA9F -FAA0 -FAA1 -FAA2 -FAA3 -FAA4 -FAA5 -FAA6 -FAA7 -FAA8 -FAA9 -FAAA -FAAB -FAAC -FAAD -FAAE -FAAF -FAB0 -FAB1 -FAB2 -FAB3 -FAB4 -FAB5 -FAB6 -FAB7 -FAB8 -FAB9 -FABA -FABB -FABC -FABD -FABE -FABF -FAC0 -FAC1 -FAC2 -FAC3 -FAC4 -FAC5 -FAC6 -FAC7 -FAC8 -FAC9 -FACA -FACB -FACC -FACD -FACE -FACF -FAD0 -FAD1 -FAD2 -FAD3 -FAD4 -FAD5 -FAD6 -FAD7 -FAD8 -FAD9 -FADA -FADB -FADC -FADD -FADE -FADF -FAE0 -FAE1 -FAE2 -FAE3 -FAE4 -FAE5 -FAE6 -FAE7 -FAE8 -FAE9 -FAEA -FAEB -FAEC -FAED -FAEE -FAEF -FAF0 -FAF1 -FAF2 -FAF3 -FAF4 -FAF5 -FAF6 -FAF7 -FAF8 -FAF9 -FAFA -FAFB -FAFC -FB40 -FB41 -FB42 -FB43 -FB44 -FB45 -FB46 -FB47 -FB48 -FB49 -FB4A -FB4B -FB4C -FB4D -FB4E -FB4F -FB50 -FB51 -FB52 -FB53 -FB54 -FB55 -FB56 -FB57 -FB58 -FB59 -FB5A -FB5B -FB5C -FB5D -FB5E -FB5F -FB60 -FB61 -FB62 -FB63 -FB64 -FB65 -FB66 -FB67 -FB68 -FB69 -FB6A -FB6B -FB6C -FB6D -FB6E -FB6F -FB70 -FB71 -FB72 -FB73 -FB74 -FB75 -FB76 -FB77 -FB78 -FB79 -FB7A -FB7B -FB7C -FB7D -FB7E -FB80 -FB81 -FB82 -FB83 -FB84 -FB85 -FB86 -FB87 -FB88 -FB89 -FB8A -FB8B -FB8C -FB8D -FB8E -FB8F -FB90 -FB91 -FB92 -FB93 -FB94 -FB95 -FB96 -FB97 -FB98 -FB99 -FB9A -FB9B -FB9C -FB9D -FB9E -FB9F -FBA0 -FBA1 -FBA2 -FBA3 -FBA4 -FBA5 -FBA6 -FBA7 -FBA8 -FBA9 -FBAA -FBAB -FBAC -FBAD -FBAE -FBAF -FBB0 -FBB1 -FBB2 -FBB3 -FBB4 -FBB5 -FBB6 -FBB7 -FBB8 -FBB9 -FBBA -FBBB -FBBC -FBBD -FBBE -FBBF -FBC0 -FBC1 -FBC2 -FBC3 -FBC4 -FBC5 -FBC6 -FBC7 -FBC8 -FBC9 -FBCA -FBCB -FBCC -FBCD -FBCE -FBCF -FBD0 -FBD1 -FBD2 -FBD3 -FBD4 -FBD5 -FBD6 -FBD7 -FBD8 -FBD9 -FBDA -FBDB -FBDC -FBDD -FBDE -FBDF -FBE0 -FBE1 -FBE2 -FBE3 -FBE4 -FBE5 -FBE6 -FBE7 -FBE8 -FBE9 -FBEA -FBEB -FBEC -FBED -FBEE -FBEF -FBF0 -FBF1 -FBF2 -FBF3 -FBF4 -FBF5 -FBF6 -FBF7 -FBF8 -FBF9 -FBFA -FBFB -FBFC -FC40 -FC41 -FC42 -FC43 -FC44 -FC45 -FC46 -FC47 -FC48 -FC49 -FC4A -FC4B -FA40 -FA41 -FA42 -FA43 -FA44 -FA45 -FA46 -FA47 -FA48 -FA49 -81CA -FA55 -FA56 -FA57 -FA40 -FA41 -FA42 -FA43 -FA44 -FA45 -FA46 -FA47 -FA48 -FA49 -8754 -8755 -8756 -8757 -8758 -8759 -875A -875B -875C -875D -81CA -FA55 -FA56 -FA57 -878A -8782 -8784 -81E6 -FA5C -FA5D -FA5E -FA5F -FA60 -FA61 -FA62 -FA63 -FA64 -FA65 -FA66 -FA67 -FA68 -FA69 -FA6A -FA6B -FA6C -FA6D -FA6E -FA6F -FA70 -FA71 -FA72 -FA73 -FA74 -FA75 -FA76 -FA77 -FA78 -FA79 -FA7A -FA7B -FA7C -FA7D -FA7E -FA80 -FA81 -FA82 -FA83 -FA84 -FA85 -FA86 -FA87 -FA88 -FA89 -FA8A -FA8B -FA8C -FA8D -FA8E -FA8F -FA90 -FA91 -FA92 -FA93 -FA94 -FA95 -FA96 -FA97 -FA98 -FA99 -FA9A -FA9B -FA9C -FA9D -FA9E -FA9F -FAA0 -FAA1 -FAA2 -FAA3 -FAA4 -FAA5 -FAA6 -FAA7 -FAA8 -FAA9 -FAAA -FAAB -FAAC -FAAD -FAAE -FAAF -FAB0 -FAB1 -FAB2 -FAB3 -FAB4 -FAB5 -FAB6 -FAB7 -FAB8 -FAB9 -FABA -FABB -FABC -FABD -FABE -FABF -FAC0 -FAC1 -FAC2 -FAC3 -FAC4 -FAC5 -FAC6 -FAC7 -FAC8 -FAC9 -FACA -FACB -FACC -FACD -FACE -FACF -FAD0 -FAD1 -FAD2 -FAD3 -FAD4 -FAD5 -FAD6 -FAD7 -FAD8 -FAD9 -FADA -FADB -FADC -FADD -FADE -FADF -FAE0 -FAE1 -FAE2 -FAE3 -FAE4 -FAE5 -FAE6 -FAE7 -FAE8 -FAE9 -FAEA -FAEB -FAEC -FAED -FAEE -FAEF -FAF0 -FAF1 -FAF2 -FAF3 -FAF4 -FAF5 -FAF6 -FAF7 -FAF8 -FAF9 -FAFA -FAFB -FAFC -FB40 -FB41 -FB42 -FB43 -FB44 -FB45 -FB46 -FB47 -FB48 -FB49 -FB4A -FB4B -FB4C -FB4D -FB4E -FB4F -FB50 -FB51 -FB52 -FB53 -FB54 -FB55 -FB56 -FB57 -FB58 -FB59 -FB5A -FB5B -FB5C -FB5D -FB5E -FB5F -FB60 -FB61 -FB62 -FB63 -FB64 -FB65 -FB66 -FB67 -FB68 -FB69 -FB6A -FB6B -FB6C -FB6D -FB6E -FB6F -FB70 -FB71 -FB72 -FB73 -FB74 -FB75 -FB76 -FB77 -FB78 -FB79 -FB7A -FB7B -FB7C -FB7D -FB7E -FB80 -FB81 -FB82 -FB83 -FB84 -FB85 -FB86 -FB87 -FB88 -FB89 -FB8A -FB8B -FB8C -FB8D -FB8E -FB8F -FB90 -FB91 -FB92 -FB93 -FB94 -FB95 -FB96 -FB97 -FB98 -FB99 -FB9A -FB9B -FB9C -FB9D -FB9E -FB9F -FBA0 -FBA1 -FBA2 -FBA3 -FBA4 -FBA5 -FBA6 -FBA7 -FBA8 -FBA9 -FBAA -FBAB -FBAC -FBAD -FBAE -FBAF -FBB0 -FBB1 -FBB2 -FBB3 -FBB4 -FBB5 -FBB6 -FBB7 -FBB8 -FBB9 -FBBA -FBBB -FBBC -FBBD -FBBE -FBBF -FBC0 -FBC1 -FBC2 -FBC3 -FBC4 -FBC5 -FBC6 -FBC7 -FBC8 -FBC9 -FBCA -FBCB -FBCC -FBCD -FBCE -FBCF -FBD0 -FBD1 -FBD2 -FBD3 -FBD4 -FBD5 -FBD6 -FBD7 -FBD8 -FBD9 -FBDA -FBDB -FBDC -FBDD -FBDE -FBDF -FBE0 -FBE1 -FBE2 -FBE3 -FBE4 -FBE5 -FBE6 -FBE7 -FBE8 -FBE9 -FBEA -FBEB -FBEC -FBED -FBEE -FBEF -FBF0 -FBF1 -FBF2 -FBF3 -FBF4 -FBF5 -FBF6 -FBF7 -FBF8 -FBF9 -FBFA -FBFB -FBFC -FC40 -FC41 -FC42 -FC43 -FC44 -FC45 -FC46 -FC47 -FC48 -FC49 -FC4A -FC4B -F040 -F041 -F042 -F043 -F044 -F045 -F046 -F047 -F048 -F049 -F04A -F04B -F04C -F04D -F04E -F04F -F050 -F051 -F052 -F053 -F054 -F055 -F056 -F057 -F058 -F059 -F05A -F05B -F05C -F05D -F05E -F05F -F060 -F061 -F062 -F063 -F064 -F065 -F066 -F067 -F068 -F069 -F06A -F06B -F06C -F06D -F06E -F06F -F070 -F071 -F072 -F073 -F074 -F075 -F076 -F077 -F078 -F079 -F07A -F07B -F07C -F07D -F07E -F080 -F081 -F082 -F083 -F084 -F085 -F086 -F087 -F088 -F089 -F08A -F08B -F08C -F08D -F08E -F08F -F090 -F091 -F092 -F093 -F094 -F095 -F096 -F097 -F098 -F099 -F09A -F09B -F09C -F09D -F09E -F09F -F0A0 -F0A1 -F0A2 -F0A3 -F0A4 -F0A5 -F0A6 -F0A7 -F0A8 -F0A9 -F0AA -F0AB -F0AC -F0AD -F0AE -F0AF -F0B0 -F0B1 -F0B2 -F0B3 -F0B4 -F0B5 -F0B6 -F0B7 -F0B8 -F0B9 -F0BA -F0BB -F0BC -F0BD -F0BE -F0BF -F0C0 -F0C1 -F0C2 -F0C3 -F0C4 -F0C5 -F0C6 -F0C7 -F0C8 -F0C9 -F0CA -F0CB -F0CC -F0CD -F0CE -F0CF -F0D0 -F0D1 -F0D2 -F0D3 -F0D4 -F0D5 -F0D6 -F0D7 -F0D8 -F0D9 -F0DA -F0DB -F0DC -F0DD -F0DE -F0DF -F0E0 -F0E1 -F0E2 -F0E3 -F0E4 -F0E5 -F0E6 -F0E7 -F0E8 -F0E9 -F0EA -F0EB -F0EC -F0ED -F0EE -F0EF -F0F0 -F0F1 -F0F2 -F0F3 -F0F4 -F0F5 -F0F6 -F0F7 -F0F8 -F0F9 -F0FA -F0FB -F0FC -F140 -F141 -F142 -F143 -F144 -F145 -F146 -F147 -F148 -F149 -F14A -F14B -F14C -F14D -F14E -F14F -F150 -F151 -F152 -F153 -F154 -F155 -F156 -F157 -F158 -F159 -F15A -F15B -F15C -F15D -F15E -F15F -F160 -F161 -F162 -F163 -F164 -F165 -F166 -F167 -F168 -F169 -F16A -F16B -F16C -F16D -F16E -F16F -F170 -F171 -F172 -F173 -F174 -F175 -F176 -F177 -F178 -F179 -F17A -F17B -F17C -F17D -F17E -F180 -F181 -F182 -F183 -F184 -F185 -F186 -F187 -F188 -F189 -F18A -F18B -F18C -F18D -F18E -F18F -F190 -F191 -F192 -F193 -F194 -F195 -F196 -F197 -F198 -F199 -F19A -F19B -F19C -F19D -F19E -F19F -F1A0 -F1A1 -F1A2 -F1A3 -F1A4 -F1A5 -F1A6 -F1A7 -F1A8 -F1A9 -F1AA -F1AB -F1AC -F1AD -F1AE -F1AF -F1B0 -F1B1 -F1B2 -F1B3 -F1B4 -F1B5 -F1B6 -F1B7 -F1B8 -F1B9 -F1BA -F1BB -F1BC -F1BD -F1BE -F1BF -F1C0 -F1C1 -F1C2 -F1C3 -F1C4 -F1C5 -F1C6 -F1C7 -F1C8 -F1C9 -F1CA -F1CB -F1CC -F1CD -F1CE -F1CF -F1D0 -F1D1 -F1D2 -F1D3 -F1D4 -F1D5 -F1D6 -F1D7 -F1D8 -F1D9 -F1DA -F1DB -F1DC -F1DD -F1DE -F1DF -F1E0 -F1E1 -F1E2 -F1E3 -F1E4 -F1E5 -F1E6 -F1E7 -F1E8 -F1E9 -F1EA -F1EB -F1EC -F1ED -F1EE -F1EF -F1F0 -F1F1 -F1F2 -F1F3 -F1F4 -F1F5 -F1F6 -F1F7 -F1F8 -F1F9 -F1FA -F1FB -F1FC -F240 -F241 -F242 -F243 -F244 -F245 -F246 -F247 -F248 -F249 -F24A -F24B -F24C -F24D -F24E -F24F -F250 -F251 -F252 -F253 -F254 -F255 -F256 -F257 -F258 -F259 -F25A -F25B -F25C -F25D -F25E -F25F -F260 -F261 -F262 -F263 -F264 -F265 -F266 -F267 -F268 -F269 -F26A -F26B -F26C -F26D -F26E -F26F -F270 -F271 -F272 -F273 -F274 -F275 -F276 -F277 -F278 -F279 -F27A -F27B -F27C -F27D -F27E -F280 -F281 -F282 -F283 -F284 -F285 -F286 -F287 -F288 -F289 -F28A -F28B -F28C -F28D -F28E -F28F -F290 -F291 -F292 -F293 -F294 -F295 -F296 -F297 -F298 -F299 -F29A -F29B -F29C -F29D -F29E -F29F -F2A0 -F2A1 -F2A2 -F2A3 -F2A4 -F2A5 -F2A6 -F2A7 -F2A8 -F2A9 -F2AA -F2AB -F2AC -F2AD -F2AE -F2AF -F2B0 -F2B1 -F2B2 -F2B3 -F2B4 -F2B5 -F2B6 -F2B7 -F2B8 -F2B9 -F2BA -F2BB -F2BC -F2BD -F2BE -F2BF -F2C0 -F2C1 -F2C2 -F2C3 -F2C4 -F2C5 -F2C6 -F2C7 -F2C8 -F2C9 -F2CA -F2CB -F2CC -F2CD -F2CE -F2CF -F2D0 -F2D1 -F2D2 -F2D3 -F2D4 -F2D5 -F2D6 -F2D7 -F2D8 -F2D9 -F2DA -F2DB -F2DC -F2DD -F2DE -F2DF -F2E0 -F2E1 -F2E2 -F2E3 -F2E4 -F2E5 -F2E6 -F2E7 -F2E8 -F2E9 -F2EA -F2EB -F2EC -F2ED -F2EE -F2EF -F2F0 -F2F1 -F2F2 -F2F3 -F2F4 -F2F5 -F2F6 -F2F7 -F2F8 -F2F9 -F2FA -F2FB -F2FC -F340 -F341 -F342 -F343 -F344 -F345 -F346 -F347 -F348 -F349 -F34A -F34B -F34C -F34D -F34E -F34F -F350 -F351 -F352 -F353 -F354 -F355 -F356 -F357 -F358 -F359 -F35A -F35B -F35C -F35D -F35E -F35F -F360 -F361 -F362 -F363 -F364 -F365 -F366 -F367 -F368 -F369 -F36A -F36B -F36C -F36D -F36E -F36F -F370 -F371 -F372 -F373 -F374 -F375 -F376 -F377 -F378 -F379 -F37A -F37B -F37C -F37D -F37E -F380 -F381 -F382 -F383 -F384 -F385 -F386 -F387 -F388 -F389 -F38A -F38B -F38C -F38D -F38E -F38F -F390 -F391 -F392 -F393 -F394 -F395 -F396 -F397 -F398 -F399 -F39A -F39B -F39C -F39D -F39E -F39F -F3A0 -F3A1 -F3A2 -F3A3 -F3A4 -F3A5 -F3A6 -F3A7 -F3A8 -F3A9 -F3AA -F3AB -F3AC -F3AD -F3AE -F3AF -F3B0 -F3B1 -F3B2 -F3B3 -F3B4 -F3B5 -F3B6 -F3B7 -F3B8 -F3B9 -F3BA -F3BB -F3BC -F3BD -F3BE -F3BF -F3C0 -F3C1 -F3C2 -F3C3 -F3C4 -F3C5 -F3C6 -F3C7 -F3C8 -F3C9 -F3CA -F3CB -F3CC -F3CD -F3CE -F3CF -F3D0 -F3D1 -F3D2 -F3D3 -F3D4 -F3D5 -F3D6 -F3D7 -F3D8 -F3D9 -F3DA -F3DB -F3DC -F3DD -F3DE -F3DF -F3E0 -F3E1 -F3E2 -F3E3 -F3E4 -F3E5 -F3E6 -F3E7 -F3E8 -F3E9 -F3EA -F3EB -F3EC -F3ED -F3EE -F3EF -F3F0 -F3F1 -F3F2 -F3F3 -F3F4 -F3F5 -F3F6 -F3F7 -F3F8 -F3F9 -F3FA -F3FB -F3FC -F440 -F441 -F442 -F443 -F444 -F445 -F446 -F447 -F448 -F449 -F44A -F44B -F44C -F44D -F44E -F44F -F450 -F451 -F452 -F453 -F454 -F455 -F456 -F457 -F458 -F459 -F45A -F45B -F45C -F45D -F45E -F45F -F460 -F461 -F462 -F463 -F464 -F465 -F466 -F467 -F468 -F469 -F46A -F46B -F46C -F46D -F46E -F46F -F470 -F471 -F472 -F473 -F474 -F475 -F476 -F477 -F478 -F479 -F47A -F47B -F47C -F47D -F47E -F480 -F481 -F482 -F483 -F484 -F485 -F486 -F487 -F488 -F489 -F48A -F48B -F48C -F48D -F48E -F48F -F490 -F491 -F492 -F493 -F494 -F495 -F496 -F497 -F498 -F499 -F49A -F49B -F49C -F49D -F49E -F49F -F4A0 -F4A1 -F4A2 -F4A3 -F4A4 -F4A5 -F4A6 -F4A7 -F4A8 -F4A9 -F4AA -F4AB -F4AC -F4AD -F4AE -F4AF -F4B0 -F4B1 -F4B2 -F4B3 -F4B4 -F4B5 -F4B6 -F4B7 -F4B8 -F4B9 -F4BA -F4BB -F4BC -F4BD -F4BE -F4BF -F4C0 -F4C1 -F4C2 -F4C3 -F4C4 -F4C5 -F4C6 -F4C7 -F4C8 -F4C9 -F4CA -F4CB -F4CC -F4CD -F4CE -F4CF -F4D0 -F4D1 -F4D2 -F4D3 -F4D4 -F4D5 -F4D6 -F4D7 -F4D8 -F4D9 -F4DA -F4DB -F4DC -F4DD -F4DE -F4DF -F4E0 -F4E1 -F4E2 -F4E3 -F4E4 -F4E5 -F4E6 -F4E7 -F4E8 -F4E9 -F4EA -F4EB -F4EC -F4ED -F4EE -F4EF -F4F0 -F4F1 -F4F2 -F4F3 -F4F4 -F4F5 -F4F6 -F4F7 -F4F8 -F4F9 -F4FA -F4FB -F4FC -F540 -F541 -F542 -F543 -F544 -F545 -F546 -F547 -F548 -F549 -F54A -F54B -F54C -F54D -F54E -F54F -F550 -F551 -F552 -F553 -F554 -F555 -F556 -F557 -F558 -F559 -F55A -F55B -F55C -F55D -F55E -F55F -F560 -F561 -F562 -F563 -F564 -F565 -F566 -F567 -F568 -F569 -F56A -F56B -F56C -F56D -F56E -F56F -F570 -F571 -F572 -F573 -F574 -F575 -F576 -F577 -F578 -F579 -F57A -F57B -F57C -F57D -F57E -F580 -F581 -F582 -F583 -F584 -F585 -F586 -F587 -F588 -F589 -F58A -F58B -F58C -F58D -F58E -F58F -F590 -F591 -F592 -F593 -F594 -F595 -F596 -F597 -F598 -F599 -F59A -F59B -F59C -F59D -F59E -F59F -F5A0 -F5A1 -F5A2 -F5A3 -F5A4 -F5A5 -F5A6 -F5A7 -F5A8 -F5A9 -F5AA -F5AB -F5AC -F5AD -F5AE -F5AF -F5B0 -F5B1 -F5B2 -F5B3 -F5B4 -F5B5 -F5B6 -F5B7 -F5B8 -F5B9 -F5BA -F5BB -F5BC -F5BD -F5BE -F5BF -F5C0 -F5C1 -F5C2 -F5C3 -F5C4 -F5C5 -F5C6 -F5C7 -F5C8 -F5C9 -F5CA -F5CB -F5CC -F5CD -F5CE -F5CF -F5D0 -F5D1 -F5D2 -F5D3 -F5D4 -F5D5 -F5D6 -F5D7 -F5D8 -F5D9 -F5DA -F5DB -F5DC -F5DD -F5DE -F5DF -F5E0 -F5E1 -F5E2 -F5E3 -F5E4 -F5E5 -F5E6 -F5E7 -F5E8 -F5E9 -F5EA -F5EB -F5EC -F5ED -F5EE -F5EF -F5F0 -F5F1 -F5F2 -F5F3 -F5F4 -F5F5 -F5F6 -F5F7 -F5F8 -F5F9 -F5FA -F5FB -F5FC -F640 -F641 -F642 -F643 -F644 -F645 -F646 -F647 -F648 -F649 -F64A -F64B -F64C -F64D -F64E -F64F -F650 -F651 -F652 -F653 -F654 -F655 -F656 -F657 -F658 -F659 -F65A -F65B -F65C -F65D -F65E -F65F -F660 -F661 -F662 -F663 -F664 -F665 -F666 -F667 -F668 -F669 -F66A -F66B -F66C -F66D -F66E -F66F -F670 -F671 -F672 -F673 -F674 -F675 -F676 -F677 -F678 -F679 -F67A -F67B -F67C -F67D -F67E -F680 -F681 -F682 -F683 -F684 -F685 -F686 -F687 -F688 -F689 -F68A -F68B -F68C -F68D -F68E -F68F -F690 -F691 -F692 -F693 -F694 -F695 -F696 -F697 -F698 -F699 -F69A -F69B -F69C -F69D -F69E -F69F -F6A0 -F6A1 -F6A2 -F6A3 -F6A4 -F6A5 -F6A6 -F6A7 -F6A8 -F6A9 -F6AA -F6AB -F6AC -F6AD -F6AE -F6AF -F6B0 -F6B1 -F6B2 -F6B3 -F6B4 -F6B5 -F6B6 -F6B7 -F6B8 -F6B9 -F6BA -F6BB -F6BC -F6BD -F6BE -F6BF -F6C0 -F6C1 -F6C2 -F6C3 -F6C4 -F6C5 -F6C6 -F6C7 -F6C8 -F6C9 -F6CA -F6CB -F6CC -F6CD -F6CE -F6CF -F6D0 -F6D1 -F6D2 -F6D3 -F6D4 -F6D5 -F6D6 -F6D7 -F6D8 -F6D9 -F6DA -F6DB -F6DC -F6DD -F6DE -F6DF -F6E0 -F6E1 -F6E2 -F6E3 -F6E4 -F6E5 -F6E6 -F6E7 -F6E8 -F6E9 -F6EA -F6EB -F6EC -F6ED -F6EE -F6EF -F6F0 -F6F1 -F6F2 -F6F3 -F6F4 -F6F5 -F6F6 -F6F7 -F6F8 -F6F9 -F6FA -F6FB -F6FC -F740 -F741 -F742 -F743 -F744 -F745 -F746 -F747 -F748 -F749 -F74A -F74B -F74C -F74D -F74E -F74F -F750 -F751 -F752 -F753 -F754 -F755 -F756 -F757 -F758 -F759 -F75A -F75B -F75C -F75D -F75E -F75F -F760 -F761 -F762 -F763 -F764 -F765 -F766 -F767 -F768 -F769 -F76A -F76B -F76C -F76D -F76E -F76F -F770 -F771 -F772 -F773 -F774 -F775 -F776 -F777 -F778 -F779 -F77A -F77B -F77C -F77D -F77E -F780 -F781 -F782 -F783 -F784 -F785 -F786 -F787 -F788 -F789 -F78A -F78B -F78C -F78D -F78E -F78F -F790 -F791 -F792 -F793 -F794 -F795 -F796 -F797 -F798 -F799 -F79A -F79B -F79C -F79D -F79E -F79F -F7A0 -F7A1 -F7A2 -F7A3 -F7A4 -F7A5 -F7A6 -F7A7 -F7A8 -F7A9 -F7AA -F7AB -F7AC -F7AD -F7AE -F7AF -F7B0 -F7B1 -F7B2 -F7B3 -F7B4 -F7B5 -F7B6 -F7B7 -F7B8 -F7B9 -F7BA -F7BB -F7BC -F7BD -F7BE -F7BF -F7C0 -F7C1 -F7C2 -F7C3 -F7C4 -F7C5 -F7C6 -F7C7 -F7C8 -F7C9 -F7CA -F7CB -F7CC -F7CD -F7CE -F7CF -F7D0 -F7D1 -F7D2 -F7D3 -F7D4 -F7D5 -F7D6 -F7D7 -F7D8 -F7D9 -F7DA -F7DB -F7DC -F7DD -F7DE -F7DF -F7E0 -F7E1 -F7E2 -F7E3 -F7E4 -F7E5 -F7E6 -F7E7 -F7E8 -F7E9 -F7EA -F7EB -F7EC -F7ED -F7EE -F7EF -F7F0 -F7F1 -F7F2 -F7F3 -F7F4 -F7F5 -F7F6 -F7F7 -F7F8 -F7F9 -F7FA -F7FB -F7FC -F840 -F841 -F842 -F843 -F844 -F845 -F846 -F847 -F848 -F849 -F84A -F84B -F84C -F84D -F84E -F84F -F850 -F851 -F852 -F853 -F854 -F855 -F856 -F857 -F858 -F859 -F85A -F85B -F85C -F85D -F85E -F85F -F860 -F861 -F862 -F863 -F864 -F865 -F866 -F867 -F868 -F869 -F86A -F86B -F86C -F86D -F86E -F86F -F870 -F871 -F872 -F873 -F874 -F875 -F876 -F877 -F878 -F879 -F87A -F87B -F87C -F87D -F87E -F880 -F881 -F882 -F883 -F884 -F885 -F886 -F887 -F888 -F889 -F88A -F88B -F88C -F88D -F88E -F88F -F890 -F891 -F892 -F893 -F894 -F895 -F896 -F897 -F898 -F899 -F89A -F89B -F89C -F89D -F89E -F89F -F8A0 -F8A1 -F8A2 -F8A3 -F8A4 -F8A5 -F8A6 -F8A7 -F8A8 -F8A9 -F8AA -F8AB -F8AC -F8AD -F8AE -F8AF -F8B0 -F8B1 -F8B2 -F8B3 -F8B4 -F8B5 -F8B6 -F8B7 -F8B8 -F8B9 -F8BA -F8BB -F8BC -F8BD -F8BE -F8BF -F8C0 -F8C1 -F8C2 -F8C3 -F8C4 -F8C5 -F8C6 -F8C7 -F8C8 -F8C9 -F8CA -F8CB -F8CC -F8CD -F8CE -F8CF -F8D0 -F8D1 -F8D2 -F8D3 -F8D4 -F8D5 -F8D6 -F8D7 -F8D8 -F8D9 -F8DA -F8DB -F8DC -F8DD -F8DE -F8DF -F8E0 -F8E1 -F8E2 -F8E3 -F8E4 -F8E5 -F8E6 -F8E7 -F8E8 -F8E9 -F8EA -F8EB -F8EC -F8ED -F8EE -F8EF -F8F0 -F8F1 -F8F2 -F8F3 -F8F4 -F8F5 -F8F6 -F8F7 -F8F8 -F8F9 -F8FA -F8FB -F8FC -F940 -F941 -F942 -F943 -F944 -F945 -F946 -F947 -F948 -F949 -F94A -F94B -F94C -F94D -F94E -F94F -F950 -F951 -F952 -F953 -F954 -F955 -F956 -F957 -F958 -F959 -F95A -F95B -F95C -F95D -F95E -F95F -F960 -F961 -F962 -F963 -F964 -F965 -F966 -F967 -F968 -F969 -F96A -F96B -F96C -F96D -F96E -F96F -F970 -F971 -F972 -F973 -F974 -F975 -F976 -F977 -F978 -F979 -F97A -F97B -F97C -F97D -F97E -F980 -F981 -F982 -F983 -F984 -F985 -F986 -F987 -F988 -F989 -F98A -F98B -F98C -F98D -F98E -F98F -F990 -F991 -F992 -F993 -F994 -F995 -F996 -F997 -F998 -F999 -F99A -F99B -F99C -F99D -F99E -F99F -F9A0 -F9A1 -F9A2 -F9A3 -F9A4 -F9A5 -F9A6 -F9A7 -F9A8 -F9A9 -F9AA -F9AB -F9AC -F9AD -F9AE -F9AF -F9B0 -F9B1 -F9B2 -F9B3 -F9B4 -F9B5 -F9B6 -F9B7 -F9B8 -F9B9 -F9BA -F9BB -F9BC -F9BD -F9BE -F9BF -F9C0 -F9C1 -F9C2 -F9C3 -F9C4 -F9C5 -F9C6 -F9C7 -F9C8 -F9C9 -F9CA -F9CB -F9CC -F9CD -F9CE -F9CF -F9D0 -F9D1 -F9D2 -F9D3 -F9D4 -F9D5 -F9D6 -F9D7 -F9D8 -F9D9 -F9DA -F9DB -F9DC -F9DD -F9DE -F9DF -F9E0 -F9E1 -F9E2 -F9E3 -F9E4 -F9E5 -F9E6 -F9E7 -F9E8 -F9E9 -F9EA -F9EB -F9EC -F9ED -F9EE -F9EF -F9F0 -F9F1 -F9F2 -F9F3 -F9F4 -F9F5 -F9F6 -F9F7 -F9F8 -F9F9 -F9FA -F9FB -F9FC -CREATE TABLE t4 SELECT CONVERT(c1 USING eucjpms) AS c1 FROM t1; -SELECT HEX(c1) FROM t4; -HEX(c1) -05 -7E -A1BD -A1C0 -A1C1 -A1C2 -A1DD -A1F1 -A1F2 -A2CC -ADA1 -ADA2 -ADA3 -ADA4 -ADA5 -ADA6 -ADA7 -ADA8 -ADA9 -ADAA -ADAB -ADAC -ADAD -ADAE -ADAF -ADB0 -ADB1 -ADB2 -ADB3 -ADB4 -ADB5 -ADB6 -ADB7 -ADB8 -ADB9 -ADBA -ADBB -ADBC -ADBD -ADBE -ADC0 -ADC1 -ADC2 -ADC3 -ADC4 -ADC5 -ADC6 -ADC7 -ADC8 -ADC9 -ADCA -ADCB -ADCC -ADCD -ADCE -ADCF -ADD0 -ADD1 -ADD2 -ADD3 -ADD4 -ADD5 -ADD6 -ADDF -ADE0 -ADE1 -ADE2 -ADE3 -ADE4 -ADE5 -ADE6 -ADE7 -ADE8 -ADE9 -ADEA -ADEB -ADEC -ADED -ADEE -ADEF -A2E2 -A2E1 -A2E9 -ADF3 -ADF4 -A2E5 -A2DD -A2DC -ADF8 -ADF9 -A2E8 -A2C1 -A2C0 -8FD4E3 -8FDCDF -8FE4E9 -8FE3F8 -8FD9A1 -8FB1BB -8FF4AE -8FC2AD -8FC3FC -8FE4D0 -8FC2BF -8FBCF4 -8FB0A9 -8FB0C8 -8FF4AF -8FB0D2 -8FB0D4 -8FB0E3 -8FB0EE -8FB1A7 -8FB1A3 -8FB1AC -8FB1A9 -8FB1BE -8FB1DF -8FB1D8 -8FB1C8 -8FB1D7 -8FB1E3 -8FB1F4 -8FB1E1 -8FB2A3 -8FF4B0 -8FB2BB -8FB2E6 -8FB2ED -8FB2F5 -8FB2FC -8FF4B1 -8FB3B5 -8FB3D8 -8FB3DB -8FB3E5 -8FB3EE -8FB3FB -8FF4B2 -8FF4B3 -8FB4C0 -8FB4C7 -8FB4D0 -8FB4DE -8FF4B4 -8FB5AA -8FF4B5 -8FB5AF -8FB5C4 -8FB5E8 -8FF4B6 -8FB7C2 -8FB7E4 -8FB7E8 -8FB7E7 -8FF4B7 -8FF4B8 -8FF4B9 -8FB8CE -8FB8E1 -8FB8F5 -8FB8F7 -8FB8F8 -8FB8FC -8FB9AF -8FB9B7 -8FBABE -8FBADB -8FCDAA -8FBAE1 -8FF4BA -8FBAEB -8FBBB3 -8FBBB8 -8FF4BB -8FBBCA -8FF4BC -8FF4BD -8FBBD0 -8FBBDE -8FBBF4 -8FBBF5 -8FBBF9 -8FBCE4 -8FBCED -8FBCFE -8FF4BE -8FBDC2 -8FBDE7 -8FF4BF -8FBDF0 -8FBEB0 -8FBEAC -8FF4C0 -8FBEB3 -8FBEBD -8FBECD -8FBEC9 -8FBEE4 -8FBFA8 -8FBFC9 -8FC0C4 -8FC0E4 -8FC0F4 -8FC1A6 -8FF4C1 -8FC1F5 -8FC1FC -8FF4C2 -8FC1F8 -8FC2AB -8FC2A1 -8FC2A5 -8FF4C3 -8FC2B8 -8FC2BA -8FF4C4 -8FC2C4 -8FC2D2 -8FC2D7 -8FC2DB -8FC2DE -8FC2ED -8FC2F0 -8FF4C5 -8FC3A1 -8FC3B5 -8FC3C9 -8FC3B9 -8FF4C6 -8FC3D8 -8FC3FE -8FF4C7 -8FC4CC -8FF4C8 -8FC4D9 -8FC4EA -8FC4FD -8FF4C9 -8FC5A7 -8FC5B5 -8FC5B6 -8FF4CA -8FC5D5 -8FC6B8 -8FC6D7 -8FC6E0 -8FC6EA -8FC6E3 -8FC7A1 -8FC7AB -8FC7C7 -8FC7C3 -8FC7CB -8FC7CF -8FC7D9 -8FF4CB -8FF4CC -8FC7E6 -8FC7EE -8FC7FC -8FC7EB -8FC7F0 -8FC8B1 -8FC8E5 -8FC8F8 -8FC9A6 -8FC9AB -8FC9AD -8FF4CD -8FC9CA -8FC9D3 -8FC9E9 -8FC9E3 -8FC9FC -8FC9F4 -8FC9F5 -8FF4CE -8FCAB3 -8FCABD -8FCAEF -8FCAF1 -8FCBAE -8FF4CF -8FCBCA -8FCBE6 -8FCBEA -8FCBF0 -8FCBF4 -8FCBEE -8FCCA5 -8FCBF9 -8FCCAB -8FCCAE -8FCCAD -8FCCB2 -8FCCC2 -8FCCD0 -8FCCD9 -8FF4D0 -8FCDBB -8FF4D1 -8FCEBB -8FF4D2 -8FCEBA -8FCEC3 -8FF4D3 -8FCEF2 -8FB3DD -8FCFD5 -8FCFE2 -8FCFE9 -8FCFED -8FF4D4 -8FF4D5 -8FF4D6 -8FF4D7 -8FD0E5 -8FF4D8 -8FD0E9 -8FD1E8 -8FF4D9 -8FF4DA -8FD1EC -8FD2BB -8FF4DB -8FD3E1 -8FD3E8 -8FD4A7 -8FF4DC -8FF4DD -8FD4D4 -8FD4F2 -8FD5AE -8FF4DE -8FD7DE -8FF4DF -8FD8A2 -8FD8B7 -8FD8C1 -8FD8D1 -8FD8F4 -8FD9C6 -8FD9C8 -8FD9D1 -8FF4E0 -8FF4E1 -8FF4E2 -8FF4E3 -8FF4E4 -8FDCD3 -8FDDC8 -8FDDD4 -8FDDEA -8FDDFA -8FDEA4 -8FDEB0 -8FF4E5 -8FDEB5 -8FDECB -8FF4E6 -8FDFB9 -8FF4E7 -8FDFC3 -8FF4E8 -8FF4E9 -8FE0D9 -8FF4EA -8FF4EB -8FE1E2 -8FF4EC -8FF4ED -8FF4EE -8FE2C7 -8FE3A8 -8FE3A6 -8FE3A9 -8FE3AF -8FE3B0 -8FE3AA -8FE3AB -8FE3BC -8FE3C1 -8FE3BF -8FE3D5 -8FE3D8 -8FE3D6 -8FE3DF -8FE3E3 -8FE3E1 -8FE3D4 -8FE3E9 -8FE4A6 -8FE3F1 -8FE3F2 -8FE4CB -8FE4C1 -8FE4C3 -8FE4BE -8FF4EF -8FE4C0 -8FE4C7 -8FE4BF -8FE4E0 -8FE4DE -8FE4D1 -8FF4F0 -8FE4DC -8FE4D2 -8FE4DB -8FE4D4 -8FE4FA -8FE4EF -8FE5B3 -8FE5BF -8FE5C9 -8FE5D0 -8FE5E2 -8FE5EA -8FE5EB -8FF4F1 -8FF4F2 -8FF4F3 -8FE6E8 -8FE6EF -8FE7AC -8FF4F4 -8FE7AE -8FF4F5 -8FE7B1 -8FF4F6 -8FE7B2 -8FE8B1 -8FE8B6 -8FF4F7 -8FF4F8 -8FE8DD -8FF4F9 -8FF4FA -8FE9D1 -8FF4FB -8FE9ED -8FEACD -8FF4FC -8FEADB -8FEAE6 -8FEAEA -8FEBA5 -8FEBFB -8FEBFA -8FF4FD -8FECD6 -8FF4FE -8FF3F3 -8FF3F4 -8FF3F5 -8FF3F6 -8FF3F7 -8FF3F8 -8FF3F9 -8FF3FA -8FF3FB -8FF3FC -A2CC -8FA2C3 -8FF4A9 -8FF4AA -8FF3F3 -8FF3F4 -8FF3F5 -8FF3F6 -8FF3F7 -8FF3F8 -8FF3F9 -8FF3FA -8FF3FB -8FF3FC -ADB5 -ADB6 -ADB7 -ADB8 -ADB9 -ADBA -ADBB -ADBC -ADBD -ADBE -A2CC -8FA2C3 -8FF4A9 -8FF4AA -ADEA -ADE2 -ADE4 -A2E8 -8FD4E3 -8FDCDF -8FE4E9 -8FE3F8 -8FD9A1 -8FB1BB -8FF4AE -8FC2AD -8FC3FC -8FE4D0 -8FC2BF -8FBCF4 -8FB0A9 -8FB0C8 -8FF4AF -8FB0D2 -8FB0D4 -8FB0E3 -8FB0EE -8FB1A7 -8FB1A3 -8FB1AC -8FB1A9 -8FB1BE -8FB1DF -8FB1D8 -8FB1C8 -8FB1D7 -8FB1E3 -8FB1F4 -8FB1E1 -8FB2A3 -8FF4B0 -8FB2BB -8FB2E6 -8FB2ED -8FB2F5 -8FB2FC -8FF4B1 -8FB3B5 -8FB3D8 -8FB3DB -8FB3E5 -8FB3EE -8FB3FB -8FF4B2 -8FF4B3 -8FB4C0 -8FB4C7 -8FB4D0 -8FB4DE -8FF4B4 -8FB5AA -8FF4B5 -8FB5AF -8FB5C4 -8FB5E8 -8FF4B6 -8FB7C2 -8FB7E4 -8FB7E8 -8FB7E7 -8FF4B7 -8FF4B8 -8FF4B9 -8FB8CE -8FB8E1 -8FB8F5 -8FB8F7 -8FB8F8 -8FB8FC -8FB9AF -8FB9B7 -8FBABE -8FBADB -8FCDAA -8FBAE1 -8FF4BA -8FBAEB -8FBBB3 -8FBBB8 -8FF4BB -8FBBCA -8FF4BC -8FF4BD -8FBBD0 -8FBBDE -8FBBF4 -8FBBF5 -8FBBF9 -8FBCE4 -8FBCED -8FBCFE -8FF4BE -8FBDC2 -8FBDE7 -8FF4BF -8FBDF0 -8FBEB0 -8FBEAC -8FF4C0 -8FBEB3 -8FBEBD -8FBECD -8FBEC9 -8FBEE4 -8FBFA8 -8FBFC9 -8FC0C4 -8FC0E4 -8FC0F4 -8FC1A6 -8FF4C1 -8FC1F5 -8FC1FC -8FF4C2 -8FC1F8 -8FC2AB -8FC2A1 -8FC2A5 -8FF4C3 -8FC2B8 -8FC2BA -8FF4C4 -8FC2C4 -8FC2D2 -8FC2D7 -8FC2DB -8FC2DE -8FC2ED -8FC2F0 -8FF4C5 -8FC3A1 -8FC3B5 -8FC3C9 -8FC3B9 -8FF4C6 -8FC3D8 -8FC3FE -8FF4C7 -8FC4CC -8FF4C8 -8FC4D9 -8FC4EA -8FC4FD -8FF4C9 -8FC5A7 -8FC5B5 -8FC5B6 -8FF4CA -8FC5D5 -8FC6B8 -8FC6D7 -8FC6E0 -8FC6EA -8FC6E3 -8FC7A1 -8FC7AB -8FC7C7 -8FC7C3 -8FC7CB -8FC7CF -8FC7D9 -8FF4CB -8FF4CC -8FC7E6 -8FC7EE -8FC7FC -8FC7EB -8FC7F0 -8FC8B1 -8FC8E5 -8FC8F8 -8FC9A6 -8FC9AB -8FC9AD -8FF4CD -8FC9CA -8FC9D3 -8FC9E9 -8FC9E3 -8FC9FC -8FC9F4 -8FC9F5 -8FF4CE -8FCAB3 -8FCABD -8FCAEF -8FCAF1 -8FCBAE -8FF4CF -8FCBCA -8FCBE6 -8FCBEA -8FCBF0 -8FCBF4 -8FCBEE -8FCCA5 -8FCBF9 -8FCCAB -8FCCAE -8FCCAD -8FCCB2 -8FCCC2 -8FCCD0 -8FCCD9 -8FF4D0 -8FCDBB -8FF4D1 -8FCEBB -8FF4D2 -8FCEBA -8FCEC3 -8FF4D3 -8FCEF2 -8FB3DD -8FCFD5 -8FCFE2 -8FCFE9 -8FCFED -8FF4D4 -8FF4D5 -8FF4D6 -8FF4D7 -8FD0E5 -8FF4D8 -8FD0E9 -8FD1E8 -8FF4D9 -8FF4DA -8FD1EC -8FD2BB -8FF4DB -8FD3E1 -8FD3E8 -8FD4A7 -8FF4DC -8FF4DD -8FD4D4 -8FD4F2 -8FD5AE -8FF4DE -8FD7DE -8FF4DF -8FD8A2 -8FD8B7 -8FD8C1 -8FD8D1 -8FD8F4 -8FD9C6 -8FD9C8 -8FD9D1 -8FF4E0 -8FF4E1 -8FF4E2 -8FF4E3 -8FF4E4 -8FDCD3 -8FDDC8 -8FDDD4 -8FDDEA -8FDDFA -8FDEA4 -8FDEB0 -8FF4E5 -8FDEB5 -8FDECB -8FF4E6 -8FDFB9 -8FF4E7 -8FDFC3 -8FF4E8 -8FF4E9 -8FE0D9 -8FF4EA -8FF4EB -8FE1E2 -8FF4EC -8FF4ED -8FF4EE -8FE2C7 -8FE3A8 -8FE3A6 -8FE3A9 -8FE3AF -8FE3B0 -8FE3AA -8FE3AB -8FE3BC -8FE3C1 -8FE3BF -8FE3D5 -8FE3D8 -8FE3D6 -8FE3DF -8FE3E3 -8FE3E1 -8FE3D4 -8FE3E9 -8FE4A6 -8FE3F1 -8FE3F2 -8FE4CB -8FE4C1 -8FE4C3 -8FE4BE -8FF4EF -8FE4C0 -8FE4C7 -8FE4BF -8FE4E0 -8FE4DE -8FE4D1 -8FF4F0 -8FE4DC -8FE4D2 -8FE4DB -8FE4D4 -8FE4FA -8FE4EF -8FE5B3 -8FE5BF -8FE5C9 -8FE5D0 -8FE5E2 -8FE5EA -8FE5EB -8FF4F1 -8FF4F2 -8FF4F3 -8FE6E8 -8FE6EF -8FE7AC -8FF4F4 -8FE7AE -8FF4F5 -8FE7B1 -8FF4F6 -8FE7B2 -8FE8B1 -8FE8B6 -8FF4F7 -8FF4F8 -8FE8DD -8FF4F9 -8FF4FA -8FE9D1 -8FF4FB -8FE9ED -8FEACD -8FF4FC -8FEADB -8FEAE6 -8FEAEA -8FEBA5 -8FEBFB -8FEBFA -8FF4FD -8FECD6 -8FF4FE -F5A1 -F5A2 -F5A3 -F5A4 -F5A5 -F5A6 -F5A7 -F5A8 -F5A9 -F5AA -F5AB -F5AC -F5AD -F5AE -F5AF -F5B0 -F5B1 -F5B2 -F5B3 -F5B4 -F5B5 -F5B6 -F5B7 -F5B8 -F5B9 -F5BA -F5BB -F5BC -F5BD -F5BE -F5BF -F5C0 -F5C1 -F5C2 -F5C3 -F5C4 -F5C5 -F5C6 -F5C7 -F5C8 -F5C9 -F5CA -F5CB -F5CC -F5CD -F5CE -F5CF -F5D0 -F5D1 -F5D2 -F5D3 -F5D4 -F5D5 -F5D6 -F5D7 -F5D8 -F5D9 -F5DA -F5DB -F5DC -F5DD -F5DE -F5DF -F5E0 -F5E1 -F5E2 -F5E3 -F5E4 -F5E5 -F5E6 -F5E7 -F5E8 -F5E9 -F5EA -F5EB -F5EC -F5ED -F5EE -F5EF -F5F0 -F5F1 -F5F2 -F5F3 -F5F4 -F5F5 -F5F6 -F5F7 -F5F8 -F5F9 -F5FA -F5FB -F5FC -F5FD -F5FE -F6A1 -F6A2 -F6A3 -F6A4 -F6A5 -F6A6 -F6A7 -F6A8 -F6A9 -F6AA -F6AB -F6AC -F6AD -F6AE -F6AF -F6B0 -F6B1 -F6B2 -F6B3 -F6B4 -F6B5 -F6B6 -F6B7 -F6B8 -F6B9 -F6BA -F6BB -F6BC -F6BD -F6BE -F6BF -F6C0 -F6C1 -F6C2 -F6C3 -F6C4 -F6C5 -F6C6 -F6C7 -F6C8 -F6C9 -F6CA -F6CB -F6CC -F6CD -F6CE -F6CF -F6D0 -F6D1 -F6D2 -F6D3 -F6D4 -F6D5 -F6D6 -F6D7 -F6D8 -F6D9 -F6DA -F6DB -F6DC -F6DD -F6DE -F6DF -F6E0 -F6E1 -F6E2 -F6E3 -F6E4 -F6E5 -F6E6 -F6E7 -F6E8 -F6E9 -F6EA -F6EB -F6EC -F6ED -F6EE -F6EF -F6F0 -F6F1 -F6F2 -F6F3 -F6F4 -F6F5 -F6F6 -F6F7 -F6F8 -F6F9 -F6FA -F6FB -F6FC -F6FD -F6FE -F7A1 -F7A2 -F7A3 -F7A4 -F7A5 -F7A6 -F7A7 -F7A8 -F7A9 -F7AA -F7AB -F7AC -F7AD -F7AE -F7AF -F7B0 -F7B1 -F7B2 -F7B3 -F7B4 -F7B5 -F7B6 -F7B7 -F7B8 -F7B9 -F7BA -F7BB -F7BC -F7BD -F7BE -F7BF -F7C0 -F7C1 -F7C2 -F7C3 -F7C4 -F7C5 -F7C6 -F7C7 -F7C8 -F7C9 -F7CA -F7CB -F7CC -F7CD -F7CE -F7CF -F7D0 -F7D1 -F7D2 -F7D3 -F7D4 -F7D5 -F7D6 -F7D7 -F7D8 -F7D9 -F7DA -F7DB -F7DC -F7DD -F7DE -F7DF -F7E0 -F7E1 -F7E2 -F7E3 -F7E4 -F7E5 -F7E6 -F7E7 -F7E8 -F7E9 -F7EA -F7EB -F7EC -F7ED -F7EE -F7EF -F7F0 -F7F1 -F7F2 -F7F3 -F7F4 -F7F5 -F7F6 -F7F7 -F7F8 -F7F9 -F7FA -F7FB -F7FC -F7FD -F7FE -F8A1 -F8A2 -F8A3 -F8A4 -F8A5 -F8A6 -F8A7 -F8A8 -F8A9 -F8AA -F8AB -F8AC -F8AD -F8AE -F8AF -F8B0 -F8B1 -F8B2 -F8B3 -F8B4 -F8B5 -F8B6 -F8B7 -F8B8 -F8B9 -F8BA -F8BB -F8BC -F8BD -F8BE -F8BF -F8C0 -F8C1 -F8C2 -F8C3 -F8C4 -F8C5 -F8C6 -F8C7 -F8C8 -F8C9 -F8CA -F8CB -F8CC -F8CD -F8CE -F8CF -F8D0 -F8D1 -F8D2 -F8D3 -F8D4 -F8D5 -F8D6 -F8D7 -F8D8 -F8D9 -F8DA -F8DB -F8DC -F8DD -F8DE -F8DF -F8E0 -F8E1 -F8E2 -F8E3 -F8E4 -F8E5 -F8E6 -F8E7 -F8E8 -F8E9 -F8EA -F8EB -F8EC -F8ED -F8EE -F8EF -F8F0 -F8F1 -F8F2 -F8F3 -F8F4 -F8F5 -F8F6 -F8F7 -F8F8 -F8F9 -F8FA -F8FB -F8FC -F8FD -F8FE -F9A1 -F9A2 -F9A3 -F9A4 -F9A5 -F9A6 -F9A7 -F9A8 -F9A9 -F9AA -F9AB -F9AC -F9AD -F9AE -F9AF -F9B0 -F9B1 -F9B2 -F9B3 -F9B4 -F9B5 -F9B6 -F9B7 -F9B8 -F9B9 -F9BA -F9BB -F9BC -F9BD -F9BE -F9BF -F9C0 -F9C1 -F9C2 -F9C3 -F9C4 -F9C5 -F9C6 -F9C7 -F9C8 -F9C9 -F9CA -F9CB -F9CC -F9CD -F9CE -F9CF -F9D0 -F9D1 -F9D2 -F9D3 -F9D4 -F9D5 -F9D6 -F9D7 -F9D8 -F9D9 -F9DA -F9DB -F9DC -F9DD -F9DE -F9DF -F9E0 -F9E1 -F9E2 -F9E3 -F9E4 -F9E5 -F9E6 -F9E7 -F9E8 -F9E9 -F9EA -F9EB -F9EC -F9ED -F9EE -F9EF -F9F0 -F9F1 -F9F2 -F9F3 -F9F4 -F9F5 -F9F6 -F9F7 -F9F8 -F9F9 -F9FA -F9FB -F9FC -F9FD -F9FE -FAA1 -FAA2 -FAA3 -FAA4 -FAA5 -FAA6 -FAA7 -FAA8 -FAA9 -FAAA -FAAB -FAAC -FAAD -FAAE -FAAF -FAB0 -FAB1 -FAB2 -FAB3 -FAB4 -FAB5 -FAB6 -FAB7 -FAB8 -FAB9 -FABA -FABB -FABC -FABD -FABE -FABF -FAC0 -FAC1 -FAC2 -FAC3 -FAC4 -FAC5 -FAC6 -FAC7 -FAC8 -FAC9 -FACA -FACB -FACC -FACD -FACE -FACF -FAD0 -FAD1 -FAD2 -FAD3 -FAD4 -FAD5 -FAD6 -FAD7 -FAD8 -FAD9 -FADA -FADB -FADC -FADD -FADE -FADF -FAE0 -FAE1 -FAE2 -FAE3 -FAE4 -FAE5 -FAE6 -FAE7 -FAE8 -FAE9 -FAEA -FAEB -FAEC -FAED -FAEE -FAEF -FAF0 -FAF1 -FAF2 -FAF3 -FAF4 -FAF5 -FAF6 -FAF7 -FAF8 -FAF9 -FAFA -FAFB -FAFC -FAFD -FAFE -FBA1 -FBA2 -FBA3 -FBA4 -FBA5 -FBA6 -FBA7 -FBA8 -FBA9 -FBAA -FBAB -FBAC -FBAD -FBAE -FBAF -FBB0 -FBB1 -FBB2 -FBB3 -FBB4 -FBB5 -FBB6 -FBB7 -FBB8 -FBB9 -FBBA -FBBB -FBBC -FBBD -FBBE -FBBF -FBC0 -FBC1 -FBC2 -FBC3 -FBC4 -FBC5 -FBC6 -FBC7 -FBC8 -FBC9 -FBCA -FBCB -FBCC -FBCD -FBCE -FBCF -FBD0 -FBD1 -FBD2 -FBD3 -FBD4 -FBD5 -FBD6 -FBD7 -FBD8 -FBD9 -FBDA -FBDB -FBDC -FBDD -FBDE -FBDF -FBE0 -FBE1 -FBE2 -FBE3 -FBE4 -FBE5 -FBE6 -FBE7 -FBE8 -FBE9 -FBEA -FBEB -FBEC -FBED -FBEE -FBEF -FBF0 -FBF1 -FBF2 -FBF3 -FBF4 -FBF5 -FBF6 -FBF7 -FBF8 -FBF9 -FBFA -FBFB -FBFC -FBFD -FBFE -FCA1 -FCA2 -FCA3 -FCA4 -FCA5 -FCA6 -FCA7 -FCA8 -FCA9 -FCAA -FCAB -FCAC -FCAD -FCAE -FCAF -FCB0 -FCB1 -FCB2 -FCB3 -FCB4 -FCB5 -FCB6 -FCB7 -FCB8 -FCB9 -FCBA -FCBB -FCBC -FCBD -FCBE -FCBF -FCC0 -FCC1 -FCC2 -FCC3 -FCC4 -FCC5 -FCC6 -FCC7 -FCC8 -FCC9 -FCCA -FCCB -FCCC -FCCD -FCCE -FCCF -FCD0 -FCD1 -FCD2 -FCD3 -FCD4 -FCD5 -FCD6 -FCD7 -FCD8 -FCD9 -FCDA -FCDB -FCDC -FCDD -FCDE -FCDF -FCE0 -FCE1 -FCE2 -FCE3 -FCE4 -FCE5 -FCE6 -FCE7 -FCE8 -FCE9 -FCEA -FCEB -FCEC -FCED -FCEE -FCEF -FCF0 -FCF1 -FCF2 -FCF3 -FCF4 -FCF5 -FCF6 -FCF7 -FCF8 -FCF9 -FCFA -FCFB -FCFC -FCFD -FCFE -FDA1 -FDA2 -FDA3 -FDA4 -FDA5 -FDA6 -FDA7 -FDA8 -FDA9 -FDAA -FDAB -FDAC -FDAD -FDAE -FDAF -FDB0 -FDB1 -FDB2 -FDB3 -FDB4 -FDB5 -FDB6 -FDB7 -FDB8 -FDB9 -FDBA -FDBB -FDBC -FDBD -FDBE -FDBF -FDC0 -FDC1 -FDC2 -FDC3 -FDC4 -FDC5 -FDC6 -FDC7 -FDC8 -FDC9 -FDCA -FDCB -FDCC -FDCD -FDCE -FDCF -FDD0 -FDD1 -FDD2 -FDD3 -FDD4 -FDD5 -FDD6 -FDD7 -FDD8 -FDD9 -FDDA -FDDB -FDDC -FDDD -FDDE -FDDF -FDE0 -FDE1 -FDE2 -FDE3 -FDE4 -FDE5 -FDE6 -FDE7 -FDE8 -FDE9 -FDEA -FDEB -FDEC -FDED -FDEE -FDEF -FDF0 -FDF1 -FDF2 -FDF3 -FDF4 -FDF5 -FDF6 -FDF7 -FDF8 -FDF9 -FDFA -FDFB -FDFC -FDFD -FDFE -FEA1 -FEA2 -FEA3 -FEA4 -FEA5 -FEA6 -FEA7 -FEA8 -FEA9 -FEAA -FEAB -FEAC -FEAD -FEAE -FEAF -FEB0 -FEB1 -FEB2 -FEB3 -FEB4 -FEB5 -FEB6 -FEB7 -FEB8 -FEB9 -FEBA -FEBB -FEBC -FEBD -FEBE -FEBF -FEC0 -FEC1 -FEC2 -FEC3 -FEC4 -FEC5 -FEC6 -FEC7 -FEC8 -FEC9 -FECA -FECB -FECC -FECD -FECE -FECF -FED0 -FED1 -FED2 -FED3 -FED4 -FED5 -FED6 -FED7 -FED8 -FED9 -FEDA -FEDB -FEDC -FEDD -FEDE -FEDF -FEE0 -FEE1 -FEE2 -FEE3 -FEE4 -FEE5 -FEE6 -FEE7 -FEE8 -FEE9 -FEEA -FEEB -FEEC -FEED -FEEE -FEEF -FEF0 -FEF1 -FEF2 -FEF3 -FEF4 -FEF5 -FEF6 -FEF7 -FEF8 -FEF9 -FEFA -FEFB -FEFC -FEFD -FEFE -8FF5A1 -8FF5A2 -8FF5A3 -8FF5A4 -8FF5A5 -8FF5A6 -8FF5A7 -8FF5A8 -8FF5A9 -8FF5AA -8FF5AB -8FF5AC -8FF5AD -8FF5AE -8FF5AF -8FF5B0 -8FF5B1 -8FF5B2 -8FF5B3 -8FF5B4 -8FF5B5 -8FF5B6 -8FF5B7 -8FF5B8 -8FF5B9 -8FF5BA -8FF5BB -8FF5BC -8FF5BD -8FF5BE -8FF5BF -8FF5C0 -8FF5C1 -8FF5C2 -8FF5C3 -8FF5C4 -8FF5C5 -8FF5C6 -8FF5C7 -8FF5C8 -8FF5C9 -8FF5CA -8FF5CB -8FF5CC -8FF5CD -8FF5CE -8FF5CF -8FF5D0 -8FF5D1 -8FF5D2 -8FF5D3 -8FF5D4 -8FF5D5 -8FF5D6 -8FF5D7 -8FF5D8 -8FF5D9 -8FF5DA -8FF5DB -8FF5DC -8FF5DD -8FF5DE -8FF5DF -8FF5E0 -8FF5E1 -8FF5E2 -8FF5E3 -8FF5E4 -8FF5E5 -8FF5E6 -8FF5E7 -8FF5E8 -8FF5E9 -8FF5EA -8FF5EB -8FF5EC -8FF5ED -8FF5EE -8FF5EF -8FF5F0 -8FF5F1 -8FF5F2 -8FF5F3 -8FF5F4 -8FF5F5 -8FF5F6 -8FF5F7 -8FF5F8 -8FF5F9 -8FF5FA -8FF5FB -8FF5FC -8FF5FD -8FF5FE -8FF6A1 -8FF6A2 -8FF6A3 -8FF6A4 -8FF6A5 -8FF6A6 -8FF6A7 -8FF6A8 -8FF6A9 -8FF6AA -8FF6AB -8FF6AC -8FF6AD -8FF6AE -8FF6AF -8FF6B0 -8FF6B1 -8FF6B2 -8FF6B3 -8FF6B4 -8FF6B5 -8FF6B6 -8FF6B7 -8FF6B8 -8FF6B9 -8FF6BA -8FF6BB -8FF6BC -8FF6BD -8FF6BE -8FF6BF -8FF6C0 -8FF6C1 -8FF6C2 -8FF6C3 -8FF6C4 -8FF6C5 -8FF6C6 -8FF6C7 -8FF6C8 -8FF6C9 -8FF6CA -8FF6CB -8FF6CC -8FF6CD -8FF6CE -8FF6CF -8FF6D0 -8FF6D1 -8FF6D2 -8FF6D3 -8FF6D4 -8FF6D5 -8FF6D6 -8FF6D7 -8FF6D8 -8FF6D9 -8FF6DA -8FF6DB -8FF6DC -8FF6DD -8FF6DE -8FF6DF -8FF6E0 -8FF6E1 -8FF6E2 -8FF6E3 -8FF6E4 -8FF6E5 -8FF6E6 -8FF6E7 -8FF6E8 -8FF6E9 -8FF6EA -8FF6EB -8FF6EC -8FF6ED -8FF6EE -8FF6EF -8FF6F0 -8FF6F1 -8FF6F2 -8FF6F3 -8FF6F4 -8FF6F5 -8FF6F6 -8FF6F7 -8FF6F8 -8FF6F9 -8FF6FA -8FF6FB -8FF6FC -8FF6FD -8FF6FE -8FF7A1 -8FF7A2 -8FF7A3 -8FF7A4 -8FF7A5 -8FF7A6 -8FF7A7 -8FF7A8 -8FF7A9 -8FF7AA -8FF7AB -8FF7AC -8FF7AD -8FF7AE -8FF7AF -8FF7B0 -8FF7B1 -8FF7B2 -8FF7B3 -8FF7B4 -8FF7B5 -8FF7B6 -8FF7B7 -8FF7B8 -8FF7B9 -8FF7BA -8FF7BB -8FF7BC -8FF7BD -8FF7BE -8FF7BF -8FF7C0 -8FF7C1 -8FF7C2 -8FF7C3 -8FF7C4 -8FF7C5 -8FF7C6 -8FF7C7 -8FF7C8 -8FF7C9 -8FF7CA -8FF7CB -8FF7CC -8FF7CD -8FF7CE -8FF7CF -8FF7D0 -8FF7D1 -8FF7D2 -8FF7D3 -8FF7D4 -8FF7D5 -8FF7D6 -8FF7D7 -8FF7D8 -8FF7D9 -8FF7DA -8FF7DB -8FF7DC -8FF7DD -8FF7DE -8FF7DF -8FF7E0 -8FF7E1 -8FF7E2 -8FF7E3 -8FF7E4 -8FF7E5 -8FF7E6 -8FF7E7 -8FF7E8 -8FF7E9 -8FF7EA -8FF7EB -8FF7EC -8FF7ED -8FF7EE -8FF7EF -8FF7F0 -8FF7F1 -8FF7F2 -8FF7F3 -8FF7F4 -8FF7F5 -8FF7F6 -8FF7F7 -8FF7F8 -8FF7F9 -8FF7FA -8FF7FB -8FF7FC -8FF7FD -8FF7FE -8FF8A1 -8FF8A2 -8FF8A3 -8FF8A4 -8FF8A5 -8FF8A6 -8FF8A7 -8FF8A8 -8FF8A9 -8FF8AA -8FF8AB -8FF8AC -8FF8AD -8FF8AE -8FF8AF -8FF8B0 -8FF8B1 -8FF8B2 -8FF8B3 -8FF8B4 -8FF8B5 -8FF8B6 -8FF8B7 -8FF8B8 -8FF8B9 -8FF8BA -8FF8BB -8FF8BC -8FF8BD -8FF8BE -8FF8BF -8FF8C0 -8FF8C1 -8FF8C2 -8FF8C3 -8FF8C4 -8FF8C5 -8FF8C6 -8FF8C7 -8FF8C8 -8FF8C9 -8FF8CA -8FF8CB -8FF8CC -8FF8CD -8FF8CE -8FF8CF -8FF8D0 -8FF8D1 -8FF8D2 -8FF8D3 -8FF8D4 -8FF8D5 -8FF8D6 -8FF8D7 -8FF8D8 -8FF8D9 -8FF8DA -8FF8DB -8FF8DC -8FF8DD -8FF8DE -8FF8DF -8FF8E0 -8FF8E1 -8FF8E2 -8FF8E3 -8FF8E4 -8FF8E5 -8FF8E6 -8FF8E7 -8FF8E8 -8FF8E9 -8FF8EA -8FF8EB -8FF8EC -8FF8ED -8FF8EE -8FF8EF -8FF8F0 -8FF8F1 -8FF8F2 -8FF8F3 -8FF8F4 -8FF8F5 -8FF8F6 -8FF8F7 -8FF8F8 -8FF8F9 -8FF8FA -8FF8FB -8FF8FC -8FF8FD -8FF8FE -8FF9A1 -8FF9A2 -8FF9A3 -8FF9A4 -8FF9A5 -8FF9A6 -8FF9A7 -8FF9A8 -8FF9A9 -8FF9AA -8FF9AB -8FF9AC -8FF9AD -8FF9AE -8FF9AF -8FF9B0 -8FF9B1 -8FF9B2 -8FF9B3 -8FF9B4 -8FF9B5 -8FF9B6 -8FF9B7 -8FF9B8 -8FF9B9 -8FF9BA -8FF9BB -8FF9BC -8FF9BD -8FF9BE -8FF9BF -8FF9C0 -8FF9C1 -8FF9C2 -8FF9C3 -8FF9C4 -8FF9C5 -8FF9C6 -8FF9C7 -8FF9C8 -8FF9C9 -8FF9CA -8FF9CB -8FF9CC -8FF9CD -8FF9CE -8FF9CF -8FF9D0 -8FF9D1 -8FF9D2 -8FF9D3 -8FF9D4 -8FF9D5 -8FF9D6 -8FF9D7 -8FF9D8 -8FF9D9 -8FF9DA -8FF9DB -8FF9DC -8FF9DD -8FF9DE -8FF9DF -8FF9E0 -8FF9E1 -8FF9E2 -8FF9E3 -8FF9E4 -8FF9E5 -8FF9E6 -8FF9E7 -8FF9E8 -8FF9E9 -8FF9EA -8FF9EB -8FF9EC -8FF9ED -8FF9EE -8FF9EF -8FF9F0 -8FF9F1 -8FF9F2 -8FF9F3 -8FF9F4 -8FF9F5 -8FF9F6 -8FF9F7 -8FF9F8 -8FF9F9 -8FF9FA -8FF9FB -8FF9FC -8FF9FD -8FF9FE -8FFAA1 -8FFAA2 -8FFAA3 -8FFAA4 -8FFAA5 -8FFAA6 -8FFAA7 -8FFAA8 -8FFAA9 -8FFAAA -8FFAAB -8FFAAC -8FFAAD -8FFAAE -8FFAAF -8FFAB0 -8FFAB1 -8FFAB2 -8FFAB3 -8FFAB4 -8FFAB5 -8FFAB6 -8FFAB7 -8FFAB8 -8FFAB9 -8FFABA -8FFABB -8FFABC -8FFABD -8FFABE -8FFABF -8FFAC0 -8FFAC1 -8FFAC2 -8FFAC3 -8FFAC4 -8FFAC5 -8FFAC6 -8FFAC7 -8FFAC8 -8FFAC9 -8FFACA -8FFACB -8FFACC -8FFACD -8FFACE -8FFACF -8FFAD0 -8FFAD1 -8FFAD2 -8FFAD3 -8FFAD4 -8FFAD5 -8FFAD6 -8FFAD7 -8FFAD8 -8FFAD9 -8FFADA -8FFADB -8FFADC -8FFADD -8FFADE -8FFADF -8FFAE0 -8FFAE1 -8FFAE2 -8FFAE3 -8FFAE4 -8FFAE5 -8FFAE6 -8FFAE7 -8FFAE8 -8FFAE9 -8FFAEA -8FFAEB -8FFAEC -8FFAED -8FFAEE -8FFAEF -8FFAF0 -8FFAF1 -8FFAF2 -8FFAF3 -8FFAF4 -8FFAF5 -8FFAF6 -8FFAF7 -8FFAF8 -8FFAF9 -8FFAFA -8FFAFB -8FFAFC -8FFAFD -8FFAFE -8FFBA1 -8FFBA2 -8FFBA3 -8FFBA4 -8FFBA5 -8FFBA6 -8FFBA7 -8FFBA8 -8FFBA9 -8FFBAA -8FFBAB -8FFBAC -8FFBAD -8FFBAE -8FFBAF -8FFBB0 -8FFBB1 -8FFBB2 -8FFBB3 -8FFBB4 -8FFBB5 -8FFBB6 -8FFBB7 -8FFBB8 -8FFBB9 -8FFBBA -8FFBBB -8FFBBC -8FFBBD -8FFBBE -8FFBBF -8FFBC0 -8FFBC1 -8FFBC2 -8FFBC3 -8FFBC4 -8FFBC5 -8FFBC6 -8FFBC7 -8FFBC8 -8FFBC9 -8FFBCA -8FFBCB -8FFBCC -8FFBCD -8FFBCE -8FFBCF -8FFBD0 -8FFBD1 -8FFBD2 -8FFBD3 -8FFBD4 -8FFBD5 -8FFBD6 -8FFBD7 -8FFBD8 -8FFBD9 -8FFBDA -8FFBDB -8FFBDC -8FFBDD -8FFBDE -8FFBDF -8FFBE0 -8FFBE1 -8FFBE2 -8FFBE3 -8FFBE4 -8FFBE5 -8FFBE6 -8FFBE7 -8FFBE8 -8FFBE9 -8FFBEA -8FFBEB -8FFBEC -8FFBED -8FFBEE -8FFBEF -8FFBF0 -8FFBF1 -8FFBF2 -8FFBF3 -8FFBF4 -8FFBF5 -8FFBF6 -8FFBF7 -8FFBF8 -8FFBF9 -8FFBFA -8FFBFB -8FFBFC -8FFBFD -8FFBFE -8FFCA1 -8FFCA2 -8FFCA3 -8FFCA4 -8FFCA5 -8FFCA6 -8FFCA7 -8FFCA8 -8FFCA9 -8FFCAA -8FFCAB -8FFCAC -8FFCAD -8FFCAE -8FFCAF -8FFCB0 -8FFCB1 -8FFCB2 -8FFCB3 -8FFCB4 -8FFCB5 -8FFCB6 -8FFCB7 -8FFCB8 -8FFCB9 -8FFCBA -8FFCBB -8FFCBC -8FFCBD -8FFCBE -8FFCBF -8FFCC0 -8FFCC1 -8FFCC2 -8FFCC3 -8FFCC4 -8FFCC5 -8FFCC6 -8FFCC7 -8FFCC8 -8FFCC9 -8FFCCA -8FFCCB -8FFCCC -8FFCCD -8FFCCE -8FFCCF -8FFCD0 -8FFCD1 -8FFCD2 -8FFCD3 -8FFCD4 -8FFCD5 -8FFCD6 -8FFCD7 -8FFCD8 -8FFCD9 -8FFCDA -8FFCDB -8FFCDC -8FFCDD -8FFCDE -8FFCDF -8FFCE0 -8FFCE1 -8FFCE2 -8FFCE3 -8FFCE4 -8FFCE5 -8FFCE6 -8FFCE7 -8FFCE8 -8FFCE9 -8FFCEA -8FFCEB -8FFCEC -8FFCED -8FFCEE -8FFCEF -8FFCF0 -8FFCF1 -8FFCF2 -8FFCF3 -8FFCF4 -8FFCF5 -8FFCF6 -8FFCF7 -8FFCF8 -8FFCF9 -8FFCFA -8FFCFB -8FFCFC -8FFCFD -8FFCFE -8FFDA1 -8FFDA2 -8FFDA3 -8FFDA4 -8FFDA5 -8FFDA6 -8FFDA7 -8FFDA8 -8FFDA9 -8FFDAA -8FFDAB -8FFDAC -8FFDAD -8FFDAE -8FFDAF -8FFDB0 -8FFDB1 -8FFDB2 -8FFDB3 -8FFDB4 -8FFDB5 -8FFDB6 -8FFDB7 -8FFDB8 -8FFDB9 -8FFDBA -8FFDBB -8FFDBC -8FFDBD -8FFDBE -8FFDBF -8FFDC0 -8FFDC1 -8FFDC2 -8FFDC3 -8FFDC4 -8FFDC5 -8FFDC6 -8FFDC7 -8FFDC8 -8FFDC9 -8FFDCA -8FFDCB -8FFDCC -8FFDCD -8FFDCE -8FFDCF -8FFDD0 -8FFDD1 -8FFDD2 -8FFDD3 -8FFDD4 -8FFDD5 -8FFDD6 -8FFDD7 -8FFDD8 -8FFDD9 -8FFDDA -8FFDDB -8FFDDC -8FFDDD -8FFDDE -8FFDDF -8FFDE0 -8FFDE1 -8FFDE2 -8FFDE3 -8FFDE4 -8FFDE5 -8FFDE6 -8FFDE7 -8FFDE8 -8FFDE9 -8FFDEA -8FFDEB -8FFDEC -8FFDED -8FFDEE -8FFDEF -8FFDF0 -8FFDF1 -8FFDF2 -8FFDF3 -8FFDF4 -8FFDF5 -8FFDF6 -8FFDF7 -8FFDF8 -8FFDF9 -8FFDFA -8FFDFB -8FFDFC -8FFDFD -8FFDFE -8FFEA1 -8FFEA2 -8FFEA3 -8FFEA4 -8FFEA5 -8FFEA6 -8FFEA7 -8FFEA8 -8FFEA9 -8FFEAA -8FFEAB -8FFEAC -8FFEAD -8FFEAE -8FFEAF -8FFEB0 -8FFEB1 -8FFEB2 -8FFEB3 -8FFEB4 -8FFEB5 -8FFEB6 -8FFEB7 -8FFEB8 -8FFEB9 -8FFEBA -8FFEBB -8FFEBC -8FFEBD -8FFEBE -8FFEBF -8FFEC0 -8FFEC1 -8FFEC2 -8FFEC3 -8FFEC4 -8FFEC5 -8FFEC6 -8FFEC7 -8FFEC8 -8FFEC9 -8FFECA -8FFECB -8FFECC -8FFECD -8FFECE -8FFECF -8FFED0 -8FFED1 -8FFED2 -8FFED3 -8FFED4 -8FFED5 -8FFED6 -8FFED7 -8FFED8 -8FFED9 -8FFEDA -8FFEDB -8FFEDC -8FFEDD -8FFEDE -8FFEDF -8FFEE0 -8FFEE1 -8FFEE2 -8FFEE3 -8FFEE4 -8FFEE5 -8FFEE6 -8FFEE7 -8FFEE8 -8FFEE9 -8FFEEA -8FFEEB -8FFEEC -8FFEED -8FFEEE -8FFEEF -8FFEF0 -8FFEF1 -8FFEF2 -8FFEF3 -8FFEF4 -8FFEF5 -8FFEF6 -8FFEF7 -8FFEF8 -8FFEF9 -8FFEFA -8FFEFB -8FFEFC -8FFEFD -8FFEFE -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -DROP TABLE t4; -SET collation_connection='cp932_japanese_ci'; -create table t1 select repeat('a',4000) a; -delete from t1; -insert into t1 values ('a'), ('a '), ('a\t'); -select collation(a),hex(a) from t1 order by a; -collation(a) hex(a) -cp932_japanese_ci 6109 -cp932_japanese_ci 61 -cp932_japanese_ci 6120 -drop table t1; -SET collation_connection='cp932_bin'; -create table t1 select repeat('a',4000) a; -delete from t1; -insert into t1 values ('a'), ('a '), ('a\t'); -select collation(a),hex(a) from t1 order by a; -collation(a) hex(a) -cp932_bin 6109 -cp932_bin 61 -cp932_bin 6120 -drop table t1; -create table t1 (col1 varchar(1)) character set cp932; -insert into t1 values ('a'); -insert into t1 values ('ab'); -Warnings: -Warning 1265 Data truncated for column 'col1' at row 1 -select * from t1; -col1 -a -a -insert into t1 values ('abc'); -Warnings: -Warning 1265 Data truncated for column 'col1' at row 1 -select * from t1; -col1 -a -a -a -drop table t1; -set names utf8; -create table t1 (a text) default character set cp932; -insert into t1 values (_utf8 0xE38182); -show warnings; -Level Code Message -select * from t1; -a -ã‚ -select hex(a) from t1; -hex(a) -82A0 -drop table t1; -ƒ\ -ƒ\ -c_cp932 -ƒ\ -ƒ\ -ƒ\ -ソ -ソ -ƒ\ -ƒ\ diff --git a/mysql-test/r/binlog_row_ctype_ucs.result b/mysql-test/r/binlog_row_ctype_ucs.result deleted file mode 100644 index 4f4e7bcedd7..00000000000 --- a/mysql-test/r/binlog_row_ctype_ucs.result +++ /dev/null @@ -1,19 +0,0 @@ -SET TIMESTAMP=10000; -create table t2 (c char(30)) charset=ucs2; -set @v=convert('abc' using ucs2); -reset master; -insert into t2 values (@v); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -flush logs; -/*!40019 SET @@session.max_insert_delayed_threads=0*/; -/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -DELIMITER /*!*/; -ROLLBACK/*!*/; -DELIMITER ; -# End of log file -ROLLBACK /* added by mysqlbinlog */; -/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; -drop table t2; diff --git a/mysql-test/r/binlog_row_drop_tmp_tbl.result b/mysql-test/r/binlog_row_drop_tmp_tbl.result deleted file mode 100644 index 503076d66d9..00000000000 --- a/mysql-test/r/binlog_row_drop_tmp_tbl.result +++ /dev/null @@ -1,17 +0,0 @@ -drop database if exists `drop-temp+table-test`; -reset master; -create database `drop-temp+table-test`; -use `drop-temp+table-test`; -create temporary table shortn1 (a int); -create temporary table `table:name` (a int); -create temporary table shortn2 (a int); -select get_lock("a",10); -get_lock("a",10) -1 -select get_lock("a",10); -get_lock("a",10) -1 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # create database `drop-temp+table-test` -drop database `drop-temp+table-test`; diff --git a/mysql-test/r/binlog_row_innodb_stat.result b/mysql-test/r/binlog_row_innodb_stat.result deleted file mode 100644 index e6813ee2719..00000000000 --- a/mysql-test/r/binlog_row_innodb_stat.result +++ /dev/null @@ -1,39 +0,0 @@ -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 0 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 0 -drop table if exists t1; -create table t1 (a int) engine=innodb; -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 1 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 1 -begin; -delete from t1; -commit; -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 2 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 1 -drop table t1; -show status like "Innodb_buffer_pool_pages_total"; -Variable_name Value -Innodb_buffer_pool_pages_total 512 -show status like "Innodb_page_size"; -Variable_name Value -Innodb_page_size 16384 -show status like "Innodb_rows_deleted"; -Variable_name Value -Innodb_rows_deleted 2000 -show status like "Innodb_rows_inserted"; -Variable_name Value -Innodb_rows_inserted 2000 -show status like "Innodb_rows_updated"; -Variable_name Value -Innodb_rows_updated 0 diff --git a/mysql-test/r/binlog_row_insert_select.result b/mysql-test/r/binlog_row_insert_select.result deleted file mode 100644 index cd6ddafc47b..00000000000 --- a/mysql-test/r/binlog_row_insert_select.result +++ /dev/null @@ -1,25 +0,0 @@ -drop table if exists t1,t2; -create table t1(a int, unique(a)); -insert into t1 values(2); -create table t2(a int); -insert into t2 values(1),(2); -reset master; -insert into t1 select * from t2; -ERROR 23000: Duplicate entry '2' for key 'a' -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -select * from t1; -a -1 -2 -drop table t1, t2; -create table t1(a int); -insert into t1 values(1),(1); -reset master; -create table t2(unique(a)) select a from t1; -ERROR 23000: Duplicate entry '1' for key 'a' -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -drop table t1; diff --git a/mysql-test/r/binlog_row_mix_innodb_myisam.result b/mysql-test/r/binlog_row_mix_innodb_myisam.result deleted file mode 100644 index 6ac942176c7..00000000000 --- a/mysql-test/r/binlog_row_mix_innodb_myisam.result +++ /dev/null @@ -1,415 +0,0 @@ -drop table if exists t1, t2; -create table t1 (a int) engine=innodb; -create table t2 (a int) engine=myisam; -reset master; -begin; -insert into t1 values(1); -insert into t2 select * from t1; -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(2); -insert into t2 select * from t1; -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(3); -savepoint my_savepoint; -insert into t1 values(4); -insert into t2 select * from t1; -rollback to savepoint my_savepoint; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; savepoint my_savepoint -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; rollback to savepoint my_savepoint -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(5); -savepoint my_savepoint; -insert into t1 values(6); -insert into t2 select * from t1; -rollback to savepoint my_savepoint; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -insert into t1 values(7); -commit; -select a from t1 order by a; -a -5 -7 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; savepoint my_savepoint -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; rollback to savepoint my_savepoint -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -reset master; -select get_lock("a",10); -get_lock("a",10) -1 -begin; -insert into t1 values(8); -insert into t2 select * from t1; -select get_lock("a",10); -get_lock("a",10) -1 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK -delete from t1; -delete from t2; -reset master; -insert into t1 values(9); -insert into t2 select * from t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -delete from t1; -delete from t2; -reset master; -insert into t1 values(10); -begin; -insert into t2 select * from t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -insert into t1 values(11); -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -alter table t2 engine=INNODB; -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(12); -insert into t2 select * from t1; -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(13); -insert into t2 select * from t1; -rollback; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(14); -savepoint my_savepoint; -insert into t1 values(15); -insert into t2 select * from t1; -rollback to savepoint my_savepoint; -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(16); -savepoint my_savepoint; -insert into t1 values(17); -insert into t2 select * from t1; -rollback to savepoint my_savepoint; -insert into t1 values(18); -commit; -select a from t1 order by a; -a -16 -18 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -alter table t2 engine=MyISAM; -insert into t1 values (1); -begin; -select * from t1 for update; -a -1 -select (@before:=unix_timestamp())*0; -(@before:=unix_timestamp())*0 -0 -begin; -select * from t1 for update; -insert into t2 values (20); -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -select (@after:=unix_timestamp())*0; -(@after:=unix_timestamp())*0 -0 -select (@after-@before) >= 2; -(@after-@before) >= 2 -1 -drop table t1,t2; -commit; -begin; -create temporary table ti (a int) engine=innodb; -rollback; -insert into ti values(1); -set autocommit=0; -create temporary table t1 (a int) engine=myisam; -commit; -insert t1 values (1); -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -create table t0 (n int); -insert t0 select * from t1; -set autocommit=1; -insert into t0 select GET_LOCK("lock1",null); -set autocommit=0; -create table t2 (n int) engine=innodb; -insert into t2 values (3); -select get_lock("lock1",60); -get_lock("lock1",60) -1 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; alter table t2 engine=MyISAM -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; drop table t1,t2 -master-bin.000001 # Query # # use `test`; create table t0 (n int) -master-bin.000001 # Table_map # # table_id: # (test.t0) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t0) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb -do release_lock("lock1"); -drop table t0,t2; -set autocommit=0; -CREATE TABLE t1 (a int, b int) engine=myisam; -reset master; -INSERT INTO t1 values (1,1),(1,2); -CREATE TABLE t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -DROP TABLE if exists t2; -Warnings: -Note 1051 Unknown table 't2' -INSERT INTO t1 values (3,3); -CREATE TEMPORARY TABLE t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -DROP TABLE IF EXISTS t2; -Warnings: -Note 1051 Unknown table 't2' -CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb; -INSERT INTO t1 VALUES (4,4); -CREATE TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -SELECT * from t2; -a b -TRUNCATE table t2; -INSERT INTO t1 VALUES (5,5); -INSERT INTO t2 select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -SELECT * FROM t2; -a b -DROP TABLE t2; -INSERT INTO t1 values (6,6); -CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb ; -INSERT INTO t1 values (7,7); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO t1 values (8,8); -CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -COMMIT; -INSERT INTO t1 values (9,9); -CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -SELECT * from t2; -a b -TRUNCATE table t2; -INSERT INTO t1 values (10,10); -INSERT INTO t2 select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -SELECT * from t1; -a b -1 1 -1 2 -3 3 -4 4 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -INSERT INTO t2 values (100,100); -CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -COMMIT; -INSERT INTO t2 values (101,101); -CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -ROLLBACK; -SELECT * from t2; -a b -100 100 -DROP TABLE t1,t2; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; DROP TABLE if exists t2 -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2 -master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; TRUNCATE table t2 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; DROP TABLE t2 -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; TRUNCATE table t2 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ -reset master; -create table t1 (a int) engine=innodb; -create table t2 (a int) engine=myisam; -select get_lock("a",10); -get_lock("a",10) -1 -begin; -insert into t1 values(8); -insert into t2 select * from t1; -select get_lock("a",10); -get_lock("a",10) -1 -flush logs; -select -(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) -is not null; -(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) -is not null -1 -select -@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", -@a not like "%#%error_code=%error_code=%"; -@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%" -1 1 -drop table t1, t2; diff --git a/mysql-test/r/binlog_statement_insert_delayed.result b/mysql-test/r/binlog_statement_insert_delayed.result deleted file mode 100644 index 3a2dc441632..00000000000 --- a/mysql-test/r/binlog_statement_insert_delayed.result +++ /dev/null @@ -1,29 +0,0 @@ -create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; -set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; -insert delayed into t1 values (207); -insert delayed into t1 values (null); -insert delayed into t1 values (300); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam -master-bin.000001 # Query # # use `test`; insert delayed into t1 values (207) -master-bin.000001 # Intvar # # INSERT_ID=208 -master-bin.000001 # Query # # use `test`; insert delayed into t1 values (null) -master-bin.000001 # Query # # use `test`; insert delayed into t1 values (300) -insert delayed into t1 values (null),(null),(null),(null); -insert delayed into t1 values (null),(null),(400),(null); -11 == 11 -select * from t1; -a -207 -208 -300 -301 -302 -303 -304 -305 -306 -400 -401 -drop table t1; diff --git a/mysql-test/r/binlog_stm_binlog.result b/mysql-test/r/binlog_stm_binlog.result deleted file mode 100644 index 66fe3e40270..00000000000 --- a/mysql-test/r/binlog_stm_binlog.result +++ /dev/null @@ -1,237 +0,0 @@ -create table t1 (a int, b int) engine=innodb; -begin; -insert into t1 values (1,2); -commit; -show binlog events; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: #, Binlog ver: # -master-bin.000001 106 Query 1 213 use `test`; create table t1 (a int, b int) engine=innodb -master-bin.000001 213 Query 1 281 use `test`; BEGIN -master-bin.000001 281 Query 1 90 use `test`; insert into t1 values (1,2) -master-bin.000001 371 Xid 1 398 COMMIT /* XID */ -drop table t1; -drop table if exists t1, t2; -reset master; -create table t1 (a int) engine=innodb; -create table t2 (a int) engine=innodb; -begin; -insert t1 values (5); -commit; -begin; -insert t2 values (5); -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb -master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert t1 values (5) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert t2 values (5) -master-bin.000001 # Xid # # COMMIT /* XID */ -drop table t1,t2; -reset master; -create table t1 (n int) engine=innodb; -begin; -commit; -drop table t1; -show binlog events in 'master-bin.000001' from 106; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb -master-bin.000001 # Query 1 # use `test`; BEGIN -master-bin.000001 # Query 1 # use `test`; insert into t1 values(100 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(99 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(98 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(97 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(96 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(95 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(94 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(93 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(92 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(91 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(90 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(89 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(88 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(87 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(86 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(85 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(84 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(83 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(82 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(81 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(80 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(79 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(78 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(77 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(76 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(75 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(74 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(73 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(72 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(71 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(70 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(69 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(68 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(67 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(66 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(65 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(64 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(63 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(62 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(61 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(60 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(59 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(58 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(57 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(56 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(55 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(54 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(53 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(52 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(51 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(50 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(49 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(48 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(47 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(46 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(45 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(44 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(43 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(42 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(41 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(40 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(39 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(38 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(37 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(36 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(35 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(34 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(33 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(32 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(31 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(30 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(29 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(28 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(27 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(26 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(25 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(24 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(23 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(22 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(21 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(20 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(19 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(18 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(17 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(16 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(15 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(14 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(13 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(12 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(11 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(10 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(9 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(8 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(7 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(6 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(5 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(4 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(3 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(2 + 4) -master-bin.000001 # Query 1 # use `test`; insert into t1 values(1 + 4) -master-bin.000001 # Xid 1 # COMMIT /* xid= */ -master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 -show binlog events in 'master-bin.000002' from 106; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Query 1 # use `test`; drop table t1 -reset master; -create table t1 (id tinyint auto_increment primary key); -set insert_id=128; -insert into t1 values(null); -Warnings: -Warning 1264 Out of range value for column 'id' at row 1 -select * from t1; -id -127 -drop table t1; -create table t1 (a int); -create table if not exists t2 select * from t1; -create temporary table tt1 (a int); -create table if not exists t3 like tt1; -USE mysql; -INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test'); -UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'; -DELETE FROM user WHERE host='localhost' AND user='@#@'; -use test; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) -master-bin.000001 # Intvar # # INSERT_ID=127 -master-bin.000001 # Query # # use `test`; insert into t1 values(null) -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Query # # use `test`; create table if not exists t2 select * from t1 -master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int) -master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1 -master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test') -master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@' -master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@' -drop table t1,t2,t3,tt1; -create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; -set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; -insert delayed into t1 values (207); -insert delayed into t1 values (null); -insert delayed into t1 values (300); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) -master-bin.000001 # Intvar # # INSERT_ID=127 -master-bin.000001 # Query # # use `test`; insert into t1 values(null) -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # Query # # use `test`; create table if not exists t2 select * from t1 -master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int) -master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1 -master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test') -master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@' -master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@' -master-bin.000001 # Query # # use `test`; drop table t1,t2,t3,tt1 -master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -insert delayed into t1 values (null),(null),(null),(null); -insert delayed into t1 values (null),(null),(400),(null); -11 == 11 -select * from t1; -a -207 -208 -300 -301 -302 -303 -304 -305 -306 -400 -401 -drop table t1; -reset master; -drop table if exists t3; -create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 346 -insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); -insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); -insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); -insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); -show master status /* must show new binlog index after rotating */; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000002 106 -drop table t3; diff --git a/mysql-test/r/binlog_stm_blackhole.result b/mysql-test/r/binlog_stm_blackhole.result deleted file mode 100644 index a1c83ffc73d..00000000000 --- a/mysql-test/r/binlog_stm_blackhole.result +++ /dev/null @@ -1,155 +0,0 @@ -drop table if exists t1,t2; -CREATE TABLE t1 ( -Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, -Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL -) ENGINE=blackhole; -INSERT INTO t1 VALUES (9410,9412); -select period from t1; -period -select * from t1; -Period Varor_period -select t1.* from t1; -Period Varor_period -CREATE TABLE t2 ( -auto int NOT NULL auto_increment, -fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL, -companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL, -fld3 char(30) DEFAULT '' NOT NULL, -fld4 char(35) DEFAULT '' NOT NULL, -fld5 char(35) DEFAULT '' NOT NULL, -fld6 char(4) DEFAULT '' NOT NULL, -primary key (auto) -) ENGINE=blackhole; -INSERT INTO t2 VALUES (1192,068305,00,'Colombo','hardware','colicky',''); -INSERT INTO t2 VALUES (1193,000000,00,'nondecreasing','implant','thrillingly',''); -select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"; -fld3 -select fld3 from t2 where fld3 like "%cultivation" ; -fld3 -select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3; -fld3 companynr -select fld3,companynr from t2 where companynr = 58 order by fld3; -fld3 companynr -select fld3 from t2 order by fld3 desc limit 10; -fld3 -select fld3 from t2 order by fld3 desc limit 5; -fld3 -select fld3 from t2 order by fld3 desc limit 5,5; -fld3 -select t2.fld3 from t2 where fld3 = 'honeysuckle'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'h%le'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%'; -fld3 -select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; -fld3 -select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3; -fld1 fld3 -DROP TABLE t1; -CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)); -INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), -('Full-text indexes', 'are called collections'), -('Only MyISAM tables','support collections'), -('Function MATCH ... AGAINST()','is used to do a search'), -('Full-text search in MySQL', 'implements vector space model'); -SHOW INDEX FROM t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 1 a 1 a NULL NULL NULL NULL YES FULLTEXT -t1 1 a 2 b NULL NULL NULL NULL YES FULLTEXT -select * from t1 where MATCH(a,b) AGAINST ("collections"); -a b -Only MyISAM tables support collections -Full-text indexes are called collections -explain extended select * from t1 where MATCH(a,b) AGAINST ("collections"); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 fulltext a a 0 1 100.00 Using where -Warnings: -Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against (_latin1'collections')) -select * from t1 where MATCH(a,b) AGAINST ("indexes"); -a b -Full-text indexes are called collections -select * from t1 where MATCH(a,b) AGAINST ("indexes collections"); -a b -Full-text indexes are called collections -Only MyISAM tables support collections -select * from t1 where MATCH(a,b) AGAINST ("only"); -a b -reset master; -drop table t1,t2; -create table t1 (a int) engine=blackhole; -delete from t1 where a=10; -update t1 set a=11 where a=15; -insert into t1 values(1); -insert ignore into t1 values(1); -replace into t1 values(100); -create table t2 (a varchar(200)) engine=blackhole; -load data infile '../std_data_ln/words.dat' into table t2; -alter table t1 add b int; -alter table t1 drop b; -create table t3 like t1; -insert into t1 select * from t3; -replace into t1 select * from t3; -select * from t1; -a -select * from t2; -a -select * from t3; -a -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; drop table t1,t2 -master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole -master-bin.000001 # Query # # use `test`; delete from t1 where a=10 -master-bin.000001 # Query # # use `test`; update t1 set a=11 where a=15 -master-bin.000001 # Query # # use `test`; insert into t1 values(1) -master-bin.000001 # Query # # use `test`; insert ignore into t1 values(1) -master-bin.000001 # Query # # use `test`; replace into t1 values(100) -master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole -master-bin.000001 # Begin_load_query # # ;file_id=1;block_len=581 -master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/words.dat' into table t2 ;file_id=1 -master-bin.000001 # Query # # use `test`; alter table t1 add b int -master-bin.000001 # Query # # use `test`; alter table t1 drop b -master-bin.000001 # Query # # use `test`; create table t3 like t1 -master-bin.000001 # Query # # use `test`; insert into t1 select * from t3 -master-bin.000001 # Query # # use `test`; replace into t1 select * from t3 -drop table t1,t2,t3; -CREATE TABLE t1(a INT) ENGINE=BLACKHOLE; -INSERT DELAYED INTO t1 VALUES(1); -DROP TABLE t1; -CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE; -DELETE FROM t1 WHERE a=10; -ALTER TABLE t1 ADD INDEX(a); -DELETE FROM t1 WHERE a=10; -ALTER TABLE t1 DROP INDEX a; -ALTER TABLE t1 ADD UNIQUE INDEX(a); -DELETE FROM t1 WHERE a=10; -ALTER TABLE t1 DROP INDEX a; -ALTER TABLE t1 ADD PRIMARY KEY(a); -DELETE FROM t1 WHERE a=10; -DROP TABLE t1; -reset master; -create table t1 (a int) engine=blackhole; -set autocommit=0; -start transaction; -insert into t1 values(1); -commit; -start transaction; -insert into t1 values(2); -rollback; -set autocommit=1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(1) -master-bin.000001 # Query # # use `test`; COMMIT -drop table if exists t1; diff --git a/mysql-test/r/binlog_stm_ctype_cp932.result b/mysql-test/r/binlog_stm_ctype_cp932.result deleted file mode 100755 index ca70f98c0e6..00000000000 --- a/mysql-test/r/binlog_stm_ctype_cp932.result +++ /dev/null @@ -1,11377 +0,0 @@ -drop table if exists t1; -drop table if exists t2; -drop table if exists t3; -drop table if exists t4; -set names cp932; -set character_set_database = cp932; -CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = cp932; -INSERT INTO t1 VALUES -(0x05),(0x7E),(0x815C),(0x815F),(0x8160),(0x8161),(0x817C),(0x8191),(0x8192),(0x81CA); -INSERT INTO t1 VALUES -(0x8740),(0x8741),(0x8742),(0x8743),(0x8744),(0x8745),(0x8746),(0x8747), -(0x8748),(0x8749),(0x874A),(0x874B),(0x874C),(0x874D),(0x874E),(0x874F), -(0x8750),(0x8751),(0x8752),(0x8753),(0x8754),(0x8755),(0x8756),(0x8757), -(0x8758),(0x8759),(0x875A),(0x875B),(0x875C),(0x875D),(0x875F), -(0x8760),(0x8761),(0x8762),(0x8763),(0x8764),(0x8765),(0x8766),(0x8767), -(0x8768),(0x8769),(0x876A),(0x876B),(0x876C),(0x876D),(0x876E),(0x876F), -(0x8770),(0x8771),(0x8772),(0x8773),(0x8774),(0x8775),(0x877E), -(0x8780),(0x8781),(0x8782),(0x8783),(0x8784),(0x8785),(0x8786),(0x8787), -(0x8788),(0x8789),(0x878A),(0x878B),(0x878C),(0x878D),(0x878E),(0x878F), -(0x8790),(0x8791),(0x8792),(0x8793),(0x8794),(0x8795),(0x8796),(0x8797), -(0x8798),(0x8799),(0x879A),(0x879B),(0x879C); -INSERT INTO t1 VALUES -(0xED40),(0xED41),(0xED42),(0xED43),(0xED44),(0xED45),(0xED46),(0xED47), -(0xED48),(0xED49),(0xED4A),(0xED4B),(0xED4C),(0xED4D),(0xED4E),(0xED4F), -(0xED50),(0xED51),(0xED52),(0xED53),(0xED54),(0xED55),(0xED56),(0xED57), -(0xED58),(0xED59),(0xED5A),(0xED5B),(0xED5C),(0xED5D),(0xED5E),(0xED5F), -(0xED60),(0xED61),(0xED62),(0xED63),(0xED64),(0xED65),(0xED66),(0xED67), -(0xED68),(0xED69),(0xED6A),(0xED6B),(0xED6C),(0xED6D),(0xED6E),(0xED6F), -(0xED70),(0xED71),(0xED72),(0xED73),(0xED74),(0xED75),(0xED76),(0xED77), -(0xED78),(0xED79),(0xED7A),(0xED7B),(0xED7C),(0xED7D),(0xED7E), -(0xED80),(0xED81),(0xED82),(0xED83),(0xED84),(0xED85),(0xED86),(0xED87), -(0xED88),(0xED89),(0xED8A),(0xED8B),(0xED8C),(0xED8D),(0xED8E),(0xED8F), -(0xED90),(0xED91),(0xED92),(0xED93),(0xED94),(0xED95),(0xED96),(0xED97), -(0xED98),(0xED99),(0xED9A),(0xED9B),(0xED9C),(0xED9D),(0xED9E),(0xED9F), -(0xEDA0),(0xEDA1),(0xEDA2),(0xEDA3),(0xEDA4),(0xEDA5),(0xEDA6),(0xEDA7), -(0xEDA8),(0xEDA9),(0xEDAA),(0xEDAB),(0xEDAC),(0xEDAD),(0xEDAE),(0xEDAF), -(0xEDB0),(0xEDB1),(0xEDB2),(0xEDB3),(0xEDB4),(0xEDB5),(0xEDB6),(0xEDB7), -(0xEDB8),(0xEDB9),(0xEDBA),(0xEDBB),(0xEDBC),(0xEDBD),(0xEDBE),(0xEDBF), -(0xEDC0),(0xEDC1),(0xEDC2),(0xEDC3),(0xEDC4),(0xEDC5),(0xEDC6),(0xEDC7), -(0xEDC8),(0xEDC9),(0xEDCA),(0xEDCB),(0xEDCC),(0xEDCD),(0xEDCE),(0xEDCF), -(0xEDD0),(0xEDD1),(0xEDD2),(0xEDD3),(0xEDD4),(0xEDD5),(0xEDD6),(0xEDD7), -(0xEDD8),(0xEDD9),(0xEDDA),(0xEDDB),(0xEDDC),(0xEDDD),(0xEDDE),(0xEDDF), -(0xEDE0),(0xEDE1),(0xEDE2),(0xEDE3),(0xEDE4),(0xEDE5),(0xEDE6),(0xEDE7), -(0xEDE8),(0xEDE9),(0xEDEA),(0xEDEB),(0xEDEC),(0xEDED),(0xEDEE),(0xEDEF), -(0xEDF0),(0xEDF1),(0xEDF2),(0xEDF3),(0xEDF4),(0xEDF5),(0xEDF6),(0xEDF7), -(0xEDF8),(0xEDF9),(0xEDFA),(0xEDFB),(0xEDFC), -(0xEE40),(0xEE41),(0xEE42),(0xEE43),(0xEE44),(0xEE45),(0xEE46),(0xEE47), -(0xEE48),(0xEE49),(0xEE4A),(0xEE4B),(0xEE4C),(0xEE4D),(0xEE4E),(0xEE4F), -(0xEE50),(0xEE51),(0xEE52),(0xEE53),(0xEE54),(0xEE55),(0xEE56),(0xEE57), -(0xEE58),(0xEE59),(0xEE5A),(0xEE5B),(0xEE5C),(0xEE5D),(0xEE5E),(0xEE5F), -(0xEE60),(0xEE61),(0xEE62),(0xEE63),(0xEE64),(0xEE65),(0xEE66),(0xEE67), -(0xEE68),(0xEE69),(0xEE6A),(0xEE6B),(0xEE6C),(0xEE6D),(0xEE6E),(0xEE6F), -(0xEE70),(0xEE71),(0xEE72),(0xEE73),(0xEE74),(0xEE75),(0xEE76),(0xEE77), -(0xEE78),(0xEE79),(0xEE7A),(0xEE7B),(0xEE7C),(0xEE7D),(0xEE7E), -(0xEE80),(0xEE81),(0xEE82),(0xEE83),(0xEE84),(0xEE85),(0xEE86),(0xEE87), -(0xEE88),(0xEE89),(0xEE8A),(0xEE8B),(0xEE8C),(0xEE8D),(0xEE8E),(0xEE8F), -(0xEE90),(0xEE91),(0xEE92),(0xEE93),(0xEE94),(0xEE95),(0xEE96),(0xEE97), -(0xEE98),(0xEE99),(0xEE9A),(0xEE9B),(0xEE9C),(0xEE9D),(0xEE9E),(0xEE9F), -(0xEEA0),(0xEEA1),(0xEEA2),(0xEEA3),(0xEEA4),(0xEEA5),(0xEEA6),(0xEEA7), -(0xEEA8),(0xEEA9),(0xEEAA),(0xEEAB),(0xEEAC),(0xEEAD),(0xEEAE),(0xEEAF), -(0xEEB0),(0xEEB1),(0xEEB2),(0xEEB3),(0xEEB4),(0xEEB5),(0xEEB6),(0xEEB7), -(0xEEB8),(0xEEB9),(0xEEBA),(0xEEBB),(0xEEBC),(0xEEBD),(0xEEBE),(0xEEBF), -(0xEEC0),(0xEEC1),(0xEEC2),(0xEEC3),(0xEEC4),(0xEEC5),(0xEEC6),(0xEEC7), -(0xEEC8),(0xEEC9),(0xEECA),(0xEECB),(0xEECC),(0xEECD),(0xEECE),(0xEECF), -(0xEED0),(0xEED1),(0xEED2),(0xEED3),(0xEED4),(0xEED5),(0xEED6),(0xEED7), -(0xEED8),(0xEED9),(0xEEDA),(0xEEDB),(0xEEDC),(0xEEDD),(0xEEDE),(0xEEDF), -(0xEEE0),(0xEEE1),(0xEEE2),(0xEEE3),(0xEEE4),(0xEEE5),(0xEEE6),(0xEEE7), -(0xEEE8),(0xEEE9),(0xEEEA),(0xEEEB),(0xEEEC),(0xEEEF), -(0xEEF0),(0xEEF1),(0xEEF2),(0xEEF3),(0xEEF4),(0xEEF5),(0xEEF6),(0xEEF7), -(0xEEF8),(0xEEF9),(0xEEFA),(0xEEFB),(0xEEFC); -INSERT INTO t1 VALUES -(0xFA40),(0xFA41),(0xFA42),(0xFA43),(0xFA44),(0xFA45),(0xFA46),(0xFA47), -(0xFA48),(0xFA49),(0xFA4A),(0xFA4B),(0xFA4C),(0xFA4D),(0xFA4E),(0xFA4F), -(0xFA50),(0xFA51),(0xFA52),(0xFA53),(0xFA54),(0xFA55),(0xFA56),(0xFA57), -(0xFA58),(0xFA59),(0xFA5A),(0xFA5B),(0xFA5C),(0xFA5D),(0xFA5E),(0xFA5F), -(0xFA60),(0xFA61),(0xFA62),(0xFA63),(0xFA64),(0xFA65),(0xFA66),(0xFA67), -(0xFA68),(0xFA69),(0xFA6A),(0xFA6B),(0xFA6C),(0xFA6D),(0xFA6E),(0xFA6F), -(0xFA70),(0xFA71),(0xFA72),(0xFA73),(0xFA74),(0xFA75),(0xFA76),(0xFA77), -(0xFA78),(0xFA79),(0xFA7A),(0xFA7B),(0xFA7C),(0xFA7D),(0xFA7E), -(0xFA80),(0xFA81),(0xFA82),(0xFA83),(0xFA84),(0xFA85),(0xFA86),(0xFA87), -(0xFA88),(0xFA89),(0xFA8A),(0xFA8B),(0xFA8C),(0xFA8D),(0xFA8E),(0xFA8F), -(0xFA90),(0xFA91),(0xFA92),(0xFA93),(0xFA94),(0xFA95),(0xFA96),(0xFA97), -(0xFA98),(0xFA99),(0xFA9A),(0xFA9B),(0xFA9C),(0xFA9D),(0xFA9E),(0xFA9F), -(0xFAA0),(0xFAA1),(0xFAA2),(0xFAA3),(0xFAA4),(0xFAA5),(0xFAA6),(0xFAA7), -(0xFAA8),(0xFAA9),(0xFAAA),(0xFAAB),(0xFAAC),(0xFAAD),(0xFAAE),(0xFAAF), -(0xFAB0),(0xFAB1),(0xFAB2),(0xFAB3),(0xFAB4),(0xFAB5),(0xFAB6),(0xFAB7), -(0xFAB8),(0xFAB9),(0xFABA),(0xFABB),(0xFABC),(0xFABD),(0xFABE),(0xFABF), -(0xFAC0),(0xFAC1),(0xFAC2),(0xFAC3),(0xFAC4),(0xFAC5),(0xFAC6),(0xFAC7), -(0xFAC8),(0xFAC9),(0xFACA),(0xFACB),(0xFACC),(0xFACD),(0xFACE),(0xFACF), -(0xFAD0),(0xFAD1),(0xFAD2),(0xFAD3),(0xFAD4),(0xFAD5),(0xFAD6),(0xFAD7), -(0xFAD8),(0xFAD9),(0xFADA),(0xFADB),(0xFADC),(0xFADD),(0xFADE),(0xFADF), -(0xFAE0),(0xFAE1),(0xFAE2),(0xFAE3),(0xFAE4),(0xFAE5),(0xFAE6),(0xFAE7), -(0xFAE8),(0xFAE9),(0xFAEA),(0xFAEB),(0xFAEC),(0xFAED),(0xFAEE),(0xFAEF), -(0xFAF0),(0xFAF1),(0xFAF2),(0xFAF3),(0xFAF4),(0xFAF5),(0xFAF6),(0xFAF7), -(0xFAF8),(0xFAF9),(0xFAFA),(0xFAFB),(0xFAFC), -(0xFB40),(0xFB41),(0xFB42),(0xFB43),(0xFB44),(0xFB45),(0xFB46),(0xFB47), -(0xFB48),(0xFB49),(0xFB4A),(0xFB4B),(0xFB4C),(0xFB4D),(0xFB4E),(0xFB4F), -(0xFB50),(0xFB51),(0xFB52),(0xFB53),(0xFB54),(0xFB55),(0xFB56),(0xFB57), -(0xFB58),(0xFB59),(0xFB5A),(0xFB5B),(0xFB5C),(0xFB5D),(0xFB5E),(0xFB5F), -(0xFB60),(0xFB61),(0xFB62),(0xFB63),(0xFB64),(0xFB65),(0xFB66),(0xFB67), -(0xFB68),(0xFB69),(0xFB6A),(0xFB6B),(0xFB6C),(0xFB6D),(0xFB6E),(0xFB6F), -(0xFB70),(0xFB71),(0xFB72),(0xFB73),(0xFB74),(0xFB75),(0xFB76),(0xFB77), -(0xFB78),(0xFB79),(0xFB7A),(0xFB7B),(0xFB7C),(0xFB7D),(0xFB7E), -(0xFB80),(0xFB81),(0xFB82),(0xFB83),(0xFB84),(0xFB85),(0xFB86),(0xFB87), -(0xFB88),(0xFB89),(0xFB8A),(0xFB8B),(0xFB8C),(0xFB8D),(0xFB8E),(0xFB8F), -(0xFB90),(0xFB91),(0xFB92),(0xFB93),(0xFB94),(0xFB95),(0xFB96),(0xFB97), -(0xFB98),(0xFB99),(0xFB9A),(0xFB9B),(0xFB9C),(0xFB9D),(0xFB9E),(0xFB9F), -(0xFBA0),(0xFBA1),(0xFBA2),(0xFBA3),(0xFBA4),(0xFBA5),(0xFBA6),(0xFBA7), -(0xFBA8),(0xFBA9),(0xFBAA),(0xFBAB),(0xFBAC),(0xFBAD),(0xFBAE),(0xFBAF), -(0xFBB0),(0xFBB1),(0xFBB2),(0xFBB3),(0xFBB4),(0xFBB5),(0xFBB6),(0xFBB7), -(0xFBB8),(0xFBB9),(0xFBBA),(0xFBBB),(0xFBBC),(0xFBBD),(0xFBBE),(0xFBBF), -(0xFBC0),(0xFBC1),(0xFBC2),(0xFBC3),(0xFBC4),(0xFBC5),(0xFBC6),(0xFBC7), -(0xFBC8),(0xFBC9),(0xFBCA),(0xFBCB),(0xFBCC),(0xFBCD),(0xFBCE),(0xFBCF), -(0xFBD0),(0xFBD1),(0xFBD2),(0xFBD3),(0xFBD4),(0xFBD5),(0xFBD6),(0xFBD7), -(0xFBD8),(0xFBD9),(0xFBDA),(0xFBDB),(0xFBDC),(0xFBDD),(0xFBDE),(0xFBDF), -(0xFBE0),(0xFBE1),(0xFBE2),(0xFBE3),(0xFBE4),(0xFBE5),(0xFBE6),(0xFBE7), -(0xFBE8),(0xFBE9),(0xFBEA),(0xFBEB),(0xFBEC),(0xFBED),(0xFBEE),(0xFBEF), -(0xFBF0),(0xFBF1),(0xFBF2),(0xFBF3),(0xFBF4),(0xFBF5),(0xFBF6),(0xFBF7), -(0xFBF8),(0xFBF9),(0xFBFA),(0xFBFB),(0xFBFC), -(0xFC40),(0xFC41),(0xFC42),(0xFC43),(0xFC44),(0xFC45),(0xFC46),(0xFC47), -(0xFC48),(0xFC49),(0xFC4A),(0xFC4B); -INSERT INTO t1 VALUES -(0xF040),(0xF041),(0xF042),(0xF043),(0xF044),(0xF045),(0xF046),(0xF047), -(0xF048),(0xF049),(0xF04A),(0xF04B),(0xF04C),(0xF04D),(0xF04E),(0xF04F), -(0xF050),(0xF051),(0xF052),(0xF053),(0xF054),(0xF055),(0xF056),(0xF057), -(0xF058),(0xF059),(0xF05A),(0xF05B),(0xF05C),(0xF05D),(0xF05E),(0xF05F), -(0xF060),(0xF061),(0xF062),(0xF063),(0xF064),(0xF065),(0xF066),(0xF067), -(0xF068),(0xF069),(0xF06A),(0xF06B),(0xF06C),(0xF06D),(0xF06E),(0xF06F), -(0xF070),(0xF071),(0xF072),(0xF073),(0xF074),(0xF075),(0xF076),(0xF077), -(0xF078),(0xF079),(0xF07A),(0xF07B),(0xF07C),(0xF07D),(0xF07E), -(0xF080),(0xF081),(0xF082),(0xF083),(0xF084),(0xF085),(0xF086),(0xF087), -(0xF088),(0xF089),(0xF08A),(0xF08B),(0xF08C),(0xF08D),(0xF08E),(0xF08F), -(0xF090),(0xF091),(0xF092),(0xF093),(0xF094),(0xF095),(0xF096),(0xF097), -(0xF098),(0xF099),(0xF09A),(0xF09B),(0xF09C),(0xF09D),(0xF09E),(0xF09F), -(0xF0A0),(0xF0A1),(0xF0A2),(0xF0A3),(0xF0A4),(0xF0A5),(0xF0A6),(0xF0A7), -(0xF0A8),(0xF0A9),(0xF0AA),(0xF0AB),(0xF0AC),(0xF0AD),(0xF0AE),(0xF0AF), -(0xF0B0),(0xF0B1),(0xF0B2),(0xF0B3),(0xF0B4),(0xF0B5),(0xF0B6),(0xF0B7), -(0xF0B8),(0xF0B9),(0xF0BA),(0xF0BB),(0xF0BC),(0xF0BD),(0xF0BE),(0xF0BF), -(0xF0C0),(0xF0C1),(0xF0C2),(0xF0C3),(0xF0C4),(0xF0C5),(0xF0C6),(0xF0C7), -(0xF0C8),(0xF0C9),(0xF0CA),(0xF0CB),(0xF0CC),(0xF0CD),(0xF0CE),(0xF0CF), -(0xF0D0),(0xF0D1),(0xF0D2),(0xF0D3),(0xF0D4),(0xF0D5),(0xF0D6),(0xF0D7), -(0xF0D8),(0xF0D9),(0xF0DA),(0xF0DB),(0xF0DC),(0xF0DD),(0xF0DE),(0xF0DF), -(0xF0E0),(0xF0E1),(0xF0E2),(0xF0E3),(0xF0E4),(0xF0E5),(0xF0E6),(0xF0E7), -(0xF0E8),(0xF0E9),(0xF0EA),(0xF0EB),(0xF0EC),(0xF0ED),(0xF0EE),(0xF0EF), -(0xF0F0),(0xF0F1),(0xF0F2),(0xF0F3),(0xF0F4),(0xF0F5),(0xF0F6),(0xF0F7), -(0xF0F8),(0xF0F9),(0xF0FA),(0xF0FB),(0xF0FC), -(0xF140),(0xF141),(0xF142),(0xF143),(0xF144),(0xF145),(0xF146),(0xF147), -(0xF148),(0xF149),(0xF14A),(0xF14B),(0xF14C),(0xF14D),(0xF14E),(0xF14F), -(0xF150),(0xF151),(0xF152),(0xF153),(0xF154),(0xF155),(0xF156),(0xF157), -(0xF158),(0xF159),(0xF15A),(0xF15B),(0xF15C),(0xF15D),(0xF15E),(0xF15F), -(0xF160),(0xF161),(0xF162),(0xF163),(0xF164),(0xF165),(0xF166),(0xF167), -(0xF168),(0xF169),(0xF16A),(0xF16B),(0xF16C),(0xF16D),(0xF16E),(0xF16F), -(0xF170),(0xF171),(0xF172),(0xF173),(0xF174),(0xF175),(0xF176),(0xF177), -(0xF178),(0xF179),(0xF17A),(0xF17B),(0xF17C),(0xF17D),(0xF17E), -(0xF180),(0xF181),(0xF182),(0xF183),(0xF184),(0xF185),(0xF186),(0xF187), -(0xF188),(0xF189),(0xF18A),(0xF18B),(0xF18C),(0xF18D),(0xF18E),(0xF18F), -(0xF190),(0xF191),(0xF192),(0xF193),(0xF194),(0xF195),(0xF196),(0xF197), -(0xF198),(0xF199),(0xF19A),(0xF19B),(0xF19C),(0xF19D),(0xF19E),(0xF19F), -(0xF1A0),(0xF1A1),(0xF1A2),(0xF1A3),(0xF1A4),(0xF1A5),(0xF1A6),(0xF1A7), -(0xF1A8),(0xF1A9),(0xF1AA),(0xF1AB),(0xF1AC),(0xF1AD),(0xF1AE),(0xF1AF), -(0xF1B0),(0xF1B1),(0xF1B2),(0xF1B3),(0xF1B4),(0xF1B5),(0xF1B6),(0xF1B7), -(0xF1B8),(0xF1B9),(0xF1BA),(0xF1BB),(0xF1BC),(0xF1BD),(0xF1BE),(0xF1BF), -(0xF1C0),(0xF1C1),(0xF1C2),(0xF1C3),(0xF1C4),(0xF1C5),(0xF1C6),(0xF1C7), -(0xF1C8),(0xF1C9),(0xF1CA),(0xF1CB),(0xF1CC),(0xF1CD),(0xF1CE),(0xF1CF), -(0xF1D0),(0xF1D1),(0xF1D2),(0xF1D3),(0xF1D4),(0xF1D5),(0xF1D6),(0xF1D7), -(0xF1D8),(0xF1D9),(0xF1DA),(0xF1DB),(0xF1DC),(0xF1DD),(0xF1DE),(0xF1DF), -(0xF1E0),(0xF1E1),(0xF1E2),(0xF1E3),(0xF1E4),(0xF1E5),(0xF1E6),(0xF1E7), -(0xF1E8),(0xF1E9),(0xF1EA),(0xF1EB),(0xF1EC),(0xF1ED),(0xF1EE),(0xF1EF), -(0xF1F0),(0xF1F1),(0xF1F2),(0xF1F3),(0xF1F4),(0xF1F5),(0xF1F6),(0xF1F7), -(0xF1F8),(0xF1F9),(0xF1FA),(0xF1FB),(0xF1FC), -(0xF240),(0xF241),(0xF242),(0xF243),(0xF244),(0xF245),(0xF246),(0xF247), -(0xF248),(0xF249),(0xF24A),(0xF24B),(0xF24C),(0xF24D),(0xF24E),(0xF24F), -(0xF250),(0xF251),(0xF252),(0xF253),(0xF254),(0xF255),(0xF256),(0xF257), -(0xF258),(0xF259),(0xF25A),(0xF25B),(0xF25C),(0xF25D),(0xF25E),(0xF25F), -(0xF260),(0xF261),(0xF262),(0xF263),(0xF264),(0xF265),(0xF266),(0xF267), -(0xF268),(0xF269),(0xF26A),(0xF26B),(0xF26C),(0xF26D),(0xF26E),(0xF26F), -(0xF270),(0xF271),(0xF272),(0xF273),(0xF274),(0xF275),(0xF276),(0xF277), -(0xF278),(0xF279),(0xF27A),(0xF27B),(0xF27C),(0xF27D),(0xF27E), -(0xF280),(0xF281),(0xF282),(0xF283),(0xF284),(0xF285),(0xF286),(0xF287), -(0xF288),(0xF289),(0xF28A),(0xF28B),(0xF28C),(0xF28D),(0xF28E),(0xF28F), -(0xF290),(0xF291),(0xF292),(0xF293),(0xF294),(0xF295),(0xF296),(0xF297), -(0xF298),(0xF299),(0xF29A),(0xF29B),(0xF29C),(0xF29D),(0xF29E),(0xF29F), -(0xF2A0),(0xF2A1),(0xF2A2),(0xF2A3),(0xF2A4),(0xF2A5),(0xF2A6),(0xF2A7), -(0xF2A8),(0xF2A9),(0xF2AA),(0xF2AB),(0xF2AC),(0xF2AD),(0xF2AE),(0xF2AF), -(0xF2B0),(0xF2B1),(0xF2B2),(0xF2B3),(0xF2B4),(0xF2B5),(0xF2B6),(0xF2B7), -(0xF2B8),(0xF2B9),(0xF2BA),(0xF2BB),(0xF2BC),(0xF2BD),(0xF2BE),(0xF2BF), -(0xF2C0),(0xF2C1),(0xF2C2),(0xF2C3),(0xF2C4),(0xF2C5),(0xF2C6),(0xF2C7), -(0xF2C8),(0xF2C9),(0xF2CA),(0xF2CB),(0xF2CC),(0xF2CD),(0xF2CE),(0xF2CF), -(0xF2D0),(0xF2D1),(0xF2D2),(0xF2D3),(0xF2D4),(0xF2D5),(0xF2D6),(0xF2D7), -(0xF2D8),(0xF2D9),(0xF2DA),(0xF2DB),(0xF2DC),(0xF2DD),(0xF2DE),(0xF2DF), -(0xF2E0),(0xF2E1),(0xF2E2),(0xF2E3),(0xF2E4),(0xF2E5),(0xF2E6),(0xF2E7), -(0xF2E8),(0xF2E9),(0xF2EA),(0xF2EB),(0xF2EC),(0xF2ED),(0xF2EE),(0xF2EF), -(0xF2F0),(0xF2F1),(0xF2F2),(0xF2F3),(0xF2F4),(0xF2F5),(0xF2F6),(0xF2F7), -(0xF2F8),(0xF2F9),(0xF2FA),(0xF2FB),(0xF2FC), -(0xF340),(0xF341),(0xF342),(0xF343),(0xF344),(0xF345),(0xF346),(0xF347), -(0xF348),(0xF349),(0xF34A),(0xF34B),(0xF34C),(0xF34D),(0xF34E),(0xF34F), -(0xF350),(0xF351),(0xF352),(0xF353),(0xF354),(0xF355),(0xF356),(0xF357), -(0xF358),(0xF359),(0xF35A),(0xF35B),(0xF35C),(0xF35D),(0xF35E),(0xF35F), -(0xF360),(0xF361),(0xF362),(0xF363),(0xF364),(0xF365),(0xF366),(0xF367), -(0xF368),(0xF369),(0xF36A),(0xF36B),(0xF36C),(0xF36D),(0xF36E),(0xF36F), -(0xF370),(0xF371),(0xF372),(0xF373),(0xF374),(0xF375),(0xF376),(0xF377), -(0xF378),(0xF379),(0xF37A),(0xF37B),(0xF37C),(0xF37D),(0xF37E), -(0xF380),(0xF381),(0xF382),(0xF383),(0xF384),(0xF385),(0xF386),(0xF387), -(0xF388),(0xF389),(0xF38A),(0xF38B),(0xF38C),(0xF38D),(0xF38E),(0xF38F), -(0xF390),(0xF391),(0xF392),(0xF393),(0xF394),(0xF395),(0xF396),(0xF397), -(0xF398),(0xF399),(0xF39A),(0xF39B),(0xF39C),(0xF39D),(0xF39E),(0xF39F), -(0xF3A0),(0xF3A1),(0xF3A2),(0xF3A3),(0xF3A4),(0xF3A5),(0xF3A6),(0xF3A7), -(0xF3A8),(0xF3A9),(0xF3AA),(0xF3AB),(0xF3AC),(0xF3AD),(0xF3AE),(0xF3AF), -(0xF3B0),(0xF3B1),(0xF3B2),(0xF3B3),(0xF3B4),(0xF3B5),(0xF3B6),(0xF3B7), -(0xF3B8),(0xF3B9),(0xF3BA),(0xF3BB),(0xF3BC),(0xF3BD),(0xF3BE),(0xF3BF), -(0xF3C0),(0xF3C1),(0xF3C2),(0xF3C3),(0xF3C4),(0xF3C5),(0xF3C6),(0xF3C7), -(0xF3C8),(0xF3C9),(0xF3CA),(0xF3CB),(0xF3CC),(0xF3CD),(0xF3CE),(0xF3CF), -(0xF3D0),(0xF3D1),(0xF3D2),(0xF3D3),(0xF3D4),(0xF3D5),(0xF3D6),(0xF3D7), -(0xF3D8),(0xF3D9),(0xF3DA),(0xF3DB),(0xF3DC),(0xF3DD),(0xF3DE),(0xF3DF), -(0xF3E0),(0xF3E1),(0xF3E2),(0xF3E3),(0xF3E4),(0xF3E5),(0xF3E6),(0xF3E7), -(0xF3E8),(0xF3E9),(0xF3EA),(0xF3EB),(0xF3EC),(0xF3ED),(0xF3EE),(0xF3EF), -(0xF3F0),(0xF3F1),(0xF3F2),(0xF3F3),(0xF3F4),(0xF3F5),(0xF3F6),(0xF3F7), -(0xF3F8),(0xF3F9),(0xF3FA),(0xF3FB),(0xF3FC), -(0xF440),(0xF441),(0xF442),(0xF443),(0xF444),(0xF445),(0xF446),(0xF447), -(0xF448),(0xF449),(0xF44A),(0xF44B),(0xF44C),(0xF44D),(0xF44E),(0xF44F), -(0xF450),(0xF451),(0xF452),(0xF453),(0xF454),(0xF455),(0xF456),(0xF457), -(0xF458),(0xF459),(0xF45A),(0xF45B),(0xF45C),(0xF45D),(0xF45E),(0xF45F), -(0xF460),(0xF461),(0xF462),(0xF463),(0xF464),(0xF465),(0xF466),(0xF467), -(0xF468),(0xF469),(0xF46A),(0xF46B),(0xF46C),(0xF46D),(0xF46E),(0xF46F), -(0xF470),(0xF471),(0xF472),(0xF473),(0xF474),(0xF475),(0xF476),(0xF477), -(0xF478),(0xF479),(0xF47A),(0xF47B),(0xF47C),(0xF47D),(0xF47E), -(0xF480),(0xF481),(0xF482),(0xF483),(0xF484),(0xF485),(0xF486),(0xF487), -(0xF488),(0xF489),(0xF48A),(0xF48B),(0xF48C),(0xF48D),(0xF48E),(0xF48F), -(0xF490),(0xF491),(0xF492),(0xF493),(0xF494),(0xF495),(0xF496),(0xF497), -(0xF498),(0xF499),(0xF49A),(0xF49B),(0xF49C),(0xF49D),(0xF49E),(0xF49F), -(0xF4A0),(0xF4A1),(0xF4A2),(0xF4A3),(0xF4A4),(0xF4A5),(0xF4A6),(0xF4A7), -(0xF4A8),(0xF4A9),(0xF4AA),(0xF4AB),(0xF4AC),(0xF4AD),(0xF4AE),(0xF4AF), -(0xF4B0),(0xF4B1),(0xF4B2),(0xF4B3),(0xF4B4),(0xF4B5),(0xF4B6),(0xF4B7), -(0xF4B8),(0xF4B9),(0xF4BA),(0xF4BB),(0xF4BC),(0xF4BD),(0xF4BE),(0xF4BF), -(0xF4C0),(0xF4C1),(0xF4C2),(0xF4C3),(0xF4C4),(0xF4C5),(0xF4C6),(0xF4C7), -(0xF4C8),(0xF4C9),(0xF4CA),(0xF4CB),(0xF4CC),(0xF4CD),(0xF4CE),(0xF4CF), -(0xF4D0),(0xF4D1),(0xF4D2),(0xF4D3),(0xF4D4),(0xF4D5),(0xF4D6),(0xF4D7), -(0xF4D8),(0xF4D9),(0xF4DA),(0xF4DB),(0xF4DC),(0xF4DD),(0xF4DE),(0xF4DF), -(0xF4E0),(0xF4E1),(0xF4E2),(0xF4E3),(0xF4E4),(0xF4E5),(0xF4E6),(0xF4E7), -(0xF4E8),(0xF4E9),(0xF4EA),(0xF4EB),(0xF4EC),(0xF4ED),(0xF4EE),(0xF4EF), -(0xF4F0),(0xF4F1),(0xF4F2),(0xF4F3),(0xF4F4),(0xF4F5),(0xF4F6),(0xF4F7), -(0xF4F8),(0xF4F9),(0xF4FA),(0xF4FB),(0xF4FC), -(0xF540),(0xF541),(0xF542),(0xF543),(0xF544),(0xF545),(0xF546),(0xF547), -(0xF548),(0xF549),(0xF54A),(0xF54B),(0xF54C),(0xF54D),(0xF54E),(0xF54F), -(0xF550),(0xF551),(0xF552),(0xF553),(0xF554),(0xF555),(0xF556),(0xF557), -(0xF558),(0xF559),(0xF55A),(0xF55B),(0xF55C),(0xF55D),(0xF55E),(0xF55F), -(0xF560),(0xF561),(0xF562),(0xF563),(0xF564),(0xF565),(0xF566),(0xF567), -(0xF568),(0xF569),(0xF56A),(0xF56B),(0xF56C),(0xF56D),(0xF56E),(0xF56F), -(0xF570),(0xF571),(0xF572),(0xF573),(0xF574),(0xF575),(0xF576),(0xF577), -(0xF578),(0xF579),(0xF57A),(0xF57B),(0xF57C),(0xF57D),(0xF57E), -(0xF580),(0xF581),(0xF582),(0xF583),(0xF584),(0xF585),(0xF586),(0xF587), -(0xF588),(0xF589),(0xF58A),(0xF58B),(0xF58C),(0xF58D),(0xF58E),(0xF58F), -(0xF590),(0xF591),(0xF592),(0xF593),(0xF594),(0xF595),(0xF596),(0xF597), -(0xF598),(0xF599),(0xF59A),(0xF59B),(0xF59C),(0xF59D),(0xF59E),(0xF59F), -(0xF5A0),(0xF5A1),(0xF5A2),(0xF5A3),(0xF5A4),(0xF5A5),(0xF5A6),(0xF5A7), -(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE),(0xF5AF), -(0xF5B0),(0xF5B1),(0xF5B2),(0xF5B3),(0xF5B4),(0xF5B5),(0xF5B6),(0xF5B7), -(0xF5B8),(0xF5B9),(0xF5BA),(0xF5BB),(0xF5BC),(0xF5BD),(0xF5BE),(0xF5BF), -(0xF5C0),(0xF5C1),(0xF5C2),(0xF5C3),(0xF5C4),(0xF5C5),(0xF5C6),(0xF5C7), -(0xF5C8),(0xF5C9),(0xF5CA),(0xF5CB),(0xF5CC),(0xF5CD),(0xF5CE),(0xF5CF), -(0xF5D0),(0xF5D1),(0xF5D2),(0xF5D3),(0xF5D4),(0xF5D5),(0xF5D6),(0xF5D7), -(0xF5D8),(0xF5D9),(0xF5DA),(0xF5DB),(0xF5DC),(0xF5DD),(0xF5DE),(0xF5DF), -(0xF5E0),(0xF5E1),(0xF5E2),(0xF5E3),(0xF5E4),(0xF5E5),(0xF5E6),(0xF5E7), -(0xF5E8),(0xF5E9),(0xF5EA),(0xF5EB),(0xF5EC),(0xF5ED),(0xF5EE),(0xF5EF), -(0xF5F0),(0xF5F1),(0xF5F2),(0xF5F3),(0xF5F4),(0xF5F5),(0xF5F6),(0xF5F7), -(0xF5F8),(0xF5F9),(0xF5FA),(0xF5FB),(0xF5FC), -(0xF640),(0xF641),(0xF642),(0xF643),(0xF644),(0xF645),(0xF646),(0xF647), -(0xF648),(0xF649),(0xF64A),(0xF64B),(0xF64C),(0xF64D),(0xF64E),(0xF64F), -(0xF650),(0xF651),(0xF652),(0xF653),(0xF654),(0xF655),(0xF656),(0xF657), -(0xF658),(0xF659),(0xF65A),(0xF65B),(0xF65C),(0xF65D),(0xF65E),(0xF65F), -(0xF660),(0xF661),(0xF662),(0xF663),(0xF664),(0xF665),(0xF666),(0xF667), -(0xF668),(0xF669),(0xF66A),(0xF66B),(0xF66C),(0xF66D),(0xF66E),(0xF66F), -(0xF670),(0xF671),(0xF672),(0xF673),(0xF674),(0xF675),(0xF676),(0xF677), -(0xF678),(0xF679),(0xF67A),(0xF67B),(0xF67C),(0xF67D),(0xF67E), -(0xF680),(0xF681),(0xF682),(0xF683),(0xF684),(0xF685),(0xF686),(0xF687), -(0xF688),(0xF689),(0xF68A),(0xF68B),(0xF68C),(0xF68D),(0xF68E),(0xF68F), -(0xF690),(0xF691),(0xF692),(0xF693),(0xF694),(0xF695),(0xF696),(0xF697), -(0xF698),(0xF699),(0xF69A),(0xF69B),(0xF69C),(0xF69D),(0xF69E),(0xF69F), -(0xF6A0),(0xF6A1),(0xF6A2),(0xF6A3),(0xF6A4),(0xF6A5),(0xF6A6),(0xF6A7), -(0xF6A8),(0xF6A9),(0xF6AA),(0xF6AB),(0xF6AC),(0xF6AD),(0xF6AE),(0xF6AF), -(0xF6B0),(0xF6B1),(0xF6B2),(0xF6B3),(0xF6B4),(0xF6B5),(0xF6B6),(0xF6B7), -(0xF6B8),(0xF6B9),(0xF6BA),(0xF6BB),(0xF6BC),(0xF6BD),(0xF6BE),(0xF6BF), -(0xF6C0),(0xF6C1),(0xF6C2),(0xF6C3),(0xF6C4),(0xF6C5),(0xF6C6),(0xF6C7), -(0xF6C8),(0xF6C9),(0xF6CA),(0xF6CB),(0xF6CC),(0xF6CD),(0xF6CE),(0xF6CF), -(0xF6D0),(0xF6D1),(0xF6D2),(0xF6D3),(0xF6D4),(0xF6D5),(0xF6D6),(0xF6D7), -(0xF6D8),(0xF6D9),(0xF6DA),(0xF6DB),(0xF6DC),(0xF6DD),(0xF6DE),(0xF6DF), -(0xF6E0),(0xF6E1),(0xF6E2),(0xF6E3),(0xF6E4),(0xF6E5),(0xF6E6),(0xF6E7), -(0xF6E8),(0xF6E9),(0xF6EA),(0xF6EB),(0xF6EC),(0xF6ED),(0xF6EE),(0xF6EF), -(0xF6F0),(0xF6F1),(0xF6F2),(0xF6F3),(0xF6F4),(0xF6F5),(0xF6F6),(0xF6F7), -(0xF6F8),(0xF6F9),(0xF6FA),(0xF6FB),(0xF6FC), -(0xF740),(0xF741),(0xF742),(0xF743),(0xF744),(0xF745),(0xF746),(0xF747), -(0xF748),(0xF749),(0xF74A),(0xF74B),(0xF74C),(0xF74D),(0xF74E),(0xF74F), -(0xF750),(0xF751),(0xF752),(0xF753),(0xF754),(0xF755),(0xF756),(0xF757), -(0xF758),(0xF759),(0xF75A),(0xF75B),(0xF75C),(0xF75D),(0xF75E),(0xF75F), -(0xF760),(0xF761),(0xF762),(0xF763),(0xF764),(0xF765),(0xF766),(0xF767), -(0xF768),(0xF769),(0xF76A),(0xF76B),(0xF76C),(0xF76D),(0xF76E),(0xF76F), -(0xF770),(0xF771),(0xF772),(0xF773),(0xF774),(0xF775),(0xF776),(0xF777), -(0xF778),(0xF779),(0xF77A),(0xF77B),(0xF77C),(0xF77D),(0xF77E), -(0xF780),(0xF781),(0xF782),(0xF783),(0xF784),(0xF785),(0xF786),(0xF787), -(0xF788),(0xF789),(0xF78A),(0xF78B),(0xF78C),(0xF78D),(0xF78E),(0xF78F), -(0xF790),(0xF791),(0xF792),(0xF793),(0xF794),(0xF795),(0xF796),(0xF797), -(0xF798),(0xF799),(0xF79A),(0xF79B),(0xF79C),(0xF79D),(0xF79E),(0xF79F), -(0xF7A0),(0xF7A1),(0xF7A2),(0xF7A3),(0xF7A4),(0xF7A5),(0xF7A6),(0xF7A7), -(0xF7A8),(0xF7A9),(0xF7AA),(0xF7AB),(0xF7AC),(0xF7AD),(0xF7AE),(0xF7AF), -(0xF7B0),(0xF7B1),(0xF7B2),(0xF7B3),(0xF7B4),(0xF7B5),(0xF7B6),(0xF7B7), -(0xF7B8),(0xF7B9),(0xF7BA),(0xF7BB),(0xF7BC),(0xF7BD),(0xF7BE),(0xF7BF), -(0xF7C0),(0xF7C1),(0xF7C2),(0xF7C3),(0xF7C4),(0xF7C5),(0xF7C6),(0xF7C7), -(0xF7C8),(0xF7C9),(0xF7CA),(0xF7CB),(0xF7CC),(0xF7CD),(0xF7CE),(0xF7CF), -(0xF7D0),(0xF7D1),(0xF7D2),(0xF7D3),(0xF7D4),(0xF7D5),(0xF7D6),(0xF7D7), -(0xF7D8),(0xF7D9),(0xF7DA),(0xF7DB),(0xF7DC),(0xF7DD),(0xF7DE),(0xF7DF), -(0xF7E0),(0xF7E1),(0xF7E2),(0xF7E3),(0xF7E4),(0xF7E5),(0xF7E6),(0xF7E7), -(0xF7E8),(0xF7E9),(0xF7EA),(0xF7EB),(0xF7EC),(0xF7ED),(0xF7EE),(0xF7EF), -(0xF7F0),(0xF7F1),(0xF7F2),(0xF7F3),(0xF7F4),(0xF7F5),(0xF7F6),(0xF7F7), -(0xF7F8),(0xF7F9),(0xF7FA),(0xF7FB),(0xF7FC), -(0xF840),(0xF841),(0xF842),(0xF843),(0xF844),(0xF845),(0xF846),(0xF847), -(0xF848),(0xF849),(0xF84A),(0xF84B),(0xF84C),(0xF84D),(0xF84E),(0xF84F), -(0xF850),(0xF851),(0xF852),(0xF853),(0xF854),(0xF855),(0xF856),(0xF857), -(0xF858),(0xF859),(0xF85A),(0xF85B),(0xF85C),(0xF85D),(0xF85E),(0xF85F), -(0xF860),(0xF861),(0xF862),(0xF863),(0xF864),(0xF865),(0xF866),(0xF867), -(0xF868),(0xF869),(0xF86A),(0xF86B),(0xF86C),(0xF86D),(0xF86E),(0xF86F), -(0xF870),(0xF871),(0xF872),(0xF873),(0xF874),(0xF875),(0xF876),(0xF877), -(0xF878),(0xF879),(0xF87A),(0xF87B),(0xF87C),(0xF87D),(0xF87E), -(0xF880),(0xF881),(0xF882),(0xF883),(0xF884),(0xF885),(0xF886),(0xF887), -(0xF888),(0xF889),(0xF88A),(0xF88B),(0xF88C),(0xF88D),(0xF88E),(0xF88F), -(0xF890),(0xF891),(0xF892),(0xF893),(0xF894),(0xF895),(0xF896),(0xF897), -(0xF898),(0xF899),(0xF89A),(0xF89B),(0xF89C),(0xF89D),(0xF89E),(0xF89F), -(0xF8A0),(0xF8A1),(0xF8A2),(0xF8A3),(0xF8A4),(0xF8A5),(0xF8A6),(0xF8A7), -(0xF8A8),(0xF8A9),(0xF8AA),(0xF8AB),(0xF8AC),(0xF8AD),(0xF8AE),(0xF8AF), -(0xF8B0),(0xF8B1),(0xF8B2),(0xF8B3),(0xF8B4),(0xF8B5),(0xF8B6),(0xF8B7), -(0xF8B8),(0xF8B9),(0xF8BA),(0xF8BB),(0xF8BC),(0xF8BD),(0xF8BE),(0xF8BF), -(0xF8C0),(0xF8C1),(0xF8C2),(0xF8C3),(0xF8C4),(0xF8C5),(0xF8C6),(0xF8C7), -(0xF8C8),(0xF8C9),(0xF8CA),(0xF8CB),(0xF8CC),(0xF8CD),(0xF8CE),(0xF8CF), -(0xF8D0),(0xF8D1),(0xF8D2),(0xF8D3),(0xF8D4),(0xF8D5),(0xF8D6),(0xF8D7), -(0xF8D8),(0xF8D9),(0xF8DA),(0xF8DB),(0xF8DC),(0xF8DD),(0xF8DE),(0xF8DF), -(0xF8E0),(0xF8E1),(0xF8E2),(0xF8E3),(0xF8E4),(0xF8E5),(0xF8E6),(0xF8E7), -(0xF8E8),(0xF8E9),(0xF8EA),(0xF8EB),(0xF8EC),(0xF8ED),(0xF8EE),(0xF8EF), -(0xF8F0),(0xF8F1),(0xF8F2),(0xF8F3),(0xF8F4),(0xF8F5),(0xF8F6),(0xF8F7), -(0xF8F8),(0xF8F9),(0xF8FA),(0xF8FB),(0xF8FC), -(0xF940),(0xF941),(0xF942),(0xF943),(0xF944),(0xF945),(0xF946),(0xF947), -(0xF948),(0xF949),(0xF94A),(0xF94B),(0xF94C),(0xF94D),(0xF94E),(0xF94F), -(0xF950),(0xF951),(0xF952),(0xF953),(0xF954),(0xF955),(0xF956),(0xF957), -(0xF958),(0xF959),(0xF95A),(0xF95B),(0xF95C),(0xF95D),(0xF95E),(0xF95F), -(0xF960),(0xF961),(0xF962),(0xF963),(0xF964),(0xF965),(0xF966),(0xF967), -(0xF968),(0xF969),(0xF96A),(0xF96B),(0xF96C),(0xF96D),(0xF96E),(0xF96F), -(0xF970),(0xF971),(0xF972),(0xF973),(0xF974),(0xF975),(0xF976),(0xF977), -(0xF978),(0xF979),(0xF97A),(0xF97B),(0xF97C),(0xF97D),(0xF97E), -(0xF980),(0xF981),(0xF982),(0xF983),(0xF984),(0xF985),(0xF986),(0xF987), -(0xF988),(0xF989),(0xF98A),(0xF98B),(0xF98C),(0xF98D),(0xF98E),(0xF98F), -(0xF990),(0xF991),(0xF992),(0xF993),(0xF994),(0xF995),(0xF996),(0xF997), -(0xF998),(0xF999),(0xF99A),(0xF99B),(0xF99C),(0xF99D),(0xF99E),(0xF99F), -(0xF9A0),(0xF9A1),(0xF9A2),(0xF9A3),(0xF9A4),(0xF9A5),(0xF9A6),(0xF9A7), -(0xF9A8),(0xF9A9),(0xF9AA),(0xF9AB),(0xF9AC),(0xF9AD),(0xF9AE),(0xF9AF), -(0xF9B0),(0xF9B1),(0xF9B2),(0xF9B3),(0xF9B4),(0xF9B5),(0xF9B6),(0xF9B7), -(0xF9B8),(0xF9B9),(0xF9BA),(0xF9BB),(0xF9BC),(0xF9BD),(0xF9BE),(0xF9BF), -(0xF9C0),(0xF9C1),(0xF9C2),(0xF9C3),(0xF9C4),(0xF9C5),(0xF9C6),(0xF9C7), -(0xF9C8),(0xF9C9),(0xF9CA),(0xF9CB),(0xF9CC),(0xF9CD),(0xF9CE),(0xF9CF), -(0xF9D0),(0xF9D1),(0xF9D2),(0xF9D3),(0xF9D4),(0xF9D5),(0xF9D6),(0xF9D7), -(0xF9D8),(0xF9D9),(0xF9DA),(0xF9DB),(0xF9DC),(0xF9DD),(0xF9DE),(0xF9DF), -(0xF9E0),(0xF9E1),(0xF9E2),(0xF9E3),(0xF9E4),(0xF9E5),(0xF9E6),(0xF9E7), -(0xF9E8),(0xF9E9),(0xF9EA),(0xF9EB),(0xF9EC),(0xF9ED),(0xF9EE),(0xF9EF), -(0xF9F0),(0xF9F1),(0xF9F2),(0xF9F3),(0xF9F4),(0xF9F5),(0xF9F6),(0xF9F7), -(0xF9F8),(0xF9F9),(0xF9FA),(0xF9FB),(0xF9FC); -SELECT HEX(c1) FROM t1; -HEX(c1) -05 -7E -815C -815F -8160 -8161 -817C -8191 -8192 -81CA -8740 -8741 -8742 -8743 -8744 -8745 -8746 -8747 -8748 -8749 -874A -874B -874C -874D -874E -874F -8750 -8751 -8752 -8753 -8754 -8755 -8756 -8757 -8758 -8759 -875A -875B -875C -875D -875F -8760 -8761 -8762 -8763 -8764 -8765 -8766 -8767 -8768 -8769 -876A -876B -876C -876D -876E -876F -8770 -8771 -8772 -8773 -8774 -8775 -877E -8780 -8781 -8782 -8783 -8784 -8785 -8786 -8787 -8788 -8789 -878A -878B -878C -878D -878E -878F -8790 -8791 -8792 -8793 -8794 -8795 -8796 -8797 -8798 -8799 -879A -879B -879C -ED40 -ED41 -ED42 -ED43 -ED44 -ED45 -ED46 -ED47 -ED48 -ED49 -ED4A -ED4B -ED4C -ED4D -ED4E -ED4F -ED50 -ED51 -ED52 -ED53 -ED54 -ED55 -ED56 -ED57 -ED58 -ED59 -ED5A -ED5B -ED5C -ED5D -ED5E -ED5F -ED60 -ED61 -ED62 -ED63 -ED64 -ED65 -ED66 -ED67 -ED68 -ED69 -ED6A -ED6B -ED6C -ED6D -ED6E -ED6F -ED70 -ED71 -ED72 -ED73 -ED74 -ED75 -ED76 -ED77 -ED78 -ED79 -ED7A -ED7B -ED7C -ED7D -ED7E -ED80 -ED81 -ED82 -ED83 -ED84 -ED85 -ED86 -ED87 -ED88 -ED89 -ED8A -ED8B -ED8C -ED8D -ED8E -ED8F -ED90 -ED91 -ED92 -ED93 -ED94 -ED95 -ED96 -ED97 -ED98 -ED99 -ED9A -ED9B -ED9C -ED9D -ED9E -ED9F -EDA0 -EDA1 -EDA2 -EDA3 -EDA4 -EDA5 -EDA6 -EDA7 -EDA8 -EDA9 -EDAA -EDAB -EDAC -EDAD -EDAE -EDAF -EDB0 -EDB1 -EDB2 -EDB3 -EDB4 -EDB5 -EDB6 -EDB7 -EDB8 -EDB9 -EDBA -EDBB -EDBC -EDBD -EDBE -EDBF -EDC0 -EDC1 -EDC2 -EDC3 -EDC4 -EDC5 -EDC6 -EDC7 -EDC8 -EDC9 -EDCA -EDCB -EDCC -EDCD -EDCE -EDCF -EDD0 -EDD1 -EDD2 -EDD3 -EDD4 -EDD5 -EDD6 -EDD7 -EDD8 -EDD9 -EDDA -EDDB -EDDC -EDDD -EDDE -EDDF -EDE0 -EDE1 -EDE2 -EDE3 -EDE4 -EDE5 -EDE6 -EDE7 -EDE8 -EDE9 -EDEA -EDEB -EDEC -EDED -EDEE -EDEF -EDF0 -EDF1 -EDF2 -EDF3 -EDF4 -EDF5 -EDF6 -EDF7 -EDF8 -EDF9 -EDFA -EDFB -EDFC -EE40 -EE41 -EE42 -EE43 -EE44 -EE45 -EE46 -EE47 -EE48 -EE49 -EE4A -EE4B -EE4C -EE4D -EE4E -EE4F -EE50 -EE51 -EE52 -EE53 -EE54 -EE55 -EE56 -EE57 -EE58 -EE59 -EE5A -EE5B -EE5C -EE5D -EE5E -EE5F -EE60 -EE61 -EE62 -EE63 -EE64 -EE65 -EE66 -EE67 -EE68 -EE69 -EE6A -EE6B -EE6C -EE6D -EE6E -EE6F -EE70 -EE71 -EE72 -EE73 -EE74 -EE75 -EE76 -EE77 -EE78 -EE79 -EE7A -EE7B -EE7C -EE7D -EE7E -EE80 -EE81 -EE82 -EE83 -EE84 -EE85 -EE86 -EE87 -EE88 -EE89 -EE8A -EE8B -EE8C -EE8D -EE8E -EE8F -EE90 -EE91 -EE92 -EE93 -EE94 -EE95 -EE96 -EE97 -EE98 -EE99 -EE9A -EE9B -EE9C -EE9D -EE9E -EE9F -EEA0 -EEA1 -EEA2 -EEA3 -EEA4 -EEA5 -EEA6 -EEA7 -EEA8 -EEA9 -EEAA -EEAB -EEAC -EEAD -EEAE -EEAF -EEB0 -EEB1 -EEB2 -EEB3 -EEB4 -EEB5 -EEB6 -EEB7 -EEB8 -EEB9 -EEBA -EEBB -EEBC -EEBD -EEBE -EEBF -EEC0 -EEC1 -EEC2 -EEC3 -EEC4 -EEC5 -EEC6 -EEC7 -EEC8 -EEC9 -EECA -EECB -EECC -EECD -EECE -EECF -EED0 -EED1 -EED2 -EED3 -EED4 -EED5 -EED6 -EED7 -EED8 -EED9 -EEDA -EEDB -EEDC -EEDD -EEDE -EEDF -EEE0 -EEE1 -EEE2 -EEE3 -EEE4 -EEE5 -EEE6 -EEE7 -EEE8 -EEE9 -EEEA -EEEB -EEEC -EEEF -EEF0 -EEF1 -EEF2 -EEF3 -EEF4 -EEF5 -EEF6 -EEF7 -EEF8 -EEF9 -EEFA -EEFB -EEFC -FA40 -FA41 -FA42 -FA43 -FA44 -FA45 -FA46 -FA47 -FA48 -FA49 -FA4A -FA4B -FA4C -FA4D -FA4E -FA4F -FA50 -FA51 -FA52 -FA53 -FA54 -FA55 -FA56 -FA57 -FA58 -FA59 -FA5A -FA5B -FA5C -FA5D -FA5E -FA5F -FA60 -FA61 -FA62 -FA63 -FA64 -FA65 -FA66 -FA67 -FA68 -FA69 -FA6A -FA6B -FA6C -FA6D -FA6E -FA6F -FA70 -FA71 -FA72 -FA73 -FA74 -FA75 -FA76 -FA77 -FA78 -FA79 -FA7A -FA7B -FA7C -FA7D -FA7E -FA80 -FA81 -FA82 -FA83 -FA84 -FA85 -FA86 -FA87 -FA88 -FA89 -FA8A -FA8B -FA8C -FA8D -FA8E -FA8F -FA90 -FA91 -FA92 -FA93 -FA94 -FA95 -FA96 -FA97 -FA98 -FA99 -FA9A -FA9B -FA9C -FA9D -FA9E -FA9F -FAA0 -FAA1 -FAA2 -FAA3 -FAA4 -FAA5 -FAA6 -FAA7 -FAA8 -FAA9 -FAAA -FAAB -FAAC -FAAD -FAAE -FAAF -FAB0 -FAB1 -FAB2 -FAB3 -FAB4 -FAB5 -FAB6 -FAB7 -FAB8 -FAB9 -FABA -FABB -FABC -FABD -FABE -FABF -FAC0 -FAC1 -FAC2 -FAC3 -FAC4 -FAC5 -FAC6 -FAC7 -FAC8 -FAC9 -FACA -FACB -FACC -FACD -FACE -FACF -FAD0 -FAD1 -FAD2 -FAD3 -FAD4 -FAD5 -FAD6 -FAD7 -FAD8 -FAD9 -FADA -FADB -FADC -FADD -FADE -FADF -FAE0 -FAE1 -FAE2 -FAE3 -FAE4 -FAE5 -FAE6 -FAE7 -FAE8 -FAE9 -FAEA -FAEB -FAEC -FAED -FAEE -FAEF -FAF0 -FAF1 -FAF2 -FAF3 -FAF4 -FAF5 -FAF6 -FAF7 -FAF8 -FAF9 -FAFA -FAFB -FAFC -FB40 -FB41 -FB42 -FB43 -FB44 -FB45 -FB46 -FB47 -FB48 -FB49 -FB4A -FB4B -FB4C -FB4D -FB4E -FB4F -FB50 -FB51 -FB52 -FB53 -FB54 -FB55 -FB56 -FB57 -FB58 -FB59 -FB5A -FB5B -FB5C -FB5D -FB5E -FB5F -FB60 -FB61 -FB62 -FB63 -FB64 -FB65 -FB66 -FB67 -FB68 -FB69 -FB6A -FB6B -FB6C -FB6D -FB6E -FB6F -FB70 -FB71 -FB72 -FB73 -FB74 -FB75 -FB76 -FB77 -FB78 -FB79 -FB7A -FB7B -FB7C -FB7D -FB7E -FB80 -FB81 -FB82 -FB83 -FB84 -FB85 -FB86 -FB87 -FB88 -FB89 -FB8A -FB8B -FB8C -FB8D -FB8E -FB8F -FB90 -FB91 -FB92 -FB93 -FB94 -FB95 -FB96 -FB97 -FB98 -FB99 -FB9A -FB9B -FB9C -FB9D -FB9E -FB9F -FBA0 -FBA1 -FBA2 -FBA3 -FBA4 -FBA5 -FBA6 -FBA7 -FBA8 -FBA9 -FBAA -FBAB -FBAC -FBAD -FBAE -FBAF -FBB0 -FBB1 -FBB2 -FBB3 -FBB4 -FBB5 -FBB6 -FBB7 -FBB8 -FBB9 -FBBA -FBBB -FBBC -FBBD -FBBE -FBBF -FBC0 -FBC1 -FBC2 -FBC3 -FBC4 -FBC5 -FBC6 -FBC7 -FBC8 -FBC9 -FBCA -FBCB -FBCC -FBCD -FBCE -FBCF -FBD0 -FBD1 -FBD2 -FBD3 -FBD4 -FBD5 -FBD6 -FBD7 -FBD8 -FBD9 -FBDA -FBDB -FBDC -FBDD -FBDE -FBDF -FBE0 -FBE1 -FBE2 -FBE3 -FBE4 -FBE5 -FBE6 -FBE7 -FBE8 -FBE9 -FBEA -FBEB -FBEC -FBED -FBEE -FBEF -FBF0 -FBF1 -FBF2 -FBF3 -FBF4 -FBF5 -FBF6 -FBF7 -FBF8 -FBF9 -FBFA -FBFB -FBFC -FC40 -FC41 -FC42 -FC43 -FC44 -FC45 -FC46 -FC47 -FC48 -FC49 -FC4A -FC4B -F040 -F041 -F042 -F043 -F044 -F045 -F046 -F047 -F048 -F049 -F04A -F04B -F04C -F04D -F04E -F04F -F050 -F051 -F052 -F053 -F054 -F055 -F056 -F057 -F058 -F059 -F05A -F05B -F05C -F05D -F05E -F05F -F060 -F061 -F062 -F063 -F064 -F065 -F066 -F067 -F068 -F069 -F06A -F06B -F06C -F06D -F06E -F06F -F070 -F071 -F072 -F073 -F074 -F075 -F076 -F077 -F078 -F079 -F07A -F07B -F07C -F07D -F07E -F080 -F081 -F082 -F083 -F084 -F085 -F086 -F087 -F088 -F089 -F08A -F08B -F08C -F08D -F08E -F08F -F090 -F091 -F092 -F093 -F094 -F095 -F096 -F097 -F098 -F099 -F09A -F09B -F09C -F09D -F09E -F09F -F0A0 -F0A1 -F0A2 -F0A3 -F0A4 -F0A5 -F0A6 -F0A7 -F0A8 -F0A9 -F0AA -F0AB -F0AC -F0AD -F0AE -F0AF -F0B0 -F0B1 -F0B2 -F0B3 -F0B4 -F0B5 -F0B6 -F0B7 -F0B8 -F0B9 -F0BA -F0BB -F0BC -F0BD -F0BE -F0BF -F0C0 -F0C1 -F0C2 -F0C3 -F0C4 -F0C5 -F0C6 -F0C7 -F0C8 -F0C9 -F0CA -F0CB -F0CC -F0CD -F0CE -F0CF -F0D0 -F0D1 -F0D2 -F0D3 -F0D4 -F0D5 -F0D6 -F0D7 -F0D8 -F0D9 -F0DA -F0DB -F0DC -F0DD -F0DE -F0DF -F0E0 -F0E1 -F0E2 -F0E3 -F0E4 -F0E5 -F0E6 -F0E7 -F0E8 -F0E9 -F0EA -F0EB -F0EC -F0ED -F0EE -F0EF -F0F0 -F0F1 -F0F2 -F0F3 -F0F4 -F0F5 -F0F6 -F0F7 -F0F8 -F0F9 -F0FA -F0FB -F0FC -F140 -F141 -F142 -F143 -F144 -F145 -F146 -F147 -F148 -F149 -F14A -F14B -F14C -F14D -F14E -F14F -F150 -F151 -F152 -F153 -F154 -F155 -F156 -F157 -F158 -F159 -F15A -F15B -F15C -F15D -F15E -F15F -F160 -F161 -F162 -F163 -F164 -F165 -F166 -F167 -F168 -F169 -F16A -F16B -F16C -F16D -F16E -F16F -F170 -F171 -F172 -F173 -F174 -F175 -F176 -F177 -F178 -F179 -F17A -F17B -F17C -F17D -F17E -F180 -F181 -F182 -F183 -F184 -F185 -F186 -F187 -F188 -F189 -F18A -F18B -F18C -F18D -F18E -F18F -F190 -F191 -F192 -F193 -F194 -F195 -F196 -F197 -F198 -F199 -F19A -F19B -F19C -F19D -F19E -F19F -F1A0 -F1A1 -F1A2 -F1A3 -F1A4 -F1A5 -F1A6 -F1A7 -F1A8 -F1A9 -F1AA -F1AB -F1AC -F1AD -F1AE -F1AF -F1B0 -F1B1 -F1B2 -F1B3 -F1B4 -F1B5 -F1B6 -F1B7 -F1B8 -F1B9 -F1BA -F1BB -F1BC -F1BD -F1BE -F1BF -F1C0 -F1C1 -F1C2 -F1C3 -F1C4 -F1C5 -F1C6 -F1C7 -F1C8 -F1C9 -F1CA -F1CB -F1CC -F1CD -F1CE -F1CF -F1D0 -F1D1 -F1D2 -F1D3 -F1D4 -F1D5 -F1D6 -F1D7 -F1D8 -F1D9 -F1DA -F1DB -F1DC -F1DD -F1DE -F1DF -F1E0 -F1E1 -F1E2 -F1E3 -F1E4 -F1E5 -F1E6 -F1E7 -F1E8 -F1E9 -F1EA -F1EB -F1EC -F1ED -F1EE -F1EF -F1F0 -F1F1 -F1F2 -F1F3 -F1F4 -F1F5 -F1F6 -F1F7 -F1F8 -F1F9 -F1FA -F1FB -F1FC -F240 -F241 -F242 -F243 -F244 -F245 -F246 -F247 -F248 -F249 -F24A -F24B -F24C -F24D -F24E -F24F -F250 -F251 -F252 -F253 -F254 -F255 -F256 -F257 -F258 -F259 -F25A -F25B -F25C -F25D -F25E -F25F -F260 -F261 -F262 -F263 -F264 -F265 -F266 -F267 -F268 -F269 -F26A -F26B -F26C -F26D -F26E -F26F -F270 -F271 -F272 -F273 -F274 -F275 -F276 -F277 -F278 -F279 -F27A -F27B -F27C -F27D -F27E -F280 -F281 -F282 -F283 -F284 -F285 -F286 -F287 -F288 -F289 -F28A -F28B -F28C -F28D -F28E -F28F -F290 -F291 -F292 -F293 -F294 -F295 -F296 -F297 -F298 -F299 -F29A -F29B -F29C -F29D -F29E -F29F -F2A0 -F2A1 -F2A2 -F2A3 -F2A4 -F2A5 -F2A6 -F2A7 -F2A8 -F2A9 -F2AA -F2AB -F2AC -F2AD -F2AE -F2AF -F2B0 -F2B1 -F2B2 -F2B3 -F2B4 -F2B5 -F2B6 -F2B7 -F2B8 -F2B9 -F2BA -F2BB -F2BC -F2BD -F2BE -F2BF -F2C0 -F2C1 -F2C2 -F2C3 -F2C4 -F2C5 -F2C6 -F2C7 -F2C8 -F2C9 -F2CA -F2CB -F2CC -F2CD -F2CE -F2CF -F2D0 -F2D1 -F2D2 -F2D3 -F2D4 -F2D5 -F2D6 -F2D7 -F2D8 -F2D9 -F2DA -F2DB -F2DC -F2DD -F2DE -F2DF -F2E0 -F2E1 -F2E2 -F2E3 -F2E4 -F2E5 -F2E6 -F2E7 -F2E8 -F2E9 -F2EA -F2EB -F2EC -F2ED -F2EE -F2EF -F2F0 -F2F1 -F2F2 -F2F3 -F2F4 -F2F5 -F2F6 -F2F7 -F2F8 -F2F9 -F2FA -F2FB -F2FC -F340 -F341 -F342 -F343 -F344 -F345 -F346 -F347 -F348 -F349 -F34A -F34B -F34C -F34D -F34E -F34F -F350 -F351 -F352 -F353 -F354 -F355 -F356 -F357 -F358 -F359 -F35A -F35B -F35C -F35D -F35E -F35F -F360 -F361 -F362 -F363 -F364 -F365 -F366 -F367 -F368 -F369 -F36A -F36B -F36C -F36D -F36E -F36F -F370 -F371 -F372 -F373 -F374 -F375 -F376 -F377 -F378 -F379 -F37A -F37B -F37C -F37D -F37E -F380 -F381 -F382 -F383 -F384 -F385 -F386 -F387 -F388 -F389 -F38A -F38B -F38C -F38D -F38E -F38F -F390 -F391 -F392 -F393 -F394 -F395 -F396 -F397 -F398 -F399 -F39A -F39B -F39C -F39D -F39E -F39F -F3A0 -F3A1 -F3A2 -F3A3 -F3A4 -F3A5 -F3A6 -F3A7 -F3A8 -F3A9 -F3AA -F3AB -F3AC -F3AD -F3AE -F3AF -F3B0 -F3B1 -F3B2 -F3B3 -F3B4 -F3B5 -F3B6 -F3B7 -F3B8 -F3B9 -F3BA -F3BB -F3BC -F3BD -F3BE -F3BF -F3C0 -F3C1 -F3C2 -F3C3 -F3C4 -F3C5 -F3C6 -F3C7 -F3C8 -F3C9 -F3CA -F3CB -F3CC -F3CD -F3CE -F3CF -F3D0 -F3D1 -F3D2 -F3D3 -F3D4 -F3D5 -F3D6 -F3D7 -F3D8 -F3D9 -F3DA -F3DB -F3DC -F3DD -F3DE -F3DF -F3E0 -F3E1 -F3E2 -F3E3 -F3E4 -F3E5 -F3E6 -F3E7 -F3E8 -F3E9 -F3EA -F3EB -F3EC -F3ED -F3EE -F3EF -F3F0 -F3F1 -F3F2 -F3F3 -F3F4 -F3F5 -F3F6 -F3F7 -F3F8 -F3F9 -F3FA -F3FB -F3FC -F440 -F441 -F442 -F443 -F444 -F445 -F446 -F447 -F448 -F449 -F44A -F44B -F44C -F44D -F44E -F44F -F450 -F451 -F452 -F453 -F454 -F455 -F456 -F457 -F458 -F459 -F45A -F45B -F45C -F45D -F45E -F45F -F460 -F461 -F462 -F463 -F464 -F465 -F466 -F467 -F468 -F469 -F46A -F46B -F46C -F46D -F46E -F46F -F470 -F471 -F472 -F473 -F474 -F475 -F476 -F477 -F478 -F479 -F47A -F47B -F47C -F47D -F47E -F480 -F481 -F482 -F483 -F484 -F485 -F486 -F487 -F488 -F489 -F48A -F48B -F48C -F48D -F48E -F48F -F490 -F491 -F492 -F493 -F494 -F495 -F496 -F497 -F498 -F499 -F49A -F49B -F49C -F49D -F49E -F49F -F4A0 -F4A1 -F4A2 -F4A3 -F4A4 -F4A5 -F4A6 -F4A7 -F4A8 -F4A9 -F4AA -F4AB -F4AC -F4AD -F4AE -F4AF -F4B0 -F4B1 -F4B2 -F4B3 -F4B4 -F4B5 -F4B6 -F4B7 -F4B8 -F4B9 -F4BA -F4BB -F4BC -F4BD -F4BE -F4BF -F4C0 -F4C1 -F4C2 -F4C3 -F4C4 -F4C5 -F4C6 -F4C7 -F4C8 -F4C9 -F4CA -F4CB -F4CC -F4CD -F4CE -F4CF -F4D0 -F4D1 -F4D2 -F4D3 -F4D4 -F4D5 -F4D6 -F4D7 -F4D8 -F4D9 -F4DA -F4DB -F4DC -F4DD -F4DE -F4DF -F4E0 -F4E1 -F4E2 -F4E3 -F4E4 -F4E5 -F4E6 -F4E7 -F4E8 -F4E9 -F4EA -F4EB -F4EC -F4ED -F4EE -F4EF -F4F0 -F4F1 -F4F2 -F4F3 -F4F4 -F4F5 -F4F6 -F4F7 -F4F8 -F4F9 -F4FA -F4FB -F4FC -F540 -F541 -F542 -F543 -F544 -F545 -F546 -F547 -F548 -F549 -F54A -F54B -F54C -F54D -F54E -F54F -F550 -F551 -F552 -F553 -F554 -F555 -F556 -F557 -F558 -F559 -F55A -F55B -F55C -F55D -F55E -F55F -F560 -F561 -F562 -F563 -F564 -F565 -F566 -F567 -F568 -F569 -F56A -F56B -F56C -F56D -F56E -F56F -F570 -F571 -F572 -F573 -F574 -F575 -F576 -F577 -F578 -F579 -F57A -F57B -F57C -F57D -F57E -F580 -F581 -F582 -F583 -F584 -F585 -F586 -F587 -F588 -F589 -F58A -F58B -F58C -F58D -F58E -F58F -F590 -F591 -F592 -F593 -F594 -F595 -F596 -F597 -F598 -F599 -F59A -F59B -F59C -F59D -F59E -F59F -F5A0 -F5A1 -F5A2 -F5A3 -F5A4 -F5A5 -F5A6 -F5A7 -F5A8 -F5A9 -F5AA -F5AB -F5AC -F5AD -F5AE -F5AF -F5B0 -F5B1 -F5B2 -F5B3 -F5B4 -F5B5 -F5B6 -F5B7 -F5B8 -F5B9 -F5BA -F5BB -F5BC -F5BD -F5BE -F5BF -F5C0 -F5C1 -F5C2 -F5C3 -F5C4 -F5C5 -F5C6 -F5C7 -F5C8 -F5C9 -F5CA -F5CB -F5CC -F5CD -F5CE -F5CF -F5D0 -F5D1 -F5D2 -F5D3 -F5D4 -F5D5 -F5D6 -F5D7 -F5D8 -F5D9 -F5DA -F5DB -F5DC -F5DD -F5DE -F5DF -F5E0 -F5E1 -F5E2 -F5E3 -F5E4 -F5E5 -F5E6 -F5E7 -F5E8 -F5E9 -F5EA -F5EB -F5EC -F5ED -F5EE -F5EF -F5F0 -F5F1 -F5F2 -F5F3 -F5F4 -F5F5 -F5F6 -F5F7 -F5F8 -F5F9 -F5FA -F5FB -F5FC -F640 -F641 -F642 -F643 -F644 -F645 -F646 -F647 -F648 -F649 -F64A -F64B -F64C -F64D -F64E -F64F -F650 -F651 -F652 -F653 -F654 -F655 -F656 -F657 -F658 -F659 -F65A -F65B -F65C -F65D -F65E -F65F -F660 -F661 -F662 -F663 -F664 -F665 -F666 -F667 -F668 -F669 -F66A -F66B -F66C -F66D -F66E -F66F -F670 -F671 -F672 -F673 -F674 -F675 -F676 -F677 -F678 -F679 -F67A -F67B -F67C -F67D -F67E -F680 -F681 -F682 -F683 -F684 -F685 -F686 -F687 -F688 -F689 -F68A -F68B -F68C -F68D -F68E -F68F -F690 -F691 -F692 -F693 -F694 -F695 -F696 -F697 -F698 -F699 -F69A -F69B -F69C -F69D -F69E -F69F -F6A0 -F6A1 -F6A2 -F6A3 -F6A4 -F6A5 -F6A6 -F6A7 -F6A8 -F6A9 -F6AA -F6AB -F6AC -F6AD -F6AE -F6AF -F6B0 -F6B1 -F6B2 -F6B3 -F6B4 -F6B5 -F6B6 -F6B7 -F6B8 -F6B9 -F6BA -F6BB -F6BC -F6BD -F6BE -F6BF -F6C0 -F6C1 -F6C2 -F6C3 -F6C4 -F6C5 -F6C6 -F6C7 -F6C8 -F6C9 -F6CA -F6CB -F6CC -F6CD -F6CE -F6CF -F6D0 -F6D1 -F6D2 -F6D3 -F6D4 -F6D5 -F6D6 -F6D7 -F6D8 -F6D9 -F6DA -F6DB -F6DC -F6DD -F6DE -F6DF -F6E0 -F6E1 -F6E2 -F6E3 -F6E4 -F6E5 -F6E6 -F6E7 -F6E8 -F6E9 -F6EA -F6EB -F6EC -F6ED -F6EE -F6EF -F6F0 -F6F1 -F6F2 -F6F3 -F6F4 -F6F5 -F6F6 -F6F7 -F6F8 -F6F9 -F6FA -F6FB -F6FC -F740 -F741 -F742 -F743 -F744 -F745 -F746 -F747 -F748 -F749 -F74A -F74B -F74C -F74D -F74E -F74F -F750 -F751 -F752 -F753 -F754 -F755 -F756 -F757 -F758 -F759 -F75A -F75B -F75C -F75D -F75E -F75F -F760 -F761 -F762 -F763 -F764 -F765 -F766 -F767 -F768 -F769 -F76A -F76B -F76C -F76D -F76E -F76F -F770 -F771 -F772 -F773 -F774 -F775 -F776 -F777 -F778 -F779 -F77A -F77B -F77C -F77D -F77E -F780 -F781 -F782 -F783 -F784 -F785 -F786 -F787 -F788 -F789 -F78A -F78B -F78C -F78D -F78E -F78F -F790 -F791 -F792 -F793 -F794 -F795 -F796 -F797 -F798 -F799 -F79A -F79B -F79C -F79D -F79E -F79F -F7A0 -F7A1 -F7A2 -F7A3 -F7A4 -F7A5 -F7A6 -F7A7 -F7A8 -F7A9 -F7AA -F7AB -F7AC -F7AD -F7AE -F7AF -F7B0 -F7B1 -F7B2 -F7B3 -F7B4 -F7B5 -F7B6 -F7B7 -F7B8 -F7B9 -F7BA -F7BB -F7BC -F7BD -F7BE -F7BF -F7C0 -F7C1 -F7C2 -F7C3 -F7C4 -F7C5 -F7C6 -F7C7 -F7C8 -F7C9 -F7CA -F7CB -F7CC -F7CD -F7CE -F7CF -F7D0 -F7D1 -F7D2 -F7D3 -F7D4 -F7D5 -F7D6 -F7D7 -F7D8 -F7D9 -F7DA -F7DB -F7DC -F7DD -F7DE -F7DF -F7E0 -F7E1 -F7E2 -F7E3 -F7E4 -F7E5 -F7E6 -F7E7 -F7E8 -F7E9 -F7EA -F7EB -F7EC -F7ED -F7EE -F7EF -F7F0 -F7F1 -F7F2 -F7F3 -F7F4 -F7F5 -F7F6 -F7F7 -F7F8 -F7F9 -F7FA -F7FB -F7FC -F840 -F841 -F842 -F843 -F844 -F845 -F846 -F847 -F848 -F849 -F84A -F84B -F84C -F84D -F84E -F84F -F850 -F851 -F852 -F853 -F854 -F855 -F856 -F857 -F858 -F859 -F85A -F85B -F85C -F85D -F85E -F85F -F860 -F861 -F862 -F863 -F864 -F865 -F866 -F867 -F868 -F869 -F86A -F86B -F86C -F86D -F86E -F86F -F870 -F871 -F872 -F873 -F874 -F875 -F876 -F877 -F878 -F879 -F87A -F87B -F87C -F87D -F87E -F880 -F881 -F882 -F883 -F884 -F885 -F886 -F887 -F888 -F889 -F88A -F88B -F88C -F88D -F88E -F88F -F890 -F891 -F892 -F893 -F894 -F895 -F896 -F897 -F898 -F899 -F89A -F89B -F89C -F89D -F89E -F89F -F8A0 -F8A1 -F8A2 -F8A3 -F8A4 -F8A5 -F8A6 -F8A7 -F8A8 -F8A9 -F8AA -F8AB -F8AC -F8AD -F8AE -F8AF -F8B0 -F8B1 -F8B2 -F8B3 -F8B4 -F8B5 -F8B6 -F8B7 -F8B8 -F8B9 -F8BA -F8BB -F8BC -F8BD -F8BE -F8BF -F8C0 -F8C1 -F8C2 -F8C3 -F8C4 -F8C5 -F8C6 -F8C7 -F8C8 -F8C9 -F8CA -F8CB -F8CC -F8CD -F8CE -F8CF -F8D0 -F8D1 -F8D2 -F8D3 -F8D4 -F8D5 -F8D6 -F8D7 -F8D8 -F8D9 -F8DA -F8DB -F8DC -F8DD -F8DE -F8DF -F8E0 -F8E1 -F8E2 -F8E3 -F8E4 -F8E5 -F8E6 -F8E7 -F8E8 -F8E9 -F8EA -F8EB -F8EC -F8ED -F8EE -F8EF -F8F0 -F8F1 -F8F2 -F8F3 -F8F4 -F8F5 -F8F6 -F8F7 -F8F8 -F8F9 -F8FA -F8FB -F8FC -F940 -F941 -F942 -F943 -F944 -F945 -F946 -F947 -F948 -F949 -F94A -F94B -F94C -F94D -F94E -F94F -F950 -F951 -F952 -F953 -F954 -F955 -F956 -F957 -F958 -F959 -F95A -F95B -F95C -F95D -F95E -F95F -F960 -F961 -F962 -F963 -F964 -F965 -F966 -F967 -F968 -F969 -F96A -F96B -F96C -F96D -F96E -F96F -F970 -F971 -F972 -F973 -F974 -F975 -F976 -F977 -F978 -F979 -F97A -F97B -F97C -F97D -F97E -F980 -F981 -F982 -F983 -F984 -F985 -F986 -F987 -F988 -F989 -F98A -F98B -F98C -F98D -F98E -F98F -F990 -F991 -F992 -F993 -F994 -F995 -F996 -F997 -F998 -F999 -F99A -F99B -F99C -F99D -F99E -F99F -F9A0 -F9A1 -F9A2 -F9A3 -F9A4 -F9A5 -F9A6 -F9A7 -F9A8 -F9A9 -F9AA -F9AB -F9AC -F9AD -F9AE -F9AF -F9B0 -F9B1 -F9B2 -F9B3 -F9B4 -F9B5 -F9B6 -F9B7 -F9B8 -F9B9 -F9BA -F9BB -F9BC -F9BD -F9BE -F9BF -F9C0 -F9C1 -F9C2 -F9C3 -F9C4 -F9C5 -F9C6 -F9C7 -F9C8 -F9C9 -F9CA -F9CB -F9CC -F9CD -F9CE -F9CF -F9D0 -F9D1 -F9D2 -F9D3 -F9D4 -F9D5 -F9D6 -F9D7 -F9D8 -F9D9 -F9DA -F9DB -F9DC -F9DD -F9DE -F9DF -F9E0 -F9E1 -F9E2 -F9E3 -F9E4 -F9E5 -F9E6 -F9E7 -F9E8 -F9E9 -F9EA -F9EB -F9EC -F9ED -F9EE -F9EF -F9F0 -F9F1 -F9F2 -F9F3 -F9F4 -F9F5 -F9F6 -F9F7 -F9F8 -F9F9 -F9FA -F9FB -F9FC -CREATE TABLE t2 SELECT CONVERT(c1 USING ucs2) AS c1 FROM t1; -SELECT HEX(c1) FROM t2; -HEX(c1) -0005 -007E -2015 -FF3C -FF5E -2225 -FF0D -FFE0 -FFE1 -FFE2 -2460 -2461 -2462 -2463 -2464 -2465 -2466 -2467 -2468 -2469 -246A -246B -246C -246D -246E -246F -2470 -2471 -2472 -2473 -2160 -2161 -2162 -2163 -2164 -2165 -2166 -2167 -2168 -2169 -3349 -3314 -3322 -334D -3318 -3327 -3303 -3336 -3351 -3357 -330D -3326 -3323 -332B -334A -333B -339C -339D -339E -338E -338F -33C4 -33A1 -337B -301D -301F -2116 -33CD -2121 -32A4 -32A5 -32A6 -32A7 -32A8 -3231 -3232 -3239 -337E -337D -337C -2252 -2261 -222B -222E -2211 -221A -22A5 -2220 -221F -22BF -2235 -2229 -222A -7E8A -891C -9348 -9288 -84DC -4FC9 -70BB -6631 -68C8 -92F9 -66FB -5F45 -4E28 -4EE1 -4EFC -4F00 -4F03 -4F39 -4F56 -4F92 -4F8A -4F9A -4F94 -4FCD -5040 -5022 -4FFF -501E -5046 -5070 -5042 -5094 -50F4 -50D8 -514A -5164 -519D -51BE -51EC -5215 -529C -52A6 -52C0 -52DB -5300 -5307 -5324 -5372 -5393 -53B2 -53DD -FA0E -549C -548A -54A9 -54FF -5586 -5759 -5765 -57AC -57C8 -57C7 -FA0F -FA10 -589E -58B2 -590B -5953 -595B -595D -5963 -59A4 -59BA -5B56 -5BC0 -752F -5BD8 -5BEC -5C1E -5CA6 -5CBA -5CF5 -5D27 -5D53 -FA11 -5D42 -5D6D -5DB8 -5DB9 -5DD0 -5F21 -5F34 -5F67 -5FB7 -5FDE -605D -6085 -608A -60DE -60D5 -6120 -60F2 -6111 -6137 -6130 -6198 -6213 -62A6 -63F5 -6460 -649D -64CE -654E -6600 -6615 -663B -6609 -662E -661E -6624 -6665 -6657 -6659 -FA12 -6673 -6699 -66A0 -66B2 -66BF -66FA -670E -F929 -6766 -67BB -6852 -67C0 -6801 -6844 -68CF -FA13 -6968 -FA14 -6998 -69E2 -6A30 -6A6B -6A46 -6A73 -6A7E -6AE2 -6AE4 -6BD6 -6C3F -6C5C -6C86 -6C6F -6CDA -6D04 -6D87 -6D6F -6D96 -6DAC -6DCF -6DF8 -6DF2 -6DFC -6E39 -6E5C -6E27 -6E3C -6EBF -6F88 -6FB5 -6FF5 -7005 -7007 -7028 -7085 -70AB -710F -7104 -715C -7146 -7147 -FA15 -71C1 -71FE -72B1 -72BE -7324 -FA16 -7377 -73BD -73C9 -73D6 -73E3 -73D2 -7407 -73F5 -7426 -742A -7429 -742E -7462 -7489 -749F -7501 -756F -7682 -769C -769E -769B -76A6 -FA17 -7746 -52AF -7821 -784E -7864 -787A -7930 -FA18 -FA19 -FA1A -7994 -FA1B -799B -7AD1 -7AE7 -FA1C -7AEB -7B9E -FA1D -7D48 -7D5C -7DB7 -7DA0 -7DD6 -7E52 -7F47 -7FA1 -FA1E -8301 -8362 -837F -83C7 -83F6 -8448 -84B4 -8553 -8559 -856B -FA1F -85B0 -FA20 -FA21 -8807 -88F5 -8A12 -8A37 -8A79 -8AA7 -8ABE -8ADF -FA22 -8AF6 -8B53 -8B7F -8CF0 -8CF4 -8D12 -8D76 -FA23 -8ECF -FA24 -FA25 -9067 -90DE -FA26 -9115 -9127 -91DA -91D7 -91DE -91ED -91EE -91E4 -91E5 -9206 -9210 -920A -923A -9240 -923C -924E -9259 -9251 -9239 -9267 -92A7 -9277 -9278 -92E7 -92D7 -92D9 -92D0 -FA27 -92D5 -92E0 -92D3 -9325 -9321 -92FB -FA28 -931E -92FF -931D -9302 -9370 -9357 -93A4 -93C6 -93DE -93F8 -9431 -9445 -9448 -9592 -F9DC -FA29 -969D -96AF -9733 -973B -9743 -974D -974F -9751 -9755 -9857 -9865 -FA2A -FA2B -9927 -FA2C -999E -9A4E -9AD9 -9ADC -9B75 -9B72 -9B8F -9BB1 -9BBB -9C00 -9D70 -9D6B -FA2D -9E19 -9ED1 -2170 -2171 -2172 -2173 -2174 -2175 -2176 -2177 -2178 -2179 -FFE2 -FFE4 -FF07 -FF02 -2170 -2171 -2172 -2173 -2174 -2175 -2176 -2177 -2178 -2179 -2160 -2161 -2162 -2163 -2164 -2165 -2166 -2167 -2168 -2169 -FFE2 -FFE4 -FF07 -FF02 -3231 -2116 -2121 -2235 -7E8A -891C -9348 -9288 -84DC -4FC9 -70BB -6631 -68C8 -92F9 -66FB -5F45 -4E28 -4EE1 -4EFC -4F00 -4F03 -4F39 -4F56 -4F92 -4F8A -4F9A -4F94 -4FCD -5040 -5022 -4FFF -501E -5046 -5070 -5042 -5094 -50F4 -50D8 -514A -5164 -519D -51BE -51EC -5215 -529C -52A6 -52C0 -52DB -5300 -5307 -5324 -5372 -5393 -53B2 -53DD -FA0E -549C -548A -54A9 -54FF -5586 -5759 -5765 -57AC -57C8 -57C7 -FA0F -FA10 -589E -58B2 -590B -5953 -595B -595D -5963 -59A4 -59BA -5B56 -5BC0 -752F -5BD8 -5BEC -5C1E -5CA6 -5CBA -5CF5 -5D27 -5D53 -FA11 -5D42 -5D6D -5DB8 -5DB9 -5DD0 -5F21 -5F34 -5F67 -5FB7 -5FDE -605D -6085 -608A -60DE -60D5 -6120 -60F2 -6111 -6137 -6130 -6198 -6213 -62A6 -63F5 -6460 -649D -64CE -654E -6600 -6615 -663B -6609 -662E -661E -6624 -6665 -6657 -6659 -FA12 -6673 -6699 -66A0 -66B2 -66BF -66FA -670E -F929 -6766 -67BB -6852 -67C0 -6801 -6844 -68CF -FA13 -6968 -FA14 -6998 -69E2 -6A30 -6A6B -6A46 -6A73 -6A7E -6AE2 -6AE4 -6BD6 -6C3F -6C5C -6C86 -6C6F -6CDA -6D04 -6D87 -6D6F -6D96 -6DAC -6DCF -6DF8 -6DF2 -6DFC -6E39 -6E5C -6E27 -6E3C -6EBF -6F88 -6FB5 -6FF5 -7005 -7007 -7028 -7085 -70AB -710F -7104 -715C -7146 -7147 -FA15 -71C1 -71FE -72B1 -72BE -7324 -FA16 -7377 -73BD -73C9 -73D6 -73E3 -73D2 -7407 -73F5 -7426 -742A -7429 -742E -7462 -7489 -749F -7501 -756F -7682 -769C -769E -769B -76A6 -FA17 -7746 -52AF -7821 -784E -7864 -787A -7930 -FA18 -FA19 -FA1A -7994 -FA1B -799B -7AD1 -7AE7 -FA1C -7AEB -7B9E -FA1D -7D48 -7D5C -7DB7 -7DA0 -7DD6 -7E52 -7F47 -7FA1 -FA1E -8301 -8362 -837F -83C7 -83F6 -8448 -84B4 -8553 -8559 -856B -FA1F -85B0 -FA20 -FA21 -8807 -88F5 -8A12 -8A37 -8A79 -8AA7 -8ABE -8ADF -FA22 -8AF6 -8B53 -8B7F -8CF0 -8CF4 -8D12 -8D76 -FA23 -8ECF -FA24 -FA25 -9067 -90DE -FA26 -9115 -9127 -91DA -91D7 -91DE -91ED -91EE -91E4 -91E5 -9206 -9210 -920A -923A -9240 -923C -924E -9259 -9251 -9239 -9267 -92A7 -9277 -9278 -92E7 -92D7 -92D9 -92D0 -FA27 -92D5 -92E0 -92D3 -9325 -9321 -92FB -FA28 -931E -92FF -931D -9302 -9370 -9357 -93A4 -93C6 -93DE -93F8 -9431 -9445 -9448 -9592 -F9DC -FA29 -969D -96AF -9733 -973B -9743 -974D -974F -9751 -9755 -9857 -9865 -FA2A -FA2B -9927 -FA2C -999E -9A4E -9AD9 -9ADC -9B75 -9B72 -9B8F -9BB1 -9BBB -9C00 -9D70 -9D6B -FA2D -9E19 -9ED1 -E000 -E001 -E002 -E003 -E004 -E005 -E006 -E007 -E008 -E009 -E00A -E00B -E00C -E00D -E00E -E00F -E010 -E011 -E012 -E013 -E014 -E015 -E016 -E017 -E018 -E019 -E01A -E01B -E01C -E01D -E01E -E01F -E020 -E021 -E022 -E023 -E024 -E025 -E026 -E027 -E028 -E029 -E02A -E02B -E02C -E02D -E02E -E02F -E030 -E031 -E032 -E033 -E034 -E035 -E036 -E037 -E038 -E039 -E03A -E03B -E03C -E03D -E03E -E03F -E040 -E041 -E042 -E043 -E044 -E045 -E046 -E047 -E048 -E049 -E04A -E04B -E04C -E04D -E04E -E04F -E050 -E051 -E052 -E053 -E054 -E055 -E056 -E057 -E058 -E059 -E05A -E05B -E05C -E05D -E05E -E05F -E060 -E061 -E062 -E063 -E064 -E065 -E066 -E067 -E068 -E069 -E06A -E06B -E06C -E06D -E06E -E06F -E070 -E071 -E072 -E073 -E074 -E075 -E076 -E077 -E078 -E079 -E07A -E07B -E07C -E07D -E07E -E07F -E080 -E081 -E082 -E083 -E084 -E085 -E086 -E087 -E088 -E089 -E08A -E08B -E08C -E08D -E08E -E08F -E090 -E091 -E092 -E093 -E094 -E095 -E096 -E097 -E098 -E099 -E09A -E09B -E09C -E09D -E09E -E09F -E0A0 -E0A1 -E0A2 -E0A3 -E0A4 -E0A5 -E0A6 -E0A7 -E0A8 -E0A9 -E0AA -E0AB -E0AC -E0AD -E0AE -E0AF -E0B0 -E0B1 -E0B2 -E0B3 -E0B4 -E0B5 -E0B6 -E0B7 -E0B8 -E0B9 -E0BA -E0BB -E0BC -E0BD -E0BE -E0BF -E0C0 -E0C1 -E0C2 -E0C3 -E0C4 -E0C5 -E0C6 -E0C7 -E0C8 -E0C9 -E0CA -E0CB -E0CC -E0CD -E0CE -E0CF -E0D0 -E0D1 -E0D2 -E0D3 -E0D4 -E0D5 -E0D6 -E0D7 -E0D8 -E0D9 -E0DA -E0DB -E0DC -E0DD -E0DE -E0DF -E0E0 -E0E1 -E0E2 -E0E3 -E0E4 -E0E5 -E0E6 -E0E7 -E0E8 -E0E9 -E0EA -E0EB -E0EC -E0ED -E0EE -E0EF -E0F0 -E0F1 -E0F2 -E0F3 -E0F4 -E0F5 -E0F6 -E0F7 -E0F8 -E0F9 -E0FA -E0FB -E0FC -E0FD -E0FE -E0FF -E100 -E101 -E102 -E103 -E104 -E105 -E106 -E107 -E108 -E109 -E10A -E10B -E10C -E10D -E10E -E10F -E110 -E111 -E112 -E113 -E114 -E115 -E116 -E117 -E118 -E119 -E11A -E11B -E11C -E11D -E11E -E11F -E120 -E121 -E122 -E123 -E124 -E125 -E126 -E127 -E128 -E129 -E12A -E12B -E12C -E12D -E12E -E12F -E130 -E131 -E132 -E133 -E134 -E135 -E136 -E137 -E138 -E139 -E13A -E13B -E13C -E13D -E13E -E13F -E140 -E141 -E142 -E143 -E144 -E145 -E146 -E147 -E148 -E149 -E14A -E14B -E14C -E14D -E14E -E14F -E150 -E151 -E152 -E153 -E154 -E155 -E156 -E157 -E158 -E159 -E15A -E15B -E15C -E15D -E15E -E15F -E160 -E161 -E162 -E163 -E164 -E165 -E166 -E167 -E168 -E169 -E16A -E16B -E16C -E16D -E16E -E16F -E170 -E171 -E172 -E173 -E174 -E175 -E176 -E177 -E178 -E179 -E17A -E17B -E17C -E17D -E17E -E17F -E180 -E181 -E182 -E183 -E184 -E185 -E186 -E187 -E188 -E189 -E18A -E18B -E18C -E18D -E18E -E18F -E190 -E191 -E192 -E193 -E194 -E195 -E196 -E197 -E198 -E199 -E19A -E19B -E19C -E19D -E19E -E19F -E1A0 -E1A1 -E1A2 -E1A3 -E1A4 -E1A5 -E1A6 -E1A7 -E1A8 -E1A9 -E1AA -E1AB -E1AC -E1AD -E1AE -E1AF -E1B0 -E1B1 -E1B2 -E1B3 -E1B4 -E1B5 -E1B6 -E1B7 -E1B8 -E1B9 -E1BA -E1BB -E1BC -E1BD -E1BE -E1BF -E1C0 -E1C1 -E1C2 -E1C3 -E1C4 -E1C5 -E1C6 -E1C7 -E1C8 -E1C9 -E1CA -E1CB -E1CC -E1CD -E1CE -E1CF -E1D0 -E1D1 -E1D2 -E1D3 -E1D4 -E1D5 -E1D6 -E1D7 -E1D8 -E1D9 -E1DA -E1DB -E1DC -E1DD -E1DE -E1DF -E1E0 -E1E1 -E1E2 -E1E3 -E1E4 -E1E5 -E1E6 -E1E7 -E1E8 -E1E9 -E1EA -E1EB -E1EC -E1ED -E1EE -E1EF -E1F0 -E1F1 -E1F2 -E1F3 -E1F4 -E1F5 -E1F6 -E1F7 -E1F8 -E1F9 -E1FA -E1FB -E1FC -E1FD -E1FE -E1FF -E200 -E201 -E202 -E203 -E204 -E205 -E206 -E207 -E208 -E209 -E20A -E20B -E20C -E20D -E20E -E20F -E210 -E211 -E212 -E213 -E214 -E215 -E216 -E217 -E218 -E219 -E21A -E21B -E21C -E21D -E21E -E21F -E220 -E221 -E222 -E223 -E224 -E225 -E226 -E227 -E228 -E229 -E22A -E22B -E22C -E22D -E22E -E22F -E230 -E231 -E232 -E233 -E234 -E235 -E236 -E237 -E238 -E239 -E23A -E23B -E23C -E23D -E23E -E23F -E240 -E241 -E242 -E243 -E244 -E245 -E246 -E247 -E248 -E249 -E24A -E24B -E24C -E24D -E24E -E24F -E250 -E251 -E252 -E253 -E254 -E255 -E256 -E257 -E258 -E259 -E25A -E25B -E25C -E25D -E25E -E25F -E260 -E261 -E262 -E263 -E264 -E265 -E266 -E267 -E268 -E269 -E26A -E26B -E26C -E26D -E26E -E26F -E270 -E271 -E272 -E273 -E274 -E275 -E276 -E277 -E278 -E279 -E27A -E27B -E27C -E27D -E27E -E27F -E280 -E281 -E282 -E283 -E284 -E285 -E286 -E287 -E288 -E289 -E28A -E28B -E28C -E28D -E28E -E28F -E290 -E291 -E292 -E293 -E294 -E295 -E296 -E297 -E298 -E299 -E29A -E29B -E29C -E29D -E29E -E29F -E2A0 -E2A1 -E2A2 -E2A3 -E2A4 -E2A5 -E2A6 -E2A7 -E2A8 -E2A9 -E2AA -E2AB -E2AC -E2AD -E2AE -E2AF -E2B0 -E2B1 -E2B2 -E2B3 -E2B4 -E2B5 -E2B6 -E2B7 -E2B8 -E2B9 -E2BA -E2BB -E2BC -E2BD -E2BE -E2BF -E2C0 -E2C1 -E2C2 -E2C3 -E2C4 -E2C5 -E2C6 -E2C7 -E2C8 -E2C9 -E2CA -E2CB -E2CC -E2CD -E2CE -E2CF -E2D0 -E2D1 -E2D2 -E2D3 -E2D4 -E2D5 -E2D6 -E2D7 -E2D8 -E2D9 -E2DA -E2DB -E2DC -E2DD -E2DE -E2DF -E2E0 -E2E1 -E2E2 -E2E3 -E2E4 -E2E5 -E2E6 -E2E7 -E2E8 -E2E9 -E2EA -E2EB -E2EC -E2ED -E2EE -E2EF -E2F0 -E2F1 -E2F2 -E2F3 -E2F4 -E2F5 -E2F6 -E2F7 -E2F8 -E2F9 -E2FA -E2FB -E2FC -E2FD -E2FE -E2FF -E300 -E301 -E302 -E303 -E304 -E305 -E306 -E307 -E308 -E309 -E30A -E30B -E30C -E30D -E30E -E30F -E310 -E311 -E312 -E313 -E314 -E315 -E316 -E317 -E318 -E319 -E31A -E31B -E31C -E31D -E31E -E31F -E320 -E321 -E322 -E323 -E324 -E325 -E326 -E327 -E328 -E329 -E32A -E32B -E32C -E32D -E32E -E32F -E330 -E331 -E332 -E333 -E334 -E335 -E336 -E337 -E338 -E339 -E33A -E33B -E33C -E33D -E33E -E33F -E340 -E341 -E342 -E343 -E344 -E345 -E346 -E347 -E348 -E349 -E34A -E34B -E34C -E34D -E34E -E34F -E350 -E351 -E352 -E353 -E354 -E355 -E356 -E357 -E358 -E359 -E35A -E35B -E35C -E35D -E35E -E35F -E360 -E361 -E362 -E363 -E364 -E365 -E366 -E367 -E368 -E369 -E36A -E36B -E36C -E36D -E36E -E36F -E370 -E371 -E372 -E373 -E374 -E375 -E376 -E377 -E378 -E379 -E37A -E37B -E37C -E37D -E37E -E37F -E380 -E381 -E382 -E383 -E384 -E385 -E386 -E387 -E388 -E389 -E38A -E38B -E38C -E38D -E38E -E38F -E390 -E391 -E392 -E393 -E394 -E395 -E396 -E397 -E398 -E399 -E39A -E39B -E39C -E39D -E39E -E39F -E3A0 -E3A1 -E3A2 -E3A3 -E3A4 -E3A5 -E3A6 -E3A7 -E3A8 -E3A9 -E3AA -E3AB -E3AC -E3AD -E3AE -E3AF -E3B0 -E3B1 -E3B2 -E3B3 -E3B4 -E3B5 -E3B6 -E3B7 -E3B8 -E3B9 -E3BA -E3BB -E3BC -E3BD -E3BE -E3BF -E3C0 -E3C1 -E3C2 -E3C3 -E3C4 -E3C5 -E3C6 -E3C7 -E3C8 -E3C9 -E3CA -E3CB -E3CC -E3CD -E3CE -E3CF -E3D0 -E3D1 -E3D2 -E3D3 -E3D4 -E3D5 -E3D6 -E3D7 -E3D8 -E3D9 -E3DA -E3DB -E3DC -E3DD -E3DE -E3DF -E3E0 -E3E1 -E3E2 -E3E3 -E3E4 -E3E5 -E3E6 -E3E7 -E3E8 -E3E9 -E3EA -E3EB -E3EC -E3ED -E3EE -E3EF -E3F0 -E3F1 -E3F2 -E3F3 -E3F4 -E3F5 -E3F6 -E3F7 -E3F8 -E3F9 -E3FA -E3FB -E3FC -E3FD -E3FE -E3FF -E400 -E401 -E402 -E403 -E404 -E405 -E406 -E407 -E408 -E409 -E40A -E40B -E40C -E40D -E40E -E40F -E410 -E411 -E412 -E413 -E414 -E415 -E416 -E417 -E418 -E419 -E41A -E41B -E41C -E41D -E41E -E41F -E420 -E421 -E422 -E423 -E424 -E425 -E426 -E427 -E428 -E429 -E42A -E42B -E42C -E42D -E42E -E42F -E430 -E431 -E432 -E433 -E434 -E435 -E436 -E437 -E438 -E439 -E43A -E43B -E43C -E43D -E43E -E43F -E440 -E441 -E442 -E443 -E444 -E445 -E446 -E447 -E448 -E449 -E44A -E44B -E44C -E44D -E44E -E44F -E450 -E451 -E452 -E453 -E454 -E455 -E456 -E457 -E458 -E459 -E45A -E45B -E45C -E45D -E45E -E45F -E460 -E461 -E462 -E463 -E464 -E465 -E466 -E467 -E468 -E469 -E46A -E46B -E46C -E46D -E46E -E46F -E470 -E471 -E472 -E473 -E474 -E475 -E476 -E477 -E478 -E479 -E47A -E47B -E47C -E47D -E47E -E47F -E480 -E481 -E482 -E483 -E484 -E485 -E486 -E487 -E488 -E489 -E48A -E48B -E48C -E48D -E48E -E48F -E490 -E491 -E492 -E493 -E494 -E495 -E496 -E497 -E498 -E499 -E49A -E49B -E49C -E49D -E49E -E49F -E4A0 -E4A1 -E4A2 -E4A3 -E4A4 -E4A5 -E4A6 -E4A7 -E4A8 -E4A9 -E4AA -E4AB -E4AC -E4AD -E4AE -E4AF -E4B0 -E4B1 -E4B2 -E4B3 -E4B4 -E4B5 -E4B6 -E4B7 -E4B8 -E4B9 -E4BA -E4BB -E4BC -E4BD -E4BE -E4BF -E4C0 -E4C1 -E4C2 -E4C3 -E4C4 -E4C5 -E4C6 -E4C7 -E4C8 -E4C9 -E4CA -E4CB -E4CC -E4CD -E4CE -E4CF -E4D0 -E4D1 -E4D2 -E4D3 -E4D4 -E4D5 -E4D6 -E4D7 -E4D8 -E4D9 -E4DA -E4DB -E4DC -E4DD -E4DE -E4DF -E4E0 -E4E1 -E4E2 -E4E3 -E4E4 -E4E5 -E4E6 -E4E7 -E4E8 -E4E9 -E4EA -E4EB -E4EC -E4ED -E4EE -E4EF -E4F0 -E4F1 -E4F2 -E4F3 -E4F4 -E4F5 -E4F6 -E4F7 -E4F8 -E4F9 -E4FA -E4FB -E4FC -E4FD -E4FE -E4FF -E500 -E501 -E502 -E503 -E504 -E505 -E506 -E507 -E508 -E509 -E50A -E50B -E50C -E50D -E50E -E50F -E510 -E511 -E512 -E513 -E514 -E515 -E516 -E517 -E518 -E519 -E51A -E51B -E51C -E51D -E51E -E51F -E520 -E521 -E522 -E523 -E524 -E525 -E526 -E527 -E528 -E529 -E52A -E52B -E52C -E52D -E52E -E52F -E530 -E531 -E532 -E533 -E534 -E535 -E536 -E537 -E538 -E539 -E53A -E53B -E53C -E53D -E53E -E53F -E540 -E541 -E542 -E543 -E544 -E545 -E546 -E547 -E548 -E549 -E54A -E54B -E54C -E54D -E54E -E54F -E550 -E551 -E552 -E553 -E554 -E555 -E556 -E557 -E558 -E559 -E55A -E55B -E55C -E55D -E55E -E55F -E560 -E561 -E562 -E563 -E564 -E565 -E566 -E567 -E568 -E569 -E56A -E56B -E56C -E56D -E56E -E56F -E570 -E571 -E572 -E573 -E574 -E575 -E576 -E577 -E578 -E579 -E57A -E57B -E57C -E57D -E57E -E57F -E580 -E581 -E582 -E583 -E584 -E585 -E586 -E587 -E588 -E589 -E58A -E58B -E58C -E58D -E58E -E58F -E590 -E591 -E592 -E593 -E594 -E595 -E596 -E597 -E598 -E599 -E59A -E59B -E59C -E59D -E59E -E59F -E5A0 -E5A1 -E5A2 -E5A3 -E5A4 -E5A5 -E5A6 -E5A7 -E5A8 -E5A9 -E5AA -E5AB -E5AC -E5AD -E5AE -E5AF -E5B0 -E5B1 -E5B2 -E5B3 -E5B4 -E5B5 -E5B6 -E5B7 -E5B8 -E5B9 -E5BA -E5BB -E5BC -E5BD -E5BE -E5BF -E5C0 -E5C1 -E5C2 -E5C3 -E5C4 -E5C5 -E5C6 -E5C7 -E5C8 -E5C9 -E5CA -E5CB -E5CC -E5CD -E5CE -E5CF -E5D0 -E5D1 -E5D2 -E5D3 -E5D4 -E5D5 -E5D6 -E5D7 -E5D8 -E5D9 -E5DA -E5DB -E5DC -E5DD -E5DE -E5DF -E5E0 -E5E1 -E5E2 -E5E3 -E5E4 -E5E5 -E5E6 -E5E7 -E5E8 -E5E9 -E5EA -E5EB -E5EC -E5ED -E5EE -E5EF -E5F0 -E5F1 -E5F2 -E5F3 -E5F4 -E5F5 -E5F6 -E5F7 -E5F8 -E5F9 -E5FA -E5FB -E5FC -E5FD -E5FE -E5FF -E600 -E601 -E602 -E603 -E604 -E605 -E606 -E607 -E608 -E609 -E60A -E60B -E60C -E60D -E60E -E60F -E610 -E611 -E612 -E613 -E614 -E615 -E616 -E617 -E618 -E619 -E61A -E61B -E61C -E61D -E61E -E61F -E620 -E621 -E622 -E623 -E624 -E625 -E626 -E627 -E628 -E629 -E62A -E62B -E62C -E62D -E62E -E62F -E630 -E631 -E632 -E633 -E634 -E635 -E636 -E637 -E638 -E639 -E63A -E63B -E63C -E63D -E63E -E63F -E640 -E641 -E642 -E643 -E644 -E645 -E646 -E647 -E648 -E649 -E64A -E64B -E64C -E64D -E64E -E64F -E650 -E651 -E652 -E653 -E654 -E655 -E656 -E657 -E658 -E659 -E65A -E65B -E65C -E65D -E65E -E65F -E660 -E661 -E662 -E663 -E664 -E665 -E666 -E667 -E668 -E669 -E66A -E66B -E66C -E66D -E66E -E66F -E670 -E671 -E672 -E673 -E674 -E675 -E676 -E677 -E678 -E679 -E67A -E67B -E67C -E67D -E67E -E67F -E680 -E681 -E682 -E683 -E684 -E685 -E686 -E687 -E688 -E689 -E68A -E68B -E68C -E68D -E68E -E68F -E690 -E691 -E692 -E693 -E694 -E695 -E696 -E697 -E698 -E699 -E69A -E69B -E69C -E69D -E69E -E69F -E6A0 -E6A1 -E6A2 -E6A3 -E6A4 -E6A5 -E6A6 -E6A7 -E6A8 -E6A9 -E6AA -E6AB -E6AC -E6AD -E6AE -E6AF -E6B0 -E6B1 -E6B2 -E6B3 -E6B4 -E6B5 -E6B6 -E6B7 -E6B8 -E6B9 -E6BA -E6BB -E6BC -E6BD -E6BE -E6BF -E6C0 -E6C1 -E6C2 -E6C3 -E6C4 -E6C5 -E6C6 -E6C7 -E6C8 -E6C9 -E6CA -E6CB -E6CC -E6CD -E6CE -E6CF -E6D0 -E6D1 -E6D2 -E6D3 -E6D4 -E6D5 -E6D6 -E6D7 -E6D8 -E6D9 -E6DA -E6DB -E6DC -E6DD -E6DE -E6DF -E6E0 -E6E1 -E6E2 -E6E3 -E6E4 -E6E5 -E6E6 -E6E7 -E6E8 -E6E9 -E6EA -E6EB -E6EC -E6ED -E6EE -E6EF -E6F0 -E6F1 -E6F2 -E6F3 -E6F4 -E6F5 -E6F6 -E6F7 -E6F8 -E6F9 -E6FA -E6FB -E6FC -E6FD -E6FE -E6FF -E700 -E701 -E702 -E703 -E704 -E705 -E706 -E707 -E708 -E709 -E70A -E70B -E70C -E70D -E70E -E70F -E710 -E711 -E712 -E713 -E714 -E715 -E716 -E717 -E718 -E719 -E71A -E71B -E71C -E71D -E71E -E71F -E720 -E721 -E722 -E723 -E724 -E725 -E726 -E727 -E728 -E729 -E72A -E72B -E72C -E72D -E72E -E72F -E730 -E731 -E732 -E733 -E734 -E735 -E736 -E737 -E738 -E739 -E73A -E73B -E73C -E73D -E73E -E73F -E740 -E741 -E742 -E743 -E744 -E745 -E746 -E747 -E748 -E749 -E74A -E74B -E74C -E74D -E74E -E74F -E750 -E751 -E752 -E753 -E754 -E755 -E756 -E757 -CREATE TABLE t3 SELECT CONVERT(c1 USING cp932) AS c1 FROM t2; -SELECT HEX(c1) FROM t3; -HEX(c1) -05 -7E -815C -815F -8160 -8161 -817C -8191 -8192 -81CA -8740 -8741 -8742 -8743 -8744 -8745 -8746 -8747 -8748 -8749 -874A -874B -874C -874D -874E -874F -8750 -8751 -8752 -8753 -8754 -8755 -8756 -8757 -8758 -8759 -875A -875B -875C -875D -875F -8760 -8761 -8762 -8763 -8764 -8765 -8766 -8767 -8768 -8769 -876A -876B -876C -876D -876E -876F -8770 -8771 -8772 -8773 -8774 -8775 -877E -8780 -8781 -8782 -8783 -8784 -8785 -8786 -8787 -8788 -8789 -878A -878B -878C -878D -878E -878F -81E0 -81DF -81E7 -8793 -8794 -81E3 -81DB -81DA -8798 -8799 -81E6 -81BF -81BE -FA5C -FA5D -FA5E -FA5F -FA60 -FA61 -FA62 -FA63 -FA64 -FA65 -FA66 -FA67 -FA68 -FA69 -FA6A -FA6B -FA6C -FA6D -FA6E -FA6F -FA70 -FA71 -FA72 -FA73 -FA74 -FA75 -FA76 -FA77 -FA78 -FA79 -FA7A -FA7B -FA7C -FA7D -FA7E -FA80 -FA81 -FA82 -FA83 -FA84 -FA85 -FA86 -FA87 -FA88 -FA89 -FA8A -FA8B -FA8C -FA8D -FA8E -FA8F -FA90 -FA91 -FA92 -FA93 -FA94 -FA95 -FA96 -FA97 -FA98 -FA99 -FA9A -FA9B -FA9C -FA9D -FA9E -FA9F -FAA0 -FAA1 -FAA2 -FAA3 -FAA4 -FAA5 -FAA6 -FAA7 -FAA8 -FAA9 -FAAA -FAAB -FAAC -FAAD -FAAE -FAAF -FAB0 -FAB1 -FAB2 -FAB3 -FAB4 -FAB5 -FAB6 -FAB7 -FAB8 -FAB9 -FABA -FABB -FABC -FABD -FABE -FABF -FAC0 -FAC1 -FAC2 -FAC3 -FAC4 -FAC5 -FAC6 -FAC7 -FAC8 -FAC9 -FACA -FACB -FACC -FACD -FACE -FACF -FAD0 -FAD1 -FAD2 -FAD3 -FAD4 -FAD5 -FAD6 -FAD7 -FAD8 -FAD9 -FADA -FADB -FADC -FADD -FADE -FADF -FAE0 -FAE1 -FAE2 -FAE3 -FAE4 -FAE5 -FAE6 -FAE7 -FAE8 -FAE9 -FAEA -FAEB -FAEC -FAED -FAEE -FAEF -FAF0 -FAF1 -FAF2 -FAF3 -FAF4 -FAF5 -FAF6 -FAF7 -FAF8 -FAF9 -FAFA -FAFB -FAFC -FB40 -FB41 -FB42 -FB43 -FB44 -FB45 -FB46 -FB47 -FB48 -FB49 -FB4A -FB4B -FB4C -FB4D -FB4E -FB4F -FB50 -FB51 -FB52 -FB53 -FB54 -FB55 -FB56 -FB57 -FB58 -FB59 -FB5A -FB5B -FB5C -FB5D -FB5E -FB5F -FB60 -FB61 -FB62 -FB63 -FB64 -FB65 -FB66 -FB67 -FB68 -FB69 -FB6A -FB6B -FB6C -FB6D -FB6E -FB6F -FB70 -FB71 -FB72 -FB73 -FB74 -FB75 -FB76 -FB77 -FB78 -FB79 -FB7A -FB7B -FB7C -FB7D -FB7E -FB80 -FB81 -FB82 -FB83 -FB84 -FB85 -FB86 -FB87 -FB88 -FB89 -FB8A -FB8B -FB8C -FB8D -FB8E -FB8F -FB90 -FB91 -FB92 -FB93 -FB94 -FB95 -FB96 -FB97 -FB98 -FB99 -FB9A -FB9B -FB9C -FB9D -FB9E -FB9F -FBA0 -FBA1 -FBA2 -FBA3 -FBA4 -FBA5 -FBA6 -FBA7 -FBA8 -FBA9 -FBAA -FBAB -FBAC -FBAD -FBAE -FBAF -FBB0 -FBB1 -FBB2 -FBB3 -FBB4 -FBB5 -FBB6 -FBB7 -FBB8 -FBB9 -FBBA -FBBB -FBBC -FBBD -FBBE -FBBF -FBC0 -FBC1 -FBC2 -FBC3 -FBC4 -FBC5 -FBC6 -FBC7 -FBC8 -FBC9 -FBCA -FBCB -FBCC -FBCD -FBCE -FBCF -FBD0 -FBD1 -FBD2 -FBD3 -FBD4 -FBD5 -FBD6 -FBD7 -FBD8 -FBD9 -FBDA -FBDB -FBDC -FBDD -FBDE -FBDF -FBE0 -FBE1 -FBE2 -FBE3 -FBE4 -FBE5 -FBE6 -FBE7 -FBE8 -FBE9 -FBEA -FBEB -FBEC -FBED -FBEE -FBEF -FBF0 -FBF1 -FBF2 -FBF3 -FBF4 -FBF5 -FBF6 -FBF7 -FBF8 -FBF9 -FBFA -FBFB -FBFC -FC40 -FC41 -FC42 -FC43 -FC44 -FC45 -FC46 -FC47 -FC48 -FC49 -FC4A -FC4B -FA40 -FA41 -FA42 -FA43 -FA44 -FA45 -FA46 -FA47 -FA48 -FA49 -81CA -FA55 -FA56 -FA57 -FA40 -FA41 -FA42 -FA43 -FA44 -FA45 -FA46 -FA47 -FA48 -FA49 -8754 -8755 -8756 -8757 -8758 -8759 -875A -875B -875C -875D -81CA -FA55 -FA56 -FA57 -878A -8782 -8784 -81E6 -FA5C -FA5D -FA5E -FA5F -FA60 -FA61 -FA62 -FA63 -FA64 -FA65 -FA66 -FA67 -FA68 -FA69 -FA6A -FA6B -FA6C -FA6D -FA6E -FA6F -FA70 -FA71 -FA72 -FA73 -FA74 -FA75 -FA76 -FA77 -FA78 -FA79 -FA7A -FA7B -FA7C -FA7D -FA7E -FA80 -FA81 -FA82 -FA83 -FA84 -FA85 -FA86 -FA87 -FA88 -FA89 -FA8A -FA8B -FA8C -FA8D -FA8E -FA8F -FA90 -FA91 -FA92 -FA93 -FA94 -FA95 -FA96 -FA97 -FA98 -FA99 -FA9A -FA9B -FA9C -FA9D -FA9E -FA9F -FAA0 -FAA1 -FAA2 -FAA3 -FAA4 -FAA5 -FAA6 -FAA7 -FAA8 -FAA9 -FAAA -FAAB -FAAC -FAAD -FAAE -FAAF -FAB0 -FAB1 -FAB2 -FAB3 -FAB4 -FAB5 -FAB6 -FAB7 -FAB8 -FAB9 -FABA -FABB -FABC -FABD -FABE -FABF -FAC0 -FAC1 -FAC2 -FAC3 -FAC4 -FAC5 -FAC6 -FAC7 -FAC8 -FAC9 -FACA -FACB -FACC -FACD -FACE -FACF -FAD0 -FAD1 -FAD2 -FAD3 -FAD4 -FAD5 -FAD6 -FAD7 -FAD8 -FAD9 -FADA -FADB -FADC -FADD -FADE -FADF -FAE0 -FAE1 -FAE2 -FAE3 -FAE4 -FAE5 -FAE6 -FAE7 -FAE8 -FAE9 -FAEA -FAEB -FAEC -FAED -FAEE -FAEF -FAF0 -FAF1 -FAF2 -FAF3 -FAF4 -FAF5 -FAF6 -FAF7 -FAF8 -FAF9 -FAFA -FAFB -FAFC -FB40 -FB41 -FB42 -FB43 -FB44 -FB45 -FB46 -FB47 -FB48 -FB49 -FB4A -FB4B -FB4C -FB4D -FB4E -FB4F -FB50 -FB51 -FB52 -FB53 -FB54 -FB55 -FB56 -FB57 -FB58 -FB59 -FB5A -FB5B -FB5C -FB5D -FB5E -FB5F -FB60 -FB61 -FB62 -FB63 -FB64 -FB65 -FB66 -FB67 -FB68 -FB69 -FB6A -FB6B -FB6C -FB6D -FB6E -FB6F -FB70 -FB71 -FB72 -FB73 -FB74 -FB75 -FB76 -FB77 -FB78 -FB79 -FB7A -FB7B -FB7C -FB7D -FB7E -FB80 -FB81 -FB82 -FB83 -FB84 -FB85 -FB86 -FB87 -FB88 -FB89 -FB8A -FB8B -FB8C -FB8D -FB8E -FB8F -FB90 -FB91 -FB92 -FB93 -FB94 -FB95 -FB96 -FB97 -FB98 -FB99 -FB9A -FB9B -FB9C -FB9D -FB9E -FB9F -FBA0 -FBA1 -FBA2 -FBA3 -FBA4 -FBA5 -FBA6 -FBA7 -FBA8 -FBA9 -FBAA -FBAB -FBAC -FBAD -FBAE -FBAF -FBB0 -FBB1 -FBB2 -FBB3 -FBB4 -FBB5 -FBB6 -FBB7 -FBB8 -FBB9 -FBBA -FBBB -FBBC -FBBD -FBBE -FBBF -FBC0 -FBC1 -FBC2 -FBC3 -FBC4 -FBC5 -FBC6 -FBC7 -FBC8 -FBC9 -FBCA -FBCB -FBCC -FBCD -FBCE -FBCF -FBD0 -FBD1 -FBD2 -FBD3 -FBD4 -FBD5 -FBD6 -FBD7 -FBD8 -FBD9 -FBDA -FBDB -FBDC -FBDD -FBDE -FBDF -FBE0 -FBE1 -FBE2 -FBE3 -FBE4 -FBE5 -FBE6 -FBE7 -FBE8 -FBE9 -FBEA -FBEB -FBEC -FBED -FBEE -FBEF -FBF0 -FBF1 -FBF2 -FBF3 -FBF4 -FBF5 -FBF6 -FBF7 -FBF8 -FBF9 -FBFA -FBFB -FBFC -FC40 -FC41 -FC42 -FC43 -FC44 -FC45 -FC46 -FC47 -FC48 -FC49 -FC4A -FC4B -F040 -F041 -F042 -F043 -F044 -F045 -F046 -F047 -F048 -F049 -F04A -F04B -F04C -F04D -F04E -F04F -F050 -F051 -F052 -F053 -F054 -F055 -F056 -F057 -F058 -F059 -F05A -F05B -F05C -F05D -F05E -F05F -F060 -F061 -F062 -F063 -F064 -F065 -F066 -F067 -F068 -F069 -F06A -F06B -F06C -F06D -F06E -F06F -F070 -F071 -F072 -F073 -F074 -F075 -F076 -F077 -F078 -F079 -F07A -F07B -F07C -F07D -F07E -F080 -F081 -F082 -F083 -F084 -F085 -F086 -F087 -F088 -F089 -F08A -F08B -F08C -F08D -F08E -F08F -F090 -F091 -F092 -F093 -F094 -F095 -F096 -F097 -F098 -F099 -F09A -F09B -F09C -F09D -F09E -F09F -F0A0 -F0A1 -F0A2 -F0A3 -F0A4 -F0A5 -F0A6 -F0A7 -F0A8 -F0A9 -F0AA -F0AB -F0AC -F0AD -F0AE -F0AF -F0B0 -F0B1 -F0B2 -F0B3 -F0B4 -F0B5 -F0B6 -F0B7 -F0B8 -F0B9 -F0BA -F0BB -F0BC -F0BD -F0BE -F0BF -F0C0 -F0C1 -F0C2 -F0C3 -F0C4 -F0C5 -F0C6 -F0C7 -F0C8 -F0C9 -F0CA -F0CB -F0CC -F0CD -F0CE -F0CF -F0D0 -F0D1 -F0D2 -F0D3 -F0D4 -F0D5 -F0D6 -F0D7 -F0D8 -F0D9 -F0DA -F0DB -F0DC -F0DD -F0DE -F0DF -F0E0 -F0E1 -F0E2 -F0E3 -F0E4 -F0E5 -F0E6 -F0E7 -F0E8 -F0E9 -F0EA -F0EB -F0EC -F0ED -F0EE -F0EF -F0F0 -F0F1 -F0F2 -F0F3 -F0F4 -F0F5 -F0F6 -F0F7 -F0F8 -F0F9 -F0FA -F0FB -F0FC -F140 -F141 -F142 -F143 -F144 -F145 -F146 -F147 -F148 -F149 -F14A -F14B -F14C -F14D -F14E -F14F -F150 -F151 -F152 -F153 -F154 -F155 -F156 -F157 -F158 -F159 -F15A -F15B -F15C -F15D -F15E -F15F -F160 -F161 -F162 -F163 -F164 -F165 -F166 -F167 -F168 -F169 -F16A -F16B -F16C -F16D -F16E -F16F -F170 -F171 -F172 -F173 -F174 -F175 -F176 -F177 -F178 -F179 -F17A -F17B -F17C -F17D -F17E -F180 -F181 -F182 -F183 -F184 -F185 -F186 -F187 -F188 -F189 -F18A -F18B -F18C -F18D -F18E -F18F -F190 -F191 -F192 -F193 -F194 -F195 -F196 -F197 -F198 -F199 -F19A -F19B -F19C -F19D -F19E -F19F -F1A0 -F1A1 -F1A2 -F1A3 -F1A4 -F1A5 -F1A6 -F1A7 -F1A8 -F1A9 -F1AA -F1AB -F1AC -F1AD -F1AE -F1AF -F1B0 -F1B1 -F1B2 -F1B3 -F1B4 -F1B5 -F1B6 -F1B7 -F1B8 -F1B9 -F1BA -F1BB -F1BC -F1BD -F1BE -F1BF -F1C0 -F1C1 -F1C2 -F1C3 -F1C4 -F1C5 -F1C6 -F1C7 -F1C8 -F1C9 -F1CA -F1CB -F1CC -F1CD -F1CE -F1CF -F1D0 -F1D1 -F1D2 -F1D3 -F1D4 -F1D5 -F1D6 -F1D7 -F1D8 -F1D9 -F1DA -F1DB -F1DC -F1DD -F1DE -F1DF -F1E0 -F1E1 -F1E2 -F1E3 -F1E4 -F1E5 -F1E6 -F1E7 -F1E8 -F1E9 -F1EA -F1EB -F1EC -F1ED -F1EE -F1EF -F1F0 -F1F1 -F1F2 -F1F3 -F1F4 -F1F5 -F1F6 -F1F7 -F1F8 -F1F9 -F1FA -F1FB -F1FC -F240 -F241 -F242 -F243 -F244 -F245 -F246 -F247 -F248 -F249 -F24A -F24B -F24C -F24D -F24E -F24F -F250 -F251 -F252 -F253 -F254 -F255 -F256 -F257 -F258 -F259 -F25A -F25B -F25C -F25D -F25E -F25F -F260 -F261 -F262 -F263 -F264 -F265 -F266 -F267 -F268 -F269 -F26A -F26B -F26C -F26D -F26E -F26F -F270 -F271 -F272 -F273 -F274 -F275 -F276 -F277 -F278 -F279 -F27A -F27B -F27C -F27D -F27E -F280 -F281 -F282 -F283 -F284 -F285 -F286 -F287 -F288 -F289 -F28A -F28B -F28C -F28D -F28E -F28F -F290 -F291 -F292 -F293 -F294 -F295 -F296 -F297 -F298 -F299 -F29A -F29B -F29C -F29D -F29E -F29F -F2A0 -F2A1 -F2A2 -F2A3 -F2A4 -F2A5 -F2A6 -F2A7 -F2A8 -F2A9 -F2AA -F2AB -F2AC -F2AD -F2AE -F2AF -F2B0 -F2B1 -F2B2 -F2B3 -F2B4 -F2B5 -F2B6 -F2B7 -F2B8 -F2B9 -F2BA -F2BB -F2BC -F2BD -F2BE -F2BF -F2C0 -F2C1 -F2C2 -F2C3 -F2C4 -F2C5 -F2C6 -F2C7 -F2C8 -F2C9 -F2CA -F2CB -F2CC -F2CD -F2CE -F2CF -F2D0 -F2D1 -F2D2 -F2D3 -F2D4 -F2D5 -F2D6 -F2D7 -F2D8 -F2D9 -F2DA -F2DB -F2DC -F2DD -F2DE -F2DF -F2E0 -F2E1 -F2E2 -F2E3 -F2E4 -F2E5 -F2E6 -F2E7 -F2E8 -F2E9 -F2EA -F2EB -F2EC -F2ED -F2EE -F2EF -F2F0 -F2F1 -F2F2 -F2F3 -F2F4 -F2F5 -F2F6 -F2F7 -F2F8 -F2F9 -F2FA -F2FB -F2FC -F340 -F341 -F342 -F343 -F344 -F345 -F346 -F347 -F348 -F349 -F34A -F34B -F34C -F34D -F34E -F34F -F350 -F351 -F352 -F353 -F354 -F355 -F356 -F357 -F358 -F359 -F35A -F35B -F35C -F35D -F35E -F35F -F360 -F361 -F362 -F363 -F364 -F365 -F366 -F367 -F368 -F369 -F36A -F36B -F36C -F36D -F36E -F36F -F370 -F371 -F372 -F373 -F374 -F375 -F376 -F377 -F378 -F379 -F37A -F37B -F37C -F37D -F37E -F380 -F381 -F382 -F383 -F384 -F385 -F386 -F387 -F388 -F389 -F38A -F38B -F38C -F38D -F38E -F38F -F390 -F391 -F392 -F393 -F394 -F395 -F396 -F397 -F398 -F399 -F39A -F39B -F39C -F39D -F39E -F39F -F3A0 -F3A1 -F3A2 -F3A3 -F3A4 -F3A5 -F3A6 -F3A7 -F3A8 -F3A9 -F3AA -F3AB -F3AC -F3AD -F3AE -F3AF -F3B0 -F3B1 -F3B2 -F3B3 -F3B4 -F3B5 -F3B6 -F3B7 -F3B8 -F3B9 -F3BA -F3BB -F3BC -F3BD -F3BE -F3BF -F3C0 -F3C1 -F3C2 -F3C3 -F3C4 -F3C5 -F3C6 -F3C7 -F3C8 -F3C9 -F3CA -F3CB -F3CC -F3CD -F3CE -F3CF -F3D0 -F3D1 -F3D2 -F3D3 -F3D4 -F3D5 -F3D6 -F3D7 -F3D8 -F3D9 -F3DA -F3DB -F3DC -F3DD -F3DE -F3DF -F3E0 -F3E1 -F3E2 -F3E3 -F3E4 -F3E5 -F3E6 -F3E7 -F3E8 -F3E9 -F3EA -F3EB -F3EC -F3ED -F3EE -F3EF -F3F0 -F3F1 -F3F2 -F3F3 -F3F4 -F3F5 -F3F6 -F3F7 -F3F8 -F3F9 -F3FA -F3FB -F3FC -F440 -F441 -F442 -F443 -F444 -F445 -F446 -F447 -F448 -F449 -F44A -F44B -F44C -F44D -F44E -F44F -F450 -F451 -F452 -F453 -F454 -F455 -F456 -F457 -F458 -F459 -F45A -F45B -F45C -F45D -F45E -F45F -F460 -F461 -F462 -F463 -F464 -F465 -F466 -F467 -F468 -F469 -F46A -F46B -F46C -F46D -F46E -F46F -F470 -F471 -F472 -F473 -F474 -F475 -F476 -F477 -F478 -F479 -F47A -F47B -F47C -F47D -F47E -F480 -F481 -F482 -F483 -F484 -F485 -F486 -F487 -F488 -F489 -F48A -F48B -F48C -F48D -F48E -F48F -F490 -F491 -F492 -F493 -F494 -F495 -F496 -F497 -F498 -F499 -F49A -F49B -F49C -F49D -F49E -F49F -F4A0 -F4A1 -F4A2 -F4A3 -F4A4 -F4A5 -F4A6 -F4A7 -F4A8 -F4A9 -F4AA -F4AB -F4AC -F4AD -F4AE -F4AF -F4B0 -F4B1 -F4B2 -F4B3 -F4B4 -F4B5 -F4B6 -F4B7 -F4B8 -F4B9 -F4BA -F4BB -F4BC -F4BD -F4BE -F4BF -F4C0 -F4C1 -F4C2 -F4C3 -F4C4 -F4C5 -F4C6 -F4C7 -F4C8 -F4C9 -F4CA -F4CB -F4CC -F4CD -F4CE -F4CF -F4D0 -F4D1 -F4D2 -F4D3 -F4D4 -F4D5 -F4D6 -F4D7 -F4D8 -F4D9 -F4DA -F4DB -F4DC -F4DD -F4DE -F4DF -F4E0 -F4E1 -F4E2 -F4E3 -F4E4 -F4E5 -F4E6 -F4E7 -F4E8 -F4E9 -F4EA -F4EB -F4EC -F4ED -F4EE -F4EF -F4F0 -F4F1 -F4F2 -F4F3 -F4F4 -F4F5 -F4F6 -F4F7 -F4F8 -F4F9 -F4FA -F4FB -F4FC -F540 -F541 -F542 -F543 -F544 -F545 -F546 -F547 -F548 -F549 -F54A -F54B -F54C -F54D -F54E -F54F -F550 -F551 -F552 -F553 -F554 -F555 -F556 -F557 -F558 -F559 -F55A -F55B -F55C -F55D -F55E -F55F -F560 -F561 -F562 -F563 -F564 -F565 -F566 -F567 -F568 -F569 -F56A -F56B -F56C -F56D -F56E -F56F -F570 -F571 -F572 -F573 -F574 -F575 -F576 -F577 -F578 -F579 -F57A -F57B -F57C -F57D -F57E -F580 -F581 -F582 -F583 -F584 -F585 -F586 -F587 -F588 -F589 -F58A -F58B -F58C -F58D -F58E -F58F -F590 -F591 -F592 -F593 -F594 -F595 -F596 -F597 -F598 -F599 -F59A -F59B -F59C -F59D -F59E -F59F -F5A0 -F5A1 -F5A2 -F5A3 -F5A4 -F5A5 -F5A6 -F5A7 -F5A8 -F5A9 -F5AA -F5AB -F5AC -F5AD -F5AE -F5AF -F5B0 -F5B1 -F5B2 -F5B3 -F5B4 -F5B5 -F5B6 -F5B7 -F5B8 -F5B9 -F5BA -F5BB -F5BC -F5BD -F5BE -F5BF -F5C0 -F5C1 -F5C2 -F5C3 -F5C4 -F5C5 -F5C6 -F5C7 -F5C8 -F5C9 -F5CA -F5CB -F5CC -F5CD -F5CE -F5CF -F5D0 -F5D1 -F5D2 -F5D3 -F5D4 -F5D5 -F5D6 -F5D7 -F5D8 -F5D9 -F5DA -F5DB -F5DC -F5DD -F5DE -F5DF -F5E0 -F5E1 -F5E2 -F5E3 -F5E4 -F5E5 -F5E6 -F5E7 -F5E8 -F5E9 -F5EA -F5EB -F5EC -F5ED -F5EE -F5EF -F5F0 -F5F1 -F5F2 -F5F3 -F5F4 -F5F5 -F5F6 -F5F7 -F5F8 -F5F9 -F5FA -F5FB -F5FC -F640 -F641 -F642 -F643 -F644 -F645 -F646 -F647 -F648 -F649 -F64A -F64B -F64C -F64D -F64E -F64F -F650 -F651 -F652 -F653 -F654 -F655 -F656 -F657 -F658 -F659 -F65A -F65B -F65C -F65D -F65E -F65F -F660 -F661 -F662 -F663 -F664 -F665 -F666 -F667 -F668 -F669 -F66A -F66B -F66C -F66D -F66E -F66F -F670 -F671 -F672 -F673 -F674 -F675 -F676 -F677 -F678 -F679 -F67A -F67B -F67C -F67D -F67E -F680 -F681 -F682 -F683 -F684 -F685 -F686 -F687 -F688 -F689 -F68A -F68B -F68C -F68D -F68E -F68F -F690 -F691 -F692 -F693 -F694 -F695 -F696 -F697 -F698 -F699 -F69A -F69B -F69C -F69D -F69E -F69F -F6A0 -F6A1 -F6A2 -F6A3 -F6A4 -F6A5 -F6A6 -F6A7 -F6A8 -F6A9 -F6AA -F6AB -F6AC -F6AD -F6AE -F6AF -F6B0 -F6B1 -F6B2 -F6B3 -F6B4 -F6B5 -F6B6 -F6B7 -F6B8 -F6B9 -F6BA -F6BB -F6BC -F6BD -F6BE -F6BF -F6C0 -F6C1 -F6C2 -F6C3 -F6C4 -F6C5 -F6C6 -F6C7 -F6C8 -F6C9 -F6CA -F6CB -F6CC -F6CD -F6CE -F6CF -F6D0 -F6D1 -F6D2 -F6D3 -F6D4 -F6D5 -F6D6 -F6D7 -F6D8 -F6D9 -F6DA -F6DB -F6DC -F6DD -F6DE -F6DF -F6E0 -F6E1 -F6E2 -F6E3 -F6E4 -F6E5 -F6E6 -F6E7 -F6E8 -F6E9 -F6EA -F6EB -F6EC -F6ED -F6EE -F6EF -F6F0 -F6F1 -F6F2 -F6F3 -F6F4 -F6F5 -F6F6 -F6F7 -F6F8 -F6F9 -F6FA -F6FB -F6FC -F740 -F741 -F742 -F743 -F744 -F745 -F746 -F747 -F748 -F749 -F74A -F74B -F74C -F74D -F74E -F74F -F750 -F751 -F752 -F753 -F754 -F755 -F756 -F757 -F758 -F759 -F75A -F75B -F75C -F75D -F75E -F75F -F760 -F761 -F762 -F763 -F764 -F765 -F766 -F767 -F768 -F769 -F76A -F76B -F76C -F76D -F76E -F76F -F770 -F771 -F772 -F773 -F774 -F775 -F776 -F777 -F778 -F779 -F77A -F77B -F77C -F77D -F77E -F780 -F781 -F782 -F783 -F784 -F785 -F786 -F787 -F788 -F789 -F78A -F78B -F78C -F78D -F78E -F78F -F790 -F791 -F792 -F793 -F794 -F795 -F796 -F797 -F798 -F799 -F79A -F79B -F79C -F79D -F79E -F79F -F7A0 -F7A1 -F7A2 -F7A3 -F7A4 -F7A5 -F7A6 -F7A7 -F7A8 -F7A9 -F7AA -F7AB -F7AC -F7AD -F7AE -F7AF -F7B0 -F7B1 -F7B2 -F7B3 -F7B4 -F7B5 -F7B6 -F7B7 -F7B8 -F7B9 -F7BA -F7BB -F7BC -F7BD -F7BE -F7BF -F7C0 -F7C1 -F7C2 -F7C3 -F7C4 -F7C5 -F7C6 -F7C7 -F7C8 -F7C9 -F7CA -F7CB -F7CC -F7CD -F7CE -F7CF -F7D0 -F7D1 -F7D2 -F7D3 -F7D4 -F7D5 -F7D6 -F7D7 -F7D8 -F7D9 -F7DA -F7DB -F7DC -F7DD -F7DE -F7DF -F7E0 -F7E1 -F7E2 -F7E3 -F7E4 -F7E5 -F7E6 -F7E7 -F7E8 -F7E9 -F7EA -F7EB -F7EC -F7ED -F7EE -F7EF -F7F0 -F7F1 -F7F2 -F7F3 -F7F4 -F7F5 -F7F6 -F7F7 -F7F8 -F7F9 -F7FA -F7FB -F7FC -F840 -F841 -F842 -F843 -F844 -F845 -F846 -F847 -F848 -F849 -F84A -F84B -F84C -F84D -F84E -F84F -F850 -F851 -F852 -F853 -F854 -F855 -F856 -F857 -F858 -F859 -F85A -F85B -F85C -F85D -F85E -F85F -F860 -F861 -F862 -F863 -F864 -F865 -F866 -F867 -F868 -F869 -F86A -F86B -F86C -F86D -F86E -F86F -F870 -F871 -F872 -F873 -F874 -F875 -F876 -F877 -F878 -F879 -F87A -F87B -F87C -F87D -F87E -F880 -F881 -F882 -F883 -F884 -F885 -F886 -F887 -F888 -F889 -F88A -F88B -F88C -F88D -F88E -F88F -F890 -F891 -F892 -F893 -F894 -F895 -F896 -F897 -F898 -F899 -F89A -F89B -F89C -F89D -F89E -F89F -F8A0 -F8A1 -F8A2 -F8A3 -F8A4 -F8A5 -F8A6 -F8A7 -F8A8 -F8A9 -F8AA -F8AB -F8AC -F8AD -F8AE -F8AF -F8B0 -F8B1 -F8B2 -F8B3 -F8B4 -F8B5 -F8B6 -F8B7 -F8B8 -F8B9 -F8BA -F8BB -F8BC -F8BD -F8BE -F8BF -F8C0 -F8C1 -F8C2 -F8C3 -F8C4 -F8C5 -F8C6 -F8C7 -F8C8 -F8C9 -F8CA -F8CB -F8CC -F8CD -F8CE -F8CF -F8D0 -F8D1 -F8D2 -F8D3 -F8D4 -F8D5 -F8D6 -F8D7 -F8D8 -F8D9 -F8DA -F8DB -F8DC -F8DD -F8DE -F8DF -F8E0 -F8E1 -F8E2 -F8E3 -F8E4 -F8E5 -F8E6 -F8E7 -F8E8 -F8E9 -F8EA -F8EB -F8EC -F8ED -F8EE -F8EF -F8F0 -F8F1 -F8F2 -F8F3 -F8F4 -F8F5 -F8F6 -F8F7 -F8F8 -F8F9 -F8FA -F8FB -F8FC -F940 -F941 -F942 -F943 -F944 -F945 -F946 -F947 -F948 -F949 -F94A -F94B -F94C -F94D -F94E -F94F -F950 -F951 -F952 -F953 -F954 -F955 -F956 -F957 -F958 -F959 -F95A -F95B -F95C -F95D -F95E -F95F -F960 -F961 -F962 -F963 -F964 -F965 -F966 -F967 -F968 -F969 -F96A -F96B -F96C -F96D -F96E -F96F -F970 -F971 -F972 -F973 -F974 -F975 -F976 -F977 -F978 -F979 -F97A -F97B -F97C -F97D -F97E -F980 -F981 -F982 -F983 -F984 -F985 -F986 -F987 -F988 -F989 -F98A -F98B -F98C -F98D -F98E -F98F -F990 -F991 -F992 -F993 -F994 -F995 -F996 -F997 -F998 -F999 -F99A -F99B -F99C -F99D -F99E -F99F -F9A0 -F9A1 -F9A2 -F9A3 -F9A4 -F9A5 -F9A6 -F9A7 -F9A8 -F9A9 -F9AA -F9AB -F9AC -F9AD -F9AE -F9AF -F9B0 -F9B1 -F9B2 -F9B3 -F9B4 -F9B5 -F9B6 -F9B7 -F9B8 -F9B9 -F9BA -F9BB -F9BC -F9BD -F9BE -F9BF -F9C0 -F9C1 -F9C2 -F9C3 -F9C4 -F9C5 -F9C6 -F9C7 -F9C8 -F9C9 -F9CA -F9CB -F9CC -F9CD -F9CE -F9CF -F9D0 -F9D1 -F9D2 -F9D3 -F9D4 -F9D5 -F9D6 -F9D7 -F9D8 -F9D9 -F9DA -F9DB -F9DC -F9DD -F9DE -F9DF -F9E0 -F9E1 -F9E2 -F9E3 -F9E4 -F9E5 -F9E6 -F9E7 -F9E8 -F9E9 -F9EA -F9EB -F9EC -F9ED -F9EE -F9EF -F9F0 -F9F1 -F9F2 -F9F3 -F9F4 -F9F5 -F9F6 -F9F7 -F9F8 -F9F9 -F9FA -F9FB -F9FC -CREATE TABLE t4 SELECT CONVERT(c1 USING eucjpms) AS c1 FROM t1; -SELECT HEX(c1) FROM t4; -HEX(c1) -05 -7E -A1BD -A1C0 -A1C1 -A1C2 -A1DD -A1F1 -A1F2 -A2CC -ADA1 -ADA2 -ADA3 -ADA4 -ADA5 -ADA6 -ADA7 -ADA8 -ADA9 -ADAA -ADAB -ADAC -ADAD -ADAE -ADAF -ADB0 -ADB1 -ADB2 -ADB3 -ADB4 -ADB5 -ADB6 -ADB7 -ADB8 -ADB9 -ADBA -ADBB -ADBC -ADBD -ADBE -ADC0 -ADC1 -ADC2 -ADC3 -ADC4 -ADC5 -ADC6 -ADC7 -ADC8 -ADC9 -ADCA -ADCB -ADCC -ADCD -ADCE -ADCF -ADD0 -ADD1 -ADD2 -ADD3 -ADD4 -ADD5 -ADD6 -ADDF -ADE0 -ADE1 -ADE2 -ADE3 -ADE4 -ADE5 -ADE6 -ADE7 -ADE8 -ADE9 -ADEA -ADEB -ADEC -ADED -ADEE -ADEF -A2E2 -A2E1 -A2E9 -ADF3 -ADF4 -A2E5 -A2DD -A2DC -ADF8 -ADF9 -A2E8 -A2C1 -A2C0 -8FD4E3 -8FDCDF -8FE4E9 -8FE3F8 -8FD9A1 -8FB1BB -8FF4AE -8FC2AD -8FC3FC -8FE4D0 -8FC2BF -8FBCF4 -8FB0A9 -8FB0C8 -8FF4AF -8FB0D2 -8FB0D4 -8FB0E3 -8FB0EE -8FB1A7 -8FB1A3 -8FB1AC -8FB1A9 -8FB1BE -8FB1DF -8FB1D8 -8FB1C8 -8FB1D7 -8FB1E3 -8FB1F4 -8FB1E1 -8FB2A3 -8FF4B0 -8FB2BB -8FB2E6 -8FB2ED -8FB2F5 -8FB2FC -8FF4B1 -8FB3B5 -8FB3D8 -8FB3DB -8FB3E5 -8FB3EE -8FB3FB -8FF4B2 -8FF4B3 -8FB4C0 -8FB4C7 -8FB4D0 -8FB4DE -8FF4B4 -8FB5AA -8FF4B5 -8FB5AF -8FB5C4 -8FB5E8 -8FF4B6 -8FB7C2 -8FB7E4 -8FB7E8 -8FB7E7 -8FF4B7 -8FF4B8 -8FF4B9 -8FB8CE -8FB8E1 -8FB8F5 -8FB8F7 -8FB8F8 -8FB8FC -8FB9AF -8FB9B7 -8FBABE -8FBADB -8FCDAA -8FBAE1 -8FF4BA -8FBAEB -8FBBB3 -8FBBB8 -8FF4BB -8FBBCA -8FF4BC -8FF4BD -8FBBD0 -8FBBDE -8FBBF4 -8FBBF5 -8FBBF9 -8FBCE4 -8FBCED -8FBCFE -8FF4BE -8FBDC2 -8FBDE7 -8FF4BF -8FBDF0 -8FBEB0 -8FBEAC -8FF4C0 -8FBEB3 -8FBEBD -8FBECD -8FBEC9 -8FBEE4 -8FBFA8 -8FBFC9 -8FC0C4 -8FC0E4 -8FC0F4 -8FC1A6 -8FF4C1 -8FC1F5 -8FC1FC -8FF4C2 -8FC1F8 -8FC2AB -8FC2A1 -8FC2A5 -8FF4C3 -8FC2B8 -8FC2BA -8FF4C4 -8FC2C4 -8FC2D2 -8FC2D7 -8FC2DB -8FC2DE -8FC2ED -8FC2F0 -8FF4C5 -8FC3A1 -8FC3B5 -8FC3C9 -8FC3B9 -8FF4C6 -8FC3D8 -8FC3FE -8FF4C7 -8FC4CC -8FF4C8 -8FC4D9 -8FC4EA -8FC4FD -8FF4C9 -8FC5A7 -8FC5B5 -8FC5B6 -8FF4CA -8FC5D5 -8FC6B8 -8FC6D7 -8FC6E0 -8FC6EA -8FC6E3 -8FC7A1 -8FC7AB -8FC7C7 -8FC7C3 -8FC7CB -8FC7CF -8FC7D9 -8FF4CB -8FF4CC -8FC7E6 -8FC7EE -8FC7FC -8FC7EB -8FC7F0 -8FC8B1 -8FC8E5 -8FC8F8 -8FC9A6 -8FC9AB -8FC9AD -8FF4CD -8FC9CA -8FC9D3 -8FC9E9 -8FC9E3 -8FC9FC -8FC9F4 -8FC9F5 -8FF4CE -8FCAB3 -8FCABD -8FCAEF -8FCAF1 -8FCBAE -8FF4CF -8FCBCA -8FCBE6 -8FCBEA -8FCBF0 -8FCBF4 -8FCBEE -8FCCA5 -8FCBF9 -8FCCAB -8FCCAE -8FCCAD -8FCCB2 -8FCCC2 -8FCCD0 -8FCCD9 -8FF4D0 -8FCDBB -8FF4D1 -8FCEBB -8FF4D2 -8FCEBA -8FCEC3 -8FF4D3 -8FCEF2 -8FB3DD -8FCFD5 -8FCFE2 -8FCFE9 -8FCFED -8FF4D4 -8FF4D5 -8FF4D6 -8FF4D7 -8FD0E5 -8FF4D8 -8FD0E9 -8FD1E8 -8FF4D9 -8FF4DA -8FD1EC -8FD2BB -8FF4DB -8FD3E1 -8FD3E8 -8FD4A7 -8FF4DC -8FF4DD -8FD4D4 -8FD4F2 -8FD5AE -8FF4DE -8FD7DE -8FF4DF -8FD8A2 -8FD8B7 -8FD8C1 -8FD8D1 -8FD8F4 -8FD9C6 -8FD9C8 -8FD9D1 -8FF4E0 -8FF4E1 -8FF4E2 -8FF4E3 -8FF4E4 -8FDCD3 -8FDDC8 -8FDDD4 -8FDDEA -8FDDFA -8FDEA4 -8FDEB0 -8FF4E5 -8FDEB5 -8FDECB -8FF4E6 -8FDFB9 -8FF4E7 -8FDFC3 -8FF4E8 -8FF4E9 -8FE0D9 -8FF4EA -8FF4EB -8FE1E2 -8FF4EC -8FF4ED -8FF4EE -8FE2C7 -8FE3A8 -8FE3A6 -8FE3A9 -8FE3AF -8FE3B0 -8FE3AA -8FE3AB -8FE3BC -8FE3C1 -8FE3BF -8FE3D5 -8FE3D8 -8FE3D6 -8FE3DF -8FE3E3 -8FE3E1 -8FE3D4 -8FE3E9 -8FE4A6 -8FE3F1 -8FE3F2 -8FE4CB -8FE4C1 -8FE4C3 -8FE4BE -8FF4EF -8FE4C0 -8FE4C7 -8FE4BF -8FE4E0 -8FE4DE -8FE4D1 -8FF4F0 -8FE4DC -8FE4D2 -8FE4DB -8FE4D4 -8FE4FA -8FE4EF -8FE5B3 -8FE5BF -8FE5C9 -8FE5D0 -8FE5E2 -8FE5EA -8FE5EB -8FF4F1 -8FF4F2 -8FF4F3 -8FE6E8 -8FE6EF -8FE7AC -8FF4F4 -8FE7AE -8FF4F5 -8FE7B1 -8FF4F6 -8FE7B2 -8FE8B1 -8FE8B6 -8FF4F7 -8FF4F8 -8FE8DD -8FF4F9 -8FF4FA -8FE9D1 -8FF4FB -8FE9ED -8FEACD -8FF4FC -8FEADB -8FEAE6 -8FEAEA -8FEBA5 -8FEBFB -8FEBFA -8FF4FD -8FECD6 -8FF4FE -8FF3F3 -8FF3F4 -8FF3F5 -8FF3F6 -8FF3F7 -8FF3F8 -8FF3F9 -8FF3FA -8FF3FB -8FF3FC -A2CC -8FA2C3 -8FF4A9 -8FF4AA -8FF3F3 -8FF3F4 -8FF3F5 -8FF3F6 -8FF3F7 -8FF3F8 -8FF3F9 -8FF3FA -8FF3FB -8FF3FC -ADB5 -ADB6 -ADB7 -ADB8 -ADB9 -ADBA -ADBB -ADBC -ADBD -ADBE -A2CC -8FA2C3 -8FF4A9 -8FF4AA -ADEA -ADE2 -ADE4 -A2E8 -8FD4E3 -8FDCDF -8FE4E9 -8FE3F8 -8FD9A1 -8FB1BB -8FF4AE -8FC2AD -8FC3FC -8FE4D0 -8FC2BF -8FBCF4 -8FB0A9 -8FB0C8 -8FF4AF -8FB0D2 -8FB0D4 -8FB0E3 -8FB0EE -8FB1A7 -8FB1A3 -8FB1AC -8FB1A9 -8FB1BE -8FB1DF -8FB1D8 -8FB1C8 -8FB1D7 -8FB1E3 -8FB1F4 -8FB1E1 -8FB2A3 -8FF4B0 -8FB2BB -8FB2E6 -8FB2ED -8FB2F5 -8FB2FC -8FF4B1 -8FB3B5 -8FB3D8 -8FB3DB -8FB3E5 -8FB3EE -8FB3FB -8FF4B2 -8FF4B3 -8FB4C0 -8FB4C7 -8FB4D0 -8FB4DE -8FF4B4 -8FB5AA -8FF4B5 -8FB5AF -8FB5C4 -8FB5E8 -8FF4B6 -8FB7C2 -8FB7E4 -8FB7E8 -8FB7E7 -8FF4B7 -8FF4B8 -8FF4B9 -8FB8CE -8FB8E1 -8FB8F5 -8FB8F7 -8FB8F8 -8FB8FC -8FB9AF -8FB9B7 -8FBABE -8FBADB -8FCDAA -8FBAE1 -8FF4BA -8FBAEB -8FBBB3 -8FBBB8 -8FF4BB -8FBBCA -8FF4BC -8FF4BD -8FBBD0 -8FBBDE -8FBBF4 -8FBBF5 -8FBBF9 -8FBCE4 -8FBCED -8FBCFE -8FF4BE -8FBDC2 -8FBDE7 -8FF4BF -8FBDF0 -8FBEB0 -8FBEAC -8FF4C0 -8FBEB3 -8FBEBD -8FBECD -8FBEC9 -8FBEE4 -8FBFA8 -8FBFC9 -8FC0C4 -8FC0E4 -8FC0F4 -8FC1A6 -8FF4C1 -8FC1F5 -8FC1FC -8FF4C2 -8FC1F8 -8FC2AB -8FC2A1 -8FC2A5 -8FF4C3 -8FC2B8 -8FC2BA -8FF4C4 -8FC2C4 -8FC2D2 -8FC2D7 -8FC2DB -8FC2DE -8FC2ED -8FC2F0 -8FF4C5 -8FC3A1 -8FC3B5 -8FC3C9 -8FC3B9 -8FF4C6 -8FC3D8 -8FC3FE -8FF4C7 -8FC4CC -8FF4C8 -8FC4D9 -8FC4EA -8FC4FD -8FF4C9 -8FC5A7 -8FC5B5 -8FC5B6 -8FF4CA -8FC5D5 -8FC6B8 -8FC6D7 -8FC6E0 -8FC6EA -8FC6E3 -8FC7A1 -8FC7AB -8FC7C7 -8FC7C3 -8FC7CB -8FC7CF -8FC7D9 -8FF4CB -8FF4CC -8FC7E6 -8FC7EE -8FC7FC -8FC7EB -8FC7F0 -8FC8B1 -8FC8E5 -8FC8F8 -8FC9A6 -8FC9AB -8FC9AD -8FF4CD -8FC9CA -8FC9D3 -8FC9E9 -8FC9E3 -8FC9FC -8FC9F4 -8FC9F5 -8FF4CE -8FCAB3 -8FCABD -8FCAEF -8FCAF1 -8FCBAE -8FF4CF -8FCBCA -8FCBE6 -8FCBEA -8FCBF0 -8FCBF4 -8FCBEE -8FCCA5 -8FCBF9 -8FCCAB -8FCCAE -8FCCAD -8FCCB2 -8FCCC2 -8FCCD0 -8FCCD9 -8FF4D0 -8FCDBB -8FF4D1 -8FCEBB -8FF4D2 -8FCEBA -8FCEC3 -8FF4D3 -8FCEF2 -8FB3DD -8FCFD5 -8FCFE2 -8FCFE9 -8FCFED -8FF4D4 -8FF4D5 -8FF4D6 -8FF4D7 -8FD0E5 -8FF4D8 -8FD0E9 -8FD1E8 -8FF4D9 -8FF4DA -8FD1EC -8FD2BB -8FF4DB -8FD3E1 -8FD3E8 -8FD4A7 -8FF4DC -8FF4DD -8FD4D4 -8FD4F2 -8FD5AE -8FF4DE -8FD7DE -8FF4DF -8FD8A2 -8FD8B7 -8FD8C1 -8FD8D1 -8FD8F4 -8FD9C6 -8FD9C8 -8FD9D1 -8FF4E0 -8FF4E1 -8FF4E2 -8FF4E3 -8FF4E4 -8FDCD3 -8FDDC8 -8FDDD4 -8FDDEA -8FDDFA -8FDEA4 -8FDEB0 -8FF4E5 -8FDEB5 -8FDECB -8FF4E6 -8FDFB9 -8FF4E7 -8FDFC3 -8FF4E8 -8FF4E9 -8FE0D9 -8FF4EA -8FF4EB -8FE1E2 -8FF4EC -8FF4ED -8FF4EE -8FE2C7 -8FE3A8 -8FE3A6 -8FE3A9 -8FE3AF -8FE3B0 -8FE3AA -8FE3AB -8FE3BC -8FE3C1 -8FE3BF -8FE3D5 -8FE3D8 -8FE3D6 -8FE3DF -8FE3E3 -8FE3E1 -8FE3D4 -8FE3E9 -8FE4A6 -8FE3F1 -8FE3F2 -8FE4CB -8FE4C1 -8FE4C3 -8FE4BE -8FF4EF -8FE4C0 -8FE4C7 -8FE4BF -8FE4E0 -8FE4DE -8FE4D1 -8FF4F0 -8FE4DC -8FE4D2 -8FE4DB -8FE4D4 -8FE4FA -8FE4EF -8FE5B3 -8FE5BF -8FE5C9 -8FE5D0 -8FE5E2 -8FE5EA -8FE5EB -8FF4F1 -8FF4F2 -8FF4F3 -8FE6E8 -8FE6EF -8FE7AC -8FF4F4 -8FE7AE -8FF4F5 -8FE7B1 -8FF4F6 -8FE7B2 -8FE8B1 -8FE8B6 -8FF4F7 -8FF4F8 -8FE8DD -8FF4F9 -8FF4FA -8FE9D1 -8FF4FB -8FE9ED -8FEACD -8FF4FC -8FEADB -8FEAE6 -8FEAEA -8FEBA5 -8FEBFB -8FEBFA -8FF4FD -8FECD6 -8FF4FE -F5A1 -F5A2 -F5A3 -F5A4 -F5A5 -F5A6 -F5A7 -F5A8 -F5A9 -F5AA -F5AB -F5AC -F5AD -F5AE -F5AF -F5B0 -F5B1 -F5B2 -F5B3 -F5B4 -F5B5 -F5B6 -F5B7 -F5B8 -F5B9 -F5BA -F5BB -F5BC -F5BD -F5BE -F5BF -F5C0 -F5C1 -F5C2 -F5C3 -F5C4 -F5C5 -F5C6 -F5C7 -F5C8 -F5C9 -F5CA -F5CB -F5CC -F5CD -F5CE -F5CF -F5D0 -F5D1 -F5D2 -F5D3 -F5D4 -F5D5 -F5D6 -F5D7 -F5D8 -F5D9 -F5DA -F5DB -F5DC -F5DD -F5DE -F5DF -F5E0 -F5E1 -F5E2 -F5E3 -F5E4 -F5E5 -F5E6 -F5E7 -F5E8 -F5E9 -F5EA -F5EB -F5EC -F5ED -F5EE -F5EF -F5F0 -F5F1 -F5F2 -F5F3 -F5F4 -F5F5 -F5F6 -F5F7 -F5F8 -F5F9 -F5FA -F5FB -F5FC -F5FD -F5FE -F6A1 -F6A2 -F6A3 -F6A4 -F6A5 -F6A6 -F6A7 -F6A8 -F6A9 -F6AA -F6AB -F6AC -F6AD -F6AE -F6AF -F6B0 -F6B1 -F6B2 -F6B3 -F6B4 -F6B5 -F6B6 -F6B7 -F6B8 -F6B9 -F6BA -F6BB -F6BC -F6BD -F6BE -F6BF -F6C0 -F6C1 -F6C2 -F6C3 -F6C4 -F6C5 -F6C6 -F6C7 -F6C8 -F6C9 -F6CA -F6CB -F6CC -F6CD -F6CE -F6CF -F6D0 -F6D1 -F6D2 -F6D3 -F6D4 -F6D5 -F6D6 -F6D7 -F6D8 -F6D9 -F6DA -F6DB -F6DC -F6DD -F6DE -F6DF -F6E0 -F6E1 -F6E2 -F6E3 -F6E4 -F6E5 -F6E6 -F6E7 -F6E8 -F6E9 -F6EA -F6EB -F6EC -F6ED -F6EE -F6EF -F6F0 -F6F1 -F6F2 -F6F3 -F6F4 -F6F5 -F6F6 -F6F7 -F6F8 -F6F9 -F6FA -F6FB -F6FC -F6FD -F6FE -F7A1 -F7A2 -F7A3 -F7A4 -F7A5 -F7A6 -F7A7 -F7A8 -F7A9 -F7AA -F7AB -F7AC -F7AD -F7AE -F7AF -F7B0 -F7B1 -F7B2 -F7B3 -F7B4 -F7B5 -F7B6 -F7B7 -F7B8 -F7B9 -F7BA -F7BB -F7BC -F7BD -F7BE -F7BF -F7C0 -F7C1 -F7C2 -F7C3 -F7C4 -F7C5 -F7C6 -F7C7 -F7C8 -F7C9 -F7CA -F7CB -F7CC -F7CD -F7CE -F7CF -F7D0 -F7D1 -F7D2 -F7D3 -F7D4 -F7D5 -F7D6 -F7D7 -F7D8 -F7D9 -F7DA -F7DB -F7DC -F7DD -F7DE -F7DF -F7E0 -F7E1 -F7E2 -F7E3 -F7E4 -F7E5 -F7E6 -F7E7 -F7E8 -F7E9 -F7EA -F7EB -F7EC -F7ED -F7EE -F7EF -F7F0 -F7F1 -F7F2 -F7F3 -F7F4 -F7F5 -F7F6 -F7F7 -F7F8 -F7F9 -F7FA -F7FB -F7FC -F7FD -F7FE -F8A1 -F8A2 -F8A3 -F8A4 -F8A5 -F8A6 -F8A7 -F8A8 -F8A9 -F8AA -F8AB -F8AC -F8AD -F8AE -F8AF -F8B0 -F8B1 -F8B2 -F8B3 -F8B4 -F8B5 -F8B6 -F8B7 -F8B8 -F8B9 -F8BA -F8BB -F8BC -F8BD -F8BE -F8BF -F8C0 -F8C1 -F8C2 -F8C3 -F8C4 -F8C5 -F8C6 -F8C7 -F8C8 -F8C9 -F8CA -F8CB -F8CC -F8CD -F8CE -F8CF -F8D0 -F8D1 -F8D2 -F8D3 -F8D4 -F8D5 -F8D6 -F8D7 -F8D8 -F8D9 -F8DA -F8DB -F8DC -F8DD -F8DE -F8DF -F8E0 -F8E1 -F8E2 -F8E3 -F8E4 -F8E5 -F8E6 -F8E7 -F8E8 -F8E9 -F8EA -F8EB -F8EC -F8ED -F8EE -F8EF -F8F0 -F8F1 -F8F2 -F8F3 -F8F4 -F8F5 -F8F6 -F8F7 -F8F8 -F8F9 -F8FA -F8FB -F8FC -F8FD -F8FE -F9A1 -F9A2 -F9A3 -F9A4 -F9A5 -F9A6 -F9A7 -F9A8 -F9A9 -F9AA -F9AB -F9AC -F9AD -F9AE -F9AF -F9B0 -F9B1 -F9B2 -F9B3 -F9B4 -F9B5 -F9B6 -F9B7 -F9B8 -F9B9 -F9BA -F9BB -F9BC -F9BD -F9BE -F9BF -F9C0 -F9C1 -F9C2 -F9C3 -F9C4 -F9C5 -F9C6 -F9C7 -F9C8 -F9C9 -F9CA -F9CB -F9CC -F9CD -F9CE -F9CF -F9D0 -F9D1 -F9D2 -F9D3 -F9D4 -F9D5 -F9D6 -F9D7 -F9D8 -F9D9 -F9DA -F9DB -F9DC -F9DD -F9DE -F9DF -F9E0 -F9E1 -F9E2 -F9E3 -F9E4 -F9E5 -F9E6 -F9E7 -F9E8 -F9E9 -F9EA -F9EB -F9EC -F9ED -F9EE -F9EF -F9F0 -F9F1 -F9F2 -F9F3 -F9F4 -F9F5 -F9F6 -F9F7 -F9F8 -F9F9 -F9FA -F9FB -F9FC -F9FD -F9FE -FAA1 -FAA2 -FAA3 -FAA4 -FAA5 -FAA6 -FAA7 -FAA8 -FAA9 -FAAA -FAAB -FAAC -FAAD -FAAE -FAAF -FAB0 -FAB1 -FAB2 -FAB3 -FAB4 -FAB5 -FAB6 -FAB7 -FAB8 -FAB9 -FABA -FABB -FABC -FABD -FABE -FABF -FAC0 -FAC1 -FAC2 -FAC3 -FAC4 -FAC5 -FAC6 -FAC7 -FAC8 -FAC9 -FACA -FACB -FACC -FACD -FACE -FACF -FAD0 -FAD1 -FAD2 -FAD3 -FAD4 -FAD5 -FAD6 -FAD7 -FAD8 -FAD9 -FADA -FADB -FADC -FADD -FADE -FADF -FAE0 -FAE1 -FAE2 -FAE3 -FAE4 -FAE5 -FAE6 -FAE7 -FAE8 -FAE9 -FAEA -FAEB -FAEC -FAED -FAEE -FAEF -FAF0 -FAF1 -FAF2 -FAF3 -FAF4 -FAF5 -FAF6 -FAF7 -FAF8 -FAF9 -FAFA -FAFB -FAFC -FAFD -FAFE -FBA1 -FBA2 -FBA3 -FBA4 -FBA5 -FBA6 -FBA7 -FBA8 -FBA9 -FBAA -FBAB -FBAC -FBAD -FBAE -FBAF -FBB0 -FBB1 -FBB2 -FBB3 -FBB4 -FBB5 -FBB6 -FBB7 -FBB8 -FBB9 -FBBA -FBBB -FBBC -FBBD -FBBE -FBBF -FBC0 -FBC1 -FBC2 -FBC3 -FBC4 -FBC5 -FBC6 -FBC7 -FBC8 -FBC9 -FBCA -FBCB -FBCC -FBCD -FBCE -FBCF -FBD0 -FBD1 -FBD2 -FBD3 -FBD4 -FBD5 -FBD6 -FBD7 -FBD8 -FBD9 -FBDA -FBDB -FBDC -FBDD -FBDE -FBDF -FBE0 -FBE1 -FBE2 -FBE3 -FBE4 -FBE5 -FBE6 -FBE7 -FBE8 -FBE9 -FBEA -FBEB -FBEC -FBED -FBEE -FBEF -FBF0 -FBF1 -FBF2 -FBF3 -FBF4 -FBF5 -FBF6 -FBF7 -FBF8 -FBF9 -FBFA -FBFB -FBFC -FBFD -FBFE -FCA1 -FCA2 -FCA3 -FCA4 -FCA5 -FCA6 -FCA7 -FCA8 -FCA9 -FCAA -FCAB -FCAC -FCAD -FCAE -FCAF -FCB0 -FCB1 -FCB2 -FCB3 -FCB4 -FCB5 -FCB6 -FCB7 -FCB8 -FCB9 -FCBA -FCBB -FCBC -FCBD -FCBE -FCBF -FCC0 -FCC1 -FCC2 -FCC3 -FCC4 -FCC5 -FCC6 -FCC7 -FCC8 -FCC9 -FCCA -FCCB -FCCC -FCCD -FCCE -FCCF -FCD0 -FCD1 -FCD2 -FCD3 -FCD4 -FCD5 -FCD6 -FCD7 -FCD8 -FCD9 -FCDA -FCDB -FCDC -FCDD -FCDE -FCDF -FCE0 -FCE1 -FCE2 -FCE3 -FCE4 -FCE5 -FCE6 -FCE7 -FCE8 -FCE9 -FCEA -FCEB -FCEC -FCED -FCEE -FCEF -FCF0 -FCF1 -FCF2 -FCF3 -FCF4 -FCF5 -FCF6 -FCF7 -FCF8 -FCF9 -FCFA -FCFB -FCFC -FCFD -FCFE -FDA1 -FDA2 -FDA3 -FDA4 -FDA5 -FDA6 -FDA7 -FDA8 -FDA9 -FDAA -FDAB -FDAC -FDAD -FDAE -FDAF -FDB0 -FDB1 -FDB2 -FDB3 -FDB4 -FDB5 -FDB6 -FDB7 -FDB8 -FDB9 -FDBA -FDBB -FDBC -FDBD -FDBE -FDBF -FDC0 -FDC1 -FDC2 -FDC3 -FDC4 -FDC5 -FDC6 -FDC7 -FDC8 -FDC9 -FDCA -FDCB -FDCC -FDCD -FDCE -FDCF -FDD0 -FDD1 -FDD2 -FDD3 -FDD4 -FDD5 -FDD6 -FDD7 -FDD8 -FDD9 -FDDA -FDDB -FDDC -FDDD -FDDE -FDDF -FDE0 -FDE1 -FDE2 -FDE3 -FDE4 -FDE5 -FDE6 -FDE7 -FDE8 -FDE9 -FDEA -FDEB -FDEC -FDED -FDEE -FDEF -FDF0 -FDF1 -FDF2 -FDF3 -FDF4 -FDF5 -FDF6 -FDF7 -FDF8 -FDF9 -FDFA -FDFB -FDFC -FDFD -FDFE -FEA1 -FEA2 -FEA3 -FEA4 -FEA5 -FEA6 -FEA7 -FEA8 -FEA9 -FEAA -FEAB -FEAC -FEAD -FEAE -FEAF -FEB0 -FEB1 -FEB2 -FEB3 -FEB4 -FEB5 -FEB6 -FEB7 -FEB8 -FEB9 -FEBA -FEBB -FEBC -FEBD -FEBE -FEBF -FEC0 -FEC1 -FEC2 -FEC3 -FEC4 -FEC5 -FEC6 -FEC7 -FEC8 -FEC9 -FECA -FECB -FECC -FECD -FECE -FECF -FED0 -FED1 -FED2 -FED3 -FED4 -FED5 -FED6 -FED7 -FED8 -FED9 -FEDA -FEDB -FEDC -FEDD -FEDE -FEDF -FEE0 -FEE1 -FEE2 -FEE3 -FEE4 -FEE5 -FEE6 -FEE7 -FEE8 -FEE9 -FEEA -FEEB -FEEC -FEED -FEEE -FEEF -FEF0 -FEF1 -FEF2 -FEF3 -FEF4 -FEF5 -FEF6 -FEF7 -FEF8 -FEF9 -FEFA -FEFB -FEFC -FEFD -FEFE -8FF5A1 -8FF5A2 -8FF5A3 -8FF5A4 -8FF5A5 -8FF5A6 -8FF5A7 -8FF5A8 -8FF5A9 -8FF5AA -8FF5AB -8FF5AC -8FF5AD -8FF5AE -8FF5AF -8FF5B0 -8FF5B1 -8FF5B2 -8FF5B3 -8FF5B4 -8FF5B5 -8FF5B6 -8FF5B7 -8FF5B8 -8FF5B9 -8FF5BA -8FF5BB -8FF5BC -8FF5BD -8FF5BE -8FF5BF -8FF5C0 -8FF5C1 -8FF5C2 -8FF5C3 -8FF5C4 -8FF5C5 -8FF5C6 -8FF5C7 -8FF5C8 -8FF5C9 -8FF5CA -8FF5CB -8FF5CC -8FF5CD -8FF5CE -8FF5CF -8FF5D0 -8FF5D1 -8FF5D2 -8FF5D3 -8FF5D4 -8FF5D5 -8FF5D6 -8FF5D7 -8FF5D8 -8FF5D9 -8FF5DA -8FF5DB -8FF5DC -8FF5DD -8FF5DE -8FF5DF -8FF5E0 -8FF5E1 -8FF5E2 -8FF5E3 -8FF5E4 -8FF5E5 -8FF5E6 -8FF5E7 -8FF5E8 -8FF5E9 -8FF5EA -8FF5EB -8FF5EC -8FF5ED -8FF5EE -8FF5EF -8FF5F0 -8FF5F1 -8FF5F2 -8FF5F3 -8FF5F4 -8FF5F5 -8FF5F6 -8FF5F7 -8FF5F8 -8FF5F9 -8FF5FA -8FF5FB -8FF5FC -8FF5FD -8FF5FE -8FF6A1 -8FF6A2 -8FF6A3 -8FF6A4 -8FF6A5 -8FF6A6 -8FF6A7 -8FF6A8 -8FF6A9 -8FF6AA -8FF6AB -8FF6AC -8FF6AD -8FF6AE -8FF6AF -8FF6B0 -8FF6B1 -8FF6B2 -8FF6B3 -8FF6B4 -8FF6B5 -8FF6B6 -8FF6B7 -8FF6B8 -8FF6B9 -8FF6BA -8FF6BB -8FF6BC -8FF6BD -8FF6BE -8FF6BF -8FF6C0 -8FF6C1 -8FF6C2 -8FF6C3 -8FF6C4 -8FF6C5 -8FF6C6 -8FF6C7 -8FF6C8 -8FF6C9 -8FF6CA -8FF6CB -8FF6CC -8FF6CD -8FF6CE -8FF6CF -8FF6D0 -8FF6D1 -8FF6D2 -8FF6D3 -8FF6D4 -8FF6D5 -8FF6D6 -8FF6D7 -8FF6D8 -8FF6D9 -8FF6DA -8FF6DB -8FF6DC -8FF6DD -8FF6DE -8FF6DF -8FF6E0 -8FF6E1 -8FF6E2 -8FF6E3 -8FF6E4 -8FF6E5 -8FF6E6 -8FF6E7 -8FF6E8 -8FF6E9 -8FF6EA -8FF6EB -8FF6EC -8FF6ED -8FF6EE -8FF6EF -8FF6F0 -8FF6F1 -8FF6F2 -8FF6F3 -8FF6F4 -8FF6F5 -8FF6F6 -8FF6F7 -8FF6F8 -8FF6F9 -8FF6FA -8FF6FB -8FF6FC -8FF6FD -8FF6FE -8FF7A1 -8FF7A2 -8FF7A3 -8FF7A4 -8FF7A5 -8FF7A6 -8FF7A7 -8FF7A8 -8FF7A9 -8FF7AA -8FF7AB -8FF7AC -8FF7AD -8FF7AE -8FF7AF -8FF7B0 -8FF7B1 -8FF7B2 -8FF7B3 -8FF7B4 -8FF7B5 -8FF7B6 -8FF7B7 -8FF7B8 -8FF7B9 -8FF7BA -8FF7BB -8FF7BC -8FF7BD -8FF7BE -8FF7BF -8FF7C0 -8FF7C1 -8FF7C2 -8FF7C3 -8FF7C4 -8FF7C5 -8FF7C6 -8FF7C7 -8FF7C8 -8FF7C9 -8FF7CA -8FF7CB -8FF7CC -8FF7CD -8FF7CE -8FF7CF -8FF7D0 -8FF7D1 -8FF7D2 -8FF7D3 -8FF7D4 -8FF7D5 -8FF7D6 -8FF7D7 -8FF7D8 -8FF7D9 -8FF7DA -8FF7DB -8FF7DC -8FF7DD -8FF7DE -8FF7DF -8FF7E0 -8FF7E1 -8FF7E2 -8FF7E3 -8FF7E4 -8FF7E5 -8FF7E6 -8FF7E7 -8FF7E8 -8FF7E9 -8FF7EA -8FF7EB -8FF7EC -8FF7ED -8FF7EE -8FF7EF -8FF7F0 -8FF7F1 -8FF7F2 -8FF7F3 -8FF7F4 -8FF7F5 -8FF7F6 -8FF7F7 -8FF7F8 -8FF7F9 -8FF7FA -8FF7FB -8FF7FC -8FF7FD -8FF7FE -8FF8A1 -8FF8A2 -8FF8A3 -8FF8A4 -8FF8A5 -8FF8A6 -8FF8A7 -8FF8A8 -8FF8A9 -8FF8AA -8FF8AB -8FF8AC -8FF8AD -8FF8AE -8FF8AF -8FF8B0 -8FF8B1 -8FF8B2 -8FF8B3 -8FF8B4 -8FF8B5 -8FF8B6 -8FF8B7 -8FF8B8 -8FF8B9 -8FF8BA -8FF8BB -8FF8BC -8FF8BD -8FF8BE -8FF8BF -8FF8C0 -8FF8C1 -8FF8C2 -8FF8C3 -8FF8C4 -8FF8C5 -8FF8C6 -8FF8C7 -8FF8C8 -8FF8C9 -8FF8CA -8FF8CB -8FF8CC -8FF8CD -8FF8CE -8FF8CF -8FF8D0 -8FF8D1 -8FF8D2 -8FF8D3 -8FF8D4 -8FF8D5 -8FF8D6 -8FF8D7 -8FF8D8 -8FF8D9 -8FF8DA -8FF8DB -8FF8DC -8FF8DD -8FF8DE -8FF8DF -8FF8E0 -8FF8E1 -8FF8E2 -8FF8E3 -8FF8E4 -8FF8E5 -8FF8E6 -8FF8E7 -8FF8E8 -8FF8E9 -8FF8EA -8FF8EB -8FF8EC -8FF8ED -8FF8EE -8FF8EF -8FF8F0 -8FF8F1 -8FF8F2 -8FF8F3 -8FF8F4 -8FF8F5 -8FF8F6 -8FF8F7 -8FF8F8 -8FF8F9 -8FF8FA -8FF8FB -8FF8FC -8FF8FD -8FF8FE -8FF9A1 -8FF9A2 -8FF9A3 -8FF9A4 -8FF9A5 -8FF9A6 -8FF9A7 -8FF9A8 -8FF9A9 -8FF9AA -8FF9AB -8FF9AC -8FF9AD -8FF9AE -8FF9AF -8FF9B0 -8FF9B1 -8FF9B2 -8FF9B3 -8FF9B4 -8FF9B5 -8FF9B6 -8FF9B7 -8FF9B8 -8FF9B9 -8FF9BA -8FF9BB -8FF9BC -8FF9BD -8FF9BE -8FF9BF -8FF9C0 -8FF9C1 -8FF9C2 -8FF9C3 -8FF9C4 -8FF9C5 -8FF9C6 -8FF9C7 -8FF9C8 -8FF9C9 -8FF9CA -8FF9CB -8FF9CC -8FF9CD -8FF9CE -8FF9CF -8FF9D0 -8FF9D1 -8FF9D2 -8FF9D3 -8FF9D4 -8FF9D5 -8FF9D6 -8FF9D7 -8FF9D8 -8FF9D9 -8FF9DA -8FF9DB -8FF9DC -8FF9DD -8FF9DE -8FF9DF -8FF9E0 -8FF9E1 -8FF9E2 -8FF9E3 -8FF9E4 -8FF9E5 -8FF9E6 -8FF9E7 -8FF9E8 -8FF9E9 -8FF9EA -8FF9EB -8FF9EC -8FF9ED -8FF9EE -8FF9EF -8FF9F0 -8FF9F1 -8FF9F2 -8FF9F3 -8FF9F4 -8FF9F5 -8FF9F6 -8FF9F7 -8FF9F8 -8FF9F9 -8FF9FA -8FF9FB -8FF9FC -8FF9FD -8FF9FE -8FFAA1 -8FFAA2 -8FFAA3 -8FFAA4 -8FFAA5 -8FFAA6 -8FFAA7 -8FFAA8 -8FFAA9 -8FFAAA -8FFAAB -8FFAAC -8FFAAD -8FFAAE -8FFAAF -8FFAB0 -8FFAB1 -8FFAB2 -8FFAB3 -8FFAB4 -8FFAB5 -8FFAB6 -8FFAB7 -8FFAB8 -8FFAB9 -8FFABA -8FFABB -8FFABC -8FFABD -8FFABE -8FFABF -8FFAC0 -8FFAC1 -8FFAC2 -8FFAC3 -8FFAC4 -8FFAC5 -8FFAC6 -8FFAC7 -8FFAC8 -8FFAC9 -8FFACA -8FFACB -8FFACC -8FFACD -8FFACE -8FFACF -8FFAD0 -8FFAD1 -8FFAD2 -8FFAD3 -8FFAD4 -8FFAD5 -8FFAD6 -8FFAD7 -8FFAD8 -8FFAD9 -8FFADA -8FFADB -8FFADC -8FFADD -8FFADE -8FFADF -8FFAE0 -8FFAE1 -8FFAE2 -8FFAE3 -8FFAE4 -8FFAE5 -8FFAE6 -8FFAE7 -8FFAE8 -8FFAE9 -8FFAEA -8FFAEB -8FFAEC -8FFAED -8FFAEE -8FFAEF -8FFAF0 -8FFAF1 -8FFAF2 -8FFAF3 -8FFAF4 -8FFAF5 -8FFAF6 -8FFAF7 -8FFAF8 -8FFAF9 -8FFAFA -8FFAFB -8FFAFC -8FFAFD -8FFAFE -8FFBA1 -8FFBA2 -8FFBA3 -8FFBA4 -8FFBA5 -8FFBA6 -8FFBA7 -8FFBA8 -8FFBA9 -8FFBAA -8FFBAB -8FFBAC -8FFBAD -8FFBAE -8FFBAF -8FFBB0 -8FFBB1 -8FFBB2 -8FFBB3 -8FFBB4 -8FFBB5 -8FFBB6 -8FFBB7 -8FFBB8 -8FFBB9 -8FFBBA -8FFBBB -8FFBBC -8FFBBD -8FFBBE -8FFBBF -8FFBC0 -8FFBC1 -8FFBC2 -8FFBC3 -8FFBC4 -8FFBC5 -8FFBC6 -8FFBC7 -8FFBC8 -8FFBC9 -8FFBCA -8FFBCB -8FFBCC -8FFBCD -8FFBCE -8FFBCF -8FFBD0 -8FFBD1 -8FFBD2 -8FFBD3 -8FFBD4 -8FFBD5 -8FFBD6 -8FFBD7 -8FFBD8 -8FFBD9 -8FFBDA -8FFBDB -8FFBDC -8FFBDD -8FFBDE -8FFBDF -8FFBE0 -8FFBE1 -8FFBE2 -8FFBE3 -8FFBE4 -8FFBE5 -8FFBE6 -8FFBE7 -8FFBE8 -8FFBE9 -8FFBEA -8FFBEB -8FFBEC -8FFBED -8FFBEE -8FFBEF -8FFBF0 -8FFBF1 -8FFBF2 -8FFBF3 -8FFBF4 -8FFBF5 -8FFBF6 -8FFBF7 -8FFBF8 -8FFBF9 -8FFBFA -8FFBFB -8FFBFC -8FFBFD -8FFBFE -8FFCA1 -8FFCA2 -8FFCA3 -8FFCA4 -8FFCA5 -8FFCA6 -8FFCA7 -8FFCA8 -8FFCA9 -8FFCAA -8FFCAB -8FFCAC -8FFCAD -8FFCAE -8FFCAF -8FFCB0 -8FFCB1 -8FFCB2 -8FFCB3 -8FFCB4 -8FFCB5 -8FFCB6 -8FFCB7 -8FFCB8 -8FFCB9 -8FFCBA -8FFCBB -8FFCBC -8FFCBD -8FFCBE -8FFCBF -8FFCC0 -8FFCC1 -8FFCC2 -8FFCC3 -8FFCC4 -8FFCC5 -8FFCC6 -8FFCC7 -8FFCC8 -8FFCC9 -8FFCCA -8FFCCB -8FFCCC -8FFCCD -8FFCCE -8FFCCF -8FFCD0 -8FFCD1 -8FFCD2 -8FFCD3 -8FFCD4 -8FFCD5 -8FFCD6 -8FFCD7 -8FFCD8 -8FFCD9 -8FFCDA -8FFCDB -8FFCDC -8FFCDD -8FFCDE -8FFCDF -8FFCE0 -8FFCE1 -8FFCE2 -8FFCE3 -8FFCE4 -8FFCE5 -8FFCE6 -8FFCE7 -8FFCE8 -8FFCE9 -8FFCEA -8FFCEB -8FFCEC -8FFCED -8FFCEE -8FFCEF -8FFCF0 -8FFCF1 -8FFCF2 -8FFCF3 -8FFCF4 -8FFCF5 -8FFCF6 -8FFCF7 -8FFCF8 -8FFCF9 -8FFCFA -8FFCFB -8FFCFC -8FFCFD -8FFCFE -8FFDA1 -8FFDA2 -8FFDA3 -8FFDA4 -8FFDA5 -8FFDA6 -8FFDA7 -8FFDA8 -8FFDA9 -8FFDAA -8FFDAB -8FFDAC -8FFDAD -8FFDAE -8FFDAF -8FFDB0 -8FFDB1 -8FFDB2 -8FFDB3 -8FFDB4 -8FFDB5 -8FFDB6 -8FFDB7 -8FFDB8 -8FFDB9 -8FFDBA -8FFDBB -8FFDBC -8FFDBD -8FFDBE -8FFDBF -8FFDC0 -8FFDC1 -8FFDC2 -8FFDC3 -8FFDC4 -8FFDC5 -8FFDC6 -8FFDC7 -8FFDC8 -8FFDC9 -8FFDCA -8FFDCB -8FFDCC -8FFDCD -8FFDCE -8FFDCF -8FFDD0 -8FFDD1 -8FFDD2 -8FFDD3 -8FFDD4 -8FFDD5 -8FFDD6 -8FFDD7 -8FFDD8 -8FFDD9 -8FFDDA -8FFDDB -8FFDDC -8FFDDD -8FFDDE -8FFDDF -8FFDE0 -8FFDE1 -8FFDE2 -8FFDE3 -8FFDE4 -8FFDE5 -8FFDE6 -8FFDE7 -8FFDE8 -8FFDE9 -8FFDEA -8FFDEB -8FFDEC -8FFDED -8FFDEE -8FFDEF -8FFDF0 -8FFDF1 -8FFDF2 -8FFDF3 -8FFDF4 -8FFDF5 -8FFDF6 -8FFDF7 -8FFDF8 -8FFDF9 -8FFDFA -8FFDFB -8FFDFC -8FFDFD -8FFDFE -8FFEA1 -8FFEA2 -8FFEA3 -8FFEA4 -8FFEA5 -8FFEA6 -8FFEA7 -8FFEA8 -8FFEA9 -8FFEAA -8FFEAB -8FFEAC -8FFEAD -8FFEAE -8FFEAF -8FFEB0 -8FFEB1 -8FFEB2 -8FFEB3 -8FFEB4 -8FFEB5 -8FFEB6 -8FFEB7 -8FFEB8 -8FFEB9 -8FFEBA -8FFEBB -8FFEBC -8FFEBD -8FFEBE -8FFEBF -8FFEC0 -8FFEC1 -8FFEC2 -8FFEC3 -8FFEC4 -8FFEC5 -8FFEC6 -8FFEC7 -8FFEC8 -8FFEC9 -8FFECA -8FFECB -8FFECC -8FFECD -8FFECE -8FFECF -8FFED0 -8FFED1 -8FFED2 -8FFED3 -8FFED4 -8FFED5 -8FFED6 -8FFED7 -8FFED8 -8FFED9 -8FFEDA -8FFEDB -8FFEDC -8FFEDD -8FFEDE -8FFEDF -8FFEE0 -8FFEE1 -8FFEE2 -8FFEE3 -8FFEE4 -8FFEE5 -8FFEE6 -8FFEE7 -8FFEE8 -8FFEE9 -8FFEEA -8FFEEB -8FFEEC -8FFEED -8FFEEE -8FFEEF -8FFEF0 -8FFEF1 -8FFEF2 -8FFEF3 -8FFEF4 -8FFEF5 -8FFEF6 -8FFEF7 -8FFEF8 -8FFEF9 -8FFEFA -8FFEFB -8FFEFC -8FFEFD -8FFEFE -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -DROP TABLE t4; -SET collation_connection='cp932_japanese_ci'; -create table t1 select repeat('a',4000) a; -delete from t1; -insert into t1 values ('a'), ('a '), ('a\t'); -select collation(a),hex(a) from t1 order by a; -collation(a) hex(a) -cp932_japanese_ci 6109 -cp932_japanese_ci 61 -cp932_japanese_ci 6120 -drop table t1; -SET collation_connection='cp932_bin'; -create table t1 select repeat('a',4000) a; -delete from t1; -insert into t1 values ('a'), ('a '), ('a\t'); -select collation(a),hex(a) from t1 order by a; -collation(a) hex(a) -cp932_bin 6109 -cp932_bin 61 -cp932_bin 6120 -drop table t1; -create table t1 (col1 varchar(1)) character set cp932; -insert into t1 values ('a'); -insert into t1 values ('ab'); -Warnings: -Warning 1265 Data truncated for column 'col1' at row 1 -select * from t1; -col1 -a -a -insert into t1 values ('abc'); -Warnings: -Warning 1265 Data truncated for column 'col1' at row 1 -select * from t1; -col1 -a -a -a -drop table t1; -set names utf8; -create table t1 (a text) default character set cp932; -insert into t1 values (_utf8 0xE38182); -show warnings; -Level Code Message -select * from t1; -a -ã‚ -select hex(a) from t1; -hex(a) -82A0 -drop table t1; -ƒ\ -ƒ\ -c_cp932 -ƒ\ -ƒ\ -ƒ\ -ソ -ソ -ƒ\ -ƒ\ diff --git a/mysql-test/r/binlog_stm_ctype_ucs.result b/mysql-test/r/binlog_stm_ctype_ucs.result deleted file mode 100644 index c789c618876..00000000000 --- a/mysql-test/r/binlog_stm_ctype_ucs.result +++ /dev/null @@ -1,27 +0,0 @@ -SET TIMESTAMP=10000; -create table t2 (c char(30)) charset=ucs2; -set @v=convert('abc' using ucs2); -reset master; -insert into t2 values (@v); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # User var # # @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci -master-bin.000001 # Query # # use `test`; insert into t2 values (@v) -flush logs; -/*!40019 SET @@session.max_insert_delayed_threads=0*/; -/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -DELIMITER /*!*/; -ROLLBACK/*!*/; -SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`/*!*/; -use test/*!*/; -SET TIMESTAMP=10000/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; -SET @@session.sql_mode=0/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; -insert into t2 values (@v)/*!*/; -DELIMITER ; -# End of log file -ROLLBACK /* added by mysqlbinlog */; -/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; -drop table t2; diff --git a/mysql-test/r/binlog_stm_drop_tmp_tbl.result b/mysql-test/r/binlog_stm_drop_tmp_tbl.result deleted file mode 100644 index dc4349dea59..00000000000 --- a/mysql-test/r/binlog_stm_drop_tmp_tbl.result +++ /dev/null @@ -1,21 +0,0 @@ -drop database if exists `drop-temp+table-test`; -reset master; -create database `drop-temp+table-test`; -use `drop-temp+table-test`; -create temporary table shortn1 (a int); -create temporary table `table:name` (a int); -create temporary table shortn2 (a int); -select get_lock("a",10); -get_lock("a",10) -1 -select get_lock("a",10); -get_lock("a",10) -1 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # create database `drop-temp+table-test` -master-bin.000001 # Query # # use `drop-temp+table-test`; create temporary table shortn1 (a int) -master-bin.000001 # Query # # use `drop-temp+table-test`; create temporary table `table:name` (a int) -master-bin.000001 # Query # # use `drop-temp+table-test`; create temporary table shortn2 (a int) -master-bin.000001 # Query # # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`,`drop-temp+table-test`.`table:name`,`drop-temp+table-test`.`shortn1` -drop database `drop-temp+table-test`; diff --git a/mysql-test/r/binlog_stm_innodb_stat.result b/mysql-test/r/binlog_stm_innodb_stat.result deleted file mode 100644 index e6813ee2719..00000000000 --- a/mysql-test/r/binlog_stm_innodb_stat.result +++ /dev/null @@ -1,39 +0,0 @@ -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 0 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 0 -drop table if exists t1; -create table t1 (a int) engine=innodb; -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 1 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 1 -begin; -delete from t1; -commit; -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 2 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 1 -drop table t1; -show status like "Innodb_buffer_pool_pages_total"; -Variable_name Value -Innodb_buffer_pool_pages_total 512 -show status like "Innodb_page_size"; -Variable_name Value -Innodb_page_size 16384 -show status like "Innodb_rows_deleted"; -Variable_name Value -Innodb_rows_deleted 2000 -show status like "Innodb_rows_inserted"; -Variable_name Value -Innodb_rows_inserted 2000 -show status like "Innodb_rows_updated"; -Variable_name Value -Innodb_rows_updated 0 diff --git a/mysql-test/r/binlog_stm_insert_select.result b/mysql-test/r/binlog_stm_insert_select.result deleted file mode 100644 index a93a8edf4aa..00000000000 --- a/mysql-test/r/binlog_stm_insert_select.result +++ /dev/null @@ -1,24 +0,0 @@ -drop table if exists t1,t2; -create table t1(a int, unique(a)); -insert into t1 values(2); -create table t2(a int); -insert into t2 values(1),(2); -reset master; -insert into t1 select * from t2; -ERROR 23000: Duplicate entry '2' for key 'a' -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 select * from t2 -select * from t1; -a -1 -2 -drop table t1, t2; -create table t1(a int); -insert into t1 values(1),(1); -reset master; -create table t2(unique(a)) select a from t1; -ERROR 23000: Duplicate entry '1' for key 'a' -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -drop table t1; diff --git a/mysql-test/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/r/binlog_stm_mix_innodb_myisam.result deleted file mode 100644 index c74fb17d600..00000000000 --- a/mysql-test/r/binlog_stm_mix_innodb_myisam.result +++ /dev/null @@ -1,382 +0,0 @@ -drop table if exists t1, t2; -create table t1 (a int) engine=innodb; -create table t2 (a int) engine=myisam; -reset master; -begin; -insert into t1 values(1); -insert into t2 select * from t1; -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(1) -master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(2); -insert into t2 select * from t1; -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(2) -master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -master-bin.000001 # Query # # use `test`; ROLLBACK -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(3); -savepoint my_savepoint; -insert into t1 values(4); -insert into t2 select * from t1; -rollback to savepoint my_savepoint; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(3) -master-bin.000001 # Query # # use `test`; savepoint my_savepoint -master-bin.000001 # Query # # use `test`; insert into t1 values(4) -master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -master-bin.000001 # Query # # use `test`; rollback to savepoint my_savepoint -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(5); -savepoint my_savepoint; -insert into t1 values(6); -insert into t2 select * from t1; -rollback to savepoint my_savepoint; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -insert into t1 values(7); -commit; -select a from t1 order by a; -a -5 -7 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(5) -master-bin.000001 # Query # # use `test`; savepoint my_savepoint -master-bin.000001 # Query # # use `test`; insert into t1 values(6) -master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -master-bin.000001 # Query # # use `test`; rollback to savepoint my_savepoint -master-bin.000001 # Query # # use `test`; insert into t1 values(7) -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -reset master; -select get_lock("a",10); -get_lock("a",10) -1 -begin; -insert into t1 values(8); -insert into t2 select * from t1; -select get_lock("a",10); -get_lock("a",10) -1 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(8) -master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -master-bin.000001 # Query # # use `test`; ROLLBACK -delete from t1; -delete from t2; -reset master; -insert into t1 values(9); -insert into t2 select * from t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values(9) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -delete from t1; -delete from t2; -reset master; -insert into t1 values(10); -begin; -insert into t2 select * from t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values(10) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -insert into t1 values(11); -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values(10) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(11) -master-bin.000001 # Xid # # COMMIT /* XID */ -alter table t2 engine=INNODB; -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(12); -insert into t2 select * from t1; -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(12) -master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(13); -insert into t2 select * from t1; -rollback; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(14); -savepoint my_savepoint; -insert into t1 values(15); -insert into t2 select * from t1; -rollback to savepoint my_savepoint; -commit; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(14) -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -reset master; -begin; -insert into t1 values(16); -savepoint my_savepoint; -insert into t1 values(17); -insert into t2 select * from t1; -rollback to savepoint my_savepoint; -insert into t1 values(18); -commit; -select a from t1 order by a; -a -16 -18 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(16) -master-bin.000001 # Query # # use `test`; insert into t1 values(18) -master-bin.000001 # Xid # # COMMIT /* XID */ -delete from t1; -delete from t2; -alter table t2 engine=MyISAM; -insert into t1 values (1); -begin; -select * from t1 for update; -a -1 -select (@before:=unix_timestamp())*0; -(@before:=unix_timestamp())*0 -0 -begin; -select * from t1 for update; -insert into t2 values (20); -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -select (@after:=unix_timestamp())*0; -(@after:=unix_timestamp())*0 -0 -select (@after-@before) >= 2; -(@after-@before) >= 2 -1 -drop table t1,t2; -commit; -begin; -create temporary table ti (a int) engine=innodb; -rollback; -insert into ti values(1); -set autocommit=0; -create temporary table t1 (a int) engine=myisam; -commit; -insert t1 values (1); -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -create table t0 (n int); -insert t0 select * from t1; -set autocommit=1; -insert into t0 select GET_LOCK("lock1",null); -set autocommit=0; -create table t2 (n int) engine=innodb; -insert into t2 values (3); -select get_lock("lock1",60); -get_lock("lock1",60) -1 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; insert into t1 values(16) -master-bin.000001 # Query # # use `test`; insert into t1 values(18) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; delete from t1 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; delete from t2 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; alter table t2 engine=MyISAM -master-bin.000001 # Query # # use `test`; insert into t1 values (1) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; insert into t2 values (20) -master-bin.000001 # Query # # use `test`; drop table t1,t2 -master-bin.000001 # Query # # use `test`; create temporary table ti (a int) engine=innodb -master-bin.000001 # Query # # use `test`; insert into ti values(1) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; create temporary table t1 (a int) engine=myisam -master-bin.000001 # Query # # use `test`; insert t1 values (1) -master-bin.000001 # Query # # use `test`; create table t0 (n int) -master-bin.000001 # Query # # use `test`; insert t0 select * from t1 -master-bin.000001 # Query # # use `test`; insert into t0 select GET_LOCK("lock1",null) -master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb -master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `test`.`t1`,`test`.`ti` -do release_lock("lock1"); -drop table t0,t2; -set autocommit=0; -CREATE TABLE t1 (a int, b int) engine=myisam; -reset master; -INSERT INTO t1 values (1,1),(1,2); -CREATE TABLE t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -DROP TABLE if exists t2; -Warnings: -Note 1051 Unknown table 't2' -INSERT INTO t1 values (3,3); -CREATE TEMPORARY TABLE t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -DROP TABLE IF EXISTS t2; -Warnings: -Note 1051 Unknown table 't2' -CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb; -INSERT INTO t1 VALUES (4,4); -CREATE TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -SELECT * from t2; -a b -TRUNCATE table t2; -INSERT INTO t1 VALUES (5,5); -INSERT INTO t2 select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -SELECT * FROM t2; -a b -DROP TABLE t2; -INSERT INTO t1 values (6,6); -CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb ; -INSERT INTO t1 values (7,7); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -INSERT INTO t1 values (8,8); -CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -COMMIT; -INSERT INTO t1 values (9,9); -CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -SELECT * from t2; -a b -TRUNCATE table t2; -INSERT INTO t1 values (10,10); -INSERT INTO t2 select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -SELECT * from t1; -a b -1 1 -1 2 -3 3 -4 4 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -INSERT INTO t2 values (100,100); -CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -COMMIT; -INSERT INTO t2 values (101,101); -CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -ROLLBACK; -SELECT * from t2; -a b -100 100 -DROP TABLE t1,t2; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (1,1),(1,2) -master-bin.000001 # Query # # use `test`; DROP TABLE if exists t2 -master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (3,3) -master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2 -master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4,4) -master-bin.000001 # Query # # use `test`; TRUNCATE table t2 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5,5) -master-bin.000001 # Query # # use `test`; DROP TABLE t2 -master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (6,6) -master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb -master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (7,7) -master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (8,8) -master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (9,9) -master-bin.000001 # Query # # use `test`; TRUNCATE table t2 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (10,10) -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (100,100) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; DROP TABLE t1,t2 -reset master; -create table t1 (a int) engine=innodb; -create table t2 (a int) engine=myisam; -select get_lock("a",10); -get_lock("a",10) -1 -begin; -insert into t1 values(8); -insert into t2 select * from t1; -select get_lock("a",10); -get_lock("a",10) -1 -flush logs; -select -(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) -is not null; -(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) -is not null -1 -select -@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", -@a not like "%#%error_code=%error_code=%"; -@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%" -1 1 -drop table t1, t2; diff --git a/mysql-test/r/binlog_stm_ps.result b/mysql-test/r/binlog_stm_ps.result deleted file mode 100644 index 47934665116..00000000000 --- a/mysql-test/r/binlog_stm_ps.result +++ /dev/null @@ -1,20 +0,0 @@ -drop table if exists t1; -reset master; -create table t1 (a int); -prepare s from "insert into t1 values (@a),(?)"; -set @a=98; -execute s using @a; -prepare s from "insert into t1 values (?)"; -set @a=99; -execute s using @a; -prepare s from "insert into t1 select 100 limit ?"; -set @a=100; -execute s using @a; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1 (a int) -master-bin.000001 # User var # # @`a`=98 -master-bin.000001 # Query # # use `test`; insert into t1 values (@a),(98) -master-bin.000001 # Query # # use `test`; insert into t1 values (99) -master-bin.000001 # Query # # use `test`; insert into t1 select 100 limit 100 -drop table t1; diff --git a/mysql-test/r/loaddata_autocom_ndb.result b/mysql-test/r/loaddata_autocom_ndb.result deleted file mode 100644 index f98e6a76981..00000000000 --- a/mysql-test/r/loaddata_autocom_ndb.result +++ /dev/null @@ -1,23 +0,0 @@ -SET SESSION STORAGE_ENGINE = ndbcluster; -drop table if exists t1; -create table t1 (id int unsigned not null auto_increment primary key, a text, b text); -start transaction; -load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''' (a, b); -Warnings: -Warning 1261 Row 3 doesn't contain data for all columns -commit; -select count(*) from t1; -count(*) -4 -truncate table t1; -start transaction; -load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''' (a, b); -Warnings: -Warning 1261 Row 3 doesn't contain data for all columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -4 -drop table t1; diff --git a/mysql-test/r/ndb_alter_table.result b/mysql-test/r/ndb_alter_table.result deleted file mode 100644 index 13c445b44ca..00000000000 --- a/mysql-test/r/ndb_alter_table.result +++ /dev/null @@ -1,401 +0,0 @@ -DROP TABLE IF EXISTS t1, t2; -drop database if exists mysqltest; -CREATE TABLE t1 ( -a INT NOT NULL, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412); -ALTER TABLE t1 ADD COLUMN c int not null; -SELECT * FROM t1; -a b c -9410 9412 0 -DROP TABLE t1; -CREATE DATABASE mysqltest; -USE mysqltest; -CREATE TABLE t1 ( -a INT NOT NULL, -b INT NOT NULL -) ENGINE=ndbcluster; -RENAME TABLE t1 TO test.t1; -SHOW TABLES; -Tables_in_mysqltest -DROP DATABASE mysqltest; -USE test; -SHOW TABLES; -Tables_in_test -t1 -DROP TABLE t1; -create table t1 ( -col1 int not null auto_increment primary key, -col2 varchar(30) not null, -col3 varchar (20) not null, -col4 varchar(4) not null, -col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, -col6 int not null, to_be_deleted int) ENGINE=ndbcluster; -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 NDBCLUSTER 10 Dynamic 0 # # # 0 # 1 # # # latin1_swedish_ci NULL # -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -insert into t1 values -(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 NDBCLUSTER 10 Dynamic 9 # # # 0 # 102 # # # latin1_swedish_ci NULL # -select * from t1 order by col1; -col1 col2 col3 col4 col5 col6 to_be_deleted -0 4 3 5 PENDING 1 7 -1 4 3 5 PENDING 1 7 -7 4 3 5 PENDING 1 7 -8 4 3 5 PENDING 1 7 -31 4 3 5 PENDING 1 7 -32 4 3 5 PENDING 1 7 -99 4 3 5 PENDING 1 7 -100 4 3 5 PENDING 1 7 -101 4 3 5 PENDING 1 7 -alter table t1 -add column col4_5 varchar(20) not null after col4, -add column col7 varchar(30) not null after col5, -add column col8 datetime not null, drop column to_be_deleted, -change column col2 fourth varchar(30) not null after col3, -modify column col6 int not null first; -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 NDBCLUSTER 10 Dynamic 9 # # # 0 # 102 # # # latin1_swedish_ci NULL # -select * from t1 order by col1; -col6 col1 col3 fourth col4 col4_5 col5 col7 col8 -1 0 3 4 5 PENDING 0000-00-00 00:00:00 -1 1 3 4 5 PENDING 0000-00-00 00:00:00 -1 7 3 4 5 PENDING 0000-00-00 00:00:00 -1 8 3 4 5 PENDING 0000-00-00 00:00:00 -1 31 3 4 5 PENDING 0000-00-00 00:00:00 -1 32 3 4 5 PENDING 0000-00-00 00:00:00 -1 99 3 4 5 PENDING 0000-00-00 00:00:00 -1 100 3 4 5 PENDING 0000-00-00 00:00:00 -1 101 3 4 5 PENDING 0000-00-00 00:00:00 -insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 NDBCLUSTER 10 Dynamic 10 # # # 0 # 103 # # # latin1_swedish_ci NULL # -select * from t1 order by col1; -col6 col1 col3 fourth col4 col4_5 col5 col7 col8 -1 0 3 4 5 PENDING 0000-00-00 00:00:00 -1 1 3 4 5 PENDING 0000-00-00 00:00:00 -1 7 3 4 5 PENDING 0000-00-00 00:00:00 -1 8 3 4 5 PENDING 0000-00-00 00:00:00 -1 31 3 4 5 PENDING 0000-00-00 00:00:00 -1 32 3 4 5 PENDING 0000-00-00 00:00:00 -1 99 3 4 5 PENDING 0000-00-00 00:00:00 -1 100 3 4 5 PENDING 0000-00-00 00:00:00 -1 101 3 4 5 PENDING 0000-00-00 00:00:00 -2 102 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 -delete from t1; -insert into t1 values (0,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -SET SQL_MODE=''; -insert into t1 values (1,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -col6 col1 col3 fourth col4 col4_5 col5 col7 col8 -0 0 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 -1 103 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 -alter table t1 drop column col4_5; -insert into t1 values (2,0,4,3,5,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -col6 col1 col3 fourth col4 col5 col7 col8 -0 0 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 -1 103 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 -2 104 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 -drop table t1; -CREATE TABLE t1 ( -a INT NOT NULL, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412); -ALTER TABLE t1 ADD COLUMN c int not null; -select * from t1 order by a; -a b c -9410 9412 0 -select * from t1 order by a; -a b c -9410 9412 0 -alter table t1 drop c; -select * from t1 order by a; -a b -9410 9412 -drop table t1; -select * from t1 order by a; -ERROR 42S02: Table 'test.t1' doesn't exist -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -a b -0 1 -17 18 -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -alter table t1 modify column a int not null auto_increment; -SET SQL_MODE=''; -select * from t1 order by a; -a b -0 1 -17 18 -INSERT INTO t1 VALUES (0,19),(20,21); -select * from t1 order by a; -a b -0 1 -17 18 -18 19 -20 21 -drop table t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -a b -0 1 -17 18 -alter table t1 add c int not null unique auto_increment; -select c from t1 order by c; -c -1 -2 -INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); -select c from t1 order by c; -c -1 -2 -3 -4 -5 -drop table t1; -create table t1 ( -ai bigint auto_increment, -c001 int(11) not null, -c002 int(11) not null, -c003 int(11) not null, -c004 int(11) not null, -c005 int(11) not null, -c006 int(11) not null, -c007 int(11) not null, -c008 int(11) not null, -c009 int(11) not null, -c010 int(11) not null, -c011 int(11) not null, -c012 int(11) not null, -c013 int(11) not null, -c014 int(11) not null, -c015 int(11) not null, -c016 int(11) not null, -c017 int(11) not null, -c018 int(11) not null, -c019 int(11) not null, -c020 int(11) not null, -c021 int(11) not null, -c022 int(11) not null, -c023 int(11) not null, -c024 int(11) not null, -c025 int(11) not null, -c026 int(11) not null, -c027 int(11) not null, -c028 int(11) not null, -c029 int(11) not null, -c030 int(11) not null, -c031 int(11) not null, -c032 int(11) not null, -c033 int(11) not null, -c034 int(11) not null, -c035 int(11) not null, -c036 int(11) not null, -c037 int(11) not null, -c038 int(11) not null, -c039 int(11) not null, -c040 int(11) not null, -c041 int(11) not null, -c042 int(11) not null, -c043 int(11) not null, -c044 int(11) not null, -c045 int(11) not null, -c046 int(11) not null, -c047 int(11) not null, -c048 int(11) not null, -c049 int(11) not null, -c050 int(11) not null, -c051 int(11) not null, -c052 int(11) not null, -c053 int(11) not null, -c054 int(11) not null, -c055 int(11) not null, -c056 int(11) not null, -c057 int(11) not null, -c058 int(11) not null, -c059 int(11) not null, -c060 int(11) not null, -c061 int(11) not null, -c062 int(11) not null, -c063 int(11) not null, -c064 int(11) not null, -c065 int(11) not null, -c066 int(11) not null, -c067 int(11) not null, -c068 int(11) not null, -c069 int(11) not null, -c070 int(11) not null, -c071 int(11) not null, -c072 int(11) not null, -c073 int(11) not null, -c074 int(11) not null, -c075 int(11) not null, -c076 int(11) not null, -c077 int(11) not null, -c078 int(11) not null, -c079 int(11) not null, -c080 int(11) not null, -c081 int(11) not null, -c082 int(11) not null, -c083 int(11) not null, -c084 int(11) not null, -c085 int(11) not null, -c086 int(11) not null, -c087 int(11) not null, -c088 int(11) not null, -c089 int(11) not null, -c090 int(11) not null, -c091 int(11) not null, -c092 int(11) not null, -c093 int(11) not null, -c094 int(11) not null, -c095 int(11) not null, -c096 int(11) not null, -c097 int(11) not null, -c098 int(11) not null, -c099 int(11) not null, -c100 int(11) not null, -c101 int(11) not null, -c102 int(11) not null, -c103 int(11) not null, -c104 int(11) not null, -c105 int(11) not null, -c106 int(11) not null, -c107 int(11) not null, -c108 int(11) not null, -c109 int(11) not null, -primary key (ai), -unique key tx1 (c002, c003, c004, c005)) engine=ndb; -create index tx2 -on t1 (c010, c011, c012, c013); -drop table t1; -CREATE TABLE t1 ( -auto int(5) unsigned NOT NULL auto_increment, -string char(10), -vstring varchar(10), -bin binary(2), -vbin varbinary(7), -tiny tinyint(4) DEFAULT '0' NOT NULL , -short smallint(6) DEFAULT '1' NOT NULL , -medium mediumint(8) DEFAULT '0' NOT NULL, -long_int int(11) DEFAULT '0' NOT NULL, -longlong bigint(13) DEFAULT '0' NOT NULL, -real_float float(13,1) DEFAULT 0.0 NOT NULL, -real_double double(16,4), -real_decimal decimal(16,4), -utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, -ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, -umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, -ulong int(11) unsigned DEFAULT '0' NOT NULL, -ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, -bits bit(3), -options enum('zero','one','two','three','four') not null, -flags set('zero','one','two','three','four') not null, -date_field date, -year_field year, -time_field time, -date_time datetime, -time_stamp timestamp, -PRIMARY KEY (auto) -) engine=ndb; -CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255)); -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; -alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; -no_copy -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; -create index i1 on t1(medium); -alter table t1 add index i2(new_tiny); -drop index i1 on t1; -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; -no_copy -no_copy -DROP TABLE t1, ndb_show_tables; -create table t1 (a int primary key auto_increment, b int) engine=ndb; -insert into t1 (b) values (101),(102),(103); -select * from t1 where a = 3; -a b -3 103 -alter table t1 rename t2; -insert into t2 (b) values (201),(202),(203); -select * from t2 where a = 6; -a b -6 203 -alter table t2 add c int; -insert into t2 (b) values (301),(302),(303); -select * from t2 where a = 9; -a b c -9 303 NULL -alter table t2 rename t1; -insert into t1 (b) values (401),(402),(403); -select * from t1 where a = 12; -a b c -12 403 NULL -drop table t1; -create table t1 (a int not null, b varchar(10)) engine=ndb; -show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -alter table t1 add primary key (a); -show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 0 PRIMARY 1 a A 0 NULL NULL BTREE -alter table t1 drop primary key; -show index from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -drop table t1; -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) NOT NULL DEFAULT '0', - `c` varchar(254) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -alter table t1 alter b set default 1; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) NOT NULL DEFAULT '1', - `c` varchar(254) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -drop table t1; -create table t1 (a int not null, b int not null) engine=ndb; -insert into t1 values (1, 300), (2, 200), (3, 100); -select * from t1 order by a; -a b -1 300 -2 200 -3 100 -alter table t1 order by b; -select * from t1 order by b; -a b -3 100 -2 200 -1 300 -drop table t1; -End of 5.1 tests diff --git a/mysql-test/r/ndb_alter_table2.result b/mysql-test/r/ndb_alter_table2.result deleted file mode 100644 index 3783c76447c..00000000000 --- a/mysql-test/r/ndb_alter_table2.result +++ /dev/null @@ -1,41 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL -) ENGINE=ndbcluster; -BEGIN; -INSERT INTO t1 VALUES (9410,9412); -BEGIN; -INSERT INTO t1 VALUES (9411,9412); -BEGIN; -INSERT INTO t1 VALUES (9412,9412); -BEGIN; -INSERT INTO t1 VALUES (9413,9412); -BEGIN; -INSERT INTO t1 VALUES (9414,9412); -BEGIN; -INSERT INTO t1 VALUES (9415,9412); -ROLLBACK; -ROLLBACK; -ROLLBACK; -ROLLBACK; -ROLLBACK; -ROLLBACK; -drop table t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b INT NOT NULL, -c INT NOT NULL -) ENGINE=ndbcluster; -select * from t1; -select * from t1; -a b c -select * from t1; -a b c -select * from t1; -a b c -select * from t1; -a b c -select * from t1; -a b c -drop table t1; diff --git a/mysql-test/r/ndb_alter_table3.result b/mysql-test/r/ndb_alter_table3.result deleted file mode 100644 index ee7c9b1c7b0..00000000000 --- a/mysql-test/r/ndb_alter_table3.result +++ /dev/null @@ -1,35 +0,0 @@ -DROP TABLE IF EXISTS t1; -create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -engine=ndb; -insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -create index c on t1(c); -show indexes from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 0 PRIMARY 1 a A 3 NULL NULL BTREE -t1 1 b 1 b A 3 NULL NULL YES BTREE -t1 1 c 1 c A 3 NULL NULL YES BTREE -select * from t1 where c = 'two'; -a b c -2 two two -alter table t1 drop index c; -show indexes from t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 0 PRIMARY 1 a A 3 NULL NULL BTREE -t1 1 b 1 b A 3 NULL NULL YES BTREE -select * from t1 where c = 'two'; -a b c -2 two two -drop table t1; -create table t3 (a int primary key) engine=ndbcluster; -begin; -insert into t3 values (1); -alter table t3 rename t4; -commit; -select * from t3; -ERROR 42S02: Table 'test.t3' doesn't exist -select * from t4; -a -1 -drop table t4; -show tables; -Tables_in_test diff --git a/mysql-test/r/ndb_autodiscover.result b/mysql-test/r/ndb_autodiscover.result deleted file mode 100644 index 487f52f6427..00000000000 --- a/mysql-test/r/ndb_autodiscover.result +++ /dev/null @@ -1,397 +0,0 @@ -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -flush status; -create table t1( -id int not null primary key, -name char(20) -) engine=ndb; -insert into t1 values(1, "Autodiscover"); -flush tables; -select * from t1; -id name -1 Autodiscover -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -flush tables; -insert into t1 values (2, "Auto 2"); -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -insert into t1 values (3, "Discover 3"); -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -flush tables; -select * from t1 order by id; -id name -1 Autodiscover -2 Auto 2 -3 Discover 3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 3 -flush tables; -update t1 set name="Autodiscover" where id = 2; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 4 -select * from t1 order by id; -id name -1 Autodiscover -2 Autodiscover -3 Discover 3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 4 -flush tables; -delete from t1 where id = 3; -select * from t1 order by id; -id name -1 Autodiscover -2 Autodiscover -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 5 -drop table t1; -flush status; -create table t2( -id int not null primary key, -name char(22) -) engine=ndb; -insert into t2 values (1, "Discoverer"); -select * from t2; -id name -1 Discoverer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -select * from t2; -id name -1 Discoverer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -drop table t2; -flush status; -create table t3( -id int not null primary key, -name char(255) -) engine=ndb; -insert into t3 values (1, "Explorer"); -select * from t3; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -create table t3( -id int not null primary key, -name char(20), a int, b float, c char(24) -) engine=ndb; -ERROR 42S01: Table 't3' already exists -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table IF NOT EXISTS t3( -id int not null primary key, -id2 int not null, -name char(20) -) engine=ndb; -Warnings: -Note 1050 Table 't3' already exists -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -SHOW CREATE TABLE t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL, - `name` char(255) default NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () -select * from t3; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -drop table t3; -flush status; -create table t7( -id int not null primary key, -name char(255) -) engine=ndb; -create table t6( -id int not null primary key, -name char(255) -) engine=MyISAM; -insert into t7 values (1, "Explorer"); -insert into t6 values (2, "MyISAM table"); -select * from t7; -id name -1 Explorer -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -flush tables; -show tables from test; -Tables_in_test -t6 -t7 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -flush tables; -show table status; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t6 MyISAM 10 Fixed 1 # # # # 0 NULL # # NULL # NULL # -t7 NDBCLUSTER 10 Fixed 1 # # # # 0 NULL # # NULL # NULL # -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t6, t7; -flush status; -create table t4( -id int not null primary key, -name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; -id name -1 Automatic -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t4; -ERROR 42S02: Unknown table 't4' -create table t4( -id int not null primary key, -name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; -id name -1 Automatic -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -drop table if exists t4; -Warnings: -Error 155 Table 'test.t4' doesn't exist -drop table t5; -ERROR 42S02: Unknown table 't5' -drop table if exists t5; -Warnings: -Note 1051 Unknown table 't5' -flush status; -create table t4( -id int not null primary key, -id2 int, -name char(27) -) engine=ndb; -insert into t4 values (1, 76, "Automatic2"); -select * from t4; -id id2 name -1 76 Automatic2 -flush tables; -SHOW TABLES; -Tables_in_test -select * from t4; -ERROR 42S02: Table 'test.t4' doesn't exist -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); -SHOW TABLES; -Tables_in_test -t1 -t2 -t4 -t8 -t9 -t7 -t6 -select * from t6; -id -6 -select * from t7; -id -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t1, t2, t4, t6, t7, t8, t9; -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); -SHOW TABLES LIKE 't6'; -Tables_in_test (t6) -t6 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 1 -create table t3(a int); -ERROR 42S01: Table 't3' already exists -create table t5(a int); -ERROR 42S01: Table 't5' already exists -SHOW TABLES LIKE 't%'; -Tables_in_test (t%) -t1 -t2 -t4 -t6 -t8 -t9 -t7 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 2 -drop table t1, t2, t4, t6, t7, t8, t9; -flush status; -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=ndbcluster; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -insert into t1 values (1); -insert into t2 values (2, "table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t4 values (4); -flush tables; -select * from t1, t2, t3, t4; -id id b id c id -1 2 table 2 3 ndb table 3 4 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 3 -drop table t1, t2, t3, t4; -flush status; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t5( -id int not null primary key, -name char(200) -) engine=ndb; -insert into t5 values (1, "Magnus"); -select * from t5; -id name -1 Magnus -ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; -select * from t5; -adress id name -NULL 1 Magnus -insert into t5 values -("Adress for record 2", 2, "Carl-Gustav"), -("Adress for record 3", 3, "Karl-Emil"); -update t5 set name="Bertil" where id = 2; -select * from t5 order by id; -adress id name -NULL 1 Magnus -Adress for record 2 2 Bertil -Adress for record 3 3 Karl-Emil -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t5; -flush status; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t6( -id int not null primary key, -name char(20) -) engine=ndb; -insert into t6 values (1, "Magnus"); -select * from t6; -id name -1 Magnus -ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; -select * from t6; -adress id name -NULL 1 Magnus -insert into t6 values -("Adress for record 2", 2, "Carl-Gustav"), -("Adress for record 3", 3, "Karl-Emil"); -update t6 set name="Bertil" where id = 2; -select * from t6 order by id; -adress id name -NULL 1 Magnus -Adress for record 2 2 Bertil -Adress for record 3 3 Karl-Emil -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t6; -show tables; -Tables_in_test -create table t1 (a int,b longblob) engine=ndb; -show tables; -Tables_in_test -t1 -create database test2; -use test2; -show tables; -Tables_in_test2 -select * from t1; -ERROR 42S02: Table 'test2.t1' doesn't exist -create table t2 (b int,c longblob) engine=ndb; -use test; -select * from t1; -a b -show tables; -Tables_in_test -t1 -drop table t1; -use test2; -drop table t2; -drop database test2; -use test; -drop database if exists test_only_ndb_tables; -create database test_only_ndb_tables; -use test_only_ndb_tables; -create table t1 (a int primary key) engine=ndb; -select * from t1; -a -select * from t1; -ERROR HY000: Can't lock file (errno: 157) -use test; -drop database test_only_ndb_tables; -CREATE TABLE t9 ( -a int NOT NULL PRIMARY KEY, -b int -) engine=ndb; -insert t9 values(1, 2), (2,3), (3, 4), (4, 5); -create table t10 ( -a int not null primary key, -b blob -) engine=ndb; -insert into t10 values (1, 'kalle'); diff --git a/mysql-test/r/ndb_autodiscover2.result b/mysql-test/r/ndb_autodiscover2.result deleted file mode 100644 index 269888e0820..00000000000 --- a/mysql-test/r/ndb_autodiscover2.result +++ /dev/null @@ -1,13 +0,0 @@ -select * from t9 order by a; -a b -1 2 -2 3 -3 4 -4 5 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t9; -select * from t10; -ERROR HY000: Got error 4263 'Invalid blob attributes or invalid blob parts table' from NDBCLUSTER -drop table t10; diff --git a/mysql-test/r/ndb_autodiscover3.result b/mysql-test/r/ndb_autodiscover3.result deleted file mode 100644 index 86495ebb3eb..00000000000 --- a/mysql-test/r/ndb_autodiscover3.result +++ /dev/null @@ -1,53 +0,0 @@ -drop table if exists t1, t2; -create table t1 (a int key) engine=ndbcluster; -begin; -insert into t1 values (1); -insert into t1 values (2); -ERROR HY000: Got temporary error 4025 'Node failure caused abort of transaction' from NDBCLUSTER -commit; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -drop table t1; -create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; -insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); -select * from t2 order by a limit 3; -a b -1 1 -2 1 -3 1 -select * from t2; -ERROR 42S02: Table 'test.t2' doesn't exist -show tables like 't2'; -Tables_in_test (t2) -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; -a -1 -2 -3 -select * from t2 order by a limit 3; -a -1 -2 -3 -reset master; -select * from t2; -ERROR 42S02: Table 'test.t2' doesn't exist -show tables like 't2'; -Tables_in_test (t2) -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; -a -1 -2 -3 -select * from t2 order by a limit 3; -a -1 -2 -3 -reset master; -drop table t2; diff --git a/mysql-test/r/ndb_backup_print.result b/mysql-test/r/ndb_backup_print.result deleted file mode 100644 index fdd929802b2..00000000000 --- a/mysql-test/r/ndb_backup_print.result +++ /dev/null @@ -1,64 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -Connected to Management Server at: : -Waiting for completed, this may take several minutes -Node : Backup started from node -Node : Backup started from node completed - StartGCP: StopGCP: - #Records: #LogRecords: - Data: bytes Log: bytes -create table t1 -(pk int key -,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) -,b1 TINYINT, b2 TINYINT UNSIGNED -,c1 SMALLINT, c2 SMALLINT UNSIGNED -,d1 INT, d2 INT UNSIGNED -,e1 BIGINT, e2 BIGINT UNSIGNED -,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY -,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY -,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) -,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) -) engine ndb; -insert into t1 values -(1 -,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 -,127, 255 -,32767, 65535 -,2147483647, 4294967295 -,9223372036854775807, 18446744073709551615 -,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 -,0x12,0x123456789abcdef0, 0x00123450 -); -insert into t1 values -(2 -,0, 0, 0, 0, 0 -,-128, 0 -,-32768, 0 -,-2147483648, 0 -,-9223372036854775808, 0 -,'','','' - ,'','','' - ,0x0,0x0,0x0 -,0x0,0x0,0x0 -); -insert into t1 values -(3 -,NULL,NULL,NULL,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -); -Connected to Management Server at: : -Waiting for completed, this may take several minutes -Node : Backup started from node -Node : Backup started from node completed - StartGCP: StopGCP: - #Records: #LogRecords: - Data: bytes Log: bytes diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result deleted file mode 100644 index 4eddaeb1227..00000000000 --- a/mysql-test/r/ndb_basic.result +++ /dev/null @@ -1,901 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10) -) ENGINE=ndbcluster; -drop table t1; -SHOW GLOBAL STATUS LIKE 'ndb%'; -Variable_name Value -Ndb_cluster_node_id # -Ndb_config_from_host # -Ndb_config_from_port # -Ndb_number_of_data_nodes # -SHOW GLOBAL VARIABLES LIKE 'ndb%'; -Variable_name Value -ndb_autoincrement_prefetch_sz # -ndb_cache_check_time # -ndb_connectstring # -ndb_extra_logging # -ndb_force_send # -ndb_index_stat_cache_entries # -ndb_index_stat_enable # -ndb_index_stat_update_freq # -ndb_report_thresh_binlog_epoch_slip # -ndb_report_thresh_binlog_mem_usage # -ndb_use_copying_alter_table # -ndb_use_exact_count # -ndb_use_transactions # -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10) -) ENGINE=ndbcluster; -SHOW INDEX FROM t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 0 PRIMARY 1 pk1 A 0 NULL NULL BTREE -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -SHOW INDEX FROM t1; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t1 0 PRIMARY 1 pk1 A 2 NULL NULL BTREE -SELECT pk1 FROM t1 ORDER BY pk1; -pk1 -9410 -9411 -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -9410 9412 NULL 9412 -9411 9413 17 9413 -SELECT t1.* FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -9410 9412 NULL 9412 -9411 9413 17 9413 -UPDATE t1 SET attr1=1 WHERE pk1=9410; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -9410 1 NULL 9412 -9411 9413 17 9413 -UPDATE t1 SET pk1=2 WHERE attr1=1; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -2 1 NULL 9412 -9411 9413 17 9413 -UPDATE t1 SET pk1=pk1 + 1; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -3 1 NULL 9412 -9412 9413 17 9413 -UPDATE t1 SET pk1=4 WHERE pk1 = 3; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -4 1 NULL 9412 -9412 9413 17 9413 -DELETE FROM t1; -SELECT * FROM t1; -pk1 attr1 attr2 attr3 -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), -(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); -UPDATE t1 SET attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9999 NULL NULL -8 9999 NULL NULL -9 9999 NULL NULL -10 9999 NULL NULL -11 9999 NULL NULL -12 9999 NULL NULL -13 9999 NULL NULL -9408 9999 NULL 8765 -9410 9999 NULL 9412 -UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9998 NULL NULL -8 9998 NULL NULL -9 9998 NULL NULL -10 9998 NULL NULL -11 9998 NULL NULL -12 9998 NULL NULL -13 9998 NULL NULL -9408 9999 NULL 8765 -9410 9999 NULL 9412 -UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9998 NULL NULL -8 9998 NULL NULL -9 9998 NULL NULL -10 9998 NULL NULL -11 9998 NULL NULL -12 9998 NULL NULL -13 9998 NULL NULL -9408 9997 NULL 8765 -9410 9997 NULL 9412 -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1 ORDER BY pk1; -pk1 attr1 attr2 attr3 -7 9998 NULL NULL -8 9998 NULL NULL -9 9998 NULL NULL -10 9998 NULL NULL -11 9998 NULL NULL -12 9998 NULL NULL -13 9998 NULL NULL -9408 9997 NULL 8765 -DELETE FROM t1; -SELECT * FROM t1; -pk1 attr1 attr2 attr3 -INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); -DELETE FROM t1 WHERE attr1=4; -SELECT * FROM t1 order by pk1; -pk1 attr1 attr2 attr3 -3 5 NULL NULL -5 5 NULL NULL -DELETE FROM t1; -INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1; -pk1 attr1 attr2 attr3 -9411 9413 NULL NULL -DROP TABLE t1; -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; -INSERT INTO t1 values(3456, 7890); -SELECT * FROM t1; -id id2 -3456 7890 -UPDATE t1 SET id=2 WHERE id2=12; -SELECT * FROM t1; -id id2 -3456 7890 -UPDATE t1 SET id=1234 WHERE id2=7890; -SELECT * FROM t1; -id id2 -1234 7890 -DELETE FROM t1; -INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); -SELECT * FROM t1 ORDER BY id; -id id2 -3454 7890 -3456 7890 -3456 7890 -3456 7890 -DELETE FROM t1 WHERE id = 3456; -SELECT * FROM t1 ORDER BY id; -id id2 -3454 7890 -DROP TABLE t1; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=NDBCLUSTER; -INSERT INTO t1 values(1, 9999); -DROP TABLE t1; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=NDB; -INSERT INTO t1 values(1, 9999); -DROP TABLE t1; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -CREATE TABLE t3 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned, -PRIMARY KEY(a) -) engine=ndbcluster; -CREATE TABLE t4 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned NOT NULL, -d int unsigned, -PRIMARY KEY(a, b, c) -) engine=ndbcluster; -select * from t2 where a = 7 order by b; -a b c -7 16 5 -select * from t2 where a = 7 order by a; -a b c -7 16 5 -select * from t2 where a = 7 order by 2; -a b c -7 16 5 -select * from t2 where a = 7 order by c; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 order by b; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 order by a; -a b c -7 16 5 -select * from t2 where a = 7 and b = 17 order by a; -a b c -select * from t2 where a = 7 and b != 16 order by b; -a b c -select * from t2 where a = 7 and b = 16 and c = 5 order by b; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 and c = 5 order by a; -a b c -7 16 5 -select * from t2 where a = 7 and b = 16 and c = 6 order by a; -a b c -select * from t2 where a = 7 and b != 16 and c = 5 order by b; -a b c -select * from t3 where a = 7 order by b; -a b c -7 16 5 -select * from t3 where a = 7 order by a; -a b c -7 16 5 -select * from t3 where a = 7 order by 2; -a b c -7 16 5 -select * from t3 where a = 7 order by c; -a b c -7 16 5 -select * from t3 where a = 7 and b = 16 order by b; -a b c -7 16 5 -select * from t3 where a = 7 and b = 16 order by a; -a b c -7 16 5 -select * from t3 where a = 7 and b = 17 order by a; -a b c -select * from t3 where a = 7 and b != 16 order by b; -a b c -select * from t4 where a = 7 order by b; -a b c d -7 16 5 26007 -select * from t4 where a = 7 order by a; -a b c d -7 16 5 26007 -select * from t4 where a = 7 order by 2; -a b c d -7 16 5 26007 -select * from t4 where a = 7 order by c; -a b c d -7 16 5 26007 -select * from t4 where a = 7 and b = 16 order by b; -a b c d -7 16 5 26007 -select * from t4 where a = 7 and b = 16 order by a; -a b c d -7 16 5 26007 -select * from t4 where a = 7 and b = 17 order by a; -a b c d -select * from t4 where a = 7 and b != 16 order by b; -a b c d -delete from t2 where a > 5; -select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; -a b -1 10 -3 12 -5 14 -select a, b FROM t2 outer_table where -a = (select a from t2 where b = outer_table.b ) order by a; -a b -1 10 -3 12 -5 14 -delete from t2; -delete from t3; -delete from t4; -drop table t2; -drop table t3; -drop table t4; -CREATE TABLE t5 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned NOT NULL, -d int unsigned, -PRIMARY KEY(a, b, c) -) engine=ndbcluster; -insert into t5 values(10, 19, 5, 26010); -delete from t5 where a=10 and b=19 and c=5; -select * from t5; -a b c d -insert into t5 values(10, 19, 5, 26010); -update t5 set d=21997 where a=10 and b=19 and c=5; -select * from t5; -a b c d -10 19 5 21997 -delete from t5; -drop table t5; -CREATE TABLE t6 ( -adress char(255), -a int NOT NULL PRIMARY KEY, -b int -) engine = NDB; -insert into t6 values -("Nice road 3456", 1, 23), -("Street Road 78", 3, 92), -("Road street 89C", 5, 71), -(NULL, 7, NULL); -select * from t6 order by a; -adress a b -Nice road 3456 1 23 -Street Road 78 3 92 -Road street 89C 5 71 -NULL 7 NULL -select a, b from t6 order by a; -a b -1 23 -3 92 -5 71 -7 NULL -update t6 set adress="End of road 09" where a=3; -update t6 set b=181, adress="Street 76" where a=7; -select * from t6 order by a; -adress a b -Nice road 3456 1 23 -End of road 09 3 92 -Road street 89C 5 71 -Street 76 7 181 -select * from t6 where a=1; -adress a b -Nice road 3456 1 23 -delete from t6 where a=1; -select * from t6 order by a; -adress a b -End of road 09 3 92 -Road street 89C 5 71 -Street 76 7 181 -delete from t6 where b=71; -select * from t6 order by a; -adress a b -End of road 09 3 92 -Street 76 7 181 -drop table t6; -CREATE TABLE t7 ( -adress char(255), -a int NOT NULL, -b int, -c int NOT NULL, -PRIMARY KEY(a, c) -) engine = NDB; -insert into t7 values -("Highway 3456", 1, 23, 2), -("Street Road 78", 3, 92, 3), -("Main street 89C", 5, 71, 4), -(NULL, 8, NULL, 12); -select * from t7 order by a; -adress a b c -Highway 3456 1 23 2 -Street Road 78 3 92 3 -Main street 89C 5 71 4 -NULL 8 NULL 12 -select a, b from t7 order by a; -a b -1 23 -3 92 -5 71 -8 NULL -update t7 set adress="End of road 09" where a=3; -update t7 set adress="Gatuvägen 90C" where a=5 and c=4; -update t7 set adress="No adress" where adress is NULL; -select * from t7 order by a; -adress a b c -Highway 3456 1 23 2 -End of road 09 3 92 3 -Gatuvägen 90C 5 71 4 -No adress 8 NULL 12 -select * from t7 where a=1 and c=2; -adress a b c -Highway 3456 1 23 2 -delete from t7 where a=1; -delete from t7 where a=3 and c=3; -delete from t7 where a=5 and c=4; -select * from t7; -adress a b c -No adress 8 NULL 12 -delete from t7 where b=23; -select * from t7; -adress a b c -No adress 8 NULL 12 -drop table t7; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -create database mysqltest; -use mysqltest; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -insert into t2 select pk1,attr1,attr2 from test.t1; -select * from t2 order by a; -a b c -9410 9412 NULL -9411 9413 17 -select b from test.t1, t2 where c = test.t1.attr2; -b -9413 -select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; -b attr1 -9413 9412 -drop table test.t1, t2; -drop database mysqltest; -drop database if exists ndbtest1; -create database ndbtest1; -use ndbtest1; -create table t1(id int) engine=ndbcluster; -drop database ndbtest1; -drop database ndbtest1; -ERROR HY000: Can't drop database 'ndbtest1'; database doesn't exist -use test; -create table t1 (a int primary key, b char(0)); -insert into t1 values (1,""); -insert into t1 values (2,NULL); -select * from t1 order by a; -a b -1 -2 NULL -select * from t1 order by b; -a b -2 NULL -1 -select * from t1 where b IS NULL; -a b -2 NULL -select * from t1 where b IS NOT NULL; -a b -1 -drop table t1; -create table t1 ( -c1 int, -c2 int, -c3 int, -c4 int, -c5 int, -c6 int, -c7 int, -c8 int, -c9 int, -c10 int, -c11 int, -c12 int, -c13 int, -c14 int, -c15 int, -c16 int, -c17 int, -c18 int, -c19 int, -c20 int, -c21 int, -c22 int, -c23 int, -c24 int, -c25 int, -c26 int, -c27 int, -c28 int, -c29 int, -c30 int, -c31 int, -c32 int, -c33 int, -c34 int, -c35 int, -c36 int, -c37 int, -c38 int, -c39 int, -c40 int, -c41 int, -c42 int, -c43 int, -c44 int, -c45 int, -c46 int, -c47 int, -c48 int, -c49 int, -c50 int, -c51 int, -c52 int, -c53 int, -c54 int, -c55 int, -c56 int, -c57 int, -c58 int, -c59 int, -c60 int, -c61 int, -c62 int, -c63 int, -c64 int, -c65 int, -c66 int, -c67 int, -c68 int, -c69 int, -c70 int, -c71 int, -c72 int, -c73 int, -c74 int, -c75 int, -c76 int, -c77 int, -c78 int, -c79 int, -c80 int, -c81 int, -c82 int, -c83 int, -c84 int, -c85 int, -c86 int, -c87 int, -c88 int, -c89 int, -c90 int, -c91 int, -c92 int, -c93 int, -c94 int, -c95 int, -c96 int, -c97 int, -c98 int, -c99 int, -c100 int, -c101 int, -c102 int, -c103 int, -c104 int, -c105 int, -c106 int, -c107 int, -c108 int, -c109 int, -c110 int, -c111 int, -c112 int, -c113 int, -c114 int, -c115 int, -c116 int, -c117 int, -c118 int, -c119 int, -c120 int, -c121 int, -c122 int, -c123 int, -c124 int, -c125 int, -c126 int, -c127 int, -c128 int, -primary key using hash(c1)) engine=ndb partition by key(c1); -drop table t1; -create table t1 ( -a1234567890123456789012345678901234567890 int primary key, -a12345678901234567890123456789a1234567890 int, -index(a12345678901234567890123456789a1234567890) -) engine=ndb; -show tables; -Tables_in_test -t1 -insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); -explain select * from t1 where a12345678901234567890123456789a1234567890=2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a12345678901234567890123456789a1234567890 a12345678901234567890123456789a1234567890 5 const # Using where with pushed condition -select * from t1 where a12345678901234567890123456789a1234567890=2; -a1234567890123456789012345678901234567890 a12345678901234567890123456789a1234567890 -5 2 -drop table t1; -create table t1 -(a bigint, b bigint, c bigint, d bigint, -primary key (a,b,c,d)) -engine=ndb -max_rows=800000000; -Warnings: -Warning 1105 Ndb might have problems storing the max amount of rows specified -insert into t1 values -(1,2,3,4),(2,3,4,5),(3,4,5,6), -(3,2,3,4),(1,3,4,5),(2,4,5,6), -(1,2,3,5),(2,3,4,8),(3,4,5,9), -(3,2,3,5),(1,3,4,8),(2,4,5,9), -(1,2,3,6),(2,3,4,6),(3,4,5,7), -(3,2,3,6),(1,3,4,6),(2,4,5,7), -(1,2,3,7),(2,3,4,7),(3,4,5,8), -(3,2,3,7),(1,3,4,7),(2,4,5,8), -(1,3,3,4),(2,4,4,5),(3,5,5,6), -(3,3,3,4),(1,4,4,5),(2,5,5,6), -(1,3,3,5),(2,4,4,8),(3,5,5,9), -(3,3,3,5),(1,4,4,8),(2,5,5,9), -(1,3,3,6),(2,4,4,6),(3,5,5,7), -(3,3,3,6),(1,4,4,6),(2,5,5,7), -(1,3,3,7),(2,4,4,7),(3,5,5,8), -(3,3,3,7),(1,4,4,7),(2,5,5,8); -select count(*) from t1; -count(*) -48 -drop table t1; -create table t1 -(a bigint, b bigint, c bigint, d bigint, -primary key (a)) -engine=ndb -max_rows=1; -drop table t1; -create table t1 -(counter int(64) NOT NULL auto_increment, -datavalue char(40) default 'XXXX', -primary key (counter) -) ENGINE=ndbcluster; -insert into t1 (datavalue) values ('newval'); -insert into t1 (datavalue) values ('newval'); -select * from t1 order by counter; -counter datavalue -1 newval -2 newval -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; -counter datavalue -1 newval -2 newval -3 newval -4 newval -5 newval -6 newval -7 newval -8 newval -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; -counter datavalue -1 newval -2 newval -3 newval -4 newval -5 newval -6 newval -7 newval -8 newval -9 newval -10 newval -11 newval -12 newval -13 newval -14 newval -15 newval -16 newval -17 newval -18 newval -19 newval -20 newval -21 newval -22 newval -23 newval -24 newval -25 newval -26 newval -27 newval -28 newval -29 newval -30 newval -31 newval -32 newval -drop table t1; -create table t1 (a int primary key auto_increment) engine = ndb; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -insert into t1(a) values (20),(28); -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -insert into t1() values (21), (22); -drop table t1; -CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; -select * from t1; -b -drop table t1; -create table t1 (a int) engine=ndb; -create table t2 (a int) engine=ndb; -insert into t1 values (1); -insert into t2 values (1); -delete t1.* from t1, t2 where t1.a = t2.a; -select * from t1; -a -select * from t2; -a -1 -drop table t1; -drop table t2; -CREATE TABLE t1 ( -i INT, -j INT, -x INT, -y INT, -z INT -) engine=ndb; -CREATE TABLE t2 ( -i INT, -k INT, -x INT, -y INT, -z INT -) engine=ndb; -CREATE TABLE t3 ( -j INT, -k INT, -x INT, -y INT, -z INT -) engine=ndb; -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); -UPDATE t1 AS a -INNER JOIN t2 AS b -ON a.i = b.i -INNER JOIN t3 AS c -ON a.j = c.j AND b.k = c.k -SET a.x = b.x, -a.y = b.y, -a.z = ( -SELECT sum(z) -FROM t3 -WHERE y = 34 -) -WHERE b.x = 23; -select * from t1; -i j x y z -1 2 23 24 71 -drop table t1; -drop table t2; -drop table t3; -create table atablewithareallylongandirritatingname (a int); -insert into atablewithareallylongandirritatingname values (2); -select * from atablewithareallylongandirritatingname; -a -2 -drop table atablewithareallylongandirritatingname; -create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; -insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from t1 order by f1; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -select * from t1 order by f2; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -select * from t1 order by f3; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -drop table t1; -Illegal ndb error code: 1186 -CREATE TABLE t1 ( -a VARBINARY(40) NOT NULL, -b VARCHAR (256) CHARACTER SET UTF8 NOT NULL, -c VARCHAR(256) CHARACTER SET UTF8 NOT NULL, -PRIMARY KEY (b,c)) ENGINE=ndbcluster; -INSERT INTO t1 VALUES -("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc"); -SELECT * FROM t1 ORDER BY a; -a b c -a ab abc -b abc abcd -c abc ab -d ab ab -e abc abc -DROP TABLE t1; -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); -insert into t2 values (1,10), (2,20), (3,30); -select * from t1 order by a; -a b -1 10 -2 20 -3 30 -delete from t1 where a > 0 order by a desc limit 1; -select * from t1 order by a; -a b -1 10 -2 20 -delete from t1,t2 using t1,t2 where t1.a = t2.a; -select * from t2 order by a; -a b -3 30 -drop table t1,t2; -create table t1 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); -insert into t1 set a=1, b=100; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -insert ignore into t1 set a=1, b=100; -select * from t1 order by a; -a b -1 10 -2 20 -3 30 -insert into t1 set a=1, b=1000 on duplicate key update b=b+1; -select * from t1 order by a; -a b -1 11 -2 20 -3 30 -drop table t1; -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (c int not null primary key, d int not null) engine=ndb; -insert into t1 values (1,10), (2,10), (3,30), (4, 30); -insert into t2 values (1,10), (2,10), (3,30), (4, 30); -update t1 set a = 1 where a = 3; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 30 -update t1 set b = 1 where a > 1 order by a desc limit 1; -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 1 -update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 1 -update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -a b -1 10 -2 10 -3 30 -4 1 -drop table t1,t2; -End of 5.0 tests -CREATE TABLE t1 (a VARCHAR(255) NOT NULL, -CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb; -CREATE TABLE t2(a VARCHAR(255) NOT NULL, -b VARCHAR(255) NOT NULL, -c VARCHAR(255) NOT NULL, -CONSTRAINT pk_b_c_id PRIMARY KEY (b,c), -CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb; -drop table t1, t2; -create table t1 (a int not null primary key, b int) engine=ndb; -insert into t1 values(1,1),(2,2),(3,3); -create table t2 like t1; -insert into t2 select * from t1; -select * from t1 order by a; -a b -1 1 -2 2 -3 3 -select * from t2 order by a; -a b -1 1 -2 2 -3 3 -drop table t1, t2; -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -create table t2 like t1; -rename table t1 to t10, t2 to t20; -drop table t10,t20; -End of 5.1 tests diff --git a/mysql-test/r/ndb_binlog_basic.result b/mysql-test/r/ndb_binlog_basic.result deleted file mode 100644 index 931d01dbebe..00000000000 --- a/mysql-test/r/ndb_binlog_basic.result +++ /dev/null @@ -1,51 +0,0 @@ -drop table if exists t1, t2; -drop database if exists mysqltest; -create database mysqltest; -use mysqltest; -drop database mysqltest; -use test; -create table t1 (a int primary key) engine=ndb; -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; -@max_epoch:=max(epoch)-1 -# -delete from t1; -alter table t1 add (b int); -insert into t1 values (3,3),(4,4); -alter table t1 rename t2; -begin; -insert into t2 values (1,1),(2,2); -update t2 set b=1 where a=3; -delete from t2 where a=4; -commit; -drop table t2; -select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5; -inserts -10 -select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5; -deletes -10 -select inserts,updates,deletes from -mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0; -inserts updates deletes -2 1 1 -flush logs; -purge master logs before now(); -select count(*) from mysql.ndb_binlog_index; -count(*) -0 -create table t1 (a int primary key, b int) engine=ndb; -create database mysqltest; -use mysqltest; -create table t1 (c int, d int primary key) engine=ndb; -use test; -insert into mysqltest.t1 values (2,1),(2,2); -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; -@max_epoch:=max(epoch)-1 -# -drop table t1; -drop database mysqltest; -select inserts,updates,deletes from -mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0; -inserts updates deletes -2 0 0 diff --git a/mysql-test/r/ndb_binlog_basic2.result b/mysql-test/r/ndb_binlog_basic2.result deleted file mode 100644 index 9b9f642bd86..00000000000 --- a/mysql-test/r/ndb_binlog_basic2.result +++ /dev/null @@ -1,12 +0,0 @@ -set session binlog_format=row; -ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet -set session binlog_format=statement; -ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet -set global binlog_format=row; -ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet -set global binlog_format=statement; -ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet -set session binlog_format=default; -ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet -set global binlog_format=default; -ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet diff --git a/mysql-test/r/ndb_binlog_ddl_multi.result b/mysql-test/r/ndb_binlog_ddl_multi.result deleted file mode 100644 index 6631feeaa17..00000000000 --- a/mysql-test/r/ndb_binlog_ddl_multi.result +++ /dev/null @@ -1,196 +0,0 @@ -drop database if exists mysqltest; -drop table if exists t1,t2,t3; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; -reset master; -reset master; -create database mysqltest; -use mysqltest; -create table t1 (a int primary key) engine=ndb; -create table t2 (a int primary key) engine=ndb; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 1 # create database mysqltest -master-bin1.000001 # Query 1 # use `mysqltest`; create table t1 (a int primary key) engine=ndb -master-bin1.000001 # Query 102 # use `test`; create table t2 (a int primary key) engine=ndb -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # create database mysqltest -master-bin.000001 # Query 1 # use `mysqltest`; create table t1 (a int primary key) engine=ndb -master-bin.000001 # Query 102 # use `test`; create table t2 (a int primary key) engine=ndb -reset master; -reset master; -alter table t2 add column (b int); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 102 # use `test`; alter table t2 add column (b int) -reset master; -reset master; -ALTER DATABASE mysqltest CHARACTER SET latin1; -drop table mysqltest.t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 102 # ALTER DATABASE mysqltest CHARACTER SET latin1 -master-bin.000001 # Query 102 # use `mysqltest`; drop table `t1` -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 102 # ALTER DATABASE mysqltest CHARACTER SET latin1 -master-bin.000001 # Query 102 # use `mysqltest`; drop table `t1` -reset master; -reset master; -use test; -insert into t2 values (1,2); -drop database mysqltest; -create table t1 (a int primary key) engine=ndb; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 102 # BEGIN -master-bin1.000001 # Table_map 102 # table_id: # (test.t2) -master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F -master-bin1.000001 # Query 102 # COMMIT -master-bin1.000001 # Query 1 # drop database mysqltest -master-bin1.000001 # Query 1 # use `test`; create table t1 (a int primary key) engine=ndb -drop table t2; -reset master; -reset master; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 -ENGINE = NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 1 # CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB -master-bin1.000001 # Query 1 # ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -master-bin1.000001 # Query 1 # CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB -master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB -master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB -master-bin1.000001 # Query 1 # DROP TABLESPACE ts1 -ENGINE = NDB -master-bin1.000001 # Query 1 # DROP LOGFILE GROUP lg1 -ENGINE =NDB -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 1 # CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB -master-bin1.000001 # Query 1 # ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -master-bin1.000001 # Query 1 # CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB -master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB -master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB -master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB -master-bin1.000001 # Query 1 # DROP TABLESPACE ts1 -ENGINE = NDB -master-bin1.000001 # Query 1 # DROP LOGFILE GROUP lg1 -ENGINE =NDB -drop table t1; -reset master; -show tables; -Tables_in_test -reset master; -show tables; -Tables_in_test -create table t1 (a int key) engine=ndb; -create table t2 (a int key) engine=ndb; -create table t3 (a int key) engine=ndb; -rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 1 # use `test`; create table t1 (a int key) engine=ndb -master-bin1.000001 # Query 1 # use `test`; create table t2 (a int key) engine=ndb -master-bin1.000001 # Query 1 # use `test`; create table t3 (a int key) engine=ndb -master-bin1.000001 # Query 1 # use `test`; rename table `test.t3` to `test.t4` -master-bin1.000001 # Query 1 # use `test`; rename table `test.t2` to `test.t3` -master-bin1.000001 # Query 1 # use `test`; rename table `test.t1` to `test.t2` -master-bin1.000001 # Query 1 # use `test`; rename table `test.t4` to `test.t1` -drop table t1; -drop table t2; -drop table t3; -reset master; -show tables; -Tables_in_test -reset master; -show tables; -Tables_in_test -create table t1 (a int key) engine=ndb; -insert into t1 values(1); -rename table t1 to t2; -insert into t2 values(2); -drop table t2; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 1 # use `test`; create table t1 (a int key) engine=ndb -master-bin1.000001 # Query 102 # BEGIN -master-bin1.000001 # Table_map 102 # table_id: # (test.t1) -master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F -master-bin1.000001 # Query 102 # COMMIT -master-bin1.000001 # Query 1 # use `test`; rename table `test.t1` to `test.t2` -master-bin1.000001 # Query 102 # BEGIN -master-bin1.000001 # Table_map 102 # table_id: # (test.t2) -master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F -master-bin1.000001 # Query 102 # COMMIT -master-bin1.000001 # Query 102 # use `test`; drop table t2 diff --git a/mysql-test/r/ndb_binlog_discover.result b/mysql-test/r/ndb_binlog_discover.result deleted file mode 100644 index 7c3a976c4d5..00000000000 --- a/mysql-test/r/ndb_binlog_discover.result +++ /dev/null @@ -1,17 +0,0 @@ -drop table if exists t1; -create table t1 (a int key) engine=ndb; -reset master; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Incident 1 # #1 (LOST_EVENTS) -master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 -PURGE MASTER LOGS TO 'master-bin.000002'; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Query 1 # BEGIN -master-bin.000002 # Table_map 1 # table_id: # (test.t1) -master-bin.000002 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000002 # Write_rows 1 # table_id: # -master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000002 # Query 1 # COMMIT -drop table t1; diff --git a/mysql-test/r/ndb_binlog_ignore_db.result b/mysql-test/r/ndb_binlog_ignore_db.result deleted file mode 100644 index e4c9faa802c..00000000000 --- a/mysql-test/r/ndb_binlog_ignore_db.result +++ /dev/null @@ -1,11 +0,0 @@ -reset master; -drop table if exists t1; -drop database if exists mysqltest; -create database mysqltest; -use mysqltest; -create table t1 (a int primary key, b int) engine=ndb; -insert into t1 values (1, 1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; drop table if exists t1 -drop database mysqltest; diff --git a/mysql-test/r/ndb_binlog_log_bin.result b/mysql-test/r/ndb_binlog_log_bin.result deleted file mode 100644 index f80a46324e0..00000000000 --- a/mysql-test/r/ndb_binlog_log_bin.result +++ /dev/null @@ -1,80 +0,0 @@ -drop table if exists t1,t2,t3; -reset master; -drop table if exists t1,t2,t3; -reset master; -set SQL_LOG_BIN=0; -create database mysqltest; -use mysqltest; -create table t1 (a int key, b int) engine=ndb; -create table t2 (a int key, b int) engine=ndb; -insert into t1 values (1,1); -alter table t1 add c int; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # BEGIN -master-bin.000001 # Table_map 1 # table_id: # (mysqltest.t1) -master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # COMMIT -reset master; -use mysqltest; -insert into t2 values (1,1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 102 # BEGIN -master-bin1.000001 # Table_map 102 # table_id: # (mysqltest.t1) -master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) -master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F -master-bin1.000001 # Query 102 # COMMIT -master-bin1.000001 # Query 102 # BEGIN -master-bin1.000001 # Table_map 102 # table_id: # (mysqltest.t2) -master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F -master-bin1.000001 # Query 102 # COMMIT -reset master; -use mysqltest; -drop table t1; -drop table t2; -create table t1 (d int key, e int) engine=ndb; -create table t2 (d int key, e int) engine=ndb; -insert into t1 values (1,1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # BEGIN -master-bin.000001 # Table_map 1 # table_id: # (mysqltest.t2) -master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows 1 # table_id: # -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # COMMIT -master-bin.000001 # Query 1 # use `mysqltest`; drop table t1 -master-bin.000001 # Query 1 # use `mysqltest`; drop table t2 -master-bin.000001 # Query 1 # use `mysqltest`; create table t1 (d int key, e int) engine=ndb -master-bin.000001 # Query 1 # use `mysqltest`; create table t2 (d int key, e int) engine=ndb -master-bin.000001 # Query 1 # BEGIN -master-bin.000001 # Table_map 1 # table_id: # (mysqltest.t1) -master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows 1 # table_id: # -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # COMMIT -use mysqltest; -insert into t2 values (1,1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 1 # use `mysqltest`; drop table `t1` -master-bin1.000001 # Query 1 # use `mysqltest`; drop table `t2` -master-bin1.000001 # Query 1 # use `mysqltest`; create table t1 (d int key, e int) engine=ndb -master-bin1.000001 # Query 1 # use `mysqltest`; create table t2 (d int key, e int) engine=ndb -master-bin1.000001 # Query 102 # BEGIN -master-bin1.000001 # Table_map 102 # table_id: # (mysqltest.t1) -master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F -master-bin1.000001 # Query 102 # COMMIT -master-bin1.000001 # Query 102 # BEGIN -master-bin1.000001 # Table_map 102 # table_id: # (mysqltest.t2) -master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F -master-bin1.000001 # Query 102 # COMMIT -drop database mysqltest; diff --git a/mysql-test/r/ndb_binlog_multi.result b/mysql-test/r/ndb_binlog_multi.result deleted file mode 100644 index bf9b34db64b..00000000000 --- a/mysql-test/r/ndb_binlog_multi.result +++ /dev/null @@ -1,84 +0,0 @@ -drop table if exists t1,t2,t3; -drop table if exists t1,t2,t3; -CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; -DROP TABLE t3; -reset master; -reset master; -CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; -INSERT INTO t2 VALUES (1,1),(2,2); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 102 # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB -master-bin1.000001 # Query 102 # BEGIN -master-bin1.000001 # Table_map 102 # table_id: # (test.t2) -master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F -master-bin1.000001 # Query 102 # COMMIT -select * from t2 order by a; -a b -1 1 -2 2 -SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -@the_epoch:=epoch inserts updates deletes schemaops - 2 0 0 0 -SELECT * FROM t2 ORDER BY a; -a b -1 1 -2 2 -DROP TABLE t2; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 102 # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB -master-bin.000001 # Query 1 # BEGIN -master-bin.000001 # Table_map 1 # table_id: # (test.t2) -master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows 1 # table_id: # -master-bin.000001 # Write_rows 1 # table_id: # -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # COMMIT -master-bin.000001 # Query 1 # use `test`; DROP TABLE t2 -SELECT inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index WHERE epoch=; -inserts updates deletes schemaops -2 0 0 0 -reset master; -reset master; -CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; -INSERT INTO t1 VALUES (1),(2); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 102 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB -master-bin1.000001 # Query 102 # BEGIN -master-bin1.000001 # Table_map 102 # table_id: # (test.t1) -master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F -master-bin1.000001 # Query 102 # COMMIT -SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -@the_epoch2:=epoch inserts updates deletes schemaops - 2 0 0 0 -SELECT inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index WHERE epoch > AND epoch <= ; -inserts updates deletes schemaops -2 0 0 0 -drop table t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin1.000001 # Query 102 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB -master-bin1.000001 # Query 102 # BEGIN -master-bin1.000001 # Table_map 102 # table_id: # (test.t1) -master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # -master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F -master-bin1.000001 # Query 102 # COMMIT -master-bin1.000001 # Query 102 # use `test`; drop table t1 -SELECT inserts,updates,deletes,schemaops FROM -mysql.ndb_binlog_index WHERE epoch > AND epoch <= ; -inserts updates deletes schemaops -2 0 0 0 diff --git a/mysql-test/r/ndb_bitfield.result b/mysql-test/r/ndb_bitfield.result deleted file mode 100644 index 59c4d420b22..00000000000 --- a/mysql-test/r/ndb_bitfield.result +++ /dev/null @@ -1,224 +0,0 @@ -drop table if exists t1; -create table t1 ( -pk1 int not null primary key, -b bit(64) -) engine=ndbcluster; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` bit(64) DEFAULT NULL, - PRIMARY KEY (`pk1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -insert into t1 values -(0,b'1111111111111111111111111111111111111111111111111111111111111111'), -(1,b'1000000000000000000000000000000000000000000000000000000000000000'), -(2,b'0000000000000000000000000000000000000000000000000000000000000001'), -(3,b'1010101010101010101010101010101010101010101010101010101010101010'), -(4,b'0101010101010101010101010101010101010101010101010101010101010101'); -select hex(b) from t1 order by pk1; -hex(b) -FFFFFFFFFFFFFFFF -8000000000000000 -1 -AAAAAAAAAAAAAAAA -5555555555555555 -drop table t1; -create table t1 ( -pk1 int not null primary key, -b bit(9) -) engine=ndbcluster; -insert into t1 values -(0,b'000000000'), -(1,b'000000001'), -(2,b'000000010'), -(3,b'000000011'), -(4,b'000000100'); -select hex(b) from t1 order by pk1; -hex(b) -0 -1 -2 -3 -4 -update t1 set b = b + b'101010101'; -select hex(b) from t1 order by pk1; -hex(b) -155 -156 -157 -158 -159 -drop table t1; -create table t1 (a bit(7), b bit(9)) engine = ndbcluster; -insert into t1 values -(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), -(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), -(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), -(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), -(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), -(44, 307), (68, 454), (57, 135); -select a+0 from t1 order by a; -a+0 -0 -4 -5 -9 -23 -24 -28 -29 -30 -31 -34 -44 -49 -56 -57 -59 -60 -61 -68 -68 -75 -77 -78 -79 -87 -88 -94 -94 -104 -106 -108 -111 -116 -118 -119 -122 -123 -127 -select b+0 from t1 order by b; -b+0 -36 -42 -46 -67 -83 -118 -123 -133 -135 -152 -177 -178 -188 -202 -206 -245 -280 -307 -343 -345 -349 -351 -363 -368 -368 -379 -380 -390 -398 -399 -403 -411 -411 -438 -446 -454 -468 -499 -drop table t1; -create table t1 ( -dummyKey INTEGER NOT NULL, -a001 TINYINT, -a010 TINYINT, -a012 TINYINT, -a015 TINYINT, -a016 TINYINT, -a017 TINYINT, -a019 TINYINT, -a029 TINYINT, -a030 TINYINT, -a031 TINYINT, -a032 TINYINT, -a042 TINYINT, -a043 TINYINT, -a044 TINYINT, -a3001 TINYINT, -a3002 TINYINT, -a3003 TINYINT, -a3004 TINYINT, -a3005 TINYINT, -a3021 TINYINT, -a3022 TINYINT, -a BIT(6), -b BIT(6), -c BIT(6), -d TINYINT, -e TINYINT, -f TINYINT, -g TINYINT, -h TINYINT, -i TINYINT, -j TINYINT, -k TINYINT, -l TINYINT, -m TINYINT, -n TINYINT, -o TINYINT, -a034 TINYINT, -PRIMARY KEY USING HASH (dummyKey) ) engine=ndb; -INSERT INTO `t1` VALUES -(1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1), -(2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1), -(3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1), -(4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x01,0x3F,0x3E,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x02,0x00,0x3D,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x04,0x0F,0x3B,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x08,0x30,0x37,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x10,0x21,0x2F,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x20,0x12,0x1F,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x00,0x0C,0x3F,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO `t1` VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x3F,0x00,0x00,4,5,5,5,5,5,5,5,5,5,3,2,1); -drop table t1; -create table t1 ( -pk1 bit(9) not null primary key, -b int -) engine=ndbcluster; -ERROR HY000: Can't create table 'test.t1' (errno: 906) -show warnings; -Level Code Message -Error 1296 Got error 906 'Unsupported attribute type in index' from NDB -Error 1005 Can't create table 'test.t1' (errno: 906) -create table t1 ( -pk1 int not null primary key, -b bit(9), -key(b) -) engine=ndbcluster; -ERROR HY000: Can't create table 'test.t1' (errno: 906) -show warnings; -Level Code Message -Error 1296 Got error 906 'Unsupported attribute type in index' from NDB -Error 1005 Can't create table 'test.t1' (errno: 906) -create table t1 ( -pk1 int primary key, -b bit(32) not null -) engine=ndbcluster; -insert into t1 values (1,1); -drop table t1; diff --git a/mysql-test/r/ndb_blob.result b/mysql-test/r/ndb_blob.result deleted file mode 100644 index 34f2c5fdd66..00000000000 --- a/mysql-test/r/ndb_blob.result +++ /dev/null @@ -1,570 +0,0 @@ -drop table if exists t1; -drop database if exists test2; -set autocommit=0; -create table t1 ( -a int not null primary key, -b text not null, -c int not null, -d longblob, -key (c) -) engine=ndbcluster; -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -select length(@x0),length(@b1),length(@d1) from dual; -length(@x0) length(@b1) length(@d1) -256 2256 3000 -select length(@x0),length(@b2),length(@d2) from dual; -length(@x0) length(@b2) length(@d2) -256 20000 30000 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1 where a = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const PRIMARY PRIMARY 4 const # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -2 20000 b2 30000 dd2 -update t1 set b=@b2,d=@d2 where a=1; -update t1 set b=@b1,d=@d1 where a=2; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -1 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 2256 b1 3000 dd1 -update t1 set b=concat(b,b),d=concat(d,d) where a=1; -update t1 set b=concat(b,b),d=concat(d,d) where a=2; -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 40000 b2 60000 dd2 -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; -a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3) -2 4512 b1 6000 dd1 -update t1 set d=null where a=1; -commit; -select a from t1 where d is null; -a -1 -delete from t1 where a=45567; -commit; -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; -count(*) -0 -replace t1 set a=1,b=@b1,c=111,d=@d1; -replace t1 set a=2,b=@b2,c=222,d=@d2; -commit; -explain select * from t1 where a = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const PRIMARY PRIMARY 4 const # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -2 20000 b2 30000 dd2 -replace t1 set a=1,b=@b2,c=111,d=@d2; -replace t1 set a=2,b=@b1,c=222,d=@d1; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -1 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 2256 b1 3000 dd1 -replace t1 set a=1,b=concat(@b2,@b2),c=111,d=concat(@d2,@d2); -replace t1 set a=2,b=concat(@b1,@b1),c=222,d=concat(@d1,@d1); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 40000 b2 60000 dd2 -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; -a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3) -2 4512 b1 6000 dd1 -replace t1 set a=1,b='xyz',c=111,d=null; -commit; -select a,b from t1 where d is null; -a b -1 xyz -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1 where c = 111; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref c c 4 const # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=111; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=222; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -2 20000 b2 30000 dd2 -update t1 set b=@b2,d=@d2 where c=111; -update t1 set b=@b1,d=@d1 where c=222; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=111; -a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) -1 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=222; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 2256 b1 3000 dd1 -update t1 set d=null where c=111; -commit; -select a from t1 where d is null; -a -1 -delete from t1 where c=111; -delete from t1 where c=222; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; -explain select * from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -update t1 set b=concat(a,'x',b),d=concat(a,'x',d); -commit; -select * from t1 order by a; -a b c d -1 1xb1 111 1xdd1 -2 2xb2 222 2xdd2 -3 3xb3 333 3xdd3 -4 4xb4 444 4xdd4 -5 5xb5 555 5xdd5 -6 6xb6 666 6xdd6 -7 7xb7 777 7xdd7 -8 8xb8 888 8xdd8 -9 9xb9 999 9xdd9 -delete from t1; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -2 20000 b2 30000 dd2 -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 order by a; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 4512 6000 -2 40000 b2 60000 dd2 -delete from t1; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; -explain select * from t1 where c >= 100 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 4 NULL # Using where with pushed condition; Using filesort -select * from t1 where c >= 100 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -update t1 set b=concat(a,'x',b),d=concat(a,'x',d) -where c >= 100; -commit; -select * from t1 where c >= 100 order by a; -a b c d -1 1xb1 111 1xdd1 -2 2xb2 222 2xdd2 -3 3xb3 333 3xdd3 -4 4xb4 444 4xdd4 -5 5xb5 555 5xdd5 -6 6xb6 666 6xdd6 -7 7xb7 777 7xdd7 -8 8xb8 888 8xdd8 -9 9xb9 999 9xdd9 -delete from t1 where c >= 100; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; -explain select * from t1 where c >= 100 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c c 4 NULL # Using where with pushed condition; Using filesort -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c >= 100 order by a; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -2 20000 b2 30000 dd2 -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where c >= 100 order by a; -a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) -1 4512 6000 -2 40000 b2 60000 dd2 -delete from t1 where c >= 100; -commit; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 0; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 1; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 2; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -2 20000 b2 30000 dd2 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; -a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) -1 2256 b1 3000 dd1 -2 20000 b2 30000 dd2 -rollback; -select count(*) from t1; -count(*) -0 -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -alter table t1 add x int; -select * from t1 order by a; -a b c d x -1 b1 111 dd1 NULL -2 b2 222 dd2 NULL -3 b3 333 dd3 NULL -4 b4 444 dd4 NULL -5 b5 555 dd5 NULL -6 b6 666 dd6 NULL -7 b7 777 dd7 NULL -8 b8 888 dd8 NULL -9 b9 999 dd9 NULL -alter table t1 drop x; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -create database test2; -use test2; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -insert into t2 values (1,1,1),(2,2,2); -select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; -a b c d a b c -1 b1 111 dd1 1 1 1 -2 b2 222 dd2 2 2 2 -drop table t2; -use test; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -alter table t1 add x int; -select * from t1 order by a; -a b c d x -1 b1 111 dd1 NULL -2 b2 222 dd2 NULL -3 b3 333 dd3 NULL -4 b4 444 dd4 NULL -5 b5 555 dd5 NULL -6 b6 666 dd6 NULL -7 b7 777 dd7 NULL -8 b8 888 dd8 NULL -9 b9 999 dd9 NULL -alter table t1 drop x; -select * from t1 order by a; -a b c d -1 b1 111 dd1 -2 b2 222 dd2 -3 b3 333 dd3 -4 b4 444 dd4 -5 b5 555 dd5 -6 b6 666 dd6 -7 b7 777 dd7 -8 b8 888 dd8 -9 b9 999 dd9 -drop table t1; -drop database test2; -set autocommit=0; -create table t1 ( -a int not null primary key, -b tinytext -) engine=ndbcluster; -insert into t1 values(1, 'x'); -update t1 set b = 'y'; -select * from t1; -a b -1 y -delete from t1; -select * from t1; -a b -commit; -replace t1 set a=2, b='y'; -select * from t1; -a b -2 y -delete from t1; -select * from t1; -a b -drop table t1; -set autocommit=0; -create table t1 ( -a int not null primary key, -b text not null -) engine=ndbcluster; -insert into t1 values(1, ''); -select * from t1; -a b -1 -commit; -drop table t1; -set autocommit=1; -use test; -CREATE TABLE t1 ( -a int, -b text, -PRIMARY KEY (a) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES -(1,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); -INSERT INTO t1 VALUES -(2,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'); -select * from t1 order by a; -a b -1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB -alter table t1 engine=ndb; -select * from t1 order by a; -a b -1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB -set autocommit=1; -alter table t1 engine=myisam; -select * from t1 order by a; -a b -1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB -drop table t1; -create table t1 ( -id int(11) unsigned primary key NOT NULL auto_increment, -msg text NOT NULL -) engine=ndbcluster default charset=utf8; -insert into t1 (msg) values( -'Tries to validate (8 byte length + inline bytes) as UTF8 :( -Fast fix: removed validation for Text. It is not yet indexable -so bad data will not crash kernel.'); -select * from t1; -id msg -1 Tries to validate (8 byte length + inline bytes) as UTF8 :( -Fast fix: removed validation for Text. It is not yet indexable -so bad data will not crash kernel. -drop table t1; -create table t1 ( -a int primary key not null auto_increment, -b text -) engine=ndbcluster; -select count(*) from t1; -count(*) -500 -truncate t1; -select count(*) from t1; -count(*) -0 -drop table t1; -create table t1 ( -a varchar(40) not null, -b mediumint not null, -t text, -c varchar(2) not null, -d bigint not null, -primary key (a,b,c), -key (c,a), -unique key (d) -) engine=ndb; -insert into t1 (a,b,c,d,t) values ('a',1110,'a',1,@v1); -insert into t1 (a,b,c,d,t) values ('b',1110,'a',2,@v2); -insert into t1 (a,b,c,d,t) values ('a',1110,'b',3,@v3); -insert into t1 (a,b,c,d,t) values ('b',1110,'b',4,@v4); -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 NULL -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='a'; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='b'; -a b c d sha1(t) -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -update t1 set t=@v4 where a='b' and b=1110 and c='a'; -update t1 set t=@v2 where a='b' and b=1110 and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 NULL -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 b238654911689bfb626a3ef9dba4a1ca074e6a5e -update t1 set t=@v2 where d=2; -update t1 set t=@v4 where d=4; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 NULL -update t1 set t=@v4 where a='b' and c='a'; -update t1 set t=@v2 where a='b' and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 NULL -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 b238654911689bfb626a3ef9dba4a1ca074e6a5e -update t1 set t=@v2 where b+d=1112; -update t1 set t=@v4 where b+d=1114; -select a,b,c,d,sha1(t) from t1 order by c,a; -a b c d sha1(t) -a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 -b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e -a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 -b 1110 b 4 NULL -delete from t1 where a='a' and b=1110 and c='a'; -delete from t1 where a='b' and c='a'; -delete from t1 where d=3; -delete from t1 where b+d=1114; -select count(*) from t1; -count(*) -0 -drop table t1; diff --git a/mysql-test/r/ndb_blob_partition.result b/mysql-test/r/ndb_blob_partition.result deleted file mode 100644 index b08a91f0cdd..00000000000 --- a/mysql-test/r/ndb_blob_partition.result +++ /dev/null @@ -1,104 +0,0 @@ -drop table if exists t1; -create table t1 ( -a mediumint not null, -b text not null, -c int not null, -d longblob, -primary key using hash (a,c), -unique key (c) -) -engine=ndb -partition by range (c) -partitions 3 -( partition p1 values less than (200), -partition p2 values less than (300), -partition p3 values less than (400)); -insert into t1 values (1, @v1, 101, @v2); -insert into t1 values (1, @v2, 102, @v3); -insert into t1 values (1, @v3, 103, @v4); -insert into t1 values (2, @v4, 201, @v5); -insert into t1 values (2, @v5, 202, @v6); -insert into t1 values (2, @v6, 203, @v7); -insert into t1 values (3, @v7, 301, @v8); -insert into t1 values (3, @v8, 302, @v9); -insert into t1 values (3, @v9, 303, @v1); -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 10d3c783026b310218d10b7188da96a2401648c6 102 a33549d9844092289a58ac348dd59f09fc28406a -1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e -2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 acbaba01bc2e682f015f40e79d9cbe475db3002e 302 9ee30d99162574f79c66ae95cdf132dcf9cbc259 -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 -select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; -a sha1(b) c sha1(d) -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; -a sha1(b) c sha1(d) -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -update t1 set b = @v3, d = @v4 where a = 1 and c = 102; -update t1 set b = @v6, d = @v7 where a = 2 and c = 202; -update t1 set b = @v9, d = @v1 where a = 3 and c = 302; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 -2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 -update t1 set b = @v4, d = @v5 where c = 103; -update t1 set b = @v7, d = @v8 where c = 203; -update t1 set b = @v1, d = @v2 where c = 303; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -1 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 103 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 -2 1e0070bec426871a46291de27b9bd6e4255ab4e5 203 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 -3 1d42dd9090cf78314a06665d4ea938c35cc760f4 303 10d3c783026b310218d10b7188da96a2401648c6 -update t1 set b = @v5, d = @v6; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 101 090565c580809efed3d369481a4bbb168b20713e -1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 102 090565c580809efed3d369481a4bbb168b20713e -1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 103 090565c580809efed3d369481a4bbb168b20713e -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 201 090565c580809efed3d369481a4bbb168b20713e -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e -2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 203 090565c580809efed3d369481a4bbb168b20713e -3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 301 090565c580809efed3d369481a4bbb168b20713e -3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 302 090565c580809efed3d369481a4bbb168b20713e -3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 303 090565c580809efed3d369481a4bbb168b20713e -update t1 set b = @v1, d = @v2 where 100 < c and c < 200; -update t1 set b = @v4, d = @v5 where 200 < c and c < 300; -update t1 set b = @v7, d = @v8 where 300 < c and c < 400; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 102 10d3c783026b310218d10b7188da96a2401648c6 -1 1d42dd9090cf78314a06665d4ea938c35cc760f4 103 10d3c783026b310218d10b7188da96a2401648c6 -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 202 70fc9a7d08beebc522258bfb02000a30c77a8f1d -2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 203 70fc9a7d08beebc522258bfb02000a30c77a8f1d -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 302 acbaba01bc2e682f015f40e79d9cbe475db3002e -3 1e0070bec426871a46291de27b9bd6e4255ab4e5 303 acbaba01bc2e682f015f40e79d9cbe475db3002e -delete from t1 where a = 1 and c = 101; -delete from t1 where c = 102; -delete from t1; -select a, sha1(b), c, sha1(d) from t1 order by a; -a sha1(b) c sha1(d) -drop table t1; diff --git a/mysql-test/r/ndb_cache.result b/mysql-test/r/ndb_cache.result deleted file mode 100644 index 478663b1aa1..00000000000 --- a/mysql-test/r/ndb_cache.result +++ /dev/null @@ -1,191 +0,0 @@ -drop table if exists t1; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; -CREATE TABLE t1 ( pk int not null primary key, -a int, b int not null, c varchar(20)) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); -select * from t1; -pk a b c -1 2 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -pk a b c -1 2 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -update t1 set a=3 where pk=1; -select * from t1; -pk a b c -1 3 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk; -pk a b c -1 3 3 First row -2 7 8 Second row -4 5 6 Fourth row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk; -pk a b c -1 3 3 First row -2 7 8 Second row -4 5 6 Fourth row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -delete from t1 where c='Fourth row'; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -use test; -select * from t1 order by pk; -pk a b c -1 3 3 First row -2 7 8 Second row -select * from t1 where b=3; -pk a b c -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 -update t1 set a=4 where b=3; -use test; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -begin; -update t1 set a=5 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 8 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -commit; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 8 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 5 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 9 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t1 order by pk desc; -pk a b c -2 7 8 Second row -1 5 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 9 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 8 -drop table t1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -SET GLOBAL query_cache_size=0; diff --git a/mysql-test/r/ndb_cache2.result b/mysql-test/r/ndb_cache2.result deleted file mode 100644 index 2876002f864..00000000000 --- a/mysql-test/r/ndb_cache2.result +++ /dev/null @@ -1,623 +0,0 @@ -drop table if exists t1, t2, t3, t4, t5; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=100; -reset query cache; -flush status; -CREATE TABLE t1 ( -pk int not null primary key, -a1 int, -b1 int not null, -c1 varchar(20) -) ENGINE=ndb; -CREATE TABLE t2 ( -pk int not null primary key, -a2 int, -b2 int not null -) ENGINE=ndb; -CREATE TABLE t3 ( -pk int not null primary key, -a3 int, -b3 int not null, -c3 int not null, -d3 varchar(20) -) ENGINE=ndb; -CREATE TABLE t4 ( -a4 int, -b4 int not null, -c4 char(20) -) ENGINE=ndbcluster; -CREATE TABLE t5 ( -pk int not null primary key, -a5 int, -b5 int not null, -c5 varchar(255) -) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); -insert into t2 value (1, 2, 3); -insert into t3 value (1, 2, 3, 4, '3 - First row'); -insert into t4 value (2, 3, '4 - First row'); -insert into t5 value (1, 2, 3, '5 - First row'); -select * from t1; -pk a1 b1 c1 -1 2 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -pk a1 b1 c1 -1 2 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -update t1 set a1=3 where pk=1; -select * from t1; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk desc; -pk a1 b1 c1 -4 5 6 Fourth row -2 7 8 Second row -1 3 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -4 5 6 Fourth row -2 7 8 Second row -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -delete from t1 where c1='Fourth row'; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -use test; -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 3 3 First row -select * from t1 where b1=3; -pk a1 b1 c1 -1 3 3 First row -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 -update t1 set a1=4 where b1=3; -use test; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * from t2; -pk a2 b2 -1 2 3 -select * from t3; -pk a3 b3 c3 d3 -1 2 3 4 3 - First row -select * from t4; -a4 b4 c4 -2 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 2 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -flush status; -begin; -update t1 set a1=5 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 4 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -flush status; -begin; -update t1 set a1=6 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 5 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -commit; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -flush status; -begin; -insert into t1 set pk=5, a1=6, b1=3, c1="New row"; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=5; -pk a1 b1 c1 -select * from t1 order by pk desc; -pk a1 b1 c1 -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=5; -pk a1 b1 c1 -5 6 3 New row -select * from t1 where pk=5; -pk a1 b1 c1 -5 6 3 New row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -flush status; -begin; -delete from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=2; -pk a1 b1 c1 -2 7 8 Second row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -2 7 8 Second row -1 6 3 First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 where pk=2; -pk a1 b1 c1 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t1 where pk=2; -pk a1 b1 c1 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t1 where pk=2; -pk a1 b1 c1 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 4 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -flush status; -begin; -update t1 set a1=9 where pk=1; -update t2 set a2=9 where pk=1; -update t3 set a3=9 where pk=1; -update t4 set a4=9 where a4=2; -update t5 set a5=9 where pk=1; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 6 3 First row -select * from t2; -pk a2 b2 -1 2 3 -select * from t3; -pk a3 b3 c3 d3 -1 2 3 4 3 - First row -select * from t4; -a4 b4 c4 -2 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 2 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -commit; -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 10 -select * from t1 order by pk desc; -pk a1 b1 c1 -5 6 3 New row -1 9 3 First row -select * from t2; -pk a2 b2 -1 9 3 -select * from t3; -pk a3 b3 c3 d3 -1 9 3 4 3 - First row -select * from t4; -a4 b4 c4 -9 3 4 - First row -select * from t5; -pk a5 b5 c5 -1 9 3 5 - First row -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 15 -drop table t1, t2, t3, t4, t5; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -SET GLOBAL query_cache_size=0; -SET GLOBAL ndb_cache_check_time=0; diff --git a/mysql-test/r/ndb_cache_multi.result b/mysql-test/r/ndb_cache_multi.result deleted file mode 100644 index 388131ec30a..00000000000 --- a/mysql-test/r/ndb_cache_multi.result +++ /dev/null @@ -1,74 +0,0 @@ -drop table if exists t1, t2; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select * from t2; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -a -2 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -update t1 set a=3 where a=2; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -drop table t1, t2; -set GLOBAL query_cache_size=0; -set GLOBAL query_cache_size=0; diff --git a/mysql-test/r/ndb_cache_multi2.result b/mysql-test/r/ndb_cache_multi2.result deleted file mode 100644 index 53767bb6d3c..00000000000 --- a/mysql-test/r/ndb_cache_multi2.result +++ /dev/null @@ -1,75 +0,0 @@ -drop table if exists t1, t2; -== Connected to server1 == -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; -== Connected to server2 == -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; -== Connected to server1 == -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select a != 3 from t1; -a != 3 -1 -select * from t2; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -== Connected to server2 == -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -select * from t1; -a -2 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -update t1 set a=3 where a=2; -== Connected to server1 == -select * from t1; -a -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -drop table t1, t2; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; diff --git a/mysql-test/r/ndb_charset.result b/mysql-test/r/ndb_charset.result deleted file mode 100644 index 1c65a380039..00000000000 --- a/mysql-test/r/ndb_charset.result +++ /dev/null @@ -1,320 +0,0 @@ -drop table if exists t1; -create table t1 ( -a char(3) character set latin1 collate latin1_bin primary key -) engine=ndb; -insert into t1 values('aAa'); -insert into t1 values('aaa'); -insert into t1 values('AAA'); -select * from t1 order by a; -a -AAA -aAa -aaa -select * from t1 where a = 'aAa'; -a -aAa -select * from t1 where a = 'aaa'; -a -aaa -select * from t1 where a = 'AaA'; -a -select * from t1 where a = 'AAA'; -a -AAA -drop table t1; -create table t1 ( -a char(3) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -insert into t1 values('aAa'); -insert into t1 values('aaa'); -ERROR 23000: Duplicate entry 'aaa' for key 'PRIMARY' -insert into t1 values('AAA'); -ERROR 23000: Duplicate entry 'AAA' for key 'PRIMARY' -select * from t1 order by a; -a -aAa -select * from t1 where a = 'aAa'; -a -aAa -select * from t1 where a = 'aaa'; -a -aAa -select * from t1 where a = 'AaA'; -a -aAa -select * from t1 where a = 'AAA'; -a -aAa -drop table t1; -create table t1 ( -a varchar(20) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); -insert into t1 values('b'); -ERROR 23000: Duplicate entry 'b' for key 'PRIMARY' -insert into t1 values('a '); -ERROR 23000: Duplicate entry 'a ' for key 'PRIMARY' -select a,length(a) from t1 order by a; -a length(a) -A 1 -b 2 -C 3 -d 7 -E 1 -f 1 -select a,length(a) from t1 order by a desc; -a length(a) -f 1 -E 1 -d 7 -C 3 -b 2 -A 1 -select * from t1 where a = 'a'; -a -A -select * from t1 where a = 'a '; -a -A -select * from t1 where a = 'd'; -a -d -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_bin not null, -unique key(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -select * from t1 order by p; -p a -1 aAa -2 aaa -3 AAA -select * from t1 where a = 'aAa'; -p a -1 aAa -select * from t1 where a = 'aaa'; -p a -2 aaa -select * from t1 where a = 'AaA'; -p a -select * from t1 where a = 'AAA'; -p a -3 AAA -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_swedish_ci not null, -unique key(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -insert into t1 values(3, 'AAA'); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -select * from t1 order by p; -p a -1 aAa -select * from t1 where a = 'aAa'; -p a -1 aAa -select * from t1 where a = 'aaa'; -p a -1 aAa -select * from t1 where a = 'AaA'; -p a -1 aAa -select * from t1 where a = 'AAA'; -p a -1 aAa -drop table t1; -create table t1 ( -p int primary key, -a varchar(20) character set latin1 collate latin1_swedish_ci not null, -unique key(a) -) engine=ndb; -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); -insert into t1 values(99,'b'); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -insert into t1 values(99,'a '); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -select a,length(a) from t1 order by a; -a length(a) -A 1 -b 2 -C 3 -d 7 -E 1 -f 1 -select a,length(a) from t1 order by a desc; -a length(a) -f 1 -E 1 -d 7 -C 3 -b 2 -A 1 -select * from t1 where a = 'a'; -p a -1 A -select * from t1 where a = 'a '; -p a -1 A -select * from t1 where a = 'd'; -p a -4 d -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_bin not null, -index(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -select * from t1 order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'aAa' order by p; -p a -1 aAa -4 aAa -select * from t1 where a = 'aaa' order by p; -p a -2 aaa -5 aaa -select * from t1 where a = 'AaA' order by p; -p a -select * from t1 where a = 'AAA' order by p; -p a -3 AAA -6 AAA -drop table t1; -create table t1 ( -p int primary key, -a char(3) character set latin1 collate latin1_swedish_ci not null, -index(a) -) engine=ndb; -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -select * from t1 order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'aAa' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'aaa' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'AaA' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -select * from t1 where a = 'AAA' order by p; -p a -1 aAa -2 aaa -3 AAA -4 aAa -5 aaa -6 AAA -drop table t1; -create table t1 ( -p int primary key, -a varchar(20) character set latin1 collate latin1_swedish_ci not null, -index(a, p) -) engine=ndb; -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); -insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F '); -select p,a,length(a) from t1 order by a, p; -p a length(a) -1 A 1 -7 a 1 -2 b 2 -8 B 2 -3 C 3 -9 c 3 -4 d 7 -10 D 1 -5 E 1 -11 e 1 -6 f 1 -12 F 3 -select * from t1 where a = 'a ' order by a desc, p desc; -p a -7 a -1 A -select * from t1 where a >= 'D' order by a, p; -p a -4 d -10 D -5 E -11 e -6 f -12 F -select * from t1 where a < 'D' order by a, p; -p a -1 A -7 a -2 b -8 B -3 C -9 c -select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a; -count(*) -48 -drop table t1; -create table t1 ( -a char(10) primary key -) engine=ndbcluster default charset=latin1; -insert into t1 values ('aaabb'); -select * from t1; -a -aaabb -replace into t1 set a = 'AAABB'; -select * from t1; -a -AAABB -replace into t1 set a = 'aAaBb'; -select * from t1; -a -aAaBb -replace into t1 set a = 'aaabb'; -select * from t1; -a -aaabb -drop table t1; diff --git a/mysql-test/r/ndb_condition_pushdown.result b/mysql-test/r/ndb_condition_pushdown.result deleted file mode 100644 index 8d1dcc4ef18..00000000000 --- a/mysql-test/r/ndb_condition_pushdown.result +++ /dev/null @@ -1,1892 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4; -CREATE TABLE t1 ( -auto int(5) unsigned NOT NULL auto_increment, -string char(10), -vstring varchar(10), -bin binary(2), -vbin varbinary(7), -tiny tinyint(4) DEFAULT '0' NOT NULL , -short smallint(6) DEFAULT '1' NOT NULL , -medium mediumint(8) DEFAULT '0' NOT NULL, -long_int int(11) DEFAULT '0' NOT NULL, -longlong bigint(13) DEFAULT '0' NOT NULL, -real_float float(13,1) DEFAULT 0.0 NOT NULL, -real_double double(16,4), -real_decimal decimal(16,4), -utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, -ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, -umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, -ulong int(11) unsigned DEFAULT '0' NOT NULL, -ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, -bits bit(3), -options enum('zero','one','two','three','four') not null, -flags set('zero','one','two','three','four') not null, -date_field date, -year_field year, -time_field time, -date_time datetime, -time_stamp timestamp, -PRIMARY KEY (auto) -) engine=ndb; -insert into t1 values -(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, -b'001','one','one', -'1901-01-01','1901', -'01:01:01','1901-01-01 01:01:01',NULL), -(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2, -b'010','two','one,two', -'1902-02-02','1902', -'02:02:02','1902-02-02 02:02:02',NULL), -(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3, -b'011','three','one,two,three', -'1903-03-03','1903', -'03:03:03','1903-03-03 03:03:03',NULL), -(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4, -b'100','four','one,two,three,four', -'1904-04-04','1904', -'04:04:04','1904-04-04 04:04:04',NULL); -CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster; -insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f"); -CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster; -insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); -CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster; -insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); -set @old_ecpd = @@session.engine_condition_pushdown; -set engine_condition_pushdown = off; -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -bits = b'001' and -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -auto -1 -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -bits != b'001' and -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -bits > b'001' and -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -bits >= b'001' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -auto -1 -2 -3 -4 -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -bits < b'100' and -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 and -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -bits <= b'100' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -4 -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; -auto -2 -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; -auto -1 -3 -4 -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -(bits between b'001' and b'011') and -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -1 -3 -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -(b'001' between bits and bits) and -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; -auto -1 -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -(bits not between b'001' and b'011') and -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -4 -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -(b'001' not between bits and bits) and -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; -auto -2 -3 -4 -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -bits in(b'001',b'011') and -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -1 -3 -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in(short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -b'001' in(bits) and -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; -auto -1 -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -bits not in(b'001',b'011') and -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -2 -4 -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -b'001' not in(bits) and -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; -auto -2 -3 -4 -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -pk1 attr1 attr2 attr3 -2 2 NULL NULL -3 3 3 d -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -pk1 attr1 attr2 attr3 -3 3 3 d -4 4 4 e -5 5 5 f -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -5 5 9223372036854775807 5 f -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 -0 0 0 a 0 0 0 0 a -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c -3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d -4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e -set engine_condition_pushdown = on; -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -auto -1 -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -auto -1 -2 -3 -4 -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -4 -create index medium_index on t1(medium); -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref medium_index medium_index 3 const # Using where with pushed condition; Using filesort -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; -auto -1 -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; -auto -1 -2 -3 -4 -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; -auto -1 -2 -3 -4 -explain -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; -auto -2 -explain -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; -auto -1 -3 -4 -explain -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -1 -3 -explain -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; -auto -1 -explain -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; -auto -4 -explain -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; -auto -2 -3 -4 -explain -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -1 -3 -explain -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref medium_index medium_index 3 const # Using where with pushed condition; Using filesort -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; -auto -1 -explain -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; -auto -2 -4 -explain -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; -auto -2 -3 -4 -update t1 -set medium = 17 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; -delete from t1 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = 17 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; -select count(*) from t1; -count(*) -3 -explain -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL PRIMARY NULL NULL NULL # Using where with pushed condition; Using filesort -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -pk1 attr1 attr2 attr3 -2 2 NULL NULL -3 3 3 d -explain -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -pk1 attr1 attr2 attr3 -3 3 3 d -4 4 4 e -5 5 5 f -explain -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -5 5 9223372036854775807 5 f -explain -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using temporary; Using filesort -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition; Using join buffer -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 -0 0 0 a 0 0 0 0 a -explain -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using filesort -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c -4 4 9223372036854775806 4 e -explain -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using temporary; Using filesort -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where; Using join buffer -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 -2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c -3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d -4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e -explain -select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where; Using filesort -explain -select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where; Using filesort -explain -select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using temporary; Using filesort -1 SIMPLE t4 ALL NULL NULL NULL NULL # Using where -create table t5 (a int primary key auto_increment, b tinytext not null) -engine = ndb; -insert into t5 (b) values ('jonas'), ('jensing'), ('johan'); -set engine_condition_pushdown = off; -select * from t5 where b like '%jo%' order by a; -a b -1 jonas -3 johan -set engine_condition_pushdown = on; -explain select * from t5 where b like '%jo%'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t5 ALL NULL NULL NULL NULL # Using where -select * from t5 where b like '%jo%' order by a; -a b -1 jonas -3 johan -set engine_condition_pushdown = off; -select auto from t1 where date_time like '1902-02-02 %' order by auto; -auto -2 -select auto from t1 where date_time not like '1902-02-02 %' order by auto; -auto -3 -4 -set engine_condition_pushdown = on; -explain select auto from t1 where date_time like '1902-02-02 %'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where -select auto from t1 where date_time like '1902-02-02 %' order by auto; -auto -2 -explain select auto from t1 where date_time not like '1902-02-02 %'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where -select auto from t1 where date_time not like '1902-02-02 %' order by auto; -auto -3 -4 -drop table t1; -create table t1 (a int, b varchar(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -set engine_condition_pushdown = off; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -set engine_condition_pushdown = on; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -drop table t1; -create table t1 (a int, b char(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -set engine_condition_pushdown = off; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -set engine_condition_pushdown = on; -select * from t1 where b like 'ab'; -a b -2 ab -select * from t1 where b like 'ab' or b like 'ab'; -a b -2 ab -select * from t1 where b like 'abc'; -a b -3 abc -select * from t1 where b like 'abc' or b like 'abc'; -a b -3 abc -drop table t1; -create table t1 ( fname varchar(255), lname varchar(255) ) -engine=ndbcluster; -insert into t1 values ("Young","Foo"); -set engine_condition_pushdown = 0; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -set engine_condition_pushdown = 1; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -insert into t1 values ("aaa", "aaa"); -insert into t1 values ("bbb", "bbb"); -insert into t1 values ("ccc", "ccc"); -insert into t1 values ("ddd", "ddd"); -set engine_condition_pushdown = 0; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -set engine_condition_pushdown = 1; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -fname lname -Young Foo -set engine_condition_pushdown = @old_ecpd; -DROP TABLE t1,t2,t3,t4,t5; diff --git a/mysql-test/r/ndb_config.result b/mysql-test/r/ndb_config.result deleted file mode 100644 index 9495af29df6..00000000000 --- a/mysql-test/r/ndb_config.result +++ /dev/null @@ -1,14 +0,0 @@ -ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, mysqld,11, -1,localhost,20971520,1048576 2,localhost,20971520,1048576 -1 localhost 20971520 1048576 -2 localhost 20971520 1048576 -1 2 -ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, mysqld,11, -ndbd,1,localhost,52428800,26214400 ndbd,2,localhost,52428800,36700160 ndbd,3,localhost,52428800,52428800 ndbd,4,localhost,52428800,52428800 ndb_mgmd,5,localhost,, mysqld,6,localhost,, -ndbd,1,localhost ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndb_mgmd,5,localhost mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, -ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndb_mgmd,6,localhost mysqld,1, mysqld,7, mysqld,8, mysqld,9, mysqld,10, -ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndbd,6,localhost ndb_mgmd,1,localhost ndb_mgmd,2,localhost mysqld,11, mysqld,12, mysqld,13, mysqld,14, mysqld,15, -shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2 -1 2 3 - -1 2 3 diff --git a/mysql-test/r/ndb_config2.result b/mysql-test/r/ndb_config2.result deleted file mode 100644 index cfd012933c4..00000000000 --- a/mysql-test/r/ndb_config2.result +++ /dev/null @@ -1 +0,0 @@ -shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2 diff --git a/mysql-test/r/ndb_cursor.result b/mysql-test/r/ndb_cursor.result deleted file mode 100644 index b3b815ef891..00000000000 --- a/mysql-test/r/ndb_cursor.result +++ /dev/null @@ -1,40 +0,0 @@ -drop table if exists t1; -drop table if exists t2; -create table t1 ( -a int not null primary key, -b int not null -) engine=ndb; -create table t2 ( -a int not null primary key, -b int not null -) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30), (4, 40); -create procedure test_cursor () -begin -declare done int default 0; -declare temp_a int; -declare temp_b int; -declare cur1 cursor for select a,b from t1; -declare continue handler for sqlstate '02000' set done = 1; -open cur1; -repeat -fetch cur1 into temp_a, temp_b; -if not done then -insert into t2 values (temp_a, temp_b); -end if; -until done end repeat; -close cur1; -end; -// -select * from t2 order by a; -a b -call test_cursor(); -select * from t2 order by a; -a b -1 10 -2 20 -3 30 -4 40 -drop procedure test_cursor; -drop table t1,t2; -end of 5.1 tests diff --git a/mysql-test/r/ndb_database.result b/mysql-test/r/ndb_database.result deleted file mode 100644 index e3da4af0265..00000000000 --- a/mysql-test/r/ndb_database.result +++ /dev/null @@ -1,13 +0,0 @@ -drop database if exists mysqltest; -create database mysqltest; -create table mysqltest.t1 (a int primary key, b int) engine=ndb; -use mysqltest; -show tables; -Tables_in_mysqltest -t1 -drop database mysqltest; -create database mysqltest; -use mysqltest; -show tables; -Tables_in_mysqltest -drop database mysqltest; diff --git a/mysql-test/r/ndb_dd_alter.result b/mysql-test/r/ndb_dd_alter.result deleted file mode 100644 index 94426546115..00000000000 --- a/mysql-test/r/ndb_dd_alter.result +++ /dev/null @@ -1,560 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -**** Test Setup Section **** -CREATE LOGFILE GROUP lg -ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts -ADD DATAFILE './table_space/datafile.dat' - USE LOGFILE GROUP lg -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 ( -a1 smallint NOT NULL, -a2 int NOT NULL, -a3 bigint NOT NULL, -a4 char(10), -a5 decimal(5,1), -a6 time, -a7 date, -a8 datetime, -a9 VARCHAR(255), -a10 blob, -PRIMARY KEY(a1) -) ENGINE=InnoDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Int NOT NULL AT=FIXED ST=DISK -a3 Bigint NOT NULL AT=FIXED ST=DISK -a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a5 Decimal(5,1) NULL AT=FIXED ST=DISK -a6 Time NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Datetime NULL AT=FIXED ST=DISK -a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -DROP TABLE test.t1; -CREATE TABLE test.t1 ( -a1 smallint NOT NULL, -a2 int NOT NULL, -a3 bigint NOT NULL, -a4 char(10), -a5 decimal(5,1), -a6 time, -a7 date, -a8 datetime, -a9 VARCHAR(255), -a10 blob, -PRIMARY KEY(a1) -) ENGINE=MyISAM; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Int NOT NULL AT=FIXED ST=DISK -a3 Bigint NOT NULL AT=FIXED ST=DISK -a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a5 Decimal(5,1) NULL AT=FIXED ST=DISK -a6 Time NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Datetime NULL AT=FIXED ST=DISK -a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 ENGINE=InnoDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Int NOT NULL AT=FIXED ST=DISK -a3 Bigint NOT NULL AT=FIXED ST=DISK -a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a5 Decimal(5,1) NULL AT=FIXED ST=DISK -a6 Time NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Datetime NULL AT=FIXED ST=DISK -a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK -a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -ALTER TABLE test.t1 ENGINE=MyISAM; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE test.t1; -CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB; -SELECT * FROM test.t1 ORDER BY a1; -a1 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL KEY NULL NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default ts -ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE; -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL KEY NULL NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default ts -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 2.2345 20000001 -2 3.2345 20000002 -3 4.2345 20000003 -4 5.2345 20000004 -5 6.2345 20000005 -6 7.2345 20000006 -7 8.2345 20000007 -8 9.2345 20000008 -9 10.2345 20000009 -10 11.2345 20000010 -11 12.2345 20000011 -12 13.2345 20000012 -13 14.2345 20000013 -14 15.2345 20000014 -15 16.2345 20000015 -16 17.2345 20000016 -17 18.2345 20000017 -18 19.2345 20000018 -19 20.2345 20000019 -20 21.2345 20000020 -ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME; -SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1; -a1 a2 a3 hex(a4) a5 a6 a7 a8 -1 2.2345 20000001 0 1 23457 2006-01-01 07:04:00 -2 3.2345 20000002 0 1 23458 2006-01-01 07:04:00 -3 4.2345 20000003 0 1 23459 2006-01-01 07:04:00 -4 5.2345 20000004 0 1 23460 2006-01-01 07:04:00 -5 6.2345 20000005 0 1 23461 2006-01-01 07:04:00 -6 7.2345 20000006 0 1 23462 2006-01-01 07:04:00 -7 8.2345 20000007 0 1 23463 2006-01-01 07:04:00 -8 9.2345 20000008 0 1 23464 2006-01-01 07:04:00 -9 10.2345 20000009 0 1 23465 2006-01-01 07:04:00 -10 11.2345 20000010 0 1 23466 2006-01-01 07:04:00 -11 12.2345 20000011 0 1 23467 2006-01-01 07:04:00 -12 13.2345 20000012 0 1 23468 2006-01-01 07:04:00 -13 14.2345 20000013 0 1 23469 2006-01-01 07:04:00 -14 15.2345 20000014 0 1 23470 2006-01-01 07:04:00 -15 16.2345 20000015 0 1 23471 2006-01-01 07:04:00 -16 17.2345 20000016 0 1 23472 2006-01-01 07:04:00 -17 18.2345 20000017 0 1 23473 2006-01-01 07:04:00 -18 19.2345 20000018 0 1 23474 2006-01-01 07:04:00 -19 20.2345 20000019 0 1 23475 2006-01-01 07:04:00 -20 21.2345 20000020 0 1 23476 2006-01-01 07:04:00 -ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=DISK -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1; -a1 a2 a3 hex(a4) a5 a6 a7 a8 a9 a10 a11 a12 a13 -1 2.2345 20000001 0 1 23457 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -2 3.2345 20000002 0 1 23458 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -3 4.2345 20000003 0 1 23459 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -4 5.2345 20000004 0 1 23460 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -5 6.2345 20000005 0 1 23461 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -6 7.2345 20000006 0 1 23462 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -7 8.2345 20000007 0 1 23463 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -8 9.2345 20000008 0 1 23464 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -9 10.2345 20000009 0 1 23465 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -10 11.2345 20000010 0 1 23466 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -11 12.2345 20000011 0 1 23467 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -12 13.2345 20000012 0 1 23468 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -13 14.2345 20000013 0 1 23469 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -14 15.2345 20000014 0 1 23470 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -15 16.2345 20000015 0 1 23471 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -16 17.2345 20000016 0 1 23472 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -17 18.2345 20000017 0 1 23473 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -18 19.2345 20000018 0 1 23474 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -19 20.2345 20000019 0 1 23475 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -20 21.2345 20000020 0 1 23476 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field -ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`), - KEY `a2_i` (`a2`), - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=MEMORY -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -ALTER TABLE test.t1 DROP INDEX a2_i; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`), - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -TRUNCATE TABLE test.t1; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - `a6` bigint(20) DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` time DEFAULT NULL, - `a9` datetime DEFAULT NULL, - `a10` tinytext, - `a11` mediumtext, - `a12` longtext, - `a13` text, - `a14` blob, - PRIMARY KEY (`a1`), - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -a6 Bigint NULL AT=FIXED ST=DISK -a7 Date NULL AT=FIXED ST=DISK -a8 Time NULL AT=FIXED ST=DISK -a9 Datetime NULL AT=FIXED ST=DISK -a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY -a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY -ALTER TABLE test.t1 DROP a14; -ALTER TABLE test.t1 DROP a13; -ALTER TABLE test.t1 DROP a12; -ALTER TABLE test.t1 DROP a11; -ALTER TABLE test.t1 DROP a10; -ALTER TABLE test.t1 DROP a9; -ALTER TABLE test.t1 DROP a8; -ALTER TABLE test.t1 DROP a7; -ALTER TABLE test.t1 DROP a6; -ALTER TABLE test.t1 DROP PRIMARY KEY; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` float DEFAULT NULL, - `a3` double DEFAULT NULL, - `a4` bit(1) DEFAULT NULL, - `a5` tinyint(4) DEFAULT NULL, - KEY `a3_i` (`a3`) -) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 Int NOT NULL AT=FIXED ST=DISK -a2 Float NULL AT=FIXED ST=DISK -a3 Double NULL AT=FIXED ST=MEMORY -a4 Bit(1) NULL AT=FIXED ST=DISK -a5 Tinyint NULL AT=FIXED ST=DISK -$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -DROP TABLE test.t1; -ALTER TABLESPACE ts -DROP DATAFILE './table_space/datafile.dat' - ENGINE NDB; -DROP TABLESPACE ts ENGINE NDB; -DROP LOGFILE GROUP lg ENGINE=NDB; diff --git a/mysql-test/r/ndb_dd_backuprestore.result b/mysql-test/r/ndb_dd_backuprestore.result deleted file mode 100644 index c82fe560121..00000000000 --- a/mysql-test/r/ndb_dd_backuprestore.result +++ /dev/null @@ -1,487 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; -**** Test 1 Simple DD backup and restore **** -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -DROP TABLE test.t1; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -**** Test 2 Mixed Cluster Test backup and restore **** -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden 500 1 -2 Sweden 499 1 -3 Sweden 498 1 -4 Sweden 497 1 -5 Sweden 496 1 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -500 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; -pk1 c2 c3 hex(c4) -1 Sweden, Texas 500 0 -2 Sweden, Texas 499 0 -3 Sweden, Texas 498 0 -4 Sweden, Texas 497 0 -5 Sweden, Texas 496 0 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; -LENGTH(data) -16384 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -100 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; -LENGTH(data) -16384 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -**** Test 3 Adding partition Test backup and restore **** -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c3) PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c3) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (c3) (PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c3) PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (pk1) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (pk1) (PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; -DROP TABLESPACE table_space1 -ENGINE = NDB; -DROP TABLESPACE table_space2 -ENGINE = NDB; -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(150) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c3) PARTITIONS 4 */ -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c3) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(202) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (c3) (PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(180) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c3) PARTITIONS 2 */ -SHOW CREATE TABLE test.t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` text NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (pk1) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ -SHOW CREATE TABLE test.t6; -Table Create Table -t6 CREATE TABLE `t6` ( - `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, - `c2` varchar(220) NOT NULL, - `c3` int(11) NOT NULL, - `c4` bit(1) NOT NULL, - PRIMARY KEY (`pk1`,`c3`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (pk1) (PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL -SELECT COUNT(*) FROM test.t1; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t2; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t3; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -SELECT COUNT(*) FROM test.t4; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas 2 0 -249 Sweden, Texas 4 0 -248 Sweden, Texas 6 0 -247 Sweden, Texas 8 0 -246 Sweden, Texas 10 0 -SELECT COUNT(*) FROM test.t5; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 -249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 -248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 -247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 -246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 -SELECT COUNT(*) FROM test.t6; -COUNT(*) -250 -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; -pk1 c2 c3 hex(c4) -250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 -249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 -248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 -247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 -246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; -DROP TABLESPACE table_space1 ENGINE = NDB; -DROP TABLESPACE table_space2 ENGINE = NDB; -DROP LOGFILE GROUP log_group1 ENGINE = NDB; diff --git a/mysql-test/r/ndb_dd_basic.result b/mysql-test/r/ndb_dd_basic.result deleted file mode 100644 index 7aeb156869b..00000000000 --- a/mysql-test/r/ndb_dd_basic.result +++ /dev/null @@ -1,510 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=MYISAM; -Warnings: -Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=XYZ; -Warnings: -Warning 1286 Unknown table engine 'XYZ' -Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M; -Warnings: -Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' -set storage_engine=ndb; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -set storage_engine=myisam; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`pk1`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; -pk1 b c -0 0 0 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); -SELECT COUNT(*) FROM t1; -COUNT(*) -501 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10y -ENGINE = NDB; -ERROR HY000: A size parameter was incorrectly specified, either number or on the form 10M -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10MB -ENGINE = NDB; -ERROR HY000: A size parameter was incorrectly specified, either number or on the form 10M -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 MB -ENGINE = NDB; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MB -ENGINE = NDB' at line 3 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 M -ENGINE = NDB; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'M -ENGINE = NDB' at line 3 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 1000000000000K -ENGINE = NDB; -ERROR HY000: The size number was correct but we don't allow the digit part to be more than 2 billion -DROP TABLE t1; -create tablespace ts2 -add datafile 'datafile2_1.dat' -use logfile group lg1 -initial_size 12M -engine ndb; -CREATE TABLE City ( -ID int(11) NOT NULL AUTO_INCREMENT, -Name char(35) NOT NULL, -CountryCode char(3) NOT NULL, -District char(20) NOT NULL, -Population int(11) NOT NULL, -PRIMARY KEY (ID) -) ENGINE=ndbcluster -tablespace ts2 -storage disk; -alter tablespace ts2 -drop datafile 'datafile2_1.dat' -engine ndb; -insert -into City (Name,CountryCode,District,Population) -values ('BeiJing','CN','Beijing',2000); -ERROR HY000: Got error 1602 'No datafile in tablespace' from NDBCLUSTER -drop tablespace ts2 -engine ndb; -ERROR HY000: Failed to drop TABLESPACE -drop table City; -drop tablespace ts2 -engine ndb; -CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; -INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 1 -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 2 -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 2 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 3 2 -2 2 2 -3 3 3 -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 3 -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 3 -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 4 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 4 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 5 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 6 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '7'WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 4 -2 2 2 -3 3 3 -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 5 -2 2 2 -3 3 3 -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 6 -2 2 2 -3 3 3 -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 7 -2 2 2 -3 3 3 -DROP TABLE t1; -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB; -INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 1 -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -2 -SELECT * FROM t1 WHERE a = 1; -a b c -1 2 2 -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 2 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 3 2 -2 2 2 -3 3 3 -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -3 -SELECT * FROM t1 WHERE a = 1; -a b c -1 3 3 -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 3 -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -b -4 -SELECT * FROM t1 WHERE a = 1; -a b c -1 4 4 -COMMIT; -SELECT * FROM t1 ORDER BY 1; -a b c -1 4 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 5 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 6 4 -2 2 2 -3 3 3 -UPDATE t1 SET b = '7' WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 4 -2 2 2 -3 3 3 -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 5 -2 2 2 -3 3 3 -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 6 -2 2 2 -3 3 3 -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -a b c -1 7 7 -2 2 2 -3 3 3 -DROP TABLE t1; -CREATE TABLE t1 ( -a INT NOT NULL PRIMARY KEY, -b TEXT NOT NULL -) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -INSERT INTO t1 VALUES(1,@b1); -INSERT INTO t1 VALUES(2,@b2); -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1; -a length(b) substr(b,1+2*900,2) -1 2256 b1 -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2; -a length(b) substr(b,1+2*9000,2) -2 20000 b2 -UPDATE t1 SET b=@b2 WHERE a=1; -UPDATE t1 SET b=@b1 WHERE a=2; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1; -a length(b) substr(b,1+2*9000,2) -1 20000 b2 -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2; -a length(b) substr(b,1+2*900,2) -2 2256 b1 -UPDATE t1 SET b=concat(b,b) WHERE a=1; -UPDATE t1 SET b=concat(b,b) WHERE a=2; -SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1; -a length(b) substr(b,1+4*9000,2) -1 40000 b2 -SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2; -a length(b) substr(b,1+4*900,2) -2 4512 b1 -DELETE FROM t1 WHERE a=1; -DELETE FROM t1 WHERE a=2; -SELECT COUNT(*) FROM t1; -COUNT(*) -0 -DROP TABLE t1; -CREATE TABLE t1 ( -a int NOT NULL, -b varchar(4000), -- must use 2 pages undo -PRIMARY KEY using hash (a) -) -TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; -set autocommit = 0; -insert into t1 values(0,'x'); -insert into t1 values(1,'x'); -insert into t1 values(2,'x'); -insert into t1 values(3,'x'); -insert into t1 values(4,'x'); -insert into t1 values(5,'x'); -insert into t1 values(6,'x'); -insert into t1 values(7,'x'); -insert into t1 values(8,'x'); -delete from t1 where a = 0; -commit; -delete from t1; -begin; -insert into t1 values (1, 'x'); -select * from t1; -a b -1 x -rollback; -set autocommit = 1; -drop table t1; -create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) -TABLESPACE ts1 STORAGE DISK engine=NDB; -insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into test.t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from test.t1 order by f1; -f1 f2 f3 -111111 aaaaaa 1 -222222 bbbbbb 2 -select f1,f2 from test.t1 order by f2; -f1 f2 -111111 aaaaaa -222222 bbbbbb -select f2 from test.t1 order by f2; -f2 -aaaaaa -bbbbbb -select f1,f2 from test.t1 order by f1; -f1 f2 -111111 aaaaaa -222222 bbbbbb -drop table test.t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 -ENGINE = NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; diff --git a/mysql-test/r/ndb_dd_ddl.result b/mysql-test/r/ndb_dd_ddl.result deleted file mode 100644 index 67857d39ab6..00000000000 --- a/mysql-test/r/ndb_dd_ddl.result +++ /dev/null @@ -1,240 +0,0 @@ -DROP TABLE IF EXISTS t1; -DROP DATABASE IF EXISTS mysqltest; -CREATE DATABASE mysqltest; -**** Begin Duplicate Statement Testing **** -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'undofile2.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; -ERROR HY000: Failed to create LOGFILE GROUP -SHOW WARNINGS; -Level Code Message -Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB -Error 1516 Failed to create LOGFILE GROUP -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ERROR HY000: Failed to create LOGFILE GROUP -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE=NDB; -ERROR HY000: Failed to alter: CREATE UNDOFILE -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -ERROR HY000: Failed to create TABLESPACE -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; -ERROR HY000: Failed to alter: CREATE DATAFILE -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -ERROR 42S01: Table 't1' already exists -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -ENGINE=NDB; -ERROR 42S01: Table 't1' already exists -DROP TABLE mysqltest.t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -DROP TABLESPACE ts1 -ENGINE=NDB; -DROP TABLESPACE ts1 -ENGINE=NDB; -ERROR HY000: Failed to drop TABLESPACE -DROP LOGFILE GROUP lg1 -ENGINE=NDB; -DROP LOGFILE GROUP lg1 -ENGINE=NDB; -ERROR HY000: Failed to drop LOGFILE GROUP -DROP DATABASE IF EXISTS mysqltest; -**** End Duplicate Statement Testing **** - -**** Begin Statment CaSe Testing **** -creaTE LOgfilE GrOuP lg1 -adD undoFILE 'undofile.dat' -initiAL_siZE 1M -UnDo_BuFfEr_SiZe = 1M -ENGInE=NDb; -altER LOgFiLE GrOUp lg1 -AdD UnDOfILe 'uNdOfiLe02.daT' -INItIAl_SIzE 1M ENgINE nDB; -CrEAtE TABLEspaCE ts1 -ADD DATAfilE 'datafile.dat' -UsE LoGFiLE GRoUP lg1 -INITiaL_SizE 1M -ENGiNe NDb; -AlTeR tAbLeSpAcE ts1 -AdD DaTaFiLe 'dAtAfiLe2.daT' -InItIaL_SiZe 1M -EnGiNe=NDB; -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -TABLEspace ts1 storAGE dISk -ENGine nDb; -DROP TABLE t1; -AlteR TAblespaCE ts1 -droP DATAfile 'dAtAfiLe2.daT' -ENGINE=NDB; -ALter tablesPACE ts1 -dROp dAtAfIlE 'datafile.dat' -ENGine=Ndb; -DrOp TaBleSpAcE ts1 -engINE=ndB; -DrOp lOgFiLe GrOuP lg1 -EnGiNe=nDb; -**** End Statment CaSe Testing **** - -**** Begin = And No = Testing **** -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE=1M -UNDO_BUFFER_SIZE=1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE=1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE=1M -ENGINE=NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE=1M -ENGINE=NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -DROP TABLE t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 -ENGINE=NDB; -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - -**** End of = **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE MEMORY -ENGINE NDB; -ERROR HY000: Can't create table 'test.t1' (errno: 138) -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE NDB; -CREATE INDEX b_i on t1(b); -CREATE INDEX bc_i on t1(b, c); -DROP TABLE t1; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile3.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; -ERROR HY000: Failed to alter: NO SUCH FILE -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -DROP TABLESPACE ts1 -ENGINE NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; -DROP TABLESPACE ts2 -ENGINE NDB; -DROP LOGFILE GROUP lg1 -ENGINE NDB; -**** End = And No = **** -create table t1 (a int primary key) engine = myisam; -create logfile group lg1 add undofile 'MYSQLTEST_VARDIR/master-data/test/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;; -ERROR HY000: Failed to create UNDOFILE -create logfile group lg1 -add undofile 'undofile.dat' -initial_size 1M -undo_buffer_size = 1M -engine=ndb; -create tablespace ts1 add datafile 'MYSQLTEST_VARDIR/master-data/test/t1.frm' use logfile group lg1 initial_size 1M engine ndb;; -ERROR HY000: Failed to create DATAFILE -drop tablespace ts1 -engine ndb; -ERROR HY000: Failed to drop TABLESPACE -drop logfile group lg1 -engine ndb; -drop table t1; diff --git a/mysql-test/r/ndb_dd_disk2memory.result b/mysql-test/r/ndb_dd_disk2memory.result deleted file mode 100644 index 46661f36d1b..00000000000 --- a/mysql-test/r/ndb_dd_disk2memory.result +++ /dev/null @@ -1,505 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -**** Test Setup Section **** -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE test.t2 -(pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL) -ENGINE=NDB; - -**** Data load for first test **** -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); -INSERT INTO test.t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - -*** Test 1 Section Begins *** -SELECT COUNT(*) FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -COUNT(*) -1 -SELECT * FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -pk2 b2 c2 pk1 b c -4 4 4 4 4 4 -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 WHERE b IN (4); -COUNT(*) -1 -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2 WHERE pk1 IN (75); -COUNT(*) -1 -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; -b c -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -11 11 -12 12 -13 13 -14 14 -15 15 -16 16 -17 17 -18 18 -19 19 -20 20 -21 21 -22 22 -23 23 -24 24 -25 25 -26 26 -27 27 -28 28 -29 29 -30 30 -31 31 -32 32 -33 33 -34 34 -35 35 -36 36 -37 37 -38 38 -39 39 -40 40 -41 41 -42 42 -43 43 -44 44 -45 45 -46 46 -47 47 -48 48 -49 49 -50 50 -51 51 -52 52 -53 53 -54 54 -55 55 -56 56 -57 57 -58 58 -59 59 -60 60 -61 61 -62 62 -63 63 -64 64 -65 65 -66 66 -67 67 -68 68 -69 69 -70 70 -71 71 -72 72 -73 73 -74 74 -75 75 - -*** Setup for test 2 **** -DELETE FROM test.t1; -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45); - -**** Test Section 2 **** -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; -b c -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -8 8 -9 9 -10 10 -11 11 -12 12 -13 13 -14 14 -15 15 -16 16 -17 17 -18 18 -19 19 -20 20 -21 21 -22 22 -23 23 -24 24 -25 25 -26 26 -27 27 -28 28 -29 29 -30 30 -31 31 -32 32 -33 33 -34 34 -35 35 -36 36 -37 37 -38 38 -39 39 -40 40 -41 41 -42 42 -43 43 -44 44 -45 45 -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2; -COUNT(*) -45 -SELECT COUNT(*) FROM test.t1 RIGHT JOIN test.t2 ON b=b2; -COUNT(*) -75 -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk2` int(11) NOT NULL, - `b2` int(11) NOT NULL, - `c2` int(11) NOT NULL, - PRIMARY KEY (`pk2`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`pk1`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `pk2` int(11) NOT NULL, - `b2` int(11) NOT NULL, - `c2` int(11) NOT NULL, - PRIMARY KEY (`pk2`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -ALTER TABLE test.t1 STORAGE MEMORY ENGINE=NDBCLUSTER; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `pk1` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`pk1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 - -DROP TABLE test.t1; -DROP TABLE test.t2; -*** Setup for Test Section 3 *** -CREATE TABLE test.t1 ( -usr_id INT unsigned NOT NULL, -uniq_id INT unsigned NOT NULL AUTO_INCREMENT, -start_num INT unsigned NOT NULL DEFAULT 1, -increment INT unsigned NOT NULL DEFAULT 1, -PRIMARY KEY (uniq_id), -INDEX usr_uniq_idx (usr_id, uniq_id), -INDEX uniq_usr_idx (uniq_id, usr_id)) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE test.t2 ( -id INT unsigned NOT NULL DEFAULT 0, -usr2_id INT unsigned NOT NULL DEFAULT 0, -max INT unsigned NOT NULL DEFAULT 0, -c_amount INT unsigned NOT NULL DEFAULT 0, -d_max INT unsigned NOT NULL DEFAULT 0, -d_num INT unsigned NOT NULL DEFAULT 0, -orig_time INT unsigned NOT NULL DEFAULT 0, -c_time INT unsigned NOT NULL DEFAULT 0, -active ENUM ("no","yes") NOT NULL, -PRIMARY KEY (id,usr2_id), -INDEX id_idx (id), -INDEX usr2_idx (usr2_id)) -ENGINE=NDB; -INSERT INTO test.t1 VALUES (3,NULL,0,50),(3,NULL,0,200),(3,NULL,0,25),(3,NULL,0,84676),(3,NULL,0,235),(3,NULL,0,10),(3,NULL,0,3098),(3,NULL,0,2947),(3,NULL,0,8987),(3,NULL,0,8347654),(3,NULL,0,20398),(3,NULL,0,8976),(3,NULL,0,500),(3,NULL,0,198); - -**** Test Section 3 **** -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; -usr_id uniq_id increment usr2_id c_amount max -3 4 84676 NULL NULL NULL -INSERT INTO test.t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (4,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes'); -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; -usr_id uniq_id increment usr2_id c_amount max -3 4 84676 3 6000 3000 - -DROP TABLE test.t1; -DROP TABLE test.t2; -CREATE TABLE test.t1 ( -a1 smallint NOT NULL, -a2 int NOT NULL, -a3 bigint NOT NULL, -a4 char(10), -a5 decimal(5,1), -a6 time, -a7 date, -a8 datetime, -a9 VARCHAR(255), -a10 blob, -PRIMARY KEY(a1) -) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 ( -b1 smallint NOT NULL, -b2 int NOT NULL, -b3 bigint NOT NULL, -b4 char(10), -b5 decimal(5,1), -b6 time, -b7 date, -b8 datetime, -b9 VARCHAR(255), -b10 blob, -PRIMARY KEY(b1) -) ENGINE=NDB; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` smallint(6) NOT NULL, - `a2` int(11) NOT NULL, - `a3` bigint(20) NOT NULL, - `a4` char(10) DEFAULT NULL, - `a5` decimal(5,1) DEFAULT NULL, - `a6` time DEFAULT NULL, - `a7` date DEFAULT NULL, - `a8` datetime DEFAULT NULL, - `a9` varchar(255) DEFAULT NULL, - `a10` blob, - PRIMARY KEY (`a1`), - KEY `a2` (`a2`), - KEY `a3` (`a3`), - KEY `a8` (`a8`) -) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -Table Create Table -t2 CREATE TABLE `t2` ( - `b1` smallint(6) NOT NULL, - `b2` int(11) NOT NULL, - `b3` bigint(20) NOT NULL, - `b4` char(10) DEFAULT NULL, - `b5` decimal(5,1) DEFAULT NULL, - `b6` time DEFAULT NULL, - `b7` date DEFAULT NULL, - `b8` datetime DEFAULT NULL, - `b9` varchar(255) DEFAULT NULL, - `b10` blob, - PRIMARY KEY (`b1`), - KEY `b2` (`b2`), - KEY `b3` (`b3`), - KEY `b8` (`b8`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 -3 4 3000000001 aaa1 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data -4 5 3000000002 aaa2 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data -5 6 3000000003 aaa3 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data -6 7 3000000004 aaa4 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data -7 8 3000000005 aaa5 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data -8 9 3000000006 aaa6 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data -9 10 3000000007 aaa7 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data -10 11 3000000008 aaa8 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data -11 12 3000000009 aaa9 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data -12 13 3000000010 aaa10 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data -13 14 3000000011 aaa11 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data -14 15 3000000012 aaa12 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data -15 16 3000000013 aaa13 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data -16 17 3000000014 aaa14 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data -17 18 3000000015 aaa15 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data -18 19 3000000016 aaa16 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data -19 20 3000000017 aaa17 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data -20 21 3000000018 aaa18 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data -21 22 3000000019 aaa19 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data -22 23 3000000020 aaa20 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data -COUNT(a1) a1 COUNT(a1)*a1 -1 1 1 -1 2 2 -1 3 3 -1 4 4 -1 5 5 -1 6 6 -1 7 7 -1 8 8 -1 9 9 -1 10 10 -1 11 11 -1 12 12 -1 13 13 -1 14 14 -1 15 15 -1 16 16 -1 17 17 -1 18 18 -1 19 19 -1 20 20 -COUNT(a2) (a2+1) COUNT(a2)*(a2+0) -1 3 2 -1 4 3 -1 5 4 -1 6 5 -1 7 6 -1 8 7 -1 9 8 -1 10 9 -1 11 10 -1 12 11 -1 13 12 -1 14 13 -1 15 14 -1 16 15 -1 17 16 -1 18 17 -1 19 18 -1 20 19 -1 21 20 -1 22 21 -a -8 -7 -6 -5 -a c -8 Clavin -7 Serge -6 Jeb -5 Stewart -4 Martin -3 Pekka -a -2 -3 -4 -5 -6 -7 -8 -a c -4 Martin -5 Stewart -6 Jeb -7 Serge -8 Clavin -a -1 -1 -1 -2 -2 -3 -3 -a -3 -2 -1 -a -3 -2 -1 -a -1 -2 -3 -email shipcode -test1@testdomain.com Z001 -test2@testdomain.com R002 -test2@testdomain.com Z001 -test3@testdomain.com Z001 -email -test1@testdomain.com -test2@testdomain.com -test3@testdomain.com -email shipcode -test1@testdomain.com Z001 -test2@testdomain.com Z001 -test2@testdomain.com R002 -test3@testdomain.com Z001 diff --git a/mysql-test/r/ndb_dd_dump.result b/mysql-test/r/ndb_dd_dump.result deleted file mode 100644 index 9b1a1295588..00000000000 --- a/mysql-test/r/ndb_dd_dump.result +++ /dev/null @@ -1,218 +0,0 @@ -DROP TABLE IF EXISTS t1, t2, t3; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_01.dat' -INITIAL_SIZE 2M -UNDO_BUFFER_SIZE = 1M -ENGINE NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_02.dat' -INITIAL_SIZE = 4M -ENGINE NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_01.dat' -USE LOGFILE GROUP lg1 -EXTENT_SIZE 1M -INITIAL_SIZE 2M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_02.dat' -INITIAL_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile_ts2_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 2M -ENGINE NDB; -CREATE TABLESPACE ts3 -ADD DATAFILE 'datafile_ts3_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 4M -ENGINE NDB; -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE t2 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDB; -CREATE TABLE t3 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts3 STORAGE DISK -ENGINE=NDB; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); -INSERT INTO t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); -INSERT INTO t3 VALUES -(1,1,1); -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; -DROP LOGFILE GROUP lg1 ENGINE = NDB; -SELECT DISTINCT -LOGFILE_GROUP_NAME, -FILE_NAME, -TOTAL_EXTENTS, -INITIAL_SIZE, -ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME; -LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE -lg1 NULL NULL NULL ndbcluster -lg1 undofile_lg1_01.dat 524288 2097152 ndbcluster -lg1 undofile_lg1_02.dat 1048576 4194304 ndbcluster -SELECT DISTINCT -TABLESPACE_NAME, -LOGFILE_GROUP_NAME, -FILE_NAME, -EXTENT_SIZE, -INITIAL_SIZE, -ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME; -TABLESPACE_NAME LOGFILE_GROUP_NAME FILE_NAME EXTENT_SIZE INITIAL_SIZE ENGINE -ts1 lg1 datafile_ts1_01.dat 1048576 2097152 ndbcluster -ts1 lg1 datafile_ts1_02.dat 1048576 1048576 ndbcluster -ts2 lg1 datafile_ts2_01.dat 1048576 2097152 ndbcluster -ts3 lg1 datafile_ts3_01.dat 1048576 4194304 ndbcluster -SELECT COUNT(*) FROM t1; -COUNT(*) -500 -SELECT COUNT(*) FROM t2; -COUNT(*) -5 -SELECT COUNT(*) FROM t3; -COUNT(*) -1 -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; -DROP LOGFILE GROUP lg1 ENGINE = NDB; diff --git a/mysql-test/r/ndb_dd_sql_features.result b/mysql-test/r/ndb_dd_sql_features.result deleted file mode 100644 index 135250fe7e8..00000000000 --- a/mysql-test/r/ndb_dd_sql_features.result +++ /dev/null @@ -1,599 +0,0 @@ -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -***** -**** Copy data from table in one table space to table -**** in different table space -***** -CREATE LOGFILE GROUP lg -ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE './table_space1/datafile.dat' - USE LOGFILE GROUP lg -INITIAL_SIZE 25M -ENGINE NDB; -CREATE TABLESPACE ts2 -ADD DATAFILE './table_space2/datafile.dat' - USE LOGFILE GROUP lg -INITIAL_SIZE 20M -ENGINE NDB; -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts2 STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` varchar(256) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a1` int(11) NOT NULL, - `a2` varchar(256) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO test.t1 VALUES (1,'111111','aaaaaaaa'); -INSERT INTO test.t1 VALUES (2,'222222','bbbbbbbb'); -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 111111 aaaaaaaa -2 222222 bbbbbbbb -INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; -SELECT * FROM test.t2 ORDER BY a1; -a1 a2 a3 -1 111111 aaaaaaaa -2 222222 bbbbbbbb -DROP TABLE test.t1, test.t2; -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -select length(@x0),length(@b1),length(@d1) from dual; -length(@x0) length(@b1) length(@d1) -256 2256 3000 -select length(@x0),length(@b2),length(@d2) from dual; -length(@x0) length(@b2) length(@d2) -256 20000 30000 -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) -TABLESPACE ts2 STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a1` int(11) NOT NULL, - `a2` varchar(5000) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW CREATE TABLE test.t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a1` int(11) NOT NULL, - `a2` varchar(5000) DEFAULT NULL, - `a3` blob, - PRIMARY KEY (`a1`) -) /*!50100 TABLESPACE ts2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -INSERT INTO test.t1 VALUES (1,@vc1,@d1); -INSERT INTO test.t1 VALUES (2,@vc2,@b1); -INSERT INTO test.t1 VALUES (3,@vc3,@d2); -INSERT INTO test.t1 VALUES (4,@vc4,@b2); -SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) -FROM test.t1 WHERE a1=1; -a1 length(a2) substr(a2,180,2) length(a3) substr(a3,1+3*900,3) -1 200 aa 3000 dd1 -SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) -FROM test.t1 where a1=2; -a1 length(a2) substr(a2,480,2) length(a3) substr(a3,1+2*900,3) -2 500 bb 2256 b1b -INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; -SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) -FROM test.t2 WHERE a1=1; -a1 length(a2) substr(a2,180,2) length(a3) substr(a3,1+3*900,3) -1 200 aa 3000 dd1 -SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) -FROM test.t2 where a1=2; -a1 length(a2) substr(a2,480,2) length(a3) substr(a3,1+2*900,3) -2 500 bb 2256 b1b -DROP TABLE test.t1, test.t2; -***** -**** Insert, Update, Delete from NDB table with BLOB fields -***** -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); -set @vc5 = repeat('d', 5000); -set @bb1 = repeat('1', 2000); -set @bb2 = repeat('2', 5000); -set @bb3 = repeat('3', 10000); -set @bb4 = repeat('4', 40000); -set @bb5 = repeat('5', 50000); -select length(@vc1),length(@vc2),length(@vc3),length(@vc4),length(@vc5) -from dual; -length(@vc1) length(@vc2) length(@vc3) length(@vc4) length(@vc5) -200 500 1000 4000 5000 -select length(@bb1),length(@bb2),length(@bb3),length(@bb4),length(@bb5) -from dual; -length(@bb1) length(@bb2) length(@bb3) length(@bb4) length(@bb5) -2000 5000 10000 40000 50000 -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -INSERT INTO test.t1 VALUES (1,@vc1,@bb1); -INSERT INTO test.t1 VALUES (2,@vc2,@bb2); -INSERT INTO test.t1 VALUES (3,@vc3,@bb3); -INSERT INTO test.t1 VALUES (4,@vc4,@bb4); -INSERT INTO test.t1 VALUES (5,@vc5,@bb5); -UPDATE test.t1 SET a2=@vc5, a3=@bb5 WHERE a1=1; -SELECT a1,length(a2),substr(a2,4998,2),length(a3),substr(a3,49997,3) -FROM test.t1 WHERE a1=1; -a1 length(a2) substr(a2,4998,2) length(a3) substr(a3,49997,3) -1 5000 dd 50000 555 -UPDATE test.t1 SET a2=@vc4, a3=@bb4 WHERE a1=2; -SELECT a1,length(a2),substr(a2,3998,2),length(a3),substr(a3,39997,3) -FROM test.t1 WHERE a1=2; -a1 length(a2) substr(a2,3998,2) length(a3) substr(a3,39997,3) -2 4000 dd 40000 444 -UPDATE test.t1 SET a2=@vc2, a3=@bb2 WHERE a1=3; -SELECT a1,length(a2),substr(a2,498,2),length(a3),substr(a3,3997,3) -FROM test.t1 WHERE a1=3; -a1 length(a2) substr(a2,498,2) length(a3) substr(a3,3997,3) -3 500 bb 5000 222 -UPDATE test.t1 SET a2=@vc3, a3=@bb3 WHERE a1=4; -SELECT a1,length(a2),substr(a2,998,2),length(a3),substr(a3,9997,3) -FROM test.t1 WHERE a1=4; -a1 length(a2) substr(a2,998,2) length(a3) substr(a3,9997,3) -4 1000 cc 10000 333 -UPDATE test.t1 SET a2=@vc1, a3=@bb1 WHERE a1=5; -SELECT a1,length(a2),substr(a2,198,2),length(a3),substr(a3,1997,3) -FROM test.t1 WHERE a1=5; -a1 length(a2) substr(a2,198,2) length(a3) substr(a3,1997,3) -5 200 aa 2000 111 -DELETE FROM test.t1 where a1=5; -SELECT count(*) from test.t1; -count(*) -4 -DELETE FROM test.t1 where a1=4; -SELECT count(*) from test.t1; -count(*) -3 -DELETE FROM test.t1 where a1=3; -SELECT count(*) from test.t1; -count(*) -2 -DELETE FROM test.t1 where a1=2; -SELECT count(*) from test.t1; -count(*) -1 -DELETE FROM test.t1 where a1=1; -SELECT count(*) from test.t1; -count(*) -0 -DROP TABLE test.t1; -***** -**** Create Stored procedures that use disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB// -CREATE PROCEDURE test.sp1() -BEGIN -INSERT INTO test.t1 values (1,'111111','aaaaaaaa'); -END// -CALL test.sp1(); -SELECT * FROM test.t1; -a1 a2 a3 -1 111111 aaaaaaaa -CREATE PROCEDURE test.sp2(n INT, vc VARCHAR(256), blb BLOB) -BEGIN -UPDATE test.t1 SET a2=vc, a3=blb where a1=n; -END// -CALL test.sp2(1,'222222','bbbbbbbb'); -SELECT * FROM test.t1; -a1 a2 a3 -1 222222 bbbbbbbb -DELETE FROM test.t1; -DROP PROCEDURE test.sp1; -DROP PROCEDURE test.sp2; -DROP TABLE test.t1; -***** -***** Create function that operate on disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE FUNCTION test.fn1(n INT) RETURNS INT -BEGIN -DECLARE v INT; -SELECT a1 INTO v FROM test.t1 WHERE a1=n; -RETURN v; -END// -CREATE FUNCTION test.fn2(n INT, blb BLOB) RETURNS BLOB -BEGIN -DECLARE vv BLOB; -UPDATE test.t1 SET a3=blb where a1=n; -SELECT a3 INTO vv FROM test.t1 WHERE a1=n; -RETURN vv; -END// -SELECT test.fn1(10) FROM DUAL; -test.fn1(10) -10 -SELECT test.fn2(50, 'new BLOB content') FROM DUAL; -test.fn2(50, 'new BLOB content') -new BLOB content -DELETE FROM test.t1; -DROP FUNCTION test.fn1; -DROP FUNCTION test.fn2; -DROP TABLE test.t1; -***** -***** Create triggers that operate on disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE TRIGGER test.trg1 BEFORE INSERT ON test.t1 FOR EACH ROW -BEGIN -if isnull(new.a2) then -set new.a2:= 'trg1 works on a2 field'; -end if; -if isnull(new.a3) then -set new.a3:= 'trg1 works on a3 field'; -end if; -end// -insert into test.t1 (a1) values (1)// -insert into test.t1 (a1,a2) values (2, 'ccccccc')// -select * from test.t1 order by a1// -a1 a2 a3 -1 trg1 works on a2 field trg1 works on a3 field -2 ccccccc trg1 works on a3 field -DELETE FROM test.t1; -DROP TRIGGER test.trg1; -DROP TABLE test.t1; -***** -***** Create, update views that operate on disk based tables -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -CREATE VIEW test.v1 AS SELECT * FROM test.t1; -SELECT * FROM test.v1 order by a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -3 aaaaa3 bbbbb3 -4 aaaaa4 bbbbb4 -5 aaaaa5 bbbbb5 -6 aaaaa6 bbbbb6 -7 aaaaa7 bbbbb7 -8 aaaaa8 bbbbb8 -9 aaaaa9 bbbbb9 -10 aaaaa10 bbbbb10 -CHECK TABLE test.v1, test.t1; -Table Op Msg_type Msg_text -test.v1 check status OK -test.t1 check note The storage engine for the table doesn't support check -UPDATE test.v1 SET a2='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' WHERE a1=5; -SELECT * FROM test.v1 order by a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -3 aaaaa3 bbbbb3 -4 aaaaa4 bbbbb4 -5 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz bbbbb5 -6 aaaaa6 bbbbb6 -7 aaaaa7 bbbbb7 -8 aaaaa8 bbbbb8 -9 aaaaa9 bbbbb9 -10 aaaaa10 bbbbb10 -DROP VIEW test.v1; -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create and use disk based table that use auto inc -***** -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa10 bbbbb10 -2 aaaaa9 bbbbb9 -3 aaaaa8 bbbbb8 -4 aaaaa7 bbbbb7 -5 aaaaa6 bbbbb6 -6 aaaaa5 bbbbb5 -7 aaaaa4 bbbbb4 -8 aaaaa3 bbbbb3 -9 aaaaa2 bbbbb2 -10 aaaaa1 bbbbb1 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create test that use transaction (commit, rollback) -***** -SET AUTOCOMMIT=0; -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); -COMMIT; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); -ROLLBACK; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -DELETE FROM test.t1; -DROP TABLE test.t1; -SET AUTOCOMMIT=1; -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -START TRANSACTION; -INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); -COMMIT; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -START TRANSACTION; -INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); -ROLLBACK; -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create test that uses locks -***** -drop table if exists test.t1; -CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a2 VARCHAR(256), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -LOCK TABLES test.t1 write; -INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); -INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); -UNLOCK TABLES; -INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); -SELECT * FROM test.t1 ORDER BY a1; -a1 a2 a3 -1 aaaaa1 bbbbb1 -2 aaaaa2 bbbbb2 -3 aaaaa3 bbbbb3 -4 aaaaa3 bbbbb3 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create large disk base table, do random queries, check cache hits -***** -set @vc1 = repeat('a', 200); -SELECT @vc1 FROM DUAL; -@vc1 -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -set @vc2 = repeat('b', 500); -set @vc3 = repeat('b', 998); -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -select length(@x0),length(@b1),length(@d1) from dual; -length(@x0) length(@b1) length(@d1) -256 2256 3000 -select length(@x0),length(@b2),length(@d2) from dual; -length(@x0) length(@b2) length(@d2) -256 20000 30000 -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(1000), a3 BLOB) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -INSERT INTO test.t1 values(1,@vc1,@d1); -INSERT INTO test.t1 values(2,@vc2,@d2); -explain SELECT * from test.t1 WHERE a1 = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const PRIMARY PRIMARY 4 const # -SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) -FROM test.t1 WHERE a1=1 ORDER BY a1; -a1 length(a2) substr(a2,1+2*900,2) length(a3) substr(a3,1+3*900,3) -1 200 3000 dd1 -SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) -FROM test.t1 where a1=2 ORDER BY a1; -a1 length(a2) substr(a2,1+2*9000,2) length(a3) substr(a3,1+3*9000,3) -2 500 30000 dd2 -UPDATE test.t1 set a2=@vc2,a3=@d2 where a1=1; -UPDATE test.t1 set a2=@vc1,a3=@d1 where a1=2; -SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) -FROM test.t1 where a1=1; -a1 length(a2) substr(a2,1+2*9000,2) length(a3) substr(a3,1+3*9000,3) -1 500 30000 dd2 -SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) -FROM test.t1 where a1=2; -a1 length(a2) substr(a2,1+2*900,2) length(a3) substr(a3,1+3*900,3) -2 200 3000 dd1 -DELETE FROM test.t1; -DROP TABLE test.t1; -***** -***** Create test that uses COUNT(), SUM(), MAX(), MIN(), NOW(), -***** USER(), TRUNCATE -***** -CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), -a3 BLOB, a4 DATE, a5 CHAR(250)) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -SELECT COUNT(*) from test.t1; -COUNT(*) -100 -SELECT SUM(a1) from test.t1; -SUM(a1) -5050 -SELECT MIN(a1) from test.t1; -MIN(a1) -1 -SELECT MAX(a1) from test.t1; -MAX(a1) -100 -SELECT a5 from test.t1 where a1=50; -a5 -root@localhost -SELECT * from test.t1 order by a1; -a1 a2 a3 a4 a5 -1 aaaaaaaaaaaaaaaa1 bbbbbbbbbbbbbbbbbb1 2006-06-20 root@localhost -2 aaaaaaaaaaaaaaaa2 bbbbbbbbbbbbbbbbbb2 2006-06-20 root@localhost -3 aaaaaaaaaaaaaaaa3 bbbbbbbbbbbbbbbbbb3 2006-06-20 root@localhost -4 aaaaaaaaaaaaaaaa4 bbbbbbbbbbbbbbbbbb4 2006-06-20 root@localhost -5 aaaaaaaaaaaaaaaa5 bbbbbbbbbbbbbbbbbb5 2006-06-20 root@localhost -6 aaaaaaaaaaaaaaaa6 bbbbbbbbbbbbbbbbbb6 2006-06-20 root@localhost -7 aaaaaaaaaaaaaaaa7 bbbbbbbbbbbbbbbbbb7 2006-06-20 root@localhost -8 aaaaaaaaaaaaaaaa8 bbbbbbbbbbbbbbbbbb8 2006-06-20 root@localhost -9 aaaaaaaaaaaaaaaa9 bbbbbbbbbbbbbbbbbb9 2006-06-20 root@localhost -10 aaaaaaaaaaaaaaaa10 bbbbbbbbbbbbbbbbbb10 2006-06-20 root@localhost -11 aaaaaaaaaaaaaaaa11 bbbbbbbbbbbbbbbbbb11 2006-06-20 root@localhost -12 aaaaaaaaaaaaaaaa12 bbbbbbbbbbbbbbbbbb12 2006-06-20 root@localhost -13 aaaaaaaaaaaaaaaa13 bbbbbbbbbbbbbbbbbb13 2006-06-20 root@localhost -14 aaaaaaaaaaaaaaaa14 bbbbbbbbbbbbbbbbbb14 2006-06-20 root@localhost -15 aaaaaaaaaaaaaaaa15 bbbbbbbbbbbbbbbbbb15 2006-06-20 root@localhost -16 aaaaaaaaaaaaaaaa16 bbbbbbbbbbbbbbbbbb16 2006-06-20 root@localhost -17 aaaaaaaaaaaaaaaa17 bbbbbbbbbbbbbbbbbb17 2006-06-20 root@localhost -18 aaaaaaaaaaaaaaaa18 bbbbbbbbbbbbbbbbbb18 2006-06-20 root@localhost -19 aaaaaaaaaaaaaaaa19 bbbbbbbbbbbbbbbbbb19 2006-06-20 root@localhost -20 aaaaaaaaaaaaaaaa20 bbbbbbbbbbbbbbbbbb20 2006-06-20 root@localhost -21 aaaaaaaaaaaaaaaa21 bbbbbbbbbbbbbbbbbb21 2006-06-20 root@localhost -22 aaaaaaaaaaaaaaaa22 bbbbbbbbbbbbbbbbbb22 2006-06-20 root@localhost -23 aaaaaaaaaaaaaaaa23 bbbbbbbbbbbbbbbbbb23 2006-06-20 root@localhost -24 aaaaaaaaaaaaaaaa24 bbbbbbbbbbbbbbbbbb24 2006-06-20 root@localhost -25 aaaaaaaaaaaaaaaa25 bbbbbbbbbbbbbbbbbb25 2006-06-20 root@localhost -26 aaaaaaaaaaaaaaaa26 bbbbbbbbbbbbbbbbbb26 2006-06-20 root@localhost -27 aaaaaaaaaaaaaaaa27 bbbbbbbbbbbbbbbbbb27 2006-06-20 root@localhost -28 aaaaaaaaaaaaaaaa28 bbbbbbbbbbbbbbbbbb28 2006-06-20 root@localhost -29 aaaaaaaaaaaaaaaa29 bbbbbbbbbbbbbbbbbb29 2006-06-20 root@localhost -30 aaaaaaaaaaaaaaaa30 bbbbbbbbbbbbbbbbbb30 2006-06-20 root@localhost -31 aaaaaaaaaaaaaaaa31 bbbbbbbbbbbbbbbbbb31 2006-06-20 root@localhost -32 aaaaaaaaaaaaaaaa32 bbbbbbbbbbbbbbbbbb32 2006-06-20 root@localhost -33 aaaaaaaaaaaaaaaa33 bbbbbbbbbbbbbbbbbb33 2006-06-20 root@localhost -34 aaaaaaaaaaaaaaaa34 bbbbbbbbbbbbbbbbbb34 2006-06-20 root@localhost -35 aaaaaaaaaaaaaaaa35 bbbbbbbbbbbbbbbbbb35 2006-06-20 root@localhost -36 aaaaaaaaaaaaaaaa36 bbbbbbbbbbbbbbbbbb36 2006-06-20 root@localhost -37 aaaaaaaaaaaaaaaa37 bbbbbbbbbbbbbbbbbb37 2006-06-20 root@localhost -38 aaaaaaaaaaaaaaaa38 bbbbbbbbbbbbbbbbbb38 2006-06-20 root@localhost -39 aaaaaaaaaaaaaaaa39 bbbbbbbbbbbbbbbbbb39 2006-06-20 root@localhost -40 aaaaaaaaaaaaaaaa40 bbbbbbbbbbbbbbbbbb40 2006-06-20 root@localhost -41 aaaaaaaaaaaaaaaa41 bbbbbbbbbbbbbbbbbb41 2006-06-20 root@localhost -42 aaaaaaaaaaaaaaaa42 bbbbbbbbbbbbbbbbbb42 2006-06-20 root@localhost -43 aaaaaaaaaaaaaaaa43 bbbbbbbbbbbbbbbbbb43 2006-06-20 root@localhost -44 aaaaaaaaaaaaaaaa44 bbbbbbbbbbbbbbbbbb44 2006-06-20 root@localhost -45 aaaaaaaaaaaaaaaa45 bbbbbbbbbbbbbbbbbb45 2006-06-20 root@localhost -46 aaaaaaaaaaaaaaaa46 bbbbbbbbbbbbbbbbbb46 2006-06-20 root@localhost -47 aaaaaaaaaaaaaaaa47 bbbbbbbbbbbbbbbbbb47 2006-06-20 root@localhost -48 aaaaaaaaaaaaaaaa48 bbbbbbbbbbbbbbbbbb48 2006-06-20 root@localhost -49 aaaaaaaaaaaaaaaa49 bbbbbbbbbbbbbbbbbb49 2006-06-20 root@localhost -50 aaaaaaaaaaaaaaaa50 bbbbbbbbbbbbbbbbbb50 2006-06-20 root@localhost -51 aaaaaaaaaaaaaaaa51 bbbbbbbbbbbbbbbbbb51 2006-06-20 root@localhost -52 aaaaaaaaaaaaaaaa52 bbbbbbbbbbbbbbbbbb52 2006-06-20 root@localhost -53 aaaaaaaaaaaaaaaa53 bbbbbbbbbbbbbbbbbb53 2006-06-20 root@localhost -54 aaaaaaaaaaaaaaaa54 bbbbbbbbbbbbbbbbbb54 2006-06-20 root@localhost -55 aaaaaaaaaaaaaaaa55 bbbbbbbbbbbbbbbbbb55 2006-06-20 root@localhost -56 aaaaaaaaaaaaaaaa56 bbbbbbbbbbbbbbbbbb56 2006-06-20 root@localhost -57 aaaaaaaaaaaaaaaa57 bbbbbbbbbbbbbbbbbb57 2006-06-20 root@localhost -58 aaaaaaaaaaaaaaaa58 bbbbbbbbbbbbbbbbbb58 2006-06-20 root@localhost -59 aaaaaaaaaaaaaaaa59 bbbbbbbbbbbbbbbbbb59 2006-06-20 root@localhost -60 aaaaaaaaaaaaaaaa60 bbbbbbbbbbbbbbbbbb60 2006-06-20 root@localhost -61 aaaaaaaaaaaaaaaa61 bbbbbbbbbbbbbbbbbb61 2006-06-20 root@localhost -62 aaaaaaaaaaaaaaaa62 bbbbbbbbbbbbbbbbbb62 2006-06-20 root@localhost -63 aaaaaaaaaaaaaaaa63 bbbbbbbbbbbbbbbbbb63 2006-06-20 root@localhost -64 aaaaaaaaaaaaaaaa64 bbbbbbbbbbbbbbbbbb64 2006-06-20 root@localhost -65 aaaaaaaaaaaaaaaa65 bbbbbbbbbbbbbbbbbb65 2006-06-20 root@localhost -66 aaaaaaaaaaaaaaaa66 bbbbbbbbbbbbbbbbbb66 2006-06-20 root@localhost -67 aaaaaaaaaaaaaaaa67 bbbbbbbbbbbbbbbbbb67 2006-06-20 root@localhost -68 aaaaaaaaaaaaaaaa68 bbbbbbbbbbbbbbbbbb68 2006-06-20 root@localhost -69 aaaaaaaaaaaaaaaa69 bbbbbbbbbbbbbbbbbb69 2006-06-20 root@localhost -70 aaaaaaaaaaaaaaaa70 bbbbbbbbbbbbbbbbbb70 2006-06-20 root@localhost -71 aaaaaaaaaaaaaaaa71 bbbbbbbbbbbbbbbbbb71 2006-06-20 root@localhost -72 aaaaaaaaaaaaaaaa72 bbbbbbbbbbbbbbbbbb72 2006-06-20 root@localhost -73 aaaaaaaaaaaaaaaa73 bbbbbbbbbbbbbbbbbb73 2006-06-20 root@localhost -74 aaaaaaaaaaaaaaaa74 bbbbbbbbbbbbbbbbbb74 2006-06-20 root@localhost -75 aaaaaaaaaaaaaaaa75 bbbbbbbbbbbbbbbbbb75 2006-06-20 root@localhost -76 aaaaaaaaaaaaaaaa76 bbbbbbbbbbbbbbbbbb76 2006-06-20 root@localhost -77 aaaaaaaaaaaaaaaa77 bbbbbbbbbbbbbbbbbb77 2006-06-20 root@localhost -78 aaaaaaaaaaaaaaaa78 bbbbbbbbbbbbbbbbbb78 2006-06-20 root@localhost -79 aaaaaaaaaaaaaaaa79 bbbbbbbbbbbbbbbbbb79 2006-06-20 root@localhost -80 aaaaaaaaaaaaaaaa80 bbbbbbbbbbbbbbbbbb80 2006-06-20 root@localhost -81 aaaaaaaaaaaaaaaa81 bbbbbbbbbbbbbbbbbb81 2006-06-20 root@localhost -82 aaaaaaaaaaaaaaaa82 bbbbbbbbbbbbbbbbbb82 2006-06-20 root@localhost -83 aaaaaaaaaaaaaaaa83 bbbbbbbbbbbbbbbbbb83 2006-06-20 root@localhost -84 aaaaaaaaaaaaaaaa84 bbbbbbbbbbbbbbbbbb84 2006-06-20 root@localhost -85 aaaaaaaaaaaaaaaa85 bbbbbbbbbbbbbbbbbb85 2006-06-20 root@localhost -86 aaaaaaaaaaaaaaaa86 bbbbbbbbbbbbbbbbbb86 2006-06-20 root@localhost -87 aaaaaaaaaaaaaaaa87 bbbbbbbbbbbbbbbbbb87 2006-06-20 root@localhost -88 aaaaaaaaaaaaaaaa88 bbbbbbbbbbbbbbbbbb88 2006-06-20 root@localhost -89 aaaaaaaaaaaaaaaa89 bbbbbbbbbbbbbbbbbb89 2006-06-20 root@localhost -90 aaaaaaaaaaaaaaaa90 bbbbbbbbbbbbbbbbbb90 2006-06-20 root@localhost -91 aaaaaaaaaaaaaaaa91 bbbbbbbbbbbbbbbbbb91 2006-06-20 root@localhost -92 aaaaaaaaaaaaaaaa92 bbbbbbbbbbbbbbbbbb92 2006-06-20 root@localhost -93 aaaaaaaaaaaaaaaa93 bbbbbbbbbbbbbbbbbb93 2006-06-20 root@localhost -94 aaaaaaaaaaaaaaaa94 bbbbbbbbbbbbbbbbbb94 2006-06-20 root@localhost -95 aaaaaaaaaaaaaaaa95 bbbbbbbbbbbbbbbbbb95 2006-06-20 root@localhost -96 aaaaaaaaaaaaaaaa96 bbbbbbbbbbbbbbbbbb96 2006-06-20 root@localhost -97 aaaaaaaaaaaaaaaa97 bbbbbbbbbbbbbbbbbb97 2006-06-20 root@localhost -98 aaaaaaaaaaaaaaaa98 bbbbbbbbbbbbbbbbbb98 2006-06-20 root@localhost -99 aaaaaaaaaaaaaaaa99 bbbbbbbbbbbbbbbbbb99 2006-06-20 root@localhost -100 aaaaaaaaaaaaaaaa100 bbbbbbbbbbbbbbbbbb100 2006-06-20 root@localhost -DROP TABLE test.t1; -ALTER TABLESPACE ts1 -DROP DATAFILE './table_space1/datafile.dat' - ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE './table_space2/datafile.dat' - ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg -ENGINE=NDB; diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result deleted file mode 100644 index 3af7b71d72d..00000000000 --- a/mysql-test/r/ndb_gis.result +++ /dev/null @@ -1,1100 +0,0 @@ -SET storage_engine=ndbcluster; -DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); -CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); -CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); -CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); -CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); -CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); -CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); -CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); -SHOW CREATE TABLE gis_point; -Table Create Table -gis_point CREATE TABLE `gis_point` ( - `fid` int(11) NOT NULL AUTO_INCREMENT, - `g` point DEFAULT NULL, - PRIMARY KEY (`fid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW FIELDS FROM gis_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g point YES NULL -SHOW FIELDS FROM gis_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g linestring YES NULL -SHOW FIELDS FROM gis_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g polygon YES NULL -SHOW FIELDS FROM gis_multi_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipoint YES NULL -SHOW FIELDS FROM gis_multi_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multilinestring YES NULL -SHOW FIELDS FROM gis_multi_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipolygon YES NULL -SHOW FIELDS FROM gis_geometrycollection; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometrycollection YES NULL -SHOW FIELDS FROM gis_geometry; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometry YES NULL -INSERT INTO gis_point VALUES -(101, PointFromText('POINT(10 10)')), -(102, PointFromText('POINT(20 10)')), -(103, PointFromText('POINT(20 20)')), -(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)')))); -INSERT INTO gis_line VALUES -(105, LineFromText('LINESTRING(0 0,0 10,10 0)')), -(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')), -(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10)))); -INSERT INTO gis_polygon VALUES -(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')), -(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')), -(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))); -INSERT INTO gis_multi_point VALUES -(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')), -(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')), -(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10)))); -INSERT INTO gis_multi_line VALUES -(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')), -(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')), -(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))); -INSERT INTO gis_multi_polygon VALUES -(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))); -INSERT INTO gis_geometrycollection VALUES -(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')), -(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))); -INSERT into gis_geometry SELECT * FROM gis_point; -INSERT into gis_geometry SELECT * FROM gis_line; -INSERT into gis_geometry SELECT * FROM gis_polygon; -INSERT into gis_geometry SELECT * FROM gis_multi_point; -INSERT into gis_geometry SELECT * FROM gis_multi_line; -INSERT into gis_geometry SELECT * FROM gis_multi_polygon; -INSERT into gis_geometry SELECT * FROM gis_geometrycollection; -SELECT fid, AsText(g) FROM gis_point ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -SELECT fid, AsText(g) FROM gis_line ORDER by fid; -fid AsText(g) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -SELECT fid, AsText(g) FROM gis_polygon ORDER by fid; -fid AsText(g) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid; -fid AsText(g) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid; -fid AsText(g) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid; -fid AsText(g) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid; -fid AsText(g) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, AsText(g) FROM gis_geometry ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid; -fid Dimension(g) -101 0 -102 0 -103 0 -104 0 -105 1 -106 1 -107 1 -108 2 -109 2 -110 2 -111 0 -112 0 -113 0 -114 1 -115 1 -116 1 -117 2 -118 2 -119 2 -120 1 -121 1 -SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid; -fid GeometryType(g) -101 POINT -102 POINT -103 POINT -104 POINT -105 LINESTRING -106 LINESTRING -107 LINESTRING -108 POLYGON -109 POLYGON -110 POLYGON -111 MULTIPOINT -112 MULTIPOINT -113 MULTIPOINT -114 MULTILINESTRING -115 MULTILINESTRING -116 MULTILINESTRING -117 MULTIPOLYGON -118 MULTIPOLYGON -119 MULTIPOLYGON -120 GEOMETRYCOLLECTION -121 GEOMETRYCOLLECTION -SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid; -fid IsEmpty(g) -101 0 -102 0 -103 0 -104 0 -105 0 -106 0 -107 0 -108 0 -109 0 -110 0 -111 0 -112 0 -113 0 -114 0 -115 0 -116 0 -117 0 -118 0 -119 0 -120 0 -121 0 -SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid; -fid AsText(Envelope(g)) -101 POLYGON((10 10,10 10,10 10,10 10,10 10)) -102 POLYGON((20 10,20 10,20 10,20 10,20 10)) -103 POLYGON((20 20,20 20,20 20,20 20,20 20)) -104 POLYGON((10 20,10 20,10 20,10 20,10 20)) -105 POLYGON((0 0,10 0,10 10,0 10,0 0)) -106 POLYGON((10 10,20 10,20 20,10 20,10 10)) -107 POLYGON((10 10,40 10,40 10,10 10,10 10)) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0)) -110 POLYGON((0 0,30 0,30 30,0 30,0 0)) -111 POLYGON((0 0,20 0,20 20,0 20,0 0)) -112 POLYGON((1 1,21 1,21 21,1 21,1 1)) -113 POLYGON((3 6,4 6,4 10,3 10,3 6)) -114 POLYGON((10 0,16 0,16 48,10 48,10 0)) -115 POLYGON((10 0,10 0,10 48,10 48,10 0)) -116 POLYGON((1 2,21 2,21 8,1 8,1 2)) -117 POLYGON((28 0,84 0,84 42,28 42,28 0)) -118 POLYGON((28 0,84 0,84 42,28 42,28 0)) -119 POLYGON((0 0,3 0,3 3,0 3,0 0)) -120 POLYGON((0 0,10 0,10 10,0 10,0 0)) -121 POLYGON((3 6,44 6,44 9,3 9,3 6)) -explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 -Warnings: -Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` -SELECT fid, X(g) FROM gis_point ORDER by fid; -fid X(g) -101 10 -102 20 -103 20 -104 10 -SELECT fid, Y(g) FROM gis_point ORDER by fid; -fid Y(g) -101 10 -102 10 -103 20 -104 20 -explain extended select X(g),Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 -Warnings: -Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` -SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; -fid AsText(StartPoint(g)) -105 POINT(0 0) -106 POINT(10 10) -107 POINT(10 10) -SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid; -fid AsText(EndPoint(g)) -105 POINT(10 0) -106 POINT(10 10) -107 POINT(40 10) -SELECT fid, GLength(g) FROM gis_line ORDER by fid; -fid GLength(g) -105 24.142135623731 -106 40 -107 30 -SELECT fid, NumPoints(g) FROM gis_line ORDER by fid; -fid NumPoints(g) -105 3 -106 5 -107 2 -SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid; -fid AsText(PointN(g, 2)) -105 POINT(0 10) -106 POINT(20 10) -107 POINT(40 10) -SELECT fid, IsClosed(g) FROM gis_line ORDER by fid; -fid IsClosed(g) -105 0 -106 1 -107 0 -explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` -SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; -fid AsText(Centroid(g)) -108 POINT(15 15) -109 POINT(25.416666666667 25.416666666667) -110 POINT(20 10) -SELECT fid, Area(g) FROM gis_polygon ORDER by fid; -fid Area(g) -108 100 -109 2400 -110 450 -SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid; -fid AsText(ExteriorRing(g)) -108 LINESTRING(10 10,20 10,20 20,10 20,10 10) -109 LINESTRING(0 0,50 0,50 50,0 50,0 0) -110 LINESTRING(0 0,30 0,30 30,0 0) -SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid; -fid NumInteriorRings(g) -108 0 -109 1 -110 0 -SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid; -fid AsText(InteriorRingN(g, 1)) -108 NULL -109 LINESTRING(10 10,20 10,20 20,10 20,10 10) -110 NULL -explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` -SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; -fid IsClosed(g) -114 0 -115 0 -116 0 -SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; -fid AsText(Centroid(g)) -117 POINT(55.588527753042 17.426536064114) -118 POINT(55.588527753042 17.426536064114) -119 POINT(2 2) -SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; -fid Area(g) -117 1684.5 -118 1684.5 -119 4.5 -SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid; -fid NumGeometries(g) -111 4 -112 4 -113 2 -SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid; -fid NumGeometries(g) -114 2 -115 1 -116 2 -SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid; -fid NumGeometries(g) -117 2 -118 2 -119 1 -SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid; -fid NumGeometries(g) -120 2 -121 2 -explain extended SELECT fid, NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; -fid AsText(GeometryN(g, 2)) -111 POINT(10 10) -112 POINT(11 11) -113 POINT(4 10) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid; -fid AsText(GeometryN(g, 2)) -114 LINESTRING(16 0,16 23,16 48) -115 NULL -116 LINESTRING(2 5,5 8,21 7) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid; -fid AsText(GeometryN(g, 2)) -117 POLYGON((59 18,67 18,67 13,59 13,59 18)) -118 POLYGON((59 18,67 18,67 13,59 13,59 18)) -119 NULL -SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 2)) -120 LINESTRING(0 0,10 10) -121 LINESTRING(3 6,7 9) -SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 1)) -120 POINT(0 0) -121 POINT(44 6) -explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` -SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -first second w c o e d t i r -120 120 1 1 0 1 0 0 1 0 -120 121 0 0 1 0 0 0 1 0 -121 120 0 0 1 0 0 0 1 0 -121 121 1 1 0 1 0 0 1 0 -explain extended SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer -Warnings: -Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` -DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE t1 ( -a INTEGER PRIMARY KEY AUTO_INCREMENT, -gp point, -ln linestring, -pg polygon, -mp multipoint, -mln multilinestring, -mpg multipolygon, -gc geometrycollection, -gm geometry -); -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -ALTER TABLE t1 ADD fid INT; -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -fid int(11) YES NULL -DROP TABLE t1; -create table t1 (pk integer primary key auto_increment, a geometry not null); -insert into t1 (a) values (GeomFromText('Point(1 2)')); -insert into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -drop table t1; -create table t1 (pk integer primary key auto_increment, fl geometry not null); -insert into t1 (fl) values (1); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (1.11); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values ("qwerty"); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (pointfromtext('point(1,1)')); -ERROR 23000: Column 'fl' cannot be null -drop table t1; -End of 4.1 tests -CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); -Warnings: -Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrcontains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrdisjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrequal -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrintersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbroverlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrtouches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrwithin -big,center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -contains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -disjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -equals -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -intersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -overlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -touches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -within -big,center -SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); -SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); -SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); -SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); -SET @point1 = GeomFromText('POLYGON ((0 0))'); -SET @point2 = GeomFromText('POLYGON ((-2 0))'); -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; -overlaps -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; -overlaps -SELECT Overlaps(@horiz1, @vert1) FROM DUAL; -Overlaps(@horiz1, @vert1) -0 -SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; -Overlaps(@horiz1, @horiz2) -1 -SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; -Overlaps(@horiz1, @horiz3) -0 -SELECT Overlaps(@horiz1, @point1) FROM DUAL; -Overlaps(@horiz1, @point1) -0 -SELECT Overlaps(@horiz1, @point2) FROM DUAL; -Overlaps(@horiz1, @point2) -0 -DROP TABLE t1; -End of 5.0 tests -set engine_condition_pushdown = on; -DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); -CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); -CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); -CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); -CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); -CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); -CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); -CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); -SHOW CREATE TABLE gis_point; -Table Create Table -gis_point CREATE TABLE `gis_point` ( - `fid` int(11) NOT NULL AUTO_INCREMENT, - `g` point DEFAULT NULL, - PRIMARY KEY (`fid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SHOW FIELDS FROM gis_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g point YES NULL -SHOW FIELDS FROM gis_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g linestring YES NULL -SHOW FIELDS FROM gis_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g polygon YES NULL -SHOW FIELDS FROM gis_multi_point; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipoint YES NULL -SHOW FIELDS FROM gis_multi_line; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multilinestring YES NULL -SHOW FIELDS FROM gis_multi_polygon; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g multipolygon YES NULL -SHOW FIELDS FROM gis_geometrycollection; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometrycollection YES NULL -SHOW FIELDS FROM gis_geometry; -Field Type Null Key Default Extra -fid int(11) NO PRI NULL auto_increment -g geometry YES NULL -INSERT INTO gis_point VALUES -(101, PointFromText('POINT(10 10)')), -(102, PointFromText('POINT(20 10)')), -(103, PointFromText('POINT(20 20)')), -(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)')))); -INSERT INTO gis_line VALUES -(105, LineFromText('LINESTRING(0 0,0 10,10 0)')), -(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')), -(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10)))); -INSERT INTO gis_polygon VALUES -(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')), -(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')), -(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))); -INSERT INTO gis_multi_point VALUES -(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')), -(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')), -(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10)))); -INSERT INTO gis_multi_line VALUES -(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')), -(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')), -(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))); -INSERT INTO gis_multi_polygon VALUES -(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), -(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))); -INSERT INTO gis_geometrycollection VALUES -(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')), -(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))); -INSERT into gis_geometry SELECT * FROM gis_point; -INSERT into gis_geometry SELECT * FROM gis_line; -INSERT into gis_geometry SELECT * FROM gis_polygon; -INSERT into gis_geometry SELECT * FROM gis_multi_point; -INSERT into gis_geometry SELECT * FROM gis_multi_line; -INSERT into gis_geometry SELECT * FROM gis_multi_polygon; -INSERT into gis_geometry SELECT * FROM gis_geometrycollection; -SELECT fid, AsText(g) FROM gis_point ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -SELECT fid, AsText(g) FROM gis_line ORDER by fid; -fid AsText(g) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -SELECT fid, AsText(g) FROM gis_polygon ORDER by fid; -fid AsText(g) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid; -fid AsText(g) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid; -fid AsText(g) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid; -fid AsText(g) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid; -fid AsText(g) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, AsText(g) FROM gis_geometry ORDER by fid; -fid AsText(g) -101 POINT(10 10) -102 POINT(20 10) -103 POINT(20 20) -104 POINT(10 20) -105 LINESTRING(0 0,0 10,10 0) -106 LINESTRING(10 10,20 10,20 20,10 20,10 10) -107 LINESTRING(10 10,40 10) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) -110 POLYGON((0 0,30 0,30 30,0 0)) -111 MULTIPOINT(0 0,10 10,10 20,20 20) -112 MULTIPOINT(1 1,11 11,11 21,21 21) -113 MULTIPOINT(3 6,4 10) -114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) -115 MULTILINESTRING((10 48,10 21,10 0)) -116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) -117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) -119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) -120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) -121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) -SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid; -fid Dimension(g) -101 0 -102 0 -103 0 -104 0 -105 1 -106 1 -107 1 -108 2 -109 2 -110 2 -111 0 -112 0 -113 0 -114 1 -115 1 -116 1 -117 2 -118 2 -119 2 -120 1 -121 1 -SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid; -fid GeometryType(g) -101 POINT -102 POINT -103 POINT -104 POINT -105 LINESTRING -106 LINESTRING -107 LINESTRING -108 POLYGON -109 POLYGON -110 POLYGON -111 MULTIPOINT -112 MULTIPOINT -113 MULTIPOINT -114 MULTILINESTRING -115 MULTILINESTRING -116 MULTILINESTRING -117 MULTIPOLYGON -118 MULTIPOLYGON -119 MULTIPOLYGON -120 GEOMETRYCOLLECTION -121 GEOMETRYCOLLECTION -SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid; -fid IsEmpty(g) -101 0 -102 0 -103 0 -104 0 -105 0 -106 0 -107 0 -108 0 -109 0 -110 0 -111 0 -112 0 -113 0 -114 0 -115 0 -116 0 -117 0 -118 0 -119 0 -120 0 -121 0 -SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid; -fid AsText(Envelope(g)) -101 POLYGON((10 10,10 10,10 10,10 10,10 10)) -102 POLYGON((20 10,20 10,20 10,20 10,20 10)) -103 POLYGON((20 20,20 20,20 20,20 20,20 20)) -104 POLYGON((10 20,10 20,10 20,10 20,10 20)) -105 POLYGON((0 0,10 0,10 10,0 10,0 0)) -106 POLYGON((10 10,20 10,20 20,10 20,10 10)) -107 POLYGON((10 10,40 10,40 10,10 10,10 10)) -108 POLYGON((10 10,20 10,20 20,10 20,10 10)) -109 POLYGON((0 0,50 0,50 50,0 50,0 0)) -110 POLYGON((0 0,30 0,30 30,0 30,0 0)) -111 POLYGON((0 0,20 0,20 20,0 20,0 0)) -112 POLYGON((1 1,21 1,21 21,1 21,1 1)) -113 POLYGON((3 6,4 6,4 10,3 10,3 6)) -114 POLYGON((10 0,16 0,16 48,10 48,10 0)) -115 POLYGON((10 0,10 0,10 48,10 48,10 0)) -116 POLYGON((1 2,21 2,21 8,1 8,1 2)) -117 POLYGON((28 0,84 0,84 42,28 42,28 0)) -118 POLYGON((28 0,84 0,84 42,28 42,28 0)) -119 POLYGON((0 0,3 0,3 3,0 3,0 0)) -120 POLYGON((0 0,10 0,10 10,0 10,0 0)) -121 POLYGON((3 6,44 6,44 9,3 9,3 6)) -explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 -Warnings: -Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` -SELECT fid, X(g) FROM gis_point ORDER by fid; -fid X(g) -101 10 -102 20 -103 20 -104 10 -SELECT fid, Y(g) FROM gis_point ORDER by fid; -fid Y(g) -101 10 -102 10 -103 20 -104 20 -explain extended select X(g),Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 -Warnings: -Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` -SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; -fid AsText(StartPoint(g)) -105 POINT(0 0) -106 POINT(10 10) -107 POINT(10 10) -SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid; -fid AsText(EndPoint(g)) -105 POINT(10 0) -106 POINT(10 10) -107 POINT(40 10) -SELECT fid, GLength(g) FROM gis_line ORDER by fid; -fid GLength(g) -105 24.142135623731 -106 40 -107 30 -SELECT fid, NumPoints(g) FROM gis_line ORDER by fid; -fid NumPoints(g) -105 3 -106 5 -107 2 -SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid; -fid AsText(PointN(g, 2)) -105 POINT(0 10) -106 POINT(20 10) -107 POINT(40 10) -SELECT fid, IsClosed(g) FROM gis_line ORDER by fid; -fid IsClosed(g) -105 0 -106 1 -107 0 -explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` -SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; -fid AsText(Centroid(g)) -108 POINT(15 15) -109 POINT(25.416666666667 25.416666666667) -110 POINT(20 10) -SELECT fid, Area(g) FROM gis_polygon ORDER by fid; -fid Area(g) -108 100 -109 2400 -110 450 -SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid; -fid AsText(ExteriorRing(g)) -108 LINESTRING(10 10,20 10,20 20,10 20,10 10) -109 LINESTRING(0 0,50 0,50 50,0 50,0 0) -110 LINESTRING(0 0,30 0,30 30,0 0) -SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid; -fid NumInteriorRings(g) -108 0 -109 1 -110 0 -SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid; -fid AsText(InteriorRingN(g, 1)) -108 NULL -109 LINESTRING(10 10,20 10,20 20,10 20,10 10) -110 NULL -explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` -SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; -fid IsClosed(g) -114 0 -115 0 -116 0 -SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; -fid AsText(Centroid(g)) -117 POINT(55.588527753042 17.426536064114) -118 POINT(55.588527753042 17.426536064114) -119 POINT(2 2) -SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; -fid Area(g) -117 1684.5 -118 1684.5 -119 4.5 -SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid; -fid NumGeometries(g) -111 4 -112 4 -113 2 -SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid; -fid NumGeometries(g) -114 2 -115 1 -116 2 -SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid; -fid NumGeometries(g) -117 2 -118 2 -119 1 -SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid; -fid NumGeometries(g) -120 2 -121 2 -explain extended SELECT fid, NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; -fid AsText(GeometryN(g, 2)) -111 POINT(10 10) -112 POINT(11 11) -113 POINT(4 10) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid; -fid AsText(GeometryN(g, 2)) -114 LINESTRING(16 0,16 23,16 48) -115 NULL -116 LINESTRING(2 5,5 8,21 7) -SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid; -fid AsText(GeometryN(g, 2)) -117 POLYGON((59 18,67 18,67 13,59 13,59 18)) -118 POLYGON((59 18,67 18,67 13,59 13,59 18)) -119 NULL -SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 2)) -120 LINESTRING(0 0,10 10) -121 LINESTRING(3 6,7 9) -SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid; -fid AsText(GeometryN(g, 1)) -120 POINT(0 0) -121 POINT(44 6) -explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 -Warnings: -Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` -SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -first second w c o e d t i r -120 120 1 1 0 1 0 0 1 0 -120 121 0 0 1 0 0 0 1 0 -121 120 0 0 1 0 0 0 1 0 -121 121 1 1 0 1 0 0 1 0 -explain extended SELECT g1.fid as first, g2.fid as second, -Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, -Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, -Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r -FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer -Warnings: -Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` -DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; -CREATE TABLE t1 ( -a INTEGER PRIMARY KEY AUTO_INCREMENT, -gp point, -ln linestring, -pg polygon, -mp multipoint, -mln multilinestring, -mpg multipolygon, -gc geometrycollection, -gm geometry -); -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -ALTER TABLE t1 ADD fid INT; -SHOW FIELDS FROM t1; -Field Type Null Key Default Extra -a int(11) NO PRI NULL auto_increment -gp point YES NULL -ln linestring YES NULL -pg polygon YES NULL -mp multipoint YES NULL -mln multilinestring YES NULL -mpg multipolygon YES NULL -gc geometrycollection YES NULL -gm geometry YES NULL -fid int(11) YES NULL -DROP TABLE t1; -create table t1 (pk integer primary key auto_increment, a geometry not null); -insert into t1 (a) values (GeomFromText('Point(1 2)')); -insert into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert IGNORE into t1 (a) values ('Garbage'); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -drop table t1; -create table t1 (pk integer primary key auto_increment, fl geometry not null); -insert into t1 (fl) values (1); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (1.11); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values ("qwerty"); -ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field -insert into t1 (fl) values (pointfromtext('point(1,1)')); -ERROR 23000: Column 'fl' cannot be null -drop table t1; -End of 4.1 tests -CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); -Warnings: -Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrcontains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrdisjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrequal -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrintersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbroverlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrtouches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -mbrwithin -big,center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -contains -center,small -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -disjoint -down3,left3,right3,up3 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -equals -center -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -intersect -big,center,down,down2,left,left2,right,right2,small,up,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -overlaps -down,left,right,up -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -touches -down2,left2,right2,up2 -SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; -within -big,center -SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); -SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); -SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); -SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); -SET @point1 = GeomFromText('POLYGON ((0 0))'); -SET @point2 = GeomFromText('POLYGON ((-2 0))'); -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; -overlaps -SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; -overlaps -SELECT Overlaps(@horiz1, @vert1) FROM DUAL; -Overlaps(@horiz1, @vert1) -0 -SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; -Overlaps(@horiz1, @horiz2) -1 -SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; -Overlaps(@horiz1, @horiz3) -0 -SELECT Overlaps(@horiz1, @point1) FROM DUAL; -Overlaps(@horiz1, @point1) -0 -SELECT Overlaps(@horiz1, @point2) FROM DUAL; -Overlaps(@horiz1, @point2) -0 -DROP TABLE t1; -End of 5.0 tests diff --git a/mysql-test/r/ndb_grant.result b/mysql-test/r/ndb_grant.result deleted file mode 100644 index 6192a7cace5..00000000000 --- a/mysql-test/r/ndb_grant.result +++ /dev/null @@ -1,444 +0,0 @@ -drop table if exists t1; -SET NAMES binary; -use mysql; -alter table columns_priv engine=ndb; -alter table db engine=ndb; -alter table func engine=ndb; -alter table help_category engine=ndb; -alter table help_keyword engine=ndb; -alter table help_relation engine=ndb; -alter table help_topic engine=ndb; -alter table host engine=ndb; -alter table tables_priv engine=ndb; -alter table time_zone engine=ndb; -alter table time_zone_leap_second engine=ndb; -alter table time_zone_name engine=ndb; -alter table time_zone_transition engine=ndb; -alter table time_zone_transition_type engine=ndb; -alter table user engine=ndb; -use test; -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -flush privileges; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant delete on mysqltest.* to mysqltest_1@localhost; -commit; -select * from mysql.user where user="mysqltest_1"; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections -localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N 0 0 0 -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT, DELETE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -revoke delete on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant select on mysqltest.* to mysqltest_1@localhost require NONE; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB"; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' -delete from mysql.user where user='mysqltest_1'; -flush privileges; -begin; -grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -flush privileges; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -begin; -grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; -commit; -flush privileges; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -begin; -revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, CREATE VIEW, SHOW VIEW ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -delete from mysql.user where user='mysqltest_1'; -flush privileges; -begin; -grant usage on test.* to mysqltest_1@localhost with grant option; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT USAGE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -GRANT USAGE ON `test`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -delete from mysql.tables_priv where user='mysqltest_1'; -delete from mysql.columns_priv where user='mysqltest_1'; -flush privileges; -show grants for mysqltest_1@localhost; -ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host 'localhost' -create table t1 (a int); -begin; -GRANT select,update,insert on t1 to mysqltest_1@localhost; -GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, SELECT (a), INSERT, INSERT (a), UPDATE, UPDATE (a), REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -table_priv column_priv -Select,Insert,Update Select,Insert,Update,References -begin; -REVOKE select (a), update on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, INSERT (a), REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' -begin; -REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' -begin; -GRANT select,references on t1 to mysqltest_1@localhost; -commit; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -table_priv column_priv -Select,References References -begin; -grant all on test.* to mysqltest_3@localhost with grant option; -revoke all on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -Grants for mysqltest_3@localhost -GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' -GRANT USAGE ON `test`.* TO 'mysqltest_3'@'localhost' WITH GRANT OPTION -begin; -revoke grant option on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -Grants for mysqltest_3@localhost -GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' -begin; -grant all on test.t1 to mysqltest_2@localhost with grant option; -revoke all on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -Grants for mysqltest_2@localhost -GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' -GRANT USAGE ON `test`.`t1` TO 'mysqltest_2'@'localhost' WITH GRANT OPTION -begin; -revoke grant option on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -Grants for mysqltest_2@localhost -GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' -delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -flush privileges; -drop table t1; -begin; -GRANT FILE on mysqltest.* to mysqltest_1@localhost; -ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES -commit; -select 1; -1 -1 -create database mysqltest1; -begin; -grant usage on mysqltest1.* to test6123 identified by 'magic123'; -commit; -select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; -host db user select_priv insert_priv -delete from mysql.user where user='test6123'; -drop database mysqltest1; -create table t1 (a int); -begin; -grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; -commit; -show grants for drop_user2@localhost; -Grants for drop_user2@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user2'@'localhost' WITH GRANT OPTION -begin; -revoke all privileges, grant option from drop_user2@localhost; -commit; -drop user drop_user2@localhost; -begin; -grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION; -grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION; -grant select(a) on test.t1 to drop_user@localhost; -commit; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost' -set sql_mode=ansi_quotes; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost' -set sql_mode=default; -set sql_quote_show_create=0; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost' -set sql_mode="ansi_quotes"; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost' -set sql_quote_show_create=1; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost' -set sql_mode=""; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost' -revoke all privileges, grant option from drop_user@localhost; -show grants for drop_user@localhost; -Grants for drop_user@localhost -GRANT USAGE ON *.* TO 'drop_user'@'localhost' -drop user drop_user@localhost; -begin; -revoke all privileges, grant option from drop_user@localhost; -ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users -commit; -begin; -grant select(a) on test.t1 to drop_user1@localhost; -commit; -flush privileges; -begin; -grant select on test.t1 to drop_user2@localhost; -grant select on test.* to drop_user3@localhost; -grant select on *.* to drop_user4@localhost; -commit; -flush privileges; -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -begin; -revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, -drop_user3@localhost, drop_user4@localhost; -ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users -commit; -flush privileges; -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -drop table t1; -begin; -grant usage on *.* to mysqltest_1@localhost identified by "password"; -grant select, update, insert on test.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' -GRANT SELECT, INSERT, UPDATE ON `test`.* TO 'mysqltest_1'@'localhost' -drop user mysqltest_1@localhost; -SET NAMES koi8r; -CREATE DATABASE ÂÄ; -USE ÂÄ; -CREATE TABLE ÔÁ (ËÏÌ int); -begin; -GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT ON `ÂÄ`.* TO 'ÀÚÅÒ'@'localhost' -begin; -REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost; -commit; -begin; -GRANT SELECT ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' -begin; -REVOKE SELECT ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; -begin; -GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT (ËÏÌ) ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' -begin; -REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; -DROP DATABASE ÂÄ; -SET NAMES latin1; -USE test; -CREATE TABLE t1 (a int ); -CREATE TABLE t2 LIKE t1; -CREATE TABLE t3 LIKE t1; -CREATE TABLE t4 LIKE t1; -CREATE TABLE t5 LIKE t1; -CREATE TABLE t6 LIKE t1; -CREATE TABLE t7 LIKE t1; -CREATE TABLE t8 LIKE t1; -CREATE TABLE t9 LIKE t1; -CREATE TABLE t10 LIKE t1; -CREATE DATABASE testdb1; -CREATE DATABASE testdb2; -CREATE DATABASE testdb3; -CREATE DATABASE testdb4; -CREATE DATABASE testdb5; -CREATE DATABASE testdb6; -CREATE DATABASE testdb7; -CREATE DATABASE testdb8; -CREATE DATABASE testdb9; -CREATE DATABASE testdb10; -begin; -GRANT ALL ON testdb1.* TO testuser@localhost; -GRANT ALL ON testdb2.* TO testuser@localhost; -GRANT ALL ON testdb3.* TO testuser@localhost; -GRANT ALL ON testdb4.* TO testuser@localhost; -GRANT ALL ON testdb5.* TO testuser@localhost; -GRANT ALL ON testdb6.* TO testuser@localhost; -GRANT ALL ON testdb7.* TO testuser@localhost; -GRANT ALL ON testdb8.* TO testuser@localhost; -GRANT ALL ON testdb9.* TO testuser@localhost; -GRANT ALL ON testdb10.* TO testuser@localhost; -GRANT SELECT ON test.t1 TO testuser@localhost; -GRANT SELECT ON test.t2 TO testuser@localhost; -GRANT SELECT ON test.t3 TO testuser@localhost; -GRANT SELECT ON test.t4 TO testuser@localhost; -GRANT SELECT ON test.t5 TO testuser@localhost; -GRANT SELECT ON test.t6 TO testuser@localhost; -GRANT SELECT ON test.t7 TO testuser@localhost; -GRANT SELECT ON test.t8 TO testuser@localhost; -GRANT SELECT ON test.t9 TO testuser@localhost; -GRANT SELECT ON test.t10 TO testuser@localhost; -GRANT SELECT (a) ON test.t1 TO testuser@localhost; -GRANT SELECT (a) ON test.t2 TO testuser@localhost; -GRANT SELECT (a) ON test.t3 TO testuser@localhost; -GRANT SELECT (a) ON test.t4 TO testuser@localhost; -GRANT SELECT (a) ON test.t5 TO testuser@localhost; -GRANT SELECT (a) ON test.t6 TO testuser@localhost; -GRANT SELECT (a) ON test.t7 TO testuser@localhost; -GRANT SELECT (a) ON test.t8 TO testuser@localhost; -GRANT SELECT (a) ON test.t9 TO testuser@localhost; -GRANT SELECT (a) ON test.t10 TO testuser@localhost; -commit; -begin; -REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost; -commit; -SHOW GRANTS FOR testuser@localhost; -Grants for testuser@localhost -GRANT USAGE ON *.* TO 'testuser'@'localhost' -DROP USER testuser@localhost; -DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -DROP DATABASE testdb1; -DROP DATABASE testdb2; -DROP DATABASE testdb3; -DROP DATABASE testdb4; -DROP DATABASE testdb5; -DROP DATABASE testdb6; -DROP DATABASE testdb7; -DROP DATABASE testdb8; -DROP DATABASE testdb9; -DROP DATABASE testdb10; -SHOW PRIVILEGES; -Privilege Context Comment -Alter Tables To alter the table -Create Databases,Tables,Indexes To create new databases and tables -Create temporary tables Databases To use CREATE TEMPORARY TABLE -Create view Tables To create new views -Delete Tables To delete existing rows -Drop Databases,Tables To drop databases, tables, and views -File File access on server To read and write files on the server -Grant option Databases,Tables To give to other users those privileges you possess -Index Tables To create or drop indexes -Insert Tables To insert data into tables -Lock tables Databases To use LOCK TABLES (together with SELECT privilege) -Process Server Admin To view the plain text of currently executing queries -References Databases,Tables To have references on tables -Reload Server Admin To reload or refresh tables, logs and privileges -Replication client Server Admin To ask where the slave or master servers are -Replication slave Server Admin To read binary log events from the master -Select Tables To retrieve rows from table -Show databases Server Admin To see all databases with SHOW DATABASES -Show view Tables To see views with SHOW CREATE VIEW -Shutdown Server Admin To shut down the server -Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc. -Update Tables To update existing rows -Usage Server Admin No privileges - allow connect only -use mysql; -alter table columns_priv engine=myisam; -alter table db engine=myisam; -alter table func engine=myisam; -alter table help_category engine=myisam; -alter table help_keyword engine=myisam; -alter table help_relation engine=myisam; -alter table help_topic engine=myisam; -alter table host engine=myisam; -alter table tables_priv engine=myisam; -alter table time_zone engine=myisam; -alter table time_zone_leap_second engine=myisam; -alter table time_zone_name engine=myisam; -alter table time_zone_transition engine=myisam; -alter table time_zone_transition_type engine=myisam; -alter table user engine=myisam; -use test; -flush privileges; diff --git a/mysql-test/r/ndb_index.result b/mysql-test/r/ndb_index.result deleted file mode 100644 index 5702552b0b5..00000000000 --- a/mysql-test/r/ndb_index.result +++ /dev/null @@ -1,154 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( -PORT varchar(16) NOT NULL, -ACCESSNODE varchar(16) NOT NULL, -POP varchar(48) NOT NULL, -ACCESSTYPE int unsigned NOT NULL, -CUSTOMER_ID varchar(20) collate latin1_bin NOT NULL, -PROVIDER varchar(16), -TEXPIRE int unsigned, -NUM_IP int unsigned, -LEASED_NUM_IP int unsigned, -LOCKED_IP int unsigned, -STATIC_DNS int unsigned, -SUSPENDED_SERVICE int unsigned, -SUSPENDED_REASON int unsigned, -BGP_COMMUNITY int unsigned, -INDEX CUSTOMER_ID_INDEX(CUSTOMER_ID), -INDEX FQPN_INDEX(POP,ACCESSNODE,PORT), -PRIMARY KEY(POP,ACCESSNODE,PORT,ACCESSTYPE) -) engine=ndbcluster; -INSERT INTO t1 VALUES ('port67', 'node78', 'pop98', 1, 'kllopmn', 'pr_43', 121212, 1, 2, 3, 8, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port67', 'node78', 'pop99', 2, 'klkighh', 'pr_44', 121213, 3, 3, 6, 7, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port79', 'node79', 'pop79', 2, 'kpongfaa', 'pr_44', 981213, 2, 4, 10, 11, 2, 99, 1278); -select port, accessnode, pop, accesstype from t1 where port='port67' order by accesstype; -port accessnode pop accesstype -port67 node78 pop98 1 -port67 node78 pop99 2 -select port, accessnode, pop, accesstype from t1 where port='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where accessnode='node78' order by accesstype; -port accessnode pop accesstype -port67 node78 pop98 1 -port67 node78 pop99 2 -select port, accessnode, pop, accesstype from t1 where accessnode='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' order by accesstype; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where accesstype=2 order by port; -port accessnode pop accesstype -port67 node78 pop99 2 -port79 node79 pop79 2 -select port, accessnode, pop, accesstype from t1 where accesstype=98 order by port; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where customer_id='KLLOPMN'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where customer_id='kLLoPMn'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where customer_id='foo'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where provider='pr_43'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where provider='foo'; -port accessnode pop accesstype -select port, accessnode from t1 where texpire=121212; -port accessnode -port67 node78 -select port, accessnode from t1 where texpire=2323; -port accessnode -select port, accessnode, pop, accesstype from t1 where num_ip=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where num_ip=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where leased_num_ip=2; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where leased_num_ip=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where locked_ip=3; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where locked_ip=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where static_dns=8; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where static_dns=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_service=8; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_service=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_reason=NULL; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_reason=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where suspended_reason=0; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where bgp_community=NULL; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where bgp_community=89; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where bgp_community=0; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where port='port67' and accessnode='node78' and pop='pop98' and accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78' and pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' and port='port67' and accesstype=1 and accessnode='node78'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo' and accesstype=99; -port accessnode -select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where accesstype=1 and accessnode='node78' and pop='pop98'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo'; -port accessnode -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=1; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=2; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where accesstype=2 and customer_id='kllopmn'; -port accessnode pop accesstype -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn'; -port accessnode pop accesstype -port67 node78 pop98 1 -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo'; -port accessnode pop accesstype -drop table t1; diff --git a/mysql-test/r/ndb_index_ordered.result b/mysql-test/r/ndb_index_ordered.result deleted file mode 100644 index a29b5343d7c..00000000000 --- a/mysql-test/r/ndb_index_ordered.result +++ /dev/null @@ -1,854 +0,0 @@ -drop table if exists t1, test1, test2; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned, -KEY(b) -) engine=ndbcluster; -insert t1 values(1, 2, 3), (2,3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b >= 4 order by b; -a b c -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b = 4 order by b; -a b c -3 4 6 -select * from t1 where b > 4 order by b; -a b c -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b < 4 order by b; -a b c -1 2 3 -2 3 5 -select * from t1 where b <= 4 order by b; -a b c -1 2 3 -2 3 5 -3 4 6 -select tt1.* from t1 as tt1, t1 as tt2 use index(b) where tt1.b = tt2.b order by tt1.b; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select a, b, c from t1 where a!=2 and c=6; -a b c -3 4 6 -select a, b, c from t1 where a!=2 order by a; -a b c -1 2 3 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -update t1 set c = 3 where b = 3; -select * from t1 order by a; -a b c -1 2 3 -2 3 3 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -update t1 set c = 10 where b >= 6; -select * from t1 order by a; -a b c -1 2 3 -2 3 3 -3 4 6 -4 5 8 -5 6 10 -6 7 10 -update t1 set c = 11 where b < 5; -select * from t1 order by a; -a b c -1 2 11 -2 3 11 -3 4 11 -4 5 8 -5 6 10 -6 7 10 -update t1 set c = 12 where b > 0; -select * from t1 order by a; -a b c -1 2 12 -2 3 12 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -update t1 set c = 13 where b <= 3; -select * from t1 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -update t1 set b = b + 1 where b > 4 and b < 7; -select * from t1 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 6 12 -5 7 12 -6 7 12 -update t1 set a = a + 10 where b > 1 and b < 7; -select * from t1 order by a; -a b c -5 7 12 -6 7 12 -11 2 13 -12 3 13 -13 4 12 -14 6 12 -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned, -KEY(b) -) engine=ndbcluster; -insert t1 values(1, 2, 13), (2,3, 13), (3, 4, 12), (4, 5, 12), (5,6, 12), (6,7, 12); -delete from t1 where b = 3; -select * from t1 order by a; -a b c -1 2 13 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -delete from t1 where b >= 6; -select * from t1 order by a; -a b c -1 2 13 -3 4 12 -4 5 12 -delete from t1 where b < 4; -select * from t1 order by a; -a b c -3 4 12 -4 5 12 -delete from t1 where b > 5; -select * from t1 order by a; -a b c -3 4 12 -4 5 12 -delete from t1 where b <= 4; -select * from t1 order by a; -a b c -4 5 12 -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned not null -) engine = ndb; -create index a1 on t1 (b, c); -insert into t1 values (1, 2, 13); -insert into t1 values (2,3, 13); -insert into t1 values (3, 4, 12); -insert into t1 values (4, 5, 12); -insert into t1 values (5,6, 12); -insert into t1 values (6,7, 12); -insert into t1 values (7, 2, 1); -insert into t1 values (8,3, 6); -insert into t1 values (9, 4, 12); -insert into t1 values (14, 5, 4); -insert into t1 values (15,5,5); -insert into t1 values (16,5, 6); -insert into t1 values (17,4,4); -insert into t1 values (18,1, 7); -select * from t1 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 5 12 -5 6 12 -6 7 12 -7 2 1 -8 3 6 -9 4 12 -14 5 4 -15 5 5 -16 5 6 -17 4 4 -18 1 7 -select * from t1 where b<=5 order by a; -a b c -1 2 13 -2 3 13 -3 4 12 -4 5 12 -7 2 1 -8 3 6 -9 4 12 -14 5 4 -15 5 5 -16 5 6 -17 4 4 -18 1 7 -select * from t1 where b<=5 and c=0; -a b c -insert into t1 values (19,4, 0); -select * from t1 where b<=5 and c=0; -a b c -19 4 0 -select * from t1 where b=4 and c<=5 order by a; -a b c -17 4 4 -19 4 0 -select * from t1 where b<=4 and c<=5 order by a; -a b c -7 2 1 -17 4 4 -19 4 0 -select * from t1 where b<=5 and c=0 or b<=5 and c=2; -a b c -19 4 0 -select count(*) from t1 where b = 0; -count(*) -0 -select count(*) from t1 where b = 1; -count(*) -1 -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned, -c int unsigned, -KEY bc(b,c) -) engine = ndb; -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc)order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (bc) order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (PRIMARY) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -a b c -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -a b c -2 NULL 2 -select * from t1 use index (bc) where b < 4 order by a; -a b c -1 1 1 -select * from t1 use index (bc) where b IS NOT NULL order by a; -a b c -1 1 1 -4 4 NULL -drop table t1; -create table t1 ( -a int unsigned primary key, -b int unsigned, -c char(10), -key bc (b, c) -) engine=ndb; -insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); -insert into t1 select a*7,10*b,'f' from t1; -insert into t1 select a*13,10*b,'g' from t1; -insert into t1 select a*17,10*b,'h' from t1; -insert into t1 select a*19,10*b,'i' from t1; -insert into t1 select a*23,10*b,'j' from t1; -insert into t1 select a*29,10*b,'k' from t1; -select b, c from t1 where b <= 10 and c <'f' order by b, c; -b c -1 a -2 b -3 c -4 d -5 e -select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; -b c -5 e -4 d -3 c -2 b -1 a -select b, c from t1 where b=4000 and c<'k' order by b, c; -b c -4000 h -4000 i -4000 i -4000 i -4000 j -4000 j -4000 j -4000 j -4000 j -4000 j -select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; -b c -4000 j -4000 j -4000 j -4000 j -4000 j -4000 j -4000 i -4000 i -4000 i -4000 h -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; -b c -1000 h -1000 i -1000 i -1000 i -2000 h -2000 i -2000 i -2000 i -3000 h -3000 i -3000 i -3000 i -4000 h -4000 i -4000 i -4000 i -5000 h -5000 i -5000 i -5000 i -10000 i -20000 i -30000 i -40000 i -50000 i -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; -b c -50000 i -40000 i -30000 i -20000 i -10000 i -5000 i -5000 i -5000 i -5000 h -4000 i -4000 i -4000 i -4000 h -3000 i -3000 i -3000 i -3000 h -2000 i -2000 i -2000 i -2000 h -1000 i -1000 i -1000 i -1000 h -select min(b), max(b) from t1; -min(b) max(b) -1 5000000 -drop table t1; -CREATE TABLE test1 ( -SubscrID int(11) NOT NULL auto_increment, -UsrID int(11) NOT NULL default '0', -PRIMARY KEY (SubscrID), -KEY idx_usrid (UsrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO test1 VALUES (2,224),(3,224),(1,224); -CREATE TABLE test2 ( -SbclID int(11) NOT NULL auto_increment, -SbcrID int(11) NOT NULL default '0', -PRIMARY KEY (SbclID), -KEY idx_sbcrid (SbcrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2); -select * from test1 order by 1; -SubscrID UsrID -1 224 -2 224 -3 224 -select * from test2 order by 1; -SbclID SbcrID -1 1 -2 1 -3 2 -4 2 -SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON -l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2; -SubscrID SbclID -1 1 -1 2 -2 3 -2 4 -3 NULL -drop table test1; -drop table test2; -create table t1 ( -pk int primary key, -dt datetime not null, -da date not null, -ye year not null, -ti time not null, -ts timestamp not null, -index(dt), -index(da), -index(ye), -index(ti), -index(ts) -) engine=ndb; -insert into t1 (pk,dt,da,ye,ti,ts) values -(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), -(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), -(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), -(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), -(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), -(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), -(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), -(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), -(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); -select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; -count(*)-9 -0 -select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; -count(*)-6 -0 -select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; -count(*)-5 -0 -select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; -count(*)-5 -0 -select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; -count(*)-7 -0 -select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; -count(*)-8 -0 -select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; -count(*)-9 -0 -select count(*)-9 from t1 use index (da) where da > '1900-01-01'; -count(*)-9 -0 -select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; -count(*)-6 -0 -select count(*)-5 from t1 use index (da) where da > '1955-12-31'; -count(*)-5 -0 -select count(*)-5 from t1 use index (da) where da < '1970-03-03'; -count(*)-5 -0 -select count(*)-6 from t1 use index (da) where da < '2001-01-01'; -count(*)-6 -0 -select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; -count(*)-8 -0 -select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; -count(*)-9 -0 -select count(*)-9 from t1 use index (ye) where ye > '1900'; -count(*)-9 -0 -select count(*)-6 from t1 use index (ye) where ye >= '1955'; -count(*)-6 -0 -select count(*)-5 from t1 use index (ye) where ye > '1955'; -count(*)-5 -0 -select count(*)-5 from t1 use index (ye) where ye < '1970'; -count(*)-5 -0 -select count(*)-6 from t1 use index (ye) where ye < '2001'; -count(*)-6 -0 -select count(*)-8 from t1 use index (ye) where ye <= '2001'; -count(*)-8 -0 -select count(*)-9 from t1 use index (ye) where ye <= '2055'; -count(*)-9 -0 -select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; -count(*)-9 -0 -select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; -count(*)-7 -0 -select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; -count(*)-7 -0 -select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; -count(*)-5 -0 -select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; -count(*)-5 -0 -select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; -count(*)-6 -0 -select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; -count(*)-8 -0 -select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; -count(*)-9 -0 -select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; -count(*)-9 -0 -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; -count(*)-7 -0 -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; -count(*)-7 -0 -select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; -count(*)-5 -0 -select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; -count(*)-5 -0 -select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; -count(*)-6 -0 -select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; -count(*)-8 -0 -select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; -count(*)-9 -0 -drop table t1; -create table t1 ( -a int primary key, -s decimal(12), -t decimal(12, 5), -u decimal(12) unsigned, -v decimal(12, 5) unsigned, -key (s), -key (t), -key (u), -key (v) -) engine=ndb; -insert into t1 values -( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042), -( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003), -( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488), -( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013), -( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002), -( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018), -( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001), -( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374), -( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000), -( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008); -select count(*)- 5 from t1 use index (s) where s < -000000000007; -count(*)- 5 -0 -select count(*)- 7 from t1 use index (s) where s <= -000000000007; -count(*)- 7 -0 -select count(*)- 2 from t1 use index (s) where s = -000000000007; -count(*)- 2 -0 -select count(*)- 5 from t1 use index (s) where s >= -000000000007; -count(*)- 5 -0 -select count(*)- 3 from t1 use index (s) where s > -000000000007; -count(*)- 3 -0 -select count(*)- 4 from t1 use index (t) where t < -0000061.00003; -count(*)- 4 -0 -select count(*)- 5 from t1 use index (t) where t <= -0000061.00003; -count(*)- 5 -0 -select count(*)- 1 from t1 use index (t) where t = -0000061.00003; -count(*)- 1 -0 -select count(*)- 6 from t1 use index (t) where t >= -0000061.00003; -count(*)- 6 -0 -select count(*)- 5 from t1 use index (t) where t > -0000061.00003; -count(*)- 5 -0 -select count(*)- 2 from t1 use index (u) where u < 000000000061; -count(*)- 2 -0 -select count(*)- 4 from t1 use index (u) where u <= 000000000061; -count(*)- 4 -0 -select count(*)- 2 from t1 use index (u) where u = 000000000061; -count(*)- 2 -0 -select count(*)- 8 from t1 use index (u) where u >= 000000000061; -count(*)- 8 -0 -select count(*)- 6 from t1 use index (u) where u > 000000000061; -count(*)- 6 -0 -select count(*)- 5 from t1 use index (v) where v < 0000965.00042; -count(*)- 5 -0 -select count(*)- 6 from t1 use index (v) where v <= 0000965.00042; -count(*)- 6 -0 -select count(*)- 1 from t1 use index (v) where v = 0000965.00042; -count(*)- 1 -0 -select count(*)- 5 from t1 use index (v) where v >= 0000965.00042; -count(*)- 5 -0 -select count(*)- 4 from t1 use index (v) where v > 0000965.00042; -count(*)- 4 -0 -drop table t1; -create table t1(a int primary key, b int not null, index(b)); -insert into t1 values (1,1), (2,2); -set autocommit=0; -begin; -select count(*) from t1; -count(*) -2 -ALTER TABLE t1 ADD COLUMN c int; -select a from t1 where b = 2; -a -2 -show tables; -Tables_in_test -t1 -drop table t1; -create table t1 (a int, c varchar(10), -primary key using hash (a), index(c)) engine=ndb; -insert into t1 (a, c) values (1,'aaa'),(3,'bbb'); -select count(*) from t1 where c<'bbb'; -count(*) -1 -drop table t1; -set autocommit=1; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 32 -ndb_index_stat_enable OFF -ndb_index_stat_update_freq 20 -set ndb_index_stat_enable = off; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 32 -ndb_index_stat_enable OFF -ndb_index_stat_update_freq 20 -create table t1 (a int, b int, c varchar(10) not null, -primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values -(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), -(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), -(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -count(*) -0 -select count(*) from t1 where b >= 10 and c >= 'bbb'; -count(*) -6 -select count(*) from t1 where b > 10; -count(*) -6 -select count(*) from t1 where b <= 20 and c < 'ccc'; -count(*) -4 -select count(*) from t1 where b = 20 and c = 'ccc'; -count(*) -1 -select count(*) from t1 where b > 20; -count(*) -3 -select count(*) from t1 where b = 30 and c > 'aaa'; -count(*) -2 -select count(*) from t1 where b <= 20; -count(*) -6 -select count(*) from t1 where b >= 20 and c > 'aaa'; -count(*) -4 -drop table t1; -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 0; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 0 -ndb_index_stat_enable ON -ndb_index_stat_update_freq 20 -create table t1 (a int, b int, c varchar(10) not null, -primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values -(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), -(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), -(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -count(*) -0 -select count(*) from t1 where b >= 10 and c >= 'bbb'; -count(*) -6 -select count(*) from t1 where b > 10; -count(*) -6 -select count(*) from t1 where b <= 20 and c < 'ccc'; -count(*) -4 -select count(*) from t1 where b = 20 and c = 'ccc'; -count(*) -1 -select count(*) from t1 where b > 20; -count(*) -3 -select count(*) from t1 where b = 30 and c > 'aaa'; -count(*) -2 -select count(*) from t1 where b <= 20; -count(*) -6 -select count(*) from t1 where b >= 20 and c > 'aaa'; -count(*) -4 -drop table t1; -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 4; -set ndb_index_stat_update_freq = 2; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 4 -ndb_index_stat_enable ON -ndb_index_stat_update_freq 2 -create table t1 (a int, b int, c varchar(10) not null, -primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values -(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), -(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), -(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -count(*) -0 -select count(*) from t1 where b >= 10 and c >= 'bbb'; -count(*) -6 -select count(*) from t1 where b > 10; -count(*) -6 -select count(*) from t1 where b <= 20 and c < 'ccc'; -count(*) -4 -select count(*) from t1 where b = 20 and c = 'ccc'; -count(*) -1 -select count(*) from t1 where b > 20; -count(*) -3 -select count(*) from t1 where b = 30 and c > 'aaa'; -count(*) -2 -select count(*) from t1 where b <= 20; -count(*) -6 -select count(*) from t1 where b >= 20 and c > 'aaa'; -count(*) -4 -drop table t1; -set ndb_index_stat_enable = @@global.ndb_index_stat_enable; -set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries; -set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq; -show session variables like 'ndb_index_stat_%'; -Variable_name Value -ndb_index_stat_cache_entries 32 -ndb_index_stat_enable OFF -ndb_index_stat_update_freq 20 -create table t1 (a int primary key) engine = ndb; -insert into t1 values (1), (2), (3); -begin; -delete from t1 where a > 1; -rollback; -select * from t1 order by a; -a -1 -2 -3 -begin; -delete from t1 where a > 1; -rollback; -begin; -select * from t1 order by a; -a -1 -2 -3 -delete from t1 where a > 2; -select * from t1 order by a; -a -1 -2 -delete from t1 where a > 1; -select * from t1 order by a; -a -1 -delete from t1 where a > 0; -select * from t1 order by a; -a -rollback; -select * from t1 order by a; -a -1 -2 -3 -delete from t1; -drop table t1; -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, -CountryCode char(3) NOT NULL, -DishTitle varchar(64) NOT NULL, -calories smallint(5) unsigned DEFAULT NULL, -PRIMARY KEY (DishID), -INDEX i USING HASH (countrycode,calories) -) ENGINE=ndbcluster; -ERROR HY000: Can't create table 'test.nationaldish' (errno: 138) -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, -CountryCode char(3) NOT NULL, -DishTitle varchar(64) NOT NULL, -calories smallint(5) unsigned DEFAULT NULL, -PRIMARY KEY (DishID) -) ENGINE=ndbcluster; -create index i on nationaldish(countrycode,calories) using hash; -ERROR 42000: Table 'nationaldish' uses an extension that doesn't exist in this MySQL version -drop table nationaldish; diff --git a/mysql-test/r/ndb_index_unique.result b/mysql-test/r/ndb_index_unique.result deleted file mode 100644 index cc63ce69760..00000000000 --- a/mysql-test/r/ndb_index_unique.result +++ /dev/null @@ -1,692 +0,0 @@ -drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; -CREATE TABLE t1 ( -a int NOT NULL PRIMARY KEY, -b int not null, -c int, -UNIQUE ib(b) -) engine=ndbcluster; -insert t1 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -select * from t1 where b = 4 order by b; -a b c -3 4 6 -insert into t1 values(7,8,3); -select * from t1 where b = 4 order by a; -a b c -3 4 6 -insert into t1 values(8, 2, 3); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -select * from t1 order by a; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -delete from t1 where a = 1; -insert into t1 values(8, 2, 3); -select * from t1 order by a; -a b c -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -8 2 3 -alter table t1 drop index ib; -insert into t1 values(1, 2, 3); -create unique index ib on t1(b); -ERROR 23000: Can't write, because of unique constraint, to table 't1' -drop table t1; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned, -c int unsigned, -UNIQUE bc(b,c) -) engine = ndb; -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc)order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (bc) order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 use index (PRIMARY) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL order by a; -a b c -2 NULL 2 -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -a b c -3 NULL NULL -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -a b c -2 NULL 2 -select * from t1 use index (bc) where b < 4 order by a; -a b c -1 1 1 -select * from t1 use index (bc) where b IS NOT NULL order by a; -a b c -1 1 1 -4 4 NULL -insert into t1 values(5,1,1); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -drop table t1; -CREATE TABLE t2 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned not null, -UNIQUE (b, c) USING HASH -) engine=ndbcluster; -insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t2 where a = 3; -a b c -3 4 6 -select * from t2 where b = 4; -a b c -3 4 6 -select * from t2 where c = 6; -a b c -3 4 6 -insert into t2 values(7,8,3); -select * from t2 where b = 4 order by a; -a b c -3 4 6 -insert into t2 values(8, 2, 3); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -select * from t2 order by a; -a b c -1 2 3 -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -delete from t2 where a = 1; -insert into t2 values(8, 2, 3); -select * from t2 order by a; -a b c -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -8 2 3 -create unique index bi using hash on t2(b); -insert into t2 values(9, 3, 1); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -alter table t2 drop index bi; -insert into t2 values(9, 3, 1); -select * from t2 order by a; -a b c -2 3 5 -3 4 6 -4 5 8 -5 6 2 -6 7 2 -7 8 3 -8 2 3 -9 3 1 -drop table t2; -CREATE TABLE t2 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned, -UNIQUE (b, c) USING HASH -) engine=ndbcluster; -Warnings: -Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan -insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL); -select * from t2 where c IS NULL order by a; -a b c -1 1 NULL -3 3 NULL -5 5 NULL -7 7 NULL -8 3 NULL -9 3 NULL -select * from t2 where b = 3 AND c IS NULL order by a; -a b c -3 3 NULL -8 3 NULL -9 3 NULL -select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a; -a b c -3 3 NULL -5 5 NULL -8 3 NULL -9 3 NULL -set @old_ecpd = @@session.engine_condition_pushdown; -set engine_condition_pushdown = true; -explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range PRIMARY,b PRIMARY 4 NULL 1 Using where with pushed condition -select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -a b c -3 3 NULL -5 5 NULL -8 3 NULL -set engine_condition_pushdown = @old_ecpd; -drop table t2; -CREATE TABLE t3 ( -a int unsigned NOT NULL, -b int unsigned not null, -c int unsigned, -PRIMARY KEY (a, b) USING HASH -) engine=ndbcluster; -insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t3 where a = 3; -a b c -3 4 6 -select * from t3 where b = 4; -a b c -3 4 6 -select * from t3 where c = 6; -a b c -3 4 6 -insert into t3 values(7,8,3); -select * from t3 where b = 4 order by a; -a b c -3 4 6 -drop table t3; -CREATE TABLE t1 ( -pk int NOT NULL PRIMARY KEY, -a int unsigned, -UNIQUE KEY (a) -) engine=ndbcluster; -insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); -select * from t1 order by pk; -pk a --1 NULL -0 0 -1 NULL -2 2 -3 NULL -4 4 -insert into t1 values (5,0); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -select * from t1 order by pk; -pk a --1 NULL -0 0 -1 NULL -2 2 -3 NULL -4 4 -delete from t1 where a = 0; -insert into t1 values (5,0); -select * from t1 order by pk; -pk a --1 NULL -1 NULL -2 2 -3 NULL -4 4 -5 0 -CREATE TABLE t2 ( -pk int NOT NULL PRIMARY KEY, -a int unsigned, -b tinyint NOT NULL, -c VARCHAR(10), -UNIQUE KEY si(a, c) -) engine=ndbcluster; -insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); -select * from t2 order by pk; -pk a b c --1 1 17 NULL -0 NULL 18 NULL -1 3 19 abc -insert into t2 values(2,3,19,'abc'); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -select * from t2 order by pk; -pk a b c --1 1 17 NULL -0 NULL 18 NULL -1 3 19 abc -delete from t2 where c IS NOT NULL; -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; -pk a b c --1 1 17 NULL -0 NULL 18 NULL -2 3 19 abc -drop table t1, t2; -CREATE TABLE t1 ( -cid smallint(5) unsigned NOT NULL default '0', -cv varchar(250) NOT NULL default '', -PRIMARY KEY (cid), -UNIQUE KEY cv (cv) -) engine=ndbcluster; -INSERT INTO t1 VALUES (8,'dummy'); -CREATE TABLE t2 ( -cid bigint(20) unsigned NOT NULL auto_increment, -cap varchar(255) NOT NULL default '', -PRIMARY KEY (cid), -UNIQUE KEY (cid, cap) -) engine=ndbcluster; -INSERT INTO t2 VALUES (NULL,'another dummy'); -CREATE TABLE t3 ( -gid bigint(20) unsigned NOT NULL auto_increment, -gn varchar(255) NOT NULL default '', -must tinyint(4) default NULL, -PRIMARY KEY (gid) -) engine=ndbcluster; -INSERT INTO t3 VALUES (1,'V1',NULL); -CREATE TABLE t4 ( -uid bigint(20) unsigned NOT NULL default '0', -gid bigint(20) unsigned NOT NULL, -rid bigint(20) unsigned NOT NULL, -cid bigint(20) unsigned NOT NULL, -UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t4 VALUES (1,1,2,4); -INSERT INTO t4 VALUES (1,1,2,3); -INSERT INTO t4 VALUES (1,1,5,7); -INSERT INTO t4 VALUES (1,1,10,8); -CREATE TABLE t5 ( -rid bigint(20) unsigned NOT NULL auto_increment, -rl varchar(255) NOT NULL default '', -PRIMARY KEY (rid) -) engine=ndbcluster; -CREATE TABLE t6 ( -uid bigint(20) unsigned NOT NULL auto_increment, -un varchar(250) NOT NULL default '', -uc smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (uid), -UNIQUE KEY nc (un,uc) -) engine=ndbcluster; -INSERT INTO t6 VALUES (1,'test',8); -INSERT INTO t6 VALUES (2,'test2',9); -INSERT INTO t6 VALUES (3,'tre',3); -CREATE TABLE t7 ( -mid bigint(20) unsigned NOT NULL PRIMARY KEY, -uid bigint(20) unsigned NOT NULL default '0', -gid bigint(20) unsigned NOT NULL, -rid bigint(20) unsigned NOT NULL, -cid bigint(20) unsigned NOT NULL, -UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t7 VALUES(1, 1, 1, 1, 1); -INSERT INTO t7 VALUES(2, 2, 1, 1, 1); -INSERT INTO t7 VALUES(3, 3, 1, 1, 1); -INSERT INTO t7 VALUES(4, 4, 1, 1, 1); -INSERT INTO t7 VALUES(5, 5, 1, 1, 1); -INSERT INTO t7 VALUES(6, 1, 1, 1, 6); -INSERT INTO t7 VALUES(7, 2, 1, 1, 7); -INSERT INTO t7 VALUES(8, 3, 1, 1, 8); -INSERT INTO t7 VALUES(9, 4, 1, 1, 9); -INSERT INTO t7 VALUES(10, 5, 1, 1, 10); -select * from t1 where cv = 'dummy'; -cid cv -8 dummy -select * from t1 where cv = 'test'; -cid cv -select * from t2 where cap = 'another dummy'; -cid cap -1 another dummy -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -uid gid rid cid -1 1 2 4 -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -uid gid rid cid -select * from t4 where uid = 1 order by cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -1 1 5 7 -1 1 10 8 -select * from t4 where rid = 2 order by cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -select * from t6 where un='test' and uc=8; -uid un uc -1 test 8 -select * from t6 where un='test' and uc=7; -uid un uc -select * from t6 where un='test'; -uid un uc -1 test 8 -select * from t7 where mid = 8; -mid uid gid rid cid -8 3 1 1 8 -select * from t7 where uid = 8; -mid uid gid rid cid -select * from t7 where uid = 1 order by mid; -mid uid gid rid cid -1 1 1 1 1 -6 1 1 1 6 -select * from t7 where uid = 4 order by mid; -mid uid gid rid cid -4 4 1 1 1 -9 4 1 1 9 -select * from t7 where gid = 4; -mid uid gid rid cid -select * from t7 where gid = 1 order by mid; -mid uid gid rid cid -1 1 1 1 1 -2 2 1 1 1 -3 3 1 1 1 -4 4 1 1 1 -5 5 1 1 1 -6 1 1 1 6 -7 2 1 1 7 -8 3 1 1 8 -9 4 1 1 9 -10 5 1 1 10 -select * from t7 where cid = 4; -mid uid gid rid cid -select * from t7 where cid = 8; -mid uid gid rid cid -8 3 1 1 8 -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -uid gid rid cid -1 1 2 4 -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -uid gid rid cid -select * from t4 where uid = 1 order by gid,cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -1 1 5 7 -1 1 10 8 -1 1 5 12 -1 2 5 12 -1 3 9 11 -1 3 5 12 -1 4 5 12 -1 5 5 12 -1 6 5 12 -1 7 5 12 -1 8 5 12 -1 9 5 12 -1 10 5 12 -1 11 5 12 -1 12 5 12 -1 13 5 12 -1 14 5 12 -1 15 5 12 -1 16 5 12 -1 17 5 12 -1 18 5 12 -1 19 5 12 -1 20 5 12 -1 21 5 12 -1 22 5 12 -1 23 5 12 -1 24 5 12 -1 25 5 12 -1 26 5 12 -1 27 5 12 -1 28 5 12 -1 29 5 12 -1 30 5 12 -1 31 5 12 -1 32 5 12 -1 33 5 12 -1 34 5 12 -1 35 5 12 -1 36 5 12 -1 37 5 12 -1 38 5 12 -1 39 5 12 -1 40 5 12 -1 41 5 12 -1 42 5 12 -1 43 5 12 -1 44 5 12 -1 45 5 12 -1 46 5 12 -1 47 5 12 -1 48 5 12 -1 49 5 12 -1 50 5 12 -1 51 5 12 -1 52 5 12 -1 53 5 12 -1 54 5 12 -1 55 5 12 -1 56 5 12 -1 57 5 12 -1 58 5 12 -1 59 5 12 -1 60 5 12 -1 61 5 12 -1 62 5 12 -1 63 5 12 -1 64 5 12 -1 65 5 12 -1 66 5 12 -1 67 5 12 -1 68 5 12 -1 69 5 12 -1 70 5 12 -1 71 5 12 -1 72 5 12 -1 73 5 12 -1 74 5 12 -1 75 5 12 -1 76 5 12 -1 77 5 12 -1 78 5 12 -1 79 5 12 -1 80 5 12 -1 81 5 12 -1 82 5 12 -1 83 5 12 -1 84 5 12 -1 85 5 12 -1 86 5 12 -1 87 5 12 -1 88 5 12 -1 89 5 12 -1 90 5 12 -1 91 5 12 -1 92 5 12 -1 93 5 12 -1 94 5 12 -1 95 5 12 -1 96 5 12 -1 97 5 12 -1 98 5 12 -1 99 5 12 -1 100 5 12 -select * from t4 where uid = 1 order by gid,cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -1 1 5 7 -1 1 10 8 -1 1 5 12 -1 2 5 12 -1 3 9 11 -1 3 5 12 -1 4 5 12 -1 5 5 12 -1 6 5 12 -1 7 5 12 -1 8 5 12 -1 9 5 12 -1 10 5 12 -1 11 5 12 -1 12 5 12 -1 13 5 12 -1 14 5 12 -1 15 5 12 -1 16 5 12 -1 17 5 12 -1 18 5 12 -1 19 5 12 -1 20 5 12 -1 21 5 12 -1 22 5 12 -1 23 5 12 -1 24 5 12 -1 25 5 12 -1 26 5 12 -1 27 5 12 -1 28 5 12 -1 29 5 12 -1 30 5 12 -1 31 5 12 -1 32 5 12 -1 33 5 12 -1 34 5 12 -1 35 5 12 -1 36 5 12 -1 37 5 12 -1 38 5 12 -1 39 5 12 -1 40 5 12 -1 41 5 12 -1 42 5 12 -1 43 5 12 -1 44 5 12 -1 45 5 12 -1 46 5 12 -1 47 5 12 -1 48 5 12 -1 49 5 12 -1 50 5 12 -1 51 5 12 -1 52 5 12 -1 53 5 12 -1 54 5 12 -1 55 5 12 -1 56 5 12 -1 57 5 12 -1 58 5 12 -1 59 5 12 -1 60 5 12 -1 61 5 12 -1 62 5 12 -1 63 5 12 -1 64 5 12 -1 65 5 12 -1 66 5 12 -1 67 5 12 -1 68 5 12 -1 69 5 12 -1 70 5 12 -1 71 5 12 -1 72 5 12 -1 73 5 12 -1 74 5 12 -1 75 5 12 -1 76 5 12 -1 77 5 12 -1 78 5 12 -1 79 5 12 -1 80 5 12 -1 81 5 12 -1 82 5 12 -1 83 5 12 -1 84 5 12 -1 85 5 12 -1 86 5 12 -1 87 5 12 -1 88 5 12 -1 89 5 12 -1 90 5 12 -1 91 5 12 -1 92 5 12 -1 93 5 12 -1 94 5 12 -1 95 5 12 -1 96 5 12 -1 97 5 12 -1 98 5 12 -1 99 5 12 -1 100 5 12 -select * from t4 where rid = 2 order by cid; -uid gid rid cid -1 1 2 3 -1 1 2 4 -drop table t1,t2,t3,t4,t5,t6,t7; -CREATE TABLE t1 ( -a int unsigned NOT NULL PRIMARY KEY, -b int unsigned, -c int unsigned, -UNIQUE bc(b,c) ) engine = ndb; -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 where b=1 and c=1; -a b c -1 1 1 -select * from t1 where b is null and c is null; -a b c -3 NULL NULL -select * from t1 where b is null and c = 2; -a b c -2 NULL 2 -select * from t1 where b = 4 and c is null; -a b c -4 4 NULL -create table t8 as -select * from t1 where (b = 1 and c = 1) -or (b is null and c is null) -or (b is null and c = 2) -or (b = 4 and c is null); -select * from t8 order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -select * from t1 order by a; -a b c -1 1 1 -2 NULL 2 -3 NULL NULL -4 4 NULL -drop table t1, t8; -create table t1( -id integer not null auto_increment, -month integer not null, -year integer not null, -code varchar( 2) not null, -primary key ( id), -unique idx_t1( month, code, year) -) engine=ndb; -INSERT INTO t1 (month, year, code) VALUES (4,2004,'12'); -INSERT INTO t1 (month, year, code) VALUES (5,2004,'12'); -select * from t1 where code = '12' and month = 4 and year = 2004 ; -id month year code -1 4 2004 12 -drop table t1; -create table t1 (a int primary key, b varchar(1000) not null, unique key (b)) -engine=ndb charset=utf8; -insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200)); -insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200)); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -select a, sha1(b) from t1; -a sha1(b) -1 08f5d02c8b8bc244f275bdfc22c42c5cab0d9d7d -drop table t1; -create table t1(id int not null) engine = NDB; -alter table t1 add constraint uk_test unique (id) using hash; -drop table t1; diff --git a/mysql-test/r/ndb_insert.result b/mysql-test/r/ndb_insert.result deleted file mode 100644 index 51b346bbf7b..00000000000 --- a/mysql-test/r/ndb_insert.result +++ /dev/null @@ -1,828 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -b INT NOT NULL, -c INT NOT NULL -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; -pk1 b c -0 0 0 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); -SELECT COUNT(*) FROM t1; -COUNT(*) -501 -INSERT INTO t1 VALUES -(501,501,501),(502,502,502),(503,503,503),(504,504,504),(505,505,505), -(506,506,506),(507,507,507),(508,508,508),(509,509,509),(510,510,510), -(511,511,511),(512,512,512),(513,513,513),(514,514,514),(515,515,515), -(516,516,516),(517,517,517),(518,518,518),(519,519,519),(520,520,520), -(521,521,521),(522,522,522),(523,523,523),(524,524,524),(525,525,525), -(526,526,526),(527,527,527),(528,528,528),(529,529,529),(530,530,530), -(531,531,531),(532,532,532),(533,533,533),(534,534,534),(535,535,535), -(536,536,536),(537,537,537),(538,538,538),(539,539,539),(540,540,540), -(541,541,541),(542,542,542),(543,543,543),(544,544,544),(545,545,545), -(546,546,546),(547,547,547),(548,548,548),(549,549,549),(550,550,550), -(551,551,551),(552,552,552),(553,553,553),(554,554,554),(555,555,555), -(556,556,556),(557,557,557),(558,558,558),(559,559,559),(560,560,560), -(561,561,561),(562,562,562),(563,563,563),(564,564,564),(565,565,565), -(566,566,566),(567,567,567),(568,568,568),(569,569,569),(570,570,570), -(571,571,571),(572,572,572),(573,573,573),(574,574,574),(575,575,575), -(576,576,576),(577,577,577),(578,578,578),(579,579,579),(580,580,580), -(581,581,581),(582,582,582),(583,583,583),(584,584,584),(585,585,585), -(586,586,586),(587,587,587),(588,588,588),(589,589,589),(590,590,590), -(591,591,591),(592,592,592),(593,593,593),(594,594,594),(595,595,595), -(596,596,596),(597,597,597),(598,598,598),(599,599,599),(600,600,600), -(601,601,601),(602,602,602),(603,603,603),(604,604,604),(605,605,605), -(606,606,606),(607,607,607),(608,608,608),(609,609,609),(610,610,610), -(611,611,611),(612,612,612),(613,613,613),(614,614,614),(615,615,615), -(616,616,616),(617,617,617),(618,618,618),(619,619,619),(620,620,620), -(621,621,621),(622,622,622),(623,623,623),(624,624,624),(625,625,625), -(626,626,626),(627,627,627),(628,628,628),(629,629,629),(630,630,630), -(631,631,631),(632,632,632),(633,633,633),(634,634,634),(635,635,635), -(636,636,636),(637,637,637),(638,638,638),(639,639,639),(640,640,640), -(641,641,641),(642,642,642),(643,643,643),(644,644,644),(645,645,645), -(646,646,646),(647,647,647),(648,648,648),(649,649,649),(650,650,650), -(651,651,651),(652,652,652),(653,653,653),(654,654,654),(655,655,655), -(656,656,656),(657,657,657),(658,658,658),(659,659,659),(660,660,660), -(661,661,661),(662,662,662),(663,663,663),(664,664,664),(665,665,665), -(666,666,666),(667,667,667),(668,668,668),(669,669,669),(670,670,670), -(671,671,671),(672,672,672),(673,673,673),(674,674,674),(675,675,675), -(676,676,676),(677,677,677),(678,678,678),(679,679,679),(680,680,680), -(681,681,681),(682,682,682),(683,683,683),(684,684,684),(685,685,685), -(686,686,686),(687,687,687),(688,688,688),(689,689,689),(690,690,690), -(691,691,691),(692,692,692),(693,693,693),(694,694,694),(695,695,695), -(696,696,696),(697,697,697),(698,698,698),(699,699,699),(700,700,700), -(701,701,701),(702,702,702),(703,703,703),(704,704,704),(705,705,705), -(706,706,706),(707,707,707),(708,708,708),(709,709,709),(710,710,710), -(711,711,711),(712,712,712),(713,713,713),(714,714,714),(715,715,715), -(716,716,716),(717,717,717),(718,718,718),(719,719,719),(720,720,720), -(721,721,721),(722,722,722),(723,723,723),(724,724,724),(725,725,725), -(726,726,726),(727,727,727),(728,728,728),(729,729,729),(730,730,730), -(731,731,731),(732,732,732),(733,733,733),(734,734,734),(735,735,735), -(736,736,736),(737,737,737),(738,738,738),(739,739,739),(740,740,740), -(741,741,741),(742,742,742),(743,743,743),(744,744,744),(745,745,745), -(746,746,746),(747,747,747),(748,748,748),(749,749,749),(750,750,750), -(751,751,751),(752,752,752),(753,753,753),(754,754,754),(755,755,755), -(756,756,756),(757,757,757),(758,758,758),(759,759,759),(760,760,760), -(761,761,761),(762,762,762),(763,763,763),(764,764,764),(765,765,765), -(766,766,766),(767,767,767),(768,768,768),(769,769,769),(770,770,770), -(771,771,771),(772,772,772),(773,773,773),(774,774,774),(775,775,775), -(776,776,776),(777,777,777),(778,778,778),(779,779,779),(780,780,780), -(781,781,781),(782,782,782),(783,783,783),(784,784,784),(785,785,785), -(786,786,786),(787,787,787),(788,788,788),(789,789,789),(790,790,790), -(791,791,791),(792,792,792),(793,793,793),(794,794,794),(795,795,795), -(796,796,796),(797,797,797),(798,798,798),(799,799,799),(800,800,800), -(801,801,801),(802,802,802),(803,803,803),(804,804,804),(805,805,805), -(806,806,806),(807,807,807),(808,808,808),(809,809,809),(810,810,810), -(811,811,811),(812,812,812),(813,813,813),(814,814,814),(815,815,815), -(816,816,816),(817,817,817),(818,818,818),(819,819,819),(820,820,820), -(821,821,821),(822,822,822),(823,823,823),(824,824,824),(825,825,825), -(826,826,826),(827,827,827),(828,828,828),(829,829,829),(830,830,830), -(831,831,831),(832,832,832),(833,833,833),(834,834,834),(835,835,835), -(836,836,836),(837,837,837),(838,838,838),(839,839,839),(840,840,840), -(841,841,841),(842,842,842),(843,843,843),(844,844,844),(845,845,845), -(846,846,846),(847,847,847),(848,848,848),(849,849,849),(850,850,850), -(851,851,851),(852,852,852),(853,853,853),(854,854,854),(855,855,855), -(856,856,856),(857,857,857),(858,858,858),(859,859,859),(860,860,860), -(861,861,861),(862,862,862),(863,863,863),(864,864,864),(865,865,865), -(866,866,866),(867,867,867),(868,868,868),(869,869,869),(870,870,870), -(871,871,871),(872,872,872),(873,873,873),(874,874,874),(875,875,875), -(876,876,876),(877,877,877),(878,878,878),(879,879,879),(880,880,880), -(881,881,881),(882,882,882),(883,883,883),(884,884,884),(885,885,885), -(886,886,886),(887,887,887),(888,888,888),(889,889,889),(890,890,890), -(891,891,891),(892,892,892),(893,893,893),(894,894,894),(895,895,895), -(896,896,896),(897,897,897),(898,898,898),(899,899,899),(900,900,900), -(901,901,901),(902,902,902),(903,903,903),(904,904,904),(905,905,905), -(906,906,906),(907,907,907),(908,908,908),(909,909,909),(910,910,910), -(911,911,911),(912,912,912),(913,913,913),(914,914,914),(915,915,915), -(916,916,916),(917,917,917),(918,918,918),(919,919,919),(920,920,920), -(921,921,921),(922,922,922),(923,923,923),(924,924,924),(925,925,925), -(926,926,926),(927,927,927),(928,928,928),(929,929,929),(930,930,930), -(931,931,931),(932,932,932),(933,933,933),(934,934,934),(935,935,935), -(936,936,936),(937,937,937),(938,938,938),(939,939,939),(940,940,940), -(941,941,941),(942,942,942),(943,943,943),(944,944,944),(945,945,945), -(946,946,946),(947,947,947),(948,948,948),(949,949,949),(950,950,950), -(951,951,951),(952,952,952),(953,953,953),(954,954,954),(955,955,955), -(956,956,956),(957,957,957),(958,958,958),(959,959,959),(960,960,960), -(961,961,961),(962,962,962),(963,963,963),(964,964,964),(965,965,965), -(966,966,966),(967,967,967),(968,968,968),(969,969,969),(970,970,970), -(971,971,971),(972,972,972),(973,973,973),(974,974,974),(975,975,975), -(976,976,976),(977,977,977),(978,978,978),(979,979,979),(980,980,980), -(981,981,981),(982,982,982),(983,983,983),(984,984,984),(985,985,985), -(986,986,986),(987,987,987),(988,988,988),(989,989,989),(990,990,990), -(991,991,991),(992,992,992),(993,993,993),(994,994,994),(995,995,995), -(996,996,996),(997,997,997),(998,998,998),(999,999,999),(1000,1000,1000), -(1001,1001,1001),(1002,1002,1002),(1003,1003,1003),(1004,1004,1004),(1005,1005,1005), -(1006,1006,1006),(1007,1007,1007),(1008,1008,1008),(1009,1009,1009),(1010,1010,1010), -(1011,1011,1011),(1012,1012,1012),(1013,1013,1013),(1014,1014,1014),(1015,1015,1015), -(1016,1016,1016),(1017,1017,1017),(1018,1018,1018),(1019,1019,1019),(1020,1020,1020), -(1021,1021,1021),(1022,1022,1022),(1023,1023,1023),(1024,1024,1024),(1025,1025,1025), -(1026,1026,1026),(1027,1027,1027),(1028,1028,1028),(1029,1029,1029),(1030,1030,1030), -(1031,1031,1031),(1032,1032,1032),(1033,1033,1033),(1034,1034,1034),(1035,1035,1035), -(1036,1036,1036),(1037,1037,1037),(1038,1038,1038),(1039,1039,1039),(1040,1040,1040), -(1041,1041,1041),(1042,1042,1042),(1043,1043,1043),(1044,1044,1044),(1045,1045,1045), -(1046,1046,1046),(1047,1047,1047),(1048,1048,1048),(1049,1049,1049),(1050,1050,1050), -(1051,1051,1051),(1052,1052,1052),(1053,1053,1053),(1054,1054,1054),(1055,1055,1055), -(1056,1056,1056),(1057,1057,1057),(1058,1058,1058),(1059,1059,1059),(1060,1060,1060), -(1061,1061,1061),(1062,1062,1062),(1063,1063,1063),(1064,1064,1064),(1065,1065,1065), -(1066,1066,1066),(1067,1067,1067),(1068,1068,1068),(1069,1069,1069),(1070,1070,1070), -(1071,1071,1071),(1072,1072,1072),(1073,1073,1073),(1074,1074,1074),(1075,1075,1075), -(1076,1076,1076),(1077,1077,1077),(1078,1078,1078),(1079,1079,1079),(1080,1080,1080), -(1081,1081,1081),(1082,1082,1082),(1083,1083,1083),(1084,1084,1084),(1085,1085,1085), -(1086,1086,1086),(1087,1087,1087),(1088,1088,1088),(1089,1089,1089),(1090,1090,1090), -(1091,1091,1091),(1092,1092,1092),(1093,1093,1093),(1094,1094,1094),(1095,1095,1095), -(1096,1096,1096),(1097,1097,1097),(1098,1098,1098),(1099,1099,1099),(1100,1100,1100), -(1101,1101,1101),(1102,1102,1102),(1103,1103,1103),(1104,1104,1104),(1105,1105,1105), -(1106,1106,1106),(1107,1107,1107),(1108,1108,1108),(1109,1109,1109),(1110,1110,1110), -(1111,1111,1111),(1112,1112,1112),(1113,1113,1113),(1114,1114,1114),(1115,1115,1115), -(1116,1116,1116),(1117,1117,1117),(1118,1118,1118),(1119,1119,1119),(1120,1120,1120), -(1121,1121,1121),(1122,1122,1122),(1123,1123,1123),(1124,1124,1124),(1125,1125,1125), -(1126,1126,1126),(1127,1127,1127),(1128,1128,1128),(1129,1129,1129),(1130,1130,1130), -(1131,1131,1131),(1132,1132,1132),(1133,1133,1133),(1134,1134,1134),(1135,1135,1135), -(1136,1136,1136),(1137,1137,1137),(1138,1138,1138),(1139,1139,1139),(1140,1140,1140), -(1141,1141,1141),(1142,1142,1142),(1143,1143,1143),(1144,1144,1144),(1145,1145,1145), -(1146,1146,1146),(1147,1147,1147),(1148,1148,1148),(1149,1149,1149),(1150,1150,1150), -(1151,1151,1151),(1152,1152,1152),(1153,1153,1153),(1154,1154,1154),(1155,1155,1155), -(1156,1156,1156),(1157,1157,1157),(1158,1158,1158),(1159,1159,1159),(1160,1160,1160), -(1161,1161,1161),(1162,1162,1162),(1163,1163,1163),(1164,1164,1164),(1165,1165,1165), -(1166,1166,1166),(1167,1167,1167),(1168,1168,1168),(1169,1169,1169),(1170,1170,1170), -(1171,1171,1171),(1172,1172,1172),(1173,1173,1173),(1174,1174,1174),(1175,1175,1175), -(1176,1176,1176),(1177,1177,1177),(1178,1178,1178),(1179,1179,1179),(1180,1180,1180), -(1181,1181,1181),(1182,1182,1182),(1183,1183,1183),(1184,1184,1184),(1185,1185,1185), -(1186,1186,1186),(1187,1187,1187),(1188,1188,1188),(1189,1189,1189),(1190,1190,1190), -(1191,1191,1191),(1192,1192,1192),(1193,1193,1193),(1194,1194,1194),(1195,1195,1195), -(1196,1196,1196),(1197,1197,1197),(1198,1198,1198),(1199,1199,1199),(1200,1200,1200), -(1201,1201,1201),(1202,1202,1202),(1203,1203,1203),(1204,1204,1204),(1205,1205,1205), -(1206,1206,1206),(1207,1207,1207),(1208,1208,1208),(1209,1209,1209),(1210,1210,1210), -(1211,1211,1211),(1212,1212,1212),(1213,1213,1213),(1214,1214,1214),(1215,1215,1215), -(1216,1216,1216),(1217,1217,1217),(1218,1218,1218),(1219,1219,1219),(1220,1220,1220), -(1221,1221,1221),(1222,1222,1222),(1223,1223,1223),(1224,1224,1224),(1225,1225,1225), -(1226,1226,1226),(1227,1227,1227),(1228,1228,1228),(1229,1229,1229),(1230,1230,1230), -(1231,1231,1231),(1232,1232,1232),(1233,1233,1233),(1234,1234,1234),(1235,1235,1235), -(1236,1236,1236),(1237,1237,1237),(1238,1238,1238),(1239,1239,1239),(1240,1240,1240), -(1241,1241,1241),(1242,1242,1242),(1243,1243,1243),(1244,1244,1244),(1245,1245,1245), -(1246,1246,1246),(1247,1247,1247),(1248,1248,1248),(1249,1249,1249),(1250,1250,1250), -(1251,1251,1251),(1252,1252,1252),(1253,1253,1253),(1254,1254,1254),(1255,1255,1255), -(1256,1256,1256),(1257,1257,1257),(1258,1258,1258),(1259,1259,1259),(1260,1260,1260), -(1261,1261,1261),(1262,1262,1262),(1263,1263,1263),(1264,1264,1264),(1265,1265,1265), -(1266,1266,1266),(1267,1267,1267),(1268,1268,1268),(1269,1269,1269),(1270,1270,1270), -(1271,1271,1271),(1272,1272,1272),(1273,1273,1273),(1274,1274,1274),(1275,1275,1275), -(1276,1276,1276),(1277,1277,1277),(1278,1278,1278),(1279,1279,1279),(1280,1280,1280), -(1281,1281,1281),(1282,1282,1282),(1283,1283,1283),(1284,1284,1284),(1285,1285,1285), -(1286,1286,1286),(1287,1287,1287),(1288,1288,1288),(1289,1289,1289),(1290,1290,1290), -(1291,1291,1291),(1292,1292,1292),(1293,1293,1293),(1294,1294,1294),(1295,1295,1295), -(1296,1296,1296),(1297,1297,1297),(1298,1298,1298),(1299,1299,1299),(1300,1300,1300), -(1301,1301,1301),(1302,1302,1302),(1303,1303,1303),(1304,1304,1304),(1305,1305,1305), -(1306,1306,1306),(1307,1307,1307),(1308,1308,1308),(1309,1309,1309),(1310,1310,1310), -(1311,1311,1311),(1312,1312,1312),(1313,1313,1313),(1314,1314,1314),(1315,1315,1315), -(1316,1316,1316),(1317,1317,1317),(1318,1318,1318),(1319,1319,1319),(1320,1320,1320), -(1321,1321,1321),(1322,1322,1322),(1323,1323,1323),(1324,1324,1324),(1325,1325,1325), -(1326,1326,1326),(1327,1327,1327),(1328,1328,1328),(1329,1329,1329),(1330,1330,1330), -(1331,1331,1331),(1332,1332,1332),(1333,1333,1333),(1334,1334,1334),(1335,1335,1335), -(1336,1336,1336),(1337,1337,1337),(1338,1338,1338),(1339,1339,1339),(1340,1340,1340), -(1341,1341,1341),(1342,1342,1342),(1343,1343,1343),(1344,1344,1344),(1345,1345,1345), -(1346,1346,1346),(1347,1347,1347),(1348,1348,1348),(1349,1349,1349),(1350,1350,1350), -(1351,1351,1351),(1352,1352,1352),(1353,1353,1353),(1354,1354,1354),(1355,1355,1355), -(1356,1356,1356),(1357,1357,1357),(1358,1358,1358),(1359,1359,1359),(1360,1360,1360), -(1361,1361,1361),(1362,1362,1362),(1363,1363,1363),(1364,1364,1364),(1365,1365,1365), -(1366,1366,1366),(1367,1367,1367),(1368,1368,1368),(1369,1369,1369),(1370,1370,1370), -(1371,1371,1371),(1372,1372,1372),(1373,1373,1373),(1374,1374,1374),(1375,1375,1375), -(1376,1376,1376),(1377,1377,1377),(1378,1378,1378),(1379,1379,1379),(1380,1380,1380), -(1381,1381,1381),(1382,1382,1382),(1383,1383,1383),(1384,1384,1384),(1385,1385,1385), -(1386,1386,1386),(1387,1387,1387),(1388,1388,1388),(1389,1389,1389),(1390,1390,1390), -(1391,1391,1391),(1392,1392,1392),(1393,1393,1393),(1394,1394,1394),(1395,1395,1395), -(1396,1396,1396),(1397,1397,1397),(1398,1398,1398),(1399,1399,1399),(1400,1400,1400), -(1401,1401,1401),(1402,1402,1402),(1403,1403,1403),(1404,1404,1404),(1405,1405,1405), -(1406,1406,1406),(1407,1407,1407),(1408,1408,1408),(1409,1409,1409),(1410,1410,1410), -(1411,1411,1411),(1412,1412,1412),(1413,1413,1413),(1414,1414,1414),(1415,1415,1415), -(1416,1416,1416),(1417,1417,1417),(1418,1418,1418),(1419,1419,1419),(1420,1420,1420), -(1421,1421,1421),(1422,1422,1422),(1423,1423,1423),(1424,1424,1424),(1425,1425,1425), -(1426,1426,1426),(1427,1427,1427),(1428,1428,1428),(1429,1429,1429),(1430,1430,1430), -(1431,1431,1431),(1432,1432,1432),(1433,1433,1433),(1434,1434,1434),(1435,1435,1435), -(1436,1436,1436),(1437,1437,1437),(1438,1438,1438),(1439,1439,1439),(1440,1440,1440), -(1441,1441,1441),(1442,1442,1442),(1443,1443,1443),(1444,1444,1444),(1445,1445,1445), -(1446,1446,1446),(1447,1447,1447),(1448,1448,1448),(1449,1449,1449),(1450,1450,1450), -(1451,1451,1451),(1452,1452,1452),(1453,1453,1453),(1454,1454,1454),(1455,1455,1455), -(1456,1456,1456),(1457,1457,1457),(1458,1458,1458),(1459,1459,1459),(1460,1460,1460), -(1461,1461,1461),(1462,1462,1462),(1463,1463,1463),(1464,1464,1464),(1465,1465,1465), -(1466,1466,1466),(1467,1467,1467),(1468,1468,1468),(1469,1469,1469),(1470,1470,1470), -(1471,1471,1471),(1472,1472,1472),(1473,1473,1473),(1474,1474,1474),(1475,1475,1475), -(1476,1476,1476),(1477,1477,1477),(1478,1478,1478),(1479,1479,1479),(1480,1480,1480), -(1481,1481,1481),(1482,1482,1482),(1483,1483,1483),(1484,1484,1484),(1485,1485,1485), -(1486,1486,1486),(1487,1487,1487),(1488,1488,1488),(1489,1489,1489),(1490,1490,1490), -(1491,1491,1491),(1492,1492,1492),(1493,1493,1493),(1494,1494,1494),(1495,1495,1495), -(1496,1496,1496),(1497,1497,1497),(1498,1498,1498),(1499,1499,1499),(1500,1500,1500), -(1501,1501,1501),(1502,1502,1502),(1503,1503,1503),(1504,1504,1504),(1505,1505,1505), -(1506,1506,1506),(1507,1507,1507),(1508,1508,1508),(1509,1509,1509),(1510,1510,1510), -(1511,1511,1511),(1512,1512,1512),(1513,1513,1513),(1514,1514,1514),(1515,1515,1515), -(1516,1516,1516),(1517,1517,1517),(1518,1518,1518),(1519,1519,1519),(1520,1520,1520), -(1521,1521,1521),(1522,1522,1522),(1523,1523,1523),(1524,1524,1524),(1525,1525,1525), -(1526,1526,1526),(1527,1527,1527),(1528,1528,1528),(1529,1529,1529),(1530,1530,1530), -(1531,1531,1531),(1532,1532,1532),(1533,1533,1533),(1534,1534,1534),(1535,1535,1535), -(1536,1536,1536),(1537,1537,1537),(1538,1538,1538),(1539,1539,1539),(1540,1540,1540), -(1541,1541,1541),(1542,1542,1542),(1543,1543,1543),(1544,1544,1544),(1545,1545,1545), -(1546,1546,1546),(1547,1547,1547),(1548,1548,1548),(1549,1549,1549),(1550,1550,1550), -(1551,1551,1551),(1552,1552,1552),(1553,1553,1553),(1554,1554,1554),(1555,1555,1555), -(1556,1556,1556),(1557,1557,1557),(1558,1558,1558),(1559,1559,1559),(1560,1560,1560), -(1561,1561,1561),(1562,1562,1562),(1563,1563,1563),(1564,1564,1564),(1565,1565,1565), -(1566,1566,1566),(1567,1567,1567),(1568,1568,1568),(1569,1569,1569),(1570,1570,1570), -(1571,1571,1571),(1572,1572,1572),(1573,1573,1573),(1574,1574,1574),(1575,1575,1575), -(1576,1576,1576),(1577,1577,1577),(1578,1578,1578),(1579,1579,1579),(1580,1580,1580), -(1581,1581,1581),(1582,1582,1582),(1583,1583,1583),(1584,1584,1584),(1585,1585,1585), -(1586,1586,1586),(1587,1587,1587),(1588,1588,1588),(1589,1589,1589),(1590,1590,1590), -(1591,1591,1591),(1592,1592,1592),(1593,1593,1593),(1594,1594,1594),(1595,1595,1595), -(1596,1596,1596),(1597,1597,1597),(1598,1598,1598),(1599,1599,1599),(1600,1600,1600), -(1601,1601,1601),(1602,1602,1602),(1603,1603,1603),(1604,1604,1604),(1605,1605,1605), -(1606,1606,1606),(1607,1607,1607),(1608,1608,1608),(1609,1609,1609),(1610,1610,1610), -(1611,1611,1611),(1612,1612,1612),(1613,1613,1613),(1614,1614,1614),(1615,1615,1615), -(1616,1616,1616),(1617,1617,1617),(1618,1618,1618),(1619,1619,1619),(1620,1620,1620), -(1621,1621,1621),(1622,1622,1622),(1623,1623,1623),(1624,1624,1624),(1625,1625,1625), -(1626,1626,1626),(1627,1627,1627),(1628,1628,1628),(1629,1629,1629),(1630,1630,1630), -(1631,1631,1631),(1632,1632,1632),(1633,1633,1633),(1634,1634,1634),(1635,1635,1635), -(1636,1636,1636),(1637,1637,1637),(1638,1638,1638),(1639,1639,1639),(1640,1640,1640), -(1641,1641,1641),(1642,1642,1642),(1643,1643,1643),(1644,1644,1644),(1645,1645,1645), -(1646,1646,1646),(1647,1647,1647),(1648,1648,1648),(1649,1649,1649),(1650,1650,1650), -(1651,1651,1651),(1652,1652,1652),(1653,1653,1653),(1654,1654,1654),(1655,1655,1655), -(1656,1656,1656),(1657,1657,1657),(1658,1658,1658),(1659,1659,1659),(1660,1660,1660), -(1661,1661,1661),(1662,1662,1662),(1663,1663,1663),(1664,1664,1664),(1665,1665,1665), -(1666,1666,1666),(1667,1667,1667),(1668,1668,1668),(1669,1669,1669),(1670,1670,1670), -(1671,1671,1671),(1672,1672,1672),(1673,1673,1673),(1674,1674,1674),(1675,1675,1675), -(1676,1676,1676),(1677,1677,1677),(1678,1678,1678),(1679,1679,1679),(1680,1680,1680), -(1681,1681,1681),(1682,1682,1682),(1683,1683,1683),(1684,1684,1684),(1685,1685,1685), -(1686,1686,1686),(1687,1687,1687),(1688,1688,1688),(1689,1689,1689),(1690,1690,1690), -(1691,1691,1691),(1692,1692,1692),(1693,1693,1693),(1694,1694,1694),(1695,1695,1695), -(1696,1696,1696),(1697,1697,1697),(1698,1698,1698),(1699,1699,1699),(1700,1700,1700), -(1701,1701,1701),(1702,1702,1702),(1703,1703,1703),(1704,1704,1704),(1705,1705,1705), -(1706,1706,1706),(1707,1707,1707),(1708,1708,1708),(1709,1709,1709),(1710,1710,1710), -(1711,1711,1711),(1712,1712,1712),(1713,1713,1713),(1714,1714,1714),(1715,1715,1715), -(1716,1716,1716),(1717,1717,1717),(1718,1718,1718),(1719,1719,1719),(1720,1720,1720), -(1721,1721,1721),(1722,1722,1722),(1723,1723,1723),(1724,1724,1724),(1725,1725,1725), -(1726,1726,1726),(1727,1727,1727),(1728,1728,1728),(1729,1729,1729),(1730,1730,1730), -(1731,1731,1731),(1732,1732,1732),(1733,1733,1733),(1734,1734,1734),(1735,1735,1735), -(1736,1736,1736),(1737,1737,1737),(1738,1738,1738),(1739,1739,1739),(1740,1740,1740), -(1741,1741,1741),(1742,1742,1742),(1743,1743,1743),(1744,1744,1744),(1745,1745,1745), -(1746,1746,1746),(1747,1747,1747),(1748,1748,1748),(1749,1749,1749),(1750,1750,1750), -(1751,1751,1751),(1752,1752,1752),(1753,1753,1753),(1754,1754,1754),(1755,1755,1755), -(1756,1756,1756),(1757,1757,1757),(1758,1758,1758),(1759,1759,1759),(1760,1760,1760), -(1761,1761,1761),(1762,1762,1762),(1763,1763,1763),(1764,1764,1764),(1765,1765,1765), -(1766,1766,1766),(1767,1767,1767),(1768,1768,1768),(1769,1769,1769),(1770,1770,1770), -(1771,1771,1771),(1772,1772,1772),(1773,1773,1773),(1774,1774,1774),(1775,1775,1775), -(1776,1776,1776),(1777,1777,1777),(1778,1778,1778),(1779,1779,1779),(1780,1780,1780), -(1781,1781,1781),(1782,1782,1782),(1783,1783,1783),(1784,1784,1784),(1785,1785,1785), -(1786,1786,1786),(1787,1787,1787),(1788,1788,1788),(1789,1789,1789),(1790,1790,1790), -(1791,1791,1791),(1792,1792,1792),(1793,1793,1793),(1794,1794,1794),(1795,1795,1795), -(1796,1796,1796),(1797,1797,1797),(1798,1798,1798),(1799,1799,1799),(1800,1800,1800), -(1801,1801,1801),(1802,1802,1802),(1803,1803,1803),(1804,1804,1804),(1805,1805,1805), -(1806,1806,1806),(1807,1807,1807),(1808,1808,1808),(1809,1809,1809),(1810,1810,1810), -(1811,1811,1811),(1812,1812,1812),(1813,1813,1813),(1814,1814,1814),(1815,1815,1815), -(1816,1816,1816),(1817,1817,1817),(1818,1818,1818),(1819,1819,1819),(1820,1820,1820), -(1821,1821,1821),(1822,1822,1822),(1823,1823,1823),(1824,1824,1824),(1825,1825,1825), -(1826,1826,1826),(1827,1827,1827),(1828,1828,1828),(1829,1829,1829),(1830,1830,1830), -(1831,1831,1831),(1832,1832,1832),(1833,1833,1833),(1834,1834,1834),(1835,1835,1835), -(1836,1836,1836),(1837,1837,1837),(1838,1838,1838),(1839,1839,1839),(1840,1840,1840), -(1841,1841,1841),(1842,1842,1842),(1843,1843,1843),(1844,1844,1844),(1845,1845,1845), -(1846,1846,1846),(1847,1847,1847),(1848,1848,1848),(1849,1849,1849),(1850,1850,1850), -(1851,1851,1851),(1852,1852,1852),(1853,1853,1853),(1854,1854,1854),(1855,1855,1855), -(1856,1856,1856),(1857,1857,1857),(1858,1858,1858),(1859,1859,1859),(1860,1860,1860), -(1861,1861,1861),(1862,1862,1862),(1863,1863,1863),(1864,1864,1864),(1865,1865,1865), -(1866,1866,1866),(1867,1867,1867),(1868,1868,1868),(1869,1869,1869),(1870,1870,1870), -(1871,1871,1871),(1872,1872,1872),(1873,1873,1873),(1874,1874,1874),(1875,1875,1875), -(1876,1876,1876),(1877,1877,1877),(1878,1878,1878),(1879,1879,1879),(1880,1880,1880), -(1881,1881,1881),(1882,1882,1882),(1883,1883,1883),(1884,1884,1884),(1885,1885,1885), -(1886,1886,1886),(1887,1887,1887),(1888,1888,1888),(1889,1889,1889),(1890,1890,1890), -(1891,1891,1891),(1892,1892,1892),(1893,1893,1893),(1894,1894,1894),(1895,1895,1895), -(1896,1896,1896),(1897,1897,1897),(1898,1898,1898),(1899,1899,1899),(1900,1900,1900), -(1901,1901,1901),(1902,1902,1902),(1903,1903,1903),(1904,1904,1904),(1905,1905,1905), -(1906,1906,1906),(1907,1907,1907),(1908,1908,1908),(1909,1909,1909),(1910,1910,1910), -(1911,1911,1911),(1912,1912,1912),(1913,1913,1913),(1914,1914,1914),(1915,1915,1915), -(1916,1916,1916),(1917,1917,1917),(1918,1918,1918),(1919,1919,1919),(1920,1920,1920), -(1921,1921,1921),(1922,1922,1922),(1923,1923,1923),(1924,1924,1924),(1925,1925,1925), -(1926,1926,1926),(1927,1927,1927),(1928,1928,1928),(1929,1929,1929),(1930,1930,1930), -(1931,1931,1931),(1932,1932,1932),(1933,1933,1933),(1934,1934,1934),(1935,1935,1935), -(1936,1936,1936),(1937,1937,1937),(1938,1938,1938),(1939,1939,1939),(1940,1940,1940), -(1941,1941,1941),(1942,1942,1942),(1943,1943,1943),(1944,1944,1944),(1945,1945,1945), -(1946,1946,1946),(1947,1947,1947),(1948,1948,1948),(1949,1949,1949),(1950,1950,1950), -(1951,1951,1951),(1952,1952,1952),(1953,1953,1953),(1954,1954,1954),(1955,1955,1955), -(1956,1956,1956),(1957,1957,1957),(1958,1958,1958),(1959,1959,1959),(1960,1960,1960), -(1961,1961,1961),(1962,1962,1962),(1963,1963,1963),(1964,1964,1964),(1965,1965,1965), -(1966,1966,1966),(1967,1967,1967),(1968,1968,1968),(1969,1969,1969),(1970,1970,1970), -(1971,1971,1971),(1972,1972,1972),(1973,1973,1973),(1974,1974,1974),(1975,1975,1975), -(1976,1976,1976),(1977,1977,1977),(1978,1978,1978),(1979,1979,1979),(1980,1980,1980), -(1981,1981,1981),(1982,1982,1982),(1983,1983,1983),(1984,1984,1984),(1985,1985,1985), -(1986,1986,1986),(1987,1987,1987),(1988,1988,1988),(1989,1989,1989),(1990,1990,1990), -(1991,1991,1991),(1992,1992,1992),(1993,1993,1993),(1994,1994,1994),(1995,1995,1995), -(1996,1996,1996),(1997,1997,1997),(1998,1998,1998),(1999,1999,1999); -SELECT COUNT(*) FROM t1; -COUNT(*) -2000 -INSERT INTO t1 VALUES (1,1,1); -ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -select count(*) from t1; -count(*) -2000 -begin; -SELECT COUNT(*) FROM t1; -COUNT(*) -2000 -INSERT INTO t1 VALUES -(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005); -SELECT COUNT(*) FROM t1; -COUNT(*) -2005 -rollback; -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -commit; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -rollback; -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -SELECT * FROM t1 WHERE pk1=10; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -rollback; -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -SELECT * FROM t1 WHERE pk1=10; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -SELECT * FROM t1 WHERE pk1=10; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -commit; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -begin; -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -ERROR 23000: Can't write; duplicate key in table 't1' -INSERT INTO t1 values (4000, 40, 44); -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -rollback; -select * from t1 where pk1=1; -pk1 b c -1 1 1 -select * from t1 where pk1=10; -pk1 b c -10 10 10 -select count(*) from t1 where pk1 <= 10 order by pk1; -count(*) -11 -select count(*) from t1; -count(*) -2000 -insert into t1 select * from t1 where b < 10 order by pk1; -ERROR 23000: Can't write; duplicate key in table 't1' -DELETE FROM t1 WHERE pk1=2; -begin; -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; -pk1 b c -0 0 0 -1 1 1 -2 3 4 -rollback; -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; -pk1 b c -0 0 0 -1 1 1 -2 3 4 -REPLACE INTO t1 values(1, 78, 3); -select * from t1 where pk1=1; -pk1 b c -1 78 3 -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79; -select * from t1 where pk1 < 4 order by pk1; -pk1 b c -0 0 0 -1 79 3 -2 3 4 -3 79 3 -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c; -select * from t1 where pk1 < 4 order by pk1; -pk1 b c -0 0 0 -1 4 3 -2 3 4 -3 6 3 -DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6; -INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b; -select * from t1 where pk1 = b and b != c order by pk1; -pk1 b c -2 2 17 -4 4 3 -6 6 3 -DELETE FROM t1; -CREATE UNIQUE INDEX bi ON t1(b); -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -INSERT INTO t1 VALUES(0,1,0),(21,21,21) ON DUPLICATE KEY UPDATE pk1=b+10,b=b+10; -select * from t1 order by pk1; -pk1 b c -2 2 2 -3 3 3 -4 4 4 -5 5 5 -6 6 6 -7 7 7 -8 8 8 -9 9 9 -10 10 10 -11 11 1 -21 21 21 -DROP TABLE t1; -CREATE TABLE t1(a INT) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -SELECT * FROM t1 ORDER BY a; -a -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -DELETE FROM t1; -CREATE UNIQUE INDEX ai ON t1(a); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (NULL),(2); -SELECT * FROM t1 ORDER BY a; -a -NULL -1 -2 -DROP TABLE t1; -CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3); -INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4); -SELECT * FROM t1 ORDER BY pk; -pk a -1 1 -2 2 -3 3 -4 NULL -5 NULL -6 NULL -7 4 -DROP TABLE t1; -create table t1(a int primary key, b int, unique key(b)) engine=ndb; -insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); -select * from t1 order by a; -a b -1 0 -2 NULL -3 NULL -drop table t1; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -1 1 0 -11 2 1 -21 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_offset=5; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -SELECT * FROM t1 ORDER BY pk; -pk b c -5 1 0 -15 2 1 -25 3 2 -27 4 3 -35 5 4 -99 6 5 -105 7 6 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -7 -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_increment=2; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -1 1 0 -3 2 1 -5 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -7 1 0 -8 2 1 -9 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 3; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -5 1 0 -15 2 1 -25 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -15 1 0 -25 2 1 -35 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 5; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -5 1 0 -15 2 1 -25 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; -CREATE TABLE t1 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100; -CREATE TABLE t2 ( -pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 100; -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -pk b c -105 1 0 -115 2 1 -125 3 2 -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -COUNT(t1.pk) -3 -DROP TABLE t1, t2; diff --git a/mysql-test/r/ndb_limit.result b/mysql-test/r/ndb_limit.result deleted file mode 100644 index da1ec3b61c3..00000000000 --- a/mysql-test/r/ndb_limit.result +++ /dev/null @@ -1,72 +0,0 @@ -DROP TABLE IF EXISTS t2; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -select count(*) from t2; -count(*) -10000 -delete from t2 limit 1; -select count(*) from t2; -count(*) -9999 -delete from t2 limit 100; -select count(*) from t2; -count(*) -9899 -delete from t2 limit 1000; -select count(*) from t2; -count(*) -8899 -update t2 set c=12345678 limit 100; -select count(*) from t2 where c=12345678; -count(*) -100 -select count(*) from t2 where c=12345678 limit 1000; -count(*) -100 -select * from t2 limit 0; -a b c -drop table t2; -CREATE TABLE `t2` ( -`views` int(11) NOT NULL default '0', -`clicks` int(11) NOT NULL default '0', -`day` date NOT NULL default '0000-00-00', -`hour` tinyint(4) NOT NULL default '0', -`bannerid` smallint(6) NOT NULL default '0', -`zoneid` smallint(6) NOT NULL default '0', -`source` varchar(50) NOT NULL default '', -PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`), -KEY `bannerid_day` (`bannerid`,`day`), -KEY `zoneid` (`zoneid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2` VALUES -( 1,0,'2004-09-17', 5,100,100,''), -( 1,0,'2004-09-18', 7,100,100,''), -( 17,0,'2004-09-27',20,132,100,''), -( 4,0,'2004-09-16',23,132,100,''), -( 86,0,'2004-09-18', 7,196,196,''), -( 11,0,'2004-09-16',16,132,100,''), -(140,0,'2004-09-18', 0,100,164,''), -( 2,0,'2004-09-17', 7,132,100,''), -(846,0,'2004-09-27',11,132,164,''), -( 1,0,'2004-09-18', 8,132,100,''), -( 22,0,'2004-09-27', 9,164,132,''), -(711,0,'2004-09-27', 9,100,164,''), -( 11,0,'2004-09-18', 0,196,132,''), -( 41,0,'2004-09-27',15,196,132,''), -( 57,0,'2004-09-18', 2,164,196,''); -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC; -date date_formatted -20040927 27-09-2004 -20040918 18-09-2004 -20040917 17-09-2004 -20040916 16-09-2004 -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2; -date date_formatted -20040927 27-09-2004 -20040918 18-09-2004 -drop table t2; diff --git a/mysql-test/r/ndb_load.result b/mysql-test/r/ndb_load.result deleted file mode 100644 index 416a350066b..00000000000 --- a/mysql-test/r/ndb_load.result +++ /dev/null @@ -1,80 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ; -ERROR 23000: Can't write; duplicate key in table 't1' -DROP TABLE t1; -CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ; -SELECT * FROM t1 ORDER BY word; -word -Aarhus -Aarhus -Aaron -Aaron -Ababa -Ababa -aback -aback -abaft -abaft -abandon -abandon -abandoned -abandoned -abandoning -abandoning -abandonment -abandonment -abandons -abandons -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration -DROP TABLE t1; diff --git a/mysql-test/r/ndb_loaddatalocal.result b/mysql-test/r/ndb_loaddatalocal.result deleted file mode 100644 index 1d15c608f03..00000000000 --- a/mysql-test/r/ndb_loaddatalocal.result +++ /dev/null @@ -1,46 +0,0 @@ -DROP TABLE IF EXISTS t1; -create table t1(a int) engine=myisam; -select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int) engine=ndb; -load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; -select count(*) from t1; -count(*) -10000 -drop table t1; -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (2), (3); -select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key) engine=ndb; -load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; -create table t1(a int) engine=myisam; -insert into t1 values (1), (1), (2), (3); -select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key) engine=ndb; -load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (3), (3); -select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key) engine=ndb; -load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; -select * from t1 order by a; -a -1 -2 -3 -drop table t1; diff --git a/mysql-test/r/ndb_lock.result b/mysql-test/r/ndb_lock.result deleted file mode 100644 index 9057731c3f4..00000000000 --- a/mysql-test/r/ndb_lock.result +++ /dev/null @@ -1,200 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; -insert into t1 values (1,'one'), (2,'two'); -select * from t1 order by x; -x y -1 one -2 two -select * from t1 order by x; -x y -1 one -2 two -start transaction; -insert into t1 values (3,'three'); -select * from t1 order by x; -x y -1 one -2 two -3 three -start transaction; -select * from t1 order by x; -x y -1 one -2 two -commit; -select * from t1 order by x; -x y -1 one -2 two -3 three -commit; -drop table t1; -create table t1 (pk integer not null primary key, u int not null, o int not null, -unique(u), key(o)) engine = ndb; -insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); -lock tables t1 write; -delete from t1 where pk = 1; -unlock tables; -select * from t1 order by pk; -pk u o -2 2 2 -3 3 3 -4 4 4 -5 5 5 -insert into t1 values (1,1,1); -lock tables t1 write; -delete from t1 where u = 1; -unlock tables; -select * from t1 order by pk; -pk u o -2 2 2 -3 3 3 -4 4 4 -5 5 5 -insert into t1 values (1,1,1); -lock tables t1 write; -delete from t1 where o = 1; -unlock tables; -select * from t1 order by pk; -pk u o -2 2 2 -3 3 3 -4 4 4 -5 5 5 -insert into t1 values (1,1,1); -drop table t1; -create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb; -insert into t1 values (1,'one',1); -begin; -select * from t1 where x = 1 for update; -x y z -1 one 1 -begin; -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -rollback; -insert into t1 values (2,'two',2),(3,"three",3); -begin; -select * from t1 where x = 1 for update; -x y z -1 one 1 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -select * from t1 where x = 2 for update; -x y z -2 two 2 -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' for update; -x y z -# # # -# # # -begin; -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' order by x for update; -x y z -1 one 1 -3 three 3 -begin; -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where z > 1 and z < 3 for update; -x y z -2 two 2 -begin; -select * from t1 where x = 1 for update; -x y z -1 one 1 -select * from t1 where x = 2 for update; -Got one of the listed errors -rollback; -commit; -begin; -select * from t1 where x = 1 lock in share mode; -x y z -1 one 1 -begin; -select * from t1 where x = 1 lock in share mode; -x y z -1 one 1 -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' lock in share mode; -x y z -# # # -# # # -begin; -select * from t1 where y = 'one' lock in share mode; -x y z -1 one 1 -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where y = 'one' or y = 'three' order by x lock in share mode; -x y z -1 one 1 -3 three 3 -begin; -select * from t1 where y = 'one' lock in share mode; -x y z -1 one 1 -select * from t1 where x = 2 for update; -x y z -2 two 2 -select * from t1 where x = 1 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -begin; -select * from t1 where z > 1 and z < 3 lock in share mode; -x y z -2 two 2 -begin; -select * from t1 where z = 1 lock in share mode; -x y z -1 one 1 -select * from t1 where x = 1 for update; -x y z -1 one 1 -select * from t1 where x = 2 for update; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -rollback; -commit; -drop table t1; -create table t3 (id2 int) engine=ndb; -lock tables t3 write; -unlock tables; -drop table t3; -create table t2 (id int, j int) engine=ndb; -insert into t2 values (2, 2); -create table t3 (id int) engine=ndb; -lock tables t3 read; -delete t2 from t2, t3 where t2.id = t3.id; -unlock tables; -drop table t2, t3; diff --git a/mysql-test/r/ndb_minmax.result b/mysql-test/r/ndb_minmax.result deleted file mode 100644 index cc0c238ac6e..00000000000 --- a/mysql-test/r/ndb_minmax.result +++ /dev/null @@ -1,120 +0,0 @@ -drop table if exists t1, t2; -CREATE TABLE t1 ( -a int PRIMARY KEY -) engine = ndb; -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -INSERT INTO t1 VALUES (6); -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select MIN(a) from t1; -MIN(a) -1 -select MIN(a) from t1; -MIN(a) -1 -select MIN(a) from t1; -MIN(a) -1 -select * from t1 order by a; -a -1 -2 -3 -4 -5 -6 -select MIN(a) from t1; -MIN(a) -1 -select MAX(a) from t1; -MAX(a) -6 -select MAX(a) from t1; -MAX(a) -6 -select * from t1 order by a; -a -1 -2 -3 -4 -5 -6 -drop table t1; -CREATE TABLE t2 ( -a int PRIMARY KEY, -b int not null, -c int not null, -KEY(b), -UNIQUE(c) -) engine = ndb; -INSERT INTO t2 VALUES (1, 5, 1); -INSERT INTO t2 VALUES (2, 2, 7); -INSERT INTO t2 VALUES (3, 3, 3); -INSERT INTO t2 VALUES (4, 4, 4); -INSERT INTO t2 VALUES (5, 5, 5); -INSERT INTO t2 VALUES (6, 6, 6); -INSERT INTO t2 VALUES (7, 2, 10); -INSERT INTO t2 VALUES (8, 10, 2); -select MAX(a) from t2; -MAX(a) -8 -select MAX(b) from t2; -MAX(b) -10 -select MAX(c) from t2; -MAX(c) -10 -select MIN(a) from t2; -MIN(a) -1 -select MIN(b) from t2; -MIN(b) -2 -select MIN(c) from t2; -MIN(c) -1 -select * from t2 order by a; -a b c -1 5 1 -2 2 7 -3 3 3 -4 4 4 -5 5 5 -6 6 6 -7 2 10 -8 10 2 -select MIN(b) from t2; -MIN(b) -2 -select MAX(a) from t2; -MAX(a) -8 -select MAX(c) from t2; -MAX(c) -10 -select * from t2 order by a; -a b c -1 5 1 -2 2 7 -3 3 3 -4 4 4 -5 5 5 -6 6 6 -7 2 10 -8 10 2 -drop table t2; diff --git a/mysql-test/r/ndb_multi.result b/mysql-test/r/ndb_multi.result deleted file mode 100644 index 2bc49bf9b45..00000000000 --- a/mysql-test/r/ndb_multi.result +++ /dev/null @@ -1,123 +0,0 @@ -drop table if exists t1, t2, t3, t4; -drop table if exists t1, t2, t3, t4; -flush status; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select * from t2; -a -3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -select * from t1; -a -2 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -select * from t1; -a -2 -flush status; -select * from t1; -a -2 -update t1 set a=3 where a=2; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; -select * from t1; -a -3 -select * from t3; -a b c last_col -1 Hi! 89 Longtext column -show tables like 't4'; -Tables_in_test (t4) -t4 -show tables; -Tables_in_test -t1 -t2 -t3 -t4 -drop table t1, t2, t3, t4; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(1),(3),(5); -select * from t1 order by c1; -c1 -1 -3 -5 -show tables; -Tables_in_test -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(100),(344),(533); -select * from t1 order by c1; -c1 -100 -344 -533 -alter table t1 engine=ndb; -show tables; -Tables_in_test -t1 -Warnings: -Warning 1050 Local table test.t1 shadows ndb table -select * from t1 order by c1; -c1 -100 -344 -533 -drop table t1; -select * from t1 order by c1; -c1 -1 -3 -5 -drop table t1; -create database db; -use db; -create table t1(x int) engine=ndb; -use db; -show tables; -Tables_in_db -t1 -drop database db; -show tables; -ERROR 42000: Unknown database 'db' -create database db; -use db; -create table t1(x int) engine=ndb; -use db; -create table t2(x int) engine=myisam; -show tables; -Tables_in_db -t1 -t2 -drop database db; -show tables; -Tables_in_db -t2 -drop database db; diff --git a/mysql-test/r/ndb_multi_row.result b/mysql-test/r/ndb_multi_row.result deleted file mode 100644 index cf5a76d6f01..00000000000 --- a/mysql-test/r/ndb_multi_row.result +++ /dev/null @@ -1,67 +0,0 @@ -drop table if exists t1, t2, t3, t4; -drop table if exists t1, t2, t3, t4; -flush status; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -a -2 -select * from t2; -a -3 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -select * from t1; -a -2 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -select * from t1; -a -2 -flush status; -select * from t1; -a -2 -update t1 set a=3 where a=2; -show status like 'handler_discover%'; -Variable_name Value -Handler_discover 0 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; -select * from t1; -a -3 -select * from t3; -a b c last_col -1 Hi! 89 Longtext column -show tables like 't4'; -Tables_in_test (t4) -t4 -show tables; -Tables_in_test -t1 -t2 -t3 -t4 -drop table t1, t2, t3, t4; -drop table if exists t1, t3, t4; -Warnings: -Error 155 Table 'test.t1' doesn't exist -Error 155 Table 'test.t3' doesn't exist -Error 155 Table 'test.t4' doesn't exist diff --git a/mysql-test/r/ndb_partition_error.result b/mysql-test/r/ndb_partition_error.result deleted file mode 100644 index d86dc382185..00000000000 --- a/mysql-test/r/ndb_partition_error.result +++ /dev/null @@ -1,47 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5) nodegroup 12, -partition x2 values less than (10) nodegroup 13, -partition x3 values less than (20) nodegroup 14); -ERROR HY000: Can't create table 'test.t1' (errno: 140) -show warnings; -Level Code Message -Error 1296 Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB -Error 1005 Can't create table 'test.t1' (errno: 140) -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), -partition x2 values less than (10), -partition x3 values less than (20)); -drop table t1; -CREATE TABLE t1 (id INT) ENGINE=NDB -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); -INSERT INTO t1 VALUES (2); -UPDATE t1 SET id=5 WHERE id=2; -ERROR HY000: Table has no partition for value 5 -DROP TABLE t1; -create table t1 (a int,b int, c int) -engine = ndb -partition by list(a) -partitions 2 -(partition x123 values in (11, 12), -partition x234 values in (5, 1)); -insert into t1 values (NULL,1,1); -ERROR HY000: Table has no partition for value NULL -drop table t1; diff --git a/mysql-test/r/ndb_partition_error2.result b/mysql-test/r/ndb_partition_error2.result deleted file mode 100644 index a739ef3923c..00000000000 --- a/mysql-test/r/ndb_partition_error2.result +++ /dev/null @@ -1,3 +0,0 @@ -drop table if exists t1; -create table t1 (s1 int) engine=ndbcluster; -ERROR HY000: For the partitioned engine it is necessary to define all partitions diff --git a/mysql-test/r/ndb_partition_key.result b/mysql-test/r/ndb_partition_key.result deleted file mode 100644 index 60e96ce03b6..00000000000 --- a/mysql-test/r/ndb_partition_key.result +++ /dev/null @@ -1,255 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c)) -ENGINE = NDB -PARTITION BY KEY (a,b); -insert into t1 values (1,1,1,1); -select * from t1; -a b c d -1 1 1 1 -update t1 set d = 2 where a = 1 and b = 1 and c = 1; -select * from t1; -a b c d -1 1 1 2 -delete from t1; -select * from t1; -a b c d -drop table t1; -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b)) -ENGINE = NDB -PARTITION BY KEY (c); -ERROR HY000: A PRIMARY KEY must include all columns in the table's partitioning function -CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b)) -ENGINE = NDB -PARTITION BY KEY (a); -insert into t1 values -(1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3), -(1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3); -select * from t1 order by b; -a b c -1 1 3 -1 2 3 -1 3 3 -1 4 3 -1 5 3 -1 6 3 -1 7 3 -1 8 3 -1 9 3 -1 10 3 -1 11 3 -1 12 3 -DROP TABLE t1; -CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT, -PRIMARY KEY (a,b,c) USING HASH) -ENGINE=NDB -DEFAULT CHARSET=latin1 -PARTITION BY KEY (b); -insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1); --- t1 -- - -Fragment type: 5 -K Value: 6 -Min load factor: 78 -Max load factor: 80 -Temporary table: no -Number of attributes: 4 -Number of primary keys: 3 -Length of frm data: # -Row Checksum: 1 -Row GCI: 1 -SingleUserMode: 0 -ForceVarPart: 1 -TableStatus: Retrieved --- Attributes -- -a Int PRIMARY KEY AT=FIXED ST=MEMORY -b Char(10;latin1_bin) PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -c Int PRIMARY KEY AT=FIXED ST=MEMORY -d Int NULL AT=FIXED ST=MEMORY - --- Indexes -- -PRIMARY KEY(a, b, c) - UniqueHashIndex - - -NDBT_ProgramExit: 0 - OK - -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL DEFAULT '0', - `b` char(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', - `c` int(11) NOT NULL DEFAULT '0', - `d` int(11) DEFAULT NULL, - PRIMARY KEY (`a`,`b`,`c`) USING HASH -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (b) */ -DROP TABLE t1; -CREATE TABLE t1 (a int not null primary key) -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -drop table t1; -CREATE TABLE t1 (a int not null primary key); -ALTER TABLE t1 -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); -drop table t1; -create table t1 (a int) -engine=ndb -partition by key(a) -(partition p0, partition p1); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 engine=heap; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MEMORY, PARTITION p1 ENGINE = MEMORY) */ -alter table t1 engine=ndb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 engine=heap remove partitioning; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -alter table t1 engine=ndb -partition by key(a) -(partition p0, partition p1 engine = ndb); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 -partition by key (a) -(partition p0 engine=ndb, partition p1 engine=ndb); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ -alter table t1 remove partitioning; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -alter table t1 -partition by key(a) -(partition p0 engine=ndb, partition p1); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -alter table t1 -engine=ndb -partition by key(a) -(partition p0 engine=ndb, partition p1 engine = ndb); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ -drop table t1; -CREATE TABLE t1 ( -c1 MEDIUMINT NOT NULL AUTO_INCREMENT, -c2 TEXT NOT NULL, -c3 INT NOT NULL, -c4 BIT NOT NULL, -c5 FLOAT, -c6 VARCHAR(255), -c7 TIMESTAMP, -PRIMARY KEY(c1,c3)) -ENGINE=NDB -PARTITION BY KEY(c3) PARTITIONS 5; -ALTER TABLE t1 COALESCE PARTITION 4; -DROP TABLE t1; -CREATE TABLE t1 (a int primary key) -ENGINE=NDB -PARTITION BY KEY(a); -ALTER TABLE t1 OPTIMIZE PARTITION p0; -ERROR HY000: Table storage engine for 't1' doesn't have this option -ALTER TABLE t1 CHECK PARTITION p0; -ERROR HY000: Table storage engine for 't1' doesn't have this option -ALTER TABLE t1 REPAIR PARTITION p0; -ERROR HY000: Table storage engine for 't1' doesn't have this option -ALTER TABLE t1 ANALYZE PARTITION p0; -ERROR HY000: Table storage engine for 't1' doesn't have this option -ALTER TABLE t1 REBUILD PARTITION p0; -ERROR HY000: Table storage engine for 't1' doesn't have this option -DROP TABLE t1; -CREATE TABLE t1 ( -c1 MEDIUMINT NOT NULL AUTO_INCREMENT, -c2 TEXT NOT NULL, -c3 INT NOT NULL, -PRIMARY KEY(c1,c3)) -ENGINE=NDB -PARTITION BY KEY(c3) PARTITIONS 5; -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -DROP TABLE t1; -CREATE TABLE t1 ( -c1 MEDIUMINT NOT NULL AUTO_INCREMENT, -c2 TEXT NOT NULL, -c3 INT NOT NULL, -PRIMARY KEY(c1,c3)) -ENGINE=NDB -PARTITION BY KEY(c3) -(PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE -table_name = "t1"; -NODEGROUP PARTITION_NAME -0 p0 -0 p1 -DROP TABLE t1; -CREATE TABLE t1 ( -a tinyint unsigned NOT NULL, -b bigint(20) unsigned NOT NULL, -c char(12), -PRIMARY KEY (a,b) -) ENGINE ndb DEFAULT CHARSET=latin1 PARTITION BY KEY (a); -insert into t1 values(1,1,'1'), (2,2,'2'), (3,3,'3'), (4,4,'4'), (5,5,'5'); -select * from t1 where a = 1; -a b c -1 1 1 -select * from t1 where a = 2; -a b c -2 2 2 -select * from t1 where a = 3; -a b c -3 3 3 -select * from t1 where a = 4; -a b c -4 4 4 -select * from t1 where a = 5; -a b c -5 5 5 -delete from t1 where a = 1; -select * from t1 order by 1; -a b c -2 2 2 -3 3 3 -4 4 4 -5 5 5 -delete from t1 where a = 2; -select * from t1 order by 1; -a b c -3 3 3 -4 4 4 -5 5 5 -delete from t1 where a = 3; -select * from t1 order by 1; -a b c -4 4 4 -5 5 5 -delete from t1 where a = 4; -select * from t1 order by 1; -a b c -5 5 5 -delete from t1 where a = 5; -select * from t1 order by 1; -a b c -drop table t1; diff --git a/mysql-test/r/ndb_partition_list.result b/mysql-test/r/ndb_partition_list.result deleted file mode 100644 index ce2574ddcc4..00000000000 --- a/mysql-test/r/ndb_partition_list.result +++ /dev/null @@ -1,51 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL, -f_char1 CHAR(10), -f_char2 CHAR(10), f_charbig VARCHAR(1000), -PRIMARY KEY (f_int1,f_int2)) -ENGINE = NDB -PARTITION BY LIST(MOD(f_int1 + f_int2,4)) -(PARTITION part_3 VALUES IN (-3), -PARTITION part_2 VALUES IN (-2), -PARTITION part_1 VALUES IN (-1), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2), -PARTITION part3 VALUES IN (3,4,5)); -INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -SELECT * FROM t1 ORDER BY f_int1; -f_int1 f_int2 f_char1 f_char2 f_charbig --2 20 20 20 ===20=== -1 1 1 1 ===1=== -2 1 1 1 ===1=== -3 1 1 1 ===1=== -4 1 1 1 ===1=== -5 1 1 1 ===1=== -20 1 1 1 ===1=== -DROP TABLE t1; -CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10), -f_char2 CHAR(10), f_charbig VARCHAR(1000)) -ENGINE = NDB -PARTITION BY LIST(f_int1) -(PARTITION part_1 VALUES IN (-1), -PARTITION part0 VALUES IN (0,1), -PARTITION part1 VALUES IN (2)); -INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -ERROR HY000: Table has no partition for value 20 -SELECT * FROM t1 ORDER BY f_int1; -f_int1 f_int2 f_char1 f_char2 f_charbig --1 20 20 20 ===20=== -0 20 20 20 ===20=== -1 1 1 1 ===1=== -2 1 1 1 ===1=== -DROP TABLE t1; diff --git a/mysql-test/r/ndb_partition_range.result b/mysql-test/r/ndb_partition_range.result deleted file mode 100644 index 0c717ed55e9..00000000000 --- a/mysql-test/r/ndb_partition_range.result +++ /dev/null @@ -1,263 +0,0 @@ -drop table if exists t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), -partition x2 values less than (10), -partition x3 values less than (20)); -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (6, 1, 1); -INSERT into t1 values (10, 1, 1); -INSERT into t1 values (15, 1, 1); -select * from information_schema.partitions where table_name= 't1'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -NULL test t1 x1 NULL 1 NULL RANGE NULL a NULL 5 0 0 0 # 0 0 # # NULL NULL default NULL -NULL test t1 x2 NULL 2 NULL RANGE NULL a NULL 10 0 0 0 # 0 0 # # NULL NULL default NULL -NULL test t1 x3 NULL 3 NULL RANGE NULL a NULL 20 0 0 0 # 0 0 # # NULL NULL default NULL -select * from t1 order by a; -a b c -1 1 1 -6 1 1 -10 1 1 -15 1 1 -select * from t1 where a=1 order by a; -a b c -1 1 1 -select * from t1 where a=15 and b=1 order by a; -a b c -15 1 1 -select * from t1 where a=21 and b=1 order by a; -a b c -select * from t1 where a=21 order by a; -a b c -select * from t1 where a in (1,6,10,21) order by a; -a b c -1 1 1 -6 1 1 -10 1 1 -select * from t1 where b=1 and a in (1,6,10,21) order by a; -a b c -1 1 1 -6 1 1 -10 1 1 -drop table t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(b), -unique (a)) -engine = ndb -partition by range (b) -partitions 3 -(partition x1 values less than (5), -partition x2 values less than (10), -partition x3 values less than (20)); -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (2, 6, 1); -INSERT into t1 values (3, 10, 1); -INSERT into t1 values (4, 15, 1); -select * from t1 order by a; -a b c -1 1 1 -2 6 1 -3 10 1 -4 15 1 -UPDATE t1 set a = 5 WHERE b = 15; -select * from t1 order by a; -a b c -1 1 1 -2 6 1 -3 10 1 -5 15 1 -UPDATE t1 set a = 6 WHERE a = 5; -select * from t1 order by a; -a b c -1 1 1 -2 6 1 -3 10 1 -6 15 1 -select * from t1 where b=1 order by b; -a b c -1 1 1 -select * from t1 where b=15 and a=1 order by b; -a b c -select * from t1 where b=21 and a=1 order by b; -a b c -select * from t1 where b=21 order by b; -a b c -select * from t1 where b in (1,6,10,21) order by b; -a b c -1 1 1 -2 6 1 -3 10 1 -select * from t1 where a in (1,2,5,6) order by b; -a b c -1 1 1 -2 6 1 -6 15 1 -select * from t1 where a=1 and b in (1,6,10,21) order by b; -a b c -1 1 1 -DELETE from t1 WHERE b = 6; -DELETE from t1 WHERE a = 6; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - `b` int(11) NOT NULL, - `c` int(11) NOT NULL, - PRIMARY KEY (`b`), - UNIQUE KEY `a` (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (b) (PARTITION x1 VALUES LESS THAN (5) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (10) ENGINE = ndbcluster, PARTITION x3 VALUES LESS THAN (20) ENGINE = ndbcluster) */ -drop table t1; -CREATE TABLE t1 -(id MEDIUMINT NOT NULL, -b1 BIT(8), -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE) ENGINE=NDB -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); -INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -id b1 vc bc d f total y t -0 NULL NULL NULL NULL NULL NULL NULL NULL -ALTER TABLE t1 ENGINE=MYISAM; -SELECT * FROM t1; -id b1 vc bc d f total y t -0 NULL NULL NULL NULL NULL NULL NULL NULL -DROP TABLE t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' - INITIAL_SIZE 16M -UNDO_BUFFER_SIZE=1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' - USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -CREATE TABLE test.t1 ( -a1 INT, -a2 TEXT NOT NULL, -a3 BIT NOT NULL, -a4 DECIMAL(8,3), -a5 INT NOT NULL, -a6 INT, -PRIMARY KEY(a1)) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB -PARTITION BY LIST (a1) -(PARTITION p0 VALUES IN (1,2,3,4,5), -PARTITION p1 VALUES IN (6,7,8,9, 10), -PARTITION p2 VALUES IN (11, 12, 13, 14, 15)); -ALTER TABLE test.t1 DROP COLUMN a6; -ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255); -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -DROP TABLE t1; -CREATE TABLE test.t1 ( -a1 INT, -a2 TEXT NOT NULL, -a3 BIT NOT NULL, -a4 DECIMAL(8,3), -a5 INT NOT NULL, -a6 VARCHAR(255), -PRIMARY KEY(a1)) -TABLESPACE ts1 STORAGE DISK ENGINE=NDB -PARTITION BY HASH(a1) -PARTITIONS 4; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -15 -DROP TABLE t1; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -CREATE TABLE t1 -(id MEDIUMINT NOT NULL, -b1 BIT(8), -vc VARCHAR(255), -bc CHAR(255), -d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, -total BIGINT UNSIGNED, -y YEAR, -t DATE) ENGINE=NDB -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); -INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -id b1 vc bc d f total y t -2 NULL NULL NULL NULL NULL NULL NULL NULL -ALTER TABLE t1 ADD PARTITION -(PARTITION p2 VALUES IN (412)); -SELECT * FROM t1; -id b1 vc bc d f total y t -2 NULL NULL NULL NULL NULL NULL NULL NULL -DROP TABLE t1; -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null) -partition by list(a) -partitions 2 -(partition x123 values in (1,5,6), -partition x234 values in (4,7,8)); -INSERT into t1 VALUES (5,1,1); -select * from t1; -a b c -5 1 1 -UPDATE t1 SET a=8 WHERE a=5 AND b=1; -select * from t1; -a b c -8 1 1 -drop table t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb -PARTITION BY RANGE(f1) -( PARTITION part1 VALUES LESS THAN (2), -PARTITION part2 VALUES LESS THAN (1000)); -INSERT INTO t1 VALUES(1, '---1---'); -INSERT INTO t1 VALUES(2, '---2---'); -select * from t1 order by f1; -f1 f2 -1 ---1--- -2 ---2--- -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2; -select * from t1 order by f1; -f1 f2 -1 ---1--- -6 ---2--- -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1; -select * from t1 order by f1; -f1 f2 -5 ---1--- -6 ---2--- -drop table t1; diff --git a/mysql-test/r/ndb_read_multi_range.result b/mysql-test/r/ndb_read_multi_range.result deleted file mode 100644 index aef009212a4..00000000000 --- a/mysql-test/r/ndb_read_multi_range.result +++ /dev/null @@ -1,475 +0,0 @@ -DROP TABLE IF EXISTS t1, t2, r1; -create table t1 ( -a int primary key, -b int not null, -c int not null, -index(b), unique index using hash(c) -) engine = ndb; -insert into t1 values -(1,2,1),(2,3,2),(3,4,3),(4,5,4), -(5,2,12),(6,3,11),(7,4,10),(8,5,9), -(9,2,8),(10,3,7),(11,4,6),(12,5,5); -create table r1 as select * from t1 where a in (2,8,12); -select * from r1 order by a; -a b c -2 3 2 -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where b in (1,2,5); -select * from r1 order by a; -a b c -1 2 1 -4 5 4 -5 2 12 -8 5 9 -9 2 8 -12 5 5 -drop table r1; -create table r1 as select * from t1 where c in (2,8,12); -select * from r1 order by a; -a b c -2 3 2 -5 2 12 -9 2 8 -drop table r1; -create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1); -select * from r1 order by a; -a b c -1 2 1 -2 3 2 -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where a in (33,8,12); -select * from r1 order by a; -a b c -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where a in (2,33,8,12,34); -select * from r1 order by a; -a b c -2 3 2 -8 5 9 -12 5 5 -drop table r1; -create table r1 as select * from t1 where b in (1,33,5); -select * from r1 order by a; -a b c -4 5 4 -8 5 9 -12 5 5 -drop table r1; -select * from t1 where b in (1,33,5) order by a; -a b c -4 5 4 -8 5 9 -12 5 5 -create table r1 as select * from t1 where b in (45,1,33,5,44); -select * from r1 order by a; -a b c -4 5 4 -8 5 9 -12 5 5 -drop table r1; -select * from t1 where b in (45,22) order by a; -a b c -create table r1 as select * from t1 where c in (2,8,33); -select * from r1 order by a; -a b c -2 3 2 -9 2 8 -drop table r1; -create table r1 as select * from t1 where c in (13,2,8,33,12); -select * from r1 order by a; -a b c -2 3 2 -5 2 12 -9 2 8 -drop table r1; -select * from t1 where a in (33,8,12) order by a; -a b c -8 5 9 -12 5 5 -select * from t1 where a in (33,34,35) order by a; -a b c -select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a; -a b c -1 2 1 -2 3 2 -8 5 9 -12 5 5 -select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a; -a b c -1 2 1 -5 2 12 -9 2 8 -2 3 2 -6 3 11 -10 3 7 -3 4 3 -7 4 10 -11 4 6 -4 5 4 -8 5 9 -12 5 5 -select * from t1 where c in (13,2,8,33,12) order by c,a; -a b c -2 3 2 -9 2 8 -5 2 12 -drop table t1; -create table t1 ( -a int not null, -b int not null, -c int not null, -d int not null, -e int not null, -primary key (a,b,c,d), index (d) -) engine = ndb; -insert into t1 values -(1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1), -(5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1), -(9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1), -(1,2,1,2,1), -(1,2,1,3,1), -(1,2,1,4,1), -(1,2,1,5,1); -create table r1 as select * from t1 -where a=1 and b=2 and c=1 and d in (1,4,3,2); -select * from r1 order by a,b,c,d; -a b c d e -1 2 1 1 1 -1 2 1 2 1 -1 2 1 3 1 -1 2 1 4 1 -drop table r1; -update t1 set e = 100 -where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; -a b c d e -4 5 4 7 100 -5 2 12 12 100 -9 2 8 6 100 -select * from t1 where d not in (12,6,7) and e = 100; -a b c d e -update t1 -set e = 101 -where a=1 and -b=2 and -c=1 and -d in (1,4,3,2); -select * -from t1 -where a=1 and b=2 and c=1 and d in (1,4,3,2) -order by a,b,c,d; -a b c d e -1 2 1 1 101 -1 2 1 2 101 -1 2 1 3 101 -1 2 1 4 101 -select * -from t1 -where not (a=1 and b=2 and c=1 and d in (1,4,3,2)) -and e=101; -a b c d e -update t1 -set e = -(case d -when 12 then 112 -when 6 then 106 -when 7 then 107 -end) -where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; -a b c d e -4 5 4 7 107 -5 2 12 12 112 -9 2 8 6 106 -update t1 -set e = -(case d -when 1 then 111 -when 4 then 444 -when 3 then 333 -when 2 then 222 -end) -where a=1 and -b=2 and -c=1 and -d in (1,4,3,2); -select * -from t1 -where a=1 and b=2 and c=1 and d in (1,4,3,2) -order by a,b,c,d; -a b c d e -1 2 1 1 111 -1 2 1 2 222 -1 2 1 3 333 -1 2 1 4 444 -delete from t1 where d in (12,6,7); -select * from t1 where d in (12,6,7); -a b c d e -drop table t1; -create table t1 ( -a int not null primary key, -b int, -c int, -d int, -unique index (b), -index(c) -) engine = ndb; -insert into t1 values -(1,null,1,1), -(2,2,2,2), -(3,null,null,3), -(4,4,null,4), -(5,null,5,null), -(6,6,6,null), -(7,null,null,null), -(8,8,null,null), -(9,null,9,9), -(10,10,10,10), -(11,null,null,11), -(12,12,null,12), -(13,null,13,null), -(14,14,14,null), -(15,null,null,null), -(16,16,null,null); -create table t2 as select * from t1 where a in (5,6,7,8,9,10); -select * from t2 order by a; -a b c d -5 NULL 5 NULL -6 6 6 NULL -7 NULL NULL NULL -8 8 NULL NULL -9 NULL 9 9 -10 10 10 10 -drop table t2; -create table t2 as select * from t1 where b in (5,6,7,8,9,10); -select * from t2 order by a; -a b c d -6 6 6 NULL -8 8 NULL NULL -10 10 10 10 -drop table t2; -create table t2 as select * from t1 where c in (5,6,7,8,9,10); -select * from t2 order by a; -a b c d -5 NULL 5 NULL -6 6 6 NULL -9 NULL 9 9 -10 10 10 10 -drop table t2; -drop table t1; -CREATE TABLE t1 ( -a int(11) NOT NULL, -b int(11) NOT NULL, -c datetime default NULL, -PRIMARY KEY (a), -KEY idx_bc (b,c) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES -(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), -(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), -(406994,67,'2006-02-27 11:26:46'), (256,67,NULL), -(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), -(406988,67,'2006-02-23 17:07:22'), (255,67,NULL), -(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), -(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), -(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), -(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), -(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), -(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), -(223456,67,NULL),(4101,67,NULL),(1133,67,NULL), -(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), -(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), -(154503,67,'2005-10-28 11:52:38'); -create table t11 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; -create table t12 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; -create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; -create table t22 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; -select * from t11 order by 1,2,3; -a b c -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -select * from t12 order by 1,2,3; -a b c -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -select * from t21 order by 1,2,3; -a b c -1 67 2006-02-23 15:01:35 -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -245651 67 2005-12-08 15:58:27 -245652 67 2005-12-08 15:58:27 -245653 67 2005-12-08 15:59:07 -245654 67 2005-12-08 15:59:08 -245655 67 2005-12-08 15:59:08 -398340 67 2006-02-20 04:38:53 -398341 67 2006-02-20 04:48:44 -398545 67 2006-02-20 04:53:13 -406631 67 2006-02-23 10:49:42 -406988 67 2006-02-23 17:07:22 -406989 67 2006-02-23 17:08:46 -406990 67 2006-02-23 18:01:45 -406991 67 2006-02-24 16:42:32 -406992 67 2006-02-24 16:47:18 -406993 67 2006-02-27 11:20:57 -406994 67 2006-02-27 11:26:46 -406995 67 2006-02-28 11:55:00 -select * from t22 order by 1,2,3; -a b c -1 67 2006-02-23 15:01:35 -254 67 NULL -255 67 NULL -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -245651 67 2005-12-08 15:58:27 -245652 67 2005-12-08 15:58:27 -245653 67 2005-12-08 15:59:07 -245654 67 2005-12-08 15:59:08 -245655 67 2005-12-08 15:59:08 -398340 67 2006-02-20 04:38:53 -398341 67 2006-02-20 04:48:44 -398545 67 2006-02-20 04:53:13 -406631 67 2006-02-23 10:49:42 -406988 67 2006-02-23 17:07:22 -406989 67 2006-02-23 17:08:46 -406990 67 2006-02-23 18:01:45 -406991 67 2006-02-24 16:42:32 -406992 67 2006-02-24 16:47:18 -406993 67 2006-02-27 11:20:57 -406994 67 2006-02-27 11:26:46 -406995 67 2006-02-28 11:55:00 -select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null order by t12.a; -a -255 -256 -update t22 set c = '2005-12-08 15:58:27' where a = 255; -select * from t22 order by 1,2,3; -a b c -1 67 2006-02-23 15:01:35 -254 67 NULL -255 67 2005-12-08 15:58:27 -256 67 NULL -1120 67 NULL -1133 67 NULL -4101 67 NULL -9199 67 NULL -223456 67 NULL -245651 67 2005-12-08 15:58:27 -245652 67 2005-12-08 15:58:27 -245653 67 2005-12-08 15:59:07 -245654 67 2005-12-08 15:59:08 -245655 67 2005-12-08 15:59:08 -398340 67 2006-02-20 04:38:53 -398341 67 2006-02-20 04:48:44 -398545 67 2006-02-20 04:53:13 -406631 67 2006-02-23 10:49:42 -406988 67 2006-02-23 17:07:22 -406989 67 2006-02-23 17:08:46 -406990 67 2006-02-23 18:01:45 -406991 67 2006-02-24 16:42:32 -406992 67 2006-02-24 16:47:18 -406993 67 2006-02-27 11:20:57 -406994 67 2006-02-27 11:26:46 -406995 67 2006-02-28 11:55:00 -select t21.* from t21,t22 where t21.a = t22.a and -t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; -a b c -256 67 NULL -delete from t22 where a > 245651; -update t22 set b = a + 1; -select * from t22 order by 1,2,3; -a b c -1 2 2006-02-23 15:01:35 -254 255 NULL -255 256 2005-12-08 15:58:27 -256 257 NULL -1120 1121 NULL -1133 1134 NULL -4101 4102 NULL -9199 9200 NULL -223456 223457 NULL -245651 245652 2005-12-08 15:58:27 -select t21.c, count(*) -from t21 -inner join t22 using (a) -where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652) -group by t21.c -order by t21.c; -c count(*) -NULL 7 -2005-12-08 15:58:27 1 -2006-02-23 15:01:35 1 -DROP TABLE t1, t11, t12, t21, t22; -CREATE TABLE t1 (id varchar(255) NOT NULL, -tag int(11) NOT NULL, -doc text NOT NULL, -type varchar(150) NOT NULL, -modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -PRIMARY KEY (id) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); -id tag doc type -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); -id tag doc type -sakila 1 Some text goes here text -DROP TABLE t1; -CREATE TABLE t1 ( -var1 int(2) NOT NULL, -var2 int(2) NOT NULL, -PRIMARY KEY (var1) -) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; -CREATE TABLE t2 ( -var1 int(2) NOT NULL, -var2 int(2) NOT NULL, -PRIMARY KEY (var1) -) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; -CREATE TRIGGER testtrigger -AFTER UPDATE ON t1 FOR EACH ROW BEGIN -REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| -INSERT INTO t1 VALUES (1,1),(2,2),(3,3); -UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); -DROP TRIGGER testtrigger; -DROP TABLE t1, t2; -create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; -insert into t1 values (1,1), (10,10); -select * from t1 use index (ab) where a in(1,10) order by a; -a b -1 1 -10 10 -create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster -partition by key(a); -insert into t2 values (1,1), (10,10); -select * from t2 where a in (1,10) order by a; -a b -1 1 -10 10 -drop table t1, t2; diff --git a/mysql-test/r/ndb_rename.result b/mysql-test/r/ndb_rename.result deleted file mode 100644 index 2cc2dfb3ff1..00000000000 --- a/mysql-test/r/ndb_rename.result +++ /dev/null @@ -1,24 +0,0 @@ -DROP TABLE IF EXISTS t1,t2; -drop database if exists mysqltest; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL, -attr2 INT, -attr3 VARCHAR(10), -INDEX i1(attr1) -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0,0,0,"zero"),(1,1,1,"one"),(2,2,2,"two"); -SELECT * FROM t1 WHERE attr1 = 1; -pk1 attr1 attr2 attr3 -1 1 1 one -alter table t1 rename t2; -SELECT * FROM t2 WHERE attr1 = 1; -pk1 attr1 attr2 attr3 -1 1 1 one -create database ndbtest; -alter table t2 rename ndbtest.t2; -SELECT * FROM ndbtest.t2 WHERE attr1 = 1; -pk1 attr1 attr2 attr3 -1 1 1 one -drop table ndbtest.t2; -drop database ndbtest; diff --git a/mysql-test/r/ndb_replace.result b/mysql-test/r/ndb_replace.result deleted file mode 100644 index 23844ce3bff..00000000000 --- a/mysql-test/r/ndb_replace.result +++ /dev/null @@ -1,99 +0,0 @@ -drop table if exists t1,t2; -CREATE TABLE t1 ( -gesuchnr int(11) DEFAULT '0' NOT NULL, -benutzer_id int(11) DEFAULT '0' NOT NULL, -PRIMARY KEY (gesuchnr,benutzer_id) -) engine=ndbcluster; -replace into t1 (gesuchnr,benutzer_id) values (2,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -insert into t1 (gesuchnr, benutzer_id) value (3,2); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -insert into t1 (gesuchnr,benutzer_id) values (1,1); -ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY' -replace into t1 (gesuchnr,benutzer_id) values (1,1); -select * from t1 order by gesuchnr; -gesuchnr benutzer_id -1 1 -2 1 -3 2 -drop table t1; -CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT, -j INT, -k INT, -UNIQUE INDEX(j) -) ENGINE = ndb; -INSERT INTO t1 VALUES (1,1,23),(2,2,24); -REPLACE INTO t1 (j,k) VALUES (1,42); -REPLACE INTO t1 (i,j) VALUES (17,2); -SELECT * from t1 ORDER BY i; -i j k -3 1 42 -17 2 NULL -DROP TABLE t1; -CREATE TABLE t2 (a INT(11) NOT NULL, -b INT(11) NOT NULL, -c INT(11) NOT NULL, -x TEXT, -y TEXT, -z TEXT, -id INT(10) unsigned NOT NULL AUTO_INCREMENT, -i INT(11) DEFAULT NULL, -PRIMARY KEY (id), -UNIQUE KEY a (a,b,c) -) ENGINE=ndbcluster; -REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3); -SELECT * FROM t2 ORDER BY id; -a b c x y z id i -1 1 1 c c c 3 3 -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1); -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2); -SELECT * FROM t2 ORDER BY id; -a b c x y z id i -1 1 1 b b b 5 2 -DROP TABLE t2; -drop table if exists t1; -create table t1 (pk int primary key, apk int unique, data int) engine=ndbcluster; -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (4, 1), (5, 2); -select * from t1 order by pk; -pk apk data -3 3 3 -4 1 NULL -5 2 NULL -delete from t1; -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (1, 4), (2, 5); -select * from t1 order by pk; -pk apk data -1 4 NULL -2 5 NULL -3 3 3 -delete from t1; -insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6); -load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -pk apk data -1 1 1 -3 4 NULL -5 6 NULL -delete from t1; -insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5); -load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -pk apk data -1 1 1 -3 4 NULL -5 6 NULL -delete from t1; -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) select 4, 1; -replace into t1 (pk, apk) select 2, 4; -select * from t1 order by pk; -pk apk data -2 4 NULL -3 3 3 -4 1 NULL -drop table t1; -End of 5.0 tests. diff --git a/mysql-test/r/ndb_restore.result b/mysql-test/r/ndb_restore.result deleted file mode 100644 index d1c76192cef..00000000000 --- a/mysql-test/r/ndb_restore.result +++ /dev/null @@ -1,485 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -CREATE TABLE `t1_c` ( -`capgoaledatta` mediumint(5) unsigned NOT NULL auto_increment, -`goaledatta` char(2) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(400,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3000,'20','threetrees.qt'); -CREATE TABLE `t2_c` ( -`capgotod` smallint(5) unsigned NOT NULL auto_increment, -`gotod` smallint(5) unsigned NOT NULL default '0', -`goaledatta` char(2) default NULL, -`maturegarbagefa` varchar(32) default NULL, -`descrpooppo` varchar(64) default NULL, -`svcutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capgotod`), -KEY `i quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'),(5,0,'',NULL,NULL,''); -CREATE TABLE `t3_c` ( -`CapGoaledatta` smallint(5) unsigned NOT NULL default '0', -`capgotod` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); -CREATE TABLE `t4_c` ( -`capfa` bigint(20) unsigned NOT NULL auto_increment, -`realm` varchar(32) NOT NULL default '', -`authpwchap` varchar(32) default NULL, -`fa` varchar(32) NOT NULL default '', -`payyingatta` tinyint(4) NOT NULL default '0', -`status` char(1) default NULL, -PRIMARY KEY (`fa`,`realm`), -KEY `capfa` (`capfa`), -KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(2200,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32000,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(290000000,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); -CREATE TABLE `t5_c` ( -`capfa` bigint(20) unsigned NOT NULL default '0', -`gotod` smallint(5) unsigned NOT NULL default '0', -`orderutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); -CREATE TABLE `t6_c` ( -`capfa_parent` bigint(20) unsigned NOT NULL default '0', -`capfa_child` bigint(20) unsigned NOT NULL default '0', -`relatta` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); -CREATE TABLE `t7_c` ( -`dardpo` char(15) NOT NULL default '', -`dardtestard` tinyint(3) unsigned NOT NULL auto_increment, -`FastFA` char(5) NOT NULL default '', -`FastCode` char(6) NOT NULL default '', -`Fastca` char(1) NOT NULL default '', -`Fastmag` char(1) NOT NULL default '', -`Beareratta` char(2) NOT NULL default '', -PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); -CREATE TABLE `t8_c` ( -`kattjame` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`aaaproxysessfa` varchar(255) default NULL, -`autologonallowed` char(1) default NULL, -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`acctoutputoctets` bigint(20) unsigned default NULL, -`acctinputoctets` bigint(20) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), -KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); -CREATE TABLE `t9_c` ( -`kattjame` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`actcoutpuocttets` bigint(20) unsigned default NULL, -`actinputocctets` bigint(20) unsigned default NULL, -`terminateraste` tinyint(3) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); -CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t10_c VALUES (1),(2),(3); -insert into t10_c values (10000),(2000),(3000); -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; -create table t10 engine=myisam as select * from t10_c; -ForceVarPart: 0 -ForceVarPart: 1 -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -ForceVarPart: 0 -ForceVarPart: 1 -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -7 -select count(*) from t2_c; -count(*) -7 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -7 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -select * from t10_c order by a; -a -1 -2 -3 -2000 -3000 -10000 -show table status like 't1_c'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -X X X X X X X X X X 3001 X X X X X X X -show table status like 't2_c'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -X X X X X X X X X X 501 X X X X X X X -show table status like 't4_c'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -X X X X X X X X X X 290000001 X X X X X X X -show table status like 't7_c'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -X X X X X X X X X X 29 X X X X X X X -show table status like 't10_c'; -Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -X X X X X X X X X X 10001 X X X X X X X -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -7 -select count(*) from t2_c; -count(*) -7 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -7 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -7 -select count(*) from t2_c; -count(*) -7 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -7 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t2_c; -520093696, diff --git a/mysql-test/r/ndb_restore_compat.result b/mysql-test/r/ndb_restore_compat.result deleted file mode 100644 index db17f9af32b..00000000000 --- a/mysql-test/r/ndb_restore_compat.result +++ /dev/null @@ -1,114 +0,0 @@ -DROP DATABASE IF EXISTS BANK; -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; -USE BANK; -SHOW TABLES; -Tables_in_BANK -ACCOUNT -GL -ACCOUNT_TYPE -TRANSACTION -SYSTEM_VALUES -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -TIME ACCOUNT_TYPE BALANCE DEPOSIT_COUNT DEPOSIT_SUM WITHDRAWAL_COUNT WITHDRAWAL_SUM PURGED -0 0 10000000 0 0 0 0 1 -0 1 30000 0 0 0 0 1 -0 2 20000 0 0 0 0 1 -0 3 20000 0 0 0 0 1 -0 4 20000 0 0 0 0 1 -1 0 10000000 0 0 0 0 0 -1 1 30000 0 0 0 0 0 -1 2 20000 0 0 0 0 0 -1 3 20000 0 0 0 0 0 -1 4 20000 0 0 0 0 0 -2 0 9981761 17 80457 19 98696 0 -2 1 17823 55 203688 46 215865 0 -2 2 47056 33 159275 33 132219 0 -2 3 15719 26 126833 29 131114 0 -2 4 27641 32 133459 36 125818 0 -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -ACCOUNT_ID OWNER BALANCE ACCOUNT_TYPE -0 0 9863546 0 -1 3001 12885 1 -2 3002 11012 2 -3 3003 32789 3 -4 3004 10992 4 -5 3005 2247 1 -6 3006 3170 1 -7 3007 60321 2 -8 3008 30508 3 -9 3009 62530 4 -SELECT COUNT(*) FROM TRANSACTION; -COUNT(*) -3444 -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SYSTEM_VALUES_ID VALUE -0 2039 -1 3 -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; -server_id epoch log_name start_pos end_pos -0 151 0 0 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -TRUNCATE GL; -TRUNCATE ACCOUNT; -TRUNCATE TRANSACTION; -TRUNCATE SYSTEM_VALUES; -TRUNCATE ACCOUNT_TYPE; -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -ForceVarPart: 1 -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -TIME ACCOUNT_TYPE BALANCE DEPOSIT_COUNT DEPOSIT_SUM WITHDRAWAL_COUNT WITHDRAWAL_SUM PURGED -0 0 10000000 0 0 0 0 1 -0 1 30000 0 0 0 0 1 -0 2 20000 0 0 0 0 1 -0 3 20000 0 0 0 0 1 -0 4 20000 0 0 0 0 1 -1 0 10000000 0 0 0 0 1 -1 1 30000 0 0 0 0 1 -1 2 20000 0 0 0 0 1 -1 3 20000 0 0 0 0 1 -1 4 20000 0 0 0 0 1 -2 0 10000000 0 0 0 0 1 -2 1 30000 0 0 0 0 1 -2 2 20000 0 0 0 0 1 -2 3 20000 0 0 0 0 1 -2 4 20000 0 0 0 0 1 -3 0 9963591 14 59111 19 95520 0 -3 1 44264 49 255559 53 241295 0 -3 2 25515 39 177806 36 172291 0 -3 3 16779 26 129200 29 132421 0 -3 4 39851 43 182771 34 162920 0 -4 0 9733661 141 632616 162 862546 0 -4 1 63853 426 2005337 415 1985748 0 -4 2 140473 314 1548632 297 1433674 0 -4 3 13481 310 1528043 324 1531341 0 -4 4 138532 316 1540206 309 1441525 0 -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -ACCOUNT_ID OWNER BALANCE ACCOUNT_TYPE -0 0 9679579 0 -1 3001 18130 1 -2 3002 12318 2 -3 3003 3049 3 -4 3004 39517 4 -5 3005 37051 1 -6 3006 144497 1 -7 3007 130670 2 -8 3008 13747 3 -9 3009 11442 4 -SELECT COUNT(*) FROM TRANSACTION; -COUNT(*) -4056 -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SYSTEM_VALUES_ID VALUE -0 2297 -1 5 -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; -server_id epoch log_name start_pos end_pos -0 331 0 0 -DROP DATABASE BANK; diff --git a/mysql-test/r/ndb_restore_partition.result b/mysql-test/r/ndb_restore_partition.result deleted file mode 100644 index 7dc4057e615..00000000000 --- a/mysql-test/r/ndb_restore_partition.result +++ /dev/null @@ -1,469 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -CREATE TABLE `t1_c` ( -`capgoaledatta` smallint(5) unsigned NOT NULL auto_increment, -`goaledatta` char(2) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt'); -CREATE TABLE `t2_c` ( -`capgotod` smallint(5) unsigned NOT NULL auto_increment, -`gotod` smallint(5) unsigned NOT NULL default '0', -`goaledatta` char(2) default NULL, -`maturegarbagefa` varchar(32) default NULL, -`descrpooppo` varchar(64) default NULL, -`svcutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capgotod`), -KEY `i_quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'); -CREATE TABLE `t3_c` ( -`CapGoaledatta` smallint(5) unsigned NOT NULL default '0', -`capgotod` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); -CREATE TABLE `t4_c` ( -`capfa` bigint(20) unsigned NOT NULL auto_increment, -`realm` varchar(32) NOT NULL default '', -`authpwchap` varchar(32) default NULL, -`fa` varchar(32) NOT NULL default '', -`payyingatta` tinyint(4) NOT NULL default '0', -`status` char(1) default NULL, -PRIMARY KEY (`fa`,`realm`), -KEY `capfa` (`capfa`), -KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); -CREATE TABLE `t5_c` ( -`capfa` bigint(20) unsigned NOT NULL default '0', -`gotod` smallint(5) unsigned NOT NULL default '0', -`orderutonsa` varchar(64) NOT NULL default '', -PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); -CREATE TABLE `t6_c` ( -`capfa_parent` bigint(20) unsigned NOT NULL default '0', -`capfa_child` bigint(20) unsigned NOT NULL default '0', -`relatta` smallint(5) unsigned NOT NULL default '0', -PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); -CREATE TABLE `t7_c` ( -`dardpo` char(15) NOT NULL default '', -`dardtestard` tinyint(3) unsigned NOT NULL default '0', -`FastFA` char(5) NOT NULL default '', -`FastCode` char(6) NOT NULL default '', -`Fastca` char(1) NOT NULL default '', -`Fastmag` char(1) NOT NULL default '', -`Beareratta` char(2) NOT NULL default '', -PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); -CREATE TABLE `t8_c` ( -`kattjame` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`aaaproxysessfa` varchar(255) default NULL, -`autologonallowed` char(1) default NULL, -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`acctoutputoctets` bigint(20) unsigned default NULL, -`acctinputoctets` bigint(20) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), -KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); -CREATE TABLE `t9_c` ( -`kattjame` varchar(32) NOT NULL default '', -`kattjame_entered` varchar(32) NOT NULL default '', -`realm` varchar(32) NOT NULL default '', -`realm_entered` varchar(32) NOT NULL default '', -`maturegarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa` varchar(32) NOT NULL default '', -`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', -`gest` varchar(16) default NULL, -`hassetino` varchar(16) NOT NULL default '', -`squardporoot` varchar(15) NOT NULL default '', -`naspo` varchar(15) default NULL, -`beareratta` char(2) default NULL, -`fastCode` varchar(6) default NULL, -`fastFA` varchar(5) default NULL, -`fastca` char(1) default NULL, -`fastmag` char(1) default NULL, -`lastupdate` datetime default NULL, -`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', -`accthassetitime` int(10) unsigned default NULL, -`actcoutpuocttets` bigint(20) unsigned default NULL, -`actinputocctets` bigint(20) unsigned default NULL, -`terminateraste` tinyint(3) unsigned default NULL, -PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -6 -select count(*) from t2_c; -count(*) -6 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -6 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -ALTER TABLE t1_c -PARTITION BY RANGE (`capgoaledatta`) -(PARTITION p0 VALUES LESS THAN MAXVALUE); -ALTER TABLE t2_c -PARTITION BY LIST(`capgotod`) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6)); -ALTER TABLE t3_c -PARTITION BY HASH (`CapGoaledatta`); -ALTER TABLE t5_c -PARTITION BY HASH (`capfa`) -PARTITIONS 4; -ALTER TABLE t6_c -PARTITION BY LINEAR HASH (`relatta`) -PARTITIONS 4; -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -6 -select count(*) from t2_c; -count(*) -6 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -6 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -select count(*) from t1; -count(*) -5 -select count(*) from t1_c; -count(*) -5 -select count(*) -from (select * from t1 union -select * from t1_c) a; -count(*) -5 -select count(*) from t2; -count(*) -6 -select count(*) from t2_c; -count(*) -6 -select count(*) -from (select * from t2 union -select * from t2_c) a; -count(*) -6 -select count(*) from t3; -count(*) -4 -select count(*) from t3_c; -count(*) -4 -select count(*) -from (select * from t3 union -select * from t3_c) a; -count(*) -4 -select count(*) from t4; -count(*) -22 -select count(*) from t4_c; -count(*) -22 -select count(*) -from (select * from t4 union -select * from t4_c) a; -count(*) -22 -select count(*) from t5; -count(*) -3 -select count(*) from t5_c; -count(*) -3 -select count(*) -from (select * from t5 union -select * from t5_c) a; -count(*) -3 -select count(*) from t6; -count(*) -8 -select count(*) from t6_c; -count(*) -8 -select count(*) -from (select * from t6 union -select * from t6_c) a; -count(*) -8 -select count(*) from t7; -count(*) -5 -select count(*) from t7_c; -count(*) -5 -select count(*) -from (select * from t7 union -select * from t7_c) a; -count(*) -5 -select count(*) from t8; -count(*) -3 -select count(*) from t8_c; -count(*) -3 -select count(*) -from (select * from t8 union -select * from t8_c) a; -count(*) -3 -select count(*) from t9; -count(*) -3 -select count(*) from t9_c; -count(*) -3 -select count(*) -from (select * from t9 union -select * from t9_c) a; -count(*) -3 -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -Create table test/def/t2_c failed: Translate frm error -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t2_c; -520093696, diff --git a/mysql-test/r/ndb_restore_print.result b/mysql-test/r/ndb_restore_print.result deleted file mode 100644 index e05f8e43d1a..00000000000 --- a/mysql-test/r/ndb_restore_print.result +++ /dev/null @@ -1,321 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -create table t1 -(pk int key -,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) -,b1 TINYINT, b2 TINYINT UNSIGNED -,c1 SMALLINT, c2 SMALLINT UNSIGNED -,d1 INT, d2 INT UNSIGNED -,e1 BIGINT, e2 BIGINT UNSIGNED -,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY -,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY -,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) -,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) -) engine myisam; -insert into t1 values -(1 -,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 -,127, 255 -,32767, 65535 -,2147483647, 4294967295 -,9223372036854775807, 18446744073709551615 -,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 -,0x12,0x123456789abcdef0, 0x00123450 -); -insert into t1 values -(2 -,0, 0, 0, 0, 0 -,-128, 0 -,-32768, 0 -,-2147483648, 0 -,-9223372036854775808, 0 -,'','','' - ,'','','' - ,0x0,0x0,0x0 -,0x0,0x0,0x0 -); -insert into t1 values -(3 -,NULL,NULL,NULL,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -,NULL,NULL,NULL -); -select pk -,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) -,b1, b2 -,c1 , c2 -,d1 , d2 -,e1 , e2 -,f1 , f2, f3 -,g1 , g2, g3 -,hex(h1), hex(h2), hex(h3) -,hex(i1), hex(i2), hex(i3) -from t1 order by pk; -pk 1 -hex(a1) 1 -hex(a2) 17 -hex(a3) 789A -hex(a4) 789ABCDE -hex(a5) FEDC0001 -b1 127 -b2 255 -c1 32767 -c2 65535 -d1 2147483647 -d2 4294967295 -e1 9223372036854775807 -e2 18446744073709551615 -f1 1 -f2 12345678901234567890123456789012 -f3 123456789 -g1 1 -g2 12345678901234567890123456789012 -g3 123456789 -hex(h1) 12 -hex(h2) 123456789ABCDEF0 -hex(h3) 012345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 12 -hex(i2) 123456789ABCDEF0 -hex(i3) 00123450 -pk 2 -hex(a1) 0 -hex(a2) 0 -hex(a3) 0 -hex(a4) 0 -hex(a5) 0 -b1 -128 -b2 0 -c1 -32768 -c2 0 -d1 -2147483648 -d2 0 -e1 -9223372036854775808 -e2 0 -f1 -f2 -f3 -g1 -g2 -g3 -hex(h1) 00 -hex(h2) 0000000000000000 -hex(h3) 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 00 -hex(i2) 00 -hex(i3) 00 -pk 3 -hex(a1) NULL -hex(a2) NULL -hex(a3) NULL -hex(a4) NULL -hex(a5) NULL -b1 NULL -b2 NULL -c1 NULL -c2 NULL -d1 NULL -d2 NULL -e1 NULL -e2 NULL -f1 NULL -f2 NULL -f3 NULL -g1 NULL -g2 NULL -g3 NULL -hex(h1) NULL -hex(h2) NULL -hex(h3) NULL -hex(i1) NULL -hex(i2) NULL -hex(i3) NULL -alter table t1 engine ndb; -select pk -,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) -,b1, b2 -,c1 , c2 -,d1 , d2 -,e1 , e2 -,f1 , f2, f3 -,g1 , g2, g3 -,hex(h1), hex(h2), hex(h3) -,hex(i1), hex(i2), hex(i3) -from t1 order by pk; -pk 1 -hex(a1) 1 -hex(a2) 17 -hex(a3) 789A -hex(a4) 789ABCDE -hex(a5) FEDC0001 -b1 127 -b2 255 -c1 32767 -c2 65535 -d1 2147483647 -d2 4294967295 -e1 9223372036854775807 -e2 18446744073709551615 -f1 1 -f2 12345678901234567890123456789012 -f3 123456789 -g1 1 -g2 12345678901234567890123456789012 -g3 123456789 -hex(h1) 12 -hex(h2) 123456789ABCDEF0 -hex(h3) 012345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 12 -hex(i2) 123456789ABCDEF0 -hex(i3) 00123450 -pk 2 -hex(a1) 0 -hex(a2) 0 -hex(a3) 0 -hex(a4) 0 -hex(a5) 0 -b1 -128 -b2 0 -c1 -32768 -c2 0 -d1 -2147483648 -d2 0 -e1 -9223372036854775808 -e2 0 -f1 -f2 -f3 -g1 -g2 -g3 -hex(h1) 00 -hex(h2) 0000000000000000 -hex(h3) 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -hex(i1) 00 -hex(i2) 00 -hex(i3) 00 -pk 3 -hex(a1) NULL -hex(a2) NULL -hex(a3) NULL -hex(a4) NULL -hex(a5) NULL -b1 NULL -b2 NULL -c1 NULL -c2 NULL -d1 NULL -d2 NULL -e1 NULL -e2 NULL -f1 NULL -f2 NULL -f3 NULL -g1 NULL -g2 NULL -g3 NULL -hex(h1) NULL -hex(h2) NULL -hex(h3) NULL -hex(i1) NULL -hex(i2) NULL -hex(i3) NULL -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -1;0x1;0x17;0x789A;0x789ABCDE;0xFEDC0001;127;255;32767;65535;2147483647;4294967295;9223372036854775807;18446744073709551615;1;12345678901234567890123456789012;123456789;1;12345678901234567890123456789012;123456789;0x12;0x123456789ABCDEF0;0x012345;0x12;0x123456789ABCDEF0;0x00123450 -2;0x0;0x0;0x0;0x0;0x0;-128;0;-32768;0;-2147483648;0;-9223372036854775808;0;;;;;;;0x0;0x0;0x0;0x0;0x0;0x0 -3;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N -1,0x1,0x17,0x789A,0x789ABCDE,0xFEDC0001,127,255,32767,65535,2147483647,4294967295,9223372036854775807,18446744073709551615,'1','12345678901234567890123456789012','123456789','1','12345678901234567890123456789012','123456789',0x12,0x123456789ABCDEF0,0x012345,0x12,0x123456789ABCDEF0,0x00123450 -2,0x0,0x0,0x0,0x0,0x0,-128,0,-32768,0,-2147483648,0,-9223372036854775808,0,'','','','','','',0x0,0x0,0x0,0x0,0x0,0x0 -3,,,,,,,,,,,,,,,,,,,,,,,,, -drop table t1; -create table t1 -(pk int key -,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY -,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY -,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255) -,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) -) engine ndb; -insert into t1 values -(1 -,'1','12345678901234567890123456789012','123456789 ' - ,'1 ','12345678901234567890123456789012 ','123456789 ' - ,0x20,0x123456789abcdef020, 0x012345000020 -,0x1200000020,0x123456789abcdef000000020, 0x00123450000020 -); -create table t2 (pk int key, a int) engine ndb; -create table t3 (pk int key, a int) engine ndb; -create table t4 (pk int key, a int) engine ndb; -insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15); -insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25); -insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -'1' '1' '12345678901234567890123456789012' '123456789' '1' '12345678901234567890123456789012' '123456789' '0x20' '0x123456789ABCDEF020' '0x012345000020' '0x1200000020' '0x123456789ABCDEF000000020' '0x00123450000020' - -t1 --- -1 1 12345678901234567890123456789012 123456789 1 12345678901234567890123456789012 123456789 0x20 0x123456789ABCDEF020 0x012345000020 0x1200000020 0x123456789ABCDEF000000020 0x00123450000020 - -t2 --- -1 11 -2 12 -3 13 -4 14 -5 15 - -t3 --- -1 21 -2 22 -3 23 -4 24 -5 25 - -t4 --- -1 31 -2 32 -3 33 -4 34 -5 35 -drop table t1; -create table t1 -(pk int key -,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED -) engine ndb; -insert into t1 values(1, 8388607, 16777215); -insert into t1 values(2, -8388608, 0); -insert into t1 values(3, -1, 1); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -1;8388607;16777215 -2;-8388608;0 -3;-1;1 -drop table t1; -drop table t2; -drop table t3; -drop table t4; diff --git a/mysql-test/r/ndb_row_format.result b/mysql-test/r/ndb_row_format.result deleted file mode 100644 index ae165d87c5c..00000000000 --- a/mysql-test/r/ndb_row_format.result +++ /dev/null @@ -1,65 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; -CREATE TABLE t1 -( a INT KEY, -b VARCHAR(10) ) -ROW_FORMAT=FIXED -ENGINE=NDB; -ERROR HY000: Can't create table 'test.t1' (errno: 138) -SHOW WARNINGS; -Level Code Message -Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute' -Error 1005 Can't create table 'test.t1' (errno: 138) -CREATE TABLE t1 -( a INT KEY, -b INT ) -ENGINE=NDB; -ForceVarPart: 1 -DROP TABLE t1; -CREATE TABLE t1 -( a INT KEY, -b INT ) -ROW_FORMAT=DEFAULT -ENGINE=NDB; -ForceVarPart: 1 -DROP TABLE t1; -CREATE TABLE t1 -( a INT KEY, -b INT ) -ROW_FORMAT=FIXED -ENGINE=NDB; -ForceVarPart: 0 -DROP TABLE t1; -CREATE TABLE t1 -( a INT KEY, -b INT ) -ROW_FORMAT=DYNAMIC -ENGINE=NDB; -ForceVarPart: 1 -DROP TABLE t1; -create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; -insert into t1(b) values ('0123456789'); -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -select count(*) from t1; -count(*) -1024 -begin; -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -rollback; -select count(*),b from t1 group by b; -count(*) b -1024 0123456789 -drop table t1; diff --git a/mysql-test/r/ndb_single_user.result b/mysql-test/r/ndb_single_user.result deleted file mode 100644 index 54ae99b2f4f..00000000000 --- a/mysql-test/r/ndb_single_user.result +++ /dev/null @@ -1,119 +0,0 @@ -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -create table t1 (a int key, b int unique, c int) engine ndb; -ERROR HY000: Can't create table 'test.t1' (errno: 299) -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ERROR HY000: Failed to create LOGFILE GROUP -show warnings; -Level Code Message -Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1516 Failed to create LOGFILE GROUP -create table t1 (a int key, b int unique, c int) engine ndb; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ERROR HY000: Failed to create TABLESPACE -show warnings; -Level Code Message -Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1516 Failed to create TABLESPACE -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -ERROR HY000: Failed to drop LOGFILE GROUP -show warnings; -Level Code Message -Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1517 Failed to drop LOGFILE GROUP -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -ERROR HY000: Failed to alter: DROP DATAFILE -show warnings; -Level Code Message -Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1521 Failed to alter: DROP DATAFILE -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -DROP TABLESPACE ts1 -ENGINE NDB; -ERROR HY000: Failed to drop TABLESPACE -show warnings; -Level Code Message -Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1517 Failed to drop TABLESPACE -DROP TABLESPACE ts1 -ENGINE NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0); -create table t2 as select * from t1; -select * from t1 where a = 1; -a b c -1 1 0 -select * from t1 where b = 4; -a b c -4 4 0 -select * from t1 where a > 4 order by a; -a b c -5 5 0 -6 6 0 -7 7 0 -8 8 0 -9 9 0 -10 10 0 -update t1 set b=102 where a = 2; -update t1 set b=103 where b = 3; -update t1 set b=b+100; -update t1 set b=b+100 where a > 7; -delete from t1; -insert into t1 select * from t2; -create unique index new_index on t1 (b,c); -drop table t1; -ERROR 42S02: Unknown table 't1' -create index new_index_fail on t1 (c); -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0); -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -select * from t1 where a = 1; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -select * from t1 where b = 4; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=102 where a = 2; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=103 where b = 3; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=b+100; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -update t1 set b=b+100 where a > 7; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -BEGIN; -update t1 set b=b+100 where a=1; -BEGIN; -update t1 set b=b+100 where a=2; -update t1 set b=b+100 where a=3; -COMMIT; -update t1 set b=b+100 where a=4; -ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER -COMMIT; -ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER -create table t2 (a int) engine myisam; -alter table t2 add column (b int); -drop table t2; -drop table t1; diff --git a/mysql-test/r/ndb_sp.result b/mysql-test/r/ndb_sp.result deleted file mode 100644 index 32e6d2eddd7..00000000000 --- a/mysql-test/r/ndb_sp.result +++ /dev/null @@ -1,44 +0,0 @@ -drop table if exists t1; -create table t1 ( -a int not null primary key, -b int not null -) engine=ndb; -insert into t1 values (1,10), (2,20), (3,100), (4, 100); -create procedure test_proc1 (in var_in int) -begin -select * from t1 where a = var_in; -end; -create procedure test_proc2 (out var_out int) -begin -select b from t1 where a = 1 into var_out; -end; -create procedure test_proc3 (inout var_inout int) -begin -select b from t1 where a = var_inout into var_inout; -end; -// -call test_proc1(1); -a b -1 10 -call test_proc2(@test_var); -select @test_var; -@test_var -10 -set @test_var = 1; -call test_proc3(@test_var); -select @test_var; -@test_var -10 -alter procedure test_proc1 comment 'new comment'; -show create procedure test_proc1; -Procedure sql_mode Create Procedure -test_proc1 CREATE DEFINER=`root`@`localhost` PROCEDURE `test_proc1`(in var_in int) - COMMENT 'new comment' -begin -select * from t1 where a = var_in; -end -drop procedure test_proc1; -drop procedure test_proc2; -drop procedure test_proc3; -drop table t1; -End of 5.1 tests diff --git a/mysql-test/r/ndb_subquery.result b/mysql-test/r/ndb_subquery.result deleted file mode 100644 index 45662882d3a..00000000000 --- a/mysql-test/r/ndb_subquery.result +++ /dev/null @@ -1,92 +0,0 @@ -drop table if exists t1, t2, t3, t4; -create table t1 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; -create table t2 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; -create table t3 (a int not null primary key, b int not null) engine=ndb; -create table t4 (c int not null primary key, d int not null) engine=ndb; -insert into t1 values (1,1,1),(2,2,2),(3,3,3); -insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5); -insert into t3 values (1,10), (2,10), (3,30), (4, 30); -insert into t4 values (1,10), (2,10), (3,30), (4, 30); -explain select * from t2 where p NOT IN (select p from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func # -select * from t2 where p NOT IN (select p from t1) order by p; -p u o -4 4 4 -5 5 5 -explain select * from t2 where p NOT IN (select u from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 unique_subquery u u 4 func # -select * from t2 where p NOT IN (select u from t1) order by p; -p u o -4 4 4 -5 5 5 -explain select * from t2 where p NOT IN (select o from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 index_subquery o o 4 func # -select * from t2 where p NOT IN (select o from t1) order by p; -p u o -4 4 4 -5 5 5 -explain select * from t2 where p NOT IN (select p+0 from t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL # Using where -select * from t2 where p NOT IN (select p+0 from t1) order by p; -p u o -4 4 4 -5 5 5 -drop table t1; -drop table t2; -create table t1 (p int not null primary key, u int not null) engine=ndb; -insert into t1 values (1,1),(2,2),(3,3); -create table t2 as -select t1.* -from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8 -where t1.u = t2.u -and t2.u = t3.u -and t3.u = t4.u -and t4.u = t5.u -and t5.u = t6.u -and t6.u = t7.u -and t7.u = t8.u; -select * from t2 order by 1; -p u -1 1 -2 2 -3 3 -select * from t3 where a = any (select c from t4 where c = 1) order by a; -a b -1 10 -select * from t3 where a in (select c from t4 where c = 1) order by a; -a b -1 10 -select * from t3 where a <> some (select c from t4 where c = 1) order by a; -a b -2 10 -3 30 -4 30 -select * from t3 where a > all (select c from t4 where c = 1) order by a; -a b -2 10 -3 30 -4 30 -select * from t3 where row(1,10) = (select c,d from t4 where c = 1) order by a; -a b -1 10 -2 10 -3 30 -4 30 -select * from t3 where exists (select * from t4 where c = 1) order by a; -a b -1 10 -2 10 -3 30 -4 30 -drop table if exists t1, t2, t3, t4; -End of 5.1 tests diff --git a/mysql-test/r/ndb_temporary.result b/mysql-test/r/ndb_temporary.result deleted file mode 100644 index 61fc1561e4f..00000000000 --- a/mysql-test/r/ndb_temporary.result +++ /dev/null @@ -1,21 +0,0 @@ -DROP TABLE IF EXISTS t1; -create temporary table t1 (a int key) engine=ndb; -ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' -create temporary table t1 (a int key) engine=myisam; -alter table t1 engine=ndb; -ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' -drop table t1; -SET SESSION storage_engine=NDBCLUSTER; -create table t1 (a int key); -select engine from information_schema.tables where table_name = 't1'; -engine -NDBCLUSTER -drop table t1; -create temporary table t1 (a int key); -show create table t1; -Table Create Table -t1 CREATE TEMPORARY TABLE `t1` ( - `a` int(11) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; diff --git a/mysql-test/r/ndb_transaction.result b/mysql-test/r/ndb_transaction.result deleted file mode 100644 index 691b91b1d36..00000000000 --- a/mysql-test/r/ndb_transaction.result +++ /dev/null @@ -1,257 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=ndbcluster; -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 1 -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -attr1 -2 -rollback; -select count(*) from t1; -count(*) -0 -select * from t1 where pk1 = 1; -pk1 attr1 -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -attr1 -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 1 -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -attr1 -2 -begin; -update t1 set attr1 = attr1 * 2; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 2 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -2 4 1 2 -rollback; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 1 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -begin; -update t1 set attr1 = attr1 * 2; -commit; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 2 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -2 4 1 2 -begin; -delete from t1 where attr1 = 2; -select count(*) from t1; -count(*) -1 -select * from t1 where pk1 = 1; -pk1 attr1 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -rollback; -select count(*) from t1; -count(*) -2 -select * from t1 where pk1 = 1; -pk1 attr1 -1 2 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -2 4 1 2 -begin; -delete from t1 where attr1 = 2; -commit; -select count(*) from t1; -count(*) -1 -select * from t1 where pk1 = 1; -pk1 attr1 -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -pk1 attr1 pk1 attr1 -DROP TABLE t1; -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select sum(id) from t1; -sum(id) -3 -select * from t1 where id = 1; -id id2 -1 1 -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -id -2 -rollback; -select sum(id) from t1; -sum(id) -NULL -select * from t1 where id = 1; -id id2 -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -id -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; -select sum(id) from t1; -sum(id) -3 -select * from t1 where id = 1; -id id2 -1 1 -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -id -2 -begin; -update t1 set id = id * 2; -select sum(id) from t1; -sum(id) -6 -select * from t1 where id = 2; -id id2 -2 1 -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -id id2 id id2 -4 2 2 1 -rollback; -select sum(id) from t1; -sum(id) -3 -select * from t1 where id = 2; -id id2 -2 2 -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -id id2 id id2 -begin; -update t1 set id = id * 2; -commit; -select sum(id) from t1; -sum(id) -6 -select * from t1 where id = 2; -id id2 -2 1 -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -id id2 id id2 -4 2 2 1 -DROP TABLE t1; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -CREATE TABLE t3 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned, -PRIMARY KEY(a) -) engine=ndbcluster; -CREATE TABLE t4 ( -a bigint unsigned NOT NULL, -b bigint unsigned not null, -c bigint unsigned NOT NULL, -d int unsigned, -PRIMARY KEY(a, b, c) -) engine=ndbcluster; -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t2; -count(*) -100 -select count(*) from t3; -count(*) -100 -select count(*) from t4; -count(*) -100 -begin; -begin; -drop table t2; -drop table t3; -drop table t4; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -attr1 INT NOT NULL -) ENGINE=ndbcluster; -create database mysqltest; -use mysqltest; -CREATE TABLE t2 ( -a bigint unsigned NOT NULL PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -begin; -insert into test.t1 values(1,1); -insert into t2 values(1,1,1); -insert into test.t1 values(2,2); -insert into t2 values(2,2,2); -select count(*) from test.t1; -count(*) -2 -select count(*) from t2; -count(*) -2 -select * from test.t1 where pk1 = 1; -pk1 attr1 -1 1 -select * from t2 where a = 1; -a b c -1 1 1 -select test.t1.attr1 -from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; -attr1 -2 -select t2.a -from t2, t2 as t2x where t2.a = t2x.a + 1; -a -2 -select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; -pk1 a -1 2 -rollback; -select count(*) from test.t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -drop table test.t1, t2; -drop database mysqltest; diff --git a/mysql-test/r/ndb_trigger.result b/mysql-test/r/ndb_trigger.result deleted file mode 100644 index 28f9f9bdc37..00000000000 --- a/mysql-test/r/ndb_trigger.result +++ /dev/null @@ -1,315 +0,0 @@ -drop table if exists t1, t2, t3, t4, t5; -create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; -create table t2 (op char(1), a int not null, b decimal (63,30)); -create table t3 select 1 as i; -create table t4 (a int not null primary key, b int) engine=ndb; -create table t5 (a int not null primary key, b int) engine=ndb; -create trigger t1_bu before update on t1 for each row -begin -insert into t2 values ("u", old.a, old.b); -set new.b = old.b + 10; -end;// -create trigger t1_bd before delete on t1 for each row -begin -insert into t2 values ("d", old.a, old.b); -end;// -create trigger t4_au after update on t4 -for each row begin -update t5 set b = b+1; -end; -// -create trigger t4_ad after delete on t4 -for each row begin -update t5 set b = b+1; -end; -// -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (3, 3, 3.05), (4, 4, 4.05); -insert into t4 values (1,1), (2,2), (3,3), (4, 4); -insert into t5 values (1,0); -update t1 set a=5 where a != 3; -select * from t1 order by id; -id a b -1 5 11.050000000000000000000000000000 -2 5 12.050000000000000000000000000000 -3 3 3.050000000000000000000000000000 -4 5 14.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 1 1.050000000000000000000000000000 -u 2 2.050000000000000000000000000000 -u 4 4.050000000000000000000000000000 -delete from t2; -update t1, t3 set a=6 where a = 5; -select * from t1 order by id; -id a b -1 6 21.050000000000000000000000000000 -2 6 22.050000000000000000000000000000 -3 3 3.050000000000000000000000000000 -4 6 24.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 5 11.050000000000000000000000000000 -u 5 12.050000000000000000000000000000 -u 5 14.050000000000000000000000000000 -delete from t2; -delete from t1 where a != 3; -select * from t1 order by id; -id a b -3 3 3.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 6 21.050000000000000000000000000000 -d 6 22.050000000000000000000000000000 -d 6 24.050000000000000000000000000000 -delete from t2; -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (4, 4, 4.05); -delete t1 from t1, t3 where a != 3; -select * from t1 order by id; -id a b -3 3 3.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 1 1.050000000000000000000000000000 -d 2 2.050000000000000000000000000000 -d 4 4.050000000000000000000000000000 -delete from t2; -insert into t1 values (4, 4, 4.05); -insert into t1 (id, a) values (4, 1), (3, 1) on duplicate key update a= a + 1; -select * from t1 order by id; -id a b -3 4 13.050000000000000000000000000000 -4 5 14.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 3 3.050000000000000000000000000000 -u 4 4.050000000000000000000000000000 -delete from t2; -delete from t3; -insert into t3 values (4), (3); -insert into t1 (id, a) (select i, 1 from t3) on duplicate key update a= a + 1; -select * from t1 order by id; -id a b -3 5 23.050000000000000000000000000000 -4 6 24.050000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -u 4 13.050000000000000000000000000000 -u 5 14.050000000000000000000000000000 -delete from t2; -replace into t1 (id, a) values (4, 1), (3, 1); -select * from t1 order by id; -id a b -3 1 0.000000000000000000000000000000 -4 1 0.000000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 5 23.050000000000000000000000000000 -d 6 24.050000000000000000000000000000 -delete from t1; -delete from t2; -insert into t1 values (3, 1, 1.05), (4, 1, 2.05); -replace into t1 (id, a) (select i, 2 from t3); -select * from t1 order by id; -id a b -3 2 0.000000000000000000000000000000 -4 2 0.000000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 1 1.050000000000000000000000000000 -d 1 2.050000000000000000000000000000 -delete from t1; -delete from t2; -insert into t1 values (3, 1, 1.05), (5, 2, 2.05); -load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a); -select * from t1 order by id; -id a b -3 4 0.000000000000000000000000000000 -5 6 0.000000000000000000000000000000 -select * from t2 order by op, a, b; -op a b -d 1 1.050000000000000000000000000000 -d 2 2.050000000000000000000000000000 -update t4 set b = 10 where a = 1; -select * from t5 order by a; -a b -1 1 -update t5 set b = 0; -delete from t4 where a = 1; -select * from t5 order by a; -a b -1 1 -drop trigger t4_au; -drop trigger t4_ad; -drop table t1, t2, t3, t4, t5; -CREATE TABLE t1 ( -id INT NOT NULL PRIMARY KEY, -xy INT -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (1, 0); -CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // -CREATE TABLE t2 ( -id INT NOT NULL PRIMARY KEY, -xy INT -) ENGINE=ndbcluster; -INSERT INTO t2 VALUES (2, 0); -CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; -INSERT INTO t3 VALUES (1); -CREATE TABLE t4 LIKE t1; -CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // -CREATE TABLE t5 LIKE t2; -UPDATE t1 SET xy = 3 WHERE id = 1; -SELECT xy FROM t1 where id = 1; -xy -3 -SELECT xy FROM t2 where id = 1; -xy -3 -UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -xy -4 -SELECT xy FROM t2 where id = 1; -xy -4 -INSERT INTO t4 SELECT * FROM t1; -INSERT INTO t5 SELECT * FROM t2; -UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; -SELECT xy FROM t1 where id = 1; -xy -3 -SELECT xy FROM t2 where id = 1; -xy -3 -SELECT xy FROM t4 where id = 1; -xy -3 -SELECT xy FROM t5 where id = 1; -xy -3 -UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -xy -4 -SELECT xy FROM t2 where id = 1; -xy -4 -SELECT xy FROM t4 where id = 1; -xy -4 -SELECT xy FROM t5 where id = 1; -xy -4 -INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; -SELECT xy FROM t1 where id = 1; -xy -5 -SELECT xy FROM t2 where id = 1; -xy -5 -DROP TRIGGER t1_update; -DROP TRIGGER t4_update; -CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // -CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // -INSERT INTO t1 VALUES (5, 0),(6,0); -INSERT INTO t2 VALUES (5, 1),(6,1); -INSERT INTO t3 VALUES (5); -SELECT * FROM t1 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -id xy -1 5 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -INSERT INTO t1 VALUES (5,0); -UPDATE t2 SET xy = 1 WHERE id = 6; -TRUNCATE t4; -INSERT INTO t4 SELECT * FROM t1; -TRUNCATE t5; -INSERT INTO t5 SELECT * FROM t2; -SELECT * FROM t1 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -SELECT * FROM t4 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t5 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -id xy -1 5 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -SELECT * FROM t4 order by id; -id xy -1 5 -6 0 -SELECT * FROM t5 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -INSERT INTO t1 VALUES (5, 0); -REPLACE INTO t2 VALUES (6,1); -SELECT * FROM t1 order by id; -id xy -1 5 -5 0 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 1 -REPLACE INTO t1 VALUES (5, 1); -SELECT * FROM t1 order by id; -id xy -1 5 -5 1 -6 0 -SELECT * FROM t2 order by id; -id xy -1 5 -2 0 -5 1 -6 0 -DROP TRIGGER t1_delete; -DROP TRIGGER t4_delete; -DROP TABLE t1, t2, t3, t4, t5; -End of 5.1 tests diff --git a/mysql-test/r/ndb_truncate.result b/mysql-test/r/ndb_truncate.result deleted file mode 100644 index 811e5e3afeb..00000000000 --- a/mysql-test/r/ndb_truncate.result +++ /dev/null @@ -1,23 +0,0 @@ -DROP TABLE IF EXISTS t1, t2; -CREATE TABLE t1 ( -a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, -b int unsigned not null, -c int unsigned -) engine=ndbcluster; -select count(*) from t1; -count(*) -5000 -select * from t1 order by a limit 2; -a b c -1 509 2500 -2 510 7 -truncate table t1; -select count(*) from t1; -count(*) -0 -insert into t1 values(NULL,1,1),(NULL,2,2); -select * from t1 order by a; -a b c -1 1 1 -2 2 2 -drop table t1; diff --git a/mysql-test/r/ndb_types.result b/mysql-test/r/ndb_types.result deleted file mode 100644 index ec2858d818a..00000000000 --- a/mysql-test/r/ndb_types.result +++ /dev/null @@ -1,76 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -auto int(5) unsigned NOT NULL auto_increment, -string char(10) default "hello", -vstring varchar(10) default "hello", -bin binary(2), -vbin varbinary(7), -tiny tinyint(4) DEFAULT '0' NOT NULL , -short smallint(6) DEFAULT '1' NOT NULL , -medium mediumint(8) DEFAULT '0' NOT NULL, -long_int int(11) DEFAULT '0' NOT NULL, -longlong bigint(13) DEFAULT '0' NOT NULL, -real_float float(13,1) DEFAULT 0.0 NOT NULL, -real_double double(16,4), -real_decimal decimal(16,4), -utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, -ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, -umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, -ulong int(11) unsigned DEFAULT '0' NOT NULL, -ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, -bits bit(3), -options enum('one','two','tree') not null, -flags set('one','two','tree') not null, -date_field date, -year_field year, -time_field time, -date_time datetime, -time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -PRIMARY KEY (auto), -KEY (utiny), -KEY (tiny), -KEY (short), -KEY any_name (medium), -KEY (longlong), -KEY (real_float), -KEY (ushort), -KEY (umedium), -KEY (ulong), -KEY (ulonglong,ulong), -KEY (options,flags) -); -set @now = now(); -insert into t1 -(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong, -bits,options,flags,date_field,year_field,time_field,date_time) -values -("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, -b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, -bits,options,flags,date_field,year_field,time_field,date_time -from t1; -auto string vstring bin vbin tiny short medium long_int longlong real_float real_double real_decimal utiny ushort umedium ulong ulonglong bits options flags date_field year_field time_field date_time -1 aaaa aaaa ªª ªª -1 -1 -1 -1 -1 1.1 1.1000 1.1000 1 00001 1 1 1  one one 1901-01-01 1901 01:01:01 1901-01-01 01:01:01 -select time_stamp>@now from t1; -time_stamp>@now -1 -set @now = now(); -update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB, -tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2, -real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2, -ulonglong=2, bits=b'010', -options='one',flags='one', date_field='1902-02-02',year_field='1902', -time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1; -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, -bits,options,flags,date_field,year_field,time_field,date_time -from t1; -auto string vstring bin vbin tiny short medium long_int longlong real_float real_double real_decimal utiny ushort umedium ulong ulonglong bits options flags date_field year_field time_field date_time -1 bbbb bbbb »» »» -2 -2 -2 -2 -2 2.2 2.2000 2.2000 2 00002 2 2 2  one one 1902-02-02 1902 02:02:02 1902-02-02 02:02:02 -select time_stamp>@now from t1; -time_stamp>@now -1 -drop table t1; -End of 4.1 tests diff --git a/mysql-test/r/ndb_update.result b/mysql-test/r/ndb_update.result deleted file mode 100644 index 919b8c44a40..00000000000 --- a/mysql-test/r/ndb_update.result +++ /dev/null @@ -1,42 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -pk1 INT NOT NULL PRIMARY KEY, -b INT NOT NULL, -c INT NOT NULL UNIQUE -) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2); -UPDATE t1 set b = c; -select * from t1 order by pk1; -pk1 b c -0 0 0 -1 1 1 -2 2 2 -UPDATE t1 set pk1 = 4 where pk1 = 1; -select * from t1 order by pk1; -pk1 b c -0 0 0 -2 2 2 -4 1 1 -UPDATE t1 set pk1 = 4 where pk1 = 2; -ERROR 23000: Duplicate entry '4' for key 'PRIMARY' -UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2; -select * from t1 order by pk1; -pk1 b c -0 0 0 -2 2 2 -4 1 1 -UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4; -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4; -select * from t1 order by pk1; -pk1 b c -0 0 0 -2 2 2 -4 1 1 -UPDATE t1 set pk1 = pk1 + 10; -select * from t1 order by pk1; -pk1 b c -10 0 0 -12 2 2 -14 1 1 -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/ndb_view.result b/mysql-test/r/ndb_view.result deleted file mode 100644 index b7d1b6860c8..00000000000 --- a/mysql-test/r/ndb_view.result +++ /dev/null @@ -1,24 +0,0 @@ -DROP TABLE IF EXISTS t1,t2,t3; -DROP VIEW IF EXISTS v1,v2,v3; -create table t1 (a int, b int, c int, d int) engine=ndb; -insert into t1 values (1,2,3,4),(5,6,7,8); -create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1; -select * from v1 order by a,b,c; -a b c d -3 1 4 6 -7 5 8 18 -update v1 set a=a+100 where b=1; -select * from v1 order by a,b,c; -a b c d -7 5 8 18 -103 1 4 106 -drop view v1; -create view v1 as select t1.c as a from t1; -insert into v1 values (200); -select * from t1 order by a,b,c,d; -a b c d -NULL NULL 200 NULL -1 2 103 4 -5 6 7 8 -drop view v1; -drop table t1; diff --git a/mysql-test/r/ndbapi.result b/mysql-test/r/ndbapi.result deleted file mode 100644 index 8e680391a81..00000000000 --- a/mysql-test/r/ndbapi.result +++ /dev/null @@ -1,22 +0,0 @@ -DROP TABLE IF EXISTS t0; -drop database if exists mysqltest; -Running ndbapi_simple -Running ndbapi_simple_index -Running ndbapi_scan -Running ndbapi_retries -Running ndbapi_async -Running ndbapi_async1 -use TEST_DB; -create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text, -primary key(c0, c2)) engine ndb charset latin1; -insert into t0 values (1, 2, 'a', 'b', null); -insert into t0 values (3, 4, 'c', 'd', null); -update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; -update t0 set c3 = 'f'; -update t0 set c3 = 'F'; -update t0 set c2 = 'g' where c0 = 1; -update t0 set c2 = 'G' where c0 = 1; -update t0 set c0 = 5, c2 = 'H' where c0 = 3; -delete from t0; -drop table t0; -Running mgmapi_logevent diff --git a/mysql-test/r/partition_03ndb.result b/mysql-test/r/partition_03ndb.result deleted file mode 100644 index 28339cc7435..00000000000 --- a/mysql-test/r/partition_03ndb.result +++ /dev/null @@ -1,1361 +0,0 @@ -SET SESSION storage_engine='NDB' ; -SET @max_row = 200; -SET AUTOCOMMIT= 1; -#------------------------------------------------------------------------ -# 0. Creation of an auxiliary table needed in all testcases -#------------------------------------------------------------------------ -DROP TABLE IF EXISTS t0_template; -CREATE TABLE t0_template ( f1 INTEGER, f2 char(20), PRIMARY KEY(f1)) -ENGINE = MEMORY; -# Logging of 200 INSERTs into t0_template suppressed -#------------------------------------------------------------------------ -# 1. Some syntax checks -#------------------------------------------------------------------------ -# 1.1 Subpartioned table without subpartitioning rule must be rejected -DROP TABLE IF EXISTS t1; -#------------------------------------------------------------------------ -# 2. Checks where the engine is set on all supported CREATE TABLE -# statement positions + basic operations on the tables -#------------------------------------------------------------------------ -DROP TABLE IF EXISTS t1; -# 2.1 table (non partitioned) for comparison -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB' ; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -# 2.2 table with engine setting just after column list -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB' -PARTITION BY HASH(f1) PARTITIONS 2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 2 -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -# 2.3 table with engine setting in the named partition part -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) -( PARTITION part1 STORAGE ENGINE = 'NDB' , -PARTITION part2 STORAGE ENGINE = 'NDB' -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -# 2.4 table with engine setting in the named subpartition part -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) -SUBPARTITION BY HASH(f1) -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' , -SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' , -SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' ) -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -# 2.5 Ugly "incomplete" storage engine assignments -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) -( PARTITION part1 STORAGE ENGINE = 'NDB' , -PARTITION part2 -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) -( PARTITION part1 , -PARTITION part2 STORAGE ENGINE = 'NDB' -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) -SUBPARTITION BY HASH(f1) -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, -SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' , -SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' ) -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) -SUBPARTITION BY HASH(f1) -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' , -SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 , -SUBPARTITION subpart22 ) -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -# 2.6 Ugly "over determined" storage engine assignments -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB' -PARTITION BY HASH(f1) -( PARTITION part1 STORAGE ENGINE = 'NDB' , -PARTITION part2 STORAGE ENGINE = 'NDB' -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB' -PARTITION BY RANGE(f1) -SUBPARTITION BY HASH(f1) -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' , -SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' , -SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' ) -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) -SUBPARTITION BY HASH(f1) -( PARTITION part1 VALUES LESS THAN (1000) STORAGE ENGINE = 'NDB' -(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' , -SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' , -SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' ) -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -# 2.7 Ugly storage engine assignments mixups -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) -SUBPARTITION BY HASH(f1) -( PARTITION part1 VALUES LESS THAN (1000) ENGINE = 'NDB' -(SUBPARTITION subpart11 , -SUBPARTITION subpart12 ), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' , -SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' ) -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) -SUBPARTITION BY HASH(f1) -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' , -SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), -PARTITION part2 VALUES LESS THAN (2000) ENGINE = 'NDB' -(SUBPARTITION subpart21 , -SUBPARTITION subpart22 ) -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -# 2.8 Session default engine differs from engine used within create table -SET SESSION storage_engine='MEMORY'; -SET SESSION storage_engine='NDB' ; -#------------------------------------------------------------------------ -# 3. Check number of partitions and subpartitions -#------------------------------------------------------------------------ -DROP TABLE IF EXISTS t1; -# 3.1 (positive) without partition/subpartition number assignment -# 3.1.1 no partition number, no named partitions, no subpartitions mentioned -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -# 3.1.2 no partition number, named partitions, no subpartitions mentioned -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) (PARTITION part1, PARTITION part2); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -# 3.1.3 variations on no partition/subpartition number, named partitions, -# different subpartitions are/are not named -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) (PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2000), PARTITION part3 VALUES LESS THAN (2147483647)) ; -DROP TABLE t1; -# FIXME several subtestcases of 3.1.3 disabled because of server crashes -# Bug#15407 Partitions: crash if subpartition -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) (PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483647) -(SUBPARTITION subpart21 , SUBPARTITION subpart22 )) ; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster), PARTITION part3 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -# 3.2 partition/subpartition numbers good and bad values and notations -DROP TABLE IF EXISTS t1; -# 3.2.1 partition/subpartition numbers INTEGER notation -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS 2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 2 -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS 2 -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (1000) , PARTITION part2 VALUES LESS THAN (2147483647) ) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS 1; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 1 -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS 1 -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (1000) , PARTITION part2 VALUES LESS THAN (2147483647) ) -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -UPDATE t1 SET f1 = f1 + 200 -WHERE f1 BETWEEN 100 - 50 AND 100 + 50; -SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) -AS my_value FROM t1; -my_value -1 -DELETE FROM t1 -WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; -SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) -AS my_value FROM t1; -my_value -1 -INSERT INTO t1 SET f1 = 0 , f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; -my_value -1 -INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; -my_value -1 -UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' - WHERE f1 = 0 AND f2 = '#######'; -SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -my_value -1 -DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; -SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; -my_value -1 -TRUNCATE t1; -SELECT COUNT(*) = 0 AS my_value FROM t1; -my_value -1 -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS 0; -ERROR HY000: Number of partitions = 0 is not an allowed value -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS 0 -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR HY000: Number of subpartitions = 0 is not an allowed value -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS -1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS -1 -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1 -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS 1000000; -ERROR HY000: Too many partitions were defined -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS 1000000 -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR HY000: Too many partitions were defined -# 3.2.4 partition/subpartition numbers STRING notation -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS '2'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2'' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS '2' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS '2.0'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2.0'' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS '2.0' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2.0' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS '0.2E+1'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0.2E+1'' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS '0.2E+1' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0.2E+1' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS T' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS '2A'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2A'' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS '2A' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2A' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS 'A2'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''A2'' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS 'A2' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''A2' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS ''; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS '' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS 'GARBAGE'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''GARBAGE'' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS 'GARBAGE' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''GARBAGE' -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS ' at line 3 -# 3.2.5 partition/subpartition numbers other notations -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS 2A; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2A' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS 2A -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2A -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS A2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A2' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS A2 -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A2 -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS GARBAGE; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS GARBAGE -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS TH' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS "2"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2"' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS "2" -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2" -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS "2A"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2A"' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS "2A" -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2A" -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS "A2"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"A2"' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS "A2" -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"A2" -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS "GARBAGE"; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GARBAGE"' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) -SUBPARTITIONS "GARBAGE" -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GARBAGE" -(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS ' at line 3 -# 3.3 Mixups of number and names of partition/subpartition assigned -# 3.3.1 (positive) number of partition/subpartition = number of named partition/subpartition -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) -DROP TABLE t1; -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) PARTITIONS 2 -SUBPARTITION BY HASH(f1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483647) -(SUBPARTITION subpart21, SUBPARTITION subpart22) -); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `f1` int(11) default NULL, - `f2` char(20) default NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) -DROP TABLE t1; -# 3.3.2 (positive) number of partition/subpartition , 0 (= no) named partition/subpartition -# already checked above -# 3.3.3 (negative) number of partitions > number of named partitions -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1 ) ; -ERROR 42000: Wrong number of partitions defined, mismatch with previous setting near ')' at line 2 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) -SUBPARTITION BY HASH(f1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11 ), -PARTITION part2 VALUES LESS THAN (2147483647) -(SUBPARTITION subpart21, SUBPARTITION subpart22) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part2 VALUES LESS THAN (2147483647) -(SUBPARTITION subpart21, SUBPAR' at line 5 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) -SUBPARTITION BY HASH(f1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2000) -(SUBPARTITION subpart21 ), -PARTITION part3 VALUES LESS THAN (2147483647) -(SUBPARTITION subpart31, SUBPARTITION subpart32) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), -PARTITION part3 VALUES LESS THAN (2147483647) -(SUBPARTITION subpart31, SUBPAR' at line 7 -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY RANGE(f1) PARTITIONS 2 -SUBPARTITION BY HASH(f1) SUBPARTITIONS 2 -( PARTITION part1 VALUES LESS THAN (1000) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (2147483647) -(SUBPARTITION subpart21 ) -); -ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ') -)' at line 7 -#------------------------------------------------------------------------ -# 4. Checks of logical partition/subpartition name -# file name clashes during CREATE TABLE -#------------------------------------------------------------------------ -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1) (PARTITION part1, PARTITION part1); -ERROR HY000: Duplicate partition name part1 -#------------------------------------------------------------------------ -# 5. Alter table experiments -#------------------------------------------------------------------------ -# 5.1 alter table add partition -# 5.1.1 (negative) add partition to non partitioned table -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)); -# FIXME Why does the error numbers of MyISAM(1482) and NDB(1005) differ ? -ALTER TABLE t1 ADD PARTITION (PARTITION part1); -Got one of the listed errors -DROP TABLE t1; -# 5.1.2 Add one partition to a table with one partition -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) -PARTITION BY HASH(f1); -INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100; diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result deleted file mode 100644 index 26475f4c147..00000000000 --- a/mysql-test/r/ps_7ndb.result +++ /dev/null @@ -1,3127 +0,0 @@ -use test; -drop table if exists t1, t9 ; -create table t1 -( -a int, b varchar(30), -primary key(a) -) engine = 'NDB' ; -create table t9 -( -c1 tinyint, c2 smallint, c3 mediumint, c4 int, -c5 integer, c6 bigint, c7 float, c8 double, -c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp, c16 time, -c17 year, c18 tinyint, c19 bool, c20 char, -c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, -c25 blob, c26 text, c27 mediumblob, c28 mediumtext, -c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), -c32 set('monday', 'tuesday', 'wednesday'), -primary key(c1) -) engine = 'NDB' ; -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -test_sequence ------- simple select tests ------ -prepare stmt1 from ' select * from t9 order by c1 ' ; -execute stmt1; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t9 t9 c1 c1 1 4 1 N 49155 0 63 -def test t9 t9 c2 c2 2 6 1 Y 32768 0 63 -def test t9 t9 c3 c3 9 9 1 Y 32768 0 63 -def test t9 t9 c4 c4 3 11 1 Y 32768 0 63 -def test t9 t9 c5 c5 3 11 1 Y 32768 0 63 -def test t9 t9 c6 c6 8 20 1 Y 32768 0 63 -def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 -def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 -def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 -def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 246 9 6 Y 0 4 63 -def test t9 t9 c12 c12 246 10 6 Y 0 4 63 -def test t9 t9 c13 c13 10 10 10 Y 128 0 63 -def test t9 t9 c14 c14 12 19 19 Y 128 0 63 -def test t9 t9 c15 c15 7 19 19 N 1249 0 63 -def test t9 t9 c16 c16 11 8 8 Y 128 0 63 -def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 -def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 -def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 -def test t9 t9 c20 c20 254 1 1 Y 0 0 8 -def test t9 t9 c21 c21 254 10 10 Y 0 0 8 -def test t9 t9 c22 c22 253 30 30 Y 0 0 8 -def test t9 t9 c23 c23 252 255 8 Y 144 0 63 -def test t9 t9 c24 c24 252 255 8 Y 16 0 8 -def test t9 t9 c25 c25 252 65535 4 Y 144 0 63 -def test t9 t9 c26 c26 252 65535 4 Y 16 0 8 -def test t9 t9 c27 c27 252 16777215 10 Y 144 0 63 -def test t9 t9 c28 c28 252 16777215 10 Y 16 0 8 -def test t9 t9 c29 c29 252 4294967295 8 Y 144 0 63 -def test t9 t9 c30 c30 252 4294967295 8 Y 16 0 8 -def test t9 t9 c31 c31 254 5 3 Y 256 0 8 -def test t9 t9 c32 c32 254 24 7 Y 2048 0 8 -c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 c31 c32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -9 9 9 9 9 9 9 9 9 9 9.0000 9.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 0 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext two tuesday -set @arg00='SELECT' ; -@arg00 a from t1 where a=1; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a from t1 where a=1' at line 1 -prepare stmt1 from ' ? a from t1 where a=1 '; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a from t1 where a=1' at line 1 -set @arg00=1 ; -select @arg00, b from t1 where a=1 ; -@arg00 b -1 one -prepare stmt1 from ' select ?, b from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -? b -1 one -set @arg00='lion' ; -select @arg00, b from t1 where a=1 ; -@arg00 b -lion one -prepare stmt1 from ' select ?, b from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -? b -lion one -set @arg00=NULL ; -select @arg00, b from t1 where a=1 ; -@arg00 b -NULL one -prepare stmt1 from ' select ?, b from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -? b -NULL one -set @arg00=1 ; -select b, a - @arg00 from t1 where a=1 ; -b a - @arg00 -one 0 -prepare stmt1 from ' select b, a - ? from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -b a - ? -one 0 -set @arg00=null ; -select @arg00 as my_col ; -my_col -NULL -prepare stmt1 from ' select ? as my_col'; -execute stmt1 using @arg00 ; -my_col -NULL -select @arg00 + 1 as my_col ; -my_col -NULL -prepare stmt1 from ' select ? + 1 as my_col'; -execute stmt1 using @arg00 ; -my_col -NULL -select 1 + @arg00 as my_col ; -my_col -NULL -prepare stmt1 from ' select 1 + ? as my_col'; -execute stmt1 using @arg00 ; -my_col -NULL -set @arg00='MySQL' ; -select substr(@arg00,1,2) from t1 where a=1 ; -substr(@arg00,1,2) -My -prepare stmt1 from ' select substr(?,1,2) from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -substr(?,1,2) -My -set @arg00=3 ; -select substr('MySQL',@arg00,5) from t1 where a=1 ; -substr('MySQL',@arg00,5) -SQL -prepare stmt1 from ' select substr(''MySQL'',?,5) from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -substr('MySQL',?,5) -SQL -select substr('MySQL',1,@arg00) from t1 where a=1 ; -substr('MySQL',1,@arg00) -MyS -prepare stmt1 from ' select substr(''MySQL'',1,?) from t1 where a=1 ' ; -execute stmt1 using @arg00 ; -substr('MySQL',1,?) -MyS -set @arg00='MySQL' ; -select a , concat(@arg00,b) from t1 order by a; -a concat(@arg00,b) -1 MySQLone -2 MySQLtwo -3 MySQLthree -4 MySQLfour -prepare stmt1 from ' select a , concat(?,b) from t1 order by a ' ; -execute stmt1 using @arg00; -a concat(?,b) -1 MySQLone -2 MySQLtwo -3 MySQLthree -4 MySQLfour -select a , concat(b,@arg00) from t1 order by a ; -a concat(b,@arg00) -1 oneMySQL -2 twoMySQL -3 threeMySQL -4 fourMySQL -prepare stmt1 from ' select a , concat(b,?) from t1 order by a ' ; -execute stmt1 using @arg00; -a concat(b,?) -1 oneMySQL -2 twoMySQL -3 threeMySQL -4 fourMySQL -set @arg00='MySQL' ; -select group_concat(@arg00,b order by a) from t1 -group by 'a' ; -group_concat(@arg00,b order by a) -MySQLone,MySQLtwo,MySQLthree,MySQLfour -prepare stmt1 from ' select group_concat(?,b order by a) from t1 -group by ''a'' ' ; -execute stmt1 using @arg00; -group_concat(?,b order by a) -MySQLone,MySQLtwo,MySQLthree,MySQLfour -select group_concat(b,@arg00 order by a) from t1 -group by 'a' ; -group_concat(b,@arg00 order by a) -oneMySQL,twoMySQL,threeMySQL,fourMySQL -prepare stmt1 from ' select group_concat(b,? order by a) from t1 -group by ''a'' ' ; -execute stmt1 using @arg00; -group_concat(b,? order by a) -oneMySQL,twoMySQL,threeMySQL,fourMySQL -set @arg00='first' ; -set @arg01='second' ; -set @arg02=NULL; -select @arg00, @arg01 from t1 where a=1 ; -@arg00 @arg01 -first second -prepare stmt1 from ' select ?, ? from t1 where a=1 ' ; -execute stmt1 using @arg00, @arg01 ; -? ? -first second -execute stmt1 using @arg02, @arg01 ; -? ? -NULL second -execute stmt1 using @arg00, @arg02 ; -? ? -first NULL -execute stmt1 using @arg02, @arg02 ; -? ? -NULL NULL -drop table if exists t5 ; -create table t5 (id1 int(11) not null default '0', -value2 varchar(100), value1 varchar(100)) ; -insert into t5 values (1,'hh','hh'),(2,'hh','hh'), -(1,'ii','ii'),(2,'ii','ii') ; -prepare stmt1 from ' select id1,value1 from t5 where id1=? or value1=? order by id1,value1 ' ; -set @arg00=1 ; -set @arg01='hh' ; -execute stmt1 using @arg00, @arg01 ; -id1 value1 -1 hh -1 ii -2 hh -drop table t5 ; -drop table if exists t5 ; -create table t5(session_id char(9) not null) ; -insert into t5 values ('abc') ; -prepare stmt1 from ' select * from t5 -where ?=''1111'' and session_id = ''abc'' ' ; -set @arg00='abc' ; -execute stmt1 using @arg00 ; -session_id -set @arg00='1111' ; -execute stmt1 using @arg00 ; -session_id -abc -set @arg00='abc' ; -execute stmt1 using @arg00 ; -session_id -drop table t5 ; -set @arg00='FROM' ; -select a @arg00 t1 where a=1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 t1 where a=1' at line 1 -prepare stmt1 from ' select a ? t1 where a=1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? t1 where a=1' at line 1 -set @arg00='t1' ; -select a from @arg00 where a=1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 where a=1' at line 1 -prepare stmt1 from ' select a from ? where a=1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? where a=1' at line 1 -set @arg00='WHERE' ; -select a from t1 @arg00 a=1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a=1' at line 1 -prepare stmt1 from ' select a from t1 ? a=1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a=1' at line 1 -set @arg00=1 ; -select a FROM t1 where a=@arg00 ; -a -1 -prepare stmt1 from ' select a FROM t1 where a=? ' ; -execute stmt1 using @arg00 ; -a -1 -set @arg00=1000 ; -execute stmt1 using @arg00 ; -a -set @arg00=NULL ; -select a FROM t1 where a=@arg00 ; -a -prepare stmt1 from ' select a FROM t1 where a=? ' ; -execute stmt1 using @arg00 ; -a -set @arg00=4 ; -select a FROM t1 where a=sqrt(@arg00) ; -a -2 -prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ; -execute stmt1 using @arg00 ; -a -2 -set @arg00=NULL ; -select a FROM t1 where a=sqrt(@arg00) ; -a -prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ; -execute stmt1 using @arg00 ; -a -set @arg00=2 ; -set @arg01=3 ; -select a FROM t1 where a in (@arg00,@arg01) order by a; -a -2 -3 -prepare stmt1 from ' select a FROM t1 where a in (?,?) order by a '; -execute stmt1 using @arg00, @arg01; -a -2 -3 -set @arg00= 'one' ; -set @arg01= 'two' ; -set @arg02= 'five' ; -prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ; -execute stmt1 using @arg00, @arg01, @arg02 ; -b -one -two -prepare stmt1 from ' select b FROM t1 where b like ? '; -set @arg00='two' ; -execute stmt1 using @arg00 ; -b -two -set @arg00='tw%' ; -execute stmt1 using @arg00 ; -b -two -set @arg00='%wo' ; -execute stmt1 using @arg00 ; -b -two -set @arg00=null ; -insert into t9 set c1= 0, c5 = NULL ; -select c5 from t9 where c5 > NULL ; -c5 -prepare stmt1 from ' select c5 from t9 where c5 > ? '; -execute stmt1 using @arg00 ; -c5 -select c5 from t9 where c5 < NULL ; -c5 -prepare stmt1 from ' select c5 from t9 where c5 < ? '; -execute stmt1 using @arg00 ; -c5 -select c5 from t9 where c5 = NULL ; -c5 -prepare stmt1 from ' select c5 from t9 where c5 = ? '; -execute stmt1 using @arg00 ; -c5 -select c5 from t9 where c5 <=> NULL ; -c5 -NULL -prepare stmt1 from ' select c5 from t9 where c5 <=> ? '; -execute stmt1 using @arg00 ; -c5 -NULL -delete from t9 where c1= 0 ; -set @arg00='>' ; -select a FROM t1 where a @arg00 1 ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 1' at line 1 -prepare stmt1 from ' select a FROM t1 where a ? 1 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? 1' at line 1 -set @arg00=1 ; -select a,b FROM t1 where a is not NULL -AND b is not NULL group by a - @arg00 ; -a b -1 one -2 two -3 three -4 four -prepare stmt1 from ' select a,b FROM t1 where a is not NULL -AND b is not NULL group by a - ? ' ; -execute stmt1 using @arg00 ; -a b -1 one -2 two -3 three -4 four -set @arg00='two' ; -select a,b FROM t1 where a is not NULL -AND b is not NULL having b <> @arg00 order by a ; -a b -1 one -3 three -4 four -prepare stmt1 from ' select a,b FROM t1 where a is not NULL -AND b is not NULL having b <> ? order by a ' ; -execute stmt1 using @arg00 ; -a b -1 one -3 three -4 four -set @arg00=1 ; -select a,b FROM t1 where a is not NULL -AND b is not NULL order by a - @arg00 ; -a b -1 one -2 two -3 three -4 four -prepare stmt1 from ' select a,b FROM t1 where a is not NULL -AND b is not NULL order by a - ? ' ; -execute stmt1 using @arg00 ; -a b -1 one -2 two -3 three -4 four -set @arg00=2 ; -select a,b from t1 order by 2 ; -a b -4 four -1 one -3 three -2 two -prepare stmt1 from ' select a,b from t1 -order by ? '; -execute stmt1 using @arg00; -a b -4 four -1 one -3 three -2 two -set @arg00=1 ; -execute stmt1 using @arg00; -a b -1 one -2 two -3 three -4 four -set @arg00=0 ; -execute stmt1 using @arg00; -ERROR 42S22: Unknown column '?' in 'order clause' -set @arg00=1; -prepare stmt1 from ' select a,b from t1 order by a -limit 1 '; -execute stmt1 ; -a b -1 one -prepare stmt1 from ' select a,b from t1 order by a limit ? '; -execute stmt1 using @arg00; -a b -1 one -set @arg00='b' ; -set @arg01=0 ; -set @arg02=2 ; -set @arg03=2 ; -select sum(a), @arg00 from t1 where a > @arg01 -and b is not null group by substr(b,@arg02) -having sum(a) <> @arg03 ; -sum(a) @arg00 -3 b -1 b -4 b -prepare stmt1 from ' select sum(a), ? from t1 where a > ? -and b is not null group by substr(b,?) -having sum(a) <> ? '; -execute stmt1 using @arg00, @arg01, @arg02, @arg03; -sum(a) ? -3 b -1 b -4 b -test_sequence ------- join tests ------ -select first.a as a1, second.a as a2 -from t1 first, t1 second -where first.a = second.a order by a1 ; -a1 a2 -1 1 -2 2 -3 3 -4 4 -prepare stmt1 from ' select first.a as a1, second.a as a2 - from t1 first, t1 second - where first.a = second.a order by a1 '; -execute stmt1 ; -a1 a2 -1 1 -2 2 -3 3 -4 4 -set @arg00='ABC'; -set @arg01='two'; -set @arg02='one'; -select first.a, @arg00, second.a FROM t1 first, t1 second -where @arg01 = first.b or first.a = second.a or second.b = @arg02 -order by second.a, first.a; -a @arg00 a -1 ABC 1 -2 ABC 1 -3 ABC 1 -4 ABC 1 -2 ABC 2 -2 ABC 3 -3 ABC 3 -2 ABC 4 -4 ABC 4 -prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second - where ? = first.b or first.a = second.a or second.b = ? - order by second.a, first.a'; -execute stmt1 using @arg00, @arg01, @arg02; -a ? a -1 ABC 1 -2 ABC 1 -3 ABC 1 -4 ABC 1 -2 ABC 2 -2 ABC 3 -3 ABC 3 -2 ABC 4 -4 ABC 4 -drop table if exists t2 ; -create table t2 as select * from t1 ; -set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ; -set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ; -set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ; -set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ; -set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ; -set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ; -set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ; -set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ; -set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ; -the join statement is: -SELECT * FROM t2 right join t1 using(a) order by t2.a -prepare stmt1 from @query9 ; -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -the join statement is: -SELECT * FROM t2 natural right join t1 order by t2.a -prepare stmt1 from @query8 ; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -the join statement is: -SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a -prepare stmt1 from @query7 ; -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -the join statement is: -SELECT * FROM t2 left join t1 using(a) order by t2.a -prepare stmt1 from @query6 ; -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -the join statement is: -SELECT * FROM t2 natural left join t1 order by t2.a -prepare stmt1 from @query5 ; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -the join statement is: -SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a -prepare stmt1 from @query4 ; -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -the join statement is: -SELECT * FROM t2 join t1 using(a) order by t2.a -prepare stmt1 from @query3 ; -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -execute stmt1 ; -a b b -1 one one -2 two two -3 three three -4 four four -the join statement is: -SELECT * FROM t2 natural join t1 order by t2.a -prepare stmt1 from @query2 ; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -the join statement is: -SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a -prepare stmt1 from @query1 ; -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -drop table t2 ; -test_sequence ------- subquery tests ------ -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = ''two'') '; -execute stmt1 ; -a b -2 two -set @arg00='two' ; -select a, b FROM t1 outer_table where -a = (select a from t1 where b = 'two' ) and b=@arg00 ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = ''two'') and b=? '; -execute stmt1 using @arg00; -a b -2 two -set @arg00='two' ; -select a, b FROM t1 outer_table where -a = (select a from t1 where b = @arg00 ) and b='two' ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = ? ) and b=''two'' ' ; -execute stmt1 using @arg00; -a b -2 two -set @arg00=3 ; -set @arg01='three' ; -select a,b FROM t1 where (a,b) in (select 3, 'three'); -a b -3 three -select a FROM t1 where (a,b) in (select @arg00,@arg01); -a -3 -prepare stmt1 from ' select a FROM t1 where (a,b) in (select ?, ?) '; -execute stmt1 using @arg00, @arg01; -a -3 -set @arg00=1 ; -set @arg01='two' ; -set @arg02=2 ; -set @arg03='two' ; -select a, @arg00, b FROM t1 outer_table where -b=@arg01 and a = (select @arg02 from t1 where b = @arg03 ) ; -a @arg00 b -2 1 two -prepare stmt1 from ' select a, ?, b FROM t1 outer_table where - b=? and a = (select ? from t1 where b = ? ) ' ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; -a ? b -2 1 two -prepare stmt1 from 'select c4 FROM t9 where - c13 = (select MAX(b) from t1 where a = ?) and c22 = ? ' ; -execute stmt1 using @arg01, @arg02; -c4 -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = outer_table.b ) order by a '; -execute stmt1 ; -a b -1 one -2 two -3 three -4 four -prepare stmt1 from ' SELECT a as ccc from t1 where a+1= - (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) '; -execute stmt1 ; -ccc -1 -deallocate prepare stmt1 ; -prepare stmt1 from ' SELECT a as ccc from t1 where a+1= - (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) '; -execute stmt1 ; -ccc -1 -deallocate prepare stmt1 ; -prepare stmt1 from ' SELECT a as ccc from t1 where a+1= - (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) '; -execute stmt1 ; -ccc -1 -deallocate prepare stmt1 ; -set @arg00='two' ; -select a, b FROM t1 outer_table where -a = (select a from t1 where b = outer_table.b ) and b=@arg00 ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where b = outer_table.b) and b=? '; -execute stmt1 using @arg00; -a b -2 two -set @arg00=2 ; -select a, b FROM t1 outer_table where -a = (select a from t1 where a = @arg00 and b = outer_table.b) and b='two' ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where a = ? and b = outer_table.b) and b=''two'' ' ; -execute stmt1 using @arg00; -a b -2 two -set @arg00=2 ; -select a, b FROM t1 outer_table where -a = (select a from t1 where outer_table.a = @arg00 and a=2) and b='two' ; -a b -2 two -prepare stmt1 from ' select a, b FROM t1 outer_table where - a = (select a from t1 where outer_table.a = ? and a=2) and b=''two'' ' ; -execute stmt1 using @arg00; -a b -2 two -set @arg00=1 ; -set @arg01='two' ; -set @arg02=2 ; -set @arg03='two' ; -select a, @arg00, b FROM t1 outer_table where -b=@arg01 and a = (select @arg02 from t1 where outer_table.b = @arg03 -and outer_table.a=a ) ; -a @arg00 b -2 1 two -prepare stmt1 from ' select a, ?, b FROM t1 outer_table where - b=? and a = (select ? from t1 where outer_table.b = ? - and outer_table.a=a ) ' ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; -a ? b -2 1 two -set @arg00=1 ; -set @arg01=0 ; -select a, @arg00 -from ( select a - @arg00 as a from t1 where a=@arg00 ) as t2 -where a=@arg01; -a @arg00 -0 1 -prepare stmt1 from ' select a, ? - from ( select a - ? as a from t1 where a=? ) as t2 - where a=? '; -execute stmt1 using @arg00, @arg00, @arg00, @arg01 ; -a ? -0 1 -drop table if exists t2 ; -create table t2 as select * from t1; -prepare stmt1 from ' select a in (select a from t2) from t1 ' ; -execute stmt1 ; -a in (select a from t2) -1 -1 -1 -1 -drop table if exists t5, t6, t7 ; -create table t5 (a int , b int) ; -create table t6 like t5 ; -create table t7 like t5 ; -insert into t5 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7), -(2, -1), (3, 10) ; -insert into t6 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1) ; -insert into t7 values (3, 3), (2, 2), (1, 1) ; -prepare stmt1 from ' select a, (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) from t7 ' ; -execute stmt1 ; -a (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) -3 1 -2 2 -1 2 -execute stmt1 ; -a (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) -3 1 -2 2 -1 2 -execute stmt1 ; -a (select count(distinct t5.b) as sum from t5, t6 - where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b - group by t5.a order by sum limit 1) -3 1 -2 2 -1 2 -drop table t5, t6, t7 ; -drop table if exists t2 ; -create table t2 as select * from t9; -set @stmt= ' SELECT - (SELECT SUM(c1 + c12 + 0.0) FROM t2 - where (t9.c2 - 0e-3) = t2.c2 - GROUP BY t9.c15 LIMIT 1) as scalar_s, - exists (select 1.0e+0 from t2 - where t2.c3 * 9.0000000000 = t9.c4) as exists_s, - c5 * 4 in (select c6 + 0.3e+1 from t2) as in_s, - (c7 - 4, c8 - 4) in (select c9 + 4.0, c10 + 40e-1 from t2) as in_row_s -FROM t9, -(select c25 x, c32 y from t2) tt WHERE x = c25 ' ; -prepare stmt1 from @stmt ; -execute stmt1 ; -execute stmt1 ; -set @stmt= concat('explain ',@stmt); -prepare stmt1 from @stmt ; -execute stmt1 ; -execute stmt1 ; -set @stmt= ' SELECT - (SELECT SUM(c1+c12+?) FROM t2 where (t9.c2-?)=t2.c2 - GROUP BY t9.c15 LIMIT 1) as scalar_s, - exists (select ? from t2 - where t2.c3*?=t9.c4) as exists_s, - c5*? in (select c6+? from t2) as in_s, - (c7-?, c8-?) in (select c9+?, c10+? from t2) as in_row_s -FROM t9, -(select c25 x, c32 y from t2) tt WHERE x =c25 ' ; -set @arg00= 0.0 ; -set @arg01= 0e-3 ; -set @arg02= 1.0e+0 ; -set @arg03= 9.0000000000 ; -set @arg04= 4 ; -set @arg05= 0.3e+1 ; -set @arg06= 4 ; -set @arg07= 4 ; -set @arg08= 4.0 ; -set @arg09= 40e-1 ; -prepare stmt1 from @stmt ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -set @stmt= concat('explain ',@stmt); -prepare stmt1 from @stmt ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, -@arg07, @arg08, @arg09 ; -drop table t2 ; -select 1 < (select a from t1) ; -ERROR 21000: Subquery returns more than 1 row -prepare stmt1 from ' select 1 < (select a from t1) ' ; -execute stmt1 ; -ERROR 21000: Subquery returns more than 1 row -select 1 as my_col ; -my_col -1 -test_sequence ------- union tests ------ -prepare stmt1 from ' select a FROM t1 where a=1 - union distinct - select a FROM t1 where a=1 '; -execute stmt1 ; -a -1 -execute stmt1 ; -a -1 -prepare stmt1 from ' select a FROM t1 where a=1 - union all - select a FROM t1 where a=1 '; -execute stmt1 ; -a -1 -1 -prepare stmt1 from ' SELECT 1, 2 union SELECT 1 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -prepare stmt1 from ' SELECT 1 union SELECT 1, 2 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -prepare stmt1 from ' SELECT * from t1 union SELECT 1 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -prepare stmt1 from ' SELECT 1 union SELECT * from t1 ' ; -ERROR 21000: The used SELECT statements have a different number of columns -set @arg00=1 ; -select @arg00 FROM t1 where a=1 -union distinct -select 1 FROM t1 where a=1; -@arg00 -1 -prepare stmt1 from ' select ? FROM t1 where a=1 - union distinct - select 1 FROM t1 where a=1 ' ; -execute stmt1 using @arg00; -? -1 -set @arg00=1 ; -select 1 FROM t1 where a=1 -union distinct -select @arg00 FROM t1 where a=1; -1 -1 -prepare stmt1 from ' select 1 FROM t1 where a=1 - union distinct - select ? FROM t1 where a=1 ' ; -execute stmt1 using @arg00; -1 -1 -set @arg00='a' ; -select @arg00 FROM t1 where a=1 -union distinct -select @arg00 FROM t1 where a=1; -@arg00 -a -prepare stmt1 from ' select ? FROM t1 where a=1 - union distinct - select ? FROM t1 where a=1 '; -execute stmt1 using @arg00, @arg00; -? -a -prepare stmt1 from ' select ? - union distinct - select ? '; -execute stmt1 using @arg00, @arg00; -? -a -set @arg00='a' ; -set @arg01=1 ; -set @arg02='a' ; -set @arg03=2 ; -select @arg00 FROM t1 where a=@arg01 -union distinct -select @arg02 FROM t1 where a=@arg03; -@arg00 -a -prepare stmt1 from ' select ? FROM t1 where a=? - union distinct - select ? FROM t1 where a=? ' ; -execute stmt1 using @arg00, @arg01, @arg02, @arg03; -? -a -set @arg00=1 ; -prepare stmt1 from ' select sum(a) + 200, ? from t1 -union distinct -select sum(a) + 200, 1 from t1 -group by b ' ; -execute stmt1 using @arg00; -sum(a) + 200 ? -210 1 -204 1 -201 1 -203 1 -202 1 -set @Oporto='Oporto' ; -set @Lisboa='Lisboa' ; -set @0=0 ; -set @1=1 ; -set @2=2 ; -set @3=3 ; -set @4=4 ; -select @Oporto,@Lisboa,@0,@1,@2,@3,@4 ; -@Oporto @Lisboa @0 @1 @2 @3 @4 -Oporto Lisboa 0 1 2 3 4 -select sum(a) + 200 as the_sum, @Oporto as the_town from t1 -group by b -union distinct -select sum(a) + 200, @Lisboa from t1 -group by b ; -the_sum the_town -204 Oporto -201 Oporto -203 Oporto -202 Oporto -204 Lisboa -201 Lisboa -203 Lisboa -202 Lisboa -prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 - group by b - union distinct - select sum(a) + 200, ? from t1 - group by b ' ; -execute stmt1 using @Oporto, @Lisboa; -the_sum the_town -204 Oporto -201 Oporto -203 Oporto -202 Oporto -204 Lisboa -201 Lisboa -203 Lisboa -202 Lisboa -select sum(a) + 200 as the_sum, @Oporto as the_town from t1 -where a > @1 -group by b -union distinct -select sum(a) + 200, @Lisboa from t1 -where a > @2 -group by b ; -the_sum the_town -204 Oporto -203 Oporto -202 Oporto -204 Lisboa -203 Lisboa -prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 - where a > ? - group by b - union distinct - select sum(a) + 200, ? from t1 - where a > ? - group by b ' ; -execute stmt1 using @Oporto, @1, @Lisboa, @2; -the_sum the_town -204 Oporto -203 Oporto -202 Oporto -204 Lisboa -203 Lisboa -select sum(a) + 200 as the_sum, @Oporto as the_town from t1 -where a > @1 -group by b -having avg(a) > @2 -union distinct -select sum(a) + 200, @Lisboa from t1 -where a > @2 -group by b -having avg(a) > @3; -the_sum the_town -204 Oporto -203 Oporto -204 Lisboa -prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 - where a > ? - group by b - having avg(a) > ? - union distinct - select sum(a) + 200, ? from t1 - where a > ? - group by b - having avg(a) > ? '; -execute stmt1 using @Oporto, @1, @2, @Lisboa, @2, @3; -the_sum the_town -204 Oporto -203 Oporto -204 Lisboa -test_sequence ------- explain select tests ------ -prepare stmt1 from ' explain select * from t9 ' ; -execute stmt1; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def id 8 3 1 N 32929 0 63 -def select_type 253 19 6 N 1 31 8 -def table 253 64 2 Y 0 31 8 -def type 253 10 3 Y 0 31 8 -def possible_keys 253 4096 0 Y 0 31 8 -def key 253 64 0 Y 0 31 8 -def key_len 253 4096 0 Y 128 31 63 -def ref 253 1024 0 Y 0 31 8 -def rows 8 10 1 Y 32928 0 63 -def Extra 253 255 0 N 1 31 8 -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t9 ALL NULL NULL NULL NULL 2 -test_sequence ------- delete tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -prepare stmt1 from 'delete from t1 where a=2' ; -execute stmt1; -select a,b from t1 where a=2; -a b -execute stmt1; -insert into t1 values(0,NULL); -set @arg00=NULL; -prepare stmt1 from 'delete from t1 where b=?' ; -execute stmt1 using @arg00; -select a,b from t1 where b is NULL ; -a b -0 NULL -set @arg00='one'; -execute stmt1 using @arg00; -select a,b from t1 where b=@arg00; -a b -prepare stmt1 from 'truncate table t1' ; -test_sequence ------- update tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -prepare stmt1 from 'update t1 set b=''a=two'' where a=2' ; -execute stmt1; -select a,b from t1 where a=2; -a b -2 a=two -execute stmt1; -select a,b from t1 where a=2; -a b -2 a=two -set @arg00=NULL; -prepare stmt1 from 'update t1 set b=? where a=2' ; -execute stmt1 using @arg00; -select a,b from t1 where a=2; -a b -2 NULL -set @arg00='two'; -execute stmt1 using @arg00; -select a,b from t1 where a=2; -a b -2 two -set @arg00=2; -prepare stmt1 from 'update t1 set b=NULL where a=?' ; -execute stmt1 using @arg00; -select a,b from t1 where a=@arg00; -a b -2 NULL -update t1 set b='two' where a=@arg00; -set @arg00=2000; -execute stmt1 using @arg00; -select a,b from t1 where a=@arg00; -a b -set @arg00=2; -set @arg01=22; -prepare stmt1 from 'update t1 set a=? where a=?' ; -execute stmt1 using @arg00, @arg00; -select a,b from t1 where a=@arg00; -a b -2 two -execute stmt1 using @arg01, @arg00; -select a,b from t1 where a=@arg01; -a b -22 two -execute stmt1 using @arg00, @arg01; -select a,b from t1 where a=@arg00; -a b -2 two -set @arg00=NULL; -set @arg01=2; -execute stmt1 using @arg00, @arg01; -Warnings: -Warning 1048 Column 'a' cannot be null -select a,b from t1 order by a; -a b -0 two -1 one -3 three -4 four -set @arg00=0; -execute stmt1 using @arg01, @arg00; -select a,b from t1 order by a; -a b -1 one -2 two -3 three -4 four -set @arg00=23; -set @arg01='two'; -set @arg02=2; -set @arg03='two'; -set @arg04=2; -drop table if exists t2; -create table t2 as select a,b from t1 ; -prepare stmt1 from 'update t1 set a=? where b=? - and a in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 where a = @arg00 ; -a b -23 two -prepare stmt1 from 'update t1 set a=? where b=? - and a not in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 order by a ; -a b -1 one -2 two -3 three -4 four -drop table t2 ; -create table t2 -( -a int, b varchar(30), -primary key(a) -) engine = 'NDB' ; -insert into t2(a,b) select a, b from t1 ; -prepare stmt1 from 'update t1 set a=? where b=? - and a in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 where a = @arg00 ; -a b -23 two -prepare stmt1 from 'update t1 set a=? where b=? - and a not in (select ? from t2 - where b = ? or a = ?)'; -execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; -affected rows: 1 -info: Rows matched: 1 Changed: 1 Warnings: 0 -select a,b from t1 order by a ; -a b -1 one -2 two -3 three -4 four -drop table t2 ; -set @arg00=1; -prepare stmt1 from 'update t1 set b=''bla'' -where a=2 -limit 1'; -execute stmt1 ; -select a,b from t1 where b = 'bla' ; -a b -2 bla -prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; -execute stmt1 using @arg00; -test_sequence ------- insert tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -prepare stmt1 from 'insert into t1 values(5, ''five'' )'; -execute stmt1; -select a,b from t1 where a = 5; -a b -5 five -set @arg00='six' ; -prepare stmt1 from 'insert into t1 values(6, ? )'; -execute stmt1 using @arg00; -select a,b from t1 where b = @arg00; -a b -6 six -execute stmt1 using @arg00; -ERROR 23000: Duplicate entry '6' for key 'PRIMARY' -set @arg00=NULL ; -prepare stmt1 from 'insert into t1 values(0, ? )'; -execute stmt1 using @arg00; -select a,b from t1 where b is NULL; -a b -0 NULL -set @arg00=8 ; -set @arg01='eight' ; -prepare stmt1 from 'insert into t1 values(?, ? )'; -execute stmt1 using @arg00, @arg01 ; -select a,b from t1 where b = @arg01; -a b -8 eight -set @NULL= null ; -set @arg00= 'abc' ; -execute stmt1 using @NULL, @NULL ; -ERROR 23000: Column 'a' cannot be null -execute stmt1 using @NULL, @NULL ; -ERROR 23000: Column 'a' cannot be null -execute stmt1 using @NULL, @arg00 ; -ERROR 23000: Column 'a' cannot be null -execute stmt1 using @NULL, @arg00 ; -ERROR 23000: Column 'a' cannot be null -set @arg01= 10000 + 2 ; -execute stmt1 using @arg01, @arg00 ; -set @arg01= 10000 + 1 ; -execute stmt1 using @arg01, @arg00 ; -select * from t1 where a > 10000 order by a ; -a b -10001 abc -10002 abc -delete from t1 where a > 10000 ; -set @arg01= 10000 + 2 ; -execute stmt1 using @arg01, @NULL ; -set @arg01= 10000 + 1 ; -execute stmt1 using @arg01, @NULL ; -select * from t1 where a > 10000 order by a ; -a b -10001 NULL -10002 NULL -delete from t1 where a > 10000 ; -set @arg01= 10000 + 10 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 9 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 8 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 7 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 6 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 5 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 4 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 3 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 2 ; -execute stmt1 using @arg01, @arg01 ; -set @arg01= 10000 + 1 ; -execute stmt1 using @arg01, @arg01 ; -select * from t1 where a > 10000 order by a ; -a b -10001 10001 -10002 10002 -10003 10003 -10004 10004 -10005 10005 -10006 10006 -10007 10007 -10008 10008 -10009 10009 -10010 10010 -delete from t1 where a > 10000 ; -set @arg00=81 ; -set @arg01='8-1' ; -set @arg02=82 ; -set @arg03='8-2' ; -prepare stmt1 from 'insert into t1 values(?,?),(?,?)'; -execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; -select a,b from t1 where a in (@arg00,@arg02) ; -a b -81 8-1 -82 8-2 -set @arg00=9 ; -set @arg01='nine' ; -prepare stmt1 from 'insert into t1 set a=?, b=? '; -execute stmt1 using @arg00, @arg01 ; -select a,b from t1 where a = @arg00 ; -a b -9 nine -set @arg00=6 ; -set @arg01=1 ; -prepare stmt1 from 'insert into t1 set a=?, b=''sechs'' - on duplicate key update a=a + ?, b=concat(b,''modified'') '; -execute stmt1 using @arg00, @arg01; -select * from t1 order by a; -a b -0 NULL -1 one -2 two -3 three -4 four -5 five -7 sixmodified -8 eight -9 nine -81 8-1 -82 8-2 -set @arg00=81 ; -set @arg01=1 ; -execute stmt1 using @arg00, @arg01; -ERROR 23000: Duplicate entry '82' for key 'PRIMARY' -drop table if exists t2 ; -create table t2 (id int auto_increment primary key) -ENGINE= 'NDB' ; -prepare stmt1 from ' select last_insert_id() ' ; -insert into t2 values (NULL) ; -execute stmt1 ; -last_insert_id() -1 -insert into t2 values (NULL) ; -execute stmt1 ; -last_insert_id() -2 -drop table t2 ; -set @1000=1000 ; -set @x1000_2="x1000_2" ; -set @x1000_3="x1000_3" ; -set @x1000="x1000" ; -set @1100=1100 ; -set @x1100="x1100" ; -set @100=100 ; -set @updated="updated" ; -insert into t1 values(1000,'x1000_1') ; -insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3) -on duplicate key update a = a + @100, b = concat(b,@updated) ; -select a,b from t1 where a >= 1000 order by a ; -a b -1000 x1000_3 -1100 x1000_1updated -delete from t1 where a >= 1000 ; -insert into t1 values(1000,'x1000_1') ; -prepare stmt1 from ' insert into t1 values(?,?),(?,?) - on duplicate key update a = a + ?, b = concat(b,?) '; -execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ; -select a,b from t1 where a >= 1000 order by a ; -a b -1000 x1000_3 -1100 x1000_1updated -delete from t1 where a >= 1000 ; -insert into t1 values(1000,'x1000_1') ; -execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ; -select a,b from t1 where a >= 1000 order by a ; -a b -1200 x1000_1updatedupdated -delete from t1 where a >= 1000 ; -prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' '; -execute stmt1; -execute stmt1; -execute stmt1; -test_sequence ------- multi table tests ------ -delete from t1 ; -delete from t9 ; -insert into t1(a,b) values (1, 'one'), (2, 'two'), (3, 'three') ; -insert into t9 (c1,c21) -values (1, 'one'), (2, 'two'), (3, 'three') ; -prepare stmt_delete from " delete t1, t9 - from t1, t9 where t1.a=t9.c1 and t1.b='updated' "; -prepare stmt_update from " update t1, t9 - set t1.b='updated', t9.c21='updated' - where t1.a=t9.c1 and t1.a=? "; -prepare stmt_select1 from " select a, b from t1 order by a" ; -prepare stmt_select2 from " select c1, c21 from t9 order by c1" ; -set @arg00= 1 ; -execute stmt_update using @arg00 ; -execute stmt_delete ; -execute stmt_select1 ; -a b -2 two -3 three -execute stmt_select2 ; -c1 c21 -2 two -3 three -set @arg00= @arg00 + 1 ; -execute stmt_update using @arg00 ; -execute stmt_delete ; -execute stmt_select1 ; -a b -3 three -execute stmt_select2 ; -c1 c21 -3 three -set @arg00= @arg00 + 1 ; -execute stmt_update using @arg00 ; -execute stmt_delete ; -execute stmt_select1 ; -a b -execute stmt_select2 ; -c1 c21 -set @arg00= @arg00 + 1 ; -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -insert into t1 values(0,NULL) ; -set @duplicate='duplicate ' ; -set @1000=1000 ; -set @5=5 ; -select a,b from t1 where a < 5 order by a ; -a b -0 NULL -1 one -2 two -3 three -4 four -insert into t1 select a + @1000, concat(@duplicate,b) from t1 -where a < @5 ; -affected rows: 5 -info: Records: 5 Duplicates: 0 Warnings: 0 -select a,b from t1 where a >= 1000 order by a ; -a b -1000 NULL -1001 duplicate one -1002 duplicate two -1003 duplicate three -1004 duplicate four -delete from t1 where a >= 1000 ; -prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1 -where a < ? ' ; -execute stmt1 using @1000, @duplicate, @5; -affected rows: 5 -info: Records: 5 Duplicates: 0 Warnings: 0 -select a,b from t1 where a >= 1000 order by a ; -a b -1000 NULL -1001 duplicate one -1002 duplicate two -1003 duplicate three -1004 duplicate four -delete from t1 where a >= 1000 ; -set @1=1 ; -set @2=2 ; -set @100=100 ; -set @float=1.00; -set @five='five' ; -drop table if exists t2; -create table t2 like t1 ; -insert into t2 (b,a) -select @duplicate, sum(first.a) from t1 first, t1 second -where first.a <> @5 and second.b = first.b -and second.b <> @five -group by second.b -having sum(second.a) > @2 -union -select b, a + @100 from t1 -where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b -from t1); -affected rows: 3 -info: Records: 3 Duplicates: 0 Warnings: 0 -select a,b from t2 order by a ; -a b -3 duplicate -4 duplicate -103 three -delete from t2 ; -prepare stmt1 from ' insert into t2 (b,a) -select ?, sum(first.a) - from t1 first, t1 second - where first.a <> ? and second.b = first.b and second.b <> ? - group by second.b - having sum(second.a) > ? -union -select b, a + ? from t1 - where (a,b) in ( select sqrt(a+?)+CAST(? AS signed),b - from t1 ) ' ; -execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ; -affected rows: 3 -info: Records: 3 Duplicates: 0 Warnings: 0 -select a,b from t2 order by a ; -a b -3 duplicate -4 duplicate -103 three -drop table t2; -drop table if exists t5 ; -set @arg01= 8; -set @arg02= 8.0; -set @arg03= 80.00000000000e-1; -set @arg04= 'abc' ; -set @arg05= CAST('abc' as binary) ; -set @arg06= '1991-08-05' ; -set @arg07= CAST('1991-08-05' as date); -set @arg08= '1991-08-05 01:01:01' ; -set @arg09= CAST('1991-08-05 01:01:01' as datetime) ; -set @arg10= unix_timestamp('1991-01-01 01:01:01'); -set @arg11= YEAR('1991-01-01 01:01:01'); -set @arg12= 8 ; -set @arg12= NULL ; -set @arg13= 8.0 ; -set @arg13= NULL ; -set @arg14= 'abc'; -set @arg14= NULL ; -set @arg15= CAST('abc' as binary) ; -set @arg15= NULL ; -create table t5 as select -8 as const01, @arg01 as param01, -8.0 as const02, @arg02 as param02, -80.00000000000e-1 as const03, @arg03 as param03, -'abc' as const04, @arg04 as param04, -CAST('abc' as binary) as const05, @arg05 as param05, -'1991-08-05' as const06, @arg06 as param06, -CAST('1991-08-05' as date) as const07, @arg07 as param07, -'1991-08-05 01:01:01' as const08, @arg08 as param08, -CAST('1991-08-05 01:01:01' as datetime) as const09, @arg09 as param09, -unix_timestamp('1991-01-01 01:01:01') as const10, @arg10 as param10, -YEAR('1991-01-01 01:01:01') as const11, @arg11 as param11, -NULL as const12, @arg12 as param12, -@arg13 as param13, -@arg14 as param14, -@arg15 as param15; -show create table t5 ; -Table Create Table -t5 CREATE TABLE `t5` ( - `const01` int(1) NOT NULL DEFAULT '0', - `param01` bigint(20) DEFAULT NULL, - `const02` decimal(2,1) NOT NULL DEFAULT '0.0', - `param02` decimal(65,30) DEFAULT NULL, - `const03` double NOT NULL DEFAULT '0', - `param03` double DEFAULT NULL, - `const04` varchar(3) NOT NULL DEFAULT '', - `param04` longtext, - `const05` varbinary(3) NOT NULL DEFAULT '', - `param05` longblob, - `const06` varchar(10) NOT NULL DEFAULT '', - `param06` longtext, - `const07` date DEFAULT NULL, - `param07` longblob, - `const08` varchar(19) NOT NULL DEFAULT '', - `param08` longtext, - `const09` datetime DEFAULT NULL, - `param09` longblob, - `const10` int(10) NOT NULL DEFAULT '0', - `param10` bigint(20) DEFAULT NULL, - `const11` int(4) DEFAULT NULL, - `param11` bigint(20) DEFAULT NULL, - `const12` binary(0) DEFAULT NULL, - `param12` bigint(20) DEFAULT NULL, - `param13` decimal(65,30) DEFAULT NULL, - `param14` longtext, - `param15` longblob -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -select * from t5 ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t5 t5 const01 const01 3 1 1 N 32769 0 63 -def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 246 4 3 N 1 1 63 -def test t5 t5 param02 param02 246 67 32 Y 0 30 63 -def test t5 t5 const03 const03 5 17 1 N 32769 31 63 -def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 -def test t5 t5 const04 const04 253 3 3 N 1 0 8 -def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 253 3 3 N 129 0 63 -def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 -def test t5 t5 const06 const06 253 10 10 N 1 0 8 -def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 -def test t5 t5 const07 const07 10 10 10 Y 128 0 63 -def test t5 t5 param07 param07 252 4294967295 10 Y 144 0 63 -def test t5 t5 const08 const08 253 19 19 N 1 0 8 -def test t5 t5 param08 param08 252 4294967295 19 Y 16 0 8 -def test t5 t5 const09 const09 12 19 19 Y 128 0 63 -def test t5 t5 param09 param09 252 4294967295 19 Y 144 0 63 -def test t5 t5 const10 const10 3 10 9 N 32769 0 63 -def test t5 t5 param10 param10 8 20 9 Y 32768 0 63 -def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 -def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 -def test t5 t5 const12 const12 254 0 0 Y 128 0 63 -def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 246 67 0 Y 0 30 63 -def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 -def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 -const01 8 -param01 8 -const02 8.0 -param02 8.000000000000000000000000000000 -const03 8 -param03 8 -const04 abc -param04 abc -const05 abc -param05 abc -const06 1991-08-05 -param06 1991-08-05 -const07 1991-08-05 -param07 1991-08-05 -const08 1991-08-05 01:01:01 -param08 1991-08-05 01:01:01 -const09 1991-08-05 01:01:01 -param09 1991-08-05 01:01:01 -const10 662680861 -param10 662680861 -const11 1991 -param11 1991 -const12 NULL -param12 NULL -param13 NULL -param14 NULL -param15 NULL -drop table t5 ; -test_sequence ------- data type conversion tests ------ -delete from t1 ; -insert into t1 values (1,'one'); -insert into t1 values (2,'two'); -insert into t1 values (3,'three'); -insert into t1 values (4,'four'); -commit ; -delete from t9 ; -insert into t9 -set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, -c10= 1, c11= 1, c12 = 1, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=true, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; -insert into t9 -set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, -c10= 9, c11= 9, c12 = 9, -c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', -c16= '11:11:11', c17= '2004', -c18= 1, c19=false, c20= 'a', c21= '123456789a', -c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', -c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', -c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; -commit ; -insert into t9 set c1= 0, c15= '1991-01-01 01:01:01' ; -select * from t9 order by c1 ; -c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 c31 c32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -9 9 9 9 9 9 9 9 9 9 9.0000 9.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 0 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext two tuesday -test_sequence ------- select @parameter:= column ------ -prepare full_info from "select @arg01, @arg02, @arg03, @arg04, - @arg05, @arg06, @arg07, @arg08, - @arg09, @arg10, @arg11, @arg12, - @arg13, @arg14, @arg15, @arg16, - @arg17, @arg18, @arg19, @arg20, - @arg21, @arg22, @arg23, @arg24, - @arg25, @arg26, @arg27, @arg28, - @arg29, @arg30, @arg31, @arg32" ; -select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, -@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, -@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, -@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, -@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, -@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, -@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, -@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 -from t9 where c1= 1 ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 128 30 63 -def @arg12 246 83 6 Y 128 30 63 -def @arg13 251 16777216 10 Y 128 31 63 -def @arg14 251 16777216 19 Y 128 31 63 -def @arg15 251 16777216 19 Y 128 31 63 -def @arg16 251 16777216 8 Y 128 31 63 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, -@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, -@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, -@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, -@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, -@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, -@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, -@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 -from t9 where c1= 0 ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 128 30 63 -def @arg12 246 83 0 Y 128 30 63 -def @arg13 251 16777216 0 Y 128 31 63 -def @arg14 251 16777216 0 Y 128 31 63 -def @arg15 251 16777216 19 Y 128 31 63 -def @arg16 251 16777216 0 Y 128 31 63 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select - @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, - @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, - @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, - @arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, - @arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, - @arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, - @arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, - @arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 -from t9 where c1= ?" ; -set @my_key= 1 ; -execute stmt1 using @my_key ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 128 30 63 -def @arg12 246 83 6 Y 128 30 63 -def @arg13 251 16777216 10 Y 128 31 63 -def @arg14 251 16777216 19 Y 128 31 63 -def @arg15 251 16777216 19 Y 128 31 63 -def @arg16 251 16777216 8 Y 128 31 63 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -set @my_key= 0 ; -execute stmt1 using @my_key ; -@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 128 30 63 -def @arg12 246 83 0 Y 128 30 63 -def @arg13 251 16777216 0 Y 128 31 63 -def @arg14 251 16777216 0 Y 128 31 63 -def @arg15 251 16777216 19 Y 128 31 63 -def @arg16 251 16777216 0 Y 128 31 63 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':= c1 from t9 where c1= 1' at line 1 -test_sequence ------- select column, .. into @parm,.. ------ -select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, -c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, -c25, c26, c27, c28, c29, c30, c31, c32 -into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, -@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, -@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, -@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 -from t9 where c1= 1 ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 128 30 63 -def @arg12 246 83 6 Y 128 30 63 -def @arg13 251 16777216 10 Y 128 31 63 -def @arg14 251 16777216 19 Y 128 31 63 -def @arg15 251 16777216 19 Y 128 31 63 -def @arg16 251 16777216 8 Y 128 31 63 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, -c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, -c25, c26, c27, c28, c29, c30, c31, c32 -into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, -@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, -@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, -@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 -from t9 where c1= 0 ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 128 30 63 -def @arg12 246 83 0 Y 128 30 63 -def @arg13 251 16777216 0 Y 128 31 63 -def @arg14 251 16777216 0 Y 128 31 63 -def @arg15 251 16777216 19 Y 128 31 63 -def @arg16 251 16777216 0 Y 128 31 63 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, - c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, - c25, c26, c27, c28, c29, c30, c31, c32 -into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, - @arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, - @arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, - @arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 -from t9 where c1= ?" ; -set @my_key= 1 ; -execute stmt1 using @my_key ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 1 Y 32896 0 63 -def @arg03 8 20 1 Y 32896 0 63 -def @arg04 8 20 1 Y 32896 0 63 -def @arg05 8 20 1 Y 32896 0 63 -def @arg06 8 20 1 Y 32896 0 63 -def @arg07 5 23 1 Y 32896 31 63 -def @arg08 5 23 1 Y 32896 31 63 -def @arg09 5 23 1 Y 32896 31 63 -def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 83 6 Y 128 30 63 -def @arg12 246 83 6 Y 128 30 63 -def @arg13 251 16777216 10 Y 128 31 63 -def @arg14 251 16777216 19 Y 128 31 63 -def @arg15 251 16777216 19 Y 128 31 63 -def @arg16 251 16777216 8 Y 128 31 63 -def @arg17 8 20 4 Y 32928 0 63 -def @arg18 8 20 1 Y 32896 0 63 -def @arg19 8 20 1 Y 32896 0 63 -def @arg20 251 16777216 1 Y 0 31 8 -def @arg21 251 16777216 10 Y 0 31 8 -def @arg22 251 16777216 30 Y 0 31 8 -def @arg23 251 16777216 8 Y 128 31 63 -def @arg24 251 16777216 8 Y 0 31 8 -def @arg25 251 16777216 4 Y 128 31 63 -def @arg26 251 16777216 4 Y 0 31 8 -def @arg27 251 16777216 10 Y 128 31 63 -def @arg28 251 16777216 10 Y 0 31 8 -def @arg29 251 16777216 8 Y 128 31 63 -def @arg30 251 16777216 8 Y 0 31 8 -def @arg31 251 16777216 3 Y 0 31 8 -def @arg32 251 16777216 6 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday -set @my_key= 0 ; -execute stmt1 using @my_key ; -execute full_info ; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 8 20 1 Y 32896 0 63 -def @arg02 8 20 0 Y 32896 0 63 -def @arg03 8 20 0 Y 32896 0 63 -def @arg04 8 20 0 Y 32896 0 63 -def @arg05 8 20 0 Y 32896 0 63 -def @arg06 8 20 0 Y 32896 0 63 -def @arg07 5 23 0 Y 32896 31 63 -def @arg08 5 23 0 Y 32896 31 63 -def @arg09 5 23 0 Y 32896 31 63 -def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 83 0 Y 128 30 63 -def @arg12 246 83 0 Y 128 30 63 -def @arg13 251 16777216 0 Y 128 31 63 -def @arg14 251 16777216 0 Y 128 31 63 -def @arg15 251 16777216 19 Y 128 31 63 -def @arg16 251 16777216 0 Y 128 31 63 -def @arg17 8 20 0 Y 32928 0 63 -def @arg18 8 20 0 Y 32896 0 63 -def @arg19 8 20 0 Y 32896 0 63 -def @arg20 251 16777216 0 Y 0 31 8 -def @arg21 251 16777216 0 Y 0 31 8 -def @arg22 251 16777216 0 Y 0 31 8 -def @arg23 251 16777216 0 Y 128 31 63 -def @arg24 251 16777216 0 Y 0 31 8 -def @arg25 251 16777216 0 Y 128 31 63 -def @arg26 251 16777216 0 Y 0 31 8 -def @arg27 251 16777216 0 Y 128 31 63 -def @arg28 251 16777216 0 Y 0 31 8 -def @arg29 251 16777216 0 Y 128 31 63 -def @arg30 251 16777216 0 Y 0 31 8 -def @arg31 251 16777216 0 Y 0 31 8 -def @arg32 251 16777216 0 Y 0 31 8 -@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from t9 where c1= 1' at line 1 -test_sequence --- insert into numeric columns -- -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 ) ; -set @arg00= 21 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22 )" ; -execute stmt1 ; -set @arg00= 23; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, -30.0, 30.0, 30.0 ) ; -set @arg00= 31.0 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, - 32.0, 32.0, 32.0 )" ; -execute stmt1 ; -set @arg00= 33.0; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( '40', '40', '40', '40', '40', '40', '40', '40', -'40', '40', '40' ) ; -set @arg00= '41' ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( '42', '42', '42', '42', '42', '42', '42', '42', - '42', '42', '42' )" ; -execute stmt1 ; -set @arg00= '43'; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( CAST('50' as binary), CAST('50' as binary), -CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), -CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), -CAST('50' as binary), CAST('50' as binary), CAST('50' as binary) ) ; -set @arg00= CAST('51' as binary) ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( CAST('52' as binary), CAST('52' as binary), - CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), - CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), - CAST('52' as binary), CAST('52' as binary), CAST('52' as binary) )" ; -execute stmt1 ; -set @arg00= CAST('53' as binary) ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -set @arg00= 2 ; -set @arg00= NULL ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 60, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -NULL, NULL, NULL ) ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 61, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt1 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 62, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL )" ; -execute stmt1 ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 63, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -set @arg00= 8.0 ; -set @arg00= NULL ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 71, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 73, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -set @arg00= 'abc' ; -set @arg00= NULL ; -insert into t9 -( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values -( 81, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ) ; -prepare stmt2 from "insert into t9 - ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 83, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 -from t9 where c1 >= 20 -order by c1 ; -c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c12 -20 20 20 20 20 20 20 20 20 20 20.0000 -21 21 21 21 21 21 21 21 21 21 21.0000 -22 22 22 22 22 22 22 22 22 22 22.0000 -23 23 23 23 23 23 23 23 23 23 23.0000 -30 30 30 30 30 30 30 30 30 30 30.0000 -31 31 31 31 31 31 31 31 31 31 31.0000 -32 32 32 32 32 32 32 32 32 32 32.0000 -33 33 33 33 33 33 33 33 33 33 33.0000 -40 40 40 40 40 40 40 40 40 40 40.0000 -41 41 41 41 41 41 41 41 41 41 41.0000 -42 42 42 42 42 42 42 42 42 42 42.0000 -43 43 43 43 43 43 43 43 43 43 43.0000 -50 50 50 50 50 50 50 50 50 50 50.0000 -51 51 51 51 51 51 51 51 51 51 51.0000 -52 52 52 52 52 52 52 52 52 52 52.0000 -53 53 53 53 53 53 53 53 53 53 53.0000 -60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -71 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -73 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -81 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -83 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -test_sequence --- select .. where numeric column = .. -- -set @arg00= 20; -select 'true' as found from t9 -where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20 -and c8= 20 and c9= 20 and c10= 20 and c12= 20; -found -true -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20 - and c8= 20 and c9= 20 and c10= 20 and c12= 20 "; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 20.0; -select 'true' as found from t9 -where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0 -and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0; -found -true -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0 - and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0 "; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -select 'true' as found from t9 -where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20' - and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20'; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20' - and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20' "; -execute stmt1 ; -found -true -set @arg00= '20'; -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -select 'true' as found from t9 -where c1= CAST('20' as binary) and c2= CAST('20' as binary) and -c3= CAST('20' as binary) and c4= CAST('20' as binary) and -c5= CAST('20' as binary) and c6= CAST('20' as binary) and -c7= CAST('20' as binary) and c8= CAST('20' as binary) and -c9= CAST('20' as binary) and c10= CAST('20' as binary) and -c12= CAST('20' as binary); -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= CAST('20' as binary) and c2= CAST('20' as binary) and - c3= CAST('20' as binary) and c4= CAST('20' as binary) and - c5= CAST('20' as binary) and c6= CAST('20' as binary) and - c7= CAST('20' as binary) and c8= CAST('20' as binary) and - c9= CAST('20' as binary) and c10= CAST('20' as binary) and - c12= CAST('20' as binary) "; -execute stmt1 ; -found -true -set @arg00= CAST('20' as binary) ; -select 'true' as found from t9 -where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 -and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 -and c12= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? - and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? - and c12= ? "; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00 ; -found -true -delete from t9 ; -test_sequence --- some numeric overflow experiments -- -prepare my_insert from "insert into t9 - ( c21, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) -values - ( 'O', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; -prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 -from t9 where c21 = 'O' "; -prepare my_delete from "delete from t9 where c21 = 'O' "; -set @arg00= 9223372036854775807 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 -c12 9999.9999 -execute my_delete ; -set @arg00= '9223372036854775807' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 -c12 9999.9999 -execute my_delete ; -set @arg00= -9223372036854775808 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 -c12 -9999.9999 -execute my_delete ; -set @arg00= '-9223372036854775808' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 -c12 -9999.9999 -execute my_delete ; -set @arg00= 1.11111111111111111111e+50 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 -c12 9999.9999 -execute my_delete ; -set @arg00= '1.11111111111111111111e+50' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 127 -c2 32767 -c3 8388607 -c4 2147483647 -c5 2147483647 -c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 -c12 9999.9999 -execute my_delete ; -set @arg00= -1.11111111111111111111e+50 ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 -c12 -9999.9999 -execute my_delete ; -set @arg00= '-1.11111111111111111111e+50' ; -execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c3' at row 1 -Warning 1264 Out of range value for column 'c4' at row 1 -Warning 1264 Out of range value for column 'c5' at row 1 -Warning 1264 Out of range value for column 'c6' at row 1 -Warning 1264 Out of range value for column 'c7' at row 1 -Warning 1264 Out of range value for column 'c12' at row 1 -execute my_select ; -c1 -128 -c2 -32768 -c3 -8388608 -c4 -2147483648 -c5 -2147483648 -c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 -c12 -9999.9999 -execute my_delete ; -test_sequence --- insert into string columns -- -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c20' at row 1 -select c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 -from t9 where c1 >= 20 -order by c1 ; -c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 -20 2 20 20 20 20 20 20 20 20 20 20 -21 2 21 21 21 21 21 21 21 21 21 21 -22 2 22 22 22 22 22 22 22 22 22 22 -23 2 23 23 23 23 23 23 23 23 23 23 -30 3 30 30 30 30 30 30 30 30 30 30 -31 3 31 31 31 31 31 31 31 31 31 31 -32 3 32 32 32 32 32 32 32 32 32 32 -33 3 33 33 33 33 33 33 33 33 33 33 -40 4 40 40 40 40 40 40 40 40 40 40 -41 4 41 41 41 41 41 41 41 41 41 41 -42 4 42 42 42 42 42 42 42 42 42 42 -43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 -51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 -52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 -53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 -54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 -55 5 55 55 55 55 55 55 55 55 55 55 -56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 -57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00 -60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -71 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -73 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -81 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -83 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -test_sequence --- select .. where string column = .. -- -set @arg00= '20'; -select 'true' as found from t9 -where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and -c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and -c27= '20' and c28= '20' and c29= '20' and c30= '20' ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and - c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and - c27= '20' and c28= '20' and c29= '20' and c30= '20'" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and - c21= ? and c22= ? and c23= ? and c25= ? and - c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= CAST('20' as binary); -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20))) -= CAST('20' as binary) and c21= CAST('20' as binary) -and c22= CAST('20' as binary) and c23= CAST('20' as binary) and -c24= CAST('20' as binary) and c25= CAST('20' as binary) and -c26= CAST('20' as binary) and c27= CAST('20' as binary) and -c28= CAST('20' as binary) and c29= CAST('20' as binary) and -c30= CAST('20' as binary) ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20))) = @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and -c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20))) - = CAST('20' as binary) and c21= CAST('20' as binary) - and c22= CAST('20' as binary) and c23= CAST('20' as binary) and - c24= CAST('20' as binary) and c25= CAST('20' as binary) and - c26= CAST('20' as binary) and c27= CAST('20' as binary) and - c28= CAST('20' as binary) and c29= CAST('20' as binary) and - c30= CAST('20' as binary)" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20))) = ? and c21= ? and - c22= ? and c23= ? and c25= ? and c26= ? and c27= ? and c28= ? and - c29= ? and c30= ?"; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 20; -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and -c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and -c27= 20 and c28= 20 and c29= 20 and c30= 20 ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and - c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and - c27= 20 and c28= 20 and c29= 20 and c30= 20" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and - c21= ? and c22= ? and c23= ? and c25= ? and - c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 20.0; -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and -c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and -c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0 ; -found -true -select 'true' as found from t9 -where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and -c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and -c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and - c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and - c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and - c21= ? and c22= ? and c23= ? and c25= ? and - c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, -@arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -delete from t9 ; -test_sequence --- insert into date/time columns -- -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1264 Out of range value for column 'c13' at row 1 -Warning 1264 Out of range value for column 'c14' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Note 1265 Data truncated for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -Warnings: -Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Out of range value for column 'c16' at row 1 -Warning 1264 Out of range value for column 'c17' at row 1 -select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; -c1 c13 c14 c15 c16 c17 -20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -21 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -22 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -23 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -30 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -31 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -32 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -33 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 -40 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -41 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -60 NULL NULL 1991-01-01 01:01:01 NULL NULL -61 NULL NULL 1991-01-01 01:01:01 NULL NULL -62 NULL NULL 1991-01-01 01:01:01 NULL NULL -63 NULL NULL 1991-01-01 01:01:01 NULL NULL -71 NULL NULL 1991-01-01 01:01:01 NULL NULL -73 NULL NULL 1991-01-01 01:01:01 NULL NULL -81 NULL NULL 1991-01-01 01:01:01 NULL NULL -83 NULL NULL 1991-01-01 01:01:01 NULL NULL -test_sequence --- select .. where date/time column = .. -- -set @arg00= '1991-01-01 01:01:01' ; -select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and -c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and -c17= '1991-01-01 01:01:01' ; -found -true -select 'true' as found from t9 -where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 -and c17= @arg00 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and - c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and - c17= '1991-01-01 01:01:01'" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= CAST('1991-01-01 01:01:01' as datetime) ; -select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and -c14= CAST('1991-01-01 01:01:01' as datetime) and -c15= CAST('1991-01-01 01:01:01' as datetime) and -c16= CAST('1991-01-01 01:01:01' as datetime) and -c17= CAST('1991-01-01 01:01:01' as datetime) ; -found -true -select 'true' as found from t9 -where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 -and c17= @arg00 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and - c14= CAST('1991-01-01 01:01:01' as datetime) and - c15= CAST('1991-01-01 01:01:01' as datetime) and - c16= CAST('1991-01-01 01:01:01' as datetime) and - c17= CAST('1991-01-01 01:01:01' as datetime)" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; -execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; -found -true -set @arg00= 1991 ; -select 'true' as found from t9 -where c1= 20 and c17= 1991 ; -found -true -select 'true' as found from t9 -where c1= 20 and c17= @arg00 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c17= 1991" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and c17= ?" ; -execute stmt1 using @arg00 ; -found -true -set @arg00= 1.991e+3 ; -select 'true' as found from t9 -where c1= 20 and abs(c17 - 1.991e+3) < 0.01 ; -found -true -select 'true' as found from t9 -where c1= 20 and abs(c17 - @arg00) < 0.01 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and abs(c17 - 1.991e+3) < 0.01" ; -execute stmt1 ; -found -true -prepare stmt1 from "select 'true' as found from t9 -where c1= 20 and abs(c17 - ?) < 0.01" ; -execute stmt1 using @arg00 ; -found -true -drop table t1, t9; diff --git a/mysql-test/r/rpl000001.a.result b/mysql-test/r/rpl000001.a.result deleted file mode 100644 index c52b83d729a..00000000000 --- a/mysql-test/r/rpl000001.a.result +++ /dev/null @@ -1,3 +0,0 @@ -n -1 -2 diff --git a/mysql-test/r/rpl000001.b.result b/mysql-test/r/rpl000001.b.result deleted file mode 100644 index 5108cfdaf26..00000000000 --- a/mysql-test/r/rpl000001.b.result +++ /dev/null @@ -1,2 +0,0 @@ -sum(length(word)) -71 diff --git a/mysql-test/r/rpl000010.result b/mysql-test/r/rpl000010.result deleted file mode 100644 index 65191ea411f..00000000000 --- a/mysql-test/r/rpl000010.result +++ /dev/null @@ -1,14 +0,0 @@ -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; -create table t1 (n int not null auto_increment primary key); -insert into t1 values(NULL); -insert into t1 values(2); -select n from t1; -n -1 -2 -drop table t1; diff --git a/mysql-test/r/rpl000011.result b/mysql-test/r/rpl000011.result deleted file mode 100644 index dd0fa2fbe74..00000000000 --- a/mysql-test/r/rpl000011.result +++ /dev/null @@ -1,16 +0,0 @@ -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; -create table t1 (n int); -insert into t1 values(1); -stop slave; -start slave; -insert into t1 values(2); -select * from t1; -n -1 -2 -drop table t1; diff --git a/mysql-test/r/rpl000013.result b/mysql-test/r/rpl000013.result deleted file mode 100644 index 37838bb88e0..00000000000 --- a/mysql-test/r/rpl000013.result +++ /dev/null @@ -1,28 +0,0 @@ -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; -create table t2(n int); -create temporary table t1 (n int); -insert into t1 values(1),(2),(3); -insert into t2 select * from t1; -create temporary table t1 (n int); -insert into t1 values (4),(5); -insert into t2 select * from t1 as t10; -insert into t2 values(6); -select * from t2; -n -1 -2 -3 -4 -5 -6 -show status like 'Slave_open_temp_tables'; -Variable_name Value -Slave_open_temp_tables 0 -drop table if exists t1,t2; -Warnings: -Note 1051 Unknown table 't1' diff --git a/mysql-test/r/rpl000017.result b/mysql-test/r/rpl000017.result deleted file mode 100644 index 1c611357e64..00000000000 --- a/mysql-test/r/rpl000017.result +++ /dev/null @@ -1,18 +0,0 @@ -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; -stop slave; -grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab'; -grant replication slave on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab'; -start slave; -drop table if exists t1; -create table t1(n int); -insert into t1 values(24); -select * from t1; -n -24 -drop table t1; -delete from mysql.user where user="replicate"; diff --git a/mysql-test/r/rpl_000015.result b/mysql-test/r/rpl_000015.result deleted file mode 100644 index 8d23136420f..00000000000 --- a/mysql-test/r/rpl_000015.result +++ /dev/null @@ -1,34 +0,0 @@ -reset master; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 106 -reset slave; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -change master to master_host='127.0.0.1'; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No -change master to master_host='127.0.0.1',master_user='root', -master_password='',master_port=MASTER_PORT; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No -start slave; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No -drop table if exists t1; -create table t1 (n int, PRIMARY KEY(n)); -insert into t1 values (10),(45),(90); -SELECT * FROM t1 ORDER BY n; -n -10 -45 -90 -SELECT * FROM t1 ORDER BY n; -n -10 -45 -90 -drop table t1; diff --git a/mysql-test/r/rpl_EE_err.result b/mysql-test/r/rpl_EE_err.result deleted file mode 100644 index 16fa931e303..00000000000 --- a/mysql-test/r/rpl_EE_err.result +++ /dev/null @@ -1,11 +0,0 @@ -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; -create table t1 (a int) engine=myisam; -flush tables; -drop table if exists t1; -Warnings: -Error 2 Can't find file: 't1' (errno: 2) diff --git a/mysql-test/r/rpl_LD_INFILE.result b/mysql-test/r/rpl_LD_INFILE.result deleted file mode 100644 index 70013f95d85..00000000000 --- a/mysql-test/r/rpl_LD_INFILE.result +++ /dev/null @@ -1,117 +0,0 @@ -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; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a)); -LOAD DATA INFILE '../std_data_ln/words2.dat' INTO TABLE test.t1; -DELETE FROM test.t1 WHERE a = 'abashed'; -DELETE FROM test.t1; -LOAD DATA INFILE '../std_data_ln/words2.dat' INTO TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a DESC; -a -aberration -aberrant -Abernathy -Aberdeen -Abelson -Abelian -Abel -abed -Abe -abducts -abductors -abductor -abductions -abduction -abducted -abduct -abdominal -abdomens -abdomen -Abby -abbreviations -abbreviation -abbreviating -abbreviates -abbreviated -abbreviate -Abbott -abbots -abbot -abbeys -abbey -abbe -Abba -abating -abates -abater -abatements -abatement -abated -abate -abasing -abashing -abashes -abashed -abash -abases -abasements -abasement -abased -abase -SELECT * FROM test.t1 ORDER BY a DESC; -a -aberration -aberrant -Abernathy -Aberdeen -Abelson -Abelian -Abel -abed -Abe -abducts -abductors -abductor -abductions -abduction -abducted -abduct -abdominal -abdomens -abdomen -Abby -abbreviations -abbreviation -abbreviating -abbreviates -abbreviated -abbreviate -Abbott -abbots -abbot -abbeys -abbey -abbe -Abba -abating -abates -abater -abatements -abatement -abated -abate -abasing -abashing -abashes -abashed -abash -abases -abasements -abasement -abased -abase -DROP TABLE test.t1; diff --git a/mysql-test/r/rpl_alter.result b/mysql-test/r/rpl_alter.result deleted file mode 100644 index 6ef5ce3462a..00000000000 --- a/mysql-test/r/rpl_alter.result +++ /dev/null @@ -1,21 +0,0 @@ -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; -drop database if exists mysqltest; -create database mysqltest; -create table mysqltest.t1 ( n int); -alter table mysqltest.t1 add m int; -insert into mysqltest.t1 values (1,2); -create table mysqltest.t2 (n int); -insert into mysqltest.t2 values (45); -rename table mysqltest.t2 to mysqltest.t3, mysqltest.t1 to mysqltest.t2; -select * from mysqltest.t2; -n m -1 2 -select * from mysqltest.t3; -n -45 -drop database mysqltest; diff --git a/mysql-test/r/rpl_alter_db.result b/mysql-test/r/rpl_alter_db.result deleted file mode 100644 index 6edbe5d427f..00000000000 --- a/mysql-test/r/rpl_alter_db.result +++ /dev/null @@ -1,8 +0,0 @@ -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; -use mysql; -alter database collate latin1_bin; diff --git a/mysql-test/r/rpl_auto_increment.result b/mysql-test/r/rpl_auto_increment.result deleted file mode 100644 index 083f3a4e901..00000000000 --- a/mysql-test/r/rpl_auto_increment.result +++ /dev/null @@ -1,229 +0,0 @@ -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; -create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3; -insert into t1 values (NULL,1),(NULL,2),(NULL,3); -select * from t1; -a b -12 1 -22 2 -32 3 -select * from t1; -a b -12 1 -22 2 -32 3 -drop table t1; -create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam; -insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); -delete from t1 where b=4; -insert into t1 values (NULL,5),(NULL,6); -select * from t1; -a b -1 1 -2 2 -3 3 -22 5 -32 6 -select * from t1; -a b -1 1 -2 2 -3 3 -22 5 -32 6 -drop table t1; -set @@session.auto_increment_increment=100, @@session.auto_increment_offset=10; -show variables like "%auto_inc%"; -Variable_name Value -auto_increment_increment 100 -auto_increment_offset 10 -create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; -insert into t1 values (NULL),(5),(NULL); -insert into t1 values (250),(NULL); -select * from t1; -a -5 -10 -110 -250 -310 -insert into t1 values (1000); -set @@insert_id=400; -insert into t1 values(NULL),(NULL); -select * from t1; -a -5 -10 -110 -250 -310 -400 -410 -1000 -select * from t1; -a -5 -10 -110 -250 -310 -400 -410 -1000 -drop table t1; -create table t1 (a int not null auto_increment, primary key (a)) engine=innodb; -insert into t1 values (NULL),(5),(NULL); -insert into t1 values (250),(NULL); -select * from t1; -a -5 -10 -110 -250 -310 -insert into t1 values (1000); -set @@insert_id=400; -insert into t1 values(NULL),(NULL); -select * from t1; -a -5 -10 -110 -250 -310 -400 -410 -1000 -select * from t1; -a -5 -10 -110 -250 -310 -400 -410 -1000 -drop table t1; -set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; -create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; -insert into t1 values (NULL),(5),(NULL),(NULL); -insert into t1 values (500),(NULL),(502),(NULL),(NULL); -select * from t1; -a -1 -5 -6 -7 -500 -501 -502 -503 -504 -set @@insert_id=600; -insert into t1 values(600),(NULL),(NULL); -ERROR 23000: Duplicate entry '600' for key 'PRIMARY' -set @@insert_id=600; -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); -select * from t1; -a -1 -5 -6 -7 -500 -501 -502 -503 -504 -600 -610 -611 -select * from t1; -a -1 -5 -6 -7 -500 -501 -502 -503 -504 -600 -610 -611 -drop table t1; -set @@session.auto_increment_increment=10, @@session.auto_increment_offset=1; -create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; -insert into t1 values(2),(12),(22),(32),(42); -insert into t1 values (NULL),(NULL); -insert into t1 values (3),(NULL),(NULL); -select * from t1; -a -1 -3 -11 -21 -31 -select * from t1; -a -1 -2 -3 -11 -12 -21 -22 -31 -32 -42 -drop table t1; -create table t1 (a tinyint not null auto_increment primary key) engine=myisam; -insert into t1 values(103); -set auto_increment_increment=11; -set auto_increment_offset=4; -insert into t1 values(null); -insert into t1 values(null); -insert into t1 values(null); -ERROR 23000: Duplicate entry '125' for key 'PRIMARY' -select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t1 order by a; -a mod(a-@@auto_increment_offset,@@auto_increment_increment) -103 0 -114 0 -125 0 -create table t2 (a tinyint unsigned not null auto_increment primary key) engine=myisam; -set auto_increment_increment=10; -set auto_increment_offset=1; -set insert_id=1000; -insert into t2 values(null); -Warnings: -Warning 1264 Out of range value for column 'a' at row 1 -select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t2 order by a; -a mod(a-@@auto_increment_offset,@@auto_increment_increment) -251 0 -create table t3 like t1; -set auto_increment_increment=1000; -set auto_increment_offset=700; -insert into t3 values(null); -Warnings: -Warning 1264 Out of range value for column 'a' at row 1 -select * from t3 order by a; -a -127 -select * from t1 order by a; -a -103 -114 -125 -select * from t2 order by a; -a -251 -select * from t3 order by a; -a -127 -drop table t1,t2,t3; diff --git a/mysql-test/r/rpl_auto_increment_11932.result b/mysql-test/r/rpl_auto_increment_11932.result deleted file mode 100644 index 25eda6ee454..00000000000 --- a/mysql-test/r/rpl_auto_increment_11932.result +++ /dev/null @@ -1,47 +0,0 @@ -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; -drop database if exists test1; -create database test1; -use test1; -CREATE TABLE `t1` ( -`id` int(10) unsigned NOT NULL auto_increment, -`fname` varchar(100) default NULL, -PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -INSERT INTO `t1` VALUES (1, 'blablabla'); -CREATE TABLE `t2` ( -`id` int(10) NOT NULL auto_increment, -`comment` varchar(255) NOT NULL default '', -PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=3 ; -INSERT INTO `t2` VALUES (1, 'testtest 1'); -INSERT INTO `t2` VALUES (2, 'test 2'); -CREATE PROCEDURE simpleproc3 () -NOT DETERMINISTIC -BEGIN -INSERT INTO t1 (fname) (SELECT t2.comment FROM t2 WHERE t2.id = '1'); -INSERT INTO t1 (fname) VALUES('test'); -END -$ -CALL simpleproc3(); -select * from t2; -id comment -1 testtest 1 -2 test 2 -TRUNCATE TABLE `t1`; -CALL simpleproc3(); -select * from t1; -id fname -1 testtest 1 -2 test -use test1; -select * from t1; -id fname -1 testtest 1 -2 test -drop database test1; -drop database test1; diff --git a/mysql-test/r/rpl_bit.result b/mysql-test/r/rpl_bit.result deleted file mode 100644 index 924de8a65f8..00000000000 --- a/mysql-test/r/rpl_bit.result +++ /dev/null @@ -1,138 +0,0 @@ -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; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 ( -dummyKey INTEGER NOT NULL, -f01 TINYINT, -f10 TINYINT, -f12 TINYINT, -f15 TINYINT, -f16 TINYINT, -f7 TINYINT, -f9 TINYINT, -f29 TINYINT, -f0 TINYINT, -fA1 TINYINT, -C32 TINYINT, -A42 TINYINT, -CA3 TINYINT, -A044 TINYINT, -f001 TINYINT, -A3002 TINYINT, -fC003 TINYINT, -CA300 TINYINT, -A305 TINYINT, -CA321 TINYINT, -r001 TINYINT, -bit1 BIT(6), -bit2 BIT(6), -bit3 BIT(6), -State1 TINYINT, -State2 TINYINT, -State3 TINYINT, -State4 TINYINT, -SubState TINYINT, -gState TINYINT, -oSupp TINYINT, -tSupp TINYINT, -sSuppD TINYINT, -mSuppf TINYINT, -GSuppDf TINYINT, -VNotSupp TINYINT, -x034 TINYINT, -PRIMARY KEY USING HASH (dummyKey) ); -LOCK TABLES test.t1 WRITE; -INSERT INTO test.t1 VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'111110',b'110101',4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'100100',4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'101010',b'010101',4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'101010',b'111111',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); -UNLOCK TABLES; -SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1; -oSupp sSuppD GSuppDf VNotSupp x034 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -SELECT hex(bit1) FROM test.t1 ORDER BY bit1; -hex(bit1) -0 -0 -0 -0 -0 -2A -3F -3F -SELECT hex(bit2) from test.t1 ORDER BY bit2; -hex(bit2) -0 -1 -1 -1 -1 -2A -3E -3F -SELECT hex(bit3) from test.t1 ORDER BY bit3; -hex(bit3) -0 -1 -1 -1 -1 -15 -24 -35 -SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1; -oSupp sSuppD GSuppDf VNotSupp x034 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -5 5 3 2 1 -SELECT hex(bit1) FROM test.t1 ORDER BY bit1; -hex(bit1) -0 -0 -0 -0 -0 -2A -3F -3F -SELECT hex(bit2) from test.t1 ORDER BY bit2; -hex(bit2) -0 -1 -1 -1 -1 -2A -3E -3F -SELECT hex(bit3) from test.t1 ORDER BY bit3; -hex(bit3) -0 -1 -1 -1 -1 -15 -24 -35 -DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/r/rpl_bit_npk.result b/mysql-test/r/rpl_bit_npk.result deleted file mode 100644 index 9599660f18f..00000000000 --- a/mysql-test/r/rpl_bit_npk.result +++ /dev/null @@ -1,169 +0,0 @@ -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; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 ( -dummyKey INTEGER NOT NULL, -f01 TINYINT, -f10 TINYINT, -f12 TINYINT, -f15 TINYINT, -f16 TINYINT, -f7 TINYINT, -f9 TINYINT, -f29 TINYINT, -f0 TINYINT, -fA1 TINYINT, -C32 TINYINT, -A42 TINYINT, -CA3 TINYINT, -A044 TINYINT, -f001 TINYINT, -A3002 TINYINT, -fC003 TINYINT, -CA300 TINYINT, -A305 TINYINT, -CA321 TINYINT, -r001 TINYINT, -bit1 BIT(6), -bit2 BIT(6), -bit3 BIT(6), -State1 TINYINT, -State2 TINYINT, -State3 TINYINT, -State4 TINYINT, -SubState TINYINT, -gState TINYINT, -oSupp TINYINT, -tSupp TINYINT, -sSuppD TINYINT, -mSuppf TINYINT, -GSuppDf TINYINT, -VNotSupp TINYINT, -x034 TINYINT); -LOCK TABLES test.t1 WRITE; -INSERT INTO test.t1 VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'111110',b'110101',4,5,5,5,5,5,5,5,5,5,3,NULL,1); -INSERT INTO test.t1 VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'100100',4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'101010',b'010101',4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'101010',b'111111',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'0',1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); -INSERT INTO test.t1 VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); -UNLOCK TABLES; -UPDATE test.t1 set x034 = 50 where bit3 = b'000000'; -UPDATE test.t1 set VNotSupp = 33 where bit1 = b'0'; -SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 -FROM test.t1 -ORDER BY oSupp, sSuppD, GSuppDf, VNotSupp, x034; -oSupp sSuppD GSuppDf VNotSupp x034 -5 5 3 NULL 1 -5 5 3 2 1 -5 5 3 2 50 -5 5 3 33 1 -5 5 3 33 1 -5 5 3 33 1 -5 5 3 33 1 -5 5 3 33 1 -SELECT hex(bit1) from test.t1 ORDER BY bit1; -hex(bit1) -0 -0 -0 -0 -0 -2A -3F -3F -SELECT hex(bit2) from test.t1 ORDER BY bit2; -hex(bit2) -0 -1 -1 -1 -1 -2A -3E -3F -SELECT hex(bit3) from test.t1 ORDER BY bit3; -hex(bit3) -0 -1 -1 -1 -1 -15 -24 -35 -SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 -FROM test.t1 -ORDER BY oSupp, sSuppD, GSuppDf, VNotSupp, x034; -oSupp sSuppD GSuppDf VNotSupp x034 -5 5 3 NULL 1 -5 5 3 2 1 -5 5 3 2 50 -5 5 3 33 1 -5 5 3 33 1 -5 5 3 33 1 -5 5 3 33 1 -5 5 3 33 1 -SELECT hex(bit1) from test.t1 ORDER BY bit1; -hex(bit1) -0 -0 -0 -0 -0 -2A -3F -3F -SELECT hex(bit2) from test.t1 ORDER BY bit2; -hex(bit2) -0 -1 -1 -1 -1 -2A -3E -3F -SELECT hex(bit3) from test.t1 ORDER BY bit3; -hex(bit3) -0 -1 -1 -1 -1 -15 -24 -35 -CREATE TABLE test.t2 (a INT, b BIT(1)); -INSERT INTO test.t2 VALUES (1, b'0'); -INSERT INTO test.t2 VALUES (1, b'1'); -UPDATE test.t2 SET a = 2 WHERE b = b'1'; -CREATE TABLE test.t3 (a INT, b INT); -INSERT INTO test.t3 VALUES (1, NULL); -INSERT INTO test.t3 VALUES (1, 0); -UPDATE test.t3 SET a = 2 WHERE b = 0; -SELECT a, hex(b) FROM test.t2 ORDER BY a,b; -a hex(b) -1 0 -2 1 -SELECT * FROM test.t3 ORDER BY a,b; -a b -1 NULL -2 0 -SELECT a, hex(b) FROM test.t2 ORDER BY a,b; -a hex(b) -1 0 -2 1 -SELECT * FROM test.t3 ORDER BY a,b; -a b -1 NULL -2 0 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result deleted file mode 100644 index 680328bcea5..00000000000 --- a/mysql-test/r/rpl_change_master.result +++ /dev/null @@ -1,26 +0,0 @@ -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; -create table t1(n int); -select * from t1; -n -stop slave sql_thread; -insert into t1 values(1); -insert into t1 values(2); -stop slave; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No -change master to master_user='root'; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No -start slave; -select * from t1; -n -1 -2 -drop table t1; diff --git a/mysql-test/r/rpl_charset_sjis.result b/mysql-test/r/rpl_charset_sjis.result deleted file mode 100644 index 770ad0588d1..00000000000 --- a/mysql-test/r/rpl_charset_sjis.result +++ /dev/null @@ -1,26 +0,0 @@ -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; -drop table if exists t1; -drop procedure if exists p1; -create table t1 (a varchar(255) character set sjis); -create procedure p1 (in a varchar(255) character set sjis) insert into t1 values (a); -SET NAMES binary; -CALL p1 ('–\\'); -select "--- on master ---"; ---- on master --- ---- on master --- -select hex(a) from t1 ; -hex(a) -965C -select "--- on slave ---"; ---- on slave --- ---- on slave --- -select hex(a) from t1; -hex(a) -965C -drop table t1; -drop procedure p1; diff --git a/mysql-test/r/rpl_commit_after_flush.result b/mysql-test/r/rpl_commit_after_flush.result deleted file mode 100644 index eaddda63b6a..00000000000 --- a/mysql-test/r/rpl_commit_after_flush.result +++ /dev/null @@ -1,13 +0,0 @@ -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; -CREATE TABLE t1 (a INT) ENGINE=innodb; -begin; -insert into t1 values(1); -flush tables with read lock; -commit; -unlock tables; -drop table t1; diff --git a/mysql-test/r/rpl_create_database.result b/mysql-test/r/rpl_create_database.result deleted file mode 100644 index 0cfd44bc58c..00000000000 --- a/mysql-test/r/rpl_create_database.result +++ /dev/null @@ -1,70 +0,0 @@ -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; -DROP DATABASE IF EXISTS mysqltest_prometheus; -DROP DATABASE IF EXISTS mysqltest_sisyfos; -DROP DATABASE IF EXISTS mysqltest_bob; -DROP DATABASE IF EXISTS mysqltest_bob; -CREATE DATABASE mysqltest_prometheus; -CREATE DATABASE mysqltest_sisyfos; -CREATE DATABASE mysqltest_bob; -USE mysqltest_sisyfos; -CREATE TABLE t1 (b int); -INSERT INTO t1 VALUES(1); -USE mysqltest_bob; -CREATE TABLE t2 (b int); -INSERT INTO t2 VALUES(2); -ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1; -USE mysqltest_sisyfos; -ALTER DATABASE mysqltest_bob CHARACTER SET latin1; -SHOW DATABASES; -Database -information_schema -mysql -mysqltest_bob -mysqltest_prometheus -mysqltest_sisyfos -test -SHOW DATABASES; -Database -information_schema -mysql -mysqltest_prometheus -mysqltest_sisyfos -test -DROP DATABASE IF EXISTS mysqltest_sisyfos; -USE mysqltest_prometheus; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1); -CREATE DATABASE mysqltest_sisyfos; -USE mysqltest_sisyfos; -CREATE TABLE t2 (a INT); -SHOW DATABASES; -Database -information_schema -mysql -mysqltest_bob -mysqltest_prometheus -mysqltest_sisyfos -test -SHOW DATABASES; -Database -information_schema -mysql -mysqltest_prometheus -mysqltest_sisyfos -test -USE mysqltest_prometheus; -SHOW TABLES; -Tables_in_mysqltest_prometheus -t1 -USE mysqltest_sisyfos; -SHOW TABLES; -Tables_in_mysqltest_sisyfos -t2 -DROP DATABASE IF EXISTS mysqltest_prometheus; -DROP DATABASE IF EXISTS mysqltest_sisyfos; -DROP DATABASE IF EXISTS mysqltest_bob; diff --git a/mysql-test/r/rpl_critical_errors.result b/mysql-test/r/rpl_critical_errors.result deleted file mode 100644 index bcc53565084..00000000000 --- a/mysql-test/r/rpl_critical_errors.result +++ /dev/null @@ -1 +0,0 @@ -Turn on parsing to run this test diff --git a/mysql-test/r/rpl_critical_errors.result.txt b/mysql-test/r/rpl_critical_errors.result.txt deleted file mode 100644 index 0df2e1ef369..00000000000 --- a/mysql-test/r/rpl_critical_errors.result.txt +++ /dev/null @@ -1,56 +0,0 @@ -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; -CREATE TABLE t1 (data LONGBLOB) ENGINE=MYISAM; -CREATE TABLE t2 (data LONGBLOB) ENGINE=MYISAM; -INSERT INTO t1 (data) VALUES (repeat('a',1024*1024)); -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t2 SELECT * FROM t1; -KILL QUERY 2; -SELECT COUNT(*) FROM t2; -COUNT(*) -0 -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1317 -Last_Error # -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # diff --git a/mysql-test/r/rpl_ddl.result b/mysql-test/r/rpl_ddl.result deleted file mode 100644 index d41462de621..00000000000 --- a/mysql-test/r/rpl_ddl.result +++ /dev/null @@ -1,1616 +0,0 @@ -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; - --------- switch to master ------- -SET AUTOCOMMIT = 1; -DROP DATABASE IF EXISTS mysqltest1; -DROP DATABASE IF EXISTS mysqltest2; -DROP DATABASE IF EXISTS mysqltest3; -CREATE DATABASE mysqltest1; -CREATE DATABASE mysqltest2; -CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=InnoDB; -INSERT INTO mysqltest1.t1 SET f1= 0; -CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE=InnoDB; -CREATE INDEX my_idx6 ON mysqltest1.t6(f1); -CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE=InnoDB; -INSERT INTO mysqltest1.t7 SET f1= 0; -CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE=InnoDB; -CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE=InnoDB; -CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) ENGINE=MEMORY; -SET AUTOCOMMIT = 0; -use mysqltest1; - --------- switch to slave -------- -SET AUTOCOMMIT = 1; -use mysqltest1; - --------- switch to master ------- - -######## SELECT 1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -SELECT 1; -1 -1 -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## SELECT COUNT(*) FROM t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -SELECT COUNT(*) FROM t1; -COUNT(*) -2 -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## COMMIT ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -COMMIT; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## ROLLBACK ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 1 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## SET AUTOCOMMIT=1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 1 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -SET AUTOCOMMIT=1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SET AUTOCOMMIT=0; - -######## START TRANSACTION ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 2 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to master ------- -START TRANSACTION; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## BEGIN ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 3 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to master ------- -BEGIN; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## DROP TABLE mysqltest1.t2 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 4 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to master ------- -DROP TABLE mysqltest1.t2; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't2'; -Tables_in_mysqltest1 (t2) - --------- switch to slave -------- -SHOW TABLES LIKE 't2'; -Tables_in_mysqltest1 (t2) - --------- switch to master ------- - -######## DROP TEMPORARY TABLE mysqltest1.t23 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 5 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -DROP TEMPORARY TABLE mysqltest1.t23; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't23'; -Tables_in_mysqltest1 (t23) - --------- switch to slave -------- -SHOW TABLES LIKE 't23'; -Tables_in_mysqltest1 (t23) - --------- switch to master ------- - -######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 5 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -RENAME TABLE mysqltest1.t3 to mysqltest1.t20; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't20'; -Tables_in_mysqltest1 (t20) -t20 - --------- switch to slave -------- -SHOW TABLES LIKE 't20'; -Tables_in_mysqltest1 (t20) -t20 - --------- switch to master ------- - -######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 6 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to master ------- -ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -describe mysqltest1.t4; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 bigint(20) YES NULL - --------- switch to slave -------- -describe mysqltest1.t4; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 bigint(20) YES NULL - --------- switch to master ------- - -######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= InnoDB ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 7 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to master ------- -CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= InnoDB; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 8 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## TRUNCATE TABLE mysqltest1.t7 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 8 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -TRUNCATE TABLE mysqltest1.t7; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT * FROM mysqltest1.t7; -f1 - --------- switch to slave -------- -SELECT * FROM mysqltest1.t7; -f1 - --------- switch to master ------- - -######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 9 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -UNLOCK TABLES; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 READ; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -ERROR HY000: Table 't1' was locked with a READ lock and can't be updated -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## DROP INDEX my_idx6 ON mysqltest1.t6 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 11 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to master ------- -DROP INDEX my_idx6 ON mysqltest1.t6; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW INDEX FROM mysqltest1.t6; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment - --------- switch to slave -------- -SHOW INDEX FROM mysqltest1.t6; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment - --------- switch to master ------- - -######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 12 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to master ------- -CREATE INDEX my_idx5 ON mysqltest1.t5(f1); -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW INDEX FROM mysqltest1.t5; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE - --------- switch to slave -------- -SHOW INDEX FROM mysqltest1.t5; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t5 1 my_idx5 1 f1 A NULL NULL NULL YES BTREE - --------- switch to master ------- - -######## DROP DATABASE mysqltest2 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 13 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to master ------- -DROP DATABASE mysqltest2; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW DATABASES LIKE "mysqltest2"; -Database (mysqltest2) - --------- switch to slave -------- -SHOW DATABASES LIKE "mysqltest2"; -Database (mysqltest2) - --------- switch to master ------- - -######## CREATE DATABASE mysqltest3 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 14 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to master ------- -CREATE DATABASE mysqltest3; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW DATABASES LIKE "mysqltest3"; -Database (mysqltest3) -mysqltest3 - --------- switch to slave -------- -SHOW DATABASES LIKE "mysqltest3"; -Database (mysqltest3) -mysqltest3 - --------- switch to master ------- - -######## CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1" ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 15 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to master ------- -CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1"; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment - --------- switch to master ------- - -######## ALTER PROCEDURE p1 COMMENT "I have been altered" ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 16 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to master ------- -ALTER PROCEDURE p1 COMMENT "I have been altered"; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment I have been altered - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment I have been altered - --------- switch to master ------- - -######## DROP PROCEDURE p1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 17 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to master ------- -DROP PROCEDURE p1; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; - --------- switch to master ------- - -######## CREATE OR REPLACE VIEW v1 as select * from t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 18 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to master ------- -CREATE OR REPLACE VIEW v1 as select * from t1; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` - --------- switch to slave -------- -SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` - --------- switch to master ------- - -######## ALTER VIEW v1 AS select f1 from t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 19 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to master ------- -ALTER VIEW v1 AS select f1 from t1; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` - --------- switch to slave -------- -SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` - --------- switch to master ------- - -######## DROP VIEW IF EXISTS v1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 20 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to master ------- -DROP VIEW IF EXISTS v1; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -ERROR 42S02: Table 'mysqltest1.v1' doesn't exist - --------- switch to slave -------- -SHOW CREATE VIEW v1; -ERROR 42S02: Table 'mysqltest1.v1' doesn't exist - --------- switch to master ------- - -######## CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 21 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to master ------- -CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer -trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost - --------- switch to slave -------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer -trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost - --------- switch to master ------- - -######## DROP TRIGGER trg1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 22 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to master ------- -DROP TRIGGER trg1; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer - --------- switch to slave -------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer - --------- switch to master ------- - -######## CREATE USER user1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 23 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to master ------- -CREATE USER user1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'user1'; -user -user1 - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'user1'; -user -user1 - --------- switch to master ------- - -######## RENAME USER user1@localhost TO rename1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 24 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to master ------- -RENAME USER user1@localhost TO rename1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -rename1 - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -rename1 - --------- switch to master ------- - -######## DROP USER rename1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 25 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to master ------- -DROP USER rename1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -use test; - --------- switch to master ------- -DROP DATABASE mysqltest1; -DROP DATABASE mysqltest3; diff --git a/mysql-test/r/rpl_deadlock_innodb.result b/mysql-test/r/rpl_deadlock_innodb.result deleted file mode 100644 index 914e1497094..00000000000 --- a/mysql-test/r/rpl_deadlock_innodb.result +++ /dev/null @@ -1,199 +0,0 @@ -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; -CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=innodb; -CREATE TABLE t2 (a INT NOT NULL, KEY(a)) ENGINE=innodb; -CREATE TABLE t3 (a INT UNIQUE) ENGINE=innodb; -CREATE TABLE t4 (a INT) ENGINE=innodb; -show variables like 'slave_transaction_retries'; -Variable_name Value -slave_transaction_retries 10 -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL, - KEY `a` (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` int(11) NOT NULL, - KEY `a` (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -show variables like 'slave_transaction_retries'; -Variable_name Value -slave_transaction_retries 2 -stop slave; -begin; -insert into t2 values (0); -insert into t1 values(1); -commit; -begin; -select * from t1 for update; -a -start slave; -select * from t2 for update /* dl */; -a -commit; -select * from t1; -a -1 -select * from t2 /* must be 1 */; -a -0 -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -stop slave; -delete from t3; -change master to master_log_pos=548; -begin; -select * from t2 for update; -a -0 -start slave; -select count(*) from t3 /* must be zero */; -count(*) -0 -commit; -select * from t1; -a -1 -1 -select * from t2; -a -0 -0 -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running # -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -set @my_max_relay_log_size= @@global.max_relay_log_size; -set global max_relay_log_size=0; -stop slave; -delete from t3; -change master to master_log_pos=548; -begin; -select * from t2 for update; -a -0 -0 -start slave; -select count(*) from t3 /* must be zero */; -count(*) -0 -commit; -select * from t1; -a -1 -1 -1 -select * from t2; -a -0 -0 -0 -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running # -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -drop table t1,t2,t3,t4; -set global max_relay_log_size= @my_max_relay_log_size; -End of 5.1 tests diff --git a/mysql-test/r/rpl_delete_no_where.result b/mysql-test/r/rpl_delete_no_where.result deleted file mode 100644 index 78edf4bf3fa..00000000000 --- a/mysql-test/r/rpl_delete_no_where.result +++ /dev/null @@ -1,15 +0,0 @@ -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; -create table t1 (a int, b int) engine=myisam; -insert into t1 values(1,1); -select * from t1; -a b -1 1 -delete from t1; -select * from t1; -a b -drop table t1; diff --git a/mysql-test/r/rpl_do_grant.result b/mysql-test/r/rpl_do_grant.result deleted file mode 100644 index f7f1ce66656..00000000000 --- a/mysql-test/r/rpl_do_grant.result +++ /dev/null @@ -1,91 +0,0 @@ -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; -delete from mysql.user where user=_binary'rpl_do_grant'; -delete from mysql.db where user=_binary'rpl_do_grant'; -flush privileges; -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; -grant select on *.* to rpl_do_grant@localhost; -grant drop on test.* to rpl_do_grant@localhost; -show grants for rpl_do_grant@localhost; -Grants for rpl_do_grant@localhost -GRANT SELECT ON *.* TO 'rpl_do_grant'@'localhost' -GRANT DROP ON `test`.* TO 'rpl_do_grant'@'localhost' -set password for rpl_do_grant@localhost=password("does it work?"); -select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant'; -password<>_binary'' -1 -update mysql.user set password='' where user='rpl_do_grant'; -flush privileges; -select password<>'' from mysql.user where user='rpl_do_grant'; -password<>'' -0 -set sql_mode='ANSI_QUOTES'; -set password for rpl_do_grant@localhost=password('does it work?'); -set sql_mode=''; -select password<>'' from mysql.user where user='rpl_do_grant'; -password<>'' -1 -delete from mysql.user where user=_binary'rpl_do_grant'; -delete from mysql.db where user=_binary'rpl_do_grant'; -flush privileges; -delete from mysql.user where user=_binary'rpl_do_grant'; -delete from mysql.db where user=_binary'rpl_do_grant'; -flush privileges; -show grants for rpl_do_grant@localhost; -ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost' -show grants for rpl_do_grant@localhost; -ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost' -create user rpl_do_grant@localhost; -show grants for rpl_do_grant@localhost; -Grants for rpl_do_grant@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost' -show grants for rpl_do_grant2@localhost; -ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' -show grants for rpl_do_grant@localhost; -Grants for rpl_do_grant@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost' -show grants for rpl_do_grant2@localhost; -ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' -rename user rpl_do_grant@localhost to rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -show grants for rpl_do_grant2@localhost; -Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' -show grants for rpl_do_grant2@localhost; -Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' -revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' -show grants for rpl_do_grant2@localhost; -Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' -revoke all privileges, grant option from rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -show grants for rpl_do_grant2@localhost; -Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -drop user rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' -show grants for rpl_do_grant2@localhost; -ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' diff --git a/mysql-test/r/rpl_drop.result b/mysql-test/r/rpl_drop.result deleted file mode 100644 index b83594c9bb1..00000000000 --- a/mysql-test/r/rpl_drop.result +++ /dev/null @@ -1,10 +0,0 @@ -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; -drop table if exists t1, t2; -create table t1 (a int); -drop table t1, t2; -ERROR 42S02: Unknown table 't2' diff --git a/mysql-test/r/rpl_drop_db.result b/mysql-test/r/rpl_drop_db.result deleted file mode 100644 index c0efdf5290d..00000000000 --- a/mysql-test/r/rpl_drop_db.result +++ /dev/null @@ -1,38 +0,0 @@ -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; -drop database if exists mysqltest1; -create database mysqltest1; -create table mysqltest1.t1 (n int); -insert into mysqltest1.t1 values (1); -select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; -create table mysqltest1.t2 (n int); -create table mysqltest1.t3 (n int); -drop database mysqltest1; -ERROR HY000: Error dropping database (can't rmdir './mysqltest1/', errno: 17) -use mysqltest1; -show tables; -Tables_in_mysqltest1 -drop database mysqltest1; -ERROR HY000: Error dropping database (can't rmdir './mysqltest1/', errno: 17) -use mysqltest1; -show tables; -Tables_in_mysqltest1 -use test; -create table t1 (n int); -insert into t1 values (1234); -use mysqltest1; -show tables; -Tables_in_mysqltest1 -use test; -select * from t1; -n -1234 -stop slave; -drop database mysqltest1; -drop database mysqltest1; -use test; -drop table t1; diff --git a/mysql-test/r/rpl_drop_temp.result b/mysql-test/r/rpl_drop_temp.result deleted file mode 100644 index 40d578dd13e..00000000000 --- a/mysql-test/r/rpl_drop_temp.result +++ /dev/null @@ -1,13 +0,0 @@ -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; -create database if not exists mysqltest; -create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; -create temporary table mysqltest.t2 (n int)ENGINE=MyISAM; -show status like 'Slave_open_temp_tables'; -Variable_name Value -Slave_open_temp_tables 0 -drop database mysqltest; diff --git a/mysql-test/r/rpl_dual_pos_advance.result b/mysql-test/r/rpl_dual_pos_advance.result deleted file mode 100644 index 257baa81b74..00000000000 --- a/mysql-test/r/rpl_dual_pos_advance.result +++ /dev/null @@ -1,22 +0,0 @@ -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; -reset master; -change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; -start slave; -create table t1 (n int); -create table t4 (n int); -create table t5 (n int); -create table t6 (n int); -show tables; -Tables_in_test -t1 -t4 -t5 -t6 -stop slave; -reset slave; -drop table t1,t4,t5,t6; diff --git a/mysql-test/r/rpl_empty_master_crash.result b/mysql-test/r/rpl_empty_master_crash.result deleted file mode 100644 index d57600d7396..00000000000 --- a/mysql-test/r/rpl_empty_master_crash.result +++ /dev/null @@ -1,12 +0,0 @@ -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; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -load table t1 from master; -ERROR 08S01: Error connecting to master: Master is not configured -load table t1 from master; -ERROR HY000: Error from master: 'Table 'test.t1' doesn't exist' diff --git a/mysql-test/r/rpl_err_ignoredtable.result b/mysql-test/r/rpl_err_ignoredtable.result deleted file mode 100644 index f211d5d9a2f..00000000000 --- a/mysql-test/r/rpl_err_ignoredtable.result +++ /dev/null @@ -1,42 +0,0 @@ -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; -create table t1 (a int primary key); -create table t4 (a int primary key); -insert into t1 values (1),(1); -Got one of the listed errors -insert into t4 values (1),(2); -show tables like 't1'; -Tables_in_test (t1) -show tables like 't4'; -Tables_in_test (t4) -t4 -SELECT * FROM test.t4 ORDER BY a; -a -1 -2 -drop table t1; -select get_lock('crash_lock%20C', 10); -get_lock('crash_lock%20C', 10) -1 -create table t2 (a int primary key); -insert into t2 values(1); -create table t3 (id int); -insert into t3 values(connection_id()); -update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); -select (@id := id) - id from t3; -(@id := id) - id -0 -kill @id; -drop table t2,t3; -insert into t4 values (3),(4); -SELECT * FROM test.t4 ORDER BY a; -a -1 -2 -3 -4 -DROP TABLE test.t4; diff --git a/mysql-test/r/rpl_events.result b/mysql-test/r/rpl_events.result deleted file mode 100644 index 0d7e7bb28a7..00000000000 --- a/mysql-test/r/rpl_events.result +++ /dev/null @@ -1,165 +0,0 @@ -set global event_scheduler=1; -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 binlog_format=row; -DROP EVENT IF EXISTS test.justonce; -drop table if exists t1,t2; -CREATE TABLE `t1` ( -`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, -`c` VARCHAR(50) NOT NULL, -`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -INSERT INTO t1 (c) VALUES ('manually'); -CREATE EVENT test.justonce ON SCHEDULE AT NOW() + INTERVAL 2 SECOND DO INSERT INTO t1 -(c) VALUES ('from justonce'); -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; -db name status originator -test justonce ENABLED 1 -"in the master" -SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; -id c ts -1 manually TIMESTAMP -2 from justonce TIMESTAMP -affected rows: 2 -"in the slave" -SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; -id c ts -1 manually TIMESTAMP -2 from justonce TIMESTAMP -affected rows: 2 -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; -db name status originator -DROP EVENT IF EXISTS test.slave_once; -CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO -INSERT INTO t1(c) VALUES ('from slave_once'); -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once'; -db name status originator -test slave_once ENABLED 2 -DROP EVENT IF EXISTS test.slave_once; -DROP EVENT IF EXISTS test.justonce; -CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO -INSERT INTO t1(c) VALUES ('from er'); -SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; -db name status originator body -test er ENABLED 1 INSERT INTO t1(c) VALUES ('from er') -"in the slave" -SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; -db name status originator body -test er SLAVESIDE_DISABLED 1 INSERT INTO t1(c) VALUES ('from er') -"in the master" -ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO INSERT into t1(c) VALUES ('from alter er'); -SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; -db name status originator body -test er ENABLED 1 INSERT into t1(c) VALUES ('from alter er') -"in the slave" -SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; -db name status originator body -test er SLAVESIDE_DISABLED 1 INSERT into t1(c) VALUES ('from alter er') -"in the master" -DROP EVENT test.er; -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; -db name status originator -"in the slave" -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; -db name status originator -CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND -DO INSERT INTO t1(c) VALUES ('from slave_terminate'); -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; -db name status originator -test slave_terminate ENABLED 2 -DROP EVENT test.slave_terminate; -CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND -DISABLE ON SLAVE DO INSERT INTO t1(c) VALUES ('from slave_terminate'); -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; -db name status originator -test slave_terminate SLAVESIDE_DISABLED 2 -DROP EVENT test.slave_terminate; -"in the master" -DROP TABLE t1; -set binlog_format=statement; -DROP EVENT IF EXISTS test.justonce; -drop table if exists t1,t2; -CREATE TABLE `t1` ( -`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, -`c` VARCHAR(50) NOT NULL, -`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -INSERT INTO t1 (c) VALUES ('manually'); -CREATE EVENT test.justonce ON SCHEDULE AT NOW() + INTERVAL 2 SECOND DO INSERT INTO t1 -(c) VALUES ('from justonce'); -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; -db name status originator -test justonce ENABLED 1 -"in the master" -SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; -id c ts -1 manually TIMESTAMP -2 from justonce TIMESTAMP -affected rows: 2 -"in the slave" -SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; -id c ts -1 manually TIMESTAMP -2 from justonce TIMESTAMP -affected rows: 2 -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; -db name status originator -DROP EVENT IF EXISTS test.slave_once; -CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO -INSERT INTO t1(c) VALUES ('from slave_once'); -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once'; -db name status originator -test slave_once ENABLED 2 -DROP EVENT IF EXISTS test.slave_once; -DROP EVENT IF EXISTS test.justonce; -CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO -INSERT INTO t1(c) VALUES ('from er'); -SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; -db name status originator body -test er ENABLED 1 INSERT INTO t1(c) VALUES ('from er') -"in the slave" -SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; -db name status originator body -test er SLAVESIDE_DISABLED 1 INSERT INTO t1(c) VALUES ('from er') -"in the master" -ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO INSERT into t1(c) VALUES ('from alter er'); -SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; -db name status originator body -test er ENABLED 1 INSERT into t1(c) VALUES ('from alter er') -"in the slave" -SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; -db name status originator body -test er SLAVESIDE_DISABLED 1 INSERT into t1(c) VALUES ('from alter er') -"in the master" -DROP EVENT test.er; -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; -db name status originator -"in the slave" -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; -db name status originator -CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND -DO INSERT INTO t1(c) VALUES ('from slave_terminate'); -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; -db name status originator -test slave_terminate ENABLED 2 -DROP EVENT test.slave_terminate; -CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND -DISABLE ON SLAVE DO INSERT INTO t1(c) VALUES ('from slave_terminate'); -SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; -db name status originator -test slave_terminate SLAVESIDE_DISABLED 2 -DROP EVENT test.slave_terminate; -"in the master" -DROP TABLE t1; -CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR -DO BEGIN -select * from t1; -END;| -ALTER EVENT event1 RENAME TO event2; -DROP EVENT event2; diff --git a/mysql-test/r/rpl_extraCol_innodb.result b/mysql-test/r/rpl_extraCol_innodb.result deleted file mode 100644 index a237edc8063..00000000000 --- a/mysql-test/r/rpl_extraCol_innodb.result +++ /dev/null @@ -1,749 +0,0 @@ -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; -**** Diff Table Def Start **** -*** On Slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(4) DEFAULT 'TEST') -ENGINE='InnoDB'; -*** Create t1 on Master *** -CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); -SELECT * FROM t1 ORDER BY a; -a b c -1 2 TEXAS -2 1 AUSTIN -3 4 QA -*** Select from slave *** -SELECT * FROM t1 ORDER BY a; -a b c d e -1 2 TEXAS 2 TEST -2 1 AUSTIN 2 TEST -3 4 QA 2 TEST -*** Drop t1 *** -DROP TABLE t1; -*** Create t3 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='InnoDB'; -*** Create t3 on Master *** -CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t3 *** -DROP TABLE t3; -*** Create t4 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='InnoDB'; -*** Create t4 on Master *** -CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), -(30000.22,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t4 *** -DROP TABLE t4; -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT, e DOUBLE, -f DECIMAL(8,2))ENGINE='InnoDB'; -*** Create t5 on Master *** -CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT, e BLOB, -f FLOAT) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), -(2,'JOE',300.01,0,'b2b2',1.0000009); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t5 *** -DROP TABLE t5; -*** Create t6 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT)ENGINE='InnoDB'; -*** Create t6 on Master *** -CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), -(2,'JOE',300.01,0); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; -*** Drop t6 *** -DROP TABLE t6; -DROP TABLE t6; -START SLAVE; -**** Diff Table Def End **** -**** Extra Colums Start **** -*** Create t7 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e CHAR(20) DEFAULT 'Extra Column Testing') -ENGINE='InnoDB'; -*** Create t7 on Master *** -CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t7 ORDER BY a; -a b c -1 b1b1 Kyle -2 b1b1 JOE -3 b1b1 QA -*** Select from slave *** -SELECT * FROM t7 ORDER BY a; -a b c d e -1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing -2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing -3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing -*** Drop t7 *** -DROP TABLE t7; -*** Create t8 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e INT)ENGINE='InnoDB'; -*** Create t8 on Master *** -CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -*** Drop t8 *** -DROP TABLE t8; -*** Create t10 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; -*** Create t10 on Master *** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t10 *** -DROP TABLE t10; -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; -*** Create t11 on Master *** -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t11 *** -DROP TABLE t11; -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; -*** Create t12 on Master *** -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t12 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave *** -SELECT * FROM t12 ORDER BY a; -a b f c e -1 b1b1b1b1b1b1b1b1 Kyle test 1 -2 b1b1b1b1b1b1b1b1 JOE test 1 -3 b1b1b1b1b1b1b1b1 QA test 1 -*** Drop t12 *** -DROP TABLE t12; -**** Extra Colums End **** -*** BUG 22177 Start *** -*** Create t13 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), -d INT DEFAULT '1', -e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -*** Create t13 on Master *** -CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t13 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t13 ORDER BY a; -a b c d e -1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -*** Drop t13 *** -DROP TABLE t13; -*** 22117 END *** -*** Alter Master Table Testing Start *** -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14 ORDER BY c1; -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 -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c4; -*** Select from Master *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 -1 Replication Testing Extra Col Kyle -2 This Test Should work JOE -3 If is does not, I will open a bug QA -*** Select from Slave *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 c6 c7 -1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP -2 This Test Should work JOE 1 CURRENT_TIMESTAMP -3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP -*** Drop t14 *** -DROP TABLE t14; -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -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 t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t15 ORDER BY c1; -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 -*** Add column on master that is a Extra on Slave *** -ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; -******************************************** -*** Expect slave to fail with Error 1060 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1060 -Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Try to insert in master **** -INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 -*** Try to select from slave **** -SELECT * FROM t15 ORDER BY c1; -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 -*** DROP TABLE t15 *** -DROP TABLE t15; -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='InnoDB'; -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -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 t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t16 ORDER BY c1; -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 -*** Add Partition on master *** -ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; -INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ -*** Show table on Slave **** -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - `c6` int(11) DEFAULT '1', - `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`c1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ -*** DROP TABLE t16 *** -DROP TABLE t16; -*** Alter Master End *** -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='InnoDB'; -*** Create t17 on Master *** -CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='InnoDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -** DROP table t17 *** -DROP TABLE t17; diff --git a/mysql-test/r/rpl_extraCol_myisam.result b/mysql-test/r/rpl_extraCol_myisam.result deleted file mode 100644 index 95f99ba1014..00000000000 --- a/mysql-test/r/rpl_extraCol_myisam.result +++ /dev/null @@ -1,749 +0,0 @@ -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; -**** Diff Table Def Start **** -*** On Slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(4) DEFAULT 'TEST') -ENGINE='MyISAM'; -*** Create t1 on Master *** -CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); -SELECT * FROM t1 ORDER BY a; -a b c -1 2 TEXAS -2 1 AUSTIN -3 4 QA -*** Select from slave *** -SELECT * FROM t1 ORDER BY a; -a b c d e -1 2 TEXAS 2 TEST -2 1 AUSTIN 2 TEST -3 4 QA 2 TEST -*** Drop t1 *** -DROP TABLE t1; -*** Create t3 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='MyISAM'; -*** Create t3 on Master *** -CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t3 *** -DROP TABLE t3; -*** Create t4 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='MyISAM'; -*** Create t4 on Master *** -CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), -(30000.22,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t4 *** -DROP TABLE t4; -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT, e DOUBLE, -f DECIMAL(8,2))ENGINE='MyISAM'; -*** Create t5 on Master *** -CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT, e BLOB, -f FLOAT) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), -(2,'JOE',300.01,0,'b2b2',1.0000009); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t5 *** -DROP TABLE t5; -*** Create t6 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT)ENGINE='MyISAM'; -*** Create t6 on Master *** -CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), -(2,'JOE',300.01,0); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; -*** Drop t6 *** -DROP TABLE t6; -DROP TABLE t6; -START SLAVE; -**** Diff Table Def End **** -**** Extra Colums Start **** -*** Create t7 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e CHAR(20) DEFAULT 'Extra Column Testing') -ENGINE='MyISAM'; -*** Create t7 on Master *** -CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t7 ORDER BY a; -a b c -1 b1b1 Kyle -2 b1b1 JOE -3 b1b1 QA -*** Select from slave *** -SELECT * FROM t7 ORDER BY a; -a b c d e -1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing -2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing -3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing -*** Drop t7 *** -DROP TABLE t7; -*** Create t8 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e INT)ENGINE='MyISAM'; -*** Create t8 on Master *** -CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -*** Drop t8 *** -DROP TABLE t8; -*** Create t10 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; -*** Create t10 on Master *** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t10 *** -DROP TABLE t10; -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; -*** Create t11 on Master *** -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t11 *** -DROP TABLE t11; -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; -*** Create t12 on Master *** -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t12 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave *** -SELECT * FROM t12 ORDER BY a; -a b f c e -1 b1b1b1b1b1b1b1b1 Kyle test 1 -2 b1b1b1b1b1b1b1b1 JOE test 1 -3 b1b1b1b1b1b1b1b1 QA test 1 -*** Drop t12 *** -DROP TABLE t12; -**** Extra Colums End **** -*** BUG 22177 Start *** -*** Create t13 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), -d INT DEFAULT '1', -e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -*** Create t13 on Master *** -CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t13 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t13 ORDER BY a; -a b c d e -1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP -*** Drop t13 *** -DROP TABLE t13; -*** 22117 END *** -*** Alter Master Table Testing Start *** -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14 ORDER BY c1; -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 -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c4; -*** Select from Master *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 -1 Replication Testing Extra Col Kyle -2 This Test Should work JOE -3 If is does not, I will open a bug QA -*** Select from Slave *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 c6 c7 -1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP -2 This Test Should work JOE 1 CURRENT_TIMESTAMP -3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP -*** Drop t14 *** -DROP TABLE t14; -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -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 t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t15 ORDER BY c1; -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 -*** Add column on master that is a Extra on Slave *** -ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; -******************************************** -*** Expect slave to fail with Error 1060 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1060 -Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Try to insert in master **** -INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 -*** Try to select from slave **** -SELECT * FROM t15 ORDER BY c1; -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 -*** DROP TABLE t15 *** -DROP TABLE t15; -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='MyISAM'; -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -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 t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t16 ORDER BY c1; -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 -*** Add Partition on master *** -ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; -INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ -*** Show table on Slave **** -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - `c6` int(11) DEFAULT '1', - `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`c1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ -*** DROP TABLE t16 *** -DROP TABLE t16; -*** Alter Master End *** -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='MyISAM'; -*** Create t17 on Master *** -CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='MyISAM'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -** DROP table t17 *** -DROP TABLE t17; diff --git a/mysql-test/r/rpl_failed_optimize.result b/mysql-test/r/rpl_failed_optimize.result deleted file mode 100644 index 7e397550331..00000000000 --- a/mysql-test/r/rpl_failed_optimize.result +++ /dev/null @@ -1,24 +0,0 @@ -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; -CREATE TABLE t1 ( a int ) ENGINE=InnoDB; -BEGIN; -INSERT INTO t1 VALUES (1); -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize error Lock wait timeout exceeded; try restarting transaction -test.t1 optimize status Operation failed -Warnings: -Error 1205 Lock wait timeout exceeded; try restarting transaction -OPTIMIZE TABLE non_existing; -Table Op Msg_type Msg_text -test.non_existing optimize Error Table 'test.non_existing' doesn't exist -test.non_existing optimize error Corrupt -select * from t1; -a -1 -commit; -drop table t1; diff --git a/mysql-test/r/rpl_flushlog_loop.result b/mysql-test/r/rpl_flushlog_loop.result deleted file mode 100644 index 1e90796b2ea..00000000000 --- a/mysql-test/r/rpl_flushlog_loop.result +++ /dev/null @@ -1,54 +0,0 @@ -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; -stop slave; -change master to master_host='127.0.0.1',master_user='root', -master_password='',master_port=MASTER_PORT; -start slave; -stop slave; -change master to master_host='127.0.0.1',master_user='root', -master_password='',master_port=SLAVE_PORT; -start slave; - -let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%' ; - ---source include/wait_slave_status.inc -flush logs; -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port SLAVE_PORT -Connect_Retry 60 -Master_Log_File slave-bin.000001 -Read_Master_Log_Pos 216 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File slave-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 216 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No diff --git a/mysql-test/r/rpl_foreign_key_innodb.result b/mysql-test/r/rpl_foreign_key_innodb.result deleted file mode 100644 index 2239c32eea3..00000000000 --- a/mysql-test/r/rpl_foreign_key_innodb.result +++ /dev/null @@ -1,42 +0,0 @@ -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; -CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=INNODB; -CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=INNODB; -SET FOREIGN_KEY_CHECKS=0; -INSERT INTO t1 VALUES (10); -INSERT INTO t1 VALUES (NULL),(NULL),(NULL); -INSERT INTO t2 VALUES (5,0); -INSERT INTO t2 VALUES (NULL,LAST_INSERT_ID()); -SET FOREIGN_KEY_CHECKS=1; -SELECT * FROM t1 ORDER BY a; -a -10 -11 -12 -13 -SELECT * FROM t2 ORDER BY b; -b c -5 0 -6 11 -SELECT * FROM t1 ORDER BY a; -a -10 -11 -12 -13 -SELECT * FROM t2 ORDER BY b; -b c -5 0 -6 11 -SET TIMESTAMP=1000000000; -CREATE TABLE t3 ( a INT UNIQUE ); -SET FOREIGN_KEY_CHECKS=0; -INSERT INTO t3 VALUES (1),(1); -Got one of the listed errors -SET FOREIGN_KEY_CHECKS=0; -DROP TABLE IF EXISTS t1,t2,t3; -SET FOREIGN_KEY_CHECKS=1; diff --git a/mysql-test/r/rpl_free_items.result b/mysql-test/r/rpl_free_items.result deleted file mode 100644 index 91c1e2aa6e5..00000000000 --- a/mysql-test/r/rpl_free_items.result +++ /dev/null @@ -1,10 +0,0 @@ -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; -create table t1 (a int); -create table t2 (a int); -drop table t1; -drop table t2; diff --git a/mysql-test/r/rpl_get_lock.result b/mysql-test/r/rpl_get_lock.result deleted file mode 100644 index 235640acad0..00000000000 --- a/mysql-test/r/rpl_get_lock.result +++ /dev/null @@ -1,35 +0,0 @@ -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; -create table t1(n int); -insert into t1 values(get_lock("lock",2)); -select get_lock("lock",2); -get_lock("lock",2) -1 -select release_lock("lock"); -release_lock("lock") -1 -select get_lock("lock",3); -get_lock("lock",3) -1 -select * from t1; -n -1 -select is_free_lock("lock"), is_used_lock("lock") = connection_id(); -is_free_lock("lock") is_used_lock("lock") = connection_id() -0 1 -explain extended select is_free_lock("lock"), is_used_lock("lock"); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used -Warnings: -Note 1003 select is_free_lock(_latin1'lock') AS `is_free_lock("lock")`,is_used_lock(_latin1'lock') AS `is_used_lock("lock")` -select is_free_lock("lock2"); -is_free_lock("lock2") -1 -select is_free_lock(NULL); -is_free_lock(NULL) -NULL -drop table t1; diff --git a/mysql-test/r/rpl_ignore_grant.result b/mysql-test/r/rpl_ignore_grant.result deleted file mode 100644 index 5169cc8e888..00000000000 --- a/mysql-test/r/rpl_ignore_grant.result +++ /dev/null @@ -1,37 +0,0 @@ -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; -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; -grant select on *.* to rpl_ignore_grant@localhost; -grant drop on test.* to rpl_ignore_grant@localhost; -show grants for rpl_ignore_grant@localhost; -Grants for rpl_ignore_grant@localhost -GRANT SELECT ON *.* TO 'rpl_ignore_grant'@'localhost' -GRANT DROP ON `test`.* TO 'rpl_ignore_grant'@'localhost' -show grants for rpl_ignore_grant@localhost; -ERROR 42000: There is no such grant defined for user 'rpl_ignore_grant' on host 'localhost' -select count(*) from mysql.user where user=_binary'rpl_ignore_grant'; -count(*) -0 -select count(*) from mysql.db where user=_binary'rpl_ignore_grant'; -count(*) -0 -grant select on *.* to rpl_ignore_grant@localhost; -set password for rpl_ignore_grant@localhost=password("does it work?"); -select password<>_binary'' from mysql.user where user=_binary'rpl_ignore_grant'; -password<>_binary'' -0 -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; diff --git a/mysql-test/r/rpl_ignore_revoke.result b/mysql-test/r/rpl_ignore_revoke.result deleted file mode 100644 index b1ccd2f0442..00000000000 --- a/mysql-test/r/rpl_ignore_revoke.result +++ /dev/null @@ -1,30 +0,0 @@ -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; -grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; -revoke select on *.* from 'user_foo'@'%'; -select select_priv from mysql.user where user='user_foo' /* master:must be N */; -select_priv -N -grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; -revoke select on *.* from 'user_foo'@'%'; -select select_priv from mysql.user where user='user_foo' /* slave:must be N */; -select_priv -N -grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; -select select_priv from mysql.user where user='user_foo' /* slave:must be Y */; -select_priv -Y -revoke select on *.* from 'user_foo'; -select select_priv from mysql.user where user='user_foo' /* master:must be N */; -select_priv -N -select select_priv from mysql.user where user='user_foo' /* slave:must get Y */; -select_priv -Y -revoke select on *.* FROM 'user_foo'; -delete from mysql.user where user="user_foo"; -delete from mysql.user where user="user_foo"; diff --git a/mysql-test/r/rpl_ignore_table.result b/mysql-test/r/rpl_ignore_table.result deleted file mode 100644 index e7200b31212..00000000000 --- a/mysql-test/r/rpl_ignore_table.result +++ /dev/null @@ -1,140 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -**** Test case for BUG#16487 **** -**** Master **** -CREATE TABLE test.t4 (a int); -CREATE TABLE test.t1 (a int); -UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5; -**** Slave **** -SELECT * FROM t4; -a -DROP TABLE t1; -DROP TABLE t4; -**** Test case for BUG#25482 **** -**** Adding GRANTS on master **** -create table test.t1(a int); -create table test.t4(a int); -GRANT SELECT ON test.t1 TO mysqltest1@localhost; -GRANT INSERT ON test.t4 TO mysqltest2@localhost; -GRANT select, update, insert, references on t1 -to mysqltest2@localhost; -GRANT SELECT ON test.* TO mysqltest3@localhost; -GRANT INSERT ON test.t4 TO mysqltest3@localhost; -GRANT select(a), update(a), insert(a), references(a) on t4 -to mysqltest3@localhost; -create database mysqltest2; -create table mysqltest2.t2 (id int); -GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; -insert into mysql.user (user, host) values ("mysqltest5", "somehost"); -Warnings: -Warning 1364 Field 'ssl_cipher' doesn't have a default value -Warning 1364 Field 'x509_issuer' doesn't have a default value -Warning 1364 Field 'x509_subject' doesn't have a default value -GRANT SELECT ON *.* TO mysqltest6@localhost; -GRANT INSERT ON *.* TO mysqltest6@localhost; -GRANT INSERT ON test.* TO mysqltest6@localhost; -GRANT INSERT ON test.t1 TO mysqltest6@localhost; -show grants for mysqltest1@localhost; -Grants for mysqltest1@localhost -GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' -GRANT SELECT ON `test`.`t1` TO 'mysqltest1'@'localhost' -show grants for mysqltest2@localhost; -Grants for mysqltest2@localhost -GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' -GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO 'mysqltest2'@'localhost' -GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' -show grants for mysqltest3@localhost; -Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' -show grants for mysqltest4@localhost; -Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' -GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' -show grants for mysqltest6@localhost; -Grants for mysqltest6@localhost -GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' -GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' -GRANT INSERT ON `test`.`t1` TO 'mysqltest6'@'localhost' -flush privileges; -show grants for mysqltest5@somehost; -Grants for mysqltest5@somehost -GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' -**** Checking grants on slave **** -show grants for mysqltest2@localhost; -Grants for mysqltest2@localhost -GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' -GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' -show grants for mysqltest3@localhost; -Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' -show grants for mysqltest4@localhost; -Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' -GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' -show grants for mysqltest5@somehost; -Grants for mysqltest5@somehost -GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' -show grants for mysqltest6@localhost; -Grants for mysqltest6@localhost -GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' -GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' -show grants for mysqltest1@localhost; -ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' -**** Revoking grants on master **** -REVOKE SELECT ON test.t1 FROM mysqltest1@localhost; -REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost; -REVOKE select(a) on t4 -from mysqltest3@localhost; -show grants for mysqltest1@localhost; -Grants for mysqltest1@localhost -GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' -show grants for mysqltest3@localhost; -Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' -show grants for mysqltest4@localhost; -Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' -**** Checking grants on slave **** -show grants for mysqltest1@localhost; -ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' -show grants for mysqltest3@localhost; -Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' -show grants for mysqltest4@localhost; -Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' -drop table t1, t4, mysqltest2.t2; -drop database mysqltest2; -delete from mysql.user where user like "mysqltest%"; -delete from mysql.db where user like "mysqltest%"; -delete from mysql.columns_priv where user like "mysqltest%"; -delete from mysql.tables_priv where user like "mysqltest%"; -delete from mysql.tables_priv where user like "mysqltest%"; -DROP TABLE IF EXISTS t5; -CREATE TABLE t5 ( -word varchar(50) collate utf8_unicode_ci NOT NULL default '' -) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -SET @@session.character_set_client=33,@@session.collation_connection=192; -CREATE TEMPORARY TABLE tmptbl504451f4258$1 (id INT NOT NULL) ENGINE=MEMORY; -INSERT INTO t5 (word) VALUES ('TEST’'); -SELECT HEX(word) FROM t5; -HEX(word) -54455354E28099 -SELECT HEX(word) FROM t5; -HEX(word) -54455354E28099 -SELECT * FROM tmptbl504451f4258$1; -ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist -DROP TABLE t5; diff --git a/mysql-test/r/rpl_ignore_table_update.result b/mysql-test/r/rpl_ignore_table_update.result deleted file mode 100644 index a88a3c690ed..00000000000 --- a/mysql-test/r/rpl_ignore_table_update.result +++ /dev/null @@ -1,23 +0,0 @@ -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; -use test; -drop table if exists mysqltest_foo; -drop table if exists mysqltest_bar; -create table mysqltest_foo (n int); -insert into mysqltest_foo values(4); -use test; -create table mysqltest_foo (n int); -insert into mysqltest_foo values(5); -create table mysqltest_bar (m int); -insert into mysqltest_bar values(15); -create table t1 (k int); -insert into t1 values(55); -select mysqltest_foo.n,mysqltest_bar.m,t1.k from mysqltest_foo,mysqltest_bar,t1; -n m k -4 15 55 -drop table mysqltest_foo,mysqltest_bar,t1; -drop table mysqltest_foo,mysqltest_bar,t1; diff --git a/mysql-test/r/rpl_incident.result b/mysql-test/r/rpl_incident.result deleted file mode 100644 index 1a0da45f3e1..00000000000 --- a/mysql-test/r/rpl_incident.result +++ /dev/null @@ -1,106 +0,0 @@ -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; -**** On Master **** -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3); -SELECT * FROM t1; -a -1 -2 -3 -REPLACE INTO t1 VALUES (4); -SELECT * FROM t1; -a -1 -2 -3 -4 -**** On Slave **** -SELECT * FROM t1; -a -1 -2 -3 -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File # -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1586 -Last_Error The incident LOST_EVENTS occured on the master. Message: -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; -SELECT * FROM t1; -a -1 -2 -3 -4 -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File # -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000002 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -DROP TABLE t1; diff --git a/mysql-test/r/rpl_init_slave.result b/mysql-test/r/rpl_init_slave.result deleted file mode 100644 index 740c918976c..00000000000 --- a/mysql-test/r/rpl_init_slave.result +++ /dev/null @@ -1,27 +0,0 @@ -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; -show variables like 'init_slave'; -Variable_name Value -init_slave set global max_connections=500 -show variables like 'max_connections'; -Variable_name Value -max_connections 500 -reset master; -show variables like 'init_slave'; -Variable_name Value -init_slave -show variables like 'max_connections'; -Variable_name Value -max_connections 151 -set @my_global_init_connect= @@global.init_connect; -set global init_connect="set @c=1"; -show variables like 'init_connect'; -Variable_name Value -init_connect set @c=1 -stop slave; -set global init_connect= @my_global_init_connect; -set global max_connections= default; diff --git a/mysql-test/r/rpl_innodb.result b/mysql-test/r/rpl_innodb.result deleted file mode 100644 index 765de8af458..00000000000 --- a/mysql-test/r/rpl_innodb.result +++ /dev/null @@ -1,37 +0,0 @@ -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; -CREATE TABLE t4 ( -id INT(5) unsigned NOT NULL auto_increment, -name varchar(15) NOT NULL default '', -number varchar(35) NOT NULL default 'default', -PRIMARY KEY (id), -UNIQUE KEY unique_rec (name,number) -) ENGINE=InnoDB; -LOAD DATA -INFILE '../std_data_ln/loaddata_pair.dat' -REPLACE INTO TABLE t4 -(name,number); -SELECT * FROM t4; -id name number -1 XXX 12345 -2 XXY 12345 -SELECT * FROM t4; -id name number -1 XXX 12345 -2 XXY 12345 -LOAD DATA -INFILE '../std_data_ln/loaddata_pair.dat' -REPLACE INTO TABLE t4 -(name,number); -SELECT * FROM t4; -id name number -3 XXX 12345 -4 XXY 12345 -SELECT * FROM t4; -id name number -3 XXX 12345 -4 XXY 12345 diff --git a/mysql-test/r/rpl_insert.result b/mysql-test/r/rpl_insert.result deleted file mode 100644 index b6a97926f73..00000000000 --- a/mysql-test/r/rpl_insert.result +++ /dev/null @@ -1,23 +0,0 @@ -# -# Bug#20821: INSERT DELAYED fails to write some rows to binlog -# -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; -CREATE SCHEMA IF NOT EXISTS mysqlslap; -USE mysqlslap; -CREATE TABLE t1 (id INT, name VARCHAR(64)); -SELECT COUNT(*) FROM mysqlslap.t1; -COUNT(*) -5000 -SELECT COUNT(*) FROM mysqlslap.t1; -COUNT(*) -5000 -# -# Cleanup -# -USE test; -DROP SCHEMA mysqlslap; diff --git a/mysql-test/r/rpl_insert_id.result b/mysql-test/r/rpl_insert_id.result deleted file mode 100644 index b0c1b6cfd73..00000000000 --- a/mysql-test/r/rpl_insert_id.result +++ /dev/null @@ -1,538 +0,0 @@ -# -# Setup -# -use test; -drop table if exists t1, t2, t3; -# -# See if queries that use both auto_increment and LAST_INSERT_ID() -# are replicated well -# -# We also check how the foreign_key_check variable is replicated -# -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; -create table t1(a int auto_increment, key(a)); -create table t2(b int auto_increment, c int, key(b)); -insert into t1 values (1),(2),(3); -insert into t1 values (null); -insert into t2 values (null,last_insert_id()); -select * from t1 ORDER BY a; -a -1 -2 -3 -4 -select * from t2 ORDER BY b; -b c -1 4 -drop table t1; -drop table t2; -create table t1(a int auto_increment, key(a)) engine=innodb; -create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=innodb; -SET FOREIGN_KEY_CHECKS=0; -insert into t1 values (10); -insert into t1 values (null),(null),(null); -insert into t2 values (5,0); -insert into t2 values (null,last_insert_id()); -SET FOREIGN_KEY_CHECKS=1; -select * from t1; -a -10 -11 -12 -13 -select * from t2; -b c -5 0 -6 11 -# -# check if INSERT SELECT in auto_increment is well replicated (bug #490) -# -drop table t2; -drop table t1; -create table t1(a int auto_increment, key(a)); -create table t2(b int auto_increment, c int, key(b)); -insert into t1 values (10); -insert into t1 values (null),(null),(null); -insert into t2 values (5,0); -insert into t2 (c) select * from t1 ORDER BY a; -select * from t2 ORDER BY b; -b c -5 0 -6 10 -7 11 -8 12 -9 13 -select * from t1 ORDER BY a; -a -10 -11 -12 -13 -select * from t2 ORDER BY b; -b c -5 0 -6 10 -7 11 -8 12 -9 13 -drop table t1; -drop table t2; -# -# Bug#8412: Error codes reported in binary log for CHARACTER SET, -# FOREIGN_KEY_CHECKS -# -SET TIMESTAMP=1000000000; -CREATE TABLE t1 ( a INT UNIQUE ); -SET FOREIGN_KEY_CHECKS=0; -INSERT INTO t1 VALUES (1),(1); -Got one of the listed errors -drop table t1; -# -# Bug#14553: NULL in WHERE resets LAST_INSERT_ID -# -create table t1(a int auto_increment, key(a)); -create table t2(a int); -insert into t1 (a) values (null); -insert into t2 (a) select a from t1 where a is null; -insert into t2 (a) select a from t1 where a is null; -select * from t2; -a -1 -select * from t2; -a -1 -drop table t1; -drop table t2; -# -# End of 4.1 tests -# -# -# BUG#15728: LAST_INSERT_ID function inside a stored function returns 0 -# -# The solution is not to reset last_insert_id on enter to sub-statement. -# -drop function if exists bug15728; -drop function if exists bug15728_insert; -drop table if exists t1, t2; -create table t1 ( -id int not null auto_increment, -last_id int, -primary key (id) -); -create function bug15728() returns int(11) -return last_insert_id(); -insert into t1 (last_id) values (0); -insert into t1 (last_id) values (last_insert_id()); -insert into t1 (last_id) values (bug15728()); -create table t2 ( -id int not null auto_increment, -last_id int, -primary key (id) -); -create function bug15728_insert() returns int(11) modifies sql data -begin -insert into t2 (last_id) values (bug15728()); -return bug15728(); -end| -create trigger t1_bi before insert on t1 for each row -begin -declare res int; -select bug15728_insert() into res; -set NEW.last_id = res; -end| -insert into t1 (last_id) values (0); -drop trigger t1_bi; -select last_insert_id(); -last_insert_id() -4 -select bug15728_insert(); -bug15728_insert() -2 -select last_insert_id(); -last_insert_id() -4 -insert into t1 (last_id) values (bug15728()); -select last_insert_id(); -last_insert_id() -5 -drop procedure if exists foo; -create procedure foo() -begin -declare res int; -insert into t2 (last_id) values (bug15728()); -insert into t1 (last_id) values (bug15728()); -end| -call foo(); -select * from t1; -id last_id -1 0 -2 1 -3 2 -4 1 -5 4 -6 3 -select * from t2; -id last_id -1 3 -2 4 -3 5 -select * from t1; -id last_id -1 0 -2 1 -3 2 -4 1 -5 4 -6 3 -select * from t2; -id last_id -1 3 -2 4 -3 5 -drop function bug15728; -drop function bug15728_insert; -drop table t1,t2; -drop procedure foo; -create table t1 (n int primary key auto_increment not null, -b int, unique(b)); -set sql_log_bin=0; -insert into t1 values(null,100); -replace into t1 values(null,50),(null,100),(null,150); -select * from t1 order by n; -n b -2 50 -3 100 -4 150 -truncate table t1; -set sql_log_bin=1; -insert into t1 values(null,100); -select * from t1 order by n; -n b -1 100 -insert into t1 values(null,200),(null,300); -delete from t1 where b <> 100; -select * from t1 order by n; -n b -1 100 -replace into t1 values(null,100),(null,350); -select * from t1 order by n; -n b -2 100 -3 350 -select * from t1 order by n; -n b -2 100 -3 350 -insert into t1 values (NULL,400),(3,500),(NULL,600) on duplicate key UPDATE n=1000; -select * from t1 order by n; -n b -2 100 -4 400 -1000 350 -1001 600 -select * from t1 order by n; -n b -2 100 -4 400 -1000 350 -1001 600 -drop table t1; -create table t1 (n int primary key auto_increment not null, -b int, unique(b)); -insert into t1 values(null,100); -select * from t1 order by n; -n b -1 100 -insert into t1 values(null,200),(null,300); -delete from t1 where b <> 100; -select * from t1 order by n; -n b -1 100 -insert into t1 values(null,100),(null,350) on duplicate key update n=2; -select * from t1 order by n; -n b -2 100 -3 350 -select * from t1 order by n; -n b -2 100 -3 350 -drop table t1; -CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, -UNIQUE(b)); -INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; -SELECT * FROM t1; -a b -1 10 -2 2 -SELECT * FROM t1; -a b -1 10 -2 2 -drop table t1; -CREATE TABLE t1 ( -id bigint(20) unsigned NOT NULL auto_increment, -field_1 int(10) unsigned NOT NULL, -field_2 varchar(255) NOT NULL, -field_3 varchar(255) NOT NULL, -PRIMARY KEY (id), -UNIQUE KEY field_1 (field_1, field_2) -); -CREATE TABLE t2 ( -field_a int(10) unsigned NOT NULL, -field_b varchar(255) NOT NULL, -field_c varchar(255) NOT NULL -); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (1, 'a', '1a'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (2, 'b', '2b'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e'); -INSERT INTO t1 (field_1, field_2, field_3) -SELECT t2.field_a, t2.field_b, t2.field_c -FROM t2 -ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c; -INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f'); -INSERT INTO t1 (field_1, field_2, field_3) -SELECT t2.field_a, t2.field_b, t2.field_c -FROM t2 -ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c; -SELECT * FROM t1; -id field_1 field_2 field_3 -1 1 a 1a -2 2 b 2b -3 3 c 3c -4 4 d 4d -5 5 e 5e -6 6 f 6f -SELECT * FROM t1; -id field_1 field_2 field_3 -1 1 a 1a -2 2 b 2b -3 3 c 3c -4 4 d 4d -5 5 e 5e -6 6 f 6f -drop table t1, t2; -DROP PROCEDURE IF EXISTS p1; -DROP TABLE IF EXISTS t1, t2; -SELECT LAST_INSERT_ID(0); -LAST_INSERT_ID(0) -0 -CREATE TABLE t1 ( -id INT NOT NULL DEFAULT 0, -last_id INT, -PRIMARY KEY (id) -); -CREATE TABLE t2 ( -id INT NOT NULL AUTO_INCREMENT, -last_id INT, -PRIMARY KEY (id) -); -CREATE PROCEDURE p1() -BEGIN -INSERT INTO t2 (last_id) VALUES (LAST_INSERT_ID()); -INSERT INTO t1 (last_id) VALUES (LAST_INSERT_ID()); -END| -CALL p1(); -SELECT * FROM t1; -id last_id -0 1 -SELECT * FROM t2; -id last_id -1 0 -SELECT * FROM t1; -id last_id -0 1 -SELECT * FROM t2; -id last_id -1 0 -DROP PROCEDURE p1; -DROP TABLE t1, t2; -DROP PROCEDURE IF EXISTS p1; -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; -DROP FUNCTION IF EXISTS f3; -DROP TABLE IF EXISTS t1, t2; -CREATE TABLE t1 ( -i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -j INT DEFAULT 0 -); -CREATE TABLE t2 (i INT); -CREATE PROCEDURE p1() -BEGIN -INSERT INTO t1 (i) VALUES (NULL); -INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); -INSERT INTO t1 (i) VALUES (NULL), (NULL); -INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); -END | -CREATE FUNCTION f1() RETURNS INT MODIFIES SQL DATA -BEGIN -INSERT INTO t1 (i) VALUES (NULL); -INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); -INSERT INTO t1 (i) VALUES (NULL), (NULL); -INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); -RETURN 0; -END | -CREATE FUNCTION f2() RETURNS INT NOT DETERMINISTIC -RETURN LAST_INSERT_ID() | -CREATE FUNCTION f3() RETURNS INT MODIFIES SQL DATA -BEGIN -INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); -RETURN 0; -END | -INSERT INTO t1 VALUES (NULL, -1); -CALL p1(); -SELECT f1(); -f1() -0 -INSERT INTO t1 VALUES (NULL, f2()), (NULL, LAST_INSERT_ID()), -(NULL, LAST_INSERT_ID()), (NULL, f2()), (NULL, f2()); -INSERT INTO t1 VALUES (NULL, f2()); -INSERT INTO t1 VALUES (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID(5)), -(NULL, @@LAST_INSERT_ID); -INSERT INTO t1 VALUES (NULL, 0), (NULL, LAST_INSERT_ID()); -UPDATE t1 SET j= -1 WHERE i IS NULL; -INSERT INTO t1 (i) VALUES (NULL); -INSERT INTO t1 (i) VALUES (NULL); -SELECT f3(); -f3() -0 -SELECT * FROM t1; -i j -1 -1 -2 0 -3 0 -4 0 -5 0 -6 0 -7 0 -8 3 -9 3 -10 3 -11 3 -12 3 -13 8 -14 13 -15 5 -16 13 -17 -1 -18 14 -19 0 -20 0 -SELECT * FROM t2; -i -2 -3 -5 -6 -19 -SELECT * FROM t1; -i j -1 -1 -2 0 -3 0 -4 0 -5 0 -6 0 -7 0 -8 3 -9 3 -10 3 -11 3 -12 3 -13 8 -14 13 -15 5 -16 13 -17 -1 -18 14 -19 0 -20 0 -SELECT * FROM t2; -i -2 -3 -5 -6 -19 -DROP PROCEDURE p1; -DROP FUNCTION f1; -DROP FUNCTION f2; -DROP FUNCTION f3; -DROP TABLE t1, t2; -# -# End of 5.0 tests -# -create table t2 ( -id int not null auto_increment, -last_id int, -primary key (id) -); -truncate table t2; -create table t1 (id tinyint primary key); -create function insid() returns int -begin -insert into t2 (last_id) values (0); -return 0; -end| -set sql_log_bin=0; -insert into t2 (id) values(1),(2),(3); -delete from t2; -set sql_log_bin=1; -select insid(); -insid() -0 -set sql_log_bin=0; -insert into t2 (id) values(5),(6),(7); -delete from t2 where id>=5; -set sql_log_bin=1; -insert into t1 select insid(); -select * from t1; -id -0 -select * from t2; -id last_id -4 0 -8 0 -select * from t1; -id -0 -select * from t2; -id last_id -4 0 -8 0 -drop table t1; -drop function insid; -truncate table t2; -create table t1 (n int primary key auto_increment not null, -b int, unique(b)); -create procedure foo() -begin -insert into t1 values(null,10); -insert ignore into t1 values(null,10); -insert ignore into t1 values(null,10); -insert into t2 values(null,3); -end| -call foo(); -select * from t1; -n b -1 10 -select * from t2; -id last_id -1 3 -select * from t1; -n b -1 10 -select * from t2; -id last_id -1 3 -drop table t1, t2; -drop procedure foo; diff --git a/mysql-test/r/rpl_insert_id_pk.result b/mysql-test/r/rpl_insert_id_pk.result deleted file mode 100644 index 79815355332..00000000000 --- a/mysql-test/r/rpl_insert_id_pk.result +++ /dev/null @@ -1,76 +0,0 @@ -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; -create table t1(a int auto_increment, primary key(a)); -create table t2(b int auto_increment, c int, primary key(b)); -insert into t1 values (1),(2),(3); -insert into t1 values (null); -insert into t2 values (null,last_insert_id()); -select * from t1 ORDER BY a; -a -1 -2 -3 -4 -select * from t2 ORDER BY b; -b c -1 4 -drop table t1; -drop table t2; -create table t1(a int auto_increment, key(a)) engine=innodb; -create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=innodb; -SET FOREIGN_KEY_CHECKS=0; -insert into t1 values (10); -insert into t1 values (null),(null),(null); -insert into t2 values (5,0); -insert into t2 values (null,last_insert_id()); -SET FOREIGN_KEY_CHECKS=1; -select * from t1; -a -10 -11 -12 -13 -select * from t2; -b c -5 0 -6 11 -drop table t2; -drop table t1; -create table t1(a int auto_increment, primary key(a)); -create table t2(b int auto_increment, c int, primary key(b)); -insert into t1 values (10); -insert into t1 values (null),(null),(null); -insert into t2 values (5,0); -insert into t2 (c) select * from t1 ORDER BY a; -select * from t2 ORDER BY b; -b c -5 0 -6 10 -7 11 -8 12 -9 13 -select * from t1 ORDER BY a; -a -10 -11 -12 -13 -select * from t2 ORDER BY b; -b c -5 0 -6 10 -7 11 -8 12 -9 13 -drop table t1; -drop table t2; -SET TIMESTAMP=1000000000; -CREATE TABLE t1 ( a INT UNIQUE ); -SET FOREIGN_KEY_CHECKS=0; -INSERT INTO t1 VALUES (1),(1); -Got one of the listed errors -drop table t1; diff --git a/mysql-test/r/rpl_insert_ignore.result b/mysql-test/r/rpl_insert_ignore.result deleted file mode 100644 index da24c86627c..00000000000 --- a/mysql-test/r/rpl_insert_ignore.result +++ /dev/null @@ -1,70 +0,0 @@ -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; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned, -unique (b) -) ENGINE=innodb; -CREATE TABLE t2 ( -a int unsigned, # to force INSERT SELECT to have a certain order -b int unsigned -) ENGINE=innodb; -INSERT INTO t1 VALUES (NULL, 1); -INSERT INTO t1 VALUES (NULL, 2); -INSERT INTO t1 VALUES (NULL, 3); -INSERT INTO t1 VALUES (NULL, 4); -INSERT INTO t2 VALUES (1, 1); -INSERT INTO t2 VALUES (2, 2); -INSERT INTO t2 VALUES (3, 5); -INSERT INTO t2 VALUES (4, 3); -INSERT INTO t2 VALUES (5, 4); -INSERT INTO t2 VALUES (6, 6); -INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -drop table t1; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned, -unique (b) -) ENGINE=myisam; -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (2, 2); -INSERT INTO t1 VALUES (3, 3); -INSERT INTO t1 VALUES (4, 4); -INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -drop table t1, t2; diff --git a/mysql-test/r/rpl_insert_select.result b/mysql-test/r/rpl_insert_select.result deleted file mode 100644 index 1aff39e0026..00000000000 --- a/mysql-test/r/rpl_insert_select.result +++ /dev/null @@ -1,17 +0,0 @@ -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; -create table t1 (n int not null primary key); -insert into t1 values (1); -create table t2 (n int); -insert into t2 values (1); -insert ignore into t1 select * from t2; -insert into t1 values (2); -select * from t1; -n -1 -2 -drop table t1,t2; diff --git a/mysql-test/r/rpl_known_bugs_detection.result b/mysql-test/r/rpl_known_bugs_detection.result deleted file mode 100644 index 318bc3d63e7..00000000000 --- a/mysql-test/r/rpl_known_bugs_detection.result +++ /dev/null @@ -1,135 +0,0 @@ -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; -CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, -UNIQUE(b)); -INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; -SELECT * FROM t1; -a b -1 10 -2 2 -show slave status;; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port # -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1105 -Last_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10' -Skip_Counter 0 -Exec_Master_Log_Pos 246 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SELECT * FROM t1; -a b -stop slave; -reset slave; -reset master; -drop table t1; -start slave; -CREATE TABLE t1 ( -id bigint(20) unsigned NOT NULL auto_increment, -field_1 int(10) unsigned NOT NULL, -field_2 varchar(255) NOT NULL, -field_3 varchar(255) NOT NULL, -PRIMARY KEY (id), -UNIQUE KEY field_1 (field_1, field_2) -); -CREATE TABLE t2 ( -field_a int(10) unsigned NOT NULL, -field_b varchar(255) NOT NULL, -field_c varchar(255) NOT NULL -); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (1, 'a', '1a'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (2, 'b', '2b'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e'); -INSERT INTO t1 (field_1, field_2, field_3) -SELECT t2.field_a, t2.field_b, t2.field_c -FROM t2 -ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c; -INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f'); -INSERT INTO t1 (field_1, field_2, field_3) -SELECT t2.field_a, t2.field_b, t2.field_c -FROM t2 -ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c; -SELECT * FROM t1; -id field_1 field_2 field_3 -1 1 a 1a -2 2 b 2b -3 3 c 3c -4 4 d 4d -5 5 e 5e -6 6 f 6f -show slave status;; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port # -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1105 -Last_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3) -SELECT t2.field_a, t2.field_b, t2.field_c -FROM t2 -ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c' -Skip_Counter 0 -Exec_Master_Log_Pos 1278 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SELECT * FROM t1; -id field_1 field_2 field_3 -drop table t1, t2; -drop table t1, t2; diff --git a/mysql-test/r/rpl_load_from_master.result b/mysql-test/r/rpl_load_from_master.result deleted file mode 100644 index 08b45ec1db0..00000000000 --- a/mysql-test/r/rpl_load_from_master.result +++ /dev/null @@ -1,139 +0,0 @@ -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; -drop database if exists mysqltest; -drop database if exists mysqltest2; -drop database if exists mysqltest3; -drop database if exists mysqltest; -drop database if exists mysqltest2; -drop database if exists mysqltest3; -create database mysqltest2; -create database mysqltest; -create database mysqltest2; -create table mysqltest2.foo (n int)ENGINE=MyISAM; -insert into mysqltest2.foo values(4); -create table mysqltest2.foo (n int)ENGINE=MyISAM; -insert into mysqltest2.foo values(5); -create table mysqltest.bar (m int)ENGINE=MyISAM; -insert into mysqltest.bar values(15); -select mysqltest2.foo.n,mysqltest.bar.m from mysqltest2.foo,mysqltest.bar; -n m -4 15 -drop database mysqltest; -drop database if exists mysqltest2; -drop database mysqltest; -ERROR HY000: Can't drop database 'mysqltest'; database doesn't exist -drop database mysqltest2; -set sql_log_bin = 0; -create database mysqltest2; -create database mysqltest; -show databases; -Database -information_schema -mysql -mysqltest -mysqltest2 -test -create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; -create table mysqltest2.t2(n int, s text)ENGINE=MyISAM; -insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three'); -insert into mysqltest2.t2 values (11, 'eleven'), (12, 'twelve'), (13, 'thirteen'); -create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; -create table mysqltest.t2(n int, s text)ENGINE=MyISAM; -insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three test'); -insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'), -(13, 'thirteen test'); -set sql_log_bin = 1; -show databases; -Database -information_schema -mysql -test -create database mysqltest2; -create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest2.t1 values (1, 'original foo.t1'); -create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest2.t3 values (1, 'original foo.t3'); -create database mysqltest3; -create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest3.t1 values (1, 'original foo2.t1'); -create database mysqltest; -create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest.t1 values (1, 'original bar.t1'); -create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest.t3 values (1, 'original bar.t3'); -load data from master; -show databases; -Database -information_schema -mysql -mysqltest -mysqltest2 -mysqltest3 -test -use mysqltest2; -show tables; -Tables_in_mysqltest2 -t1 -t3 -select * from t1; -n s -1 original foo.t1 -use mysqltest3; -show tables; -Tables_in_mysqltest3 -t1 -select * from t1; -n s -1 original foo2.t1 -use mysqltest; -show tables; -Tables_in_mysqltest -t1 -t2 -t3 -select * from mysqltest.t1; -n s -1 one test -2 two test -3 three test -select * from mysqltest.t2; -n s -11 eleven test -12 twelve test -13 thirteen test -select * from mysqltest.t3; -n s -1 original bar.t3 -insert into mysqltest.t1 values (4, 'four test'); -select * from mysqltest.t1; -n s -1 one test -2 two test -3 three test -4 four test -stop slave; -reset slave; -load data from master; -start slave; -insert into mysqltest.t1 values (5, 'five bar'); -select * from mysqltest.t1; -n s -1 one test -2 two test -3 three test -4 four test -5 five bar -load table mysqltest.t1 from master; -ERROR 42S01: Table 't1' already exists -drop table mysqltest.t1; -load table mysqltest.t1 from master; -load table bar.t1 from master; -ERROR HY000: Error from master: 'Table 'bar.t1' doesn't exist' -drop database mysqltest; -drop database mysqltest2; -drop database mysqltest2; -drop database mysqltest3; diff --git a/mysql-test/r/rpl_load_table_from_master.result b/mysql-test/r/rpl_load_table_from_master.result deleted file mode 100644 index c24f857d829..00000000000 --- a/mysql-test/r/rpl_load_table_from_master.result +++ /dev/null @@ -1,51 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -"******************** Test Requirment 1 *************" -SET SQL_LOG_BIN=0,timestamp=200006; -CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM; -INSERT INTO t1 ( a) VALUE ('F'); -select unix_timestamp(t) from t1; -unix_timestamp(t) -200006 -load table t1 from master; -select unix_timestamp(t) from t1; -unix_timestamp(t) -200006 -set SQL_LOG_BIN=1,timestamp=default; -drop table t1; -set SQL_LOG_BIN=0; -"******************** Test Requirment 2 *************" -CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; -INSERT INTO t1 VALUES (1); -load table t1 from master; -check table t1; -Table Op Msg_type Msg_text -test.t1 check status OK -drop table t1; -drop table t1; -set SQL_LOG_BIN=0; -create table t1 (word char(20) not null, index(word))ENGINE=MyISAM; -load data infile '../std_data_ln/words.dat' into table t1; -create table t2 (word char(20) not null)ENGINE=MyISAM; -load data infile '../std_data_ln/words.dat' into table t2; -create table t3 (word char(20) not null primary key)ENGINE=MyISAM; -load table t1 from master; -load table t2 from master; -load table t3 from master; -check table t1; -Table Op Msg_type Msg_text -test.t1 check status OK -select count(*) from t2; -count(*) -70 -select count(*) from t3; -count(*) -0 -set SQL_LOG_BIN=1; -drop table if exists t1,t2,t3; -create table t1(n int); -drop table t1; diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result deleted file mode 100644 index 680796a4be6..00000000000 --- a/mysql-test/r/rpl_loaddata.result +++ /dev/null @@ -1,92 +0,0 @@ -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; -reset master; -select last_insert_id(); -last_insert_id() -0 -create table t1(a int not null auto_increment, b int, primary key(a) ); -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -select last_insert_id(); -last_insert_id() -1 -create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60)); -load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; -create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60)); -insert into t3 select * from t2; -select * from t1; -a b -1 10 -2 15 -select * from t3; -day id category name -2003-02-22 2461 b a a a @ %  ' " a -2003-03-22 2161 c asdf -2003-03-22 2416 a bbbbb -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -slave-bin.000001 1280 -drop table t1; -drop table t2; -drop table t3; -create table t1(a int, b int, unique(b)); -insert into t1 values(1,10); -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -set global sql_slave_skip_counter=1; -start slave; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1797 # # master-bin.000001 Yes Yes # 0 0 1797 # None 0 No # No -set sql_log_bin=0; -delete from t1; -set sql_log_bin=1; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -stop slave; -change master to master_user='test'; -change master to master_user='root'; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1832 # # master-bin.000001 No No # 0 0 1832 # None 0 No # No -set global sql_slave_skip_counter=1; -start slave; -set sql_log_bin=0; -delete from t1; -set sql_log_bin=1; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -stop slave; -reset slave; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No -reset master; -create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), -unique(day)) engine=MyISAM; -load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields -terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by -'\n##\n' starting by '>' ignore 1 lines; -ERROR 23000: Duplicate entry '2003-03-22' for key 'day' -select * from t2; -day id category name -2003-02-22 2461 b a a a @ %  ' " a -2003-03-22 2161 c asdf -start slave; -select * from t2; -day id category name -2003-02-22 2461 b a a a @ %  ' " a -2003-03-22 2161 c asdf -alter table t2 drop key day; -delete from t2; -load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields -terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by -'\n##\n' starting by '>' ignore 1 lines; -ERROR 23000: Duplicate entry '2003-03-22' for key 'day' -drop table t2; -drop table t2; -drop table t1; -CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; -LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1; -ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_loaddata_charset.result b/mysql-test/r/rpl_loaddata_charset.result deleted file mode 100644 index 929d06e74cf..00000000000 --- a/mysql-test/r/rpl_loaddata_charset.result +++ /dev/null @@ -1,37 +0,0 @@ -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; -create table t1 (a varchar(10) character set utf8); -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=koi8r; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=DEFAULT; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=koi8r; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=DEFAULT; -load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8r; -select hex(a) from t1; -hex(a) -C3BF -D0AA -C3BF -C3BF -C3BF -D0AA -D0AA -select hex(a) from t1; -hex(a) -C3BF -D0AA -C3BF -C3BF -C3BF -D0AA -D0AA -drop table t1; diff --git a/mysql-test/r/rpl_loaddata_m.result b/mysql-test/r/rpl_loaddata_m.result deleted file mode 100644 index 9dbae6d38c4..00000000000 --- a/mysql-test/r/rpl_loaddata_m.result +++ /dev/null @@ -1,38 +0,0 @@ -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; -drop database if exists mysqltest; -USE test; -CREATE TABLE t1(a INT, b INT, UNIQUE(b)); -LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE test.t1; -SELECT COUNT(*) FROM test.t1; -COUNT(*) -2 -CREATE DATABASE mysqltest; -USE mysqltest; -CREATE TABLE t1(a INT, b INT, UNIQUE(b)); -LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE mysqltest.t1; -SELECT COUNT(*) FROM mysqltest.t1; -COUNT(*) -2 -SHOW DATABASES; -Database -information_schema -mysql -mysqltest -test -USE test; -SHOW TABLES; -Tables_in_test -USE mysqltest; -SHOW TABLES; -Tables_in_mysqltest -t1 -SELECT COUNT(*) FROM mysqltest.t1; -COUNT(*) -2 -DROP DATABASE mysqltest; -DROP TABLE test.t1; diff --git a/mysql-test/r/rpl_loaddata_s.result b/mysql-test/r/rpl_loaddata_s.result deleted file mode 100644 index 4fc33eee20d..00000000000 --- a/mysql-test/r/rpl_loaddata_s.result +++ /dev/null @@ -1,15 +0,0 @@ -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; -reset master; -create table test.t1(a int, b int, unique(b)); -load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1; -select count(*) from test.t1; -count(*) -2 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -drop table test.t1; diff --git a/mysql-test/r/rpl_loaddata_simple.result b/mysql-test/r/rpl_loaddata_simple.result deleted file mode 100644 index 196093211b6..00000000000 --- a/mysql-test/r/rpl_loaddata_simple.result +++ /dev/null @@ -1,153 +0,0 @@ -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; -CREATE TABLE t1 (word CHAR(20) NOT NULL); -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; -SELECT * FROM t1 ORDER BY word; -word -Aarhus -Aarhus -Aaron -Aaron -Ababa -Ababa -aback -aback -abaft -abaft -abandon -abandon -abandoned -abandoned -abandoning -abandoning -abandonment -abandonment -abandons -abandons -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration -SELECT * FROM t1 ORDER BY word; -word -Aarhus -Aarhus -Aaron -Aaron -Ababa -Ababa -aback -aback -abaft -abaft -abandon -abandon -abandoned -abandoned -abandoning -abandoning -abandonment -abandonment -abandons -abandons -abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration -drop table t1; diff --git a/mysql-test/r/rpl_loaddatalocal.result b/mysql-test/r/rpl_loaddatalocal.result deleted file mode 100644 index bb1b0610aa8..00000000000 --- a/mysql-test/r/rpl_loaddatalocal.result +++ /dev/null @@ -1,31 +0,0 @@ -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; -create table t1(a int); -select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; -truncate table t1; -load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; -select a,count(*) from t1 group by a; -a count(*) -1 10000 -drop table t1; -create table t1(a int); -insert into t1 values (1), (2), (2), (3); -select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key); -load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; -SELECT * FROM t1 ORDER BY a; -a -1 -2 -3 -SELECT * FROM t1 ORDER BY a; -a -1 -2 -3 -drop table t1; diff --git a/mysql-test/r/rpl_loadfile.result b/mysql-test/r/rpl_loadfile.result deleted file mode 100644 index 7487693a9f7..00000000000 --- a/mysql-test/r/rpl_loadfile.result +++ /dev/null @@ -1,227 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES(1,'test'); -UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=1; -create procedure test.p1() -begin -INSERT INTO test.t1 VALUES(2,'test'); -UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=2; -end| -CALL test.p1(); -SELECT * FROM test.t1 ORDER BY blob_column; -a blob_column -1 abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration - -2 abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration - -SELECT * FROM test.t1 ORDER BY blob_column; -a blob_column -1 abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration - -2 abase -abased -abasement -abasements -abases -abash -abashed -abashes -abashing -abasing -abate -abated -abatement -abatements -abater -abates -abating -Abba -abbe -abbey -abbeys -abbot -abbots -Abbott -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -Abby -abdomen -abdomens -abdominal -abduct -abducted -abduction -abductions -abductor -abductors -abducts -Abe -abed -Abel -Abelian -Abelson -Aberdeen -Abernathy -aberrant -aberration - -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE test.t1; diff --git a/mysql-test/r/rpl_locale.result b/mysql-test/r/rpl_locale.result deleted file mode 100644 index b7396084663..00000000000 --- a/mysql-test/r/rpl_locale.result +++ /dev/null @@ -1,20 +0,0 @@ -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; -create table t1 (s1 char(10)); -set lc_time_names= 'de_DE'; -insert into t1 values (date_format('2001-01-01','%W')); -set lc_time_names= 'en_US'; -insert into t1 values (date_format('2001-01-01','%W')); -select * from t1; -s1 -Montag -Monday -select * from t1; -s1 -Montag -Monday -drop table t1; diff --git a/mysql-test/r/rpl_log_pos.result b/mysql-test/r/rpl_log_pos.result deleted file mode 100644 index 7543814578a..00000000000 --- a/mysql-test/r/rpl_log_pos.result +++ /dev/null @@ -1,99 +0,0 @@ -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; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 106 -stop slave; -change master to master_log_pos=75; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 75 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running No -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 75 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -start slave; -stop slave; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 75 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running No -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 75 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 106 -create table if not exists t1 (n int); -drop table if exists t1; -create table t1 (n int); -insert into t1 values (1),(2),(3); -change master to master_log_pos=106; -start slave; -select * from t1 ORDER BY n; -n -1 -2 -3 -drop table t1; -End of 5.0 tests diff --git a/mysql-test/r/rpl_many_optimize.result b/mysql-test/r/rpl_many_optimize.result deleted file mode 100644 index b2148892591..00000000000 --- a/mysql-test/r/rpl_many_optimize.result +++ /dev/null @@ -1,9 +0,0 @@ -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; -create table t1 (a int not null auto_increment primary key, b int, key(b)); -INSERT INTO t1 (a) VALUES (1),(2); -drop table t1; diff --git a/mysql-test/r/rpl_master_pos_wait.result b/mysql-test/r/rpl_master_pos_wait.result deleted file mode 100644 index 951e944fddc..00000000000 --- a/mysql-test/r/rpl_master_pos_wait.result +++ /dev/null @@ -1,18 +0,0 @@ -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; -select master_pos_wait('master-bin.999999',0,2); -master_pos_wait('master-bin.999999',0,2) --1 -explain extended select master_pos_wait('master-bin.999999',0,2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used -Warnings: -Note 1003 select master_pos_wait(_latin1'master-bin.999999',0,2) AS `master_pos_wait('master-bin.999999',0,2)` -select master_pos_wait('master-bin.999999',0); -stop slave sql_thread; -master_pos_wait('master-bin.999999',0) -NULL diff --git a/mysql-test/r/rpl_misc_functions.result b/mysql-test/r/rpl_misc_functions.result deleted file mode 100644 index 526414cec9c..00000000000 --- a/mysql-test/r/rpl_misc_functions.result +++ /dev/null @@ -1,46 +0,0 @@ -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; -create table t1(id int, i int, r1 int, r2 int, p varchar(100)); -insert into t1 values(1, connection_id(), 0, 0, ""); -insert into t1 values(2, 0, rand()*1000, rand()*1000, ""); -set sql_log_bin=0; -insert into t1 values(6, 0, rand(), rand(), ""); -delete from t1 where id=6; -set sql_log_bin=1; -insert into t1 values(3, 0, 0, 0, password('does_this_work?')); -insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?')); -select * into outfile 'rpl_misc_functions.outfile' from t1; -create table t2 like t1; -load data local infile 'MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2; -select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); -id i r1 r2 p id i r1 r2 p -drop table t1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (col_a double default NULL); -CREATE PROCEDURE test_replication_sp1() -BEGIN -INSERT INTO t1 VALUES (rand()), (rand()); -INSERT INTO t1 VALUES (rand()); -END| -CREATE PROCEDURE test_replication_sp2() -BEGIN -CALL test_replication_sp1(); -CALL test_replication_sp1(); -END| -CREATE FUNCTION test_replication_sf() RETURNS DOUBLE DETERMINISTIC -BEGIN -RETURN (rand() + rand()); -END| -CALL test_replication_sp1(); -CALL test_replication_sp2(); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); -DROP PROCEDURE IF EXISTS test_replication_sp1; -DROP PROCEDURE IF EXISTS test_replication_sp2; -DROP FUNCTION IF EXISTS test_replication_sf; -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_mixed_ddl_dml.result b/mysql-test/r/rpl_mixed_ddl_dml.result deleted file mode 100644 index 38972a4f571..00000000000 --- a/mysql-test/r/rpl_mixed_ddl_dml.result +++ /dev/null @@ -1,46 +0,0 @@ -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; -create table t1 (n int auto_increment primary key); -set insert_id = 2000; -insert into t1 values (NULL),(NULL),(NULL); -select * from t1; -n -2000 -2001 -2002 -show slave hosts; -Server_id Host Port Rpl_recovery_rank Master_id -2 127.0.0.1 9999 2 1 -drop table t1; -stop slave; -create table t2(id int auto_increment primary key, created datetime); -set timestamp=12345; -insert into t2 set created=now(); -select * from t2; -id created -1 1970-01-01 06:25:45 -create table t3 like t2; -create temporary table t4 like t2; -create table t5 select * from t4; -start slave; -select * from t2; -id created -1 1970-01-01 06:25:45 -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `created` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -show create table t5; -Table Create Table -t5 CREATE TABLE `t5` ( - `id` int(11) NOT NULL DEFAULT '0', - `created` datetime DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t2,t3,t5; diff --git a/mysql-test/r/rpl_multi_delete.result b/mysql-test/r/rpl_multi_delete.result deleted file mode 100644 index 4831502eb88..00000000000 --- a/mysql-test/r/rpl_multi_delete.result +++ /dev/null @@ -1,22 +0,0 @@ -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; -create table t1 (a int primary key); -create table t2 (a int); -insert into t1 values (1); -insert into t2 values (1); -delete t1.* from t1, t2 where t1.a = t2.a; -select * from t1; -a -select * from t2; -a -1 -select * from t1; -a -select * from t2; -a -1 -drop table t1,t2; diff --git a/mysql-test/r/rpl_multi_delete2.result b/mysql-test/r/rpl_multi_delete2.result deleted file mode 100644 index 87abe60b268..00000000000 --- a/mysql-test/r/rpl_multi_delete2.result +++ /dev/null @@ -1,44 +0,0 @@ -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 sql_log_bin=0; -create database mysqltest_from; -set sql_log_bin=1; -create database mysqltest_to; -use mysqltest_from; -drop table if exists a; -CREATE TABLE a (i INT); -INSERT INTO a VALUES(1); -DELETE alias FROM a alias WHERE alias.i=1; -SELECT * FROM a; -i -insert into a values(2),(3); -delete a alias FROM a alias where alias.i=2; -select * from a; -i -3 -use mysqltest_to; -select * from a; -i -3 -create table t1 (a int primary key); -create table t2 (a int); -insert into t1 values (1); -insert into t2 values (1); -delete t1.* from t1, t2 where t1.a = t2.a; -select * from t1; -a -select * from t2; -a -1 -select * from t1; -ERROR 42S02: Table 'mysqltest_to.t1' doesn't exist -select * from t2; -ERROR 42S02: Table 'mysqltest_to.t2' doesn't exist -set sql_log_bin=0; -drop database mysqltest_from; -set sql_log_bin=1; -drop database mysqltest_to; diff --git a/mysql-test/r/rpl_multi_engine.result b/mysql-test/r/rpl_multi_engine.result deleted file mode 100644 index 7cb7d873415..00000000000 --- a/mysql-test/r/rpl_multi_engine.result +++ /dev/null @@ -1,366 +0,0 @@ -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; -create database if not exists mysqltest1; -use mysqltest1; -drop table if exists t1; -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc -VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT -0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); -use mysqltest1; -alter table t1 engine=myisam; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -alter table t1 engine=myisam; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -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,"2005-11-14"); -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -DELETE FROM mysqltest1.t1 WHERE id = 42; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -alter table t1 engine=innodb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -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,"2005-11-14"); -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -DELETE FROM mysqltest1.t1 WHERE id = 42; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -alter table t1 engine=memory; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -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,"2005-11-14"); -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -DELETE FROM mysqltest1.t1 WHERE id = 42; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -alter table t1 engine=memory; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -alter table t1 engine=myisam; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -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,"2005-11-14"); -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -DELETE FROM mysqltest1.t1 WHERE id = 42; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -alter table t1 engine=innodb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -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,"2005-11-14"); -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -DELETE FROM mysqltest1.t1 WHERE id = 42; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -alter table t1 engine=memory; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -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,"2005-11-14"); -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -DELETE FROM mysqltest1.t1 WHERE id = 42; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -alter table t1 engine=innodb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -alter table t1 engine=myisam; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -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,"2005-11-14"); -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -DELETE FROM mysqltest1.t1 WHERE id = 42; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -alter table t1 engine=innodb; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -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,"2005-11-14"); -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -DELETE FROM mysqltest1.t1 WHERE id = 42; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -alter table t1 engine=memory; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -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,"2005-11-14"); -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 -UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 -DELETE FROM mysqltest1.t1 WHERE id = 42; -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -DROP TABLE t1; -DROP DATABASE mysqltest1; diff --git a/mysql-test/r/rpl_multi_update.result b/mysql-test/r/rpl_multi_update.result deleted file mode 100644 index 524278be042..00000000000 --- a/mysql-test/r/rpl_multi_update.result +++ /dev/null @@ -1,27 +0,0 @@ -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; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=MyISAM; -CREATE TABLE t2 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=MyISAM; -INSERT INTO t1 VALUES (NULL, 0); -INSERT INTO t1 SELECT NULL, 0 FROM t1; -INSERT INTO t2 VALUES (NULL, 0), (NULL,1); -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a; -drop table t1, t2; diff --git a/mysql-test/r/rpl_multi_update2.result b/mysql-test/r/rpl_multi_update2.result deleted file mode 100644 index 5bb262764fa..00000000000 --- a/mysql-test/r/rpl_multi_update2.result +++ /dev/null @@ -1,55 +0,0 @@ -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; -drop table if exists t1,t2; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=MyISAM; -CREATE TABLE t2 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=MyISAM; -INSERT INTO t1 VALUES (NULL, 0); -INSERT INTO t1 SELECT NULL, 0 FROM t1; -INSERT INTO t2 VALUES (NULL, 0), (NULL,1); -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 4 -2 5 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -SELECT * FROM t1 ORDER BY a; -a b -1 4 -2 5 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -drop table t1,t2; -reset master; -CREATE TABLE t1 ( a INT ); -INSERT INTO t1 VALUES (0); -UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b; -select * from t1; -a -3 -select * from t1; -a -3 -drop table t1; diff --git a/mysql-test/r/rpl_multi_update3.result b/mysql-test/r/rpl_multi_update3.result deleted file mode 100644 index dba7f770ba2..00000000000 --- a/mysql-test/r/rpl_multi_update3.result +++ /dev/null @@ -1,197 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - --------- Test for BUG#9361 -------- -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=MyISAM; -CREATE TABLE t2 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=MyISAM; -INSERT INTO t1 VALUES (NULL, 0); -INSERT INTO t1 SELECT NULL, 0 FROM t1; -INSERT INTO t2 VALUES (NULL, 0), (NULL,1); -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -UPDATE t2, (SELECT a FROM t1 ORDER BY a) AS t SET t2.b = t.a+5 ; -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 6 -2 6 -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 6 -2 6 -drop table t1,t2; - --------- Test 1 for BUG#9361 -------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -CREATE TABLE t1 ( -a1 char(30), -a2 int, -a3 int, -a4 char(30), -a5 char(30) -); -CREATE TABLE t2 ( -b1 int, -b2 char(30) -); -INSERT INTO t1 VALUES ('Yes', 1, NULL, 'foo', 'bar'); -INSERT INTO t2 VALUES (1, 'baz'); -UPDATE t1 a, t2 -SET a.a1 = 'No' -WHERE a.a2 = -(SELECT b1 -FROM t2 -WHERE b2 = 'baz') -AND a.a3 IS NULL -AND a.a4 = 'foo' -AND a.a5 = 'bar'; -SELECT * FROM t1; -a1 a2 a3 a4 a5 -No 1 NULL foo bar -SELECT * FROM t2; -b1 b2 -1 baz -DROP TABLE t1, t2; - --------- Test 2 for BUG#9361 -------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; -CREATE TABLE t1 ( -i INT, -j INT, -x INT, -y INT, -z INT -); -CREATE TABLE t2 ( -i INT, -k INT, -x INT, -y INT, -z INT -); -CREATE TABLE t3 ( -j INT, -k INT, -x INT, -y INT, -z INT -); -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); -UPDATE t1 AS a -INNER JOIN t2 AS b -ON a.i = b.i -INNER JOIN t3 AS c -ON a.j = c.j AND b.k = c.k -SET a.x = b.x, -a.y = b.y, -a.z = ( -SELECT sum(z) -FROM t3 -WHERE y = 34 -) -WHERE b.x = 23; -SELECT * FROM t1; -i j x y z -1 2 23 24 71 -DROP TABLE t1, t2, t3; -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 't1' -DROP TABLE IF EXISTS t2; -Warnings: -Note 1051 Unknown table 't2' -CREATE TABLE t1 ( -idp int(11) NOT NULL default '0', -idpro int(11) default NULL, -price decimal(19,4) default NULL, -PRIMARY KEY (idp) -); -CREATE TABLE t2 ( -idpro int(11) NOT NULL default '0', -price decimal(19,4) default NULL, -nbprice int(11) default NULL, -PRIMARY KEY (idpro) -); -INSERT INTO t1 VALUES -(1,1,'3.0000'), -(2,2,'1.0000'), -(3,1,'1.0000'), -(4,1,'4.0000'), -(5,3,'2.0000'), -(6,2,'4.0000'); -INSERT INTO t2 VALUES -(1,'0.0000',0), -(2,'0.0000',0), -(3,'0.0000',0); -update -t2 -join -( select idpro, min(price) as min_price, count(*) as nbr_price -from t1 -where idpro>0 and price>0 -group by idpro -) as table_price -on t2.idpro = table_price.idpro -set t2.price = table_price.min_price, -t2.nbprice = table_price.nbr_price; -select "-- MASTER AFTER JOIN --" as ""; - --- MASTER AFTER JOIN -- -select * from t1; -idp idpro price -1 1 3.0000 -2 2 1.0000 -3 1 1.0000 -4 1 4.0000 -5 3 2.0000 -6 2 4.0000 -select * from t2; -idpro price nbprice -1 1.0000 3 -2 1.0000 2 -3 2.0000 1 -select "-- SLAVE AFTER JOIN --" as ""; - --- SLAVE AFTER JOIN -- -select * from t1; -idp idpro price -1 1 3.0000 -2 2 1.0000 -3 1 1.0000 -4 1 4.0000 -5 3 2.0000 -6 2 4.0000 -select * from t2; -idpro price nbprice -1 1.0000 3 -2 1.0000 2 -3 2.0000 1 -DROP TABLE t1, t2; diff --git a/mysql-test/r/rpl_multi_update4.result b/mysql-test/r/rpl_multi_update4.result deleted file mode 100644 index f6dde65a35d..00000000000 --- a/mysql-test/r/rpl_multi_update4.result +++ /dev/null @@ -1,25 +0,0 @@ -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; -drop database if exists d1; -drop database if exists d2; -drop database if exists d2; -create database d1; -create table d1.t0 (id int); -create database d2; -use d2; -create table t1 (id int); -create table t2 (id int); -insert into t1 values (1), (2), (3), (4), (5); -insert into t2 select id + 3 from t1; -update t1 join t2 using (id) set t1.id = 0; -insert into d1.t0 values (0); -use d1; -select * from t0 where id=0; -id -0 -drop database d1; -drop database d2; diff --git a/mysql-test/r/rpl_ndb_2innodb.result b/mysql-test/r/rpl_ndb_2innodb.result deleted file mode 100644 index f8ec4624062..00000000000 --- a/mysql-test/r/rpl_ndb_2innodb.result +++ /dev/null @@ -1,855 +0,0 @@ -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; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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` bit(8) 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 PARTITION BY KEY () ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- 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` bit(8) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () ---- 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` bit(8) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, PARTITION p2 VALUES IN (412) ENGINE = InnoDB) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, PARTITION p2 VALUES IN (412) ENGINE = InnoDB) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 PARTITION BY KEY () PARTITIONS 4 ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 PARTITION BY KEY () PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- 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` bit(8) 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 NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- 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` bit(8) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- 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` bit(8) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_ndb_2myisam.result b/mysql-test/r/rpl_ndb_2myisam.result deleted file mode 100644 index 8611d83f3f3..00000000000 --- a/mysql-test/r/rpl_ndb_2myisam.result +++ /dev/null @@ -1,855 +0,0 @@ -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; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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` bit(8) 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` bit(8) 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 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- 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` bit(8) 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, - PRIMARY KEY (`id`,`total`) -) 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` bit(8) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 ---- 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` bit(8) DEFAULT NULL, - `vc` text, - `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 NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 PARTITION BY KEY () PARTITIONS 4 ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 PARTITION BY KEY () PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- 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` bit(8) 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 NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- 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` bit(8) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- 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` bit(8) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_ndb_UUID.result b/mysql-test/r/rpl_ndb_UUID.result deleted file mode 100644 index 422379d4f55..00000000000 --- a/mysql-test/r/rpl_ndb_UUID.result +++ /dev/null @@ -1,40 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=NDB; -INSERT INTO test.t1 VALUES(1,UUID(),UUID()); -create procedure test.p1() -begin -INSERT INTO test.t1 VALUES(2,UUID(),UUID()); -INSERT INTO test.t1 VALUES(3,UUID(),UUID()); -end| -CALL test.p1(); -create function test.fn1(x int) -returns int -begin -insert into t1 values (4+x,UUID(),UUID()); -insert into t1 values (5+x,UUID(),UUID()); -return 0; -end| -select fn1(0); -fn1(0) -0 -create table t2 (a int); -insert into t2 values(fn1(2)); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL DEFAULT '0', - `blob_column` longblob, - `vchar_column` varchar(100) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 -DROP PROCEDURE test.p1; -DROP FUNCTION test.fn1; -DROP TABLE test.t1; -DROP TABLE test.t2; diff --git a/mysql-test/r/rpl_ndb_auto_inc.result b/mysql-test/r/rpl_ndb_auto_inc.result deleted file mode 100644 index dd4cc90a75f..00000000000 --- a/mysql-test/r/rpl_ndb_auto_inc.result +++ /dev/null @@ -1,170 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -***************** Test 1 ************************ - -CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; -insert into t1 values (NULL,1),(NULL,2),(NULL,3); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a b -3 1 -4 2 -5 3 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a b -3 1 -4 2 -5 3 -drop table t1; -create table t1 (a int not null auto_increment,b int, primary key (a)) engine=NDB; -insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); -delete from t1 where b=4; -insert into t1 values (NULL,5),(NULL,6); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -5 5 -6 6 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -5 5 -6 6 -drop table t1; -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -insert into t1 values (NULL),(5),(NULL); -insert into t1 values (250),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -250 -251 -insert into t1 values (1000); -set @@insert_id=400; -insert into t1 values(NULL),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -250 -251 -400 -401 -1000 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -250 -251 -400 -401 -1000 -drop table t1; -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -insert into t1 values (NULL),(5),(NULL),(NULL); -insert into t1 values (500),(NULL),(502),(NULL),(600); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -7 -500 -501 -502 -503 -600 -set @@insert_id=600; -insert into t1 values(600),(NULL),(NULL); -ERROR 23000: Can't write; duplicate key in table 't1' -set @@insert_id=600; -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -7 -500 -501 -502 -503 -600 -610 -611 -******* Select from Slave ************* - -select * from t1 ORDER BY a; -a -1 -5 -6 -7 -500 -501 -502 -503 -600 -610 -611 -drop table t1; -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -insert into t1 values(2),(12),(22),(32),(42); -insert into t1 values (NULL),(NULL); -insert into t1 values (3),(NULL),(NULL); -******* Select from Master ************* - -select * from t1 ORDER BY a; -a -1 -2 -3 -4 -5 -******* Select from Slave ************* - -** Slave should have 2, 12, 22, 32, 42 ** -** Master will have 2 but not 12, 22, 32, 42 ** - -select * from t1 ORDER BY a; -a -1 -2 -3 -4 -5 -12 -22 -32 -42 -drop table t1; diff --git a/mysql-test/r/rpl_ndb_bank.result b/mysql-test/r/rpl_ndb_bank.result deleted file mode 100644 index 06c005427d1..00000000000 --- a/mysql-test/r/rpl_ndb_bank.result +++ /dev/null @@ -1,120 +0,0 @@ -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; -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; -USE BANK; -CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, -ACCOUNT_TYPE INT UNSIGNED NOT NULL, -BALANCE INT UNSIGNED NOT NULL, -DEPOSIT_COUNT INT UNSIGNED NOT NULL, -DEPOSIT_SUM INT UNSIGNED NOT NULL, -WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, -WITHDRAWAL_SUM INT UNSIGNED NOT NULL, -PURGED INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) -ENGINE = NDB; -CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, -OWNER INT UNSIGNED NOT NULL, -BALANCE INT UNSIGNED NOT NULL, -ACCOUNT_TYPE INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (ACCOUNT_ID)) -ENGINE = NDB; -CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, -ACCOUNT INT UNSIGNED NOT NULL, -ACCOUNT_TYPE INT UNSIGNED NOT NULL, -OTHER_ACCOUNT INT UNSIGNED NOT NULL, -TRANSACTION_TYPE INT UNSIGNED NOT NULL, -TIME BIGINT UNSIGNED NOT NULL, -AMOUNT INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) -ENGINE = NDB; -CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, -VALUE BIGINT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) -ENGINE = NDB; -CREATE TABLE ACCOUNT_TYPE ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, -DESCRIPTION CHAR(64) NOT NULL, -PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) -ENGINE = NDB; -STOP SLAVE; -RESET SLAVE; -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -CREATE DATABASE BANK; -RESET MASTER; -CREATE TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM mysql.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM mysql.backup_info; -@the_backup_id:=backup_id - -SELECT @the_epoch:=MAX(epoch) FROM mysql.apply_status; -@the_epoch:=MAX(epoch) - -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.binlog_index WHERE epoch > ORDER BY epoch ASC LIMIT 1; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -CHANGE MASTER TO -master_log_file = 'master-bin.000001', -master_log_pos = ; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No -STOP SLAVE; -START SLAVE; -use test; -create table t1 (a int primary key) engine=ndb; -insert into t1 values (1); -drop table t1; diff --git a/mysql-test/r/rpl_ndb_basic.result b/mysql-test/r/rpl_ndb_basic.result deleted file mode 100644 index 37217bf0ad1..00000000000 --- a/mysql-test/r/rpl_ndb_basic.result +++ /dev/null @@ -1,227 +0,0 @@ -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; -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL, -PRIMARY KEY (`nid`)) -ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -delete from t1; -INSERT INTO t1 VALUES(1,"XYZ2","ABC2"); -select * from t1 order by nid; -nid nom prenom -1 XYZ2 ABC2 -select * from t1 order by nid; -nid nom prenom -1 XYZ2 ABC2 -delete from t1; -insert into t1 values(1,"AA", "AA"); -insert into t1 values(2,"BB", "BB"); -insert into t1 values(3,"CC", "CC"); -insert into t1 values(4,"DD", "DD"); -begin; -delete from t1 where nid = 1; -insert into t1 values (1,"A2", "A2"); -update t1 set nom="B2" where nid = 2; -delete from t1 where nid = 2; -update t1 set nom = "D2" where nid = 4; -delete from t1 where nid = 4; -insert into t1 values (4, "D3", "D3"); -update t1 set nom = "D4" where nid = 4; -insert into t1 values (5, "EE", "EE"); -delete from t1 where nid = 5; -commit; -select * from t1 order by 1; -nid nom prenom -1 A2 A2 -3 CC CC -4 D4 D3 -select * from t1 order by 1; -nid nom prenom -1 A2 A2 -3 CC CC -4 D4 D3 -DROP table t1; -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL) -ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"),(2,"AAA","BBB"),(3,"CCC","DDD"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -2 AAA BBB -3 CCC DDD -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -2 AAA BBB -3 CCC DDD -delete from t1 where nid = 2; -INSERT INTO t1 VALUES(4,"EEE","FFF"); -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -3 CCC DDD -4 EEE FFF -select * from t1 order by nid; -nid nom prenom -1 XYZ1 ABC1 -3 CCC DDD -4 EEE FFF -UPDATE t1 set nid=nid+1; -UPDATE t1 set nom="CCP" where nid = 4; -select * from t1 order by nid; -nid nom prenom -2 XYZ1 ABC1 -4 CCP DDD -5 EEE FFF -select * from t1 order by nid; -nid nom prenom -2 XYZ1 ABC1 -4 CCP DDD -5 EEE FFF -DROP table t1; -CREATE TABLE `t1` ( -`prid` int(10) unsigned NOT NULL, -`id_type` enum('IMSI','SIP') NOT NULL, -`fkimssub` varchar(50) NOT NULL, -`user_id` varchar(20) DEFAULT NULL, -`password` varchar(20) DEFAULT NULL, -`ptg_nbr` varchar(20) DEFAULT NULL, -`old_tmsi` int(10) unsigned DEFAULT NULL, -`new_tmsi` int(10) unsigned DEFAULT NULL, -`dev_capability` int(10) unsigned DEFAULT NULL, -`dev_oid` bigint(20) unsigned DEFAULT NULL, -`lac_cell_id` bigint(20) unsigned DEFAULT NULL, -`ms_classmark1` int(10) unsigned DEFAULT NULL, -`cipher_key` int(10) unsigned DEFAULT NULL, -`priid_master` int(10) unsigned DEFAULT NULL, -PRIMARY KEY (`prid`), -UNIQUE KEY `fkimssub` (`fkimssub`,`ptg_nbr`) USING HASH -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -Warnings: -Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan -INSERT INTO `t1` VALUES (183342,'IMSI','config3_sub_2Privates_3Publics_imssub_36668','user_id_73336','user_id_73336','73336',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(47617,'IMSI','config3_sub_2Privates_3Publics_imssub_9523','user_id_19046','user_id_19046','19046',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(200332,'IMSI','config3_sub_2Privates_3Publics_imssub_40066','user_id_80132','user_id_80132','80132',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(478882,'IMSI','config3_sub_2Privates_3Publics_imssub_95776','user_id_191552','user_id_191552','191552',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(490146,'IMSI','config3_sub_2Privates_3Publics_imssub_98029','user_id_196057','user_id_196057','196057',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(499301,'IMSI','config3_sub_2Privates_3Publics_imssub_99860','user_id_199719','user_id_199719','199719',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(506101,'IMSI','config3_sub_2Privates_3Publics_imssub_101220','user_id_202439','user_id_202439','202439',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(510142,'IMSI','config3_sub_2Privates_3Publics_imssub_102028','user_id_204056','user_id_204056','204056',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(515871,'IMSI','config3_sub_2Privates_3Publics_imssub_103174','user_id_206347','user_id_206347','206347',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(209842,'IMSI','config3_sub_2Privates_3Publics_imssub_41968','user_id_83936','user_id_83936','83936',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(365902,'IMSI','config3_sub_2Privates_3Publics_imssub_73180','user_id_146360','user_id_146360','146360',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(11892,'IMSI','config3_sub_2Privates_3Publics_imssub_2378','user_id_4756','user_id_4756','4756',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL); -select count(*) from t1; -count(*) -12 -select count(*) from t1; -count(*) -12 -update t1 set dev_oid=dev_oid+1; -select count(*) from t1; -count(*) -12 -select count(*) from t1; -count(*) -12 -DROP table t1; -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', -`nom` char(4) default NULL, -`prenom` char(4) default NULL, -PRIMARY KEY USING HASH (`nid`)) -ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -**** On Slave **** -BEGIN; -UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; -set GLOBAL slave_transaction_retries=1; -**** On Master **** -UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; -**** On Slave **** -SHOW SLAVE STATUS;; -Slave_IO_State -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos -Relay_Log_File -Relay_Log_Pos -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos -Relay_Log_Space -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master -Master_SSL_Verify_Server_Cert No -set GLOBAL slave_transaction_retries=10; -START SLAVE; -select * from t1 order by nid; -nid nom prenom -1 LOCK ABC1 -COMMIT; -select * from t1 order by nid; -nid nom prenom -1 DEAD ABC1 -DROP TABLE t1; -CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB; -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -ALTER TABLE t1 ADD c2 INT; -SELECT * FROM t1 ORDER BY c1; -c1 c2 -1 NULL -2 NULL -3 NULL -4 NULL -5 NULL -6 NULL -7 NULL -8 NULL -9 NULL -10 NULL -ALTER TABLE t1 CHANGE c2 c2 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c2 c2 BLOB; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 -1 NULL -2 NULL -3 NULL -4 NULL -5 NULL -TRUNCATE t1; -SELECT count(*) FROM t1; -count(*) -0 -INSERT INTO t1 VALUES (101,NULL),(102,NULL),(103,NULL),(104,NULL),(105,NULL),(106,NULL),(107,NULL),(108,NULL),(109,NULL),(1010,NULL); -SELECT count(*) FROM t1; -count(*) -10 -SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; -c1 -101 -102 -103 -104 -105 -DROP TABLE t1; diff --git a/mysql-test/r/rpl_ndb_blob.result b/mysql-test/r/rpl_ndb_blob.result deleted file mode 100644 index c11de8c27e3..00000000000 --- a/mysql-test/r/rpl_ndb_blob.result +++ /dev/null @@ -1,135 +0,0 @@ -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; -create table t1 ( -a int not null primary key, -b text not null -) engine=ndb; -insert into t1 values(1, repeat('abc',10)); -insert into t1 values(2, repeat('def',200)); -insert into t1 values(3, repeat('ghi',3000)); -select 'M', a, sha1(b) from t1 -order by a; -M a sha1(b) -M 1 8a6c4cf7cf97e66c487c3e3b717e9ae13623d07d -M 2 0ccd08c0fa6ad6a4382b27b1d36586d6ceb4fffa -M 3 75e7b3299e0b776aeac2a4d1542d5b3c0ba2e05e -select 'S', a, sha1(b) from t1 -order by a; -S a sha1(b) -S 1 8a6c4cf7cf97e66c487c3e3b717e9ae13623d07d -S 2 0ccd08c0fa6ad6a4382b27b1d36586d6ceb4fffa -S 3 75e7b3299e0b776aeac2a4d1542d5b3c0ba2e05e -drop table t1; -create table t1 ( -a int not null primary key, -b text not null, -c int, -d longblob, -e tinyblob -) engine=ndbcluster; -insert into t1 values ( -0, repeat(@s2,454), 100, repeat(@s2,345), NULL); -insert into t1 values ( -1, repeat(@s0,504), NULL, repeat(@s1,732), repeat(@s1,1)); -insert into t1 values ( -2, '', 102, '', repeat(@s2,1)); -insert into t1 values ( -3, repeat(@s0,545), 103, repeat(@s2,788), repeat(@s0,1)); -insert into t1 values ( -4, repeat(@s1,38), 104, repeat(@s0,260), repeat(@s0,1)); -insert into t1 values ( -5, repeat(@s2,12), 105, repeat(@s2,40), repeat(@s1,1)); -insert into t1 values ( -6, repeat(@s1,242), 106, NULL, repeat(@s1,1)); -insert into t1 values ( -7, repeat(@s1,30), 107, repeat(@s0,161), ''); -insert into t1 values ( -8, repeat(@s1,719), 108, repeat(@s2,104), NULL); -insert into t1 values ( -9, repeat(@s2,427), NULL, NULL, NULL); -select 'M', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; -M a sha1(b) c sha1(d) sha1(e) -M 0 9538f61e649383c0d1054de2a2f0171188129f33 100 2b6515f29c20b8e9e17cc597527e516c0de8d612 NULL -M 1 dcb9a12ca86e718ff2564be041b7c1b3ff5ea559 NULL f23e7439d9a73c3954979b85a7ef6ef35faf4e9d abfe8ae5212b22d023aa6de84beeb1344ac5668a -M 2 da39a3ee5e6b4b0d3255bfef95601890afd80709 102 da39a3ee5e6b4b0d3255bfef95601890afd80709 33deebe47470a40e960834bffa4cdc66790845a6 -M 3 ec8e06d9ac4695d6a898b519ba840590263a9bff 103 278629ad080c3c4377978c006c2e54d0992e43cc 700915801f853603510aeb67b331866d996fdbda -M 4 0392fa8c425d293c79291f0f34779d1101d13fcb 104 5084b602c7203e0e9590a163415ac605da17ac32 700915801f853603510aeb67b331866d996fdbda -M 5 0f9653f0c7a69cd1c617792d546582e974a7a24d 105 566588a04ff26d05160d61c83435292bfda2978e abfe8ae5212b22d023aa6de84beeb1344ac5668a -M 6 a37e8b0ff4fc13a42be02cdecb36186436959bae 106 NULL abfe8ae5212b22d023aa6de84beeb1344ac5668a -M 7 a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f 107 39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8 da39a3ee5e6b4b0d3255bfef95601890afd80709 -M 8 e139adcb7b2974ee7ff227fd405709e5cb7c896c 108 ba8073b0e1a281d4111bd2d82c7722b01574c00b NULL -M 9 1fc5168fe4be566b17b658d94e7813f0b5032cdb NULL NULL NULL -select 'S', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; -S a sha1(b) c sha1(d) sha1(e) -S 0 9538f61e649383c0d1054de2a2f0171188129f33 100 2b6515f29c20b8e9e17cc597527e516c0de8d612 NULL -S 1 dcb9a12ca86e718ff2564be041b7c1b3ff5ea559 NULL f23e7439d9a73c3954979b85a7ef6ef35faf4e9d abfe8ae5212b22d023aa6de84beeb1344ac5668a -S 2 da39a3ee5e6b4b0d3255bfef95601890afd80709 102 da39a3ee5e6b4b0d3255bfef95601890afd80709 33deebe47470a40e960834bffa4cdc66790845a6 -S 3 ec8e06d9ac4695d6a898b519ba840590263a9bff 103 278629ad080c3c4377978c006c2e54d0992e43cc 700915801f853603510aeb67b331866d996fdbda -S 4 0392fa8c425d293c79291f0f34779d1101d13fcb 104 5084b602c7203e0e9590a163415ac605da17ac32 700915801f853603510aeb67b331866d996fdbda -S 5 0f9653f0c7a69cd1c617792d546582e974a7a24d 105 566588a04ff26d05160d61c83435292bfda2978e abfe8ae5212b22d023aa6de84beeb1344ac5668a -S 6 a37e8b0ff4fc13a42be02cdecb36186436959bae 106 NULL abfe8ae5212b22d023aa6de84beeb1344ac5668a -S 7 a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f 107 39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8 da39a3ee5e6b4b0d3255bfef95601890afd80709 -S 8 e139adcb7b2974ee7ff227fd405709e5cb7c896c 108 ba8073b0e1a281d4111bd2d82c7722b01574c00b NULL -S 9 1fc5168fe4be566b17b658d94e7813f0b5032cdb NULL NULL NULL -drop table t1; -CREATE TABLE IF NOT EXISTS t1 ( -db VARBINARY(63) NOT NULL, -name VARBINARY(63) NOT NULL, -slock BINARY(32) NOT NULL, -query BLOB NOT NULL, -node_id INT UNSIGNED NOT NULL, -epoch BIGINT UNSIGNED NOT NULL, -id INT UNSIGNED NOT NULL, -version INT UNSIGNED NOT NULL, -type INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (db,name)) -ENGINE=NDB; -insert into t1 values ('test','t1', -'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('test','t2', -'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('test','t3', -'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('testtttttttttt','t1', -'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('testttttttttttt','t1', -'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('testtttttttttttt','t1', -'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('t','t11111111111', -'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('t','t111111111111', -'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('t','t1111111111111', -'ghi',repeat(@s2,1000),31,32,33,34,35); -select 'M', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; -M db name sha1(query) node_id epoch id version type -M t t11111111111 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -M t t111111111111 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -M t t1111111111111 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -M test t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -M test t2 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -M test t3 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -M testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -M testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -M testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -select 'S', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; -S db name sha1(query) node_id epoch id version type -S t t11111111111 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -S t t111111111111 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -S t t1111111111111 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -S test t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -S test t2 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -S test t3 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -S testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 -S testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 -S testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 -drop table t1; diff --git a/mysql-test/r/rpl_ndb_blob2.result b/mysql-test/r/rpl_ndb_blob2.result deleted file mode 100644 index 055efffbd6a..00000000000 --- a/mysql-test/r/rpl_ndb_blob2.result +++ /dev/null @@ -1,156 +0,0 @@ -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; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -***** Table Create Section **** - -CREATE TABLE test.t1 (c1 int not null auto_increment, -data LONGBLOB, PRIMARY KEY(c1))ENGINE=#; - -**** Data Insert Section test.t1 ***** - -INSERT INTO test.t1 VALUES (NULL, NULL); -INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024)); -INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024)); - -**** Data Insert Validation Master Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -NULL -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; -LENGTH(data) -16384 - -**** Data Insert Validation Slave Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -NULL -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; -LENGTH(data) -16384 - -**** Data Update Section test.t1 **** - -UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1; -UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; - -**** Data Update Validation Master Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -18432 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -17408 - -**** Data Update Validation Slave Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -18432 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -17408 - -**** End Test Section test.t1 **** - -**** Create Table test.t2 **** - -CREATE TABLE test.t2 ( -c1 INT NOT NULL PRIMARY KEY, -c2 TEXT, -c3 INT, -c4 LONGBLOB, -KEY(c3))ENGINE=#; - -*** Setup Values For test.t2 *** -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -**** Data Insert Section test.t2 ***** - -INSERT INTO test.t2 VALUES(1,@b1,111,@d1); -INSERT INTO test.t2 VALUES(2,@b2,222,@d2); - -**** Data Insert Validation Master Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 2256 b1 3000 dd1 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 20000 b2 30000 dd2 - -**** Data Insert Validation Slave Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 2256 b1 3000 dd1 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 20000 b2 30000 dd2 - -**** Data Update Section test.t2 **** - -UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1; -UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2; - -**** Data Update Validation Master Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 20000 b2 30000 dd2 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 2256 b1 3000 dd1 - -**** Data Update Validation Slave Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 20000 b2 30000 dd2 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 2256 b1 3000 dd1 - -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/r/rpl_ndb_charset.result b/mysql-test/r/rpl_ndb_charset.result deleted file mode 100644 index ed9b3cfbfa8..00000000000 --- a/mysql-test/r/rpl_ndb_charset.result +++ /dev/null @@ -1,201 +0,0 @@ -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 timestamp=1000000000; -drop database if exists mysqltest2; -drop database if exists mysqltest3; -create database mysqltest2 character set latin2; -set @@character_set_server=latin5; -create database mysqltest3; - ---- --master-- -show create database mysqltest2; -Database Create Database -mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ - ---- --slave-- -show create database mysqltest2; -Database Create Database -mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ -set @@collation_server=armscii8_bin; -drop database mysqltest3; -create database mysqltest3; - ---- --master-- -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ - ---- --slave-- -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ -use mysqltest2; -create table t1 (a int auto_increment primary key, b varchar(100)); -set character_set_client=cp850, collation_connection=latin2_croatian_ci; -insert into t1 (b) values(@@character_set_server); -insert into t1 (b) values(@@collation_server); -insert into t1 (b) values(@@character_set_client); -insert into t1 (b) values(@@character_set_connection); -insert into t1 (b) values(@@collation_connection); - ---- --master-- -select * from t1 order by a; -a b -1 armscii8 -2 armscii8_bin -3 cp850 -4 latin2 -5 latin2_croatian_ci - ---- --slave-- -select * from mysqltest2.t1 order by a; -a b -1 armscii8 -2 armscii8_bin -3 cp850 -4 latin2 -5 latin2_croatian_ci -select "--- --muller--" as ""; - ---- --muller-- -set character_set_client=latin1, collation_connection=latin1_german1_ci; -truncate table t1; -insert into t1 (b) values(@@collation_connection); -insert into t1 (b) values(LEAST("Müller","Muffler")); -set collation_connection=latin1_german2_ci; -insert into t1 (b) values(@@collation_connection); -insert into t1 (b) values(LEAST("Müller","Muffler")); - ---- --master-- -select * from t1 order by a; -a b -1 latin1_german1_ci -2 Muffler -3 latin1_german2_ci -4 Müller - ---- --slave-- -select * from mysqltest2.t1 order by a; -a b -1 latin1_german1_ci -2 Muffler -3 latin1_german2_ci -4 Müller -select "--- --INSERT--" as ""; - ---- --INSERT-- -set @a= _cp850 'Müller' collate cp850_general_ci; -truncate table t1; -insert into t1 (b) values(collation(@a)); - ---- --master-- -select * from t1 order by a; -a b -1 cp850_general_ci - ---- --slave-- -select * from mysqltest2.t1 order by a; -a b -1 cp850_general_ci -drop database mysqltest2; -drop database mysqltest3; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest2 -master-bin.000001 # Query # # drop database if exists mysqltest3 -master-bin.000001 # Query # # create database mysqltest2 character set latin2 -master-bin.000001 # Query # # create database mysqltest3 -master-bin.000001 # Query # # drop database mysqltest3 -master-bin.000001 # Query # # create database mysqltest3 -master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # drop database mysqltest2 -master-bin.000001 # Query # # drop database mysqltest3 -select "--- --global--" as ""; - ---- --global-- -set global character_set_server=latin2; -set global character_set_server=latin1; -set global character_set_server=latin2; -set global character_set_server=latin1; -select "--- --oneshot--" as ""; - ---- --oneshot-- -set one_shot @@character_set_server=latin5; -set @@max_join_size=1000; -select @@character_set_server; -@@character_set_server -latin5 -select @@character_set_server; -@@character_set_server -latin1 -set @@character_set_server=latin5; -select @@character_set_server; -@@character_set_server -latin5 -select @@character_set_server; -@@character_set_server -latin5 -set one_shot max_join_size=10; -ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server -set character_set_client=9999999; -ERROR 42000: Unknown character set: '9999999' -set collation_server=9999998; -ERROR HY000: Unknown collation: '9999998' -select "--- --3943--" as ""; - ---- --3943-- -use test; -CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); -SET CHARACTER_SET_CLIENT=koi8r, -CHARACTER_SET_CONNECTION=cp1251, -CHARACTER_SET_RESULTS=koi8r; -INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); -select hex(c1), hex(c2) from t1; -hex(c1) hex(c2) -CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 -select hex(c1), hex(c2) from t1; -hex(c1) hex(c2) -CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 -drop table t1; -select "--- --6676--" as ""; - ---- --6676-- -create table `t1` ( -`pk` varchar(10) not null default '', -primary key (`pk`) -) engine=NDB default charset=latin1; -set @p=_latin1 'test'; -update t1 set pk='test' where pk=@p; -drop table t1; diff --git a/mysql-test/r/rpl_ndb_circular.result b/mysql-test/r/rpl_ndb_circular.result deleted file mode 100644 index 88516b757df..00000000000 --- a/mysql-test/r/rpl_ndb_circular.result +++ /dev/null @@ -1,95 +0,0 @@ -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; -RESET MASTER; -CHANGE MASTER TO master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; -START SLAVE; -CREATE TABLE t1 (a int key, b int) ENGINE=ndb; -SHOW TABLES; -Tables_in_test -t1 -INSERT INTO t1 VALUES (1,2); -INSERT INTO t1 VALUES (2,3); -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -show slave status;; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port # -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -show slave status;; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port # -Connect_Retry 60 -Master_Log_File slave-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File slave-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -STOP SLAVE; -DROP TABLE t1; diff --git a/mysql-test/r/rpl_ndb_circular_simplex.result b/mysql-test/r/rpl_ndb_circular_simplex.result deleted file mode 100644 index ee452f345f9..00000000000 --- a/mysql-test/r/rpl_ndb_circular_simplex.result +++ /dev/null @@ -1,97 +0,0 @@ -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; -CREATE TABLE t1 (a int key, b int) ENGINE=NDB; -SHOW TABLES; -Tables_in_test -t1 -RESET MASTER; -INSERT INTO t1 VALUES (1,2); -INSERT INTO t1 VALUES (2,3); -STOP SLAVE; -CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=SLAVE_PORT,MASTER_USER="root"; -RESET MASTER; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port SLAVE_PORT -Connect_Retry 60 -Master_Log_File slave-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File slave-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -STOP SLAVE; -START SLAVE; -SELECT * FROM t1 ORDER BY a; -a b -1 2 -2 3 -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No diff --git a/mysql-test/r/rpl_ndb_commit_afterflush.result b/mysql-test/r/rpl_ndb_commit_afterflush.result deleted file mode 100644 index 3fc4ca26967..00000000000 --- a/mysql-test/r/rpl_ndb_commit_afterflush.result +++ /dev/null @@ -1,13 +0,0 @@ -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; -CREATE TABLE t1 (a INT) ENGINE=NDB; -begin; -insert into t1 values(1); -flush tables with read lock; -commit; -unlock tables; -drop table t1; diff --git a/mysql-test/r/rpl_ndb_dd_advance.result b/mysql-test/r/rpl_ndb_dd_advance.result deleted file mode 100644 index a4614b4b484..00000000000 --- a/mysql-test/r/rpl_ndb_dd_advance.result +++ /dev/null @@ -1,417 +0,0 @@ -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; -DROP TABLE IF EXISTS t1, t2, t3; -***** Test 1 RPL of CDD and Alter ***** -***** Test 1 setup ***** -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; -CREATE TABLE t1 -(c1 INT NOT NULL PRIMARY KEY, -c2 INT NOT NULL, -c3 INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -***** insert some data ***** -***** Select from Master ***** -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 -1 2 4 -2 4 5 -3 6 6 -4 8 7 -5 10 8 -***** Select from Slave ***** -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 -1 2 4 -2 4 5 -3 6 6 -4 8 7 -5 10 8 -FILE_NAME FILE_TYPE TABLESPACE_NAME LOGFILE_GROUP_NAME -NULL UNDO LOG NULL lg1 -datafile.dat DATAFILE ts1 lg1 -datafile02.dat DATAFILE ts1 lg1 -undofile.dat UNDO LOG NULL lg1 -undofile02.dat UNDO LOG NULL lg1 -**** Do First Set of ALTERs in the master table **** -CREATE INDEX t1_i ON t1(c2, c3); -ALTER TABLE t1 ADD c4 TIMESTAMP; -ALTER TABLE t1 ADD c5 DOUBLE; -ALTER TABLE t1 ADD INDEX (c5); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - KEY `t1_i` (`c2`,`c3`), - KEY `c5` (`c5`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Show first set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - KEY `t1_i` (`c2`,`c3`), - KEY `c5` (`c5`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Second set of alters test 1 **** -ALTER TABLE t1 RENAME t2; -ALTER TABLE t2 DROP INDEX c5; -CREATE TABLE t1(c1 INT)ENGINE=NDB; -INSERT INTO t1 VALUES(1); -DROP TABLE t1; -ALTER TABLE t2 RENAME t1; -**** Show second set of ALTERs on MASTER **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - KEY `t1_i` (`c2`,`c3`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Show second set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) NOT NULL, - `c3` int(11) NOT NULL, - `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - KEY `t1_i` (`c2`,`c3`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -**** Third and last set of alters for test1 **** -ALTER TABLE t1 CHANGE c1 c1 DOUBLE; -ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); -ALTER TABLE t1 DROP COLUMN c3; -ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c4 c4 BLOB; -ALTER TABLE t1 CHANGE c4 c3 BLOB; -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -UPDATE t1 SET c3=@b1 where c1 = 1; -UPDATE t1 SET c3=@b1 where c1 = 2; -**** Show last set of ALTERs on MASTER **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` double NOT NULL DEFAULT '0', - `c2` decimal(10,2) DEFAULT NULL, - `c3` blob, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - KEY `t1_i` (`c2`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 ORDER BY c1 LIMIT 5; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -2 4.00 b1b1b1b1b1b1b1b1b1b1 NULL -3 6.00 0000-00-00 00:00:00 NULL -4 8.00 0000-00-00 00:00:00 NULL -5 10.00 0000-00-00 00:00:00 NULL -**** Show last set of ALTERs on SLAVE **** -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` double NOT NULL DEFAULT '0', - `c2` decimal(10,2) DEFAULT NULL, - `c3` blob, - `c5` double DEFAULT NULL, - PRIMARY KEY (`c1`), - KEY `t1_i` (`c2`) -) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 -SELECT * FROM t1 where c1 = 1; -c1 c2 c3 c5 -1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL -DROP TABLE t1; -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; -******** Create additional TABLESPACE test 2 ************** -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile03.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; -ALTER TABLESPACE ts2 -ADD DATAFILE 'datafile04.dat' -INITIAL_SIZE 12M -ENGINE=NDB; -DROP DATABASE IF EXISTS tpcb; -Warnings: -Note 1008 Can't drop database 'tpcb'; database doesn't exist -CREATE DATABASE tpcb; -*********** Create TPCB Tables ***************** -CREATE TABLE tpcb.account -(id INT, bid INT, balance DECIMAL(10,2), -filler CHAR(255), PRIMARY KEY(id)) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; -CREATE TABLE tpcb.branch -(bid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(bid)) -ENGINE=NDB; -CREATE TABLE tpcb.teller -(tid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(tid)) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDB; -CREATE TABLE tpcb.history -(id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, -tid INT, bid INT, amount DECIMAL(10,2), -tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, -filler CHAR(80),PRIMARY KEY (id)) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDB; -********* Create Procedures and Functions ************ -CREATE PROCEDURE tpcb.load() -BEGIN -DECLARE acct INT DEFAULT 1000; -DECLARE brch INT DEFAULT 100; -DECLARE tell INT DEFAULT 1000; -DECLARE tmp INT DEFAULT 100; -WHILE brch > 0 DO -SET tmp = 100; -WHILE tmp > 0 DO -INSERT INTO tpcb.account VALUES (acct, brch, 0.0, "FRESH ACCOUNT"); -SET acct = acct - 1; -SET tmp = tmp -1; -END WHILE; -INSERT INTO tpcb.branch VALUES (brch, 0.0, "FRESH BRANCH"); -SET brch = brch - 1; -END WHILE; -WHILE tell > 0 DO -INSERT INTO tpcb.teller VALUES (tell, 0.0, "FRESH TELLER"); -SET tell = tell - 1; -END WHILE; -END| -CREATE FUNCTION tpcb.account_id () RETURNS INT -BEGIN -DECLARE num INT; -DECLARE ran INT; -SELECT RAND() * 10 INTO ran; -IF (ran < 2) -THEN -SELECT RAND() * 10 INTO num; -ELSEIF (ran < 4) -THEN -SELECT RAND() * 100 INTO num; -ELSE -SELECT RAND() * 1000 INTO num; -END IF; -IF (num < 1) -THEN -RETURN 1; -END IF; -RETURN num; -END| -CREATE FUNCTION tpcb.teller_id () RETURNS INT -BEGIN -DECLARE num INT; -DECLARE ran INT; -SELECT RAND() * 10 INTO ran; -IF (ran < 2) -THEN -SELECT RAND() * 10 INTO num; -ELSEIF (ran < 5) -THEN -SELECT RAND() * 100 INTO num; -ELSE -SELECT RAND() * 1000 INTO num; -END IF; -IF (num < 1) -THEN -RETURN 1; -END IF; -RETURN num; -END| -CREATE PROCEDURE tpcb.trans() -BEGIN -DECLARE acct INT DEFAULT 0; -DECLARE brch INT DEFAULT 0; -DECLARE tell INT DEFAULT 0; -DECLARE bal DECIMAL(10,2) DEFAULT 0.0; -DECLARE amount DECIMAL(10,2) DEFAULT 1.00; -DECLARE test INT DEFAULT 0; -DECLARE bbal DECIMAL(10,2) DEFAULT 0.0; -DECLARE tbal DECIMAL(10,2) DEFAULT 0.0; -DECLARE local_uuid VARCHAR(255); -DECLARE local_user VARCHAR(255); -DECLARE local_time TIMESTAMP; -SELECT RAND() * 10 INTO test; -SELECT tpcb.account_id() INTO acct; -SELECT tpcb.teller_id() INTO tell; -SELECT account.balance INTO bal FROM tpcb.account WHERE id = acct; -SELECT account.bid INTO brch FROM tpcb.account WHERE id = acct; -SELECT teller.balance INTO tbal FROM tpcb.teller WHERE tid = tell; -SELECT branch.balance INTO bbal FROM tpcb.branch WHERE bid = brch; -IF (test < 5) -THEN -SET bal = bal + amount; -SET bbal = bbal + amount; -SET tbal = tbal + amount; -UPDATE tpcb.account SET balance = bal, filler = 'account updated' - WHERE id = acct; -UPDATE tpcb.branch SET balance = bbal, filler = 'branch updated' - WHERE bid = brch; -UPDATE tpcb.teller SET balance = tbal, filler = 'teller updated' - WHERE tid = tell; -ELSE -SET bal = bal - amount; -SET bbal = bbal - amount; -SET tbal = tbal - amount; -UPDATE tpcb.account SET balance = bal, filler = 'account updated' - WHERE id = acct; -UPDATE tpcb.branch SET balance = bbal, filler = 'branch updated' - WHERE bid = brch; -UPDATE tpcb.teller SET balance = tbal, filler = 'teller updated' - WHERE tid = tell; -END IF; -SET local_uuid=UUID(); -SET local_user=USER(); -SET local_time= NOW(); -INSERT INTO tpcb.history VALUES(NULL,acct,tell,brch,amount, local_time,local_user, -local_uuid,'completed trans'); -END| -****** TEST 2 test time ********************************* -USE tpcb; -*********** Load up the database ****************** -CALL tpcb.load(); -********** Check load master and slave ************** -SELECT COUNT(*) FROM account; -COUNT(*) -10000 -USE tpcb; -SELECT COUNT(*) FROM account; -COUNT(*) -10000 -******** Run in some transactions *************** -***** Time to try slave sync *********** -**** Must make sure slave is clean ***** -STOP SLAVE; -RESET SLAVE; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE IF EXISTS tpcb.account; -DROP TABLE IF EXISTS tpcb.teller; -DROP TABLE IF EXISTS tpcb.branch; -DROP TABLE IF EXISTS tpcb.history; -DROP DATABASE tpcb; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -********** Take a backup of the Master ************* -SELECT COUNT(*) FROM history; -COUNT(*) -1000 -SELECT COUNT(*) FROM history; -COUNT(*) -2000 -CREATE TEMPORARY TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM mysql.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM mysql.backup_info; -@the_backup_id:=backup_id - -DROP TABLE IF EXISTS mysql.backup_info; -************ Restore the slave ************************ -CREATE DATABASE tpcb; -***** Check a few slave restore values *************** -USE tpcb; -SELECT COUNT(*) FROM account; -COUNT(*) -10000 -***** Add some more records to master ********* -***** Finsh the slave sync process ******* -@the_epoch:=MAX(epoch) - -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -* 4. * -* 5. * -START SLAVE; -**** We should be ready to continue on ************* -****** Let's make sure we match ******* -***** MASTER ******* -USE tpcb; -SELECT COUNT(*) FROM history; -COUNT(*) -4050 -****** SLAVE ******** -USE tpcb; -SELECT COUNT(*) FROM history; -COUNT(*) -4050 -*** DUMP MASTER & SLAVE FOR COMPARE ******** -*************** TEST 2 CLEANUP SECTION ******************** -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE tpcb.account; -DROP TABLE tpcb.teller; -DROP TABLE tpcb.branch; -DROP TABLE tpcb.history; -DROP DATABASE tpcb; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; -DROP TABLESPACE ts2 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; -****** Do dumps compare ************ diff --git a/mysql-test/r/rpl_ndb_dd_basic.result b/mysql-test/r/rpl_ndb_dd_basic.result deleted file mode 100644 index f1cc6e9af24..00000000000 --- a/mysql-test/r/rpl_ndb_dd_basic.result +++ /dev/null @@ -1,72 +0,0 @@ -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; -DROP TABLE IF EXISTS t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -alter logfile group lg1 -add undofile 'undofile02.dat' -initial_size 4M engine=ndb; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -alter tablespace ts1 -add datafile 'datafile02.dat' -initial_size 4M engine=ndb; -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -tablespace ts1 storage disk -engine ndb; -insert into t1 values (1,2,3); -select * from t1 order by pk1; -pk1 b c -1 2 3 -select * from t1 order by pk1; -pk1 b c -1 2 3 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1 -master-bin.000001 # Query 1 # CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB -master-bin.000001 # Query 1 # alter logfile group lg1 -add undofile 'undofile02.dat' -initial_size 4M engine=ndb -master-bin.000001 # Query 1 # CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB -master-bin.000001 # Query 1 # alter tablespace ts1 -add datafile 'datafile02.dat' -initial_size 4M engine=ndb -master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -tablespace ts1 storage disk -engine ndb -master-bin.000001 # Query 1 # BEGIN -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows 1 # table_id: # -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # COMMIT -drop table t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; diff --git a/mysql-test/r/rpl_ndb_dd_partitions.result b/mysql-test/r/rpl_ndb_dd_partitions.result deleted file mode 100644 index ece6b84c227..00000000000 --- a/mysql-test/r/rpl_ndb_dd_partitions.result +++ /dev/null @@ -1,726 +0,0 @@ -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; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) 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 -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) 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 -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- 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` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) 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 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) ---- 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` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) 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 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) 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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) 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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- 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` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) 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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) ---- 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` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) 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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) 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 -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) 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 -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- 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` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) 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 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 ---- 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` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) 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 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), -bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) 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`) -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) 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`) -) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- 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` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(63) DEFAULT NULL, - `bc` char(63) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc VARCHAR(255); ---- 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` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- 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` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(63) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; diff --git a/mysql-test/r/rpl_ndb_ddl.result b/mysql-test/r/rpl_ndb_ddl.result deleted file mode 100644 index aeaca1e7de0..00000000000 --- a/mysql-test/r/rpl_ndb_ddl.result +++ /dev/null @@ -1,1616 +0,0 @@ -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; - --------- switch to master ------- -SET AUTOCOMMIT = 1; -DROP DATABASE IF EXISTS mysqltest1; -DROP DATABASE IF EXISTS mysqltest2; -DROP DATABASE IF EXISTS mysqltest3; -CREATE DATABASE mysqltest1; -CREATE DATABASE mysqltest2; -CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=NDB; -INSERT INTO mysqltest1.t1 SET f1= 0; -CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE=NDB; -CREATE INDEX my_idx6 ON mysqltest1.t6(f1); -CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE=NDB; -INSERT INTO mysqltest1.t7 SET f1= 0; -CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE=NDB; -CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE=NDB; -CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) ENGINE=MEMORY; -SET AUTOCOMMIT = 0; -use mysqltest1; - --------- switch to slave -------- -SET AUTOCOMMIT = 1; -use mysqltest1; - --------- switch to master ------- - -######## SELECT 1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -SELECT 1; -1 -1 -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## SELECT COUNT(*) FROM t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -SELECT COUNT(*) FROM t1; -COUNT(*) -2 -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## COMMIT ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 0 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -0 - --------- switch to master ------- -COMMIT; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## ROLLBACK ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 1 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## SET AUTOCOMMIT=1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 1 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -1 - --------- switch to master ------- -SET AUTOCOMMIT=1; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SET AUTOCOMMIT=0; - -######## START TRANSACTION ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 2 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -2 - --------- switch to master ------- -START TRANSACTION; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## BEGIN ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 3 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -3 - --------- switch to master ------- -BEGIN; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## DROP TABLE mysqltest1.t2 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 4 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -4 - --------- switch to master ------- -DROP TABLE mysqltest1.t2; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't2'; -Tables_in_mysqltest1 (t2) - --------- switch to slave -------- -SHOW TABLES LIKE 't2'; -Tables_in_mysqltest1 (t2) - --------- switch to master ------- - -######## DROP TEMPORARY TABLE mysqltest1.t23 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 5 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -DROP TEMPORARY TABLE mysqltest1.t23; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't23'; -Tables_in_mysqltest1 (t23) - --------- switch to slave -------- -SHOW TABLES LIKE 't23'; -Tables_in_mysqltest1 (t23) - --------- switch to master ------- - -######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 5 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -5 - --------- switch to master ------- -RENAME TABLE mysqltest1.t3 to mysqltest1.t20; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TABLES LIKE 't20'; -Tables_in_mysqltest1 (t20) -t20 - --------- switch to slave -------- -SHOW TABLES LIKE 't20'; -Tables_in_mysqltest1 (t20) -t20 - --------- switch to master ------- - -######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 6 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -6 - --------- switch to master ------- -ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -describe mysqltest1.t4; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 bigint(20) YES NULL - --------- switch to slave -------- -describe mysqltest1.t4; -Field Type Null Key Default Extra -f1 bigint(20) YES NULL -f2 bigint(20) YES NULL - --------- switch to master ------- - -######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= NDB ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 7 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -7 - --------- switch to master ------- -CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= NDB; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 8 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- - -######## TRUNCATE TABLE mysqltest1.t7 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 8 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -8 - --------- switch to master ------- -TRUNCATE TABLE mysqltest1.t7; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT * FROM mysqltest1.t7; -f1 - --------- switch to slave -------- -SELECT * FROM mysqltest1.t7; -f1 - --------- switch to master ------- - -######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 9 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -9 - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -UNLOCK TABLES; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 READ; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -ERROR HY000: Table 't1' was locked with a READ lock and can't be updated -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: MASTER: The INSERT is not committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - -TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) - --------- switch to master ------- -LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; - -######## UNLOCK TABLES ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 10 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -10 - --------- switch to master ------- -UNLOCK TABLES; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- - -######## DROP INDEX my_idx6 ON mysqltest1.t6 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 11 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -11 - --------- switch to master ------- -DROP INDEX my_idx6 ON mysqltest1.t6; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW INDEX FROM mysqltest1.t6; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment - --------- switch to slave -------- -SHOW INDEX FROM mysqltest1.t6; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment - --------- switch to master ------- - -######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 12 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -12 - --------- switch to master ------- -CREATE INDEX my_idx5 ON mysqltest1.t5(f1); -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW INDEX FROM mysqltest1.t5; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE - --------- switch to slave -------- -SHOW INDEX FROM mysqltest1.t5; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment -t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE - --------- switch to master ------- - -######## DROP DATABASE mysqltest2 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 13 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -13 - --------- switch to master ------- -DROP DATABASE mysqltest2; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW DATABASES LIKE "mysqltest2"; -Database (mysqltest2) - --------- switch to slave -------- -SHOW DATABASES LIKE "mysqltest2"; -Database (mysqltest2) - --------- switch to master ------- - -######## CREATE DATABASE mysqltest3 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 14 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -14 - --------- switch to master ------- -CREATE DATABASE mysqltest3; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW DATABASES LIKE "mysqltest3"; -Database (mysqltest3) -mysqltest3 - --------- switch to slave -------- -SHOW DATABASES LIKE "mysqltest3"; -Database (mysqltest3) -mysqltest3 - --------- switch to master ------- - -######## CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1" ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 15 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -15 - --------- switch to master ------- -CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1"; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment - --------- switch to master ------- - -######## ALTER PROCEDURE p1 COMMENT "I have been altered" ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 16 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -16 - --------- switch to master ------- -ALTER PROCEDURE p1 COMMENT "I have been altered"; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment I have been altered - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; -Db mysqltest1 -Name p1 -Type PROCEDURE -Definer root@localhost -Modified # -Created # -Security_type DEFINER -Comment I have been altered - --------- switch to master ------- - -######## DROP PROCEDURE p1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 17 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -17 - --------- switch to master ------- -DROP PROCEDURE p1; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW PROCEDURE STATUS LIKE 'p1'; - --------- switch to slave -------- -SHOW PROCEDURE STATUS LIKE 'p1'; - --------- switch to master ------- - -######## CREATE OR REPLACE VIEW v1 as select * from t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 18 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -18 - --------- switch to master ------- -CREATE OR REPLACE VIEW v1 as select * from t1; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` - --------- switch to slave -------- -SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` - --------- switch to master ------- - -######## ALTER VIEW v1 AS select f1 from t1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 19 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -19 - --------- switch to master ------- -ALTER VIEW v1 AS select f1 from t1; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` - --------- switch to slave -------- -SHOW CREATE VIEW v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` - --------- switch to master ------- - -######## DROP VIEW IF EXISTS v1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 20 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -20 - --------- switch to master ------- -DROP VIEW IF EXISTS v1; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW CREATE VIEW v1; -ERROR 42S02: Table 'mysqltest1.v1' doesn't exist - --------- switch to slave -------- -SHOW CREATE VIEW v1; -ERROR 42S02: Table 'mysqltest1.v1' doesn't exist - --------- switch to master ------- - -######## CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 21 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -21 - --------- switch to master ------- -CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer -trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost - --------- switch to slave -------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer -trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost - --------- switch to master ------- - -######## DROP TRIGGER trg1 ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 22 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -22 - --------- switch to master ------- -DROP TRIGGER trg1; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer - --------- switch to slave -------- -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer - --------- switch to master ------- - -######## CREATE USER user1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 23 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -23 - --------- switch to master ------- -CREATE USER user1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'user1'; -user -user1 - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'user1'; -user -user1 - --------- switch to master ------- - -######## RENAME USER user1@localhost TO rename1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 24 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -24 - --------- switch to master ------- -RENAME USER user1@localhost TO rename1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -rename1 - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -rename1 - --------- switch to master ------- - -######## DROP USER rename1@localhost ######## - --------- switch to master ------- -INSERT INTO t1 SET f1= 25 + 1; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -25 - --------- switch to master ------- -DROP USER rename1@localhost; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - --------- switch to master ------- -ROLLBACK; -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - -TEST-INFO: MASTER: The INSERT is committed (Succeeded) - --------- switch to slave -------- -SELECT MAX(f1) FROM t1; -MAX(f1) -26 - -TEST-INFO: SLAVE: The INSERT is committed (Succeeded) - --------- switch to master ------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user - --------- switch to slave -------- -SELECT user FROM mysql.user WHERE user = 'rename1'; -user -use test; - --------- switch to master ------- -DROP DATABASE mysqltest1; -DROP DATABASE mysqltest3; diff --git a/mysql-test/r/rpl_ndb_delete_nowhere.result b/mysql-test/r/rpl_ndb_delete_nowhere.result deleted file mode 100644 index 1cecb030181..00000000000 --- a/mysql-test/r/rpl_ndb_delete_nowhere.result +++ /dev/null @@ -1,15 +0,0 @@ -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; -create table t1 (a int, b int) engine=NDB; -insert into t1 values(1,1); -select * from t1; -a b -1 1 -delete from t1; -select * from t1; -a b -drop table t1; diff --git a/mysql-test/r/rpl_ndb_do_db.result b/mysql-test/r/rpl_ndb_do_db.result deleted file mode 100644 index 316f5fc7e31..00000000000 --- a/mysql-test/r/rpl_ndb_do_db.result +++ /dev/null @@ -1,58 +0,0 @@ -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; -DROP DATABASE IF EXISTS replica; -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -Tables_in_test -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -Tables_in_replica -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -SHOW TABLES; -Tables_in_test -USE replica; -SHOW TABLES; -Tables_in_replica -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE test; -SHOW TABLES; -Tables_in_test -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; diff --git a/mysql-test/r/rpl_ndb_do_table.result b/mysql-test/r/rpl_ndb_do_table.result deleted file mode 100644 index dda2844f6d0..00000000000 --- a/mysql-test/r/rpl_ndb_do_table.result +++ /dev/null @@ -1,26 +0,0 @@ -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; -DROP TABLE IF EXISTS t1, t2; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t1 VALUES(2, repeat('def',200)); -INSERT INTO t1 VALUES(3, repeat('ghi',3000)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(2, repeat('def',200)); -INSERT INTO t2 VALUES(3, repeat('ghi',3000)); -SHOW TABLES; -Tables_in_test -t1 -SELECT COUNT(*) FROM t1; -COUNT(*) -3 -INSERT INTO t1 VALUES (3, repeat('bad',1)); -ERROR 23000: Duplicate entry '3' for key 'PRIMARY' -INSERT INTO t1 VALUES (3, repeat('bad too',1)); -ERROR 23000: Duplicate entry '3' for key 'PRIMARY' -DROP TABLE IF EXISTS t1, t2; diff --git a/mysql-test/r/rpl_ndb_extraCol.result b/mysql-test/r/rpl_ndb_extraCol.result deleted file mode 100644 index 8f6dae7c5b5..00000000000 --- a/mysql-test/r/rpl_ndb_extraCol.result +++ /dev/null @@ -1,750 +0,0 @@ -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; -**** Diff Table Def Start **** -*** On Slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(4) DEFAULT 'TEST') -ENGINE='NDB'; -*** Create t1 on Master *** -CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); -SELECT * FROM t1 ORDER BY a; -a b c -1 2 TEXAS -2 1 AUSTIN -3 4 QA -*** Select from slave *** -SELECT * FROM t1 ORDER BY a; -a b c d e -1 2 TEXAS NULL NULL -2 1 AUSTIN NULL NULL -3 4 QA NULL NULL -*** Drop t1 *** -DROP TABLE t1; -*** Create t3 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t3 on Master *** -CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t3 *** -DROP TABLE t3; -*** Create t4 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t4 on Master *** -CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), -(30000.22,4,'QA TESTING'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t4 *** -DROP TABLE t4; -*** Create t5 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT, e DOUBLE, -f DECIMAL(8,2))ENGINE='NDB'; -*** Create t5 on Master *** -CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT, e BLOB, -f FLOAT) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), -(2,'JOE',300.01,0,'b2b2',1.0000009); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t5 *** -DROP TABLE t5; -*** Create t6 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), -c FLOAT, d INT)ENGINE='NDB'; -*** Create t6 on Master *** -CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), -c DECIMAL(8,2), d BIT -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), -(2,'JOE',300.01,0); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; -*** Drop t6 *** -DROP TABLE t6; -DROP TABLE t6; -START SLAVE; -**** Diff Table Def End **** -**** Extra Colums Start **** -*** Create t7 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e CHAR(20) DEFAULT 'Extra Column Testing') -ENGINE='NDB'; -*** Create t7 on Master *** -CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t7 ORDER BY a; -a b c -1 b1b1 Kyle -2 b1b1 JOE -3 b1b1 QA -*** Select from slave *** -SELECT * FROM t7 ORDER BY a; -a b c d e -1 b1b1 Kyle NULL NULL -2 b1b1 JOE NULL NULL -3 b1b1 QA NULL NULL -*** Drop t7 *** -DROP TABLE t7; -*** Create t8 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', -e INT)ENGINE='NDB'; -*** Create t8 on Master *** -CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -*** Drop t8 *** -DROP TABLE t8; -*** Create t10 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', -c CHAR(5), e INT DEFAULT '1')ENGINE='NDB'; -*** Create t10 on Master *** -CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t10 *** -DROP TABLE t10; -*** Create t11 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -*** Create t11 on Master *** -CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Drop t11 *** -DROP TABLE t11; -*** Create t12 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, -c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; -*** Create t12 on Master *** -CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t12 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave *** -SELECT * FROM t12 ORDER BY a; -a b f c e -1 b1b1b1b1b1b1b1b1 Kyle NULL NULL -2 b1b1b1b1b1b1b1b1 JOE NULL NULL -3 b1b1b1b1b1b1b1b1 QA NULL NULL -*** Drop t12 *** -DROP TABLE t12; -**** Extra Colums End **** -*** BUG 22177 Start *** -*** Create t13 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), -d INT DEFAULT '1', -e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t13 on Master *** -CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -SELECT * FROM t13 ORDER BY a; -a b c -1 b1b1b1b1b1b1b1b1 Kyle -2 b1b1b1b1b1b1b1b1 JOE -3 b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t13 ORDER BY a; -a b c d e -1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP -2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP -3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP -*** Drop t13 *** -DROP TABLE t13; -*** 22117 END *** -*** Alter Master Table Testing Start *** -*** Create t14 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t14 on Master *** -CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; -ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t14 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t14 ORDER BY c1; -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 -*** connect to master and drop columns *** -ALTER TABLE t14 DROP COLUMN c2; -ALTER TABLE t14 DROP COLUMN c4; -*** Select from Master *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 -1 Replication Testing Extra Col Kyle -2 This Test Should work JOE -3 If is does not, I will open a bug QA -*** Select from Slave *** -SELECT * FROM t14 ORDER BY c1; -c1 c3 c5 c6 c7 -1 Replication Testing Extra Col Kyle NULL CURRENT_TIMESTAMP -2 This Test Should work JOE NULL CURRENT_TIMESTAMP -3 If is does not, I will open a bug QA NULL CURRENT_TIMESTAMP -*** Drop t14 *** -DROP TABLE t14; -*** Create t15 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t15 on Master *** -CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -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 t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t15 ORDER BY c1; -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 -*** Add column on master that is a Extra on Slave *** -ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; -******************************************** -*** Expect slave to fail with Error 1060 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1060 -Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -*** Try to insert in master **** -INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); -SELECT * FROM t15 ORDER BY c1; -c1 c2 c3 c4 c5 c6 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 -*** Try to select from slave **** -SELECT * FROM t15 ORDER BY c1; -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 -5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP -*** DROP TABLE t15 *** -DROP TABLE t15; -*** Create t16 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, -c4 BLOB, c5 CHAR(5), -c6 INT DEFAULT '1', -c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP -)ENGINE='NDB'; -*** Create t16 on Master *** -CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, -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 t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), -(2,2.00,'This Test Should work',@b1,'JOE'), -(3,3.00,'If is does not, I will open a bug',@b1,'QA'); -SELECT * FROM t16 ORDER BY c1; -c1 c2 c3 c4 c5 -1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle -2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE -3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA -*** Select on Slave **** -SELECT * FROM t16 ORDER BY c1; -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 -*** Add Partition on master *** -ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; -INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ -*** Show table on Slave **** -SHOW CREATE TABLE t16; -Table Create Table -t16 CREATE TABLE `t16` ( - `c1` int(11) NOT NULL, - `c2` decimal(8,2) DEFAULT NULL, - `c3` text, - `c4` blob, - `c5` char(5) DEFAULT NULL, - `c6` int(11) DEFAULT '1', - `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`c1`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ -*** DROP TABLE t16 *** -DROP TABLE t16; -*** Alter Master End *** -*** Create t17 on slave *** -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), -d FLOAT DEFAULT '2.00', -e CHAR(5) DEFAULT 'TEST2') -ENGINE='NDB'; -*** Create t17 on Master *** -CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) -) ENGINE='NDB'; -RESET MASTER; -*** Start Slave *** -START SLAVE; -*** Master Data Insert *** -INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); -******************************************** -*** Expect slave to fail with Error 1522 *** -******************************************** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -** DROP table t17 *** -DROP TABLE t17; diff --git a/mysql-test/r/rpl_ndb_func003.result b/mysql-test/r/rpl_ndb_func003.result deleted file mode 100644 index ad72a3fb244..00000000000 --- a/mysql-test/r/rpl_ndb_func003.result +++ /dev/null @@ -1,29 +0,0 @@ -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; -DROP FUNCTION IF EXISTS test.f1; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=NDB; -create function test.f1() RETURNS CHAR(16) -BEGIN -DECLARE tmp CHAR(16); -DECLARE var_name FLOAT; -SET var_name = RAND(); -IF var_name > .6 -THEN SET tmp = 'Texas'; -ELSE SET tmp = 'MySQL'; -END IF; -RETURN tmp; -END| -INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); -INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); -SET AUTOCOMMIT=0; -START TRANSACTION; -INSERT INTO test.t1 VALUES (null,test.f1()); -ROLLBACK; -SET AUTOCOMMIT=1; -DROP FUNCTION test.f1; -DROP TABLE test.t1; diff --git a/mysql-test/r/rpl_ndb_idempotent.result b/mysql-test/r/rpl_ndb_idempotent.result deleted file mode 100644 index 2f2273c145e..00000000000 --- a/mysql-test/r/rpl_ndb_idempotent.result +++ /dev/null @@ -1,73 +0,0 @@ -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; -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -@the_epoch:=MAX(epoch) - -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.ndb_binlog_index WHERE epoch = ; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No -STOP SLAVE; -CHANGE MASTER TO -master_log_file = 'master-bin.000001', -master_log_pos = ; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 No No 0 0 None 0 No No -START SLAVE; -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -STOP SLAVE; -DROP TABLE t1; -RESET master; -DROP TABLE t1; -RESET slave; -START SLAVE; -CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","remove on slave",1); -DELETE FROM t1; -BEGIN; -UPDATE t1 SET c2="does not exist" WHERE c3=1; -INSERT INTO t1 VALUES ("row2","new on slave",2); -COMMIT; -SELECT * FROM t1; -c1 c2 c3 -row2 new on slave 2 -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_ndb_innodb_trans.result b/mysql-test/r/rpl_ndb_innodb_trans.result deleted file mode 100644 index 148e6247b03..00000000000 --- a/mysql-test/r/rpl_ndb_innodb_trans.result +++ /dev/null @@ -1,103 +0,0 @@ -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; -create table t1 (a int, unique(a)) engine=ndbcluster; -create table t2 (a int, unique(a)) engine=innodb; -begin; -insert into t1 values(1); -insert into t2 values(1); -rollback; -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -begin; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -delete from t1; -delete from t2; -begin; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -2 -select count(*) from t2; -count(*) -0 -delete from t1; -delete from t2; -begin; -insert into t2 values(3),(4); -insert into t1 values(3),(4); -load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -Warnings: -Warning 1262 Row 1 was truncated; it contained more data than there were input columns -Warning 1262 Row 2 was truncated; it contained more data than there were input columns -rollback; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -select count(*) from t1; -count(*) -4 -select count(*) from t2; -count(*) -0 -select count(*) from t1; -count(*) -4 -select count(*) from t2; -count(*) -0 -drop table t1,t2; diff --git a/mysql-test/r/rpl_ndb_insert_ignore.result b/mysql-test/r/rpl_ndb_insert_ignore.result deleted file mode 100644 index 030845e89e2..00000000000 --- a/mysql-test/r/rpl_ndb_insert_ignore.result +++ /dev/null @@ -1,70 +0,0 @@ -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; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned, -unique (b) -) ENGINE=NDB; -CREATE TABLE t2 ( -a int unsigned, # to force INSERT SELECT to have a certain order -b int unsigned -) ENGINE=NDB; -INSERT INTO t1 VALUES (NULL, 1); -INSERT INTO t1 VALUES (NULL, 2); -INSERT INTO t1 VALUES (NULL, 3); -INSERT INTO t1 VALUES (NULL, 4); -INSERT INTO t2 VALUES (1, 1); -INSERT INTO t2 VALUES (2, 2); -INSERT INTO t2 VALUES (3, 5); -INSERT INTO t2 VALUES (4, 3); -INSERT INTO t2 VALUES (5, 4); -INSERT INTO t2 VALUES (6, 6); -INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -drop table t1; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned, -unique (b) -) ENGINE=myisam; -INSERT INTO t1 VALUES (1, 1); -INSERT INTO t1 VALUES (2, 2); -INSERT INTO t1 VALUES (3, 3); -INSERT INTO t1 VALUES (4, 4); -INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -SELECT * FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -drop table t1, t2; diff --git a/mysql-test/r/rpl_ndb_load.result b/mysql-test/r/rpl_ndb_load.result deleted file mode 100644 index e51f0096557..00000000000 --- a/mysql-test/r/rpl_ndb_load.result +++ /dev/null @@ -1,42 +0,0 @@ -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; -DROP DATABASE IF EXISTS TEST_DB; -CREATE DATABASE TEST_DB; -USE TEST_DB; -CREATE TABLE SUBSCRIBER -( NUMBER CHAR(12) BINARY NOT NULL, -NAME CHAR(32) BINARY NOT NULL, -GROUP_ID INT UNSIGNED NOT NULL, -LOCATION INT UNSIGNED NOT NULL, -SESSIONS INT UNSIGNED NOT NULL, -CHANGED_BY CHAR(32) BINARY NOT NULL, -CHANGED_TIME CHAR(32) BINARY NOT NULL, -PRIMARY KEY USING HASH (NUMBER)) -ENGINE = NDB; -CREATE TABLE GROUP2 -( GROUP_ID INT UNSIGNED NOT NULL, -GROUP_NAME CHAR(32) BINARY NOT NULL, -ALLOW_READ CHAR(1) BINARY NOT NULL, -ALLOW_INSERT INT UNSIGNED NOT NULL, -ALLOW_DELETE INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (GROUP_ID)) -ENGINE = NDB; -CREATE TABLE SESSION -( NUMBER CHAR(12) BINARY NOT NULL, -SERVER_ID INT UNSIGNED NOT NULL, -DATA BINARY(2000) NOT NULL, -PRIMARY KEY USING HASH (NUMBER,SERVER_ID)) -ENGINE = NDB; -CREATE TABLE SERVER -( SUFFIX CHAR(2) BINARY NOT NULL, -SERVER_ID INT UNSIGNED NOT NULL, -NAME CHAR(32) BINARY NOT NULL, -NO_OF_READ INT UNSIGNED NOT NULL, -NO_OF_INSERT INT UNSIGNED NOT NULL, -NO_OF_DELETE INT UNSIGNED NOT NULL, -PRIMARY KEY USING HASH (SUFFIX, SERVER_ID)) -ENGINE = NDB; diff --git a/mysql-test/r/rpl_ndb_log.result b/mysql-test/r/rpl_ndb_log.result deleted file mode 100644 index db2ce27d43b..00000000000 --- a/mysql-test/r/rpl_ndb_log.result +++ /dev/null @@ -1,151 +0,0 @@ -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; -stop slave; -reset master; -reset slave; -reset master; -create table t1(n int not null auto_increment primary key)ENGINE=NDB; -insert into t1 values (NULL); -drop table t1; -create table t1 (word char(20) not null)ENGINE=NDB; -load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; -select count(*) from t1; -count(*) -69 -show binlog events; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -master-bin.000001 # Query 1 # BEGIN -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows 1 # table_id: # -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # COMMIT -master-bin.000001 # Query 1 # use `test`; drop table t1 -master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB -master-bin.000001 # Query 1 # BEGIN -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows 1 # table_id: # -master-bin.000001 # Write_rows 1 # table_id: # -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # COMMIT -show binlog events from 106 limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -show binlog events from 106 limit 2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -master-bin.000001 # Query 1 # BEGIN -show binlog events from 106 limit 2,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -flush logs; -create table t3 (a int)ENGINE=NDB; -start slave; - -let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; - ---source include/wait_slave_status.inc -flush logs; -stop slave; -create table t2 (n int)ENGINE=NDB; -insert into t2 values (1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Rotate # # master-bin.000002;pos=4 -show binlog events in 'master-bin.000002'; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB -master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB -master-bin.000002 # Query 1 # BEGIN -master-bin.000002 # Table_map 1 # table_id: # (test.t2) -master-bin.000002 # Table_map 1 # table_id: # (mysql.ndb_apply_status) -master-bin.000002 # Write_rows 1 # table_id: # -master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000002 # Query 1 # COMMIT -show binary logs; -Log_name File_size -master-bin.000001 1775 -master-bin.000002 617 -start slave; -show binary logs; -Log_name File_size -slave-bin.000001 1870 -slave-bin.000002 202 -show binlog events in 'slave-bin.000001' from 4; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB -slave-bin.000001 # Query 2 # BEGIN -slave-bin.000001 # Table_map 2 # table_id: # (test.t1) -slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -slave-bin.000001 # Write_rows 2 # table_id: # -slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000001 # Query 2 # COMMIT -slave-bin.000001 # Query 1 # use `test`; drop table t1 -slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB -slave-bin.000001 # Query 2 # BEGIN -slave-bin.000001 # Table_map 2 # table_id: # (test.t1) -slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -slave-bin.000001 # Write_rows 2 # table_id: # -slave-bin.000001 # Write_rows 1 # table_id: # -slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000001 # Query 2 # COMMIT -slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB -slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 -show binlog events in 'slave-bin.000002' from 4; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB -slave-bin.000002 # Query 2 # BEGIN -slave-bin.000002 # Table_map 2 # table_id: # (test.t2) -slave-bin.000002 # Table_map 2 # table_id: # (mysql.ndb_apply_status) -slave-bin.000002 # Write_rows 2 # table_id: # -slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000002 # Query 2 # COMMIT -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 617 # # master-bin.000002 Yes Yes # 0 0 617 # None 0 No # No -show binlog events in 'slave-bin.000005' from 4; -ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -create table t1(a int auto_increment primary key, b int); -insert into t1 values (NULL, 1); -reset master; -set insert_id=5; -insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -select * from t1; -a b -1 1 -5 1 -6 1 -drop table t1; diff --git a/mysql-test/r/rpl_ndb_multi.result b/mysql-test/r/rpl_ndb_multi.result deleted file mode 100644 index 760114f3639..00000000000 --- a/mysql-test/r/rpl_ndb_multi.result +++ /dev/null @@ -1,55 +0,0 @@ -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; -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -reset master; -SHOW TABLES; -Tables_in_test -t1 -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -@the_epoch:=MAX(epoch) - -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row1 will go away 1 -stop slave; -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.ndb_binlog_index WHERE epoch = ; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) -106 master-bin1.000001 -CHANGE MASTER TO -master_port=, -master_log_file = 'master-bin1.000001', -master_log_pos = 106 ; -start slave; -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -INSERT INTO t1 VALUES ("row5","E",5); -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -row5 E 5 -SELECT * FROM t1 ORDER BY c3; -c1 c2 c3 -row3 C 3 -row4 D 4 -row5 E 5 -STOP SLAVE; diff --git a/mysql-test/r/rpl_ndb_multi_update2.result b/mysql-test/r/rpl_ndb_multi_update2.result deleted file mode 100644 index 5d00ae6598c..00000000000 --- a/mysql-test/r/rpl_ndb_multi_update2.result +++ /dev/null @@ -1,55 +0,0 @@ -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; -drop table if exists t1,t2; -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -CREATE TABLE t2 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -INSERT INTO t1 VALUES (NULL, 0); -INSERT INTO t1 SELECT NULL, 0 FROM t1; -INSERT INTO t2 VALUES (NULL, 0), (NULL,1); -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a; -SELECT * FROM t1 ORDER BY a; -a b -1 4 -2 5 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -SELECT * FROM t1 ORDER BY a; -a b -1 4 -2 5 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -drop table t1,t2; -reset master; -CREATE TABLE t1 ( a INT ); -INSERT INTO t1 VALUES (0); -UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b; -select * from t1; -a -3 -select * from t1; -a -3 -drop table t1; diff --git a/mysql-test/r/rpl_ndb_multi_update3.result b/mysql-test/r/rpl_ndb_multi_update3.result deleted file mode 100644 index dc4e11c9c9e..00000000000 --- a/mysql-test/r/rpl_ndb_multi_update3.result +++ /dev/null @@ -1,197 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - --------- Test for BUG#9361 -------- -CREATE TABLE t1 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -CREATE TABLE t2 ( -a int unsigned not null auto_increment primary key, -b int unsigned -) ENGINE=NDB; -INSERT INTO t1 VALUES (NULL, 0); -INSERT INTO t1 SELECT NULL, 0 FROM t1; -INSERT INTO t2 VALUES (NULL, 0), (NULL,1); -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 0 -2 1 -UPDATE t2, (SELECT a FROM t1 ORDER BY a) AS t SET t2.b = t.a+5 ; -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 6 -2 6 -SELECT * FROM t1 ORDER BY a; -a b -1 0 -2 0 -SELECT * FROM t2 ORDER BY a; -a b -1 6 -2 6 -drop table t1,t2; - --------- Test 1 for BUG#9361 -------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -CREATE TABLE t1 ( -a1 char(30), -a2 int, -a3 int, -a4 char(30), -a5 char(30) -); -CREATE TABLE t2 ( -b1 int, -b2 char(30) -); -INSERT INTO t1 VALUES ('Yes', 1, NULL, 'foo', 'bar'); -INSERT INTO t2 VALUES (1, 'baz'); -UPDATE t1 a, t2 -SET a.a1 = 'No' -WHERE a.a2 = -(SELECT b1 -FROM t2 -WHERE b2 = 'baz') -AND a.a3 IS NULL -AND a.a4 = 'foo' -AND a.a5 = 'bar'; -SELECT * FROM t1; -a1 a2 a3 a4 a5 -No 1 NULL foo bar -SELECT * FROM t2; -b1 b2 -1 baz -DROP TABLE t1, t2; - --------- Test 2 for BUG#9361 -------- -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; -CREATE TABLE t1 ( -i INT, -j INT, -x INT, -y INT, -z INT -); -CREATE TABLE t2 ( -i INT, -k INT, -x INT, -y INT, -z INT -); -CREATE TABLE t3 ( -j INT, -k INT, -x INT, -y INT, -z INT -); -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); -UPDATE t1 AS a -INNER JOIN t2 AS b -ON a.i = b.i -INNER JOIN t3 AS c -ON a.j = c.j AND b.k = c.k -SET a.x = b.x, -a.y = b.y, -a.z = ( -SELECT sum(z) -FROM t3 -WHERE y = 34 -) -WHERE b.x = 23; -SELECT * FROM t1; -i j x y z -1 2 23 24 71 -DROP TABLE t1, t2, t3; -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 't1' -DROP TABLE IF EXISTS t2; -Warnings: -Note 1051 Unknown table 't2' -CREATE TABLE t1 ( -idp int(11) NOT NULL default '0', -idpro int(11) default NULL, -price decimal(19,4) default NULL, -PRIMARY KEY (idp) -); -CREATE TABLE t2 ( -idpro int(11) NOT NULL default '0', -price decimal(19,4) default NULL, -nbprice int(11) default NULL, -PRIMARY KEY (idpro) -); -INSERT INTO t1 VALUES -(1,1,'3.0000'), -(2,2,'1.0000'), -(3,1,'1.0000'), -(4,1,'4.0000'), -(5,3,'2.0000'), -(6,2,'4.0000'); -INSERT INTO t2 VALUES -(1,'0.0000',0), -(2,'0.0000',0), -(3,'0.0000',0); -update -t2 -join -( select idpro, min(price) as min_price, count(*) as nbr_price -from t1 -where idpro>0 and price>0 -group by idpro -) as table_price -on t2.idpro = table_price.idpro -set t2.price = table_price.min_price, -t2.nbprice = table_price.nbr_price; -select "-- MASTER AFTER JOIN --" as ""; - --- MASTER AFTER JOIN -- -select * from t1; -idp idpro price -1 1 3.0000 -2 2 1.0000 -3 1 1.0000 -4 1 4.0000 -5 3 2.0000 -6 2 4.0000 -select * from t2; -idpro price nbprice -1 1.0000 3 -2 1.0000 2 -3 2.0000 1 -select "-- SLAVE AFTER JOIN --" as ""; - --- SLAVE AFTER JOIN -- -select * from t1; -idp idpro price -1 1 3.0000 -2 2 1.0000 -3 1 1.0000 -4 1 4.0000 -5 3 2.0000 -6 2 4.0000 -select * from t2; -idpro price nbprice -1 1.0000 3 -2 1.0000 2 -3 2.0000 1 -DROP TABLE t1, t2; diff --git a/mysql-test/r/rpl_ndb_relayrotate.result b/mysql-test/r/rpl_ndb_relayrotate.result deleted file mode 100644 index 6aa64973611..00000000000 --- a/mysql-test/r/rpl_ndb_relayrotate.result +++ /dev/null @@ -1,16 +0,0 @@ -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; -stop slave; -create table t1 (a int) engine=NDB; -reset slave; -start slave; -stop slave; -start slave; -select max(a) from t1; -max(a) -8000 -drop table t1; diff --git a/mysql-test/r/rpl_ndb_rep_ignore.result b/mysql-test/r/rpl_ndb_rep_ignore.result deleted file mode 100644 index 4e28a7e5865..00000000000 --- a/mysql-test/r/rpl_ndb_rep_ignore.result +++ /dev/null @@ -1,54 +0,0 @@ -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; -DROP DATABASE IF EXISTS replica; -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -Tables_in_test -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -Tables_in_replica -t1 -t2 -SELECT COUNT(*) FROM t1; -COUNT(*) -1 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -SHOW TABLES; -Tables_in_test -USE replica; -SHOW TABLES; -Tables_in_replica -t2 -SELECT COUNT(*) FROM t2; -COUNT(*) -1 -USE test; -SHOW TABLES; -Tables_in_test -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; diff --git a/mysql-test/r/rpl_ndb_row_001.result b/mysql-test/r/rpl_ndb_row_001.result deleted file mode 100644 index 56bb31e329d..00000000000 --- a/mysql-test/r/rpl_ndb_row_001.result +++ /dev/null @@ -1,55 +0,0 @@ -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; -CREATE TABLE t1 (word CHAR(20) NOT NULL); -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/std_data/words.dat' INTO TABLE t1; -SELECT * FROM t1 ORDER BY word LIMIT 10; -word -Aarhus -Aarhus -Aarhus -Aarhus -Aaron -Aaron -Aaron -Aaron -Ababa -Ababa -STOP SLAVE; -SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); -START SLAVE; -SET PASSWORD FOR root@"localhost" = PASSWORD(''); -CREATE TABLE t3(n INT); -INSERT INTO t3 VALUES(1),(2); -SELECT * FROM t3 ORDER BY n; -n -1 -2 -SELECT SUM(LENGTH(word)) FROM t1; -SUM(LENGTH(word)) -1022 -DROP TABLE t1,t3; -CREATE TABLE t1 (n INT) ENGINE=NDB; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -LOCK TABLES t1 READ; -START SLAVE; -UNLOCK TABLES; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -DROP TABLE t1; -CREATE TABLE t1 (n INT); -INSERT INTO t1 VALUES(3456); -SELECT n FROM t1; -n -3456 -DROP TABLE t1; diff --git a/mysql-test/r/rpl_ndb_sp003.result b/mysql-test/r/rpl_ndb_sp003.result deleted file mode 100644 index d7922c61b52..00000000000 --- a/mysql-test/r/rpl_ndb_sp003.result +++ /dev/null @@ -1,49 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=NDBCLUSTER; -CREATE PROCEDURE test.p1() -BEGIN -INSERT INTO test.t1 VALUES (4); -SELECT get_lock("test", 100); -UPDATE test.t1 set a=a+4 WHERE a=4; -END| -CREATE PROCEDURE test.p2() -BEGIN -UPDATE test.t1 SET a=a+1; -END| -SELECT get_lock("test", 200); -get_lock("test", 200) -1 -CALL test.p1(); -CALL test.p2(); -SELECT release_lock("test"); -release_lock("test") -1 -SELECT * FROM test.t1; -a -5 -SELECT * FROM test.t1; -a -5 -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=NDBCLUSTER; -CALL test.p2(); -CALL test.p1(); -get_lock("test", 100) -0 -SELECT * FROM test.t1; -a -8 -SELECT * FROM test.t1; -a -8 -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/r/rpl_ndb_sp006.result b/mysql-test/r/rpl_ndb_sp006.result deleted file mode 100644 index 482d43c8f10..00000000000 --- a/mysql-test/r/rpl_ndb_sp006.result +++ /dev/null @@ -1,46 +0,0 @@ -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; -create database if not exists mysqltest1; -DROP PROCEDURE IF EXISTS mysqltest1.p1; -DROP PROCEDURE IF EXISTS mysqltest1.p2; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t1; -CREATE TABLE IF NOT EXISTS mysqltest1.t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=NDBCLUSTER; -CREATE TABLE IF NOT EXISTS mysqltest1.t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=NDBCLUSTER; -CREATE PROCEDURE mysqltest1.p1() -BEGIN -DECLARE done INT DEFAULT 0; -DECLARE spa CHAR(16); -DECLARE spb INT; -DECLARE cur1 CURSOR FOR SELECT name, -(YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5) -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 Query 1 # use `test`; insert into t1 values (1,2) -show binlog events from limit 1,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 445 COMMIT /* XID */ -begin; -insert into t1 values (2,3); -insert into t2 values (3,4); -commit; -select @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status; -@start_pos:=start_pos @end_pos:=end_pos - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 Query 1 # use `test`; BEGIN -show binlog events from limit 1,2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (2,3) -master-bin.000001 # Query # # use `test`; insert into t2 values (3,4) -show binlog events from limit 3,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ diff --git a/mysql-test/r/rpl_ndb_sync.result b/mysql-test/r/rpl_ndb_sync.result deleted file mode 100644 index f2797eaa623..00000000000 --- a/mysql-test/r/rpl_ndb_sync.result +++ /dev/null @@ -1,96 +0,0 @@ -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; -STOP SLAVE; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES (1,1,"row1"),(0,1,"row2"),(1,0,"row3"),(0,0,"row4"); -CREATE TABLE t2 (c1 CHAR(15), c2 BIT(1) NOT NULL, c3 BIT(1) NOT NULL, PRIMARY KEY(c1)) ENGINE = NDB ; -INSERT INTO t2 VALUES ("ABC",1,1),("BCDEF",0,1),("CD",1,0),("DEFGHIJKL",0,0); -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 1 row2 -1 0 row3 -0 0 row4 -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; -hex(c2) hex(c3) c1 -1 1 ABC -0 1 BCDEF -1 0 CD -0 0 DEFGHIJKL -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -DROP TABLE test.backup_info; -UPDATE t1 SET c2=0 WHERE c3="row2"; -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 0 row2 -1 0 row3 -0 0 row4 -SHOW TABLES; -Tables_in_ndbsynctest -DROP DATABASE ndbsynctest; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -SHOW TABLES; -Tables_in_ndbsynctest -t1 -t2 -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 1 row2 -1 0 row3 -0 0 row4 -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; -hex(c2) hex(c3) c1 -1 1 ABC -0 1 BCDEF -1 0 CD -0 0 DEFGHIJKL -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -@the_epoch:=MAX(epoch) - -SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) -FROM mysql.ndb_binlog_index WHERE epoch > ORDER BY epoch ASC LIMIT 1; -@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) - master-bin.000001 -CHANGE MASTER TO -master_log_file = 'master-bin.000001', -master_log_pos = ; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -hex(c1) hex(c2) c3 -1 1 row1 -0 0 row2 -1 0 row3 -0 0 row4 -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; -hex(c2) hex(c3) c1 -1 1 ABC -0 1 BCDEF -1 0 CD -0 0 DEFGHIJKL -DROP DATABASE ndbsynctest; -STOP SLAVE; -reset master; -select * from mysql.ndb_binlog_index; -Position File epoch inserts updates deletes schemaops -reset slave; -select * from mysql.ndb_apply_status; -server_id epoch log_name start_pos end_pos diff --git a/mysql-test/r/rpl_ndb_trig004.result b/mysql-test/r/rpl_ndb_trig004.result deleted file mode 100644 index ba5f0dea91c..00000000000 --- a/mysql-test/r/rpl_ndb_trig004.result +++ /dev/null @@ -1,30 +0,0 @@ -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; -DROP TRIGGER test.t1_bi_t2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=NDB; -CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=NDB; -CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)// -INSERT INTO test.t2 VALUES (1, 0.0); -INSERT INTO test.t2 VALUES (1, 0.0); -Got one of the listed errors -select * from test.t1; -n d -1 1.234 -select * from test.t2; -n f -1 0 -select * from test.t1; -n d -1 1.234 -select * from test.t2; -n f -1 0 -DROP TRIGGER test.t1_bi_t2; -DROP TABLE test.t1; -DROP TABLE test.t2; diff --git a/mysql-test/r/rpl_ndbapi_multi.result b/mysql-test/r/rpl_ndbapi_multi.result deleted file mode 100644 index 5de6914882d..00000000000 --- a/mysql-test/r/rpl_ndbapi_multi.result +++ /dev/null @@ -1,8 +0,0 @@ -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; -Running ndbapi_simple_dual -Running mgmapi_logevent diff --git a/mysql-test/r/rpl_optimize.result b/mysql-test/r/rpl_optimize.result deleted file mode 100644 index 79891169fbc..00000000000 --- a/mysql-test/r/rpl_optimize.result +++ /dev/null @@ -1,27 +0,0 @@ -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; -create table t1 (a int not null auto_increment primary key, b int, key(b)); -INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -update t1 set b=(a/2*rand()); -delete from t1 order by b limit 10000; -optimize table t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -drop table t1; diff --git a/mysql-test/r/rpl_packet.result b/mysql-test/r/rpl_packet.result deleted file mode 100644 index 981c234d380..00000000000 --- a/mysql-test/r/rpl_packet.result +++ /dev/null @@ -1,32 +0,0 @@ -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; -drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; -create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; -select @@net_buffer_length, @@max_allowed_packet; -@@net_buffer_length @@max_allowed_packet -1024 1024 -create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM; -INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023'); -select count(*) from `DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________`.`t1` /* must be 1 */; -count(*) -1 -SHOW STATUS LIKE 'Slave_running'; -Variable_name Value -Slave_running ON -select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; -VARIABLE_NAME VARIABLE_VALUE -SLAVE_RUNNING ON -drop database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; -SET @@global.max_allowed_packet=4096; -SET @@global.net_buffer_length=4096; -STOP SLAVE; -START SLAVE; -CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM; -INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); -SHOW STATUS LIKE 'Slave_running'; -Variable_name Value -Slave_running OFF diff --git a/mysql-test/r/rpl_ps.result b/mysql-test/r/rpl_ps.result deleted file mode 100644 index 73c36af4862..00000000000 --- a/mysql-test/r/rpl_ps.result +++ /dev/null @@ -1,30 +0,0 @@ -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; -drop table if exists t1; -create table t1(n char(30)); -prepare stmt1 from 'insert into t1 values (?)'; -set @var1= "from-master-1"; -execute stmt1 using @var1; -set @var1= "from-master-2-'',"; -execute stmt1 using @var1; -SELECT * FROM t1 ORDER BY n; -n -from-master-1 -from-master-2-'', -set @var2= 'insert into t1 values (concat("from-var-", ?))'; -prepare stmt2 from @var2; -set @var1='from-master-3'; -execute stmt2 using @var1; -SELECT * FROM t1 ORDER BY n; -n -from-master-1 -from-master-2-'', -from-var-from-master-3 -drop table t1; -stop slave; -reset master; -reset slave; diff --git a/mysql-test/r/rpl_rbr_to_sbr.result b/mysql-test/r/rpl_rbr_to_sbr.result deleted file mode 100644 index 47adb70bcf5..00000000000 --- a/mysql-test/r/rpl_rbr_to_sbr.result +++ /dev/null @@ -1,67 +0,0 @@ -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 BINLOG_FORMAT=MIXED; -SET GLOBAL BINLOG_FORMAT=MIXED; -SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT; -@@GLOBAL.BINLOG_FORMAT @@SESSION.BINLOG_FORMAT -MIXED MIXED -**** On Master **** -CREATE TABLE t1 (a INT, b LONG); -INSERT INTO t1 VALUES (1,1), (2,2); -INSERT INTO t1 VALUES (3,UUID()), (4,UUID()); -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) -master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -**** On Slave **** -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 454 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 454 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9 -slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) -slave-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -slave-bin.000001 # Table_map 1 # table_id: # (test.t1) -slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_read_only.result b/mysql-test/r/rpl_read_only.result deleted file mode 100644 index 6b1404b4f68..00000000000 --- a/mysql-test/r/rpl_read_only.result +++ /dev/null @@ -1,116 +0,0 @@ -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; -create user test; -create table t1(a int) engine=InnoDB; -create table t2(a int) engine=MyISAM; -insert into t1 values(1001); -insert into t2 values(2001); -set global read_only=1; -select @@read_only; -@@read_only -1 -select * from t1; -a -1001 -select * from t2; -a -2001 -select @@read_only; -@@read_only -0 -select * from t1; -a -1001 -select * from t2; -a -2001 -set global read_only=0; -BEGIN; -insert into t1 values(1002); -insert into t2 values(2002); -BEGIN; -insert into t1 values(1003); -insert into t2 values(2003); -set global read_only=1; -COMMIT; -COMMIT; -ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement -set global read_only=0; -insert into t1 values(1004); -insert into t2 values(2004); -select * from t1; -a -1001 -1002 -1004 -select * from t2; -a -2001 -2002 -2003 -2004 -select * from t1; -a -1001 -1002 -1004 -select * from t2; -a -2001 -2002 -2003 -2004 -set global read_only=1; -select @@read_only; -@@read_only -1 -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -insert into t1 values(1005); -insert into t2 values(2005); -select * from t1; -a -1001 -1002 -1004 -1005 -select * from t2; -a -2001 -2002 -2003 -2004 -2005 -select * from t1; -a -1001 -1002 -1004 -1005 -select * from t2; -a -2001 -2002 -2003 -2004 -2005 -insert into t1 values(1006); -ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement -insert into t2 values(2006); -ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement -drop user test; -drop table t1; -drop table t2; -set global read_only=0; diff --git a/mysql-test/r/rpl_redirect.result b/mysql-test/r/rpl_redirect.result deleted file mode 100644 index 64866df1c15..00000000000 --- a/mysql-test/r/rpl_redirect.result +++ /dev/null @@ -1,41 +0,0 @@ -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; -SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -SHOW SLAVE HOSTS; -Server_id Host Port Rpl_recovery_rank Master_id -2 127.0.0.1 SLAVE_PORT 2 1 -create table t1 ( n int); -insert into t1 values (1),(2),(3),(4); -insert into t1 values(5); -SELECT * FROM t1 ORDER BY n; -n -1 -2 -3 -4 -5 -SELECT * FROM t1 ORDER BY n; -n -1 -2 -3 -4 -SELECT * FROM t1 ORDER BY n; -n -1 -2 -3 -4 -SELECT * FROM t1 ORDER BY n; -n -1 -2 -3 -4 -5 -drop table t1; diff --git a/mysql-test/r/rpl_relay_space_innodb.result b/mysql-test/r/rpl_relay_space_innodb.result deleted file mode 100644 index 54aac2eca35..00000000000 --- a/mysql-test/r/rpl_relay_space_innodb.result +++ /dev/null @@ -1,25 +0,0 @@ -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; -SHOW VARIABLES LIKE 'relay_log_space_limit'; -Variable_name Value -relay_log_space_limit 0 -CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=InnoDB; -INSERT INTO t1 SET name='Andy', age=31; -INSERT INTO t1 SET name='Jacob', age=2; -INSERT INTO t1 SET name='Caleb', age=1; -ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; -SELECT * FROM t1 ORDER BY id; -name age id -Andy 31 00000001 -Jacob 2 00000002 -Caleb 1 00000003 -SELECT * FROM t1 ORDER BY id; -name age id -Andy 31 00000001 -Jacob 2 00000002 -Caleb 1 00000003 -DROP TABLE t1; diff --git a/mysql-test/r/rpl_relay_space_myisam.result b/mysql-test/r/rpl_relay_space_myisam.result deleted file mode 100644 index e8d2d63e46e..00000000000 --- a/mysql-test/r/rpl_relay_space_myisam.result +++ /dev/null @@ -1,25 +0,0 @@ -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; -SHOW VARIABLES LIKE 'relay_log_space_limit'; -Variable_name Value -relay_log_space_limit 0 -CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=MyISAM; -INSERT INTO t1 SET name='Andy', age=31; -INSERT INTO t1 SET name='Jacob', age=2; -INSERT INTO t1 SET name='Caleb', age=1; -ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; -SELECT * FROM t1 ORDER BY id; -name age id -Andy 31 00000001 -Jacob 2 00000002 -Caleb 1 00000003 -SELECT * FROM t1 ORDER BY id; -name age id -Andy 31 00000001 -Jacob 2 00000002 -Caleb 1 00000003 -DROP TABLE t1; diff --git a/mysql-test/r/rpl_relayrotate.result b/mysql-test/r/rpl_relayrotate.result deleted file mode 100644 index 20f19973d83..00000000000 --- a/mysql-test/r/rpl_relayrotate.result +++ /dev/null @@ -1,16 +0,0 @@ -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; -stop slave; -create table t1 (a int) engine=innodb; -reset slave; -start slave; -stop slave; -start slave; -select max(a) from t1; -max(a) -8000 -drop table t1; diff --git a/mysql-test/r/rpl_relayspace.result b/mysql-test/r/rpl_relayspace.result deleted file mode 100644 index 1f2a739d3e3..00000000000 --- a/mysql-test/r/rpl_relayspace.result +++ /dev/null @@ -1,19 +0,0 @@ -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; -stop slave; -create table t1 (a int); -drop table t1; -create table t1 (a int); -drop table t1; -reset slave; -start slave io_thread; -stop slave io_thread; -reset slave; -start slave; -select master_pos_wait('master-bin.001',200,6)=-1; -master_pos_wait('master-bin.001',200,6)=-1 -0 diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result deleted file mode 100644 index fa4f7e224d1..00000000000 --- a/mysql-test/r/rpl_replicate_do.result +++ /dev/null @@ -1,77 +0,0 @@ -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; -drop table if exists t11; -drop table if exists t11; -create table t2 (n int); -insert into t2 values(4); -create table t2 (s char(20)); -load data infile '../std_data_ln/words.dat' into table t2; -insert into t2 values('five'); -create table t1 (m int); -insert into t1 values(15),(16),(17); -update t1 set m=20 where m=16; -delete from t1 where m=17; -create table t11 select * from t1; -select * from t1 ORDER BY m; -m -15 -20 -select * from t2; -n -4 -select * from t11; -ERROR 42S02: Table 'test.t11' doesn't exist -drop table if exists t1,t2,t11; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 # # # master-bin.000001 Yes Yes test.t1 # 0 0 # # None 0 No # No -create table t1 (ts timestamp); -set one_shot time_zone='met'; -insert into t1 values('2005-08-12 00:00:00'); -set one_shot time_zone='met'; -select * from t1; -ts -2005-08-12 00:00:00 -set one_shot time_zone='met'; -select * from t1; -ts -2005-08-12 00:00:00 -drop table t1; -*** master *** -create table t1 (a int, b int); -create trigger trg1 before insert on t1 for each row set new.b=2; -create table t2 (a int, b int); -create trigger trg2 before insert on t2 for each row set new.b=2; -show tables; -Tables_in_test -t1 -t2 -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer -trg1 INSERT t1 set new.b=2 BEFORE NULL root@localhost -trg2 INSERT t2 set new.b=2 BEFORE NULL root@localhost -*** slave *** -show tables; -Tables_in_test -t1 -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer -trg1 INSERT t1 set new.b=2 BEFORE NULL root@localhost -*** master *** -drop trigger trg1; -drop trigger trg2; -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer -*** slave *** -show tables; -Tables_in_test -t1 -show triggers; -Trigger Event Table Statement Timing Created sql_mode Definer -*** master *** -drop table t1; -drop table t2; diff --git a/mysql-test/r/rpl_replicate_ignore_db.result b/mysql-test/r/rpl_replicate_ignore_db.result deleted file mode 100644 index 0135804c02d..00000000000 --- a/mysql-test/r/rpl_replicate_ignore_db.result +++ /dev/null @@ -1,23 +0,0 @@ -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; -drop database if exists mysqltest1; -drop database if exists mysqltest2; -create database mysqltest1; -create database mysqltest2; -use mysqltest1; -create table t1 (a int); -insert into t1 values(1); -select * from mysqltest1.t1; -ERROR 42S02: Table 'mysqltest1.t1' doesn't exist -use mysqltest2; -create table t1 (a int); -insert into t1 values(1); -select * from mysqltest2.t1; -a -1 -drop database mysqltest1; -drop database mysqltest2; diff --git a/mysql-test/r/rpl_rewrt_db.result b/mysql-test/r/rpl_rewrt_db.result deleted file mode 100644 index 1b843bffdca..00000000000 --- a/mysql-test/r/rpl_rewrt_db.result +++ /dev/null @@ -1,94 +0,0 @@ -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; -drop database if exists mysqltest1; -create database mysqltest1; -use mysqltest1; -create table t1 (a int); -insert into t1 values(9); -select * from mysqltest1.t1; -a -9 -show databases like 'mysqltest1'; -Database (mysqltest1) -mysqltest1 -select * from test.t1; -a -9 -drop table t1; -drop database mysqltest1; -drop database if exists rewrite; -create database rewrite; -use test; -create table t1 (a date, b date, c date not null, d date); -load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ','; -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -Warning 1265 Data truncated for column 'c' at row 1 -Warning 1265 Data truncated for column 'd' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 -Warning 1265 Data truncated for column 'b' at row 2 -Warning 1265 Data truncated for column 'd' at row 2 -load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; -select * from rewrite.t1; -a b c d -0000-00-00 NULL 0000-00-00 0000-00-00 -0000-00-00 0000-00-00 0000-00-00 0000-00-00 -2003-03-03 2003-03-03 2003-03-03 NULL -2003-03-03 2003-03-03 2003-03-03 NULL -truncate table t1; -load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); -Warnings: -Warning 1265 Data truncated for column 'c' at row 1 -Warning 1265 Data truncated for column 'd' at row 1 -Warning 1265 Data truncated for column 'b' at row 2 -Warning 1265 Data truncated for column 'd' at row 2 -select * from rewrite.t1; -a b c d -NULL NULL 0000-00-00 0000-00-00 -NULL 0000-00-00 0000-00-00 0000-00-00 -NULL 2003-03-03 2003-03-03 NULL -drop table t1; -create table t1 (a text, b text); -load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; -Warnings: -Warning 1261 Row 3 doesn't contain data for all columns -select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1; -concat('|',a,'|') concat('|',b,'|') -|Field A| |Field B| -|Field 1| |Field 2' -Field 3,'Field 4| -|Field 5' ,'Field 6| NULL -|Field 6| | 'Field 7'| -drop table t1; -create table t1 (a int, b char(10)); -load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; -Warnings: -Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3 -Warning 1262 Row 3 was truncated; it contained more data than there were input columns -Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 5 -Warning 1262 Row 5 was truncated; it contained more data than there were input columns -select * from rewrite.t1; -a b -1 row 1 -2 row 2 -0 1234567890 -3 row 3 -0 1234567890 -truncate table t1; -load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; -Warnings: -Warning 1366 Incorrect integer value: ' -' for column 'a' at row 4 -Warning 1261 Row 4 doesn't contain data for all columns -select * from rewrite.t1; -a b -1 row 1 -2 row 2 -3 row 3 -0 -drop database rewrite; -drop table t1; diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result deleted file mode 100644 index f82a1a69060..00000000000 --- a/mysql-test/r/rpl_rotate_logs.result +++ /dev/null @@ -1,97 +0,0 @@ -drop table if exists t1, t2, t3, t4; -drop table if exists t1, t2, t3, t4; -start slave; -Got one of the listed errors -start slave; -ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log -change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; -ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log -reset slave; -change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; -reset master; -start slave; -create temporary table temp_table (a char(80) not null); -insert into temp_table values ("testing temporary tables"); -create table t1 (s text); -insert into t1 values('Could not break slave'),('Tried hard'); -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 556 # # master-bin.000001 Yes Yes # 0 0 556 # None 0 No # No -select * from t1; -s -Could not break slave -Tried hard -flush logs; -create table t2(m int not null auto_increment primary key); -insert into t2 values (34),(67),(123); -flush logs; -show binary logs; -Log_name File_size -master-bin.000001 600 -master-bin.000002 371 -master-bin.000003 106 -create table t3 select * from temp_table; -select * from t3; -a -testing temporary tables -drop table temp_table, t3; -insert into t2 values(1234); -set insert_id=1234; -insert into t2 values(NULL); -set global sql_slave_skip_counter=1; -start slave; -purge master logs to 'master-bin.000002'; -show master logs; -Log_name File_size -master-bin.000002 371 -master-bin.000003 415 -purge binary logs to 'master-bin.000002'; -show binary logs; -Log_name File_size -master-bin.000002 371 -master-bin.000003 415 -select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND) -from information_schema.tables -where TABLE_SCHEMA="test" and TABLE_NAME="t2"; -purge master logs before (@time_for_purge); -show binary logs; -Log_name File_size -master-bin.000003 415 -insert into t2 values (65); -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 504 # # master-bin.000003 Yes Yes # 0 0 504 # None 0 No # No -select * from t2; -m -34 -65 -67 -123 -1234 -create temporary table temp_table (a char(80) not null); -insert into temp_table values ("testing temporary tables part 2"); -create table t3 (n int); -select count(*) from t3 where n >= 4; -count(*) -100 -create table t4 select * from temp_table; -show binary logs; -Log_name File_size -master-bin.000003 4193 -master-bin.000004 4198 -master-bin.000005 2040 -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000005 2040 -select * from t4; -a -testing temporary tables part 2 -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2040 # # master-bin.000005 Yes Yes # 0 0 2040 # None 0 No # No -lock tables t3 read; -select count(*) from t3 where n >= 4; -count(*) -100 -unlock tables; -drop table if exists t1,t2,t3,t4; diff --git a/mysql-test/r/rpl_row_001.result b/mysql-test/r/rpl_row_001.result deleted file mode 100644 index fad60af664f..00000000000 --- a/mysql-test/r/rpl_row_001.result +++ /dev/null @@ -1,55 +0,0 @@ -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; -CREATE TABLE t1 (word CHAR(20) NOT NULL); -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/std_data/words.dat' INTO TABLE t1; -SELECT * FROM t1 ORDER BY word LIMIT 10; -word -Aarhus -Aarhus -Aarhus -Aarhus -Aaron -Aaron -Aaron -Aaron -Ababa -Ababa -STOP SLAVE; -SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); -START SLAVE; -SET PASSWORD FOR root@"localhost" = PASSWORD(''); -CREATE TABLE t3(n INT); -INSERT INTO t3 VALUES(1),(2); -SELECT * FROM t3 ORDER BY n; -n -1 -2 -SELECT SUM(LENGTH(word)) FROM t1; -SUM(LENGTH(word)) -1022 -DROP TABLE t1,t3; -CREATE TABLE t1 (n INT) ENGINE=MYISAM; -RESET MASTER; -STOP SLAVE; -RESET SLAVE; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -LOCK TABLES t1 READ; -START SLAVE; -UNLOCK TABLES; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -DROP TABLE t1; -CREATE TABLE t1 (n INT); -INSERT INTO t1 VALUES(3456); -SELECT n FROM t1; -n -3456 -DROP TABLE t1; diff --git a/mysql-test/r/rpl_row_4_bytes.result b/mysql-test/r/rpl_row_4_bytes.result deleted file mode 100644 index e2431364ed3..00000000000 --- a/mysql-test/r/rpl_row_4_bytes.result +++ /dev/null @@ -1,27 +0,0 @@ -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; -drop database if exists mysqltest1; -create database mysqltest1; -use mysqltest1; -CREATE TABLE t1 (a char(3)); -CREATE TABLE t2 (a char(3)); -insert into t1 values("ANN"); -insert into t1 values("GUI"); -insert into t2 values("LIL"); -insert into t2 values("ABE"); -insert into t2 values("ANG"); -use mysqltest1; -select * from t1 order by a; -a -ANN -GUI -select * from t2 order by a; -a -ABE -ANG -LIL -DROP DATABASE mysqltest1; diff --git a/mysql-test/r/rpl_row_NOW.result b/mysql-test/r/rpl_row_NOW.result deleted file mode 100644 index 23f95878608..00000000000 --- a/mysql-test/r/rpl_row_NOW.result +++ /dev/null @@ -1,29 +0,0 @@ -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; -create database if not exists mysqltest1; -DROP TABLE IF EXISTS mysqltest1.t1; -CREATE TABLE mysqltest1.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, -a TIMESTAMP DEFAULT '2005-05-05 01:01:01', -b TIMESTAMP DEFAULT '2005-05-05 01:01:01', -PRIMARY KEY(n)); -CREATE FUNCTION mysqltest1.f1() RETURNS TIMESTAMP -BEGIN -DECLARE v1 INT DEFAULT 300; -WHILE v1 > 0 DO -SET v1 = v1 - 1; -END WHILE; -RETURN NOW(); -END| -INSERT INTO mysqltest1.t1 VALUES(NULL,NOW(),mysqltest1.f1()); -CREATE TRIGGER mysqltest1.trig1 BEFORE INSERT ON mysqltest1.t1 -FOR EACH ROW BEGIN -SET new.b = mysqltest1.f1(); -END| -INSERT INTO mysqltest1.t1 SET n = NULL, a = now(); -DROP TABLE IF EXISTS mysqltest1.t1; -DROP FUNCTION mysqltest1.f1; -DROP DATABASE mysqltest1; diff --git a/mysql-test/r/rpl_row_USER.result b/mysql-test/r/rpl_row_USER.result deleted file mode 100644 index 98755fb4653..00000000000 --- a/mysql-test/r/rpl_row_USER.result +++ /dev/null @@ -1,38 +0,0 @@ -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; -DROP DATABASE IF EXISTS mysqltest1; -CREATE DATABASE mysqltest1; -CREATE USER tester IDENTIFIED BY 'test'; -GRANT ALL ON mysqltest1.* TO 'tester'@'%' IDENTIFIED BY 'test'; -GRANT ALL ON mysqltest1.* TO ''@'localhost%'; -FLUSH PRIVILEGES; -CREATE TABLE mysqltest1.t1 (a INT, users VARCHAR(255), PRIMARY KEY(a)); -INSERT INTO mysqltest1.t1 VALUES(1,USER()); -INSERT INTO mysqltest1.t1 VALUES(2,CURRENT_USER()); -create procedure mysqltest1.p1() -begin -INSERT INTO mysqltest1.t1 VALUES(3,USER()); -INSERT INTO mysqltest1.t1 VALUES(4,CURRENT_USER()); -end| -CALL mysqltest1.p1(); -SELECT * FROM mysqltest1.t1 ORDER BY a; -a users -1 tester@localhost -2 @localhost% -3 tester@localhost -4 @localhost% -SELECT * FROM mysqltest1.t1 ORDER BY a; -a users -1 tester@localhost -2 @localhost% -3 tester@localhost -4 @localhost% -DROP DATABASE mysqltest1; -REVOKE ALL ON mysqltest1.* FROM 'tester'@'%'; -REVOKE ALL ON mysqltest1.* FROM ''@'localhost%'; -DROP USER tester@'%'; -DROP USER ''@'localhost%'; diff --git a/mysql-test/r/rpl_row_UUID.result b/mysql-test/r/rpl_row_UUID.result deleted file mode 100644 index f56dc145901..00000000000 --- a/mysql-test/r/rpl_row_UUID.result +++ /dev/null @@ -1,40 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=myisam; -INSERT INTO test.t1 VALUES(1,UUID(),UUID()); -create procedure test.p1() -begin -INSERT INTO test.t1 VALUES(2,UUID(),UUID()); -INSERT INTO test.t1 VALUES(3,UUID(),UUID()); -end| -CALL test.p1(); -create function test.fn1(x int) -returns int -begin -insert into t1 values (4+x,UUID(),UUID()); -insert into t1 values (5+x,UUID(),UUID()); -return 0; -end| -select fn1(0); -fn1(0) -0 -create table t2 (a int); -insert into t2 values(fn1(2)); -SHOW CREATE TABLE test.t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL DEFAULT '0', - `blob_column` longblob, - `vchar_column` varchar(100) DEFAULT NULL, - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP PROCEDURE test.p1; -DROP FUNCTION test.fn1; -DROP TABLE test.t1; -DROP TABLE test.t2; diff --git a/mysql-test/r/rpl_row_basic_11bugs-master.opt b/mysql-test/r/rpl_row_basic_11bugs-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/r/rpl_row_basic_11bugs-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/r/rpl_row_basic_11bugs-slave.opt b/mysql-test/r/rpl_row_basic_11bugs-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/r/rpl_row_basic_11bugs-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/r/rpl_row_basic_11bugs.result b/mysql-test/r/rpl_row_basic_11bugs.result deleted file mode 100644 index 1025b965589..00000000000 --- a/mysql-test/r/rpl_row_basic_11bugs.result +++ /dev/null @@ -1,220 +0,0 @@ -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; -CREATE DATABASE test_ignore; -**** On Master **** -SHOW DATABASES; -Database -information_schema -mysql -test -test_ignore -USE test; -CREATE TABLE t1 (a INT, b INT); -SHOW TABLES; -Tables_in_test -t1 -INSERT INTO t1 VALUES (1,1), (2,2); -USE test_ignore; -CREATE TABLE t2 (a INT, b INT); -SHOW TABLES; -Tables_in_test_ignore -t2 -INSERT INTO t2 VALUES (3,3), (4,4); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -**** On Slave **** -SHOW DATABASES; -Database -information_schema -mysql -test -USE test; -SHOW TABLES; -Tables_in_test -t1 -USE test_ignore; -ERROR 42000: Unknown database 'test_ignore' -DROP DATABASE test_ignore; -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; -CREATE TABLE t1 (a INT); -DELETE FROM t1; -INSERT INTO t1 VALUES (1),(2); -DELETE FROM t1 WHERE a = 0; -UPDATE t1 SET a=99 WHERE a = 0; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a INT) -master-bin.000001 192 Table_map 1 231 table_id: # (test.t1) -master-bin.000001 231 Write_rows 1 270 table_id: # flags: STMT_END_F -DROP TABLE t1; -================ Test for BUG#17620 ================ -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; -**** On Slave **** -SET GLOBAL QUERY_CACHE_SIZE=0; -**** On Master **** -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3); -**** On Slave **** -SET GLOBAL QUERY_CACHE_SIZE=16*1024*1024; -**** On Master **** -INSERT INTO t1 VALUES (4),(5),(6); -**** On Slave **** -SELECT * FROM t1; -a -1 -2 -3 -4 -5 -6 -**** On Master **** -INSERT INTO t1 VALUES (7),(8),(9); -**** On Slave **** -SELECT * FROM t1; -a -1 -2 -3 -4 -5 -6 -7 -8 -9 -SET GLOBAL QUERY_CACHE_SIZE=0; -================ Test for BUG#22550 ================ -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; -CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; -INSERT INTO t1 VALUES(1,2); -SELECT HEX(a),b FROM t1; -HEX(a) b -1 2 -SELECT HEX(a),b FROM t1; -HEX(a) b -1 2 -UPDATE t1 SET a=0 WHERE b=2; -SELECT HEX(a),b FROM t1; -HEX(a) b -0 2 -SELECT HEX(a),b FROM t1; -HEX(a) b -0 2 -DROP TABLE IF EXISTS t1; -================ Test for BUG#22583 ================ -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; -**** On Master **** -CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM; -CREATE TABLE t1_innodb (k INT, a BIT(1), b BIT(9)) ENGINE=INNODB; -CREATE TABLE t2_myisam (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=MYISAM; -CREATE TABLE t2_innodb (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=INNODB; -**** On Slave **** -ALTER TABLE t1_myisam ENGINE=INNODB; -ALTER TABLE t1_innodb ENGINE=MYISAM; -ALTER TABLE t2_myisam ENGINE=INNODB; -ALTER TABLE t2_innodb ENGINE=MYISAM; -**** On Master **** -INSERT INTO t1_myisam VALUES(1, b'0', 257); -INSERT INTO t1_myisam VALUES(2, b'1', 256); -INSERT INTO t1_innodb VALUES(1, b'0', 257); -INSERT INTO t1_innodb VALUES(2, b'1', 256); -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -k HEX(a) HEX(b) -1 0 101 -2 1 100 -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -k HEX(a) HEX(b) -1 0 101 -2 1 100 -INSERT INTO t2_myisam VALUES(1, b'0', 9); -INSERT INTO t2_myisam VALUES(2, b'1', 8); -INSERT INTO t2_innodb VALUES(1, b'0', 9); -INSERT INTO t2_innodb VALUES(2, b'1', 8); -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -k HEX(a) HEX(b) -1 0 9 -2 1 8 -SELECT k, HEX(a),HEX(b) FROM t2_innodb; -k HEX(a) HEX(b) -1 0 9 -2 1 8 -**** On Slave **** -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -k HEX(a) HEX(b) -1 0 101 -2 1 100 -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -k HEX(a) HEX(b) -1 0 101 -2 1 100 -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -k HEX(a) HEX(b) -1 0 9 -2 1 8 -SELECT k, HEX(a),HEX(b) FROM t2_innodb; -k HEX(a) HEX(b) -1 0 9 -2 1 8 -**** On Master **** -UPDATE t1_myisam SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -k HEX(a) HEX(b) -1 0 101 -2 0 100 -UPDATE t1_innodb SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -k HEX(a) HEX(b) -1 0 101 -2 0 100 -UPDATE t2_myisam SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -k HEX(a) HEX(b) -1 0 9 -2 0 8 -UPDATE t2_innodb SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t2_innodb; -k HEX(a) HEX(b) -1 0 9 -2 0 8 -**** On Slave **** -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -k HEX(a) HEX(b) -1 0 101 -2 0 100 -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -k HEX(a) HEX(b) -1 0 101 -2 0 100 -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -k HEX(a) HEX(b) -1 0 9 -2 0 8 -SELECT k, HEX(a),HEX(b) FROM t2_innodb; -k HEX(a) HEX(b) -1 0 9 -2 0 8 -**** On Master **** -DROP TABLE IF EXISTS t1_myisam, t1_innodb, t2_myisam, t2_innodb; diff --git a/mysql-test/r/rpl_row_basic_2myisam.result b/mysql-test/r/rpl_row_basic_2myisam.result deleted file mode 100644 index a6877b27b95..00000000000 --- a/mysql-test/r/rpl_row_basic_2myisam.result +++ /dev/null @@ -1,418 +0,0 @@ -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; -CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'MYISAM' ; -SELECT * FROM t1; -C1 C2 -SELECT * FROM t1; -C1 C2 -INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); -INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A'); -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A A -A B -A C -X X -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A A -A B -A C -X X -X Y -X Z -DELETE FROM t1 WHERE C1 = C2; -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A C -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A C -X Y -X Z -UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A I -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A I -X Y -X Z -UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N'; -SELECT * FROM t1 ORDER BY c1,c2; -C1 C2 -A B -A I -X Y -X Z -SELECT * FROM t1 ORDER BY c1,c2; -C1 C2 -A B -A I -X Y -X Z -CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'MYISAM' ; -INSERT INTO t2 -VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), -(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81); -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 2 -2 A 4 -3 A 9 -4 A 15 -5 A 25 -6 A 35 -7 A 50 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -2 A 4 -3 A 9 -5 A 25 -8 A 64 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 2 -2 A 4 -3 A 9 -4 A 15 -5 A 25 -6 A 35 -7 A 50 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -2 A 4 -3 A 9 -5 A 25 -8 A 64 -9 A 81 -UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1; -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999; -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -DELETE FROM t2 WHERE c1 % 4 = 0; -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -5 A 25 -6 A 36 -7 A 49 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -5 A 25 -6 A 36 -7 A 49 -9 A 81 -UPDATE t2 SET c12='X'; -CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'MYISAM' ; -INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1); -INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2); -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A A 3 B 2 -A B 1 B 1 -A C 1 B 2 -X X 3 B 1 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A A 3 B 2 -A B 1 B 1 -A C 1 B 2 -X X 3 B 1 -X Y 2 B 1 -X Z 2 B 2 -DELETE FROM t3 WHERE C1 = C2; -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A C 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A C 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A I 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A I 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'MYISAM' ; -INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); -INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -X X 3 -A C 4 -X Z 5 -A A 6 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -X X 3 -A C 4 -X Z 5 -A A 6 -DELETE FROM t6 WHERE C1 = C2; -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A C 4 -X Z 5 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A C 4 -X Z 5 -UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A I 4 -X Z 5 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A I 4 -X Z 5 -CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'MYISAM' ; -INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); -INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); -UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1; -SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; -C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 -X Q 2 1 R 1 X Y 2 S 1 -X Q 2 1 R 1 X Z 2 S 2 -X Q 2 2 R 4 X Y 2 S 1 -X Q 2 2 R 4 X Z 2 S 2 -X Q 2 3 R 9 X Y 2 S 1 -X Q 2 3 R 9 X Z 2 S 2 -X Q 2 5 R 25 X Y 2 S 1 -X Q 2 5 R 25 X Z 2 S 2 -X Q 2 6 R 36 X Y 2 S 1 -X Q 2 6 R 36 X Z 2 S 2 -X Q 2 7 R 49 X Y 2 S 1 -X Q 2 7 R 49 X Z 2 S 2 -X Q 2 9 R 81 X Y 2 S 1 -X Q 2 9 R 81 X Z 2 S 2 -X Q 3 1 R 1 X Y 2 S 1 -X Q 3 1 R 1 X Z 2 S 2 -X Q 3 2 R 4 X Y 2 S 1 -X Q 3 2 R 4 X Z 2 S 2 -X Q 3 3 R 9 X Y 2 S 1 -X Q 3 3 R 9 X Z 2 S 2 -X Q 3 5 R 25 X Y 2 S 1 -X Q 3 5 R 25 X Z 2 S 2 -X Q 3 6 R 36 X Y 2 S 1 -X Q 3 6 R 36 X Z 2 S 2 -X Q 3 7 R 49 X Y 2 S 1 -X Q 3 7 R 49 X Z 2 S 2 -X Q 3 9 R 81 X Y 2 S 1 -X Q 3 9 R 81 X Z 2 S 2 -X Q 5 1 R 1 X Y 2 S 1 -X Q 5 1 R 1 X Z 2 S 2 -X Q 5 2 R 4 X Y 2 S 1 -X Q 5 2 R 4 X Z 2 S 2 -X Q 5 3 R 9 X Y 2 S 1 -X Q 5 3 R 9 X Z 2 S 2 -X Q 5 5 R 25 X Y 2 S 1 -X Q 5 5 R 25 X Z 2 S 2 -X Q 5 6 R 36 X Y 2 S 1 -X Q 5 6 R 36 X Z 2 S 2 -X Q 5 7 R 49 X Y 2 S 1 -X Q 5 7 R 49 X Z 2 S 2 -X Q 5 9 R 81 X Y 2 S 1 -X Q 5 9 R 81 X Z 2 S 2 -SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; -C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 -X Q 2 1 R 1 X Y 2 S 1 -X Q 2 1 R 1 X Z 2 S 2 -X Q 2 2 R 4 X Y 2 S 1 -X Q 2 2 R 4 X Z 2 S 2 -X Q 2 3 R 9 X Y 2 S 1 -X Q 2 3 R 9 X Z 2 S 2 -X Q 2 5 R 25 X Y 2 S 1 -X Q 2 5 R 25 X Z 2 S 2 -X Q 2 6 R 36 X Y 2 S 1 -X Q 2 6 R 36 X Z 2 S 2 -X Q 2 7 R 49 X Y 2 S 1 -X Q 2 7 R 49 X Z 2 S 2 -X Q 2 9 R 81 X Y 2 S 1 -X Q 2 9 R 81 X Z 2 S 2 -X Q 3 1 R 1 X Y 2 S 1 -X Q 3 1 R 1 X Z 2 S 2 -X Q 3 2 R 4 X Y 2 S 1 -X Q 3 2 R 4 X Z 2 S 2 -X Q 3 3 R 9 X Y 2 S 1 -X Q 3 3 R 9 X Z 2 S 2 -X Q 3 5 R 25 X Y 2 S 1 -X Q 3 5 R 25 X Z 2 S 2 -X Q 3 6 R 36 X Y 2 S 1 -X Q 3 6 R 36 X Z 2 S 2 -X Q 3 7 R 49 X Y 2 S 1 -X Q 3 7 R 49 X Z 2 S 2 -X Q 3 9 R 81 X Y 2 S 1 -X Q 3 9 R 81 X Z 2 S 2 -X Q 5 1 R 1 X Y 2 S 1 -X Q 5 1 R 1 X Z 2 S 2 -X Q 5 2 R 4 X Y 2 S 1 -X Q 5 2 R 4 X Z 2 S 2 -X Q 5 3 R 9 X Y 2 S 1 -X Q 5 3 R 9 X Z 2 S 2 -X Q 5 5 R 25 X Y 2 S 1 -X Q 5 5 R 25 X Z 2 S 2 -X Q 5 6 R 36 X Y 2 S 1 -X Q 5 6 R 36 X Z 2 S 2 -X Q 5 7 R 49 X Y 2 S 1 -X Q 5 7 R 49 X Z 2 S 2 -X Q 5 9 R 81 X Y 2 S 1 -X Q 5 9 R 81 X Z 2 S 2 -CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'MYISAM' ; -INSERT INTO t4 SET C1 = 1; -SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; -C1 HEX(B1) HEX(B2) -1 NULL 0 -SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; -C1 HEX(B1) HEX(B2) -1 NULL 0 -CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'MYISAM' ; ---- on slave: original values --- -INSERT INTO t7 VALUES (1,3), (2,6), (3,9); -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 3 -2 6 -3 9 ---- on master: new values inserted --- -INSERT INTO t7 VALUES (1,2), (2,4), (3,6); -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 2 -2 4 -3 6 ---- on slave: old values should be overwritten by replicated values --- -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 2 -2 4 -3 6 ---- on master --- -CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'MYISAM' ; -INSERT INTO t8 VALUES (99,99,99); -INSERT INTO t8 VALUES (99,22,33); -ERROR 23000: Duplicate entry '99' for key 'PRIMARY' -INSERT INTO t8 VALUES (11,99,33); -ERROR 23000: Duplicate entry '99' for key 'b' -INSERT INTO t8 VALUES (11,22,99); -ERROR 23000: Duplicate entry '99' for key 'c' -SELECT * FROM t8 ORDER BY a; -a b c -99 99 99 ---- on slave --- -SELECT * FROM t8 ORDER BY a; -a b c -99 99 99 -INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); -SELECT * FROM t8 ORDER BY a; -a b c -1 2 3 -2 4 6 -3 6 9 -99 99 99 ---- on master --- -INSERT INTO t8 VALUES (2,4,8); ---- on slave --- -SELECT * FROM t8 ORDER BY a; -a b c -1 2 3 -2 4 8 -3 6 9 -99 99 99 -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/r/rpl_row_basic_3innodb.result b/mysql-test/r/rpl_row_basic_3innodb.result deleted file mode 100644 index 4c6ec627db5..00000000000 --- a/mysql-test/r/rpl_row_basic_3innodb.result +++ /dev/null @@ -1,418 +0,0 @@ -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; -CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'INNODB' ; -SELECT * FROM t1; -C1 C2 -SELECT * FROM t1; -C1 C2 -INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); -INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A'); -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A A -A B -A C -X X -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A A -A B -A C -X X -X Y -X Z -DELETE FROM t1 WHERE C1 = C2; -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A C -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A C -X Y -X Z -UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A I -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A I -X Y -X Z -UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N'; -SELECT * FROM t1 ORDER BY c1,c2; -C1 C2 -A B -A I -X Y -X Z -SELECT * FROM t1 ORDER BY c1,c2; -C1 C2 -A B -A I -X Y -X Z -CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'INNODB' ; -INSERT INTO t2 -VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), -(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81); -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 2 -2 A 4 -3 A 9 -4 A 15 -5 A 25 -6 A 35 -7 A 50 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -2 A 4 -3 A 9 -5 A 25 -8 A 64 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 2 -2 A 4 -3 A 9 -4 A 15 -5 A 25 -6 A 35 -7 A 50 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -2 A 4 -3 A 9 -5 A 25 -8 A 64 -9 A 81 -UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1; -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999; -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -DELETE FROM t2 WHERE c1 % 4 = 0; -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -5 A 25 -6 A 36 -7 A 49 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -5 A 25 -6 A 36 -7 A 49 -9 A 81 -UPDATE t2 SET c12='X'; -CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'INNODB' ; -INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1); -INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2); -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A A 3 B 2 -A B 1 B 1 -A C 1 B 2 -X X 3 B 1 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A A 3 B 2 -A B 1 B 1 -A C 1 B 2 -X X 3 B 1 -X Y 2 B 1 -X Z 2 B 2 -DELETE FROM t3 WHERE C1 = C2; -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A C 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A C 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A I 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A I 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'INNODB' ; -INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); -INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -X X 3 -A C 4 -X Z 5 -A A 6 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -X X 3 -A C 4 -X Z 5 -A A 6 -DELETE FROM t6 WHERE C1 = C2; -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A C 4 -X Z 5 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A C 4 -X Z 5 -UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A I 4 -X Z 5 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A I 4 -X Z 5 -CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'INNODB' ; -INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); -INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); -UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1; -SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; -C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 -X Q 2 1 R 1 X Y 2 S 1 -X Q 2 1 R 1 X Z 2 S 2 -X Q 2 2 R 4 X Y 2 S 1 -X Q 2 2 R 4 X Z 2 S 2 -X Q 2 3 R 9 X Y 2 S 1 -X Q 2 3 R 9 X Z 2 S 2 -X Q 2 5 R 25 X Y 2 S 1 -X Q 2 5 R 25 X Z 2 S 2 -X Q 2 6 R 36 X Y 2 S 1 -X Q 2 6 R 36 X Z 2 S 2 -X Q 2 7 R 49 X Y 2 S 1 -X Q 2 7 R 49 X Z 2 S 2 -X Q 2 9 R 81 X Y 2 S 1 -X Q 2 9 R 81 X Z 2 S 2 -X Q 3 1 R 1 X Y 2 S 1 -X Q 3 1 R 1 X Z 2 S 2 -X Q 3 2 R 4 X Y 2 S 1 -X Q 3 2 R 4 X Z 2 S 2 -X Q 3 3 R 9 X Y 2 S 1 -X Q 3 3 R 9 X Z 2 S 2 -X Q 3 5 R 25 X Y 2 S 1 -X Q 3 5 R 25 X Z 2 S 2 -X Q 3 6 R 36 X Y 2 S 1 -X Q 3 6 R 36 X Z 2 S 2 -X Q 3 7 R 49 X Y 2 S 1 -X Q 3 7 R 49 X Z 2 S 2 -X Q 3 9 R 81 X Y 2 S 1 -X Q 3 9 R 81 X Z 2 S 2 -X Q 5 1 R 1 X Y 2 S 1 -X Q 5 1 R 1 X Z 2 S 2 -X Q 5 2 R 4 X Y 2 S 1 -X Q 5 2 R 4 X Z 2 S 2 -X Q 5 3 R 9 X Y 2 S 1 -X Q 5 3 R 9 X Z 2 S 2 -X Q 5 5 R 25 X Y 2 S 1 -X Q 5 5 R 25 X Z 2 S 2 -X Q 5 6 R 36 X Y 2 S 1 -X Q 5 6 R 36 X Z 2 S 2 -X Q 5 7 R 49 X Y 2 S 1 -X Q 5 7 R 49 X Z 2 S 2 -X Q 5 9 R 81 X Y 2 S 1 -X Q 5 9 R 81 X Z 2 S 2 -SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; -C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 -X Q 2 1 R 1 X Y 2 S 1 -X Q 2 1 R 1 X Z 2 S 2 -X Q 2 2 R 4 X Y 2 S 1 -X Q 2 2 R 4 X Z 2 S 2 -X Q 2 3 R 9 X Y 2 S 1 -X Q 2 3 R 9 X Z 2 S 2 -X Q 2 5 R 25 X Y 2 S 1 -X Q 2 5 R 25 X Z 2 S 2 -X Q 2 6 R 36 X Y 2 S 1 -X Q 2 6 R 36 X Z 2 S 2 -X Q 2 7 R 49 X Y 2 S 1 -X Q 2 7 R 49 X Z 2 S 2 -X Q 2 9 R 81 X Y 2 S 1 -X Q 2 9 R 81 X Z 2 S 2 -X Q 3 1 R 1 X Y 2 S 1 -X Q 3 1 R 1 X Z 2 S 2 -X Q 3 2 R 4 X Y 2 S 1 -X Q 3 2 R 4 X Z 2 S 2 -X Q 3 3 R 9 X Y 2 S 1 -X Q 3 3 R 9 X Z 2 S 2 -X Q 3 5 R 25 X Y 2 S 1 -X Q 3 5 R 25 X Z 2 S 2 -X Q 3 6 R 36 X Y 2 S 1 -X Q 3 6 R 36 X Z 2 S 2 -X Q 3 7 R 49 X Y 2 S 1 -X Q 3 7 R 49 X Z 2 S 2 -X Q 3 9 R 81 X Y 2 S 1 -X Q 3 9 R 81 X Z 2 S 2 -X Q 5 1 R 1 X Y 2 S 1 -X Q 5 1 R 1 X Z 2 S 2 -X Q 5 2 R 4 X Y 2 S 1 -X Q 5 2 R 4 X Z 2 S 2 -X Q 5 3 R 9 X Y 2 S 1 -X Q 5 3 R 9 X Z 2 S 2 -X Q 5 5 R 25 X Y 2 S 1 -X Q 5 5 R 25 X Z 2 S 2 -X Q 5 6 R 36 X Y 2 S 1 -X Q 5 6 R 36 X Z 2 S 2 -X Q 5 7 R 49 X Y 2 S 1 -X Q 5 7 R 49 X Z 2 S 2 -X Q 5 9 R 81 X Y 2 S 1 -X Q 5 9 R 81 X Z 2 S 2 -CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'INNODB' ; -INSERT INTO t4 SET C1 = 1; -SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; -C1 HEX(B1) HEX(B2) -1 NULL 0 -SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; -C1 HEX(B1) HEX(B2) -1 NULL 0 -CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'INNODB' ; ---- on slave: original values --- -INSERT INTO t7 VALUES (1,3), (2,6), (3,9); -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 3 -2 6 -3 9 ---- on master: new values inserted --- -INSERT INTO t7 VALUES (1,2), (2,4), (3,6); -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 2 -2 4 -3 6 ---- on slave: old values should be overwritten by replicated values --- -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 2 -2 4 -3 6 ---- on master --- -CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'INNODB' ; -INSERT INTO t8 VALUES (99,99,99); -INSERT INTO t8 VALUES (99,22,33); -ERROR 23000: Duplicate entry '99' for key 'PRIMARY' -INSERT INTO t8 VALUES (11,99,33); -ERROR 23000: Duplicate entry '99' for key 'b' -INSERT INTO t8 VALUES (11,22,99); -ERROR 23000: Duplicate entry '99' for key 'c' -SELECT * FROM t8 ORDER BY a; -a b c -99 99 99 ---- on slave --- -SELECT * FROM t8 ORDER BY a; -a b c -99 99 99 -INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); -SELECT * FROM t8 ORDER BY a; -a b c -1 2 3 -2 4 6 -3 6 9 -99 99 99 ---- on master --- -INSERT INTO t8 VALUES (2,4,8); ---- on slave --- -SELECT * FROM t8 ORDER BY a; -a b c -1 2 3 -2 4 8 -3 6 9 -99 99 99 -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/r/rpl_row_basic_7ndb.result b/mysql-test/r/rpl_row_basic_7ndb.result deleted file mode 100644 index 5519e0dcd0c..00000000000 --- a/mysql-test/r/rpl_row_basic_7ndb.result +++ /dev/null @@ -1,418 +0,0 @@ -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; -CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'NDB' ; -SELECT * FROM t1; -C1 C2 -SELECT * FROM t1; -C1 C2 -INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); -INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A'); -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A A -A B -A C -X X -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A A -A B -A C -X X -X Y -X Z -DELETE FROM t1 WHERE C1 = C2; -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A C -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A C -X Y -X Z -UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A I -X Y -X Z -SELECT * FROM t1 ORDER BY C1,C2; -C1 C2 -A B -A I -X Y -X Z -UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N'; -SELECT * FROM t1 ORDER BY c1,c2; -C1 C2 -A B -A I -X Y -X Z -SELECT * FROM t1 ORDER BY c1,c2; -C1 C2 -A B -A I -X Y -X Z -CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'NDB' ; -INSERT INTO t2 -VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), -(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81); -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 2 -2 A 4 -3 A 9 -4 A 15 -5 A 25 -6 A 35 -7 A 50 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -2 A 4 -3 A 9 -5 A 25 -8 A 64 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 2 -2 A 4 -3 A 9 -4 A 15 -5 A 25 -6 A 35 -7 A 50 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -2 A 4 -3 A 9 -5 A 25 -8 A 64 -9 A 81 -UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1; -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999; -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -4 A 16 -5 A 25 -6 A 36 -7 A 49 -8 A 64 -9 A 81 -DELETE FROM t2 WHERE c1 % 4 = 0; -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -5 A 25 -6 A 36 -7 A 49 -9 A 81 -SELECT * FROM t2 ORDER BY c1,c2; -c1 c12 c2 -1 A 1 -2 A 4 -3 A 9 -5 A 25 -6 A 36 -7 A 49 -9 A 81 -UPDATE t2 SET c12='X'; -CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'NDB' ; -INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1); -INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2); -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A A 3 B 2 -A B 1 B 1 -A C 1 B 2 -X X 3 B 1 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A A 3 B 2 -A B 1 B 1 -A C 1 B 2 -X X 3 B 1 -X Y 2 B 1 -X Z 2 B 2 -DELETE FROM t3 WHERE C1 = C2; -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A C 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A C 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A I 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -SELECT * FROM t3 ORDER BY C1,C2; -C1 C2 pk1 C3 pk2 -A B 1 B 1 -A I 1 B 2 -X Y 2 B 1 -X Z 2 B 2 -CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'NDB' ; -INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); -INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -X X 3 -A C 4 -X Z 5 -A A 6 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -X X 3 -A C 4 -X Z 5 -A A 6 -DELETE FROM t6 WHERE C1 = C2; -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A C 4 -X Z 5 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A C 4 -X Z 5 -UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A I 4 -X Z 5 -SELECT * FROM t6 ORDER BY C3; -C1 C2 C3 -A B 1 -X Y 2 -A I 4 -X Z 5 -CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'NDB' ; -INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); -INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); -UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1; -SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; -C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 -X Q 2 1 R 1 X Y 2 S 1 -X Q 2 1 R 1 X Z 2 S 2 -X Q 2 2 R 4 X Y 2 S 1 -X Q 2 2 R 4 X Z 2 S 2 -X Q 2 3 R 9 X Y 2 S 1 -X Q 2 3 R 9 X Z 2 S 2 -X Q 2 5 R 25 X Y 2 S 1 -X Q 2 5 R 25 X Z 2 S 2 -X Q 2 6 R 36 X Y 2 S 1 -X Q 2 6 R 36 X Z 2 S 2 -X Q 2 7 R 49 X Y 2 S 1 -X Q 2 7 R 49 X Z 2 S 2 -X Q 2 9 R 81 X Y 2 S 1 -X Q 2 9 R 81 X Z 2 S 2 -X Q 3 1 R 1 X Y 2 S 1 -X Q 3 1 R 1 X Z 2 S 2 -X Q 3 2 R 4 X Y 2 S 1 -X Q 3 2 R 4 X Z 2 S 2 -X Q 3 3 R 9 X Y 2 S 1 -X Q 3 3 R 9 X Z 2 S 2 -X Q 3 5 R 25 X Y 2 S 1 -X Q 3 5 R 25 X Z 2 S 2 -X Q 3 6 R 36 X Y 2 S 1 -X Q 3 6 R 36 X Z 2 S 2 -X Q 3 7 R 49 X Y 2 S 1 -X Q 3 7 R 49 X Z 2 S 2 -X Q 3 9 R 81 X Y 2 S 1 -X Q 3 9 R 81 X Z 2 S 2 -X Q 5 1 R 1 X Y 2 S 1 -X Q 5 1 R 1 X Z 2 S 2 -X Q 5 2 R 4 X Y 2 S 1 -X Q 5 2 R 4 X Z 2 S 2 -X Q 5 3 R 9 X Y 2 S 1 -X Q 5 3 R 9 X Z 2 S 2 -X Q 5 5 R 25 X Y 2 S 1 -X Q 5 5 R 25 X Z 2 S 2 -X Q 5 6 R 36 X Y 2 S 1 -X Q 5 6 R 36 X Z 2 S 2 -X Q 5 7 R 49 X Y 2 S 1 -X Q 5 7 R 49 X Z 2 S 2 -X Q 5 9 R 81 X Y 2 S 1 -X Q 5 9 R 81 X Z 2 S 2 -SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; -C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 -X Q 2 1 R 1 X Y 2 S 1 -X Q 2 1 R 1 X Z 2 S 2 -X Q 2 2 R 4 X Y 2 S 1 -X Q 2 2 R 4 X Z 2 S 2 -X Q 2 3 R 9 X Y 2 S 1 -X Q 2 3 R 9 X Z 2 S 2 -X Q 2 5 R 25 X Y 2 S 1 -X Q 2 5 R 25 X Z 2 S 2 -X Q 2 6 R 36 X Y 2 S 1 -X Q 2 6 R 36 X Z 2 S 2 -X Q 2 7 R 49 X Y 2 S 1 -X Q 2 7 R 49 X Z 2 S 2 -X Q 2 9 R 81 X Y 2 S 1 -X Q 2 9 R 81 X Z 2 S 2 -X Q 3 1 R 1 X Y 2 S 1 -X Q 3 1 R 1 X Z 2 S 2 -X Q 3 2 R 4 X Y 2 S 1 -X Q 3 2 R 4 X Z 2 S 2 -X Q 3 3 R 9 X Y 2 S 1 -X Q 3 3 R 9 X Z 2 S 2 -X Q 3 5 R 25 X Y 2 S 1 -X Q 3 5 R 25 X Z 2 S 2 -X Q 3 6 R 36 X Y 2 S 1 -X Q 3 6 R 36 X Z 2 S 2 -X Q 3 7 R 49 X Y 2 S 1 -X Q 3 7 R 49 X Z 2 S 2 -X Q 3 9 R 81 X Y 2 S 1 -X Q 3 9 R 81 X Z 2 S 2 -X Q 5 1 R 1 X Y 2 S 1 -X Q 5 1 R 1 X Z 2 S 2 -X Q 5 2 R 4 X Y 2 S 1 -X Q 5 2 R 4 X Z 2 S 2 -X Q 5 3 R 9 X Y 2 S 1 -X Q 5 3 R 9 X Z 2 S 2 -X Q 5 5 R 25 X Y 2 S 1 -X Q 5 5 R 25 X Z 2 S 2 -X Q 5 6 R 36 X Y 2 S 1 -X Q 5 6 R 36 X Z 2 S 2 -X Q 5 7 R 49 X Y 2 S 1 -X Q 5 7 R 49 X Z 2 S 2 -X Q 5 9 R 81 X Y 2 S 1 -X Q 5 9 R 81 X Z 2 S 2 -CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'NDB' ; -INSERT INTO t4 SET C1 = 1; -SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; -C1 HEX(B1) HEX(B2) -1 NULL 0 -SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; -C1 HEX(B1) HEX(B2) -1 NULL 0 -CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'NDB' ; ---- on slave: original values --- -INSERT INTO t7 VALUES (1,3), (2,6), (3,9); -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 3 -2 6 -3 9 ---- on master: new values inserted --- -INSERT INTO t7 VALUES (1,2), (2,4), (3,6); -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 2 -2 4 -3 6 ---- on slave: old values should be overwritten by replicated values --- -SELECT * FROM t7 ORDER BY C1; -C1 C2 -1 2 -2 4 -3 6 ---- on master --- -CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'NDB' ; -INSERT INTO t8 VALUES (99,99,99); -INSERT INTO t8 VALUES (99,22,33); -ERROR 23000: Duplicate entry '99' for key 'PRIMARY' -INSERT INTO t8 VALUES (11,99,33); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -INSERT INTO t8 VALUES (11,22,99); -ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' -SELECT * FROM t8 ORDER BY a; -a b c -99 99 99 ---- on slave --- -SELECT * FROM t8 ORDER BY a; -a b c -99 99 99 -INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); -SELECT * FROM t8 ORDER BY a; -a b c -1 2 3 -2 4 6 -3 6 9 -99 99 99 ---- on master --- -INSERT INTO t8 VALUES (2,4,8); ---- on slave --- -SELECT * FROM t8 ORDER BY a; -a b c -1 2 3 -2 4 8 -3 6 9 -99 99 99 -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/r/rpl_row_basic_8partition.result b/mysql-test/r/rpl_row_basic_8partition.result deleted file mode 100644 index dedd5d044e0..00000000000 --- a/mysql-test/r/rpl_row_basic_8partition.result +++ /dev/null @@ -1,655 +0,0 @@ -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; -DROP TABLE IF EXISTS t1; -SET @@BINLOG_FORMAT = ROW; -SELECT @@BINLOG_FORMAT; -@@BINLOG_FORMAT -ROW -**** Partition RANGE testing **** -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- On master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- On slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; -ALTER TABLE t1 MODIFY vc TEXT; ---- On master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `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 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- On slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `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 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; -DROP TABLE IF EXISTS t1; -**** Partition LIST testing **** -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142), -PARTITION p2 VALUES IN (412)); ---- On master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- On slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; -ALTER TABLE t1 MODIFY vc TEXT; ---- On master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `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 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- On slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `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 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; -DROP TABLE IF EXISTS t1; -**** Partition HASH testing **** -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- On master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ ---- On slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; -ALTER TABLE t1 MODIFY vc TEXT; ---- On master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `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 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ ---- On slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `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 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; -DROP TABLE IF EXISTS t1; -**** Partition by KEY **** -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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)) -PARTITION BY KEY() -PARTITIONS 4; ---- On master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- On slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- On master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- On slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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 NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; -ALTER TABLE t1 MODIFY vc TEXT; ---- On master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- On slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) 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, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(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 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- 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 -DELETE FROM t1; -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_row_blob_innodb.result b/mysql-test/r/rpl_row_blob_innodb.result deleted file mode 100644 index 055efffbd6a..00000000000 --- a/mysql-test/r/rpl_row_blob_innodb.result +++ /dev/null @@ -1,156 +0,0 @@ -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; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -***** Table Create Section **** - -CREATE TABLE test.t1 (c1 int not null auto_increment, -data LONGBLOB, PRIMARY KEY(c1))ENGINE=#; - -**** Data Insert Section test.t1 ***** - -INSERT INTO test.t1 VALUES (NULL, NULL); -INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024)); -INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024)); - -**** Data Insert Validation Master Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -NULL -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; -LENGTH(data) -16384 - -**** Data Insert Validation Slave Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -NULL -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; -LENGTH(data) -16384 - -**** Data Update Section test.t1 **** - -UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1; -UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; - -**** Data Update Validation Master Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -18432 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -17408 - -**** Data Update Validation Slave Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -18432 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -17408 - -**** End Test Section test.t1 **** - -**** Create Table test.t2 **** - -CREATE TABLE test.t2 ( -c1 INT NOT NULL PRIMARY KEY, -c2 TEXT, -c3 INT, -c4 LONGBLOB, -KEY(c3))ENGINE=#; - -*** Setup Values For test.t2 *** -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -**** Data Insert Section test.t2 ***** - -INSERT INTO test.t2 VALUES(1,@b1,111,@d1); -INSERT INTO test.t2 VALUES(2,@b2,222,@d2); - -**** Data Insert Validation Master Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 2256 b1 3000 dd1 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 20000 b2 30000 dd2 - -**** Data Insert Validation Slave Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 2256 b1 3000 dd1 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 20000 b2 30000 dd2 - -**** Data Update Section test.t2 **** - -UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1; -UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2; - -**** Data Update Validation Master Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 20000 b2 30000 dd2 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 2256 b1 3000 dd1 - -**** Data Update Validation Slave Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 20000 b2 30000 dd2 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 2256 b1 3000 dd1 - -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/r/rpl_row_blob_myisam.result b/mysql-test/r/rpl_row_blob_myisam.result deleted file mode 100644 index 055efffbd6a..00000000000 --- a/mysql-test/r/rpl_row_blob_myisam.result +++ /dev/null @@ -1,156 +0,0 @@ -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; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -***** Table Create Section **** - -CREATE TABLE test.t1 (c1 int not null auto_increment, -data LONGBLOB, PRIMARY KEY(c1))ENGINE=#; - -**** Data Insert Section test.t1 ***** - -INSERT INTO test.t1 VALUES (NULL, NULL); -INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024)); -INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024)); - -**** Data Insert Validation Master Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -NULL -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; -LENGTH(data) -16384 - -**** Data Insert Validation Slave Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -NULL -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -1024 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; -LENGTH(data) -16384 - -**** Data Update Section test.t1 **** - -UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1; -UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; - -**** Data Update Validation Master Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -18432 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -17408 - -**** Data Update Validation Slave Section test.t1 **** - -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; -LENGTH(data) -18432 -SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; -LENGTH(data) -17408 - -**** End Test Section test.t1 **** - -**** Create Table test.t2 **** - -CREATE TABLE test.t2 ( -c1 INT NOT NULL PRIMARY KEY, -c2 TEXT, -c3 INT, -c4 LONGBLOB, -KEY(c3))ENGINE=#; - -*** Setup Values For test.t2 *** -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -**** Data Insert Section test.t2 ***** - -INSERT INTO test.t2 VALUES(1,@b1,111,@d1); -INSERT INTO test.t2 VALUES(2,@b2,222,@d2); - -**** Data Insert Validation Master Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 2256 b1 3000 dd1 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 20000 b2 30000 dd2 - -**** Data Insert Validation Slave Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 2256 b1 3000 dd1 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 20000 b2 30000 dd2 - -**** Data Update Section test.t2 **** - -UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1; -UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2; - -**** Data Update Validation Master Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 20000 b2 30000 dd2 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 2256 b1 3000 dd1 - -**** Data Update Validation Slave Section test.t2 **** - -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=1; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -1 20000 b2 30000 dd2 -SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) -FROM test.t2 WHERE c1=2; -c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) -2 2256 b1 3000 dd1 - -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/r/rpl_row_charset.result b/mysql-test/r/rpl_row_charset.result deleted file mode 100644 index e51f3e57d1f..00000000000 --- a/mysql-test/r/rpl_row_charset.result +++ /dev/null @@ -1,201 +0,0 @@ -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 timestamp=1000000000; -drop database if exists mysqltest2; -drop database if exists mysqltest3; -create database mysqltest2 character set latin2; -set @@character_set_server=latin5; -create database mysqltest3; - ---- --master-- -show create database mysqltest2; -Database Create Database -mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ - ---- --slave-- -show create database mysqltest2; -Database Create Database -mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ -set @@collation_server=armscii8_bin; -drop database mysqltest3; -create database mysqltest3; - ---- --master-- -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ - ---- --slave-- -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ -use mysqltest2; -create table t1 (a int auto_increment primary key, b varchar(100)); -set character_set_client=cp850, collation_connection=latin2_croatian_ci; -insert into t1 (b) values(@@character_set_server); -insert into t1 (b) values(@@collation_server); -insert into t1 (b) values(@@character_set_client); -insert into t1 (b) values(@@character_set_connection); -insert into t1 (b) values(@@collation_connection); - ---- --master-- -select * from t1 order by a; -a b -1 armscii8 -2 armscii8_bin -3 cp850 -4 latin2 -5 latin2_croatian_ci - ---- --slave-- -select * from mysqltest2.t1 order by a; -a b -1 armscii8 -2 armscii8_bin -3 cp850 -4 latin2 -5 latin2_croatian_ci -select "--- --muller--" as ""; - ---- --muller-- -set character_set_client=latin1, collation_connection=latin1_german1_ci; -truncate table t1; -insert into t1 (b) values(@@collation_connection); -insert into t1 (b) values(LEAST("Müller","Muffler")); -set collation_connection=latin1_german2_ci; -insert into t1 (b) values(@@collation_connection); -insert into t1 (b) values(LEAST("Müller","Muffler")); - ---- --master-- -select * from t1 order by a; -a b -1 latin1_german1_ci -2 Muffler -3 latin1_german2_ci -4 Müller - ---- --slave-- -select * from mysqltest2.t1 order by a; -a b -1 latin1_german1_ci -2 Muffler -3 latin1_german2_ci -4 Müller -select "--- --INSERT--" as ""; - ---- --INSERT-- -set @a= _cp850 'Müller' collate cp850_general_ci; -truncate table t1; -insert into t1 (b) values(collation(@a)); - ---- --master-- -select * from t1 order by a; -a b -1 cp850_general_ci - ---- --slave-- -select * from mysqltest2.t1 order by a; -a b -1 cp850_general_ci -drop database mysqltest2; -drop database mysqltest3; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest2 -master-bin.000001 # Query # # drop database if exists mysqltest3 -master-bin.000001 # Query # # create database mysqltest2 character set latin2 -master-bin.000001 # Query # # create database mysqltest3 -master-bin.000001 # Query # # drop database mysqltest3 -master-bin.000001 # Query # # create database mysqltest3 -master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 -master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # drop database mysqltest2 -master-bin.000001 # Query # # drop database mysqltest3 -select "--- --global--" as ""; - ---- --global-- -set global character_set_server=latin2; -set global character_set_server=latin1; -set global character_set_server=latin2; -set global character_set_server=latin1; -select "--- --oneshot--" as ""; - ---- --oneshot-- -set one_shot @@character_set_server=latin5; -set @@max_join_size=1000; -select @@character_set_server; -@@character_set_server -latin5 -select @@character_set_server; -@@character_set_server -latin1 -set @@character_set_server=latin5; -select @@character_set_server; -@@character_set_server -latin5 -select @@character_set_server; -@@character_set_server -latin5 -set one_shot max_join_size=10; -ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server -set character_set_client=9999999; -ERROR 42000: Unknown character set: '9999999' -set collation_server=9999998; -ERROR HY000: Unknown collation: '9999998' -select "--- --3943--" as ""; - ---- --3943-- -use test; -CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); -SET CHARACTER_SET_CLIENT=koi8r, -CHARACTER_SET_CONNECTION=cp1251, -CHARACTER_SET_RESULTS=koi8r; -INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); -select hex(c1), hex(c2) from t1; -hex(c1) hex(c2) -CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 -select hex(c1), hex(c2) from t1; -hex(c1) hex(c2) -CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 -drop table t1; -select "--- --6676--" as ""; - ---- --6676-- -create table `t1` ( -`pk` varchar(10) not null default '', -primary key (`pk`) -) engine=myisam default charset=latin1; -set @p=_latin1 'test'; -update t1 set pk='test' where pk=@p; -drop table t1; diff --git a/mysql-test/r/rpl_row_create_table.result b/mysql-test/r/rpl_row_create_table.result deleted file mode 100644 index e76ce5b962d..00000000000 --- a/mysql-test/r/rpl_row_create_table.result +++ /dev/null @@ -1,403 +0,0 @@ -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; -CREATE TABLE t1 (a INT, b INT); -CREATE TABLE t2 (a INT, b INT) ENGINE=Merge; -CREATE TABLE t3 (a INT, b INT) CHARSET=utf8; -CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8; -SHOW BINLOG EVENTS FROM 216; -Log_name # -Pos 216 -Event_type Query -Server_id # -End_log_pos 309 -Info use `test`; CREATE TABLE t1 (a INT, b INT) -Log_name # -Pos 309 -Event_type Query -Server_id # -End_log_pos 415 -Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge -Log_name # -Pos 415 -Event_type Query -Server_id # -End_log_pos 521 -Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8 -Log_name # -Pos 521 -Event_type Query -Server_id # -End_log_pos 640 -Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8 -**** On Master **** -SHOW CREATE TABLE t1; -Table t1 -Create Table CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t2; -Table t2 -Create Table CREATE TABLE `t2` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() -SHOW CREATE TABLE t3; -Table t3 -Create Table CREATE TABLE `t3` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -**** On Slave **** -SHOW CREATE TABLE t1; -Table t1 -Create Table CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -SHOW CREATE TABLE t2; -Table t2 -Create Table CREATE TABLE `t2` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() -SHOW CREATE TABLE t3; -Table t3 -Create Table CREATE TABLE `t3` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -CREATE TABLE t5 (b INT, c INT) SELECT * FROM t3; -CREATE TEMPORARY TABLE tt3 (a INT, b INT); -INSERT INTO tt3 VALUES (1,2), (2,4), (3,6), (4,2), (5,10), (6,12); -CREATE TABLE t6 (b INT, c INT) SELECT * FROM tt3; -**** On Master **** -SHOW CREATE TABLE t5; -Table t5 -Create Table CREATE TABLE `t5` ( - `c` int(11) DEFAULT NULL, - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SELECT * FROM t5 ORDER BY a,b,c; -c a b -SHOW CREATE TABLE t6; -Table t6 -Create Table CREATE TABLE `t6` ( - `c` int(11) DEFAULT NULL, - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SELECT * FROM t6 ORDER BY a,b,c; -c a b -NULL 1 2 -NULL 2 4 -NULL 3 6 -NULL 4 2 -NULL 5 10 -NULL 6 12 -**** On Slave **** -SHOW CREATE TABLE t5; -Table t5 -Create Table CREATE TABLE `t5` ( - `c` int(11) DEFAULT NULL, - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -SELECT * FROM t5 ORDER BY a,b,c; -c a b -SHOW CREATE TABLE t6; -Table t6 -Create Table CREATE TABLE `t6` ( - `c` int(11) DEFAULT NULL, - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -SELECT * FROM t6 ORDER BY a,b,c; -c a b -NULL 1 2 -NULL 2 4 -NULL 3 6 -NULL 4 2 -NULL 5 10 -NULL 6 12 -CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; -ERROR 23000: Duplicate entry '2' for key 'b' -SHOW BINLOG EVENTS FROM 1098; -Log_name Pos Event_type Server_id End_log_pos Info -CREATE TABLE t7 (a INT, b INT UNIQUE); -INSERT INTO t7 SELECT a,b FROM tt3; -ERROR 23000: Duplicate entry '2' for key 'b' -SELECT * FROM t7 ORDER BY a,b; -a b -1 2 -2 4 -3 6 -SHOW BINLOG EVENTS FROM 1098; -Log_name Pos Event_type Server_id End_log_pos Info -# 1098 Query # 1198 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) -# 1198 Table_map # 1238 table_id: # (test.t7) -# 1238 Write_rows # 1294 table_id: # flags: STMT_END_F -SELECT * FROM t7 ORDER BY a,b; -a b -1 2 -2 4 -3 6 -CREATE TEMPORARY TABLE tt4 (a INT, b INT); -INSERT INTO tt4 VALUES (4,8), (5,10), (6,12); -BEGIN; -INSERT INTO t7 SELECT a,b FROM tt4; -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -SHOW BINLOG EVENTS FROM 1294; -Log_name Pos Event_type Server_id End_log_pos Info -# 1294 Table_map # 1334 table_id: # (test.t7) -# 1334 Write_rows # 1390 table_id: # flags: STMT_END_F -SELECT * FROM t7 ORDER BY a,b; -a b -1 2 -2 4 -3 6 -4 8 -5 10 -6 12 -SELECT * FROM t7 ORDER BY a,b; -a b -1 2 -2 4 -3 6 -4 8 -5 10 -6 12 -CREATE TABLE t8 LIKE t4; -CREATE TABLE t9 LIKE tt4; -CREATE TEMPORARY TABLE tt5 LIKE t4; -CREATE TEMPORARY TABLE tt6 LIKE tt4; -CREATE TEMPORARY TABLE tt7 SELECT 1; -**** On Master **** -SHOW CREATE TABLE t8; -Table t8 -Create Table CREATE TABLE `t8` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() -SHOW CREATE TABLE t9; -Table t9 -Create Table CREATE TABLE `t9` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW BINLOG EVENTS FROM 1390; -Log_name Pos Event_type Server_id End_log_pos Info -# 1390 Query # 1476 use `test`; CREATE TABLE t8 LIKE t4 -# 1476 Query # 1615 use `test`; CREATE TABLE `t9` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) -**** On Slave **** -SHOW CREATE TABLE t8; -Table t8 -Create Table CREATE TABLE `t8` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() -SHOW CREATE TABLE t9; -Table t9 -Create Table CREATE TABLE `t9` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MEMORY DEFAULT CHARSET=latin1 -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -STOP SLAVE; -SET GLOBAL storage_engine=@storage_engine; -START SLAVE; -================ BUG#22864 ================ -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; -SET AUTOCOMMIT=0; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3); -CREATE TABLE t2 ENGINE=INNODB SELECT * FROM t1; -ROLLBACK; -CREATE TABLE t3 ENGINE=INNODB SELECT * FROM t1; -INSERT INTO t3 VALUES (4),(5),(6); -ROLLBACK; -CREATE TABLE t4 ENGINE=INNODB SELECT * FROM t1; -INSERT INTO t1 VALUES (4),(5),(6); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -SHOW TABLES; -Tables_in_test -t1 -t2 -t3 -t4 -SELECT TABLE_NAME,ENGINE -FROM INFORMATION_SCHEMA.TABLES -WHERE TABLE_NAME LIKE 't_' -ORDER BY TABLE_NAME; -TABLE_NAME ENGINE -t1 MyISAM -t2 InnoDB -t3 InnoDB -t4 InnoDB -SELECT * FROM t1 ORDER BY a; -a -1 -2 -3 -4 -5 -6 -SELECT * FROM t2 ORDER BY a; -a -1 -2 -3 -SELECT * FROM t3 ORDER BY a; -a -1 -2 -3 -SELECT * FROM t4 ORDER BY a; -a -1 -2 -3 -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -# 4 Format_desc # 106 Server ver: #, Binlog ver: # -# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) -# 192 Table_map # 231 table_id: # (test.t1) -# 231 Write_rows # 275 table_id: # flags: STMT_END_F -# 275 Query # 343 use `test`; BEGIN -# 343 Query # 125 use `test`; CREATE TABLE `t2` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB -# 468 Table_map # 164 table_id: # (test.t2) -# 507 Write_rows # 208 table_id: # flags: STMT_END_F -# 551 Xid # 578 COMMIT /* XID */ -# 578 Query # 646 use `test`; BEGIN -# 646 Query # 125 use `test`; CREATE TABLE `t3` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB -# 771 Table_map # 164 table_id: # (test.t3) -# 810 Write_rows # 208 table_id: # flags: STMT_END_F -# 854 Xid # 881 COMMIT /* XID */ -# 881 Query # 949 use `test`; BEGIN -# 949 Query # 125 use `test`; CREATE TABLE `t4` ( - `a` int(11) DEFAULT NULL -) ENGINE=InnoDB -# 1074 Table_map # 164 table_id: # (test.t4) -# 1113 Write_rows # 208 table_id: # flags: STMT_END_F -# 1157 Xid # 1184 COMMIT /* XID */ -# 1184 Table_map # 1223 table_id: # (test.t1) -# 1223 Write_rows # 1267 table_id: # flags: STMT_END_F -SHOW TABLES; -Tables_in_test -t1 -t2 -t3 -t4 -SELECT TABLE_NAME,ENGINE -FROM INFORMATION_SCHEMA.TABLES -WHERE TABLE_NAME LIKE 't_' -ORDER BY TABLE_NAME; -TABLE_NAME ENGINE -t1 MyISAM -t2 InnoDB -t3 InnoDB -t4 InnoDB -SELECT * FROM t1 ORDER BY a; -a -1 -2 -3 -4 -5 -6 -SELECT * FROM t2 ORDER BY a; -a -1 -2 -3 -SELECT * FROM t3 ORDER BY a; -a -1 -2 -3 -SELECT * FROM t4 ORDER BY a; -a -1 -2 -3 -DROP TABLE IF EXISTS t1,t2,t3,t4; -SET AUTOCOMMIT=1; -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -START SLAVE; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3); -CREATE TABLE t2 (a INT) ENGINE=INNODB; -BEGIN; -INSERT INTO t2 SELECT a*a FROM t1; -CREATE TEMPORARY TABLE tt1 -SELECT a+1 AS a -FROM t1 -WHERE a MOD 2 = 1; -INSERT INTO t2 SELECT a+2 FROM tt1; -COMMIT; -SELECT * FROM t2 ORDER BY a; -a -1 -4 -4 -6 -9 -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -# 4 Format_desc # 106 Server ver: #, Binlog ver: # -# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) -# 192 Table_map # 231 table_id: # (test.t1) -# 231 Write_rows # 275 table_id: # flags: STMT_END_F -# 275 Query # 375 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB -# 375 Query # 443 use `test`; BEGIN -# 443 Table_map # 39 table_id: # (test.t2) -# 482 Write_rows # 83 table_id: # flags: STMT_END_F -# 526 Table_map # 122 table_id: # (test.t2) -# 565 Write_rows # 161 table_id: # flags: STMT_END_F -# 604 Xid # 631 COMMIT /* XID */ -SELECT * FROM t2 ORDER BY a; -a -1 -4 -4 -6 -9 -TRUNCATE TABLE t2; -BEGIN; -INSERT INTO t2 SELECT a*a FROM t1; -CREATE TEMPORARY TABLE tt2 -SELECT a+1 AS a -FROM t1 -WHERE a MOD 2 = 1; -INSERT INTO t2 SELECT a+2 FROM tt2; -ROLLBACK; -SELECT * FROM t2 ORDER BY a; -a -SHOW BINLOG EVENTS FROM 631; -Log_name Pos Event_type Server_id End_log_pos Info -# 631 Query # 80 use `test`; TRUNCATE TABLE t2 -# 711 Xid # 738 COMMIT /* XID */ -SELECT * FROM t2 ORDER BY a; -a -DROP TABLE t1,t2; diff --git a/mysql-test/r/rpl_row_delayed_ins.result b/mysql-test/r/rpl_row_delayed_ins.result deleted file mode 100644 index 800a39bd567..00000000000 --- a/mysql-test/r/rpl_row_delayed_ins.result +++ /dev/null @@ -1,32 +0,0 @@ -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; -create table t1(a int not null primary key) engine=myisam; -insert delayed into t1 values (1); -insert delayed into t1 values (2); -insert delayed into t1 values (3); -flush tables; -SELECT * FROM t1 ORDER BY a; -a -1 -2 -3 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(a int not null primary key) engine=myisam -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; flush tables -SELECT * FROM t1 ORDER BY a; -a -1 -2 -3 -drop table t1; diff --git a/mysql-test/r/rpl_row_drop.result b/mysql-test/r/rpl_row_drop.result deleted file mode 100644 index 89654ebf165..00000000000 --- a/mysql-test/r/rpl_row_drop.result +++ /dev/null @@ -1,56 +0,0 @@ -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; -**** On Master **** -CREATE TABLE t1 (a int); -CREATE TABLE t2 (a int); -CREATE TEMPORARY TABLE t2 (a int, b int); -SHOW TABLES; -Tables_in_test -t1 -t2 -**** On Slave **** -SHOW TABLES; -Tables_in_test -t1 -t2 -**** On Master **** -DROP TABLE t2; -SHOW TABLES; -Tables_in_test -t1 -t2 -**** On Slave **** -SHOW TABLES; -Tables_in_test -t1 -t2 -**** On Master **** -CREATE TEMPORARY TABLE t2 (a int, b int); -SHOW TABLES; -Tables_in_test -t1 -t2 -**** On Slave **** -SHOW TABLES; -Tables_in_test -t1 -t2 -**** On Master **** -DROP TABLE t1,t2; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a int) -master-bin.000001 192 Query 1 278 use `test`; CREATE TABLE t2 (a int) -master-bin.000001 278 Query 1 382 use `test`; DROP TABLE `t1` /* generated by server */ -SHOW TABLES; -Tables_in_test -t2 -**** On Slave **** -SHOW TABLES; -Tables_in_test -t2 diff --git a/mysql-test/r/rpl_row_err_ignoredtable.result b/mysql-test/r/rpl_row_err_ignoredtable.result deleted file mode 100644 index b696baa57db..00000000000 --- a/mysql-test/r/rpl_row_err_ignoredtable.result +++ /dev/null @@ -1,44 +0,0 @@ -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; -create table t1 (a int primary key); -insert into t1 values (1),(1); -ERROR 23000: Duplicate entry '1' for key 1 -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 269 # # master-bin.000001 Yes Yes 0 0 269 # None 0 No # -show tables like 't1'; -Tables_in_test (t1) -t1 -drop table t1; -select get_lock('crash_lock%20C', 10); -get_lock('crash_lock%20C', 10) -1 -create table t2 (a int primary key); -insert into t2 values(1); -create table t3 (id int); -insert into t3 values(connection_id()); - update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); -select (@id := id) - id from t3; -(@id := id) - id -0 -kill @id; -drop table t2,t3; -show binlog events from 102; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # # -master-bin.000001 # Table_map 1 # # -master-bin.000001 # Write_rows 1 # # -master-bin.000001 # Query 1 # # -master-bin.000001 # Query 1 # # -master-bin.000001 # Table_map 1 # # -master-bin.000001 # Write_rows 1 # # -master-bin.000001 # Query 1 # # -master-bin.000001 # Table_map 1 # # -master-bin.000001 # Write_rows 1 # # -master-bin.000001 # Table_map 1 # # -master-bin.000001 # Update_rows 1 # # -master-bin.000001 # Query 1 # # diff --git a/mysql-test/r/rpl_row_flsh_tbls.result b/mysql-test/r/rpl_row_flsh_tbls.result deleted file mode 100644 index 942a6b83bf6..00000000000 --- a/mysql-test/r/rpl_row_flsh_tbls.result +++ /dev/null @@ -1,33 +0,0 @@ -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; -create table t1 (a int); -insert into t1 values (10); -create table t2 (a int); -create table t3 (a int) engine=merge union(t1); -create table t4 (a int); -insert into t4 select * from t3; -rename table t1 to t5, t2 to t1; -flush no_write_to_binlog tables; -SHOW BINLOG EVENTS FROM 619 ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 -select * from t3; -a -flush tables; -SHOW BINLOG EVENTS FROM 619 ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 -master-bin.000001 # Query 1 # use `test`; flush tables -select * from t3; -a -stop slave; -drop table t1; -flush tables with read lock; -start slave; -stop slave; -ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction -drop table t3, t4, t5; diff --git a/mysql-test/r/rpl_row_func001.result b/mysql-test/r/rpl_row_func001.result deleted file mode 100644 index b20f3f724d0..00000000000 --- a/mysql-test/r/rpl_row_func001.result +++ /dev/null @@ -1,30 +0,0 @@ -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; -DROP FUNCTION test.f1; -DROP TABLE IF EXISTS test.t1; -create table test.t1 (a int, PRIMARY KEY(a)); -create function test.f1(i int) returns int -begin -insert into test.t1 values(i); -return 0; -end// -select test.f1(1); -test.f1(1) -0 -select test.f1(2); -test.f1(2) -0 -select * from test.t1; -a -1 -2 -select * from test.t1; -a -1 -2 -DROP FUNCTION test.f1; -DROP TABLE test.t1; diff --git a/mysql-test/r/rpl_row_func002.result b/mysql-test/r/rpl_row_func002.result deleted file mode 100644 index 03f5b3115c3..00000000000 --- a/mysql-test/r/rpl_row_func002.result +++ /dev/null @@ -1,26 +0,0 @@ -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; -DROP FUNCTION test.f1; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a)); -CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a)); -create function test.f1() RETURNS TIMESTAMP -BEGIN -UPDATE test.t1 SET t = CURRENT_TIMESTAMP; -RETURN CURRENT_TIMESTAMP; -END// -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); -SET TIMESTAMP=2; -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); -SET TIMESTAMP=1; -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); -SET TIMESTAMP=333300000; -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); -DROP FUNCTION test.f1; -DROP TABLE test.t1; -DROP TABLE test.t2; diff --git a/mysql-test/r/rpl_row_func003.result b/mysql-test/r/rpl_row_func003.result deleted file mode 100644 index a5fd46a2ce3..00000000000 --- a/mysql-test/r/rpl_row_func003.result +++ /dev/null @@ -1,29 +0,0 @@ -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; -DROP FUNCTION IF EXISTS test.f1; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=INNODB; -create function test.f1() RETURNS CHAR(16) -BEGIN -DECLARE tmp CHAR(16); -DECLARE var_name FLOAT; -SET var_name = RAND(); -IF var_name > .6 -THEN SET tmp = 'Texas'; -ELSE SET tmp = 'MySQL'; -END IF; -RETURN tmp; -END| -INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); -INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); -SET AUTOCOMMIT=0; -START TRANSACTION; -INSERT INTO test.t1 VALUES (null,test.f1()); -ROLLBACK; -SET AUTOCOMMIT=1; -DROP FUNCTION test.f1; -DROP TABLE test.t1; diff --git a/mysql-test/r/rpl_row_inexist_tbl.result b/mysql-test/r/rpl_row_inexist_tbl.result deleted file mode 100644 index 4412a1fa75c..00000000000 --- a/mysql-test/r/rpl_row_inexist_tbl.result +++ /dev/null @@ -1,55 +0,0 @@ -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; -create table t1 (a int not null primary key); -insert into t1 values (1); -create table t2 (a int); -insert into t2 values (1); -update t1, t2 set t1.a = 0 where t1.a = t2.a; -show tables; -Tables_in_test -t1 -select * from t1; -a -0 -drop table t1; -insert into t1 values (1); -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table test.t2 -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1146 -Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` -Skip_Counter 0 -Exec_Master_Log_Pos 524 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -drop table t1, t2; diff --git a/mysql-test/r/rpl_row_insert_delayed.result b/mysql-test/r/rpl_row_insert_delayed.result deleted file mode 100644 index 2044672f49d..00000000000 --- a/mysql-test/r/rpl_row_insert_delayed.result +++ /dev/null @@ -1,48 +0,0 @@ -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 @old_global_binlog_format = @@global.binlog_format; -set @@global.binlog_format = row; -CREATE SCHEMA IF NOT EXISTS mysqlslap; -USE mysqlslap; -select @@global.binlog_format; -@@global.binlog_format -ROW -CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); -FLUSH TABLE t1; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -use mysqlslap; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -truncate table t1; -insert delayed into t1 values(10, "my name"); -insert delayed into t1 values(10, "is Bond"), (20, "James Bond"); -flush table t1; -select * from t1; -id name -10 my name -20 James Bond -select * from t1; -id name -10 my name -20 James Bond -delete from t1 where id!=10; -insert delayed into t1 values(20, "is Bond"), (10, "James Bond"); -flush table t1; -select * from t1; -id name -10 my name -20 is Bond -select * from t1; -id name -10 my name -20 is Bond -USE test; -DROP SCHEMA mysqlslap; -set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/r/rpl_row_loaddata_m.result b/mysql-test/r/rpl_row_loaddata_m.result deleted file mode 100644 index 149efddaf8d..00000000000 --- a/mysql-test/r/rpl_row_loaddata_m.result +++ /dev/null @@ -1,20 +0,0 @@ -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; -drop database if exists mysqltest; -stop slave; -create database mysqltest; -use mysqltest; -create table t1(a int, b int, unique(b)); -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -show binlog events from 102; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # # -master-bin.000001 # Query 1 # # -master-bin.000001 # Query 1 # # -master-bin.000001 # Table_map 1 # # -master-bin.000001 # Write_rows 1 # # -drop database mysqltest; diff --git a/mysql-test/r/rpl_row_log.result b/mysql-test/r/rpl_row_log.result deleted file mode 100644 index 9de0d3d0ebb..00000000000 --- a/mysql-test/r/rpl_row_log.result +++ /dev/null @@ -1,116 +0,0 @@ -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; -stop slave; -reset master; -reset slave; -reset master; -create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; -insert into t1 values (NULL); -drop table t1; -create table t1 (word char(20) not null)ENGINE=MyISAM; -load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; -select count(*) from t1; -count(*) -69 -show binlog events; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Query 1 # use `test`; drop table t1 -master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -show binlog events from 106 limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -show binlog events from 106 limit 2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -show binlog events from 106 limit 2,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -flush logs; -create table t3 (a int)ENGINE=MyISAM; -start slave; - -let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; - ---source include/wait_slave_status.inc -flush logs; -stop slave; -create table t2 (n int)ENGINE=MyISAM; -insert into t2 values (1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Rotate # # master-bin.000002;pos=4 -show binlog events in 'master-bin.000002'; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM -master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM -master-bin.000002 # Table_map 1 # table_id: # (test.t2) -master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -show binary logs; -Log_name File_size -master-bin.000001 1260 -master-bin.000002 377 -start slave; -show binary logs; -Log_name File_size -slave-bin.000001 1358 -slave-bin.000002 278 -show binlog events in 'slave-bin.000001' from 4; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -slave-bin.000001 # Table_map 1 # table_id: # (test.t1) -slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000001 # Query 1 # use `test`; drop table t1 -slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -slave-bin.000001 # Table_map 1 # table_id: # (test.t1) -slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM -slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 -show binlog events in 'slave-bin.000002' from 4; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM -slave-bin.000002 # Table_map 1 # table_id: # (test.t2) -slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 377 # # master-bin.000002 Yes Yes # 0 0 377 # None 0 No # No -show binlog events in 'slave-bin.000005' from 4; -ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -create table t1(a int auto_increment primary key, b int); -insert into t1 values (NULL, 1); -reset master; -set insert_id=5; -insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -select * from t1; -a b -1 1 -5 1 -6 1 -drop table t1; diff --git a/mysql-test/r/rpl_row_log_innodb.result b/mysql-test/r/rpl_row_log_innodb.result deleted file mode 100644 index 4d8175142b2..00000000000 --- a/mysql-test/r/rpl_row_log_innodb.result +++ /dev/null @@ -1,124 +0,0 @@ -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; -stop slave; -reset master; -reset slave; -reset master; -create table t1(n int not null auto_increment primary key)ENGINE=InnoDB; -insert into t1 values (NULL); -drop table t1; -create table t1 (word char(20) not null)ENGINE=InnoDB; -load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; -select count(*) from t1; -count(*) -69 -show binlog events; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Xid 1 # COMMIT /* XID */ -master-bin.000001 # Query 1 # use `test`; drop table t1 -master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000001 # Xid 1 # COMMIT /* XID */ -show binlog events from 106 limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -show binlog events from 106 limit 2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -master-bin.000001 # Table_map 1 # table_id: # (test.t1) -show binlog events from 106 limit 2,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -flush logs; -create table t3 (a int)ENGINE=InnoDB; -start slave; - -let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; - ---source include/wait_slave_status.inc -flush logs; -stop slave; -create table t2 (n int)ENGINE=InnoDB; -insert into t2 values (1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Rotate # # master-bin.000002;pos=4 -show binlog events in 'master-bin.000002'; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB -master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB -master-bin.000002 # Table_map 1 # table_id: # (test.t2) -master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -master-bin.000002 # Xid 1 # COMMIT /* XID */ -show binary logs; -Log_name File_size -master-bin.000001 1314 -master-bin.000002 404 -start slave; -show binary logs; -Log_name File_size -slave-bin.000001 1412 -slave-bin.000002 305 -show binlog events in 'slave-bin.000001' from 4; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -slave-bin.000001 # Table_map 1 # table_id: # (test.t1) -slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000001 # Xid 1 # COMMIT /* XID */ -slave-bin.000001 # Query 1 # use `test`; drop table t1 -slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB -slave-bin.000001 # Table_map 1 # table_id: # (test.t1) -slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000001 # Xid 1 # COMMIT /* XID */ -slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB -slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 -show binlog events in 'slave-bin.000002' from 4; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB -slave-bin.000002 # Table_map 1 # table_id: # (test.t2) -slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F -slave-bin.000002 # Xid 1 # COMMIT /* XID */ -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 404 # # master-bin.000002 Yes Yes # 0 0 404 # None 0 No # No -show binlog events in 'slave-bin.000005' from 4; -ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -create table t1(a int auto_increment primary key, b int); -insert into t1 values (NULL, 1); -reset master; -set insert_id=5; -insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -select * from t1; -a b -1 1 -5 1 -6 1 -drop table t1; diff --git a/mysql-test/r/rpl_row_max_relay_size.result b/mysql-test/r/rpl_row_max_relay_size.result deleted file mode 100644 index cb1692568fc..00000000000 --- a/mysql-test/r/rpl_row_max_relay_size.result +++ /dev/null @@ -1,281 +0,0 @@ -SET SESSION BINLOG_FORMAT=ROW; -SET GLOBAL BINLOG_FORMAT=ROW; -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; -stop slave; -# -# Generate a big enough master's binlog to cause relay log rotations -# -create table t1 (a int); -drop table t1; -reset slave; -# -# Test 1 -# -set @my_max_binlog_size= @@global.max_binlog_size; -set global max_binlog_size=8192; -set global max_relay_log_size=8192-1; -select @@global.max_relay_log_size; -@@global.max_relay_log_size -4096 -start slave; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 58668 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 58668 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -# -# Test 2 -# -stop slave; -reset slave; -set global max_relay_log_size=(5*4096); -select @@global.max_relay_log_size; -@@global.max_relay_log_size 20480 -start slave; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 58668 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 58668 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -# -# Test 3: max_relay_log_size = 0 -# -stop slave; -reset slave; -set global max_relay_log_size=0; -select @@global.max_relay_log_size; -@@global.max_relay_log_size 0 -start slave; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 58668 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 58668 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -# -# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions -# -stop slave; -reset slave; -flush logs; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File -Read_Master_Log_Pos 4 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File -Slave_IO_Running No -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 0 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -# -# Test 5 -# -reset slave; -start slave; -flush logs; -create table t1 (a int); -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 58754 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 58754 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -# -# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated -# -flush logs; -drop table t1; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 58830 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 58830 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -flush logs; -show master status; -File master-bin.000002 -Position 106 -Binlog_Do_DB -Binlog_Ignore_DB -set global max_binlog_size= @my_max_binlog_size; -# -# End of 4.1 tests -# diff --git a/mysql-test/r/rpl_row_multi_query.result b/mysql-test/r/rpl_row_multi_query.result deleted file mode 100644 index 8cb1aec522b..00000000000 --- a/mysql-test/r/rpl_row_multi_query.result +++ /dev/null @@ -1,37 +0,0 @@ -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; -drop database if exists mysqltest; -create database mysqltest; -create table mysqltest.t1 ( n int); -insert into mysqltest.t1 values(1)/ -insert into mysqltest.t1 values(2); -insert into mysqltest.t1 values(3); -insert into mysqltest.t1 values(4); -insert into mysqltest.t1 values(5)/ -select * from mysqltest.t1; -n -1 -2 -3 -4 -5 -show binlog events from 102; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # # -master-bin.000001 # Query 1 # # -master-bin.000001 # Query 1 # # -master-bin.000001 # Table_map 1 # # -master-bin.000001 # Write_rows 1 # # -master-bin.000001 # Table_map 1 # # -master-bin.000001 # Write_rows 1 # # -master-bin.000001 # Table_map 1 # # -master-bin.000001 # Write_rows 1 # # -master-bin.000001 # Table_map 1 # # -master-bin.000001 # Write_rows 1 # # -master-bin.000001 # Table_map 1 # # -master-bin.000001 # Write_rows 1 # # -drop database mysqltest; diff --git a/mysql-test/r/rpl_row_mysqlbinlog.result b/mysql-test/r/rpl_row_mysqlbinlog.result deleted file mode 100644 index e2df1459ac0..00000000000 --- a/mysql-test/r/rpl_row_mysqlbinlog.result +++ /dev/null @@ -1,352 +0,0 @@ -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; - ----Setup Section -- -set timestamp=1000000000; -DROP TABLE IF EXISTS t1,t2,t3; -CREATE TABLE t1(word VARCHAR(20)); -CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY); -CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT); - ----Test1 check table load -- -SELECT COUNT(*) from t1; -COUNT(*) -351 -SELECT COUNT(*) from t2; -COUNT(*) -500 -SELECT COUNT(*) from t3; -COUNT(*) -500 -SELECT * FROM t1 ORDER BY word LIMIT 5; -word -Aarhus -Aarhus -Aarhus -Aarhus -Aarhus -SELECT * FROM t2 ORDER BY id LIMIT 5; -id -1 -2 -3 -4 -5 -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; -c1 c3 c4 c5 -1 2006-02-22 00:00:00 Tested in Texas 2.2 -2 2006-02-22 00:00:00 Tested in Texas 4.4 -3 2006-02-22 00:00:00 Tested in Texas 6.6 -4 2006-02-22 00:00:00 Tested in Texas 8.8 -5 2006-02-22 00:00:00 Tested in Texas 11 -SELECT COUNT(*) from t1; -COUNT(*) -351 -SELECT COUNT(*) from t2; -COUNT(*) -500 -SELECT COUNT(*) from t3; -COUNT(*) -500 -SELECT * FROM t1 ORDER BY word LIMIT 5; -word -Aarhus -Aarhus -Aarhus -Aarhus -Aarhus -SELECT * FROM t2 ORDER BY id LIMIT 5; -id -1 -2 -3 -4 -5 -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; -c1 c3 c4 c5 -1 2006-02-22 00:00:00 Tested in Texas 2.2 -2 2006-02-22 00:00:00 Tested in Texas 4.4 -3 2006-02-22 00:00:00 Tested in Texas 6.6 -4 2006-02-22 00:00:00 Tested in Texas 8.8 -5 2006-02-22 00:00:00 Tested in Texas 11 -insert into t1 values ("Alas"); -flush logs; - ---- Test 1 Dump binlog to file -- - ---- Test 1 delete tables, clean master and slave -- -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -stop slave; -reset master; -reset slave; -start slave; - ---- Test 1 Load from Dump binlog file -- - ---- Test 1 Check Load Results -- -SELECT COUNT(*) from t1; -COUNT(*) -352 -SELECT COUNT(*) from t2; -COUNT(*) -500 -SELECT COUNT(*) from t3; -COUNT(*) -500 -SELECT * FROM t1 ORDER BY word LIMIT 5; -word -Aarhus -Aarhus -Aarhus -Aarhus -Aarhus -SELECT * FROM t2 ORDER BY id LIMIT 5; -id -1 -2 -3 -4 -5 -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; -c1 c3 c4 c5 -1 2006-02-22 00:00:00 Tested in Texas 2.2 -2 2006-02-22 00:00:00 Tested in Texas 4.4 -3 2006-02-22 00:00:00 Tested in Texas 6.6 -4 2006-02-22 00:00:00 Tested in Texas 8.8 -5 2006-02-22 00:00:00 Tested in Texas 11 -SELECT COUNT(*) from t1; -COUNT(*) -352 -SELECT COUNT(*) from t2; -COUNT(*) -500 -SELECT COUNT(*) from t3; -COUNT(*) -500 -SELECT * FROM t1 ORDER BY word LIMIT 5; -word -Aarhus -Aarhus -Aarhus -Aarhus -Aarhus -SELECT * FROM t2 ORDER BY id LIMIT 5; -id -1 -2 -3 -4 -5 -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; -c1 c3 c4 c5 -1 2006-02-22 00:00:00 Tested in Texas 2.2 -2 2006-02-22 00:00:00 Tested in Texas 4.4 -3 2006-02-22 00:00:00 Tested in Texas 6.6 -4 2006-02-22 00:00:00 Tested in Texas 8.8 -5 2006-02-22 00:00:00 Tested in Texas 11 - ---- Test 2 position test -- -/*!40019 SET @@session.max_insert_delayed_threads=0*/; -/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -DELIMITER /*!*/; -use test/*!*/; -SET TIMESTAMP=1000000000/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; -SET @@session.sql_mode=0/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; -CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; -DELIMITER ; -# End of log file -ROLLBACK /* added by mysqlbinlog */; -/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; - ---- Test 3 First Remote test -- -/*!40019 SET @@session.max_insert_delayed_threads=0*/; -/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -DELIMITER /*!*/; -ROLLBACK/*!*/; -use test/*!*/; -SET TIMESTAMP=1000000000/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; -SET @@session.sql_mode=0/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; -DROP TABLE IF EXISTS t1,t2,t3/*!*/; -SET TIMESTAMP=1000000000/*!*/; -CREATE TABLE t1(word VARCHAR(20))/*!*/; -SET TIMESTAMP=1000000000/*!*/; -CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)/*!*/; -SET TIMESTAMP=1000000000/*!*/; -CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; -DELIMITER ; -# End of log file -ROLLBACK /* added by mysqlbinlog */; -/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; - ---- Test 4 Second Remote test -- -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -stop slave; -reset master; -reset slave; -start slave; -SELECT COUNT(*) from t1; -COUNT(*) -352 -SELECT COUNT(*) from t2; -COUNT(*) -500 -SELECT COUNT(*) from t3; -COUNT(*) -500 -SELECT * FROM t1 ORDER BY word LIMIT 5; -word -Aarhus -Aarhus -Aarhus -Aarhus -Aarhus -SELECT * FROM t2 ORDER BY id LIMIT 5; -id -1 -2 -3 -4 -5 -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; -c1 c3 c4 c5 -1 2006-02-22 00:00:00 Tested in Texas 2.2 -2 2006-02-22 00:00:00 Tested in Texas 4.4 -3 2006-02-22 00:00:00 Tested in Texas 6.6 -4 2006-02-22 00:00:00 Tested in Texas 8.8 -5 2006-02-22 00:00:00 Tested in Texas 11 -SELECT COUNT(*) from t1; -COUNT(*) -352 -SELECT COUNT(*) from t2; -COUNT(*) -500 -SELECT COUNT(*) from t3; -COUNT(*) -500 -SELECT * FROM t1 ORDER BY word LIMIT 5; -word -Aarhus -Aarhus -Aarhus -Aarhus -Aarhus -SELECT * FROM t2 ORDER BY id LIMIT 5; -id -1 -2 -3 -4 -5 -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; -c1 c3 c4 c5 -1 2006-02-22 00:00:00 Tested in Texas 2.2 -2 2006-02-22 00:00:00 Tested in Texas 4.4 -3 2006-02-22 00:00:00 Tested in Texas 6.6 -4 2006-02-22 00:00:00 Tested in Texas 8.8 -5 2006-02-22 00:00:00 Tested in Texas 11 - ---- Test 5 LOAD DATA -- -/*!40019 SET @@session.max_insert_delayed_threads=0*/; -/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -DELIMITER /*!*/; -DELIMITER ; -# End of log file -ROLLBACK /* added by mysqlbinlog */; -/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; - ---- Test 6 reading stdin -- -/*!40019 SET @@session.max_insert_delayed_threads=0*/; -/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -DELIMITER /*!*/; -ROLLBACK/*!*/; -use test/*!*/; -SET TIMESTAMP=1000000000/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; -SET @@session.sql_mode=0/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; -DROP TABLE IF EXISTS t1,t2,t3/*!*/; -SET TIMESTAMP=1000000000/*!*/; -CREATE TABLE t1(word VARCHAR(20))/*!*/; -SET TIMESTAMP=1000000000/*!*/; -CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)/*!*/; -SET TIMESTAMP=1000000000/*!*/; -CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; -DELIMITER ; -# End of log file -ROLLBACK /* added by mysqlbinlog */; -/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; - ---- Test 7 reading stdin w/position -- -/*!40019 SET @@session.max_insert_delayed_threads=0*/; -/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -DELIMITER /*!*/; -use test/*!*/; -SET TIMESTAMP=1000000000/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; -SET @@session.sql_mode=0/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; -CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; -DELIMITER ; -# End of log file -ROLLBACK /* added by mysqlbinlog */; -/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; - ---- Test 8 switch internal charset -- -stop slave; -reset master; -reset slave; -start slave; -create table t4 (f text character set utf8); -create table t5 (f text character set cp932); -flush logs; -rename table t4 to t04, t5 to t05; -select HEX(f) from t04; -HEX(f) -E382BD -select HEX(f) from t4; -HEX(f) -E382BD -select HEX(f) from t05; -HEX(f) -835C -select HEX(f) from t5; -HEX(f) -835C -select HEX(f) from t04; -HEX(f) -E382BD -select HEX(f) from t4; -HEX(f) -E382BD -select HEX(f) from t05; -HEX(f) -835C -select HEX(f) from t5; -HEX(f) -835C - ---- Test cleanup -- -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (a INT NOT NULL KEY, b INT); -INSERT INTO t1 VALUES(1,1); -SELECT * FROM t1; -a b -1 1 -FLUSH LOGS; -DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; diff --git a/mysql-test/r/rpl_row_mystery22.result b/mysql-test/r/rpl_row_mystery22.result deleted file mode 100644 index bcf65e4ede3..00000000000 --- a/mysql-test/r/rpl_row_mystery22.result +++ /dev/null @@ -1,30 +0,0 @@ -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; -create table t1(n int auto_increment primary key, s char(10)); -insert into t1 values (2,'old'); -insert into t1 values(NULL,'new'); -insert into t1 values(NULL,'new'); -select * from t1 order by n; -n s -1 new -2 new -delete from t1 where n = 2; -start slave; -stop slave; -create table t2(n int); -drop table t2; -insert into t1 values(NULL,'new'); -set sql_log_bin=0; -insert into t1 values(NULL,'new'); -set sql_log_bin=1; -delete from t1 where n=4; -start slave; -select * from t1 order by n; -n s -1 new -3 new -drop table t1; diff --git a/mysql-test/r/rpl_row_reset_slave.result b/mysql-test/r/rpl_row_reset_slave.result deleted file mode 100644 index c9ae5ced7bc..00000000000 --- a/mysql-test/r/rpl_row_reset_slave.result +++ /dev/null @@ -1,32 +0,0 @@ -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; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No -stop slave; -change master to master_user='test'; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # No -reset slave; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No -start slave; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No -stop slave; -reset slave; -start slave; -create temporary table t1 (a int); -stop slave; -reset slave; -start slave; -show status like 'slave_open_temp_tables'; -Variable_name Value -Slave_open_temp_tables 0 diff --git a/mysql-test/r/rpl_row_sp001.result b/mysql-test/r/rpl_row_sp001.result deleted file mode 100644 index 8c26c061376..00000000000 --- a/mysql-test/r/rpl_row_sp001.result +++ /dev/null @@ -1,85 +0,0 @@ -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; - - ---------------------------------------------- -create table test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); -create procedure test.p1() -begin -INSERT INTO test.t1 (f,d) VALUES (RAND(),NOW()); -end// - - -------------------------------------------- -CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t CHAR(4), PRIMARY KEY(a)); -CREATE PROCEDURE test.p2(n int) -begin -CASE n -WHEN 1 THEN -UPDATE test.t2 set t ='Tex'; -WHEN 2 THEN -UPDATE test.t2 set t ='SQL'; -ELSE -UPDATE test.t2 set t ='NONE'; -END CASE; -end// -INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'); -SELECT * FROM t2 ORDER BY a; -a t -1 NEW -2 NEW -3 NEW -4 NEW -SELECT * FROM t2 ORDER BY a; -a t -1 NEW -2 NEW -3 NEW -4 NEW -call test.p2(1); -SELECT * FROM t2 ORDER BY a; -a t -1 Tex -2 Tex -3 Tex -4 Tex -SELECT * FROM t2 ORDER BY a; -a t -1 Tex -2 Tex -3 Tex -4 Tex -call test.p2(2); -SELECT * FROM t2 ORDER BY a; -a t -1 SQL -2 SQL -3 SQL -4 SQL -SELECT * FROM t2 ORDER BY a; -a t -1 SQL -2 SQL -3 SQL -4 SQL -call test.p2(3); -SELECT * FROM t2 ORDER BY a; -a t -1 NONE -2 NONE -3 NONE -4 NONE -SELECT * FROM t2 ORDER BY a; -a t -1 NONE -2 NONE -3 NONE -4 NONE -DROP PROCEDURE test.p1; -DROP PROCEDURE test.p2; -DROP TABLE test.t1; -DROP TABLE test.t2; diff --git a/mysql-test/r/rpl_row_sp002_innodb.result b/mysql-test/r/rpl_row_sp002_innodb.result deleted file mode 100644 index a42c9af988c..00000000000 --- a/mysql-test/r/rpl_row_sp002_innodb.result +++ /dev/null @@ -1,239 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t1 (a INT AUTO_INCREMENT KEY, t CHAR(6)) ENGINE=INNODB; -CREATE TABLE test.t2 (a INT AUTO_INCREMENT KEY, f INT, FOREIGN KEY(a) REFERENCES test.t1(a) ON DELETE CASCADE) ENGINE=INNODB; -create procedure test.p1(IN i CHAR(6)) -begin -INSERT INTO test.t1 (t) VALUES (i); -INSERT INTO test.t2 VALUES (NULL,LAST_INSERT_ID()); -end| -create procedure test.p2(IN i INT) -begin -DELETE FROM test.t1 where a < i; -end| - -< -- test 1 call p1 -- > ------------------------- -SET FOREIGN_KEY_CHECKS=1; -call test.p1('texas'); -call test.p1('Live'); -call test.p1('next'); -call test.p1('to'); -call test.p1('OK'); -call test.p1('MySQL'); - -< -- test 1 select master after p1 -- > ---------------------------------------- -SELECT * FROM test.t1; -a t -1 texas -2 Live -3 next -4 to -5 OK -6 MySQL -SELECT * FROM test.t2; -a f -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 - -< -- test 1 select slave after p1 -- > --------------------------------------- -SELECT * FROM test.t1; -a t -1 texas -2 Live -3 next -4 to -5 OK -6 MySQL -SELECT * FROM test.t2; -a f -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 - -< -- test 1 call p2 & select master -- > ----------------------------------------- -call test.p2(4); -SELECT * FROM test.t1; -a t -4 to -5 OK -6 MySQL -SELECT * FROM test.t2; -a f -4 4 -5 5 -6 6 - -< -- test 1 select slave after p2 -- > --------------------------------------- -SELECT * FROM test.t1; -a t -4 to -5 OK -6 MySQL -SELECT * FROM test.t2; -a f -4 4 -5 5 -6 6 - -< -- End test 1 Begin test 2 -- > ---------------------------------- -SET FOREIGN_KEY_CHECKS=0; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t1 (a INT, t CHAR(6), PRIMARY KEY(a)) ENGINE=INNODB; -CREATE TABLE test.t2 (a INT, f INT, FOREIGN KEY(a) REFERENCES test.t1(a) ON UPDATE CASCADE, PRIMARY KEY(a)) ENGINE=INNODB; -CREATE PROCEDURE test.p1(IN nm INT, IN ch CHAR(6)) -BEGIN -INSERT INTO test.t1 (a,t) VALUES (nm, ch); -INSERT INTO test.t2 VALUES (nm, LAST_INSERT_ID()); -END| -CREATE PROCEDURE test.p2(IN i INT) -BEGIN -UPDATE test.t1 SET a = i*10 WHERE a = i; -END| -SET FOREIGN_KEY_CHECKS=1; -CALL test.p1(1,'texas'); -CALL test.p1(2,'Live'); -CALL test.p1(3,'next'); -CALL test.p1(4,'to'); -CALL test.p1(5,'OK'); -CALL test.p1(6,'MySQL'); - -< -- test 2 select Master after p1 -- > ---------------------------------------- -SELECT * FROM test.t1; -a t -1 texas -2 Live -3 next -4 to -5 OK -6 MySQL -SELECT * FROM test.t2; -a f -1 6 -2 6 -3 6 -4 6 -5 6 -6 6 - -< -- test 2 select Slave after p1 -- > --------------------------------------- -SELECT * FROM test.t1; -a t -1 texas -2 Live -3 next -4 to -5 OK -6 MySQL -SELECT * FROM test.t2; -a f -1 6 -2 6 -3 6 -4 6 -5 6 -6 6 - -< -- test 2 call p2 & select Master -- > ----------------------------------------- -CALL test.p2(2); -CALL test.p2(4); -CALL test.p2(6); -SELECT * FROM test.t1; -a t -1 texas -3 next -5 OK -20 Live -40 to -60 MySQL -SELECT * FROM test.t2; -a f -1 6 -3 6 -5 6 -20 6 -40 6 -60 6 - -< -- test 1 select Slave after p2 -- > --------------------------------------- -SELECT * FROM test.t1; -a t -1 texas -3 next -5 OK -20 Live -40 to -60 MySQL -SELECT * FROM test.t2; -a f -1 6 -3 6 -5 6 -20 6 -40 6 -60 6 - -< -- End test 2 Begin test 3 -- > ---------------------------------- -CREATE TABLE test.t3 (a INT AUTO_INCREMENT KEY, t CHAR(6))ENGINE=INNODB; -CREATE PROCEDURE test.p3(IN n INT) -begin -CASE n -WHEN 2 THEN -DELETE from test.t3; -ELSE -INSERT INTO test.t3 VALUES (NULL,'NONE'); -END CASE; -end| -SET AUTOCOMMIT=0; -START TRANSACTION; -ROLLBACK; -select * from test.t3; -a t -select * from test.t3; -a t -START TRANSACTION; -COMMIT; -select * from test.t3; -a t -98 NONE -select * from test.t3; -a t -98 NONE -SET AUTOCOMMIT=1; -SET FOREIGN_KEY_CHECKS=0; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/r/rpl_row_sp003.result b/mysql-test/r/rpl_row_sp003.result deleted file mode 100644 index df3e2a7ceed..00000000000 --- a/mysql-test/r/rpl_row_sp003.result +++ /dev/null @@ -1,49 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=INNODB; -CREATE PROCEDURE test.p1() -BEGIN -INSERT INTO test.t1 VALUES (4); -SELECT get_lock("test", 100); -UPDATE test.t1 set a=a+4 WHERE a=4; -END| -CREATE PROCEDURE test.p2() -BEGIN -UPDATE test.t1 SET a=a+1; -END| -SELECT get_lock("test", 200); -get_lock("test", 200) -1 -CALL test.p1(); -CALL test.p2(); -SELECT release_lock("test"); -release_lock("test") -1 -SELECT * FROM test.t1; -a -5 -SELECT * FROM test.t1; -a -5 -DROP TABLE IF EXISTS test.t1; -CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=INNODB; -CALL test.p2(); -CALL test.p1(); -get_lock("test", 100) -0 -SELECT * FROM test.t1; -a -8 -SELECT * FROM test.t1; -a -8 -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/r/rpl_row_sp005.result b/mysql-test/r/rpl_row_sp005.result deleted file mode 100644 index 01e1970e0df..00000000000 --- a/mysql-test/r/rpl_row_sp005.result +++ /dev/null @@ -1,100 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t3; -CREATE TABLE IF NOT EXISTS test.t1(id INT, data CHAR(16),PRIMARY KEY(id)); -CREATE TABLE IF NOT EXISTS test.t2(id2 INT,PRIMARY KEY(id2)); -CREATE TABLE IF NOT EXISTS test.t3(id3 INT,PRIMARY KEY(id3), c CHAR(16)); -CREATE PROCEDURE test.p1() -BEGIN -DECLARE done INT DEFAULT 0; -DECLARE spa CHAR(16); -DECLARE spb,spc INT; -DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1 ORDER BY id; -DECLARE cur2 CURSOR FOR SELECT id2 FROM test.t2 ORDER BY id2; -DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; -OPEN cur1; -OPEN cur2; -REPEAT -FETCH cur1 INTO spb, spa; -FETCH cur2 INTO spc; -IF NOT done THEN -IF spb < spc THEN -INSERT INTO test.t3 VALUES (spb,spa); -ELSE -INSERT INTO test.t3 VALUES (spc,spa); -END IF; -END IF; -UNTIL done END REPEAT; -CLOSE cur1; -CLOSE cur2; -END| -CREATE PROCEDURE test.p2() -BEGIN -INSERT INTO test.t1 VALUES (4,'MySQL'),(20,'ROCKS'),(11,'Texas'),(10,'kyle'); -INSERT INTO test.t2 VALUES (4),(2),(1),(3); -UPDATE test.t1 SET id=id+4 WHERE id=4; -END| - -< ---- Master selects-- > -------------------------- -CALL test.p2(); -SELECT * FROM test.t1 ORDER BY id; -id data -8 MySQL -10 kyle -11 Texas -20 ROCKS -SELECT * FROM test.t2 ORDER BY id2; -id2 -1 -2 -3 -4 - -< ---- Slave selects-- > ------------------------- -SELECT * FROM test.t1 ORDER BY id; -id data -8 MySQL -10 kyle -11 Texas -20 ROCKS -SELECT * FROM test.t2 ORDER BY id2; -id2 -1 -2 -3 -4 - -< ---- Master selects-- > -------------------------- -CALL test.p1(); -SELECT * FROM test.t3 ORDER BY id3; -id3 c -1 MySQL -2 kyle -3 Texas -4 ROCKS - -< ---- Slave selects-- > ------------------------- -SELECT * FROM test.t3 ORDER BY id3; -id3 c -1 MySQL -2 kyle -3 Texas -4 ROCKS -ALTER PROCEDURE test.p1 MODIFIES SQL DATA; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/r/rpl_row_sp006_InnoDB.result b/mysql-test/r/rpl_row_sp006_InnoDB.result deleted file mode 100644 index 8339e77d3a0..00000000000 --- a/mysql-test/r/rpl_row_sp006_InnoDB.result +++ /dev/null @@ -1,46 +0,0 @@ -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; -create database if not exists mysqltest1; -DROP PROCEDURE IF EXISTS mysqltest1.p1; -DROP PROCEDURE IF EXISTS mysqltest1.p2; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t1; -CREATE TABLE IF NOT EXISTS mysqltest1.t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=InnoDB; -CREATE TABLE IF NOT EXISTS mysqltest1.t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=InnoDB; -CREATE PROCEDURE mysqltest1.p1() -BEGIN -DECLARE done INT DEFAULT 0; -DECLARE spa CHAR(16); -DECLARE spb INT; -DECLARE cur1 CURSOR FOR SELECT name, -(YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5) -------------------------- -CALL test.p1(12); -Warnings: -Note 1051 Unknown table 't1' -SELECT * FROM test.t1; -num -12 - -< ---- Slave selects-- > ------------------------- -SELECT * FROM test.t1; -num -12 - -< ---- Master selects-- > -------------------------- -CALL test.p1(13); -SELECT * FROM test.t1; -num -13 - -< ---- Slave selects-- > ------------------------- -SELECT * FROM test.t1; -num -13 -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/r/rpl_row_sp008.result b/mysql-test/r/rpl_row_sp008.result deleted file mode 100644 index 23197964a24..00000000000 --- a/mysql-test/r/rpl_row_sp008.result +++ /dev/null @@ -1,34 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t1 (a INT,PRIMARY KEY(a)); -CREATE TABLE test.t2 (a INT,PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES(1),(2); -CREATE PROCEDURE test.p1() -BEGIN -SELECT SQL_CALC_FOUND_ROWS * FROM test.t1 LIMIT 1; -INSERT INTO test.t2 VALUES(FOUND_ROWS()); -END| - -< ---- Master selects-- > -------------------------- -CALL test.p1(); -a -1 -SELECT * FROM test.t2; -a -2 - -< ---- Slave selects-- > ------------------------- -SELECT * FROM test.t2; -a -2 -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/r/rpl_row_sp009.result b/mysql-test/r/rpl_row_sp009.result deleted file mode 100644 index 35ce0d7b420..00000000000 --- a/mysql-test/r/rpl_row_sp009.result +++ /dev/null @@ -1,77 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t1 (a INT, PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES (1),(2),(3),(4); -CREATE TABLE test.t2 (a INT, PRIMARY KEY(a)); -CREATE PROCEDURE test.p1 (arg1 CHAR(1)) -BEGIN -DECLARE b, c INT; -IF arg1 = 'a' THEN -BEGIN -DECLARE cur1 CURSOR FOR SELECT A FROM test.t1 WHERE a % 2; -DECLARE continue handler for not found set b = 1; -SET b = 0; -OPEN cur1; -c1_repeat: REPEAT -FETCH cur1 INTO c; -IF (b = 1) THEN -LEAVE c1_repeat; -END IF; -INSERT INTO test.t2 VALUES (c); -UNTIL b = 1 -END REPEAT; -CLOSE cur1; -END; -END IF; -IF arg1 = 'b' THEN -BEGIN -DECLARE cur2 CURSOR FOR SELECT a FROM test.t1 WHERE NOT a % 2; -DECLARE continue handler for not found set b = 1; -SET b = 0; -OPEN cur2; -c2_repeat: REPEAT -FETCH cur2 INTO c; -IF (b = 1) THEN -LEAVE c2_repeat; -END IF; -INSERT INTO test.t2 VALUES (c); -UNTIL b = 1 -END REPEAT; -CLOSE cur2; -END; -END IF; -END| -CALL test.p1('a'); -SELECT * FROM test.t2 ORDER BY a; -a -1 -3 -SELECT * FROM test.t2 ORDER BY a; -a -1 -3 -truncate test.t2; -call test.p1('b'); -select * from test.t2 ORDER BY a; -a -2 -4 -SELECT * FROM test.t2 ORDER BY a; -a -2 -4 -truncate test.t2; -SELECT * FROM test.t2 ORDER BY a; -a -SELECT * FROM test.t2 ORDER BY a; -a -DROP PROCEDURE test.p1; -DROP TABLE test.t1; -DROP TABLE test.t2; diff --git a/mysql-test/r/rpl_row_sp010.result b/mysql-test/r/rpl_row_sp010.result deleted file mode 100644 index 02567465428..00000000000 --- a/mysql-test/r/rpl_row_sp010.result +++ /dev/null @@ -1,56 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -CREATE PROCEDURE test.p1() -BEGIN -INSERT INTO test.t1 VALUES(2); -END| -CREATE PROCEDURE test.p2() -BEGIN -DROP TEMPORARY TABLE IF EXISTS test.t1; -CREATE TEMPORARY TABLE test.t1 (a int, PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES(1); -CALL test.p1(); -END| -CALL test.p2(); -SELECT * FROM test.t1 ORDER BY a; -a -1 -2 -show tables; -Tables_in_test -CREATE PROCEDURE test.p3() -BEGIN -INSERT INTO test.t2 VALUES(7); -END| -CREATE PROCEDURE test.p4() -BEGIN -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t2 (a int, PRIMARY KEY(a)); -INSERT INTO test.t2 VALUES(6); -CALL test.p3(); -END| -CALL test.p4(); -SELECT * FROM test.t2 ORDER BY a; -a -6 -7 -SELECT * FROM test.t2 ORDER BY a; -a -6 -7 -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/r/rpl_row_sp011.result b/mysql-test/r/rpl_row_sp011.result deleted file mode 100644 index e35c9f21adb..00000000000 --- a/mysql-test/r/rpl_row_sp011.result +++ /dev/null @@ -1,69 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP PROCEDURE IF EXISTS test.p5; -DROP PROCEDURE IF EXISTS test.p6; -DROP PROCEDURE IF EXISTS test.p7; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t1 (a int, PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES (1); -CREATE PROCEDURE test.p1() -BEGIN -ALTER TABLE test.t1 ADD COLUMN b CHAR(4) AFTER a; -UPDATE test.t1 SET b = 'rbr' WHERE a = 1; -CALL test.p2(); -END| -CREATE PROCEDURE test.p2() -BEGIN -ALTER TABLE test.t1 ADD COLUMN f FLOAT AFTER b; -UPDATE test.t1 SET f = RAND() WHERE a = 1; -CALL test.p3(); -END| -CREATE PROCEDURE test.p3() -BEGIN -ALTER TABLE test.t1 RENAME test.t2; -CALL test.p4(); -END| -CREATE PROCEDURE test.p4() -BEGIN -ALTER TABLE test.t2 ADD INDEX (f); -ALTER TABLE test.t2 CHANGE a a INT UNSIGNED NOT NULL AUTO_INCREMENT; -INSERT INTO test.t2 VALUES (NULL,'TEST',RAND()); -CALL test.p5(); -END| -CREATE PROCEDURE test.p5() -BEGIN -ALTER TABLE test.t2 ORDER BY f; -INSERT INTO test.t2 VALUES (NULL,'STM',RAND()); -CALL test.p6(); -END| -CREATE PROCEDURE test.p6() -BEGIN -ALTER TABLE test.t2 ADD COLUMN b2 CHAR(4) FIRST; -ALTER TABLE test.t2 ADD COLUMN to_drop BIT(8) AFTER b2; -INSERT INTO test.t2 VALUES ('new',1,NULL,'STM',RAND()); -CALL test.p7(); -END| -CREATE PROCEDURE test.p7() -BEGIN -ALTER TABLE test.t2 DROP COLUMN to_drop; -INSERT INTO test.t2 VALUES ('gone',NULL,'STM',RAND()); -END| -CALL test.p1(); -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP PROCEDURE IF EXISTS test.p5; -DROP PROCEDURE IF EXISTS test.p6; -DROP PROCEDURE IF EXISTS test.p7; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/r/rpl_row_sp012.result b/mysql-test/r/rpl_row_sp012.result deleted file mode 100644 index b9c818bad9a..00000000000 --- a/mysql-test/r/rpl_row_sp012.result +++ /dev/null @@ -1,59 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -grant usage on *.* to user1@localhost; -flush privileges; -SELECT CURRENT_USER(); -CURRENT_USER() -root@localhost -SELECT USER(); -USER() -root@localhost -CREATE PROCEDURE test.p1 () SQL SECURITY INVOKER SELECT CURRENT_USER(), USER(); -CREATE PROCEDURE test.p2 () SQL SECURITY DEFINER CALL test.p1(); -CREATE PROCEDURE test.p3 () SQL SECURITY INVOKER CALL test.p1(); -GRANT EXECUTE ON PROCEDURE p1 TO user1@localhost; -GRANT EXECUTE ON PROCEDURE p2 TO user1@localhost; -GRANT EXECUTE ON PROCEDURE p3 TO user1@localhost; - -<******** Master user1 p3 & p2 calls *******> ----------------------------------------------- -SELECT CURRENT_USER(); -CURRENT_USER() -user1@localhost -SELECT USER(); -USER() -user1@localhost -CALL test.p3(); -CURRENT_USER() USER() -user1@localhost user1@localhost -CALL test.p2(); -CURRENT_USER() USER() -root@localhost user1@localhost - -<******** Slave user1 p3 & p2 calls *******> ---------------------------------------------- -SELECT CURRENT_USER(); -CURRENT_USER() -user1@localhost -SELECT USER(); -USER() -user1@localhost -CALL test.p3(); -CURRENT_USER() USER() -user1@localhost user1@localhost -CALL test.p2(); -CURRENT_USER() USER() -root@localhost user1@localhost -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP USER user1@localhost; diff --git a/mysql-test/r/rpl_row_stop_middle.result b/mysql-test/r/rpl_row_stop_middle.result deleted file mode 100644 index 46ca5748174..00000000000 --- a/mysql-test/r/rpl_row_stop_middle.result +++ /dev/null @@ -1,26 +0,0 @@ -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; -create table t1 (a int not null auto_increment primary key, b int, key(b)); -stop slave; -INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -start slave; -stop slave; -drop table t1; -drop table t1; diff --git a/mysql-test/r/rpl_row_stop_middle_update.result b/mysql-test/r/rpl_row_stop_middle_update.result deleted file mode 100644 index 0fd4ff86893..00000000000 --- a/mysql-test/r/rpl_row_stop_middle_update.result +++ /dev/null @@ -1,16 +0,0 @@ -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; -create table t1 (words varchar(20)) engine=myisam; -load data infile '../std_data_ln/words.dat' into table t1 (words); -select count(*) from t1; -count(*) -70 -select count(*) from t1; -count(*) -70 -drop table t1; -drop table t1; diff --git a/mysql-test/r/rpl_row_tabledefs_2myisam.result b/mysql-test/r/rpl_row_tabledefs_2myisam.result deleted file mode 100644 index 4eca19ff098..00000000000 --- a/mysql-test/r/rpl_row_tabledefs_2myisam.result +++ /dev/null @@ -1,389 +0,0 @@ -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; -STOP SLAVE; -SET @my_sql_mode= @@global.sql_mode; -SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; -START SLAVE; -CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; -CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; -CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; -CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; -CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; -CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; -CREATE TABLE t4 (a INT) ENGINE='MyISAM'; -CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='MyISAM'; -CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='MyISAM'; -CREATE TABLE t7 (a INT NOT NULL) ENGINE='MyISAM'; -CREATE TABLE t8 (a INT NOT NULL) ENGINE='MyISAM'; -CREATE TABLE t9 (a INT) ENGINE='MyISAM'; -ALTER TABLE t1_int ADD x INT DEFAULT 42; -ALTER TABLE t1_bit -ADD x BIT(3) DEFAULT b'011', -ADD y BIT(5) DEFAULT b'10101', -ADD z BIT(2) DEFAULT b'10'; -ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; -ALTER TABLE t1_nodef ADD x INT NOT NULL; -ALTER TABLE t2 DROP b; -ALTER TABLE t4 MODIFY a FLOAT; -ALTER TABLE t5 MODIFY b FLOAT; -ALTER TABLE t6 MODIFY c FLOAT; -ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT, -ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT; -ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0, -ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0, -ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0, -ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0; -INSERT INTO t1_int VALUES (2, 4, 4711); -INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); -INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); -**** On Master **** -INSERT INTO t1_int VALUES (1,2); -INSERT INTO t1_int VALUES (2,5); -INSERT INTO t1_bit VALUES (1,2); -INSERT INTO t1_bit VALUES (2,5); -INSERT INTO t1_char VALUES (1,2); -INSERT INTO t1_char VALUES (2,5); -SELECT * FROM t1_int ORDER BY a; -a b -1 2 -2 5 -SELECT * FROM t1_bit ORDER BY a; -a b -1 2 -2 5 -SELECT * FROM t1_char ORDER BY a; -a b -1 2 -2 5 -**** On Slave **** -SELECT a,b,x FROM t1_int ORDER BY a; -a b x -1 2 42 -2 5 4711 -SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; -a b HEX(x) HEX(y) HEX(z) -1 2 3 15 2 -2 5 5 1C 1 -SELECT a,b,x FROM t1_char ORDER BY a; -a b x -1 2 Just a test -2 5 Foo is a bar -**** On Master **** -UPDATE t1_int SET b=2*b WHERE a=2; -UPDATE t1_char SET b=2*b WHERE a=2; -UPDATE t1_bit SET b=2*b WHERE a=2; -SELECT * FROM t1_int ORDER BY a; -a b -1 2 -2 10 -SELECT * FROM t1_bit ORDER BY a; -a b -1 2 -2 10 -SELECT * FROM t1_char ORDER BY a; -a b -1 2 -2 10 -**** On Slave **** -SELECT a,b,x FROM t1_int ORDER BY a; -a b x -1 2 42 -2 10 4711 -SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; -a b HEX(x) HEX(y) HEX(z) -1 2 3 15 2 -2 10 5 1C 1 -SELECT a,b,x FROM t1_char ORDER BY a; -a b x -1 2 Just a test -2 10 Foo is a bar -INSERT INTO t9 VALUES (2); -INSERT INTO t1_nodef VALUES (1,2); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1105 -Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (2); -INSERT INTO t2 VALUES (2,4); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (4); -INSERT INTO t4 VALUES (4); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (5); -INSERT INTO t5 VALUES (5,10,25); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (6); -INSERT INTO t6 VALUES (6,12,36); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (6); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -INSERT INTO t7 VALUES (1),(2),(3); -INSERT INTO t8 VALUES (1),(2),(3); -SELECT * FROM t7 ORDER BY a; -a -1 -2 -3 -SELECT * FROM t8 ORDER BY a; -a -1 -2 -3 -SELECT * FROM t7 ORDER BY a; -a e1 e2 e3 e4 e5 e6 e7 e8 -1 NULL NULL NULL NULL NULL NULL NULL NULL -2 NULL NULL NULL NULL NULL NULL NULL NULL -3 NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t8 ORDER BY a; -a e1 e2 e3 e4 e5 e6 e7 e8 -1 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 -**** On Master **** -TRUNCATE t1_nodef; -SET SQL_LOG_BIN=0; -INSERT INTO t1_nodef VALUES (1,2); -INSERT INTO t1_nodef VALUES (2,4); -SET SQL_LOG_BIN=1; -**** On Slave **** -INSERT INTO t1_nodef VALUES (1,2,3); -INSERT INTO t1_nodef VALUES (2,4,6); -**** On Master **** -UPDATE t1_nodef SET b=2*b WHERE a=1; -SELECT * FROM t1_nodef ORDER BY a; -a b -1 4 -2 4 -**** On Slave **** -SELECT * FROM t1_nodef ORDER BY a; -a b x -1 4 3 -2 4 6 -**** On Master **** -DELETE FROM t1_nodef WHERE a=2; -SELECT * FROM t1_nodef ORDER BY a; -a b -1 4 -**** On Slave **** -SELECT * FROM t1_nodef ORDER BY a; -a b x -1 4 3 -**** Cleanup **** -DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; -DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; -SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/r/rpl_row_tabledefs_3innodb.result b/mysql-test/r/rpl_row_tabledefs_3innodb.result deleted file mode 100644 index 687108e17e5..00000000000 --- a/mysql-test/r/rpl_row_tabledefs_3innodb.result +++ /dev/null @@ -1,389 +0,0 @@ -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; -STOP SLAVE; -SET @my_sql_mode= @@global.sql_mode; -SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; -START SLAVE; -CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; -CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; -CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; -CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; -CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; -CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; -CREATE TABLE t4 (a INT) ENGINE='InnoDB'; -CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='InnoDB'; -CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='InnoDB'; -CREATE TABLE t7 (a INT NOT NULL) ENGINE='InnoDB'; -CREATE TABLE t8 (a INT NOT NULL) ENGINE='InnoDB'; -CREATE TABLE t9 (a INT) ENGINE='InnoDB'; -ALTER TABLE t1_int ADD x INT DEFAULT 42; -ALTER TABLE t1_bit -ADD x BIT(3) DEFAULT b'011', -ADD y BIT(5) DEFAULT b'10101', -ADD z BIT(2) DEFAULT b'10'; -ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; -ALTER TABLE t1_nodef ADD x INT NOT NULL; -ALTER TABLE t2 DROP b; -ALTER TABLE t4 MODIFY a FLOAT; -ALTER TABLE t5 MODIFY b FLOAT; -ALTER TABLE t6 MODIFY c FLOAT; -ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT, -ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT; -ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0, -ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0, -ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0, -ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0; -INSERT INTO t1_int VALUES (2, 4, 4711); -INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); -INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); -**** On Master **** -INSERT INTO t1_int VALUES (1,2); -INSERT INTO t1_int VALUES (2,5); -INSERT INTO t1_bit VALUES (1,2); -INSERT INTO t1_bit VALUES (2,5); -INSERT INTO t1_char VALUES (1,2); -INSERT INTO t1_char VALUES (2,5); -SELECT * FROM t1_int ORDER BY a; -a b -1 2 -2 5 -SELECT * FROM t1_bit ORDER BY a; -a b -1 2 -2 5 -SELECT * FROM t1_char ORDER BY a; -a b -1 2 -2 5 -**** On Slave **** -SELECT a,b,x FROM t1_int ORDER BY a; -a b x -1 2 42 -2 5 4711 -SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; -a b HEX(x) HEX(y) HEX(z) -1 2 3 15 2 -2 5 5 1C 1 -SELECT a,b,x FROM t1_char ORDER BY a; -a b x -1 2 Just a test -2 5 Foo is a bar -**** On Master **** -UPDATE t1_int SET b=2*b WHERE a=2; -UPDATE t1_char SET b=2*b WHERE a=2; -UPDATE t1_bit SET b=2*b WHERE a=2; -SELECT * FROM t1_int ORDER BY a; -a b -1 2 -2 10 -SELECT * FROM t1_bit ORDER BY a; -a b -1 2 -2 10 -SELECT * FROM t1_char ORDER BY a; -a b -1 2 -2 10 -**** On Slave **** -SELECT a,b,x FROM t1_int ORDER BY a; -a b x -1 2 42 -2 10 4711 -SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; -a b HEX(x) HEX(y) HEX(z) -1 2 3 15 2 -2 10 5 1C 1 -SELECT a,b,x FROM t1_char ORDER BY a; -a b x -1 2 Just a test -2 10 Foo is a bar -INSERT INTO t9 VALUES (2); -INSERT INTO t1_nodef VALUES (1,2); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1105 -Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (2); -INSERT INTO t2 VALUES (2,4); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (4); -INSERT INTO t4 VALUES (4); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (5); -INSERT INTO t5 VALUES (5,10,25); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (6); -INSERT INTO t6 VALUES (6,12,36); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1523 -Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (6); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -INSERT INTO t7 VALUES (1),(2),(3); -INSERT INTO t8 VALUES (1),(2),(3); -SELECT * FROM t7 ORDER BY a; -a -1 -2 -3 -SELECT * FROM t8 ORDER BY a; -a -1 -2 -3 -SELECT * FROM t7 ORDER BY a; -a e1 e2 e3 e4 e5 e6 e7 e8 -1 NULL NULL NULL NULL NULL NULL NULL NULL -2 NULL NULL NULL NULL NULL NULL NULL NULL -3 NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t8 ORDER BY a; -a e1 e2 e3 e4 e5 e6 e7 e8 -1 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 -**** On Master **** -TRUNCATE t1_nodef; -SET SQL_LOG_BIN=0; -INSERT INTO t1_nodef VALUES (1,2); -INSERT INTO t1_nodef VALUES (2,4); -SET SQL_LOG_BIN=1; -**** On Slave **** -INSERT INTO t1_nodef VALUES (1,2,3); -INSERT INTO t1_nodef VALUES (2,4,6); -**** On Master **** -UPDATE t1_nodef SET b=2*b WHERE a=1; -SELECT * FROM t1_nodef ORDER BY a; -a b -1 4 -2 4 -**** On Slave **** -SELECT * FROM t1_nodef ORDER BY a; -a b x -1 4 3 -2 4 6 -**** On Master **** -DELETE FROM t1_nodef WHERE a=2; -SELECT * FROM t1_nodef ORDER BY a; -a b -1 4 -**** On Slave **** -SELECT * FROM t1_nodef ORDER BY a; -a b x -1 4 3 -**** Cleanup **** -DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; -DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; -SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/r/rpl_row_tabledefs_7ndb.result b/mysql-test/r/rpl_row_tabledefs_7ndb.result deleted file mode 100644 index 5876a0e1b65..00000000000 --- a/mysql-test/r/rpl_row_tabledefs_7ndb.result +++ /dev/null @@ -1,288 +0,0 @@ -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; -STOP SLAVE; -SET @my_sql_mode= @@global.sql_mode; -SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; -START SLAVE; -CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='NDB'; -CREATE TABLE t4 (a INT) ENGINE='NDB'; -CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='NDB'; -CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='NDB'; -CREATE TABLE t9 (a INT) ENGINE='NDB'; -ALTER TABLE t1_int ADD x INT DEFAULT 42; -ALTER TABLE t1_bit -ADD x BIT(3) DEFAULT b'011', -ADD y BIT(5) DEFAULT b'10101', -ADD z BIT(2) DEFAULT b'10'; -ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; -ALTER TABLE t1_nodef ADD x INT NOT NULL; -ALTER TABLE t2 DROP b; -ALTER TABLE t4 MODIFY a FLOAT; -ALTER TABLE t5 MODIFY b FLOAT; -ALTER TABLE t6 MODIFY c FLOAT; -INSERT INTO t1_int VALUES (2, 4, 4711); -INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); -INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); -**** On Master **** -INSERT INTO t1_int VALUES (1,2); -INSERT INTO t1_int VALUES (2,5); -INSERT INTO t1_bit VALUES (1,2); -INSERT INTO t1_bit VALUES (2,5); -INSERT INTO t1_char VALUES (1,2); -INSERT INTO t1_char VALUES (2,5); -SELECT * FROM t1_int; -a b -1 2 -2 5 -SELECT * FROM t1_bit; -a b -1 2 -2 5 -SELECT * FROM t1_char; -a b -1 2 -2 5 -**** On Slave **** -SELECT a,b,x FROM t1_int; -a b x -1 2 42 -2 5 42 -SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit; -a b HEX(x) HEX(y) HEX(z) -1 2 3 15 2 -2 5 3 15 2 -SELECT a,b,x FROM t1_char; -a b x -1 2 Just a test -2 5 Just a test -**** On Master **** -UPDATE t1_int SET b=2*b WHERE a=2; -UPDATE t1_char SET b=2*b WHERE a=2; -UPDATE t1_bit SET b=2*b WHERE a=2; -SELECT * FROM t1_int; -a b -1 2 -2 10 -SELECT * FROM t1_bit; -a b -1 2 -2 10 -SELECT * FROM t1_char; -a b -1 2 -2 10 -**** On Slave **** -SELECT a,b,x FROM t1_int; -a b x -1 2 42 -2 10 42 -SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit; -a b HEX(x) HEX(y) HEX(z) -1 2 3 15 2 -2 10 3 15 2 -SELECT a,b,x FROM t1_char; -a b x -1 2 Just a test -2 10 Just a test -INSERT INTO t9 VALUES (2); -INSERT INTO t1_nodef VALUES (1,2); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1364 -Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (2); -INSERT INTO t2 VALUES (2,4); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (4); -INSERT INTO t4 VALUES (4); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (5); -INSERT INTO t5 VALUES (5,10,25); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -INSERT INTO t9 VALUES (6); -INSERT INTO t6 VALUES (6,12,36); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1514 -Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; -DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; -DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9; -SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/r/rpl_row_trig001.result b/mysql-test/r/rpl_row_trig001.result deleted file mode 100644 index 6665dc6d555..00000000000 --- a/mysql-test/r/rpl_row_trig001.result +++ /dev/null @@ -1,30 +0,0 @@ -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; -CREATE TABLE test.t1 (n MEDIUMINT NOT NULL, d DATETIME, PRIMARY KEY(n)); -CREATE TABLE test.t2 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); -CREATE TABLE test.t3 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d DATETIME, PRIMARY KEY(n)); -INSERT INTO test.t1 VALUES (1,NOW()); -CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t1 SET d=NOW() where n = 1;// -CREATE PROCEDURE test.p3() -BEGIN -INSERT INTO test.t3 (d) VALUES (NOW()); -END// -CREATE TRIGGER test.t3_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW CALL test.p3()// -CREATE PROCEDURE test.p2() -BEGIN -INSERT INTO test.t2 (f,d) VALUES (RAND(),NOW()); -END// - - ------------------------------------ -DROP PROCEDURE test.p2; -DROP PROCEDURE test.p3; -DROP TRIGGER test.t2_ai; -DROP TRIGGER test.t3_bi_t2; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; diff --git a/mysql-test/r/rpl_row_trig002.result b/mysql-test/r/rpl_row_trig002.result deleted file mode 100644 index 794104db750..00000000000 --- a/mysql-test/r/rpl_row_trig002.result +++ /dev/null @@ -1,69 +0,0 @@ -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; -DROP TRIGGER test.t2_ai; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -CREATE TABLE test.t2 (value CHAR(30),domain_id INT, mailaccount_id INT, program CHAR(30),keey CHAR(30),PRIMARY KEY(domain_id)); -CREATE TABLE test.t3 (value CHAR(30),domain_id INT, mailaccount_id INT, program CHAR(30),keey CHAR(30),PRIMARY KEY(domain_id)); -CREATE TABLE test.t1 (id INT,domain CHAR(30),PRIMARY KEY(id)); -CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t3 ms, test.t1 d SET ms.value='No' WHERE ms.domain_id = (SELECT max(id) FROM test.t1 WHERE domain='example.com') AND ms.mailaccount_id IS NULL AND ms.program='spamfilter' AND ms.keey='scan_incoming'| -INSERT INTO test.t1 VALUES (1, 'example.com'),(2, 'mysql.com'),(3, 'earthmotherwear.com'), (4, 'yahoo.com'),(5, 'example.com'); -SELECT * FROM test.t1 ORDER BY id; -id domain -1 example.com -2 mysql.com -3 earthmotherwear.com -4 yahoo.com -5 example.com -SELECT * FROM test.t1 ORDER BY id; -id domain -1 example.com -2 mysql.com -3 earthmotherwear.com -4 yahoo.com -5 example.com -INSERT INTO test.t3 VALUES ('Yes', 5, NULL, 'spamfilter','scan_incoming'); -INSERT INTO test.t3 VALUES ('Yes', 1, NULL, 'spamfilter','scan_incoming'); -INSERT INTO test.t2 VALUES ('Yes', 1, NULL, 'spamfilter','scan_incoming'); -select * from test.t2; -value domain_id mailaccount_id program keey -Yes 1 NULL spamfilter scan_incoming -select * from test.t3; -value domain_id mailaccount_id program keey -No 5 NULL spamfilter scan_incoming -Yes 1 NULL spamfilter scan_incoming -select * from test.t2; -value domain_id mailaccount_id program keey -Yes 1 NULL spamfilter scan_incoming -select * from test.t3; -value domain_id mailaccount_id program keey -No 5 NULL spamfilter scan_incoming -Yes 1 NULL spamfilter scan_incoming -DELETE FROM test.t1 WHERE id = 1; -SELECT * FROM test.t1 ORDER BY id; -id domain -2 mysql.com -3 earthmotherwear.com -4 yahoo.com -5 example.com -SELECT * FROM test.t1 ORDER BY id; -id domain -2 mysql.com -3 earthmotherwear.com -4 yahoo.com -5 example.com -SELECT * FROM test.t1 ORDER BY id; -id domain -2 mysql.com -3 earthmotherwear.com -4 yahoo.com -5 example.com -DROP TRIGGER test.t2_ai; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; diff --git a/mysql-test/r/rpl_row_trig003.result b/mysql-test/r/rpl_row_trig003.result deleted file mode 100644 index 43c2ecde2b4..00000000000 --- a/mysql-test/r/rpl_row_trig003.result +++ /dev/null @@ -1,83 +0,0 @@ -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; -DROP TRIGGER test.t1_bi; -DROP TRIGGER test.t2_ai; -DROP TRIGGER test.t1_bu; -DROP TRIGGER test.t2_au; -DROP TRIGGER test.t1_bd; -DROP TRIGGER test.t2_ad; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -CREATE TABLE test.t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); -CREATE TABLE test.t2 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); -CREATE TABLE test.t3 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); -CREATE TRIGGER test.t1_bi BEFORE INSERT ON test.t1 FOR EACH ROW UPDATE test.t3 SET b1=1 and y=YEAR(NOW())| -CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW BEGIN -INSERT INTO test.t3 VALUES(NULL,0,'MySQL Replication team rocks!', 'Dark beer in prague is #1',12345.34,12.51,0,1965,NOW()); -UPDATE test.t3 SET f = ROUND(f); -END| -CREATE TRIGGER test.t1_bu BEFORE UPDATE on test.t1 FOR EACH ROW BEGIN -UPDATE test.t3 SET y = '2000'; -INSERT INTO test.t3 VALUES(NULL,1,'Testing MySQL databases before update ', 'Insert should work',621.43, 0105.21,0,1974,NOW()); -END| -CREATE TRIGGER test.t2_au AFTER UPDATE on test.t2 FOR EACH ROW BEGIN -DECLARE done INT DEFAULT 0; -DECLARE a DECIMAL(10,4); -DECLARE b FLOAT; -DECLARE num MEDIUMINT; -DECLARE cur1 CURSOR FOR SELECT t2.id, t2.d, t2.f FROM test.t2; -DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; -OPEN cur1; -REPEAT -FETCH cur1 INTO num, a, b; -IF NOT done THEN -UPDATE test.t3 SET total =(a*b) WHERE ID = num; -END IF; -UNTIL done END REPEAT; -CLOSE cur1; -END| -CREATE TRIGGER test.t1_bd BEFORE DELETE on test.t1 FOR EACH ROW BEGIN -DECLARE done INT DEFAULT 0; -DECLARE a BIT(8); -DECLARE b VARCHAR(255); -DECLARE c CHAR(255); -DECLARE d DECIMAL(10,4); -DECLARE e FLOAT; -DECLARE f BIGINT UNSIGNED; -DECLARE g YEAR; -DECLARE h TIMESTAMP; -DECLARE cur1 CURSOR FOR SELECT t1.b1, t1.vc, t1.bc, t1.d, t1.f, t1.total, t1.y, t1.t FROM test.t1; -DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; -OPEN cur1; -REPEAT -FETCH cur1 INTO a, b, c, d, e, f, g, h; -IF NOT done THEN -INSERT INTO test.t3 VALUES(NULL, a, b, c, d, e, f, g, h); -END IF; -UNTIL done END REPEAT; -CLOSE cur1; -END| -CREATE TRIGGER test.t2_ad AFTER DELETE ON test.t2 FOR EACH ROW -DELETE FROM test.t1| -INSERT INTO test.t1 VALUES(NULL,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,NOW()); -INSERT INTO test.t2 VALUES(NULL,0,'Testing MySQL databases is a cool ', 'MySQL Customers ROCK!',654321.4321,1.24521,0,YEAR(NOW()),NOW()); -UPDATE test.t1 SET b1 = 0 WHERE b1 = 1; -INSERT INTO test.t2 VALUES(NULL,1,'This is an after update test.', 'If this works, total will not be zero on the master or slave',1.4321,5.221,0,YEAR(NOW()),NOW()); -UPDATE test.t2 SET b1 = 0 WHERE b1 = 1; -INSERT INTO test.t1 VALUES(NULL,1,'add some more test data test.', 'and hope for the best', 3.321,5.221,0,YEAR(NOW()),NOW()); -DELETE FROM test.t1 WHERE id = 1; -DELETE FROM test.t2 WHERE id = 1; -DROP TRIGGER test.t1_bi; -DROP TRIGGER test.t2_ai; -DROP TRIGGER test.t1_bu; -DROP TRIGGER test.t2_au; -DROP TRIGGER test.t1_bd; -DROP TRIGGER test.t2_ad; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/r/rpl_row_trig004.result b/mysql-test/r/rpl_row_trig004.result deleted file mode 100644 index d0d0657f875..00000000000 --- a/mysql-test/r/rpl_row_trig004.result +++ /dev/null @@ -1,30 +0,0 @@ -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; -DROP TRIGGER test.t1_bi_t2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=INNODB; -CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=INNODB; -CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)// -INSERT INTO test.t2 VALUES (1, 0.0); -INSERT INTO test.t2 VALUES (1, 0.0); -Got one of the listed errors -select * from test.t1; -n d -1 1.234 -select * from test.t2; -n f -1 0 -select * from test.t1; -n d -1 1.234 -select * from test.t2; -n f -1 0 -DROP TRIGGER test.t1_bi_t2; -DROP TABLE test.t1; -DROP TABLE test.t2; diff --git a/mysql-test/r/rpl_row_until.result b/mysql-test/r/rpl_row_until.result deleted file mode 100644 index d71cc479f7a..00000000000 --- a/mysql-test/r/rpl_row_until.result +++ /dev/null @@ -1,190 +0,0 @@ -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; -stop slave; -create table t1(n int not null auto_increment primary key); -insert into t1 values (1),(2),(3),(4); -drop table t1; -create table t2(n int not null auto_increment primary key); -insert into t2 values (1),(2); -insert into t2 values (3),(4); -drop table t2; -start slave until master_log_file='master-bin.000001', master_log_pos=311; -select * from t1; -n -1 -2 -3 -4 -SHOW SLAVE STATUS;; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 744 -Relay_Log_File slave-relay-bin.000004 -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running # -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 315 -Relay_Log_Space # -Until_Condition Master -Until_Log_File master-bin.000001 -Until_Log_Pos 311 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; -select * from t1; -n -1 -2 -3 -4 -SHOW SLAVE STATUS;; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 744 -Relay_Log_File slave-relay-bin.000004 -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running # -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 315 -Relay_Log_Space # -Until_Condition Master -Until_Log_File master-no-such-bin.000001 -Until_Log_Pos 291 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; -select * from t2; -n -1 -2 -SHOW SLAVE STATUS;; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 744 -Relay_Log_File slave-relay-bin.000004 -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running # -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 590 -Relay_Log_Space # -Until_Condition Relay -Until_Log_File slave-relay-bin.000004 -Until_Log_Pos 728 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -start slave; -stop slave; -start slave until master_log_file='master-bin.000001', master_log_pos=740; -SHOW SLAVE STATUS;; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 744 -Relay_Log_File slave-relay-bin.000004 -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 744 -Relay_Log_Space # -Until_Condition Master -Until_Log_File master-bin.000001 -Until_Log_Pos 740 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -start slave until master_log_file='master-bin', master_log_pos=561; -ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; -ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave until master_log_file='master-bin.000001'; -ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave until relay_log_file='slave-relay-bin.000002'; -ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; -ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave sql_thread; -start slave until master_log_file='master-bin.000001', master_log_pos=740; -Warnings: -Note 1254 Slave is already running diff --git a/mysql-test/r/rpl_row_view01.result b/mysql-test/r/rpl_row_view01.result deleted file mode 100644 index a4b8d0a05e3..00000000000 --- a/mysql-test/r/rpl_row_view01.result +++ /dev/null @@ -1,101 +0,0 @@ -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; -create database if not exists mysqltest1; -DROP VIEW IF EXISTS mysqltest1.v1; -DROP VIEW IF EXISTS mysqltest1.v2; -DROP VIEW IF EXISTS mysqltest1.v3; -DROP VIEW IF EXISTS mysqltest1.v4; -DROP TABLE IF EXISTS mysqltest1.t3; -DROP TABLE IF EXISTS mysqltest1.t1; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t4; -CREATE TABLE mysqltest1.t1 (a INT, c CHAR(6),PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t2 (a INT, c CHAR(6),PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t3 (a INT, c CHAR(6), c2 CHAR(6), PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t4 (a INT, qty INT, price INT,PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t5 (qty INT, price INT, total INT, PRIMARY KEY(qty)); -INSERT INTO mysqltest1.t1 VALUES (1,'Thank'),(2,'it'),(3,'Friday'); -INSERT INTO mysqltest1.t2 VALUES (1,'GOD'),(2,'is'),(3,'TGIF'); -INSERT INTO mysqltest1.t4 VALUES(1, 3, 50),(2, 18, 3),(4, 4, 4); -CREATE VIEW mysqltest1.v2 AS SELECT qty, price, qty*price AS value FROM mysqltest1.t4 ORDER BY qty; -CREATE VIEW mysqltest1.v1 AS SELECT t1.a, t1.c, t2.c as c2 FROM mysqltest1.t1 as t1, mysqltest1.t2 AS t2 WHERE mysqltest1.t1.a = mysqltest1.t2.a ORDER BY a; -CREATE VIEW mysqltest1.v3 AS SELECT * FROM mysqltest1.t1; -CREATE VIEW mysqltest1.v4 AS SELECT * FROM mysqltest1.v3 WHERE a > 1 WITH LOCAL CHECK OPTION; -SELECT * FROM mysqltest1.v2; -qty price value -3 50 150 -4 4 16 -18 3 54 -SELECT * FROM mysqltest1.v1; -a c c2 -1 Thank GOD -2 it is -3 Friday TGIF -SELECT * FROM mysqltest1.v2; -qty price value -3 50 150 -4 4 16 -18 3 54 -SELECT * FROM mysqltest1.v1; -a c c2 -1 Thank GOD -2 it is -3 Friday TGIF -INSERT INTO mysqltest1.t5 SELECT * FROM mysqltest1.v2; -INSERT INTO mysqltest1.t3 SELECT * FROM mysqltest1.v1; -SELECT * FROM mysqltest1.t5 ORDER BY qty; -qty price total -3 50 150 -4 4 16 -18 3 54 -SELECT * FROM mysqltest1.t3 ORDER BY a; -a c c2 -1 Thank GOD -2 it is -3 Friday TGIF -SELECT * FROM mysqltest1.t5 ORDER BY qty; -qty price total -3 50 150 -4 4 16 -18 3 54 -SELECT * FROM mysqltest1.t3 ORDER BY a; -a c c2 -1 Thank GOD -2 it is -3 Friday TGIF -INSERT INTO mysqltest1.v4 VALUES (4,'TEST'); -SELECT * FROM mysqltest1.t1 ORDER BY a; -a c -1 Thank -2 it -3 Friday -4 TEST -SELECT * FROM mysqltest1.v4 ORDER BY a; -a c -2 it -3 Friday -4 TEST -SELECT * FROM mysqltest1.t1 ORDER BY a; -a c -1 Thank -2 it -3 Friday -4 TEST -SELECT * FROM mysqltest1.v4 ORDER BY a; -a c -2 it -3 Friday -4 TEST -DROP VIEW IF EXISTS mysqltest1.v1; -DROP VIEW IF EXISTS mysqltest1.v2; -DROP VIEW IF EXISTS mysqltest1.v3; -DROP VIEW IF EXISTS mysqltest1.v4; -DROP TABLE IF EXISTS mysqltest1.t3; -DROP TABLE IF EXISTS mysqltest1.t1; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t4; -DROP DATABASE mysqltest1; diff --git a/mysql-test/r/rpl_server_id1.result b/mysql-test/r/rpl_server_id1.result deleted file mode 100644 index 8f82ca8ea12..00000000000 --- a/mysql-test/r/rpl_server_id1.result +++ /dev/null @@ -1,19 +0,0 @@ -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; -create table t1 (n int); -reset master; -stop slave; -change master to master_port=SLAVE_PORT; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert - 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 106 None 0 No NULL No -start slave; -insert into t1 values (1); -show status like "slave_running"; -Variable_name Value -Slave_running OFF -drop table t1; diff --git a/mysql-test/r/rpl_server_id2.result b/mysql-test/r/rpl_server_id2.result deleted file mode 100644 index a5c7fc07714..00000000000 --- a/mysql-test/r/rpl_server_id2.result +++ /dev/null @@ -1,21 +0,0 @@ -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; -create table t1 (n int); -reset master; -stop slave; -change master to master_port=SLAVE_PORT; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert - 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 106 None 0 No NULL No -start slave; -insert into t1 values (1); -select * from t1; -n -1 -1 -stop slave; -drop table t1; diff --git a/mysql-test/r/rpl_session_var.result b/mysql-test/r/rpl_session_var.result deleted file mode 100644 index b5b4b815ade..00000000000 --- a/mysql-test/r/rpl_session_var.result +++ /dev/null @@ -1,43 +0,0 @@ -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; -drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' -create table t1(a varchar(100),b int); -set @@session.sql_mode=pipes_as_concat; -insert into t1 values('My'||'SQL', 1); -set @@session.sql_mode=default; -insert into t1 values('1'||'2', 2); -select * from t1 where b<3 order by a; -a b -1 2 -MySQL 1 -select * from t1 where b<3 order by a; -a b -1 2 -MySQL 1 -set @@session.sql_mode=ignore_space; -insert into t1 values(password ('MySQL'), 3); -set @@session.sql_mode=ansi_quotes; -create table "t2" ("a" int); -drop table t1, t2; -set @@session.sql_mode=default; -create table t1(a int auto_increment primary key); -create table t2(b int, a int); -set @@session.sql_auto_is_null=1; -insert into t1 values(null); -insert into t2 select 1,a from t1 where a is null; -set @@session.sql_auto_is_null=0; -insert into t1 values(null); -insert into t2 select 2,a from t1 where a is null; -select * from t2 order by b; -b a -1 1 -select * from t2 order by b; -b a -1 1 -drop table t1,t2; diff --git a/mysql-test/r/rpl_set_charset.result b/mysql-test/r/rpl_set_charset.result deleted file mode 100644 index 480d926fbba..00000000000 --- a/mysql-test/r/rpl_set_charset.result +++ /dev/null @@ -1,48 +0,0 @@ -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; -drop database if exists mysqltest1; -create database mysqltest1 /*!40100 character set latin2 */; -use mysqltest1; -drop table if exists t1; -create table t1 (a varchar(255) character set latin2, b varchar(4)); -SET CHARACTER SET cp1250_latin2; -INSERT INTO t1 VALUES ('ŠŒŽ','80'); -INSERT INTO t1 VALUES ('šœžŸ','90'); -INSERT INTO t1 VALUES ('£¥ª¯','A0'); -INSERT INTO t1 VALUES ('³¹º¼¾¿','B0'); -INSERT INTO t1 VALUES ('ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ','C0'); -INSERT INTO t1 VALUES ('ÐÑÒÓÔÕÖרÙÚÛÜÝÞß','D0'); -INSERT INTO t1 VALUES ('àáâãäåæçèéêëìíîï','E0'); -INSERT INTO t1 VALUES ('ðñòóôõö÷øùúûüýþÿ','F0'); -select "--- on master ---"; ---- on master --- ---- on master --- -select hex(a),b from t1 order by b; -hex(a) b -A9A6ABAEAC 80 -B9B6BBBEBC 90 -A3A1AAAF A0 -B3B1BAA5B5BF B0 -C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF C0 -D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF D0 -E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF E0 -F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF F0 -use mysqltest1; -select "--- on slave ---"; ---- on slave --- ---- on slave --- -select hex(a),b from t1 order by b; -hex(a) b -A9A6ABAEAC 80 -B9B6BBBEBC 90 -A3A1AAAF A0 -B3B1BAA5B5BF B0 -C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF C0 -D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF D0 -E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF E0 -F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF F0 -drop database mysqltest1; diff --git a/mysql-test/r/rpl_sf.result b/mysql-test/r/rpl_sf.result deleted file mode 100644 index 46defc6908a..00000000000 --- a/mysql-test/r/rpl_sf.result +++ /dev/null @@ -1,23 +0,0 @@ -set global log_bin_trust_function_creators=0; -set binlog_format=STATEMENT; -create function fn16456() -returns int -begin -return unix_timestamp(); -end| -ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) -set global log_bin_trust_function_creators=1; -create function fn16456() -returns int -begin -return unix_timestamp(); -end| -set global log_bin_trust_function_creators=0; -set binlog_format=ROW; -select fn16456(); -fn16456() -timestamp -set binlog_format=STATEMENT; -select fn16456(); -ERROR HY000: Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events -drop function fn16456; diff --git a/mysql-test/r/rpl_skip_error.result b/mysql-test/r/rpl_skip_error.result deleted file mode 100644 index 248ce5b52c3..00000000000 --- a/mysql-test/r/rpl_skip_error.result +++ /dev/null @@ -1,16 +0,0 @@ -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; -create table t1 (n int not null primary key); -insert into t1 values (1); -insert into t1 values (1); -insert into t1 values (2),(3); -select * from t1 ORDER BY n; -n -1 -2 -3 -drop table t1; diff --git a/mysql-test/r/rpl_slave_status.result b/mysql-test/r/rpl_slave_status.result deleted file mode 100644 index 29ec7b77b45..00000000000 --- a/mysql-test/r/rpl_slave_status.result +++ /dev/null @@ -1,58 +0,0 @@ -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; -grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; -stop slave; -change master to master_user='rpl',master_password='rpl'; -start slave; -drop table if exists t1; -create table t1 (n int); -insert into t1 values (1); -select * from t1; -n -1 -delete from mysql.user where user='rpl'; -flush privileges; -stop slave; -start slave; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User rpl -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running No -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master NULL -Master_SSL_Verify_Server_Cert No -drop table t1; -delete from mysql.user where user='rpl'; -drop table t1; diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result deleted file mode 100644 index 208c46c5fab..00000000000 --- a/mysql-test/r/rpl_sp.result +++ /dev/null @@ -1,536 +0,0 @@ -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; -drop database if exists mysqltest1; -create database mysqltest1; -use mysqltest1; -create table t1 (a varchar(100)); -use mysqltest1; -create procedure foo() -begin -declare b int; -set b = 8; -insert into t1 values (b); -insert into t1 values (unix_timestamp()); -end| -select * from mysql.proc where name='foo' and db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -mysqltest1 foo PROCEDURE foo SQL CONTAINS_SQL NO DEFINER begin -declare b int; -set b = 8; -insert into t1 values (b); -insert into t1 values (unix_timestamp()); -end root@localhost # # -select * from mysql.proc where name='foo' and db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -mysqltest1 foo PROCEDURE foo SQL CONTAINS_SQL NO DEFINER begin -declare b int; -set b = 8; -insert into t1 values (b); -insert into t1 values (unix_timestamp()); -end root@localhost # # -set timestamp=1000000000; -call foo(); -select * from t1; -a -8 -1000000000 -select * from t1; -a -8 -1000000000 -delete from t1; -create procedure foo2() -select * from mysqltest1.t1; -call foo2(); -a -alter procedure foo2 contains sql; -drop table t1; -create table t1 (a int); -create table t2 like t1; -create procedure foo3() -deterministic -insert into t1 values (15); -grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1; -grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1; -grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; -SELECT 1; -1 -1 -create procedure foo4() -deterministic -begin -insert into t2 values(3); -insert into t1 values (5); -end| -call foo4(); -Got one of the listed errors -call foo3(); -show warnings; -Level Code Message -call foo4(); -Got one of the listed errors -alter procedure foo4 sql security invoker; -call foo4(); -show warnings; -Level Code Message -select * from t1; -a -15 -5 -select * from t2; -a -3 -3 -3 -select * from t1; -a -15 -5 -select * from t2; -a -3 -3 -3 -delete from t2; -alter table t2 add unique (a); -drop procedure foo4; -create procedure foo4() -deterministic -begin -insert into t2 values(20),(20); -end| -call foo4(); -ERROR 23000: Duplicate entry '20' for key 'a' -show warnings; -Level Code Message -Error 1062 Duplicate entry '20' for key 'a' -select * from t2; -a -20 -select * from t2; -a -20 -select * from mysql.proc where name="foo4" and db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -mysqltest1 foo4 PROCEDURE foo4 SQL CONTAINS_SQL YES DEFINER begin -insert into t2 values(20),(20); -end root@localhost # # -drop procedure foo4; -select * from mysql.proc where name="foo4" and db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -select * from mysql.proc where name="foo4" and db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -drop procedure foo; -drop procedure foo2; -drop procedure foo3; -create function fn1(x int) -returns int -begin -insert into t1 values (x); -return x+2; -end| -ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) -create function fn1(x int) -returns int -deterministic -begin -insert into t1 values (x); -return x+2; -end| -delete t1,t2 from t1,t2; -select fn1(20); -fn1(20) -22 -insert into t2 values(fn1(21)); -select * from t1; -a -21 -20 -select * from t2; -a -23 -select * from t1; -a -21 -20 -select * from t2; -a -23 -drop function fn1; -create function fn1() -returns int -no sql -begin -return unix_timestamp(); -end| -alter function fn1 contains sql; -ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) -delete from t1; -set timestamp=1000000000; -insert into t1 values(fn1()); -create function fn2() -returns int -no sql -begin -return unix_timestamp(); -end| -ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) -set global log_bin_trust_routine_creators=1; -Warnings: -Warning 1543 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead -set global log_bin_trust_function_creators=0; -set global log_bin_trust_function_creators=1; -set global log_bin_trust_function_creators=1; -create function fn2() -returns int -no sql -begin -return unix_timestamp(); -end| -create function fn3() -returns int -not deterministic -reads sql data -begin -return 0; -end| -select fn3(); -fn3() -0 -select * from mysql.proc where db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -mysqltest1 fn1 FUNCTION fn1 SQL NO_SQL NO DEFINER int(11) begin -return unix_timestamp(); -end root@localhost # # -mysqltest1 fn2 FUNCTION fn2 SQL NO_SQL NO DEFINER int(11) begin -return unix_timestamp(); -end zedjzlcsjhd@localhost # # -mysqltest1 fn3 FUNCTION fn3 SQL READS_SQL_DATA NO DEFINER int(11) begin -return 0; -end root@localhost # # -select * from t1; -a -1000000000 -use mysqltest1; -select * from t1; -a -1000000000 -select * from mysql.proc where db='mysqltest1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -mysqltest1 fn1 FUNCTION fn1 SQL NO_SQL NO DEFINER int(11) begin -return unix_timestamp(); -end root@localhost # # -mysqltest1 fn2 FUNCTION fn2 SQL NO_SQL NO DEFINER int(11) begin -return unix_timestamp(); -end zedjzlcsjhd@localhost # # -mysqltest1 fn3 FUNCTION fn3 SQL READS_SQL_DATA NO DEFINER int(11) begin -return 0; -end root@localhost # # -delete from t2; -alter table t2 add unique (a); -drop function fn1; -create function fn1(x int) -returns int -begin -insert into t2 values(x),(x); -return 10; -end| -do fn1(100); -Warnings: -Error 1062 Duplicate entry '100' for key 'a' -select fn1(20); -ERROR 23000: Duplicate entry '20' for key 'a' -select * from t2; -a -20 -100 -select * from t2; -a -20 -100 -create trigger trg before insert on t1 for each row set new.a= 10; -ERROR 42000: TRIGGER command denied to user 'zedjzlcsjhd'@'localhost' for table 't1' -delete from t1; -create trigger trg before insert on t1 for each row set new.a= 10; -insert into t1 values (1); -select * from t1; -a -10 -select * from t1; -a -10 -delete from t1; -drop trigger trg; -insert into t1 values (1); -select * from t1; -a -1 -select * from t1; -a -1 -create procedure foo() -not deterministic -reads sql data -select * from t1; -call foo(); -a -1 -drop procedure foo; -drop function fn1; -drop database mysqltest1; -drop user "zedjzlcsjhd"@127.0.0.1; -use test; -use test; -drop function if exists f1; -create function f1() returns int reads sql data -begin -declare var integer; -declare c cursor for select a from v1; -open c; -fetch c into var; -close c; -return var; -end| -create view v1 as select 1 as a; -create table t1 (a int); -insert into t1 (a) values (f1()); -select * from t1; -a -1 -drop view v1; -drop function f1; -select * from t1; -a -1 -DROP PROCEDURE IF EXISTS p1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1(col VARCHAR(10)); -CREATE PROCEDURE p1(arg VARCHAR(10)) -INSERT INTO t1 VALUES(arg); -CALL p1('test'); -SELECT * FROM t1; -col -test -SELECT * FROM t1; -col -test -DROP PROCEDURE p1; - ----> Test for BUG#20438 - ----> Preparing environment... ----> connection: master -DROP PROCEDURE IF EXISTS p1; -DROP FUNCTION IF EXISTS f1; - ----> Synchronizing slave with master... - ----> connection: master - ----> Creating procedure... -/*!50003 CREATE PROCEDURE p1() SET @a = 1 */; -/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */; - ----> Checking on master... -SHOW CREATE PROCEDURE p1; -Procedure sql_mode Create Procedure -p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() -SET @a = 1 -SHOW CREATE FUNCTION f1; -Function sql_mode Create Function -f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) -RETURN 0 - ----> Synchronizing slave with master... ----> connection: master - ----> Checking on slave... -SHOW CREATE PROCEDURE p1; -Procedure sql_mode Create Procedure -p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() -SET @a = 1 -SHOW CREATE FUNCTION f1; -Function sql_mode Create Function -f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) -RETURN 0 - ----> connection: master - ----> Cleaning up... -DROP PROCEDURE p1; -DROP FUNCTION f1; -drop table t1; -drop database if exists mysqltest; -drop database if exists mysqltest2; -create database mysqltest; -create database mysqltest2; -use mysqltest2; -create table t ( t integer ); -create procedure mysqltest.test() begin end; -insert into t values ( 1 ); -create procedure `\\`.test() begin end; -ERROR 42000: Unknown database '\\' -create function f1 () returns int -begin -insert into t values (1); -return 0; -end| -use mysqltest; -set @a:= mysqltest2.f1(); -show binlog events in 'master-bin.000001' from 106; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # drop database if exists mysqltest1 -master-bin.000001 # Query 1 # create database mysqltest1 -master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a varchar(100)) -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() -begin -declare b int; -set b = 8; -insert into t1 values (b); -insert into t1 values (unix_timestamp()); -end -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values ( NAME_CONST('b',8)) -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (unix_timestamp()) -master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2() -select * from mysqltest1.t1 -master-bin.000001 # Query 1 # use `mysqltest1`; alter procedure foo2 contains sql -master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1 -master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int) -master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 like t1 -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo3() -deterministic -insert into t1 values (15) -master-bin.000001 # Query 1 # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1 -master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1 -master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1 -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` procedure foo4() -deterministic -begin -insert into t2 values(3); -insert into t1 values (5); -end -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (15) -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) -master-bin.000001 # Query 1 # use `mysqltest1`; alter procedure foo4 sql security invoker -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (5) -master-bin.000001 # Query 1 # use `mysqltest1`; delete from t2 -master-bin.000001 # Query 1 # use `mysqltest1`; alter table t2 add unique (a) -master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo4 -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4() -deterministic -begin -insert into t2 values(20),(20); -end -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(20),(20) -master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo4 -master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo -master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo2 -master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo3 -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1(x int) -returns int -deterministic -begin -insert into t1 values (x); -return x+2; -end -master-bin.000001 # Query 1 # use `mysqltest1`; delete t1,t2 from t1,t2 -master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20) -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(fn1(21)) -master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1() -returns int -no sql -begin -return unix_timestamp(); -end -master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(fn1()) -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` function fn2() -returns int -no sql -begin -return unix_timestamp(); -end -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn3() -returns int -not deterministic -reads sql data -begin -return 0; -end -master-bin.000001 # Query 1 # use `mysqltest1`; delete from t2 -master-bin.000001 # Query 1 # use `mysqltest1`; alter table t2 add unique (a) -master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1(x int) -returns int -begin -insert into t2 values(x),(x); -return 10; -end -master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(100) -master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20) -master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10 -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1) -master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 -master-bin.000001 # Query 1 # use `mysqltest1`; drop trigger trg -master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1) -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() -not deterministic -reads sql data -select * from t1 -master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo -master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 -master-bin.000001 # Query 1 # drop database mysqltest1 -master-bin.000001 # Query 1 # drop user "zedjzlcsjhd"@127.0.0.1 -master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` function f1() returns int reads sql data -begin -declare var integer; -declare c cursor for select a from v1; -open c; -fetch c into var; -close c; -return var; -end -master-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 as a -master-bin.000001 # Query 1 # use `test`; create table t1 (a int) -master-bin.000001 # Query 1 # use `test`; insert into t1 (a) values (f1()) -master-bin.000001 # Query 1 # use `test`; drop view v1 -master-bin.000001 # Query 1 # use `test`; drop function f1 -master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(col VARCHAR(10)) -master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1(arg VARCHAR(10)) -INSERT INTO t1 VALUES(arg) -master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test')) -master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1 -master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1() SET @a = 1 -master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION f1() RETURNS INT RETURN 0 -master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1 -master-bin.000001 # Query 1 # use `test`; DROP FUNCTION f1 -master-bin.000001 # Query 1 # use `test`; drop table t1 -master-bin.000001 # Query 1 # drop database if exists mysqltest -master-bin.000001 # Query 1 # drop database if exists mysqltest2 -master-bin.000001 # Query 1 # create database mysqltest -master-bin.000001 # Query 1 # create database mysqltest2 -master-bin.000001 # Query 1 # use `mysqltest2`; create table t ( t integer ) -master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` procedure mysqltest.test() begin end -master-bin.000001 # Query 1 # use `mysqltest2`; insert into t values ( 1 ) -master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` function f1 () returns int -begin -insert into t values (1); -return 0; -end -master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`() -set global log_bin_trust_function_creators=0; -set global log_bin_trust_function_creators=0; -drop database mysqltest; -drop database mysqltest2; -End of 5.0 tests -End of 5.1 tests diff --git a/mysql-test/r/rpl_sp004.result b/mysql-test/r/rpl_sp004.result deleted file mode 100644 index 1c0ed3cc50a..00000000000 --- a/mysql-test/r/rpl_sp004.result +++ /dev/null @@ -1,93 +0,0 @@ -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; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t3; -CREATE PROCEDURE test.p1() -BEGIN -CREATE TABLE IF NOT EXISTS test.t1(a INT,PRIMARY KEY(a)); -CREATE TABLE IF NOT EXISTS test.t2(a INT,PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES (4),(2),(1),(3); -UPDATE test.t1 SET a=a+4 WHERE a=4; -INSERT INTO test.t2 (a) SELECT t1.a FROM test.t1; -UPDATE test.t1 SET a=a+4 WHERE a=8; -CREATE TABLE IF NOT EXISTS test.t3(n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); -END| -CREATE PROCEDURE test.p2() -BEGIN -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -INSERT INTO test.t3 VALUES(NULL,11111111.233333,NOW()); -END| -CALL test.p1(); -SELECT * FROM test.t1 ORDER BY a; -a -1 -2 -3 -12 -SELECT * FROM test.t2 ORDER BY a; -a -1 -2 -3 -8 -SELECT * FROM test.t1 ORDER BY a; -a -1 -2 -3 -12 -SELECT * FROM test.t2 ORDER BY a; -a -1 -2 -3 -8 -CALL test.p2(); -USE test; -SHOW TABLES; -Tables_in_test -t3 -USE test; -SHOW TABLES; -Tables_in_test -t3 -CALL test.p1(); -Warnings: -Note 1050 Table 't3' already exists -SELECT * FROM test.t1 ORDER BY a; -a -1 -2 -3 -12 -SELECT * FROM test.t2 ORDER BY a; -a -1 -2 -3 -8 -SELECT * FROM test.t1 ORDER BY a; -a -1 -2 -3 -12 -SELECT * FROM test.t2 ORDER BY a; -a -1 -2 -3 -8 -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/r/rpl_sp_effects.result b/mysql-test/r/rpl_sp_effects.result deleted file mode 100644 index c2c44b06972..00000000000 --- a/mysql-test/r/rpl_sp_effects.result +++ /dev/null @@ -1,238 +0,0 @@ -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; -drop procedure if exists p1; -drop procedure if exists p2; -drop function if exists f1; -drop table if exists t1,t2; -drop view if exists v1; -create table t1 (a int); -SET GLOBAL log_bin_trust_function_creators = 1; -create procedure p1() -begin -declare spv int default 0; -while spv < 5 do -insert into t1 values(spv+1); -set spv=spv+1; -end while; -end// -call p1(); -SELECT * FROM t1 ORDER BY a; -a -1 -2 -3 -4 -5 -SELECT * FROM t1 ORDER BY a; -a -1 -2 -3 -4 -5 -create procedure p2() -begin -declare a int default 4; -create table t2 as select a; -end// -call p2(); -SELECT * FROM t2 ORDER BY a; -a -4 -SELECT * FROM t2 ORDER BY a; -a -4 -drop procedure p1; -drop procedure p2; -drop table t2; -create function f1(x int) returns int -begin -insert into t1 values(x); -return x+1; -end// -create procedure p1(a int, b int) -begin -declare v int default f1(5); -if (f1(6)) then -select 'yes'; -end if; -set v = f1(7); -while f1(8) < 1 do -select 'this cant be'; -end while; -end// -call p1(f1(1), f1(2)); -yes -yes -SELECT * FROM t1 ORDER BY a; -a -1 -1 -2 -2 -3 -4 -5 -5 -6 -7 -8 -create table t2(a int); -insert into t2 values (10),(11); -SELECT a,f1(a) FROM t2 ORDER BY a; -a f1(a) -10 11 -11 12 -insert into t2 select f1(3); -SELECT 'master:',a FROM t1 ORDER BY a; -master: a -master: 1 -master: 1 -master: 2 -master: 2 -master: 3 -master: 3 -master: 4 -master: 5 -master: 5 -master: 6 -master: 7 -master: 8 -master: 10 -master: 11 -SELECT 'slave:',a FROM t1 ORDER BY a; -slave: a -slave: 1 -slave: 1 -slave: 2 -slave: 2 -slave: 3 -slave: 3 -slave: 4 -slave: 5 -slave: 5 -slave: 6 -slave: 7 -slave: 8 -slave: 10 -slave: 11 -drop procedure p1; -delete from t1; -delete from t2; -delete from t1; -insert into t2 values(1),(2); -create view v1 as select f1(a) as f from t2; -select * from v1 order by f; -f -2 -3 -SELECT 'master:',a FROM t1 ORDER BY a; -master: a -master: 1 -master: 2 -SELECT 'slave:',a FROM t1 ORDER BY a; -slave: a -slave: 1 -slave: 2 -drop view v1; -delete from t1; -prepare s1 from 'select f1(?)'; -set @xx=123; -execute s1 using @xx; -f1(?) -124 -SELECT 'master:',a FROM t1 ORDER BY a; -master: a -master: 123 -SELECT 'slave:',a FROM t1 ORDER BY a; -slave: a -slave: 123 -delete from t1; -create procedure p1(spv int) -begin -declare c cursor for select f1(spv) from t2; -while (spv > 2) do -open c; -fetch c into spv; -close c; -set spv= spv - 10; -end while; -end// -call p1(15); -SELECT 'master:',a FROM t1 ORDER BY a; -master: a -master: 6 -master: 6 -master: 15 -master: 15 -SELECT 'slave:',a FROM t1 ORDER BY a; -slave: a -slave: 6 -slave: 6 -slave: 15 -slave: 15 -drop procedure p1; -drop function f1; -drop table t1,t2; -create table t1 (a int); -create procedure p1() -begin -insert into t1 values(@x); -set @x=@x+1; -insert into t1 values(@x); -if (f2()) then -insert into t1 values(1243); -end if; -end// -create function f2() returns int -begin -insert into t1 values(@z); -set @z=@z+1; -insert into t1 values(@z); -return 0; -end// -create function f1() returns int -begin -insert into t1 values(@y); -call p1(); -return 0; -end// -set @x=10; -set @y=20; -set @z=100; -select f1(); -f1() -0 -set @x=30; -call p1(); -SELECT 'master', a FROM t1 ORDER BY a; -master a -master 10 -master 11 -master 20 -master 30 -master 31 -master 100 -master 101 -master 101 -master 102 -SELECT 'slave', a FROM t1 ORDER BY a; -slave a -slave 10 -slave 11 -slave 20 -slave 30 -slave 31 -slave 100 -slave 101 -slave 101 -slave 102 -drop table t1; -drop function f1; -drop function f2; -drop procedure p1; -SET GLOBAL log_bin_trust_function_creators = 0; diff --git a/mysql-test/r/rpl_sporadic_master.result b/mysql-test/r/rpl_sporadic_master.result deleted file mode 100644 index 14fb673a081..00000000000 --- a/mysql-test/r/rpl_sporadic_master.result +++ /dev/null @@ -1,26 +0,0 @@ -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; -create table t2(n int); -create table t1(n int not null auto_increment primary key); -insert into t1 values (NULL),(NULL); -truncate table t1; -insert into t1 values (4),(NULL); -stop slave; -start slave; -insert into t1 values (NULL),(NULL); -flush logs; -truncate table t1; -insert into t1 values (10),(NULL),(NULL),(NULL),(NULL),(NULL); -select * from t1 ORDER BY n; -n -10 -11 -12 -13 -14 -15 -drop table t1,t2; diff --git a/mysql-test/r/rpl_ssl.result b/mysql-test/r/rpl_ssl.result deleted file mode 100644 index 64d52d63f78..00000000000 --- a/mysql-test/r/rpl_ssl.result +++ /dev/null @@ -1,99 +0,0 @@ -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; -grant replication slave on *.* to replssl@localhost require ssl; -create table t1 (t int auto_increment, KEY(t)); -stop slave; -change master to -master_user='replssl', -master_password='', -master_ssl=1, -master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', -master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', -master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem'; -start slave; -insert into t1 values(1); -select * from t1; -t -1 -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User replssl -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed Yes -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_CA_Path -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Cipher -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -STOP SLAVE; -select * from t1; -t -1 -insert into t1 values (NULL); -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User replssl -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed Yes -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_CA_Path -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Cipher -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -drop user replssl@localhost; -drop table t1; -End of 5.0 tests diff --git a/mysql-test/r/rpl_ssl1.result b/mysql-test/r/rpl_ssl1.result deleted file mode 100644 index 6bc4b53849f..00000000000 --- a/mysql-test/r/rpl_ssl1.result +++ /dev/null @@ -1,146 +0,0 @@ -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; -grant replication slave on *.* to replssl@localhost require ssl; -create table t1 (t int); -stop slave; -change master to master_user='replssl',master_password=''; -start slave; -insert into t1 values (1); -select * from t1; -t -stop slave; -change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem'; -start slave; -select * from t1; -t -1 -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User replssl -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File # -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File # -Slave_IO_Running # -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed Yes -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_CA_Path -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Cipher -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -stop slave; -change master to master_user='root',master_password='', master_ssl=0; -start slave; -drop user replssl@localhost; -drop table t1; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File # -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File # -Slave_IO_Running # -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_CA_Path -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Cipher -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -stop slave; -change master to -master_host="localhost", -master_ssl=1 , -master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', -master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', -master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem', -master_ssl_verify_server_cert=1; -start slave; -create table t1 (t int); -insert into t1 values (1); -on slave -select * from t1; -t -1 -show slave status; -Slave_IO_State # -Master_Host localhost -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File # -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File # -Slave_IO_Running # -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed Yes -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_CA_Path -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Cipher -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert Yes -drop table t1; diff --git a/mysql-test/r/rpl_start_stop_slave.result b/mysql-test/r/rpl_start_stop_slave.result deleted file mode 100644 index 1fcb586d1fb..00000000000 --- a/mysql-test/r/rpl_start_stop_slave.result +++ /dev/null @@ -1,12 +0,0 @@ -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; -stop slave; -create table t1(n int); -start slave; -stop slave io_thread; -start slave io_thread; -drop table t1; diff --git a/mysql-test/r/rpl_stm_000001.result b/mysql-test/r/rpl_stm_000001.result deleted file mode 100644 index 3b4cd05f640..00000000000 --- a/mysql-test/r/rpl_stm_000001.result +++ /dev/null @@ -1,82 +0,0 @@ -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; -create table t1 (word char(20) not null); -load data infile '../std_data_ln/words.dat' into table t1; -load data local infile 'MYSQL_TEST_DIR/std_data/words.dat' into table t1; -select * from t1 limit 10; -word -Aarhus -Aaron -Ababa -aback -abaft -abandon -abandoned -abandoning -abandonment -abandons -stop slave; -set password for root@"localhost" = password('foo'); -start slave; -set password for root@"localhost" = password(''); -create table t3(n int); -insert into t3 values(1),(2); -select * from t3; -n -1 -2 -select sum(length(word)) from t1; -sum(length(word)) -1022 -drop table t1,t3; -create table t1 (n int) engine=myisam; -reset master; -stop slave; -reset slave; -lock tables t1 read; -start slave; -unlock tables; -create table t2(id int); -insert into t2 values(connection_id()); -create temporary table t3(n int); -insert into t3 select get_lock('crash_lock%20C', 1) from t2; -update t1 set n = n + get_lock('crash_lock%20C', 2); -select (@id := id) - id from t2; -(@id := id) - id -0 -kill @id; -drop table t2; -Got one of the listed errors -set global sql_slave_skip_counter=1; -start slave; -select count(*) from t1; -count(*) -5000 -drop table t1; -create table t1 (n int); -insert into t1 values(3456); -insert into mysql.user (Host, User, Password) -VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); -Warnings: -Warning 1364 Field 'ssl_cipher' doesn't have a default value -Warning 1364 Field 'x509_issuer' doesn't have a default value -Warning 1364 Field 'x509_subject' doesn't have a default value -select select_priv,user from mysql.user where user = _binary'blafasel2'; -select_priv user -N blafasel2 -update mysql.user set Select_priv = "Y" where User= _binary"blafasel2"; -select select_priv,user from mysql.user where user = _binary'blafasel2'; -select_priv user -Y blafasel2 -select n from t1; -n -3456 -select select_priv,user from mysql.user where user = _binary'blafasel2'; -select_priv user -Y blafasel2 -drop table t1; -delete from mysql.user where user="blafasel2"; diff --git a/mysql-test/r/rpl_stm_EE_err2.result b/mysql-test/r/rpl_stm_EE_err2.result deleted file mode 100644 index 13aa45d8ced..00000000000 --- a/mysql-test/r/rpl_stm_EE_err2.result +++ /dev/null @@ -1,13 +0,0 @@ -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; -create table t1 (a int, unique(a)) engine=myisam; -set sql_log_bin=0; -insert into t1 values(2); -set sql_log_bin=1; -insert into t1 values(1),(2); -ERROR 23000: Duplicate entry '2' for key 'a' -drop table t1; diff --git a/mysql-test/r/rpl_stm_charset.result b/mysql-test/r/rpl_stm_charset.result deleted file mode 100644 index fd9c40843d5..00000000000 --- a/mysql-test/r/rpl_stm_charset.result +++ /dev/null @@ -1,270 +0,0 @@ -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 timestamp=1000000000; -drop database if exists mysqltest2; -drop database if exists mysqltest3; -create database mysqltest2 character set latin2; -set @@character_set_server=latin5; -create database mysqltest3; - ---- --master-- -show create database mysqltest2; -Database Create Database -mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ - ---- --slave-- -show create database mysqltest2; -Database Create Database -mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ -set @@collation_server=armscii8_bin; -drop database mysqltest3; -create database mysqltest3; - ---- --master-- -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ - ---- --slave-- -show create database mysqltest3; -Database Create Database -mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ -use mysqltest2; -create table t1 (a int auto_increment primary key, b varchar(100)); -set character_set_client=cp850, collation_connection=latin2_croatian_ci; -insert into t1 (b) values(@@character_set_server); -insert into t1 (b) values(@@collation_server); -insert into t1 (b) values(@@character_set_client); -insert into t1 (b) values(@@character_set_connection); -insert into t1 (b) values(@@collation_connection); - ---- --master-- -select * from t1 order by a; -a b -1 armscii8 -2 armscii8_bin -3 cp850 -4 latin2 -5 latin2_croatian_ci - ---- --slave-- -select * from mysqltest2.t1 order by a; -a b -1 armscii8 -2 armscii8_bin -3 cp850 -4 latin2 -5 latin2_croatian_ci -set character_set_client=latin1, collation_connection=latin1_german1_ci; -truncate table t1; -insert into t1 (b) values(@@collation_connection); -insert into t1 (b) values(LEAST("Müller","Muffler")); -set collation_connection=latin1_german2_ci; -insert into t1 (b) values(@@collation_connection); -insert into t1 (b) values(LEAST("Müller","Muffler")); - ---- --master-- -select * from t1 order by a; -a b -1 latin1_german1_ci -2 Muffler -3 latin1_german2_ci -4 Müller - ---- --slave-- -select * from mysqltest2.t1 order by a; -a b -1 latin1_german1_ci -2 Muffler -3 latin1_german2_ci -4 Müller -set @a= _cp850 'Müller' collate cp850_general_ci; -truncate table t1; -insert into t1 (b) values(collation(@a)); - ---- --master-- -select * from t1 order by a; -a b -1 cp850_general_ci - ---- --slave-- -select * from mysqltest2.t1 order by a; -a b -1 cp850_general_ci -drop database mysqltest2; -drop database mysqltest3; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest2 -master-bin.000001 # Query # # drop database if exists mysqltest3 -master-bin.000001 # Query # # create database mysqltest2 character set latin2 -master-bin.000001 # Query # # create database mysqltest3 -master-bin.000001 # Query # # drop database mysqltest3 -master-bin.000001 # Query # # create database mysqltest3 -master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) -master-bin.000001 # Intvar # # INSERT_ID=1 -master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@character_set_server) -master-bin.000001 # Intvar # # INSERT_ID=2 -master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_server) -master-bin.000001 # Intvar # # INSERT_ID=3 -master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@character_set_client) -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@character_set_connection) -master-bin.000001 # Intvar # # INSERT_ID=5 -master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 -master-bin.000001 # Intvar # # INSERT_ID=1 -master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 # Intvar # # INSERT_ID=2 -master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) -master-bin.000001 # Intvar # # INSERT_ID=3 -master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) -master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 -master-bin.000001 # Intvar # # INSERT_ID=1 -master-bin.000001 # User var # # @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci -master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(collation(@a)) -master-bin.000001 # Query # # drop database mysqltest2 -master-bin.000001 # Query # # drop database mysqltest3 -set global character_set_server=latin2; -set global character_set_server=latin1; -set global character_set_server=latin2; -set global character_set_server=latin1; -set one_shot @@character_set_server=latin5; -set @@max_join_size=1000; -select @@character_set_server; -@@character_set_server -latin5 -select @@character_set_server; -@@character_set_server -latin1 -set @@character_set_server=latin5; -select @@character_set_server; -@@character_set_server -latin5 -select @@character_set_server; -@@character_set_server -latin5 -set one_shot max_join_size=10; -ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server -set character_set_client=9999999; -ERROR 42000: Unknown character set: '9999999' -set collation_server=9999998; -ERROR HY000: Unknown collation: '9999998' -use test; -CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); -SET CHARACTER_SET_CLIENT=koi8r, -CHARACTER_SET_CONNECTION=cp1251, -CHARACTER_SET_RESULTS=koi8r; -INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); -select hex(c1), hex(c2) from t1; -hex(c1) hex(c2) -CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 -select hex(c1), hex(c2) from t1; -hex(c1) hex(c2) -CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 -flush logs; -/*!40019 SET @@session.max_insert_delayed_threads=0*/; -/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -DELIMITER /*!*/; -ROLLBACK/*!*/; -SET TIMESTAMP=1000000000/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; -SET @@session.sql_mode=0/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; -drop database if exists mysqltest2/*!*/; -SET TIMESTAMP=1000000000/*!*/; -drop database if exists mysqltest3/*!*/; -SET TIMESTAMP=1000000000/*!*/; -create database mysqltest2 character set latin2/*!*/; -SET TIMESTAMP=1000000000/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/; -create database mysqltest3/*!*/; -SET TIMESTAMP=1000000000/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64/*!*/; -drop database mysqltest3/*!*/; -SET TIMESTAMP=1000000000/*!*/; -create database mysqltest3/*!*/; -use mysqltest2/*!*/; -SET TIMESTAMP=1000000000/*!*/; -create table t1 (a int auto_increment primary key, b varchar(100))/*!*/; -SET INSERT_ID=1/*!*/; -SET TIMESTAMP=1000000000/*!*/; -/*!\C cp850 *//*!*/; -SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64/*!*/; -insert into t1 (b) values(@@character_set_server)/*!*/; -SET INSERT_ID=2/*!*/; -SET TIMESTAMP=1000000000/*!*/; -insert into t1 (b) values(@@collation_server)/*!*/; -SET INSERT_ID=3/*!*/; -SET TIMESTAMP=1000000000/*!*/; -insert into t1 (b) values(@@character_set_client)/*!*/; -SET INSERT_ID=4/*!*/; -SET TIMESTAMP=1000000000/*!*/; -insert into t1 (b) values(@@character_set_connection)/*!*/; -SET INSERT_ID=5/*!*/; -SET TIMESTAMP=1000000000/*!*/; -insert into t1 (b) values(@@collation_connection)/*!*/; -SET TIMESTAMP=1000000000/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64/*!*/; -truncate table t1/*!*/; -SET INSERT_ID=1/*!*/; -SET TIMESTAMP=1000000000/*!*/; -insert into t1 (b) values(@@collation_connection)/*!*/; -SET INSERT_ID=2/*!*/; -SET TIMESTAMP=1000000000/*!*/; -insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/; -SET INSERT_ID=3/*!*/; -SET TIMESTAMP=1000000000/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64/*!*/; -insert into t1 (b) values(@@collation_connection)/*!*/; -SET INSERT_ID=4/*!*/; -SET TIMESTAMP=1000000000/*!*/; -insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/; -SET TIMESTAMP=1000000000/*!*/; -truncate table t1/*!*/; -SET INSERT_ID=1/*!*/; -SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`/*!*/; -SET TIMESTAMP=1000000000/*!*/; -insert into t1 (b) values(collation(@a))/*!*/; -SET TIMESTAMP=1000000000/*!*/; -drop database mysqltest2/*!*/; -SET TIMESTAMP=1000000000/*!*/; -drop database mysqltest3/*!*/; -use test/*!*/; -SET TIMESTAMP=1000000000/*!*/; -/*!\C latin1 *//*!*/; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/; -CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))/*!*/; -SET TIMESTAMP=1000000000/*!*/; -/*!\C koi8r *//*!*/; -SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30/*!*/; -INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ')/*!*/; -DELIMITER ; -# End of log file -ROLLBACK /* added by mysqlbinlog */; -/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; -drop table t1; -create table `t1` ( -`pk` varchar(10) not null default '', -primary key (`pk`) -) engine=myisam default charset=latin1; -set @p=_latin1 'test'; -update t1 set pk='test' where pk=@p; -drop table t1; diff --git a/mysql-test/r/rpl_stm_flsh_tbls.result b/mysql-test/r/rpl_stm_flsh_tbls.result deleted file mode 100644 index 1c6b5615b6e..00000000000 --- a/mysql-test/r/rpl_stm_flsh_tbls.result +++ /dev/null @@ -1,33 +0,0 @@ -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; -create table t1 (a int); -insert into t1 values (10); -create table t2 (a int); -create table t3 (a int) engine=merge union(t1); -create table t4 (a int); -insert into t4 select * from t3; -rename table t1 to t5, t2 to t1; -flush no_write_to_binlog tables; -SHOW BINLOG EVENTS FROM 656 ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 -select * from t3; -a -flush tables; -SHOW BINLOG EVENTS FROM 656 ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 -master-bin.000001 # Query 1 # use `test`; flush tables -select * from t3; -a -stop slave; -drop table t1; -flush tables with read lock; -start slave; -stop slave; -ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction -drop table t3, t4, t5; diff --git a/mysql-test/r/rpl_stm_insert_delayed.result b/mysql-test/r/rpl_stm_insert_delayed.result deleted file mode 100644 index 1c003856eb9..00000000000 --- a/mysql-test/r/rpl_stm_insert_delayed.result +++ /dev/null @@ -1,88 +0,0 @@ -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 @old_global_binlog_format = @@global.binlog_format; -set @@global.binlog_format = statement; -CREATE SCHEMA IF NOT EXISTS mysqlslap; -USE mysqlslap; -select @@global.binlog_format; -@@global.binlog_format -STATEMENT -CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); -FLUSH TABLE t1; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -use mysqlslap; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -truncate table t1; -insert delayed into t1 values(10, "my name"); -insert delayed into t1 values(10, "is Bond"), (20, "James Bond"); -ERROR 23000: Duplicate entry '10' for key 'PRIMARY' -flush table t1; -select * from t1; -id name -10 my name -select * from t1; -id name -10 my name -delete from t1 where id!=10; -insert delayed into t1 values(20, "is Bond"), (10, "James Bond"); -ERROR 23000: Duplicate entry '10' for key 'PRIMARY' -flush table t1; -select * from t1; -id name -10 my name -20 is Bond -select * from t1; -id name -10 my name -20 is Bond -USE test; -DROP SCHEMA mysqlslap; -set @@global.binlog_format = mixed; -CREATE SCHEMA IF NOT EXISTS mysqlslap; -USE mysqlslap; -select @@global.binlog_format; -@@global.binlog_format -MIXED -CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); -FLUSH TABLE t1; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -use mysqlslap; -SELECT COUNT(*) FROM t1; -COUNT(*) -5000 -truncate table t1; -insert delayed into t1 values(10, "my name"); -insert delayed into t1 values(10, "is Bond"), (20, "James Bond"); -flush table t1; -select * from t1; -id name -10 my name -20 James Bond -select * from t1; -id name -10 my name -20 James Bond -delete from t1 where id!=10; -insert delayed into t1 values(20, "is Bond"), (10, "James Bond"); -flush table t1; -select * from t1; -id name -10 my name -20 is Bond -select * from t1; -id name -10 my name -20 is Bond -USE test; -DROP SCHEMA mysqlslap; -set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/r/rpl_stm_log.result b/mysql-test/r/rpl_stm_log.result deleted file mode 100644 index 3ee2d990159..00000000000 --- a/mysql-test/r/rpl_stm_log.result +++ /dev/null @@ -1,115 +0,0 @@ -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; -stop slave; -reset master; -reset slave; -reset master; -create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; -insert into t1 values (NULL); -drop table t1; -create table t1 (word char(20) not null)ENGINE=MyISAM; -load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; -select count(*) from t1; -count(*) -69 -show binlog events; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Intvar 1 # INSERT_ID=1 -master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) -master-bin.000001 # Query 1 # use `test`; drop table t1 -master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581 -master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1 -show binlog events from 106 limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -show binlog events from 106 limit 2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Intvar 1 # INSERT_ID=1 -show binlog events from 106 limit 2,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) -flush logs; -create table t3 (a int)ENGINE=MyISAM; -start slave; - -let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; - ---source include/wait_slave_status.inc -flush logs; -stop slave; -create table t2 (n int)ENGINE=MyISAM; -insert into t2 values (1); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Intvar # # INSERT_ID=1 -master-bin.000001 # Query # # use `test`; insert into t1 values (NULL) -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -master-bin.000001 # Begin_load_query # # ;file_id=1;block_len=581 -master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1 -master-bin.000001 # Rotate # # master-bin.000002;pos=4 -show binlog events in 'master-bin.000002'; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 -master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM -master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM -master-bin.000002 # Query 1 # use `test`; insert into t2 values (1) -show binary logs; -Log_name File_size -master-bin.000001 1347 -master-bin.000002 392 -start slave; -show binary logs; -Log_name File_size -slave-bin.000001 1447 -slave-bin.000002 293 -show binlog events in 'slave-bin.000001' from 4; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -slave-bin.000001 # Intvar 1 # INSERT_ID=1 -slave-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) -slave-bin.000001 # Query 1 # use `test`; drop table t1 -slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -slave-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581 -slave-bin.000001 # Execute_load_query 1 # use `test`; load data INFILE '../tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1 -slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM -slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 -show binlog events in 'slave-bin.000002' from 4; -Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 -slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM -slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1) -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 392 # # master-bin.000002 Yes Yes # 0 0 392 # None 0 No # No -show binlog events in 'slave-bin.000005' from 4; -ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -create table t1(a int auto_increment primary key, b int); -insert into t1 values (NULL, 1); -reset master; -set insert_id=5; -insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Intvar # # LAST_INSERT_ID=1 -master-bin.000001 # Intvar # # INSERT_ID=5 -master-bin.000001 # Query # # use `test`; insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()) -select * from t1; -a b -1 1 -5 1 -6 1 -drop table t1; diff --git a/mysql-test/r/rpl_stm_max_relay_size.result b/mysql-test/r/rpl_stm_max_relay_size.result deleted file mode 100644 index c2e57be6ad4..00000000000 --- a/mysql-test/r/rpl_stm_max_relay_size.result +++ /dev/null @@ -1,279 +0,0 @@ -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; -stop slave; -# -# Generate a big enough master's binlog to cause relay log rotations -# -create table t1 (a int); -drop table t1; -reset slave; -# -# Test 1 -# -set @my_max_binlog_size= @@global.max_binlog_size; -set global max_binlog_size=8192; -set global max_relay_log_size=8192-1; -select @@global.max_relay_log_size; -@@global.max_relay_log_size -4096 -start slave; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 72960 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 72960 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -# -# Test 2 -# -stop slave; -reset slave; -set global max_relay_log_size=(5*4096); -select @@global.max_relay_log_size; -@@global.max_relay_log_size 20480 -start slave; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 72960 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 72960 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -# -# Test 3: max_relay_log_size = 0 -# -stop slave; -reset slave; -set global max_relay_log_size=0; -select @@global.max_relay_log_size; -@@global.max_relay_log_size 0 -start slave; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 72960 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 72960 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -# -# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions -# -stop slave; -reset slave; -flush logs; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File -Read_Master_Log_Pos 4 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File -Slave_IO_Running No -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 0 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -# -# Test 5 -# -reset slave; -start slave; -flush logs; -create table t1 (a int); -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 73046 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 73046 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -# -# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated -# -flush logs; -drop table t1; -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 73122 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 73122 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -flush logs; -show master status; -File master-bin.000002 -Position 106 -Binlog_Do_DB -Binlog_Ignore_DB -set global max_binlog_size= @my_max_binlog_size; -# -# End of 4.1 tests -# diff --git a/mysql-test/r/rpl_stm_multi_query.result b/mysql-test/r/rpl_stm_multi_query.result deleted file mode 100644 index 625c686f383..00000000000 --- a/mysql-test/r/rpl_stm_multi_query.result +++ /dev/null @@ -1,32 +0,0 @@ -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; -drop database if exists mysqltest; -create database mysqltest; -create table mysqltest.t1 ( n int); -insert into mysqltest.t1 values(1)/ -insert into mysqltest.t1 values(2); -insert into mysqltest.t1 values(3); -insert into mysqltest.t1 values(4); -insert into mysqltest.t1 values(5)/ -select * from mysqltest.t1; -n -1 -2 -3 -4 -5 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest -master-bin.000001 # Query # # create database mysqltest -master-bin.000001 # Query # # use `test`; create table mysqltest.t1 ( n int) -master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(1) -master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(2) -master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(3) -master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(4) -master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(5) -drop database mysqltest; diff --git a/mysql-test/r/rpl_stm_mystery22.result b/mysql-test/r/rpl_stm_mystery22.result deleted file mode 100644 index ea34b308ec2..00000000000 --- a/mysql-test/r/rpl_stm_mystery22.result +++ /dev/null @@ -1,31 +0,0 @@ -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; -create table t1(n int auto_increment primary key, s char(10)); -insert into t1 values (2,'old'); -insert into t1 values(NULL,'new'); -insert into t1 values(NULL,'new'); -select * from t1 order by n; -n s -1 new -2 old -delete from t1 where n = 2; -start slave; -stop slave; -create table t2(n int); -drop table t2; -insert into t1 values(NULL,'new'); -set sql_log_bin=0; -insert into t1 values(NULL,'new'); -set sql_log_bin=1; -delete from t1 where n=4; -start slave; -select * from t1 order by n; -n s -1 new -2 new -3 new -drop table t1; diff --git a/mysql-test/r/rpl_stm_no_op.result b/mysql-test/r/rpl_stm_no_op.result deleted file mode 100644 index 5a253d61fcb..00000000000 --- a/mysql-test/r/rpl_stm_no_op.result +++ /dev/null @@ -1,52 +0,0 @@ -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; -create database mysqltest; -drop database if exists mysqltest; -Warnings: -Note 1008 Can't drop database 'mysqltest'; database doesn't exist -show tables from mysqltest; -ERROR 42000: Unknown database 'mysqltest' -create table t1 (a int); -drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' -select * from t1; -ERROR 42S02: Table 'test.t1' doesn't exist -create table t1 (a int, b int); -insert into t1 values(1,1); -delete from t1; -select * from t1; -a b -insert into t1 values(1,1); -insert into t1 values(2,1); -update t1 set a=2; -select * from t1; -a b -2 1 -2 1 -create table t2 (a int, b int); -delete from t1; -insert into t1 values(1,1); -insert into t2 values(1,1); -update t1 set a=2; -UPDATE t1, t2 SET t1.a = t2.a; -select * from t1; -a b -1 1 -select * from t2; -a b -1 1 -delete from t1; -delete from t2; -insert into t1 values(1,1); -insert into t2 values(1,1); -DELETE t1.*, t2.* from t1, t2; -select * from t1; -a b -select * from t2; -a b -drop table t1, t2; diff --git a/mysql-test/r/rpl_stm_reset_slave.result b/mysql-test/r/rpl_stm_reset_slave.result deleted file mode 100644 index e134629d597..00000000000 --- a/mysql-test/r/rpl_stm_reset_slave.result +++ /dev/null @@ -1,32 +0,0 @@ -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; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No -stop slave; -change master to master_user='test'; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # No -reset slave; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No -start slave; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No -stop slave; -reset slave; -start slave; -create temporary table t1 (a int); -stop slave; -reset slave; -start slave; -show status like 'slave_open_temp_tables'; -Variable_name Value -Slave_open_temp_tables 1 diff --git a/mysql-test/r/rpl_stm_until.result b/mysql-test/r/rpl_stm_until.result deleted file mode 100644 index ffe6216a42b..00000000000 --- a/mysql-test/r/rpl_stm_until.result +++ /dev/null @@ -1,190 +0,0 @@ -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; -stop slave; -create table t1(n int not null auto_increment primary key); -insert into t1 values (1),(2),(3),(4); -drop table t1; -create table t2(n int not null auto_increment primary key); -insert into t2 values (1),(2); -insert into t2 values (3),(4); -drop table t2; -start slave until master_log_file='master-bin.000001', master_log_pos=323; -select * from t1; -n -1 -2 -3 -4 -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 784 -Relay_Log_File slave-relay-bin.000004 -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running # -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 327 -Relay_Log_Space # -Until_Condition Master -Until_Log_File master-bin.000001 -Until_Log_Pos 323 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; -select * from t1; -n -1 -2 -3 -4 -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 784 -Relay_Log_File slave-relay-bin.000004 -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running # -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 327 -Relay_Log_Space # -Until_Condition Master -Until_Log_File master-no-such-bin.000001 -Until_Log_Pos 291 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; -select * from t2; -n -1 -2 -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 784 -Relay_Log_File slave-relay-bin.000004 -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running # -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 616 -Relay_Log_Space # -Until_Condition Relay -Until_Log_File slave-relay-bin.000004 -Until_Log_Pos 746 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -start slave; -stop slave; -start slave until master_log_file='master-bin.000001', master_log_pos=776; -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 784 -Relay_Log_File slave-relay-bin.000004 -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 784 -Relay_Log_Space # -Until_Condition Master -Until_Log_File master-bin.000001 -Until_Log_Pos 776 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -start slave until master_log_file='master-bin', master_log_pos=561; -ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; -ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave until master_log_file='master-bin.000001'; -ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave until relay_log_file='slave-relay-bin.000002'; -ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; -ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL -start slave sql_thread; -start slave until master_log_file='master-bin.000001', master_log_pos=776; -Warnings: -Note 1254 Slave is already running diff --git a/mysql-test/r/rpl_switch_stm_row_mixed.result b/mysql-test/r/rpl_switch_stm_row_mixed.result deleted file mode 100644 index 7c796bd5449..00000000000 --- a/mysql-test/r/rpl_switch_stm_row_mixed.result +++ /dev/null @@ -1,1017 +0,0 @@ -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; -drop database if exists mysqltest1; -create database mysqltest1; -use mysqltest1; -set @my_binlog_format= @@global.binlog_format; -set session binlog_format=mixed; -show session variables like "binlog_format%"; -Variable_name Value -binlog_format MIXED -set session binlog_format=statement; -show session variables like "binlog_format%"; -Variable_name Value -binlog_format STATEMENT -set session binlog_format=row; -show session variables like "binlog_format%"; -Variable_name Value -binlog_format ROW -set global binlog_format=DEFAULT; -show global variables like "binlog_format%"; -Variable_name Value -binlog_format MIXED -set global binlog_format=MIXED; -show global variables like "binlog_format%"; -Variable_name Value -binlog_format MIXED -set global binlog_format=STATEMENT; -show global variables like "binlog_format%"; -Variable_name Value -binlog_format STATEMENT -set global binlog_format=ROW; -show global variables like "binlog_format%"; -Variable_name Value -binlog_format ROW -show session variables like "binlog_format%"; -Variable_name Value -binlog_format ROW -select @@global.binlog_format, @@session.binlog_format; -@@global.binlog_format @@session.binlog_format -ROW ROW -CREATE TABLE t1 (a varchar(100)); -prepare stmt1 from 'insert into t1 select concat(UUID(),?)'; -set @string="emergency_1_"; -insert into t1 values("work_2_"); -execute stmt1 using @string; -deallocate prepare stmt1; -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values(concat(UUID(),"work_3_")); -execute stmt1 using @string; -deallocate prepare stmt1; -insert into t1 values(concat("for_4_",UUID())); -insert into t1 select "yesterday_5_"; -create temporary table tmp(a char(100)); -insert into tmp values("see_6_"); -set binlog_format=statement; -ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables -insert into t1 select * from tmp; -drop temporary table tmp; -set binlog_format=statement; -show global variables like "binlog_format%"; -Variable_name Value -binlog_format ROW -show session variables like "binlog_format%"; -Variable_name Value -binlog_format STATEMENT -select @@global.binlog_format, @@session.binlog_format; -@@global.binlog_format @@session.binlog_format -ROW STATEMENT -set global binlog_format=statement; -show global variables like "binlog_format%"; -Variable_name Value -binlog_format STATEMENT -show session variables like "binlog_format%"; -Variable_name Value -binlog_format STATEMENT -select @@global.binlog_format, @@session.binlog_format; -@@global.binlog_format @@session.binlog_format -STATEMENT STATEMENT -prepare stmt1 from 'insert into t1 select ?'; -set @string="emergency_7_"; -insert into t1 values("work_8_"); -execute stmt1 using @string; -deallocate prepare stmt1; -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values("work_9_"); -execute stmt1 using @string; -deallocate prepare stmt1; -insert into t1 values("for_10_"); -insert into t1 select "yesterday_11_"; -set binlog_format=statement; -select @@global.binlog_format, @@session.binlog_format; -@@global.binlog_format @@session.binlog_format -STATEMENT STATEMENT -set global binlog_format=statement; -select @@global.binlog_format, @@session.binlog_format; -@@global.binlog_format @@session.binlog_format -STATEMENT STATEMENT -prepare stmt1 from 'insert into t1 select ?'; -set @string="emergency_12_"; -insert into t1 values("work_13_"); -execute stmt1 using @string; -deallocate prepare stmt1; -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values("work_14_"); -execute stmt1 using @string; -deallocate prepare stmt1; -insert into t1 values("for_15_"); -insert into t1 select "yesterday_16_"; -set global binlog_format=mixed; -select @@global.binlog_format, @@session.binlog_format; -@@global.binlog_format @@session.binlog_format -MIXED STATEMENT -set binlog_format=default; -select @@global.binlog_format, @@session.binlog_format; -@@global.binlog_format @@session.binlog_format -MIXED MIXED -prepare stmt1 from 'insert into t1 select concat(UUID(),?)'; -set @string="emergency_17_"; -insert into t1 values("work_18_"); -execute stmt1 using @string; -deallocate prepare stmt1; -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values(concat(UUID(),"work_19_")); -execute stmt1 using @string; -deallocate prepare stmt1; -insert into t1 values(concat("for_20_",UUID())); -insert into t1 select "yesterday_21_"; -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values(concat(UUID(),"work_22_")); -execute stmt1 using @string; -deallocate prepare stmt1; -insert into t1 values(concat("for_23_",UUID())); -insert into t1 select "yesterday_24_"; -create table t2 select rpad(UUID(),100,' '); -create table t3 select 1 union select UUID(); -create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3); -create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); -insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); -create procedure foo() -begin -insert into t1 values("work_25_"); -insert into t1 values(concat("for_26_",UUID())); -insert into t1 select "yesterday_27_"; -end| -create procedure foo2() -begin -insert into t1 values(concat("emergency_28_",UUID())); -insert into t1 values("work_29_"); -insert into t1 values(concat("for_30_",UUID())); -set session binlog_format=row; # accepted for stored procs -insert into t1 values("more work_31_"); -set session binlog_format=mixed; -end| -create function foo3() returns bigint unsigned -begin -set session binlog_format=row; # rejected for stored funcs -insert into t1 values("alarm"); -return 100; -end| -create procedure foo4(x varchar(100)) -begin -insert into t1 values(concat("work_250_",x)); -insert into t1 select "yesterday_270_"; -end| -call foo(); -call foo2(); -call foo4("hello"); -call foo4(UUID()); -call foo4("world"); -select foo3(); -ERROR HY000: Cannot change the binary logging format inside a stored function or trigger -select * from t1 where a="alarm"; -a -drop function foo3; -create function foo3() returns bigint unsigned -begin -insert into t1 values("foo3_32_"); -call foo(); -return 100; -end| -insert into t2 select foo3(); -prepare stmt1 from 'insert into t2 select foo3()'; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; -create function foo4() returns bigint unsigned -begin -insert into t2 select foo3(); -return 100; -end| -select foo4(); -foo4() -100 -prepare stmt1 from 'select foo4()'; -execute stmt1; -foo4() -100 -execute stmt1; -foo4() -100 -deallocate prepare stmt1; -create function foo5() returns bigint unsigned -begin -insert into t2 select UUID(); -return 100; -end| -select foo5(); -foo5() -100 -prepare stmt1 from 'select foo5()'; -execute stmt1; -foo5() -100 -execute stmt1; -foo5() -100 -deallocate prepare stmt1; -create function foo6(x varchar(100)) returns bigint unsigned -begin -insert into t2 select x; -return 100; -end| -select foo6("foo6_1_"); -foo6("foo6_1_") -100 -select foo6(concat("foo6_2_",UUID())); -foo6(concat("foo6_2_",UUID())) -100 -prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))'; -execute stmt1; -foo6(concat("foo6_3_",UUID())) -100 -execute stmt1; -foo6(concat("foo6_3_",UUID())) -100 -deallocate prepare stmt1; -create view v1 as select uuid(); -create table t11 (data varchar(255)); -insert into t11 select * from v1; -insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11'); -prepare stmt1 from "insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')"; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; -create trigger t11_bi before insert on t11 for each row -begin -set NEW.data = concat(NEW.data,UUID()); -end| -insert into t11 values("try_560_"); -insert delayed into t2 values("delay_1_"); -insert delayed into t2 values(concat("delay_2_",UUID())); -insert delayed into t2 values("delay_6_"); -insert delayed into t2 values(rand()); -set @a=2.345; -insert delayed into t2 values(@a); -create table t20 select * from t1; -create table t21 select * from t2; -create table t22 select * from t3; -drop table t1,t2,t3; -create table t1 (a int primary key auto_increment, b varchar(100)); -create table t2 (a int primary key auto_increment, b varchar(100)); -create table t3 (b varchar(100)); -create function f (x varchar(100)) returns int deterministic -begin -insert into t1 values(null,x); -insert into t2 values(null,x); -return 1; -end| -select f("try_41_"); -f("try_41_") -1 -use mysqltest1; -insert into t2 values(2,null),(3,null),(4,null); -delete from t2 where a>=2; -select f("try_42_"); -f("try_42_") -1 -insert into t2 values(3,null),(4,null); -delete from t2 where a>=3; -prepare stmt1 from 'select f(?)'; -set @string="try_43_"; -insert into t1 values(null,"try_44_"); -execute stmt1 using @string; -f(?) -1 -deallocate prepare stmt1; -create table t12 select * from t1; -drop table t1; -create table t1 (a int, b varchar(100), key(a)); -select f("try_45_"); -f("try_45_") -1 -create table t13 select * from t1; -drop table t1; -create table t1 (a int primary key auto_increment, b varchar(100)); -drop function f; -create table t14 (unique (a)) select * from t2; -truncate table t2; -create function f1 (x varchar(100)) returns int deterministic -begin -insert into t1 values(null,x); -return 1; -end| -create function f2 (x varchar(100)) returns int deterministic -begin -insert into t2 values(null,x); -return 1; -end| -select f1("try_46_"),f2("try_47_"); -f1("try_46_") f2("try_47_") -1 1 -insert into t2 values(2,null),(3,null),(4,null); -delete from t2 where a>=2; -select f1("try_48_"),f2("try_49_"); -f1("try_48_") f2("try_49_") -1 1 -insert into t3 values(concat("try_50_",f1("try_51_"),f2("try_52_"))); -drop function f2; -create function f2 (x varchar(100)) returns int deterministic -begin -declare y int; -insert into t1 values(null,x); -set y = (select count(*) from t2); -return y; -end| -select f1("try_53_"),f2("try_54_"); -f1("try_53_") f2("try_54_") -1 3 -drop function f2; -create trigger t1_bi before insert on t1 for each row -begin -insert into t2 values(null,"try_55_"); -end| -insert into t1 values(null,"try_56_"); -alter table t1 modify a int, drop primary key; -insert into t1 values(null,"try_57_"); -CREATE TEMPORARY TABLE t15 SELECT UUID(); -create table t16 like t15; -INSERT INTO t16 SELECT * FROM t15; -insert into t16 values("try_65_"); -drop table t15; -insert into t16 values("try_66_"); -select count(*) from t1; -count(*) -7 -select count(*) from t2; -count(*) -5 -select count(*) from t3; -count(*) -1 -select count(*) from t4; -count(*) -29 -select count(*) from t5; -count(*) -58 -select count(*) from t11; -count(*) -8 -select count(*) from t20; -count(*) -66 -select count(*) from t21; -count(*) -19 -select count(*) from t22; -count(*) -2 -select count(*) from t12; -count(*) -4 -select count(*) from t13; -count(*) -1 -select count(*) from t14; -count(*) -4 -select count(*) from t16; -count(*) -3 -DROP TABLE IF EXISTS t11; -SET SESSION BINLOG_FORMAT=STATEMENT; -CREATE TABLE t11 (song VARCHAR(255)); -LOCK TABLES t11 WRITE; -SET SESSION BINLOG_FORMAT=ROW; -INSERT INTO t11 VALUES('Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict'); -SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t11 VALUES('Careful With That Axe, Eugene'); -UNLOCK TABLES; -SELECT * FROM t11; -song Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict -song Careful With That Axe, Eugene -USE mysqltest1; -SELECT * FROM t11; -song Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict -song Careful With That Axe, Eugene -DROP TABLE IF EXISTS t12; -SET SESSION BINLOG_FORMAT=MIXED; -CREATE TABLE t12 (data LONG); -LOCK TABLES t12 WRITE; -INSERT INTO t12 VALUES(UUID()); -UNLOCK TABLES; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest1 -master-bin.000001 # Query # # create database mysqltest1 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_8_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_10_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_11_" -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_13_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_14_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_15_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_16_" -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_18_") -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_21_" -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( - `rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` ( - `1` varbinary(36) NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t4` ( - `a` varchar(100) DEFAULT NULL -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t4) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t5) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() -begin -insert into t1 values("work_25_"); -insert into t1 values(concat("for_26_",UUID())); -insert into t1 select "yesterday_27_"; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2() -begin -insert into t1 values(concat("emergency_28_",UUID())); -insert into t1 values("work_29_"); -insert into t1 values(concat("for_30_",UUID())); -set session binlog_format=row; # accepted for stored procs -insert into t1 values("more work_31_"); -set session binlog_format=mixed; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned -begin -set session binlog_format=row; # rejected for stored funcs -insert into t1 values("alarm"); -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100)) -begin -insert into t1 values(concat("work_250_",x)); -insert into t1 select "yesterday_270_"; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello'))) -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world'))) -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" -master-bin.000001 # Query # # use `mysqltest1`; drop function foo3 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned -begin -insert into t1 values("foo3_32_"); -call foo(); -return 100; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned -begin -insert into t2 select foo3(); -return 100; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned -begin -insert into t2 select UUID(); -return 100; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned -begin -insert into t2 select x; -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_') -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid() -master-bin.000001 # Query # # use `mysqltest1`; create table t11 (data varchar(255)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row -begin -set NEW.data = concat(NEW.data,UUID()); -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; create table t20 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t21 select * from t2 -master-bin.000001 # Query # # use `mysqltest1`; create table t22 select * from t3 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1,t2,t3 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; create table t3 (b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic -begin -insert into t1 values(null,x); -insert into t2 values(null,x); -return 1; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Intvar # # INSERT_ID=3 -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_44_") -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; create table t12 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a)) -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_') -master-bin.000001 # Query # # use `mysqltest1`; create table t13 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; drop function f -master-bin.000001 # Query # # use `mysqltest1`; create table t14 (unique (a)) select * from t2 -master-bin.000001 # Query # # use `mysqltest1`; truncate table t2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic -begin -insert into t1 values(null,x); -return 1; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic -begin -insert into t2 values(null,x); -return 1; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; drop function f2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic -begin -declare y int; -insert into t1 values(null,x); -set y = (select count(*) from t2); -return y; -end -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_') -master-bin.000001 # Intvar # # INSERT_ID=5 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_') -master-bin.000001 # Query # # use `mysqltest1`; drop function f2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row -begin -insert into t2 values(null,"try_55_"); -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; alter table t1 modify a int, drop primary key -master-bin.000001 # Intvar # # INSERT_ID=5 -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_57_") -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t16` ( - `UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t16 values("try_66_") -master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t11 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene') -master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest1 -master-bin.000001 # Query # # create database mysqltest1 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_8_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_10_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_11_" -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_13_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_14_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_15_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_16_" -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_18_") -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_21_" -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( - `rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` ( - `1` varbinary(36) NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t4` ( - `a` varchar(100) DEFAULT NULL -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t4) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t5) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() -begin -insert into t1 values("work_25_"); -insert into t1 values(concat("for_26_",UUID())); -insert into t1 select "yesterday_27_"; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2() -begin -insert into t1 values(concat("emergency_28_",UUID())); -insert into t1 values("work_29_"); -insert into t1 values(concat("for_30_",UUID())); -set session binlog_format=row; # accepted for stored procs -insert into t1 values("more work_31_"); -set session binlog_format=mixed; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned -begin -set session binlog_format=row; # rejected for stored funcs -insert into t1 values("alarm"); -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100)) -begin -insert into t1 values(concat("work_250_",x)); -insert into t1 select "yesterday_270_"; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello'))) -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world'))) -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" -master-bin.000001 # Query # # use `mysqltest1`; drop function foo3 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned -begin -insert into t1 values("foo3_32_"); -call foo(); -return 100; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned -begin -insert into t2 select foo3(); -return 100; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned -begin -insert into t2 select UUID(); -return 100; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned -begin -insert into t2 select x; -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_') -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid() -master-bin.000001 # Query # # use `mysqltest1`; create table t11 (data varchar(255)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row -begin -set NEW.data = concat(NEW.data,UUID()); -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; create table t20 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t21 select * from t2 -master-bin.000001 # Query # # use `mysqltest1`; create table t22 select * from t3 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1,t2,t3 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; create table t3 (b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic -begin -insert into t1 values(null,x); -insert into t2 values(null,x); -return 1; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Intvar # # INSERT_ID=3 -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_44_") -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; create table t12 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a)) -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_') -master-bin.000001 # Query # # use `mysqltest1`; create table t13 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; drop function f -master-bin.000001 # Query # # use `mysqltest1`; create table t14 (unique (a)) select * from t2 -master-bin.000001 # Query # # use `mysqltest1`; truncate table t2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic -begin -insert into t1 values(null,x); -return 1; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic -begin -insert into t2 values(null,x); -return 1; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; drop function f2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic -begin -declare y int; -insert into t1 values(null,x); -set y = (select count(*) from t2); -return y; -end -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_') -master-bin.000001 # Intvar # # INSERT_ID=5 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_') -master-bin.000001 # Query # # use `mysqltest1`; drop function f2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row -begin -insert into t2 values(null,"try_55_"); -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; alter table t1 modify a int, drop primary key -master-bin.000001 # Intvar # # INSERT_ID=5 -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_57_") -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t16` ( - `UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t16 values("try_66_") -master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t11 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene') -master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -drop database mysqltest1; -set global binlog_format =@my_binlog_format; diff --git a/mysql-test/r/rpl_temp_table.result b/mysql-test/r/rpl_temp_table.result deleted file mode 100644 index e4ca31d8908..00000000000 --- a/mysql-test/r/rpl_temp_table.result +++ /dev/null @@ -1,48 +0,0 @@ -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; -create table t2 (n int, PRIMARY KEY(n)); -create temporary table t1 (n int); -create temporary table t3 (n int not null); -insert into t1 values(1),(2),(3),(100),(25),(26),(200),(300); -insert into t2 select * from t1; -alter table t3 add primary key(n); -flush logs; -insert into t3 values (1010); -insert into t2 select * from t3; -drop table if exists t3; -insert into t2 values (1012); -create temporary table t1 (n int); -insert into t1 values (4),(5); -insert into t2 select * from t1; -insert into t2 values(61); -select * from t2; -n -1 -2 -3 -4 -5 -25 -26 -61 -100 -200 -300 -1010 -1012 -select count(*) from t2; -count(*) -13 -select sum(n) from t2; -sum(n) -2749 -show status like 'Slave_open_temp_tables'; -Variable_name Value -Slave_open_temp_tables 0 -drop table if exists t1,t2; -Warnings: -Note 1051 Unknown table 't1' diff --git a/mysql-test/r/rpl_temporary.result b/mysql-test/r/rpl_temporary.result deleted file mode 100644 index 7e7d0cebe1d..00000000000 --- a/mysql-test/r/rpl_temporary.result +++ /dev/null @@ -1,106 +0,0 @@ -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; -reset master; -SET @save_select_limit=@@session.sql_select_limit; -SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100; -ERROR 42000: Access denied; you need the SUPER privilege for this operation -SELECT @@session.sql_select_limit = @save_select_limit; -@@session.sql_select_limit = @save_select_limit -1 -SET @@session.sql_select_limit=10, @@session.sql_log_bin=0; -ERROR 42000: Access denied; you need the SUPER privilege for this operation -SELECT @@session.sql_select_limit = @save_select_limit; -@@session.sql_select_limit = @save_select_limit -1 -SET @@session.pseudo_thread_id=100; -SET @@session.pseudo_thread_id=connection_id(); -SET @@session.sql_log_bin=0; -SET @@session.sql_log_bin=1; -drop table if exists t1,t2; -create table t1(f int); -create table t2(f int); -insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -create temporary table t3(f int); -insert into t3 select * from t1 where f<6; -create temporary table t3(f int); -insert into t2 select count(*) from t3; -insert into t3 select * from t1 where f>=4; -drop temporary table t3; -insert into t2 select count(*) from t3; -drop temporary table t3; -select * from t2 ORDER BY f; -f -5 -7 -drop table t1, t2; -use test; -SET TIMESTAMP=1040323920; -create table t1(f int); -SET TIMESTAMP=1040323931; -create table t2(f int); -SET TIMESTAMP=1040323938; -insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -SET TIMESTAMP=1040323945; -SET @@session.pseudo_thread_id=1; -create temporary table t3(f int); -SET TIMESTAMP=1040323952; -SET @@session.pseudo_thread_id=1; -insert into t3 select * from t1 where f<6; -SET TIMESTAMP=1040324145; -SET @@session.pseudo_thread_id=2; -create temporary table t3(f int); -SET TIMESTAMP=1040324186; -SET @@session.pseudo_thread_id=1; -insert into t2 select count(*) from t3; -SET TIMESTAMP=1040324200; -SET @@session.pseudo_thread_id=2; -insert into t3 select * from t1 where f>=4; -SET TIMESTAMP=1040324211; -SET @@session.pseudo_thread_id=1; -drop temporary table t3; -SET TIMESTAMP=1040324219; -SET @@session.pseudo_thread_id=2; -insert into t2 select count(*) from t3; -SET TIMESTAMP=1040324224; -SET @@session.pseudo_thread_id=2; -drop temporary table t3; -select * from t2 ORDER BY f; -f -5 -7 -drop table t1,t2; -create temporary table t3 (f int); -create temporary table t4 (f int); -create table t5 (f int); -select id from information_schema.processlist where command='Binlog Dump' into @id; -kill @id; -insert into t5 select * from t4; -select * from t5 /* must be 1 after reconnection */; -f -drop temporary table t4; -drop table t5; -set @@session.pseudo_thread_id=100; -create temporary table t101 (id int); -create temporary table t102 (id int); -set @@session.pseudo_thread_id=200; -create temporary table t201 (id int); -create temporary table `t``201` (id int); -create temporary table `#sql_not_user_table202` (id int); -set @@session.pseudo_thread_id=300; -create temporary table t301 (id int); -create temporary table t302 (id int); -create temporary table `#sql_not_user_table303` (id int); -create table t1(f int); -insert into t1 values (1); -select * from t1 /* must be 1 */; -f -1 -drop table t1; -select * from t1; -a -1 -drop table t1; diff --git a/mysql-test/r/rpl_timezone.result b/mysql-test/r/rpl_timezone.result deleted file mode 100644 index 47ef16b9d49..00000000000 --- a/mysql-test/r/rpl_timezone.result +++ /dev/null @@ -1,107 +0,0 @@ -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 @my_time_zone= @@global.time_zone; -set timestamp=100000000; -create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n)); -create table t2 (t char(32), n int not null auto_increment, PRIMARY KEY(n)); -select @@time_zone; -@@time_zone -Japan -select @@time_zone; -@@time_zone -Europe/Moscow -insert into t1 values ('20050101000000', NULL), ('20050611093902',NULL); -insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); -SELECT * FROM t1 ORDER BY n; -t n -2005-01-01 00:00:00 1 -2005-06-11 09:39:02 2 -2004-01-01 00:00:00 3 -2004-06-11 09:39:02 4 -SELECT * FROM t1 ORDER BY n; -t n -2005-01-01 06:00:00 1 -2005-06-11 14:39:02 2 -2004-01-01 06:00:00 3 -2004-06-11 14:39:02 4 -delete from t1; -set time_zone='Europe/Moscow'; -insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); -SELECT * FROM t1 ORDER BY n; -t n -2004-01-01 00:00:00 5 -2004-06-11 09:39:02 6 -set time_zone='Europe/Moscow'; -SELECT * FROM t1 ORDER BY n; -t n -2004-01-01 00:00:00 5 -2004-06-11 09:39:02 6 -delete from t1; -set time_zone='UTC'; -load data infile '../std_data_ln/rpl_timezone2.dat' into table t1; -Warnings: -Warning 1265 Data truncated for column 't' at row 1 -Warning 1261 Row 1 doesn't contain data for all columns -Warning 1265 Data truncated for column 't' at row 2 -Warning 1261 Row 2 doesn't contain data for all columns -SELECT * FROM t1 ORDER BY n; -t n -0000-00-00 00:00:00 7 -0000-00-00 00:00:00 8 -set time_zone='UTC'; -SELECT * FROM t1 ORDER BY n; -t n -0000-00-00 00:00:00 7 -0000-00-00 00:00:00 8 -set time_zone='Europe/Moscow'; -set time_zone='Europe/Moscow'; -delete from t1; -insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); -set time_zone='MET'; -insert into t2 (select * from t1); -SELECT * FROM t1 ORDER BY n; -t n -2003-12-31 22:00:00 9 -2004-06-11 07:39:02 10 -SELECT * FROM t2 ORDER BY n; -t n -2003-12-31 22:00:00 9 -2004-06-11 07:39:02 10 -delete from t2; -set timestamp=1000072000; -insert into t2 values (current_timestamp,NULL), (current_date,NULL), (current_time,NULL); -SELECT * FROM t2 ORDER BY n; -t n -2001-09-09 23:46:40 11 -2001-09-09 12 -23:46:40 13 -delete from t2; -insert into t2 values (from_unixtime(1000000000),NULL), -(unix_timestamp('2001-09-09 03:46:40'),NULL); -SELECT * FROM t2 ORDER BY n; -t n -2001-09-09 03:46:40 14 -1000000000 15 -SELECT * FROM t2 ORDER BY n; -t n -2001-09-09 03:46:40 14 -1000000000 15 -set global time_zone='MET'; -delete from t2; -set time_zone='UTC'; -insert into t2 values(convert_tz('2004-01-01 00:00:00','MET',@@time_zone),NULL); -insert into t2 values(convert_tz('2005-01-01 00:00:00','MET','Japan'),NULL); -SELECT * FROM t2 ORDER BY n; -t n -2003-12-31 23:00:00 16 -2005-01-01 08:00:00 17 -SELECT * FROM t2 ORDER BY n; -t n -2003-12-31 23:00:00 16 -2005-01-01 08:00:00 17 -drop table t1, t2; -set global time_zone= @my_time_zone; diff --git a/mysql-test/r/rpl_trigger.result b/mysql-test/r/rpl_trigger.result deleted file mode 100644 index 815a87eede5..00000000000 --- a/mysql-test/r/rpl_trigger.result +++ /dev/null @@ -1,973 +0,0 @@ -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; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; -create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null); -create table t2 (a int auto_increment, primary key (a), b int); -create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null); -create trigger t1 before insert on t1 for each row -begin -insert into t3 values (NULL, "t1", new.a, new.b, rand()); -end| -create trigger t2 after insert on t2 for each row -begin -insert into t3 values (NULL, "t2", new.a, new.b, rand()); -end| -insert into t3 values(100,"log",0,0,0); -SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186; -insert into t1 values(1,1,rand()),(NULL,2,rand()); -insert into t2 (b) values(last_insert_id()); -insert into t2 values(3,0),(NULL,0); -insert into t2 values(NULL,0),(500,0); -select a,b, truncate(rand_value,4) from t1; -a b truncate(rand_value,4) -1 1 0.4320 -2 2 0.3055 -select * from t2; -a b -1 2 -3 0 -4 0 -5 0 -500 0 -select a,name, old_a, old_b, truncate(rand_value,4) from t3; -a name old_a old_b truncate(rand_value,4) -100 log 0 0 0.0000 -101 t1 1 1 0.3203 -102 t1 0 2 0.5666 -103 t2 1 2 0.9164 -104 t2 3 0 0.8826 -105 t2 4 0 0.6635 -106 t2 5 0 0.6699 -107 t2 500 0 0.3593 - ---- On slave -- -select a,b, truncate(rand_value,4) from t1; -a b truncate(rand_value,4) -1 1 0.4320 -2 2 0.3055 -select * from t2; -a b -1 2 -3 0 -4 0 -5 0 -500 0 -select a,name, old_a, old_b, truncate(rand_value,4) from t3; -a name old_a old_b truncate(rand_value,4) -100 log 0 0 0.0000 -101 t1 1 1 0.3203 -102 t1 0 2 0.5666 -103 t2 1 2 0.9164 -104 t2 3 0 0.8826 -105 t2 4 0 0.6635 -106 t2 5 0 0.6699 -107 t2 500 0 0.3593 -drop table t1,t2,t3; -select get_lock("bug12480",2); -get_lock("bug12480",2) -1 -create table t1 (a datetime,b datetime, c datetime); -drop function if exists bug12480; -create function bug12480() returns datetime -begin -set @a=get_lock("bug12480",2); -return now(); -end| -create trigger t1_first before insert on t1 -for each row begin -set @a=get_lock("bug12480",2); -set new.b= now(); -set new.c= bug12480(); -end -| -insert into t1 set a = now(); -select a=b && a=c from t1; -a=b && a=c -1 -SELECT routine_name, definer -FROM information_schema.routines; -routine_name definer -bug12480 root@localhost -SELECT trigger_name, definer -FROM information_schema.triggers; -trigger_name definer -t1_first root@localhost - ---- On slave -- -SELECT routine_name, definer -FROM information_schema.routines; -routine_name definer -bug12480 root@localhost -SELECT trigger_name, definer -FROM information_schema.triggers; -trigger_name definer -t1_first root@localhost -select a=b && a=c from t1; -a=b && a=c -1 -test -1 -truncate table t1; -drop trigger t1_first; -insert into t1 values ("2003-03-03","2003-03-03","2003-03-03"),(bug12480(),bug12480(),bug12480()),(now(),now(),now()); -select a=b && a=c from t1; -a=b && a=c -1 -1 -1 -drop function bug12480; -drop table t1; -create table t1 (i int); -create table t2 (i int); -create trigger tr1 before insert on t1 for each row -begin -insert into t2 values (1); -end| -create database other; -use other; -insert into test.t1 values (1); -use test; -drop table t1,t2; -drop database other; -test case for BUG#13227 -------------------- -10 -------------------- -drop table if exists t110; -drop table if exists t210,t310; -create table t110 (f1 int) /* 2 replicate */; -insert into t110 values (-5); -insert into t110 values (-4); -insert into t110 values (-3); -insert into t110 values (-2); -insert into t110 values (-1); -select * from t110; -f1 --5 --4 --3 --2 --1 -create trigger trg110 before update on t110 /* slave local */ -for each row -begin -DECLARE r integer; -SELECT f2 INTO r FROM t210 where f1=NEW.f1; -INSERT INTO t310 values (r); -end| -create table t210 (f1 int, f2 int) /* slave local */; -create table t310 (f3 int) /* slave local */; -insert into t210 values (5, 5*100); -insert into t210 values (4, 4*100); -insert into t210 values (3, 3*100); -insert into t210 values (2, 2*100); -insert into t210 values (1, 1*100); -select * from t210; -f1 f2 -5 500 -4 400 -3 300 -2 200 -1 100 -UPDATE t110 SET f1=5 where f1=-5; -SELECT * from t110 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; -f1 -5 --4 --3 --2 --1 -SELECT * from t310 /* must be f3 5*100 */; -f3 -500 -UPDATE t110 SET f1=5 where f1=-5; -UPDATE t110 SET f1=4 where f1=-4; -UPDATE t110 SET f1=3 where f1=-3; -UPDATE t110 SET f1=2 where f1=-2; -UPDATE t110 SET f1=1 where f1=-1; -SELECT * from t110 /* must be f1 5 ... 1 */; -f1 -5 -4 -3 -2 -1 -SELECT * from t310 /* must be f3 5 * 100 ... 100 */; -f3 -500 -400 -300 -200 -100 -drop trigger trg110; -drop table t210,t310; -drop table t110; -------------------- -9 -------------------- -drop table if exists t19; -drop table if exists t29,t39; -create table t19 (f1 int) /* 2 replicate */; -insert into t19 values (-5); -insert into t19 values (-4); -insert into t19 values (-3); -insert into t19 values (-2); -insert into t19 values (-1); -select * from t19; -f1 --5 --4 --3 --2 --1 -create trigger trg19 before update on t19 /* slave local */ -for each row -begin -DECLARE r integer; -SELECT f2 INTO r FROM t29 where f1=NEW.f1; -INSERT INTO t39 values (r); -end| -create table t29 (f1 int, f2 int) /* slave local */; -create table t39 (f3 int) /* slave local */; -insert into t29 values (5, 5*100); -insert into t29 values (4, 4*100); -insert into t29 values (3, 3*100); -insert into t29 values (2, 2*100); -insert into t29 values (1, 1*100); -select * from t29; -f1 f2 -5 500 -4 400 -3 300 -2 200 -1 100 -UPDATE t19 SET f1=5 where f1=-5; -SELECT * from t19 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; -f1 -5 --4 --3 --2 --1 -SELECT * from t39 /* must be f3 5*100 */; -f3 -500 -UPDATE t19 SET f1=5 where f1=-5; -UPDATE t19 SET f1=4 where f1=-4; -UPDATE t19 SET f1=3 where f1=-3; -UPDATE t19 SET f1=2 where f1=-2; -UPDATE t19 SET f1=1 where f1=-1; -SELECT * from t19 /* must be f1 5 ... 1 */; -f1 -5 -4 -3 -2 -1 -SELECT * from t39 /* must be f3 5 * 100 ... 100 */; -f3 -500 -400 -300 -200 -100 -drop trigger trg19; -drop table t29,t39; -drop table t19; -------------------- -8 -------------------- -drop table if exists t18; -drop table if exists t28,t38; -create table t18 (f1 int) /* 2 replicate */; -insert into t18 values (-5); -insert into t18 values (-4); -insert into t18 values (-3); -insert into t18 values (-2); -insert into t18 values (-1); -select * from t18; -f1 --5 --4 --3 --2 --1 -create trigger trg18 before update on t18 /* slave local */ -for each row -begin -DECLARE r integer; -SELECT f2 INTO r FROM t28 where f1=NEW.f1; -INSERT INTO t38 values (r); -end| -create table t28 (f1 int, f2 int) /* slave local */; -create table t38 (f3 int) /* slave local */; -insert into t28 values (5, 5*100); -insert into t28 values (4, 4*100); -insert into t28 values (3, 3*100); -insert into t28 values (2, 2*100); -insert into t28 values (1, 1*100); -select * from t28; -f1 f2 -5 500 -4 400 -3 300 -2 200 -1 100 -UPDATE t18 SET f1=5 where f1=-5; -SELECT * from t18 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; -f1 -5 --4 --3 --2 --1 -SELECT * from t38 /* must be f3 5*100 */; -f3 -500 -UPDATE t18 SET f1=5 where f1=-5; -UPDATE t18 SET f1=4 where f1=-4; -UPDATE t18 SET f1=3 where f1=-3; -UPDATE t18 SET f1=2 where f1=-2; -UPDATE t18 SET f1=1 where f1=-1; -SELECT * from t18 /* must be f1 5 ... 1 */; -f1 -5 -4 -3 -2 -1 -SELECT * from t38 /* must be f3 5 * 100 ... 100 */; -f3 -500 -400 -300 -200 -100 -drop trigger trg18; -drop table t28,t38; -drop table t18; -------------------- -7 -------------------- -drop table if exists t17; -drop table if exists t27,t37; -create table t17 (f1 int) /* 2 replicate */; -insert into t17 values (-5); -insert into t17 values (-4); -insert into t17 values (-3); -insert into t17 values (-2); -insert into t17 values (-1); -select * from t17; -f1 --5 --4 --3 --2 --1 -create trigger trg17 before update on t17 /* slave local */ -for each row -begin -DECLARE r integer; -SELECT f2 INTO r FROM t27 where f1=NEW.f1; -INSERT INTO t37 values (r); -end| -create table t27 (f1 int, f2 int) /* slave local */; -create table t37 (f3 int) /* slave local */; -insert into t27 values (5, 5*100); -insert into t27 values (4, 4*100); -insert into t27 values (3, 3*100); -insert into t27 values (2, 2*100); -insert into t27 values (1, 1*100); -select * from t27; -f1 f2 -5 500 -4 400 -3 300 -2 200 -1 100 -UPDATE t17 SET f1=5 where f1=-5; -SELECT * from t17 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; -f1 -5 --4 --3 --2 --1 -SELECT * from t37 /* must be f3 5*100 */; -f3 -500 -UPDATE t17 SET f1=5 where f1=-5; -UPDATE t17 SET f1=4 where f1=-4; -UPDATE t17 SET f1=3 where f1=-3; -UPDATE t17 SET f1=2 where f1=-2; -UPDATE t17 SET f1=1 where f1=-1; -SELECT * from t17 /* must be f1 5 ... 1 */; -f1 -5 -4 -3 -2 -1 -SELECT * from t37 /* must be f3 5 * 100 ... 100 */; -f3 -500 -400 -300 -200 -100 -drop trigger trg17; -drop table t27,t37; -drop table t17; -------------------- -6 -------------------- -drop table if exists t16; -drop table if exists t26,t36; -create table t16 (f1 int) /* 2 replicate */; -insert into t16 values (-5); -insert into t16 values (-4); -insert into t16 values (-3); -insert into t16 values (-2); -insert into t16 values (-1); -select * from t16; -f1 --5 --4 --3 --2 --1 -create trigger trg16 before update on t16 /* slave local */ -for each row -begin -DECLARE r integer; -SELECT f2 INTO r FROM t26 where f1=NEW.f1; -INSERT INTO t36 values (r); -end| -create table t26 (f1 int, f2 int) /* slave local */; -create table t36 (f3 int) /* slave local */; -insert into t26 values (5, 5*100); -insert into t26 values (4, 4*100); -insert into t26 values (3, 3*100); -insert into t26 values (2, 2*100); -insert into t26 values (1, 1*100); -select * from t26; -f1 f2 -5 500 -4 400 -3 300 -2 200 -1 100 -UPDATE t16 SET f1=5 where f1=-5; -SELECT * from t16 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; -f1 -5 --4 --3 --2 --1 -SELECT * from t36 /* must be f3 5*100 */; -f3 -500 -UPDATE t16 SET f1=5 where f1=-5; -UPDATE t16 SET f1=4 where f1=-4; -UPDATE t16 SET f1=3 where f1=-3; -UPDATE t16 SET f1=2 where f1=-2; -UPDATE t16 SET f1=1 where f1=-1; -SELECT * from t16 /* must be f1 5 ... 1 */; -f1 -5 -4 -3 -2 -1 -SELECT * from t36 /* must be f3 5 * 100 ... 100 */; -f3 -500 -400 -300 -200 -100 -drop trigger trg16; -drop table t26,t36; -drop table t16; -------------------- -5 -------------------- -drop table if exists t15; -drop table if exists t25,t35; -create table t15 (f1 int) /* 2 replicate */; -insert into t15 values (-5); -insert into t15 values (-4); -insert into t15 values (-3); -insert into t15 values (-2); -insert into t15 values (-1); -select * from t15; -f1 --5 --4 --3 --2 --1 -create trigger trg15 before update on t15 /* slave local */ -for each row -begin -DECLARE r integer; -SELECT f2 INTO r FROM t25 where f1=NEW.f1; -INSERT INTO t35 values (r); -end| -create table t25 (f1 int, f2 int) /* slave local */; -create table t35 (f3 int) /* slave local */; -insert into t25 values (5, 5*100); -insert into t25 values (4, 4*100); -insert into t25 values (3, 3*100); -insert into t25 values (2, 2*100); -insert into t25 values (1, 1*100); -select * from t25; -f1 f2 -5 500 -4 400 -3 300 -2 200 -1 100 -UPDATE t15 SET f1=5 where f1=-5; -SELECT * from t15 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; -f1 -5 --4 --3 --2 --1 -SELECT * from t35 /* must be f3 5*100 */; -f3 -500 -UPDATE t15 SET f1=5 where f1=-5; -UPDATE t15 SET f1=4 where f1=-4; -UPDATE t15 SET f1=3 where f1=-3; -UPDATE t15 SET f1=2 where f1=-2; -UPDATE t15 SET f1=1 where f1=-1; -SELECT * from t15 /* must be f1 5 ... 1 */; -f1 -5 -4 -3 -2 -1 -SELECT * from t35 /* must be f3 5 * 100 ... 100 */; -f3 -500 -400 -300 -200 -100 -drop trigger trg15; -drop table t25,t35; -drop table t15; -------------------- -4 -------------------- -drop table if exists t14; -drop table if exists t24,t34; -create table t14 (f1 int) /* 2 replicate */; -insert into t14 values (-5); -insert into t14 values (-4); -insert into t14 values (-3); -insert into t14 values (-2); -insert into t14 values (-1); -select * from t14; -f1 --5 --4 --3 --2 --1 -create trigger trg14 before update on t14 /* slave local */ -for each row -begin -DECLARE r integer; -SELECT f2 INTO r FROM t24 where f1=NEW.f1; -INSERT INTO t34 values (r); -end| -create table t24 (f1 int, f2 int) /* slave local */; -create table t34 (f3 int) /* slave local */; -insert into t24 values (5, 5*100); -insert into t24 values (4, 4*100); -insert into t24 values (3, 3*100); -insert into t24 values (2, 2*100); -insert into t24 values (1, 1*100); -select * from t24; -f1 f2 -5 500 -4 400 -3 300 -2 200 -1 100 -UPDATE t14 SET f1=5 where f1=-5; -SELECT * from t14 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; -f1 -5 --4 --3 --2 --1 -SELECT * from t34 /* must be f3 5*100 */; -f3 -500 -UPDATE t14 SET f1=5 where f1=-5; -UPDATE t14 SET f1=4 where f1=-4; -UPDATE t14 SET f1=3 where f1=-3; -UPDATE t14 SET f1=2 where f1=-2; -UPDATE t14 SET f1=1 where f1=-1; -SELECT * from t14 /* must be f1 5 ... 1 */; -f1 -5 -4 -3 -2 -1 -SELECT * from t34 /* must be f3 5 * 100 ... 100 */; -f3 -500 -400 -300 -200 -100 -drop trigger trg14; -drop table t24,t34; -drop table t14; -------------------- -3 -------------------- -drop table if exists t13; -drop table if exists t23,t33; -create table t13 (f1 int) /* 2 replicate */; -insert into t13 values (-5); -insert into t13 values (-4); -insert into t13 values (-3); -insert into t13 values (-2); -insert into t13 values (-1); -select * from t13; -f1 --5 --4 --3 --2 --1 -create trigger trg13 before update on t13 /* slave local */ -for each row -begin -DECLARE r integer; -SELECT f2 INTO r FROM t23 where f1=NEW.f1; -INSERT INTO t33 values (r); -end| -create table t23 (f1 int, f2 int) /* slave local */; -create table t33 (f3 int) /* slave local */; -insert into t23 values (5, 5*100); -insert into t23 values (4, 4*100); -insert into t23 values (3, 3*100); -insert into t23 values (2, 2*100); -insert into t23 values (1, 1*100); -select * from t23; -f1 f2 -5 500 -4 400 -3 300 -2 200 -1 100 -UPDATE t13 SET f1=5 where f1=-5; -SELECT * from t13 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; -f1 -5 --4 --3 --2 --1 -SELECT * from t33 /* must be f3 5*100 */; -f3 -500 -UPDATE t13 SET f1=5 where f1=-5; -UPDATE t13 SET f1=4 where f1=-4; -UPDATE t13 SET f1=3 where f1=-3; -UPDATE t13 SET f1=2 where f1=-2; -UPDATE t13 SET f1=1 where f1=-1; -SELECT * from t13 /* must be f1 5 ... 1 */; -f1 -5 -4 -3 -2 -1 -SELECT * from t33 /* must be f3 5 * 100 ... 100 */; -f3 -500 -400 -300 -200 -100 -drop trigger trg13; -drop table t23,t33; -drop table t13; -------------------- -2 -------------------- -drop table if exists t12; -drop table if exists t22,t32; -create table t12 (f1 int) /* 2 replicate */; -insert into t12 values (-5); -insert into t12 values (-4); -insert into t12 values (-3); -insert into t12 values (-2); -insert into t12 values (-1); -select * from t12; -f1 --5 --4 --3 --2 --1 -create trigger trg12 before update on t12 /* slave local */ -for each row -begin -DECLARE r integer; -SELECT f2 INTO r FROM t22 where f1=NEW.f1; -INSERT INTO t32 values (r); -end| -create table t22 (f1 int, f2 int) /* slave local */; -create table t32 (f3 int) /* slave local */; -insert into t22 values (5, 5*100); -insert into t22 values (4, 4*100); -insert into t22 values (3, 3*100); -insert into t22 values (2, 2*100); -insert into t22 values (1, 1*100); -select * from t22; -f1 f2 -5 500 -4 400 -3 300 -2 200 -1 100 -UPDATE t12 SET f1=5 where f1=-5; -SELECT * from t12 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; -f1 -5 --4 --3 --2 --1 -SELECT * from t32 /* must be f3 5*100 */; -f3 -500 -UPDATE t12 SET f1=5 where f1=-5; -UPDATE t12 SET f1=4 where f1=-4; -UPDATE t12 SET f1=3 where f1=-3; -UPDATE t12 SET f1=2 where f1=-2; -UPDATE t12 SET f1=1 where f1=-1; -SELECT * from t12 /* must be f1 5 ... 1 */; -f1 -5 -4 -3 -2 -1 -SELECT * from t32 /* must be f3 5 * 100 ... 100 */; -f3 -500 -400 -300 -200 -100 -drop trigger trg12; -drop table t22,t32; -drop table t12; -------------------- -1 -------------------- -drop table if exists t11; -drop table if exists t21,t31; -create table t11 (f1 int) /* 2 replicate */; -insert into t11 values (-5); -insert into t11 values (-4); -insert into t11 values (-3); -insert into t11 values (-2); -insert into t11 values (-1); -select * from t11; -f1 --5 --4 --3 --2 --1 -create trigger trg11 before update on t11 /* slave local */ -for each row -begin -DECLARE r integer; -SELECT f2 INTO r FROM t21 where f1=NEW.f1; -INSERT INTO t31 values (r); -end| -create table t21 (f1 int, f2 int) /* slave local */; -create table t31 (f3 int) /* slave local */; -insert into t21 values (5, 5*100); -insert into t21 values (4, 4*100); -insert into t21 values (3, 3*100); -insert into t21 values (2, 2*100); -insert into t21 values (1, 1*100); -select * from t21; -f1 f2 -5 500 -4 400 -3 300 -2 200 -1 100 -UPDATE t11 SET f1=5 where f1=-5; -SELECT * from t11 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; -f1 -5 --4 --3 --2 --1 -SELECT * from t31 /* must be f3 5*100 */; -f3 -500 -UPDATE t11 SET f1=5 where f1=-5; -UPDATE t11 SET f1=4 where f1=-4; -UPDATE t11 SET f1=3 where f1=-3; -UPDATE t11 SET f1=2 where f1=-2; -UPDATE t11 SET f1=1 where f1=-1; -SELECT * from t11 /* must be f1 5 ... 1 */; -f1 -5 -4 -3 -2 -1 -SELECT * from t31 /* must be f3 5 * 100 ... 100 */; -f3 -500 -400 -300 -200 -100 -drop trigger trg11; -drop table t21,t31; -drop table t11; -STOP SLAVE; -FLUSH LOGS; -RESET SLAVE; -START SLAVE; -SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0; -MASTER_POS_WAIT('master-bin.000001', 513) >= 0 -1 -SHOW TABLES LIKE 't_'; -Tables_in_test (t_) -t1 -t2 -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer -trg1 INSERT t1 INSERT INTO t2 VALUES(CURRENT_USER()) AFTER NULL -SELECT * FROM t1; -c -1 -SELECT * FROM t2; -s -@ -INSERT INTO t1 VALUES(2); -SELECT * FROM t1; -c -1 -2 -SELECT * FROM t2; -s -@ -root@localhost -DROP TRIGGER trg1; -Warnings: -Warning 1454 No definer attribute for trigger 'test'.'trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger. -DROP TABLE t1; -DROP TABLE t2; -STOP SLAVE; -RESET SLAVE; -SHOW TABLES LIKE 't_'; -Tables_in_test (t_) -SHOW TRIGGERS; -Trigger Event Table Statement Timing Created sql_mode Definer -RESET MASTER; -START SLAVE; - ----> Test for BUG#20438 - ----> Preparing environment... ----> connection: master -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; - ----> Synchronizing slave with master... - ----> connection: master - ----> Creating objects... -CREATE TABLE t1(c INT); -CREATE TABLE t2(c INT); -/*!50003 CREATE TRIGGER t1_bi BEFORE INSERT ON t1 -FOR EACH ROW -INSERT INTO t2 VALUES(NEW.c * 10) */; - ----> Inserting value... -INSERT INTO t1 VALUES(1); - ----> Checking on master... -SELECT * FROM t1; -c -1 -SELECT * FROM t2; -c -10 - ----> Synchronizing slave with master... ----> connection: master - ----> Checking on slave... -SELECT * FROM t1; -c -1 -SELECT * FROM t2; -c -10 - ----> connection: master - ----> Cleaning up... -DROP TABLE t1; -DROP TABLE t2; -drop table if exists t1; -create table t1(a int, b varchar(50)); -drop trigger not_a_trigger; -ERROR HY000: Trigger does not exist -drop trigger if exists not_a_trigger; -Warnings: -Note 1360 Trigger does not exist -create trigger t1_bi before insert on t1 -for each row set NEW.b := "In trigger t1_bi"; -insert into t1 values (1, "a"); -drop trigger if exists t1_bi; -insert into t1 values (2, "b"); -drop trigger if exists t1_bi; -Warnings: -Note 1360 Trigger does not exist -insert into t1 values (3, "c"); -select * from t1; -a b -1 In trigger t1_bi -2 b -3 c -select * from t1; -a b -1 In trigger t1_bi -2 b -3 c -drop table t1; diff --git a/mysql-test/r/rpl_trunc_temp.result b/mysql-test/r/rpl_trunc_temp.result deleted file mode 100644 index 44624a38875..00000000000 --- a/mysql-test/r/rpl_trunc_temp.result +++ /dev/null @@ -1,22 +0,0 @@ -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; -create temporary table t1 (n int); -insert into t1 values(1); -show status like 'Slave_open_temp_tables'; -Variable_name Value -Slave_open_temp_tables 1 -delete from t1; -show status like 'Slave_open_temp_tables'; -Variable_name Value -Slave_open_temp_tables 1 -truncate t1; -show status like 'Slave_open_temp_tables'; -Variable_name Value -Slave_open_temp_tables 1 -show status like 'Slave_open_temp_tables'; -Variable_name Value -Slave_open_temp_tables 0 diff --git a/mysql-test/r/rpl_truncate_2myisam.result b/mysql-test/r/rpl_truncate_2myisam.result deleted file mode 100644 index c7ef28ba56b..00000000000 --- a/mysql-test/r/rpl_truncate_2myisam.result +++ /dev/null @@ -1,196 +0,0 @@ -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; -**** On Master **** -SET SESSION BINLOG_FORMAT=STATEMENT; -SET GLOBAL BINLOG_FORMAT=STATEMENT; -CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 -master-bin.000001 # Query # # use `test`; DROP TABLE t1 -**** On Master **** -SET SESSION BINLOG_FORMAT=MIXED; -SET GLOBAL BINLOG_FORMAT=MIXED; -CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 -master-bin.000001 # Query # # use `test`; DROP TABLE t1 -**** On Master **** -SET SESSION BINLOG_FORMAT=ROW; -SET GLOBAL BINLOG_FORMAT=ROW; -CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 -master-bin.000001 # Query # # use `test`; DROP TABLE t1 -**** On Master **** -SET SESSION BINLOG_FORMAT=STATEMENT; -SET GLOBAL BINLOG_FORMAT=STATEMENT; -CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -master-bin.000001 # Query # # use `test`; DELETE FROM t1 -master-bin.000001 # Query # # use `test`; DROP TABLE t1 -**** On Master **** -SET SESSION BINLOG_FORMAT=MIXED; -SET GLOBAL BINLOG_FORMAT=MIXED; -CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -master-bin.000001 # Query # # use `test`; DELETE FROM t1 -master-bin.000001 # Query # # use `test`; DROP TABLE t1 -**** On Master **** -SET SESSION BINLOG_FORMAT=ROW; -SET GLOBAL BINLOG_FORMAT=ROW; -CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -3 3 -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; DROP TABLE t1 diff --git a/mysql-test/r/rpl_truncate_3innodb.result b/mysql-test/r/rpl_truncate_3innodb.result deleted file mode 100644 index 7ce48c2e983..00000000000 --- a/mysql-test/r/rpl_truncate_3innodb.result +++ /dev/null @@ -1,208 +0,0 @@ -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; -**** On Master **** -SET SESSION BINLOG_FORMAT=STATEMENT; -SET GLOBAL BINLOG_FORMAT=STATEMENT; -CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; DROP TABLE t1 -**** On Master **** -SET SESSION BINLOG_FORMAT=MIXED; -SET GLOBAL BINLOG_FORMAT=MIXED; -CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; DROP TABLE t1 -**** On Master **** -SET SESSION BINLOG_FORMAT=ROW; -SET GLOBAL BINLOG_FORMAT=ROW; -CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; DROP TABLE t1 -**** On Master **** -SET SESSION BINLOG_FORMAT=STATEMENT; -SET GLOBAL BINLOG_FORMAT=STATEMENT; -CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; DELETE FROM t1 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; DROP TABLE t1 -**** On Master **** -SET SESSION BINLOG_FORMAT=MIXED; -SET GLOBAL BINLOG_FORMAT=MIXED; -CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; DELETE FROM t1 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; DROP TABLE t1 -**** On Master **** -SET SESSION BINLOG_FORMAT=ROW; -SET GLOBAL BINLOG_FORMAT=ROW; -CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1; -a b -**** On Slave **** -SELECT * FROM t1; -a b -3 3 -**** On Master **** -DROP TABLE t1; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; DROP TABLE t1 diff --git a/mysql-test/r/rpl_truncate_7ndb.result b/mysql-test/r/rpl_truncate_7ndb.result deleted file mode 100644 index 62ace911e45..00000000000 --- a/mysql-test/r/rpl_truncate_7ndb.result +++ /dev/null @@ -1,95 +0,0 @@ -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; -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Master **** -DROP TABLE t1; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 223 Query 1 287 BEGIN -master-bin.000001 287 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 327 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 385 Write_rows 1 157 table_id: # -master-bin.000001 444 Write_rows 1 195 table_id: # -master-bin.000001 482 Write_rows 1 233 table_id: # flags: STMT_END_F -master-bin.000001 520 Query 1 585 COMMIT -master-bin.000001 585 Query 1 665 use `test`; TRUNCATE TABLE t1 -master-bin.000001 665 Query 1 741 use `test`; DROP TABLE t1 -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -3 3 -**** On Master **** -DROP TABLE t1; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 223 Query 1 287 BEGIN -master-bin.000001 287 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 327 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 385 Write_rows 1 157 table_id: # -master-bin.000001 444 Write_rows 1 195 table_id: # -master-bin.000001 482 Write_rows 1 233 table_id: # flags: STMT_END_F -master-bin.000001 520 Query 1 585 COMMIT -master-bin.000001 585 Query 1 665 use `test`; TRUNCATE TABLE t1 -master-bin.000001 665 Query 1 741 use `test`; DROP TABLE t1 -master-bin.000001 741 Query 1 858 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 858 Query 1 922 BEGIN -master-bin.000001 922 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 962 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1020 Write_rows 1 157 table_id: # -master-bin.000001 1079 Write_rows 1 195 table_id: # -master-bin.000001 1117 Write_rows 1 233 table_id: # flags: STMT_END_F -master-bin.000001 1155 Query 1 1220 COMMIT -master-bin.000001 1220 Query 1 1284 BEGIN -master-bin.000001 1284 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 1324 Table_map 1 98 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1382 Write_rows 1 157 table_id: # -master-bin.000001 1441 Delete_rows 1 191 table_id: # -master-bin.000001 1475 Delete_rows 1 225 table_id: # flags: STMT_END_F -master-bin.000001 1509 Query 1 1574 COMMIT -master-bin.000001 1574 Query 1 1650 use `test`; DROP TABLE t1 diff --git a/mysql-test/r/rpl_truncate_7ndb_2.result b/mysql-test/r/rpl_truncate_7ndb_2.result deleted file mode 100644 index ca323e193fa..00000000000 --- a/mysql-test/r/rpl_truncate_7ndb_2.result +++ /dev/null @@ -1,91 +0,0 @@ -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; -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Master **** -DROP TABLE t1; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 219 Query 1 283 BEGIN -master-bin.000001 283 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 323 Table_map 1 93 table_id: # (mysql.apply_status) -master-bin.000001 376 Write_rows 1 135 table_id: # -master-bin.000001 418 Write_rows 1 182 table_id: # flags: STMT_END_F -master-bin.000001 465 Query 1 530 COMMIT -master-bin.000001 530 Query 1 610 use `test`; TRUNCATE TABLE t1 -master-bin.000001 610 Query 1 686 use `test`; DROP TABLE t1 -**** On Master **** -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -**** On Slave **** -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; -a b -1 1 -2 2 -3 3 -**** On Master **** -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; -a b -**** On Slave **** -SELECT * FROM t1 ORDER BY a,b; -a b -3 3 -**** On Master **** -DROP TABLE t1; -SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 219 Query 1 283 BEGIN -master-bin.000001 283 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 323 Table_map 1 93 table_id: # (mysql.apply_status) -master-bin.000001 376 Write_rows 1 135 table_id: # -master-bin.000001 418 Write_rows 1 182 table_id: # flags: STMT_END_F -master-bin.000001 465 Query 1 530 COMMIT -master-bin.000001 530 Query 1 610 use `test`; TRUNCATE TABLE t1 -master-bin.000001 610 Query 1 686 use `test`; DROP TABLE t1 -master-bin.000001 686 Query 1 803 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 803 Query 1 867 BEGIN -master-bin.000001 867 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 907 Table_map 1 93 table_id: # (mysql.apply_status) -master-bin.000001 960 Write_rows 1 135 table_id: # -master-bin.000001 1002 Write_rows 1 182 table_id: # flags: STMT_END_F -master-bin.000001 1049 Query 1 1114 COMMIT -master-bin.000001 1114 Query 1 1178 BEGIN -master-bin.000001 1178 Table_map 1 40 table_id: # (test.t1) -master-bin.000001 1218 Table_map 1 93 table_id: # (mysql.apply_status) -master-bin.000001 1271 Write_rows 1 135 table_id: # -master-bin.000001 1313 Delete_rows 1 174 table_id: # flags: STMT_END_F -master-bin.000001 1352 Query 1 1417 COMMIT -master-bin.000001 1417 Query 1 1493 use `test`; DROP TABLE t1 diff --git a/mysql-test/r/rpl_udf.result b/mysql-test/r/rpl_udf.result deleted file mode 100644 index 6587632bca0..00000000000 --- a/mysql-test/r/rpl_udf.result +++ /dev/null @@ -1,310 +0,0 @@ -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 binlog_format=row; -drop table if exists t1; -"*** Test 1) Test UDFs via loadable libraries *** -"Running on the master" -CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB"; -affected rows: 0 -CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; -affected rows: 0 -CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; -ERROR HY000: Can't find symbol 'myfunc_nonexist' in library -SELECT * FROM mysql.func; -name ret dl type -myfunc_double 1 UDF_LIB function -myfunc_int 2 UDF_LIB function -affected rows: 2 -"Running on the slave" -SELECT * FROM mysql.func; -name ret dl type -myfunc_double 1 UDF_LIB function -myfunc_int 2 UDF_LIB function -affected rows: 2 -"Running on the master" -CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; -affected rows: 0 -INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00)); -affected rows: 1 -SELECT * FROM t1 ORDER BY sum; -sum price -1 48.5 -10 48.75 -100 48.6 -200 49 -affected rows: 4 -"Running on the slave" -SELECT * FROM t1 ORDER BY sum; -sum price -1 48.5 -10 48.75 -100 48.6 -200 49 -affected rows: 4 -SELECT myfunc_int(25); -myfunc_int(25) -25 -affected rows: 1 -SELECT myfunc_double(75.00); -myfunc_double(75.00) -50.00 -affected rows: 1 -"Running on the master" -DROP FUNCTION myfunc_double; -affected rows: 0 -DROP FUNCTION myfunc_int; -affected rows: 0 -SELECT * FROM mysql.func; -name ret dl type -affected rows: 0 -"Running on the slave" -SELECT * FROM mysql.func; -name ret dl type -affected rows: 0 -"Running on the master" -DROP TABLE t1; -affected rows: 0 -"*** Test 2) Test UDFs with SQL body *** -"Running on the master" -CREATE FUNCTION myfuncsql_int(i INT) RETURNS INTEGER DETERMINISTIC RETURN i; -affected rows: 0 -CREATE FUNCTION myfuncsql_double(d DOUBLE) RETURNS INTEGER DETERMINISTIC RETURN d * 2.00; -affected rows: 0 -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 -test myfuncsql_int FUNCTION i INT RETURN i -affected rows: 2 -"Running on the slave" -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 -test myfuncsql_int FUNCTION i INT RETURN i -affected rows: 2 -"Running on the master" -CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; -affected rows: 0 -INSERT INTO t1 VALUES(myfuncsql_int(100), myfuncsql_double(50.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfuncsql_int(10), myfuncsql_double(5.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfuncsql_int(200), myfuncsql_double(25.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfuncsql_int(1), myfuncsql_double(500.00)); -affected rows: 1 -SELECT * FROM t1 ORDER BY sum; -sum price -1 1000 -10 10 -100 100 -200 50 -affected rows: 4 -"Running on the slave" -SELECT * FROM t1 ORDER BY sum; -sum price -1 1000 -10 10 -100 100 -200 50 -affected rows: 4 -"Running on the master" -ALTER FUNCTION myfuncsql_int COMMENT "This was altered."; -affected rows: 0 -ALTER FUNCTION myfuncsql_double COMMENT "This was altered."; -affected rows: 0 -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. -test myfuncsql_int FUNCTION i INT RETURN i This was altered. -affected rows: 2 -"Running on the slave" -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. -test myfuncsql_int FUNCTION i INT RETURN i This was altered. -affected rows: 2 -SELECT myfuncsql_int(25); -myfuncsql_int(25) -25 -affected rows: 1 -SELECT myfuncsql_double(75.00); -myfuncsql_double(75.00) -150 -affected rows: 1 -"Running on the master" -DROP FUNCTION myfuncsql_double; -affected rows: 0 -DROP FUNCTION myfuncsql_int; -affected rows: 0 -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -affected rows: 0 -"Running on the slave" -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -affected rows: 0 -"Running on the master" -DROP TABLE t1; -affected rows: 0 -set binlog_format=statement; -drop table if exists t1; -"*** Test 1) Test UDFs via loadable libraries *** -"Running on the master" -CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB"; -affected rows: 0 -CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; -affected rows: 0 -CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; -ERROR HY000: Can't find symbol 'myfunc_nonexist' in library -SELECT * FROM mysql.func; -name ret dl type -myfunc_int 2 UDF_LIB function -myfunc_double 1 UDF_LIB function -affected rows: 2 -"Running on the slave" -SELECT * FROM mysql.func; -name ret dl type -myfunc_int 2 UDF_LIB function -myfunc_double 1 UDF_LIB function -affected rows: 2 -"Running on the master" -CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; -affected rows: 0 -INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00)); -affected rows: 1 -SELECT * FROM t1 ORDER BY sum; -sum price -1 48.5 -10 48.75 -100 48.6 -200 49 -affected rows: 4 -"Running on the slave" -SELECT * FROM t1 ORDER BY sum; -sum price -1 48.5 -10 48.75 -100 48.6 -200 49 -affected rows: 4 -SELECT myfunc_int(25); -myfunc_int(25) -25 -affected rows: 1 -SELECT myfunc_double(75.00); -myfunc_double(75.00) -50.00 -affected rows: 1 -"Running on the master" -DROP FUNCTION myfunc_double; -affected rows: 0 -DROP FUNCTION myfunc_int; -affected rows: 0 -SELECT * FROM mysql.func; -name ret dl type -affected rows: 0 -"Running on the slave" -SELECT * FROM mysql.func; -name ret dl type -affected rows: 0 -"Running on the master" -DROP TABLE t1; -affected rows: 0 -"*** Test 2) Test UDFs with SQL body *** -"Running on the master" -CREATE FUNCTION myfuncsql_int(i INT) RETURNS INTEGER DETERMINISTIC RETURN i; -affected rows: 0 -CREATE FUNCTION myfuncsql_double(d DOUBLE) RETURNS INTEGER DETERMINISTIC RETURN d * 2.00; -affected rows: 0 -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 -test myfuncsql_int FUNCTION i INT RETURN i -affected rows: 2 -"Running on the slave" -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 -test myfuncsql_int FUNCTION i INT RETURN i -affected rows: 2 -"Running on the master" -CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; -affected rows: 0 -INSERT INTO t1 VALUES(myfuncsql_int(100), myfuncsql_double(50.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfuncsql_int(10), myfuncsql_double(5.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfuncsql_int(200), myfuncsql_double(25.00)); -affected rows: 1 -INSERT INTO t1 VALUES(myfuncsql_int(1), myfuncsql_double(500.00)); -affected rows: 1 -SELECT * FROM t1 ORDER BY sum; -sum price -1 1000 -10 10 -100 100 -200 50 -affected rows: 4 -"Running on the slave" -SELECT * FROM t1 ORDER BY sum; -sum price -1 1000 -10 10 -100 100 -200 50 -affected rows: 4 -"Running on the master" -ALTER FUNCTION myfuncsql_int COMMENT "This was altered."; -affected rows: 0 -ALTER FUNCTION myfuncsql_double COMMENT "This was altered."; -affected rows: 0 -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. -test myfuncsql_int FUNCTION i INT RETURN i This was altered. -affected rows: 2 -"Running on the slave" -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. -test myfuncsql_int FUNCTION i INT RETURN i This was altered. -affected rows: 2 -SELECT myfuncsql_int(25); -myfuncsql_int(25) -25 -affected rows: 1 -SELECT myfuncsql_double(75.00); -myfuncsql_double(75.00) -150 -affected rows: 1 -"Running on the master" -DROP FUNCTION myfuncsql_double; -affected rows: 0 -DROP FUNCTION myfuncsql_int; -affected rows: 0 -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -affected rows: 0 -"Running on the slave" -SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; -db name type param_list body comment -affected rows: 0 -"Running on the master" -DROP TABLE t1; -affected rows: 0 diff --git a/mysql-test/r/rpl_user_variables.result b/mysql-test/r/rpl_user_variables.result deleted file mode 100644 index d3363df3b58..00000000000 --- a/mysql-test/r/rpl_user_variables.result +++ /dev/null @@ -1,266 +0,0 @@ -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; -reset master; -create table t1(n char(30)); -set @i1:=12345678901234, @i2:=-12345678901234, @i3:=0, @i4:=-1; -set @s1:='This is a test', @r1:=12.5, @r2:=-12.5; -set @n1:=null; -set @s2:='', @s3:='abc\'def', @s4:= 'abc\\def', @s5:= 'abc''def'; -insert into t1 values (@i1), (@i2), (@i3), (@i4); -insert into t1 values (@r1), (@r2); -insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5); -insert into t1 values (@n1); -insert into t1 values (@n2); -insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1); -insert into t1 values (@a+(@b:=@a+1)); -set @q:='abc'; -insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')); -set @a:=5; -insert into t1 values (@a),(@a); -select * from t1 where n = ''; -n -insert into t1 values (@a),(@a),(@a*5); -SELECT * FROM t1 ORDER BY n; -n -NULL -NULL -NULL -NULL -NULL - --1 --12.5 --12345678901234 -0 -0 -1 -12.5 -12345678901234 -2 -5 -5 -5 -abc -abc'def -abc'def -abcn1 -abcn1n2 -abc\def -This is a test -SELECT * FROM t1 ORDER BY n; -n -NULL -NULL -NULL -NULL -NULL - --1 --12.5 --12345678901234 -0 -0 -1 -12.5 -12345678901234 -2 -5 -5 -5 -abc -abc'def -abc'def -abcn1 -abcn1n2 -abc\def -This is a test -insert into t1 select * FROM (select @var1 union select @var2) AS t2; -drop table t1; -End of 4.1 tests. -DROP TABLE IF EXISTS t20; -DROP TABLE IF EXISTS t21; -DROP PROCEDURE IF EXISTS test.insert; -CREATE TABLE t20 (a VARCHAR(20)); -CREATE TABLE t21 (a VARCHAR(20)); -CREATE PROCEDURE test.insert() -BEGIN -IF (@VAR) -THEN -INSERT INTO test.t20 VALUES ('SP_TRUE'); -ELSE -INSERT INTO test.t20 VALUES ('SP_FALSE'); -END IF; -END| -CREATE TRIGGER test.insert_bi BEFORE INSERT -ON test.t20 FOR EACH ROW -BEGIN -IF (@VAR) -THEN -INSERT INTO test.t21 VALUES ('TRIG_TRUE'); -ELSE -INSERT INTO test.t21 VALUES ('TRIG_FALSE'); -END IF; -END| -SET @VAR=0; -CALL test.insert(); -SET @VAR=1; -CALL test.insert(); -On master: Check the tables for correct data -SELECT * FROM t20; -a -SP_FALSE -SP_TRUE -SELECT * FROM t21; -a -TRIG_FALSE -TRIG_TRUE -On slave: Check the tables for correct data and it matches master -SELECT * FROM t20; -a -SP_FALSE -SP_TRUE -SELECT * FROM t21; -a -TRIG_FALSE -TRIG_TRUE -DROP TABLE t20; -DROP TABLE t21; -DROP PROCEDURE test.insert; -DROP TABLE IF EXISTS t1; -DROP FUNCTION IF EXISTS test.square; -CREATE TABLE t1 (i INT); -CREATE FUNCTION test.square() RETURNS INTEGER DETERMINISTIC RETURN -(@var * @var); -SET @var = 1; -INSERT INTO t1 VALUES (square()); -SET @var = 2; -INSERT INTO t1 VALUES (square()); -SET @var = 3; -INSERT INTO t1 VALUES (square()); -SET @var = 4; -INSERT INTO t1 VALUES (square()); -SET @var = 5; -INSERT INTO t1 VALUES (square()); -On master: Retrieve the values from the table -SELECT * FROM t1; -i -1 -4 -9 -16 -25 -On slave: Retrieve the values from the table and verify they are the same as on master -SELECT * FROM t1; -i -1 -4 -9 -16 -25 -DROP TABLE t1; -DROP FUNCTION test.square; -DROP TABLE IF EXISTS t1; -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; -CREATE TABLE t1(a int); -CREATE FUNCTION f1() returns int deterministic BEGIN -return @a; -END | -CREATE FUNCTION f2() returns int deterministic BEGIN -IF (@b > 0) then -SET @c = (@a + @b); -else -SET @c = (@a - 1); -END if; -return @c; -END | -SET @a=500; -INSERT INTO t1 values(f1()); -SET @b = 125; -SET @c = 1; -INSERT INTO t1 values(f2()); -On master: Retrieve the values from the table -SELECT * from t1; -a -500 -625 -On slave: Check the tables for correct data and it matches master -SELECT * from t1; -a -500 -625 -DROP TABLE t1; -DROP FUNCTION f1; -DROP FUNCTION f2; -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -CREATE TABLE t1 (i int); -CREATE TABLE t2 (k int); -CREATE trigger t1_bi before INSERT on t1 for each row BEGIN -INSERT INTO t2 values (@a); -SET @a:=42; -INSERT INTO t2 values (@a); -END | -SET @a:=100; -INSERT INTO t1 values (5); -On master: Check to see that data was inserted correctly in both tables -SELECT * from t1; -i -5 -SELECT * from t2; -k -100 -42 -On slave: Check the tables for correct data and it matches master -SELECT * from t1; -i -5 -SELECT * from t2; -k -100 -42 -drop table t1, t2; -create table t1(a int, b int); -prepare s1 from 'insert into t1 values (@x:=@x+1, ?)'; -set @x=1; -execute s1 using @x; -select * from t1; -a b -2 1 -select * from t1; -a b -2 1 -drop table t1; -End of 5.0 tests. -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; -CREATE TABLE t1 (i INT); -CREATE FUNCTION f1() RETURNS INT RETURN @a; -CREATE -FUNCTION f2() RETURNS INT BEGIN -INSERT INTO t1 VALUES (10 + @a); -RETURN 0; -END| -SET @a:=123; -SELECT f1(), f2(); -f1() f2() -123 0 -On master: Check to see that data was inserted correctly -INSERT INTO t1 VALUES(f1()); -SELECT * FROM t1; -i -133 -123 -On slave: Check the table for correct data and it matches master -SELECT * FROM t1; -i -133 -123 -DROP FUNCTION f1; -DROP FUNCTION f2; -DROP TABLE t1; -stop slave; diff --git a/mysql-test/r/rpl_variables.result b/mysql-test/r/rpl_variables.result deleted file mode 100644 index 605a48859a0..00000000000 --- a/mysql-test/r/rpl_variables.result +++ /dev/null @@ -1,19 +0,0 @@ -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 @my_slave_net_timeout =@@global.slave_net_timeout; -set global slave_net_timeout=100; -set global sql_slave_skip_counter=100; -show variables like 'slave_compressed_protocol'; -Variable_name Value -slave_compressed_protocol OFF -show variables like 'slave_load_tmpdir'; -Variable_name Value -slave_load_tmpdir SLAVE_LOAD_TMPDIR -show variables like 'slave_skip_errors'; -Variable_name Value -slave_skip_errors 3,100,137,643,1752 -set global slave_net_timeout=default; diff --git a/mysql-test/r/rpl_view.result b/mysql-test/r/rpl_view.result deleted file mode 100644 index 0d862a2a912..00000000000 --- a/mysql-test/r/rpl_view.result +++ /dev/null @@ -1,104 +0,0 @@ -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; -drop table if exists t1,v1; -drop view if exists t1,v1; -reset master; -create table t1 (a int); -insert into t1 values (1); -create view v1 as select a from t1; -insert into v1 values (2); -select * from v1 order by a; -a -1 -2 -select * from v1 order by a; -a -1 -2 -update v1 set a=3 where a=1; -select * from v1 order by a; -a -2 -3 -select * from v1 order by a; -a -2 -3 -delete from v1 where a=2; -select * from v1 order by a; -a -3 -select * from v1 order by a; -a -3 -alter view v1 as select a as b from t1; -select * from v1 order by 1; -b -3 -drop view v1; -select * from v1 order by a; -ERROR 42S02: Table 'test.v1' doesn't exist -drop table t1; - ----> Test for BUG#20438 - ----> Preparing environment... ----> connection: master -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; - ----> Synchronizing slave with master... - ----> connection: master - ----> Creating objects... -CREATE TABLE t1(c INT); -/*!50003 CREATE VIEW v1 AS SELECT * FROM t1 */; - ----> Inserting value... -INSERT INTO t1 VALUES(1); - ----> Checking on master... -SELECT * FROM t1; -c -1 - ----> Synchronizing slave with master... ----> connection: master - ----> Checking on slave... -SELECT * FROM t1; -c -1 - ----> connection: master - ----> Cleaning up... -DROP VIEW v1; -DROP TABLE t1; -create table t1(a int, b int); -insert into t1 values (1, 1), (1, 2), (1, 3); -create view v1(a, b) as select a, sum(b) from t1 group by a; -explain v1; -Field Type Null Key Default Extra -a int(11) YES NULL -b decimal(32,0) YES NULL -show create table v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,sum(`t1`.`b`) AS `b` from `t1` group by `t1`.`a` -select * from v1; -a b -1 6 -drop table t1; -drop view v1; -CREATE TABLE t1(a INT); -CREATE VIEW v1 AS SELECT * FROM t1; -CREATE VIEW v1 AS SELECT * FROM t1; -ERROR 42S01: Table 'v1' already exists -DROP VIEW v1; -DROP TABLE t1; -End of 5.0 tests diff --git a/mysql-test/r/strict_autoinc_5ndb.result b/mysql-test/r/strict_autoinc_5ndb.result deleted file mode 100644 index ea6e5ffc741..00000000000 --- a/mysql-test/r/strict_autoinc_5ndb.result +++ /dev/null @@ -1,28 +0,0 @@ -drop table if exists t1; -set @org_mode=@@sql_mode; -create table t1 -( -`a` tinyint(4) NOT NULL auto_increment, -primary key (`a`) -) engine = 'NDB' ; -set @@sql_mode='strict_all_tables'; -insert into t1 values(1000); -ERROR 22003: Out of range value for column 'a' at row 1 -select count(*) from t1; -count(*) -0 -set auto_increment_increment=1000; -set auto_increment_offset=700; -insert into t1 values(null); -ERROR 22003: Out of range value for column 'a' at row 1 -select count(*) from t1; -count(*) -0 -set @@sql_mode=@org_mode; -insert into t1 values(null); -Warnings: -Warning 1264 Out of range value for column 'a' at row 1 -select * from t1; -a -127 -drop table t1; diff --git a/mysql-test/suite/binlog/r/binlog_killed.result b/mysql-test/suite/binlog/r/binlog_killed.result new file mode 100644 index 00000000000..ba4f38fb4c1 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_killed.result @@ -0,0 +1,12 @@ +create table t1 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB; +create table t2 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=MyISAM; +create table t3 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB; +select get_lock("a", 20); +get_lock("a", 20) +1 +reset master; +insert into t2 values (null, null), (null, get_lock("a", 10)); +select @result /* must be zero either way */; +@result +0 +drop table t1,t2,t3; diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result new file mode 100644 index 00000000000..6fcaad010d2 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -0,0 +1,339 @@ +drop table if exists t1, t2; +reset master; +create table t1 (a int) engine=innodb; +create table t2 (a int) engine=innodb; +begin; +insert t1 values (5); +commit; +begin; +insert t2 values (5); +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb +master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +drop table t1,t2; +reset master; +create table t1 (n int) engine=innodb; +begin; +commit; +drop table t1; +show binlog events in 'master-bin.000001' from 106; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb +master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Xid 1 # COMMIT /* xid= */ +master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002' from 106; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query 1 # use `test`; drop table t1 +reset master; +create table t1 (id tinyint auto_increment primary key); +set insert_id=128; +insert into t1 values(null); +Warnings: +Warning 1264 Out of range value for column 'id' at row 1 +select * from t1; +id +127 +drop table t1; +create table t1 (a int); +create table if not exists t2 select * from t1; +create temporary table tt1 (a int); +create table if not exists t3 like tt1; +USE mysql; +INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test'); +UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'; +DELETE FROM user WHERE host='localhost' AND user='@#@'; +use test; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( + `a` int(11) DEFAULT NULL +) +master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( + `a` int(11) DEFAULT NULL +) +master-bin.000001 # Table_map # # table_id: # (mysql.user) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysql.user) +master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysql.user) +master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F +drop table t1,t2,t3,tt1; +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; +insert delayed into t1 values (207); +insert delayed into t1 values (null); +insert delayed into t1 values (300); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t2` ( + `a` int(11) DEFAULT NULL +) +master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( + `a` int(11) DEFAULT NULL +) +master-bin.000001 # Table_map # # table_id: # (mysql.user) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysql.user) +master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysql.user) +master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */ +master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +insert delayed into t1 values (null),(null),(null),(null); +insert delayed into t1 values (null),(null),(400),(null); +11 == 11 +select * from t1; +a +207 +208 +300 +301 +302 +303 +304 +305 +306 +400 +401 +drop table t1; +reset master; +drop table if exists t3; +create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 346 +insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +show master status /* must show new binlog index after rotating */; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000002 106 +drop table t3; diff --git a/mysql-test/suite/binlog/r/binlog_row_blackhole.result b/mysql-test/suite/binlog/r/binlog_row_blackhole.result new file mode 100644 index 00000000000..e58f4648470 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_row_blackhole.result @@ -0,0 +1,155 @@ +drop table if exists t1,t2; +CREATE TABLE t1 ( +Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, +Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL +) ENGINE=blackhole; +INSERT INTO t1 VALUES (9410,9412); +select period from t1; +period +select * from t1; +Period Varor_period +select t1.* from t1; +Period Varor_period +CREATE TABLE t2 ( +auto int NOT NULL auto_increment, +fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL, +companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL, +fld3 char(30) DEFAULT '' NOT NULL, +fld4 char(35) DEFAULT '' NOT NULL, +fld5 char(35) DEFAULT '' NOT NULL, +fld6 char(4) DEFAULT '' NOT NULL, +primary key (auto) +) ENGINE=blackhole; +INSERT INTO t2 VALUES (1192,068305,00,'Colombo','hardware','colicky',''); +INSERT INTO t2 VALUES (1193,000000,00,'nondecreasing','implant','thrillingly',''); +select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"; +fld3 +select fld3 from t2 where fld3 like "%cultivation" ; +fld3 +select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3; +fld3 companynr +select fld3,companynr from t2 where companynr = 58 order by fld3; +fld3 companynr +select fld3 from t2 order by fld3 desc limit 10; +fld3 +select fld3 from t2 order by fld3 desc limit 5; +fld3 +select fld3 from t2 order by fld3 desc limit 5,5; +fld3 +select t2.fld3 from t2 where fld3 = 'honeysuckle'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'h%le'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%'; +fld3 +select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; +fld3 +select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3; +fld1 fld3 +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)); +INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), +('Full-text indexes', 'are called collections'), +('Only MyISAM tables','support collections'), +('Function MATCH ... AGAINST()','is used to do a search'), +('Full-text search in MySQL', 'implements vector space model'); +SHOW INDEX FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a NULL NULL NULL NULL YES FULLTEXT +t1 1 a 2 b NULL NULL NULL NULL YES FULLTEXT +select * from t1 where MATCH(a,b) AGAINST ("collections"); +a b +Only MyISAM tables support collections +Full-text indexes are called collections +explain extended select * from t1 where MATCH(a,b) AGAINST ("collections"); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 fulltext a a 0 1 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against (_latin1'collections')) +select * from t1 where MATCH(a,b) AGAINST ("indexes"); +a b +Full-text indexes are called collections +select * from t1 where MATCH(a,b) AGAINST ("indexes collections"); +a b +Full-text indexes are called collections +Only MyISAM tables support collections +select * from t1 where MATCH(a,b) AGAINST ("only"); +a b +reset master; +drop table t1,t2; +create table t1 (a int) engine=blackhole; +delete from t1 where a=10; +update t1 set a=11 where a=15; +insert into t1 values(1); +insert ignore into t1 values(1); +replace into t1 values(100); +create table t2 (a varchar(200)) engine=blackhole; +load data infile '../std_data_ln/words.dat' into table t2; +alter table t1 add b int; +alter table t1 drop b; +create table t3 like t1; +insert into t1 select * from t3; +replace into t1 select * from t3; +select * from t1; +a +select * from t2; +a +select * from t3; +a +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; drop table t1,t2 +master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; alter table t1 add b int +master-bin.000001 # Query # # use `test`; alter table t1 drop b +master-bin.000001 # Query # # use `test`; create table t3 like t1 +drop table t1,t2,t3; +CREATE TABLE t1(a INT) ENGINE=BLACKHOLE; +INSERT DELAYED INTO t1 VALUES(1); +DROP TABLE t1; +CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE; +DELETE FROM t1 WHERE a=10; +ALTER TABLE t1 ADD INDEX(a); +DELETE FROM t1 WHERE a=10; +ALTER TABLE t1 DROP INDEX a; +ALTER TABLE t1 ADD UNIQUE INDEX(a); +DELETE FROM t1 WHERE a=10; +ALTER TABLE t1 DROP INDEX a; +ALTER TABLE t1 ADD PRIMARY KEY(a); +DELETE FROM t1 WHERE a=10; +DROP TABLE t1; +reset master; +create table t1 (a int) engine=blackhole; +set autocommit=0; +start transaction; +insert into t1 values(1); +commit; +start transaction; +insert into t1 values(2); +rollback; +set autocommit=1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT +drop table if exists t1; diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result new file mode 100644 index 00000000000..ca70f98c0e6 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result @@ -0,0 +1,11377 @@ +drop table if exists t1; +drop table if exists t2; +drop table if exists t3; +drop table if exists t4; +set names cp932; +set character_set_database = cp932; +CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = cp932; +INSERT INTO t1 VALUES +(0x05),(0x7E),(0x815C),(0x815F),(0x8160),(0x8161),(0x817C),(0x8191),(0x8192),(0x81CA); +INSERT INTO t1 VALUES +(0x8740),(0x8741),(0x8742),(0x8743),(0x8744),(0x8745),(0x8746),(0x8747), +(0x8748),(0x8749),(0x874A),(0x874B),(0x874C),(0x874D),(0x874E),(0x874F), +(0x8750),(0x8751),(0x8752),(0x8753),(0x8754),(0x8755),(0x8756),(0x8757), +(0x8758),(0x8759),(0x875A),(0x875B),(0x875C),(0x875D),(0x875F), +(0x8760),(0x8761),(0x8762),(0x8763),(0x8764),(0x8765),(0x8766),(0x8767), +(0x8768),(0x8769),(0x876A),(0x876B),(0x876C),(0x876D),(0x876E),(0x876F), +(0x8770),(0x8771),(0x8772),(0x8773),(0x8774),(0x8775),(0x877E), +(0x8780),(0x8781),(0x8782),(0x8783),(0x8784),(0x8785),(0x8786),(0x8787), +(0x8788),(0x8789),(0x878A),(0x878B),(0x878C),(0x878D),(0x878E),(0x878F), +(0x8790),(0x8791),(0x8792),(0x8793),(0x8794),(0x8795),(0x8796),(0x8797), +(0x8798),(0x8799),(0x879A),(0x879B),(0x879C); +INSERT INTO t1 VALUES +(0xED40),(0xED41),(0xED42),(0xED43),(0xED44),(0xED45),(0xED46),(0xED47), +(0xED48),(0xED49),(0xED4A),(0xED4B),(0xED4C),(0xED4D),(0xED4E),(0xED4F), +(0xED50),(0xED51),(0xED52),(0xED53),(0xED54),(0xED55),(0xED56),(0xED57), +(0xED58),(0xED59),(0xED5A),(0xED5B),(0xED5C),(0xED5D),(0xED5E),(0xED5F), +(0xED60),(0xED61),(0xED62),(0xED63),(0xED64),(0xED65),(0xED66),(0xED67), +(0xED68),(0xED69),(0xED6A),(0xED6B),(0xED6C),(0xED6D),(0xED6E),(0xED6F), +(0xED70),(0xED71),(0xED72),(0xED73),(0xED74),(0xED75),(0xED76),(0xED77), +(0xED78),(0xED79),(0xED7A),(0xED7B),(0xED7C),(0xED7D),(0xED7E), +(0xED80),(0xED81),(0xED82),(0xED83),(0xED84),(0xED85),(0xED86),(0xED87), +(0xED88),(0xED89),(0xED8A),(0xED8B),(0xED8C),(0xED8D),(0xED8E),(0xED8F), +(0xED90),(0xED91),(0xED92),(0xED93),(0xED94),(0xED95),(0xED96),(0xED97), +(0xED98),(0xED99),(0xED9A),(0xED9B),(0xED9C),(0xED9D),(0xED9E),(0xED9F), +(0xEDA0),(0xEDA1),(0xEDA2),(0xEDA3),(0xEDA4),(0xEDA5),(0xEDA6),(0xEDA7), +(0xEDA8),(0xEDA9),(0xEDAA),(0xEDAB),(0xEDAC),(0xEDAD),(0xEDAE),(0xEDAF), +(0xEDB0),(0xEDB1),(0xEDB2),(0xEDB3),(0xEDB4),(0xEDB5),(0xEDB6),(0xEDB7), +(0xEDB8),(0xEDB9),(0xEDBA),(0xEDBB),(0xEDBC),(0xEDBD),(0xEDBE),(0xEDBF), +(0xEDC0),(0xEDC1),(0xEDC2),(0xEDC3),(0xEDC4),(0xEDC5),(0xEDC6),(0xEDC7), +(0xEDC8),(0xEDC9),(0xEDCA),(0xEDCB),(0xEDCC),(0xEDCD),(0xEDCE),(0xEDCF), +(0xEDD0),(0xEDD1),(0xEDD2),(0xEDD3),(0xEDD4),(0xEDD5),(0xEDD6),(0xEDD7), +(0xEDD8),(0xEDD9),(0xEDDA),(0xEDDB),(0xEDDC),(0xEDDD),(0xEDDE),(0xEDDF), +(0xEDE0),(0xEDE1),(0xEDE2),(0xEDE3),(0xEDE4),(0xEDE5),(0xEDE6),(0xEDE7), +(0xEDE8),(0xEDE9),(0xEDEA),(0xEDEB),(0xEDEC),(0xEDED),(0xEDEE),(0xEDEF), +(0xEDF0),(0xEDF1),(0xEDF2),(0xEDF3),(0xEDF4),(0xEDF5),(0xEDF6),(0xEDF7), +(0xEDF8),(0xEDF9),(0xEDFA),(0xEDFB),(0xEDFC), +(0xEE40),(0xEE41),(0xEE42),(0xEE43),(0xEE44),(0xEE45),(0xEE46),(0xEE47), +(0xEE48),(0xEE49),(0xEE4A),(0xEE4B),(0xEE4C),(0xEE4D),(0xEE4E),(0xEE4F), +(0xEE50),(0xEE51),(0xEE52),(0xEE53),(0xEE54),(0xEE55),(0xEE56),(0xEE57), +(0xEE58),(0xEE59),(0xEE5A),(0xEE5B),(0xEE5C),(0xEE5D),(0xEE5E),(0xEE5F), +(0xEE60),(0xEE61),(0xEE62),(0xEE63),(0xEE64),(0xEE65),(0xEE66),(0xEE67), +(0xEE68),(0xEE69),(0xEE6A),(0xEE6B),(0xEE6C),(0xEE6D),(0xEE6E),(0xEE6F), +(0xEE70),(0xEE71),(0xEE72),(0xEE73),(0xEE74),(0xEE75),(0xEE76),(0xEE77), +(0xEE78),(0xEE79),(0xEE7A),(0xEE7B),(0xEE7C),(0xEE7D),(0xEE7E), +(0xEE80),(0xEE81),(0xEE82),(0xEE83),(0xEE84),(0xEE85),(0xEE86),(0xEE87), +(0xEE88),(0xEE89),(0xEE8A),(0xEE8B),(0xEE8C),(0xEE8D),(0xEE8E),(0xEE8F), +(0xEE90),(0xEE91),(0xEE92),(0xEE93),(0xEE94),(0xEE95),(0xEE96),(0xEE97), +(0xEE98),(0xEE99),(0xEE9A),(0xEE9B),(0xEE9C),(0xEE9D),(0xEE9E),(0xEE9F), +(0xEEA0),(0xEEA1),(0xEEA2),(0xEEA3),(0xEEA4),(0xEEA5),(0xEEA6),(0xEEA7), +(0xEEA8),(0xEEA9),(0xEEAA),(0xEEAB),(0xEEAC),(0xEEAD),(0xEEAE),(0xEEAF), +(0xEEB0),(0xEEB1),(0xEEB2),(0xEEB3),(0xEEB4),(0xEEB5),(0xEEB6),(0xEEB7), +(0xEEB8),(0xEEB9),(0xEEBA),(0xEEBB),(0xEEBC),(0xEEBD),(0xEEBE),(0xEEBF), +(0xEEC0),(0xEEC1),(0xEEC2),(0xEEC3),(0xEEC4),(0xEEC5),(0xEEC6),(0xEEC7), +(0xEEC8),(0xEEC9),(0xEECA),(0xEECB),(0xEECC),(0xEECD),(0xEECE),(0xEECF), +(0xEED0),(0xEED1),(0xEED2),(0xEED3),(0xEED4),(0xEED5),(0xEED6),(0xEED7), +(0xEED8),(0xEED9),(0xEEDA),(0xEEDB),(0xEEDC),(0xEEDD),(0xEEDE),(0xEEDF), +(0xEEE0),(0xEEE1),(0xEEE2),(0xEEE3),(0xEEE4),(0xEEE5),(0xEEE6),(0xEEE7), +(0xEEE8),(0xEEE9),(0xEEEA),(0xEEEB),(0xEEEC),(0xEEEF), +(0xEEF0),(0xEEF1),(0xEEF2),(0xEEF3),(0xEEF4),(0xEEF5),(0xEEF6),(0xEEF7), +(0xEEF8),(0xEEF9),(0xEEFA),(0xEEFB),(0xEEFC); +INSERT INTO t1 VALUES +(0xFA40),(0xFA41),(0xFA42),(0xFA43),(0xFA44),(0xFA45),(0xFA46),(0xFA47), +(0xFA48),(0xFA49),(0xFA4A),(0xFA4B),(0xFA4C),(0xFA4D),(0xFA4E),(0xFA4F), +(0xFA50),(0xFA51),(0xFA52),(0xFA53),(0xFA54),(0xFA55),(0xFA56),(0xFA57), +(0xFA58),(0xFA59),(0xFA5A),(0xFA5B),(0xFA5C),(0xFA5D),(0xFA5E),(0xFA5F), +(0xFA60),(0xFA61),(0xFA62),(0xFA63),(0xFA64),(0xFA65),(0xFA66),(0xFA67), +(0xFA68),(0xFA69),(0xFA6A),(0xFA6B),(0xFA6C),(0xFA6D),(0xFA6E),(0xFA6F), +(0xFA70),(0xFA71),(0xFA72),(0xFA73),(0xFA74),(0xFA75),(0xFA76),(0xFA77), +(0xFA78),(0xFA79),(0xFA7A),(0xFA7B),(0xFA7C),(0xFA7D),(0xFA7E), +(0xFA80),(0xFA81),(0xFA82),(0xFA83),(0xFA84),(0xFA85),(0xFA86),(0xFA87), +(0xFA88),(0xFA89),(0xFA8A),(0xFA8B),(0xFA8C),(0xFA8D),(0xFA8E),(0xFA8F), +(0xFA90),(0xFA91),(0xFA92),(0xFA93),(0xFA94),(0xFA95),(0xFA96),(0xFA97), +(0xFA98),(0xFA99),(0xFA9A),(0xFA9B),(0xFA9C),(0xFA9D),(0xFA9E),(0xFA9F), +(0xFAA0),(0xFAA1),(0xFAA2),(0xFAA3),(0xFAA4),(0xFAA5),(0xFAA6),(0xFAA7), +(0xFAA8),(0xFAA9),(0xFAAA),(0xFAAB),(0xFAAC),(0xFAAD),(0xFAAE),(0xFAAF), +(0xFAB0),(0xFAB1),(0xFAB2),(0xFAB3),(0xFAB4),(0xFAB5),(0xFAB6),(0xFAB7), +(0xFAB8),(0xFAB9),(0xFABA),(0xFABB),(0xFABC),(0xFABD),(0xFABE),(0xFABF), +(0xFAC0),(0xFAC1),(0xFAC2),(0xFAC3),(0xFAC4),(0xFAC5),(0xFAC6),(0xFAC7), +(0xFAC8),(0xFAC9),(0xFACA),(0xFACB),(0xFACC),(0xFACD),(0xFACE),(0xFACF), +(0xFAD0),(0xFAD1),(0xFAD2),(0xFAD3),(0xFAD4),(0xFAD5),(0xFAD6),(0xFAD7), +(0xFAD8),(0xFAD9),(0xFADA),(0xFADB),(0xFADC),(0xFADD),(0xFADE),(0xFADF), +(0xFAE0),(0xFAE1),(0xFAE2),(0xFAE3),(0xFAE4),(0xFAE5),(0xFAE6),(0xFAE7), +(0xFAE8),(0xFAE9),(0xFAEA),(0xFAEB),(0xFAEC),(0xFAED),(0xFAEE),(0xFAEF), +(0xFAF0),(0xFAF1),(0xFAF2),(0xFAF3),(0xFAF4),(0xFAF5),(0xFAF6),(0xFAF7), +(0xFAF8),(0xFAF9),(0xFAFA),(0xFAFB),(0xFAFC), +(0xFB40),(0xFB41),(0xFB42),(0xFB43),(0xFB44),(0xFB45),(0xFB46),(0xFB47), +(0xFB48),(0xFB49),(0xFB4A),(0xFB4B),(0xFB4C),(0xFB4D),(0xFB4E),(0xFB4F), +(0xFB50),(0xFB51),(0xFB52),(0xFB53),(0xFB54),(0xFB55),(0xFB56),(0xFB57), +(0xFB58),(0xFB59),(0xFB5A),(0xFB5B),(0xFB5C),(0xFB5D),(0xFB5E),(0xFB5F), +(0xFB60),(0xFB61),(0xFB62),(0xFB63),(0xFB64),(0xFB65),(0xFB66),(0xFB67), +(0xFB68),(0xFB69),(0xFB6A),(0xFB6B),(0xFB6C),(0xFB6D),(0xFB6E),(0xFB6F), +(0xFB70),(0xFB71),(0xFB72),(0xFB73),(0xFB74),(0xFB75),(0xFB76),(0xFB77), +(0xFB78),(0xFB79),(0xFB7A),(0xFB7B),(0xFB7C),(0xFB7D),(0xFB7E), +(0xFB80),(0xFB81),(0xFB82),(0xFB83),(0xFB84),(0xFB85),(0xFB86),(0xFB87), +(0xFB88),(0xFB89),(0xFB8A),(0xFB8B),(0xFB8C),(0xFB8D),(0xFB8E),(0xFB8F), +(0xFB90),(0xFB91),(0xFB92),(0xFB93),(0xFB94),(0xFB95),(0xFB96),(0xFB97), +(0xFB98),(0xFB99),(0xFB9A),(0xFB9B),(0xFB9C),(0xFB9D),(0xFB9E),(0xFB9F), +(0xFBA0),(0xFBA1),(0xFBA2),(0xFBA3),(0xFBA4),(0xFBA5),(0xFBA6),(0xFBA7), +(0xFBA8),(0xFBA9),(0xFBAA),(0xFBAB),(0xFBAC),(0xFBAD),(0xFBAE),(0xFBAF), +(0xFBB0),(0xFBB1),(0xFBB2),(0xFBB3),(0xFBB4),(0xFBB5),(0xFBB6),(0xFBB7), +(0xFBB8),(0xFBB9),(0xFBBA),(0xFBBB),(0xFBBC),(0xFBBD),(0xFBBE),(0xFBBF), +(0xFBC0),(0xFBC1),(0xFBC2),(0xFBC3),(0xFBC4),(0xFBC5),(0xFBC6),(0xFBC7), +(0xFBC8),(0xFBC9),(0xFBCA),(0xFBCB),(0xFBCC),(0xFBCD),(0xFBCE),(0xFBCF), +(0xFBD0),(0xFBD1),(0xFBD2),(0xFBD3),(0xFBD4),(0xFBD5),(0xFBD6),(0xFBD7), +(0xFBD8),(0xFBD9),(0xFBDA),(0xFBDB),(0xFBDC),(0xFBDD),(0xFBDE),(0xFBDF), +(0xFBE0),(0xFBE1),(0xFBE2),(0xFBE3),(0xFBE4),(0xFBE5),(0xFBE6),(0xFBE7), +(0xFBE8),(0xFBE9),(0xFBEA),(0xFBEB),(0xFBEC),(0xFBED),(0xFBEE),(0xFBEF), +(0xFBF0),(0xFBF1),(0xFBF2),(0xFBF3),(0xFBF4),(0xFBF5),(0xFBF6),(0xFBF7), +(0xFBF8),(0xFBF9),(0xFBFA),(0xFBFB),(0xFBFC), +(0xFC40),(0xFC41),(0xFC42),(0xFC43),(0xFC44),(0xFC45),(0xFC46),(0xFC47), +(0xFC48),(0xFC49),(0xFC4A),(0xFC4B); +INSERT INTO t1 VALUES +(0xF040),(0xF041),(0xF042),(0xF043),(0xF044),(0xF045),(0xF046),(0xF047), +(0xF048),(0xF049),(0xF04A),(0xF04B),(0xF04C),(0xF04D),(0xF04E),(0xF04F), +(0xF050),(0xF051),(0xF052),(0xF053),(0xF054),(0xF055),(0xF056),(0xF057), +(0xF058),(0xF059),(0xF05A),(0xF05B),(0xF05C),(0xF05D),(0xF05E),(0xF05F), +(0xF060),(0xF061),(0xF062),(0xF063),(0xF064),(0xF065),(0xF066),(0xF067), +(0xF068),(0xF069),(0xF06A),(0xF06B),(0xF06C),(0xF06D),(0xF06E),(0xF06F), +(0xF070),(0xF071),(0xF072),(0xF073),(0xF074),(0xF075),(0xF076),(0xF077), +(0xF078),(0xF079),(0xF07A),(0xF07B),(0xF07C),(0xF07D),(0xF07E), +(0xF080),(0xF081),(0xF082),(0xF083),(0xF084),(0xF085),(0xF086),(0xF087), +(0xF088),(0xF089),(0xF08A),(0xF08B),(0xF08C),(0xF08D),(0xF08E),(0xF08F), +(0xF090),(0xF091),(0xF092),(0xF093),(0xF094),(0xF095),(0xF096),(0xF097), +(0xF098),(0xF099),(0xF09A),(0xF09B),(0xF09C),(0xF09D),(0xF09E),(0xF09F), +(0xF0A0),(0xF0A1),(0xF0A2),(0xF0A3),(0xF0A4),(0xF0A5),(0xF0A6),(0xF0A7), +(0xF0A8),(0xF0A9),(0xF0AA),(0xF0AB),(0xF0AC),(0xF0AD),(0xF0AE),(0xF0AF), +(0xF0B0),(0xF0B1),(0xF0B2),(0xF0B3),(0xF0B4),(0xF0B5),(0xF0B6),(0xF0B7), +(0xF0B8),(0xF0B9),(0xF0BA),(0xF0BB),(0xF0BC),(0xF0BD),(0xF0BE),(0xF0BF), +(0xF0C0),(0xF0C1),(0xF0C2),(0xF0C3),(0xF0C4),(0xF0C5),(0xF0C6),(0xF0C7), +(0xF0C8),(0xF0C9),(0xF0CA),(0xF0CB),(0xF0CC),(0xF0CD),(0xF0CE),(0xF0CF), +(0xF0D0),(0xF0D1),(0xF0D2),(0xF0D3),(0xF0D4),(0xF0D5),(0xF0D6),(0xF0D7), +(0xF0D8),(0xF0D9),(0xF0DA),(0xF0DB),(0xF0DC),(0xF0DD),(0xF0DE),(0xF0DF), +(0xF0E0),(0xF0E1),(0xF0E2),(0xF0E3),(0xF0E4),(0xF0E5),(0xF0E6),(0xF0E7), +(0xF0E8),(0xF0E9),(0xF0EA),(0xF0EB),(0xF0EC),(0xF0ED),(0xF0EE),(0xF0EF), +(0xF0F0),(0xF0F1),(0xF0F2),(0xF0F3),(0xF0F4),(0xF0F5),(0xF0F6),(0xF0F7), +(0xF0F8),(0xF0F9),(0xF0FA),(0xF0FB),(0xF0FC), +(0xF140),(0xF141),(0xF142),(0xF143),(0xF144),(0xF145),(0xF146),(0xF147), +(0xF148),(0xF149),(0xF14A),(0xF14B),(0xF14C),(0xF14D),(0xF14E),(0xF14F), +(0xF150),(0xF151),(0xF152),(0xF153),(0xF154),(0xF155),(0xF156),(0xF157), +(0xF158),(0xF159),(0xF15A),(0xF15B),(0xF15C),(0xF15D),(0xF15E),(0xF15F), +(0xF160),(0xF161),(0xF162),(0xF163),(0xF164),(0xF165),(0xF166),(0xF167), +(0xF168),(0xF169),(0xF16A),(0xF16B),(0xF16C),(0xF16D),(0xF16E),(0xF16F), +(0xF170),(0xF171),(0xF172),(0xF173),(0xF174),(0xF175),(0xF176),(0xF177), +(0xF178),(0xF179),(0xF17A),(0xF17B),(0xF17C),(0xF17D),(0xF17E), +(0xF180),(0xF181),(0xF182),(0xF183),(0xF184),(0xF185),(0xF186),(0xF187), +(0xF188),(0xF189),(0xF18A),(0xF18B),(0xF18C),(0xF18D),(0xF18E),(0xF18F), +(0xF190),(0xF191),(0xF192),(0xF193),(0xF194),(0xF195),(0xF196),(0xF197), +(0xF198),(0xF199),(0xF19A),(0xF19B),(0xF19C),(0xF19D),(0xF19E),(0xF19F), +(0xF1A0),(0xF1A1),(0xF1A2),(0xF1A3),(0xF1A4),(0xF1A5),(0xF1A6),(0xF1A7), +(0xF1A8),(0xF1A9),(0xF1AA),(0xF1AB),(0xF1AC),(0xF1AD),(0xF1AE),(0xF1AF), +(0xF1B0),(0xF1B1),(0xF1B2),(0xF1B3),(0xF1B4),(0xF1B5),(0xF1B6),(0xF1B7), +(0xF1B8),(0xF1B9),(0xF1BA),(0xF1BB),(0xF1BC),(0xF1BD),(0xF1BE),(0xF1BF), +(0xF1C0),(0xF1C1),(0xF1C2),(0xF1C3),(0xF1C4),(0xF1C5),(0xF1C6),(0xF1C7), +(0xF1C8),(0xF1C9),(0xF1CA),(0xF1CB),(0xF1CC),(0xF1CD),(0xF1CE),(0xF1CF), +(0xF1D0),(0xF1D1),(0xF1D2),(0xF1D3),(0xF1D4),(0xF1D5),(0xF1D6),(0xF1D7), +(0xF1D8),(0xF1D9),(0xF1DA),(0xF1DB),(0xF1DC),(0xF1DD),(0xF1DE),(0xF1DF), +(0xF1E0),(0xF1E1),(0xF1E2),(0xF1E3),(0xF1E4),(0xF1E5),(0xF1E6),(0xF1E7), +(0xF1E8),(0xF1E9),(0xF1EA),(0xF1EB),(0xF1EC),(0xF1ED),(0xF1EE),(0xF1EF), +(0xF1F0),(0xF1F1),(0xF1F2),(0xF1F3),(0xF1F4),(0xF1F5),(0xF1F6),(0xF1F7), +(0xF1F8),(0xF1F9),(0xF1FA),(0xF1FB),(0xF1FC), +(0xF240),(0xF241),(0xF242),(0xF243),(0xF244),(0xF245),(0xF246),(0xF247), +(0xF248),(0xF249),(0xF24A),(0xF24B),(0xF24C),(0xF24D),(0xF24E),(0xF24F), +(0xF250),(0xF251),(0xF252),(0xF253),(0xF254),(0xF255),(0xF256),(0xF257), +(0xF258),(0xF259),(0xF25A),(0xF25B),(0xF25C),(0xF25D),(0xF25E),(0xF25F), +(0xF260),(0xF261),(0xF262),(0xF263),(0xF264),(0xF265),(0xF266),(0xF267), +(0xF268),(0xF269),(0xF26A),(0xF26B),(0xF26C),(0xF26D),(0xF26E),(0xF26F), +(0xF270),(0xF271),(0xF272),(0xF273),(0xF274),(0xF275),(0xF276),(0xF277), +(0xF278),(0xF279),(0xF27A),(0xF27B),(0xF27C),(0xF27D),(0xF27E), +(0xF280),(0xF281),(0xF282),(0xF283),(0xF284),(0xF285),(0xF286),(0xF287), +(0xF288),(0xF289),(0xF28A),(0xF28B),(0xF28C),(0xF28D),(0xF28E),(0xF28F), +(0xF290),(0xF291),(0xF292),(0xF293),(0xF294),(0xF295),(0xF296),(0xF297), +(0xF298),(0xF299),(0xF29A),(0xF29B),(0xF29C),(0xF29D),(0xF29E),(0xF29F), +(0xF2A0),(0xF2A1),(0xF2A2),(0xF2A3),(0xF2A4),(0xF2A5),(0xF2A6),(0xF2A7), +(0xF2A8),(0xF2A9),(0xF2AA),(0xF2AB),(0xF2AC),(0xF2AD),(0xF2AE),(0xF2AF), +(0xF2B0),(0xF2B1),(0xF2B2),(0xF2B3),(0xF2B4),(0xF2B5),(0xF2B6),(0xF2B7), +(0xF2B8),(0xF2B9),(0xF2BA),(0xF2BB),(0xF2BC),(0xF2BD),(0xF2BE),(0xF2BF), +(0xF2C0),(0xF2C1),(0xF2C2),(0xF2C3),(0xF2C4),(0xF2C5),(0xF2C6),(0xF2C7), +(0xF2C8),(0xF2C9),(0xF2CA),(0xF2CB),(0xF2CC),(0xF2CD),(0xF2CE),(0xF2CF), +(0xF2D0),(0xF2D1),(0xF2D2),(0xF2D3),(0xF2D4),(0xF2D5),(0xF2D6),(0xF2D7), +(0xF2D8),(0xF2D9),(0xF2DA),(0xF2DB),(0xF2DC),(0xF2DD),(0xF2DE),(0xF2DF), +(0xF2E0),(0xF2E1),(0xF2E2),(0xF2E3),(0xF2E4),(0xF2E5),(0xF2E6),(0xF2E7), +(0xF2E8),(0xF2E9),(0xF2EA),(0xF2EB),(0xF2EC),(0xF2ED),(0xF2EE),(0xF2EF), +(0xF2F0),(0xF2F1),(0xF2F2),(0xF2F3),(0xF2F4),(0xF2F5),(0xF2F6),(0xF2F7), +(0xF2F8),(0xF2F9),(0xF2FA),(0xF2FB),(0xF2FC), +(0xF340),(0xF341),(0xF342),(0xF343),(0xF344),(0xF345),(0xF346),(0xF347), +(0xF348),(0xF349),(0xF34A),(0xF34B),(0xF34C),(0xF34D),(0xF34E),(0xF34F), +(0xF350),(0xF351),(0xF352),(0xF353),(0xF354),(0xF355),(0xF356),(0xF357), +(0xF358),(0xF359),(0xF35A),(0xF35B),(0xF35C),(0xF35D),(0xF35E),(0xF35F), +(0xF360),(0xF361),(0xF362),(0xF363),(0xF364),(0xF365),(0xF366),(0xF367), +(0xF368),(0xF369),(0xF36A),(0xF36B),(0xF36C),(0xF36D),(0xF36E),(0xF36F), +(0xF370),(0xF371),(0xF372),(0xF373),(0xF374),(0xF375),(0xF376),(0xF377), +(0xF378),(0xF379),(0xF37A),(0xF37B),(0xF37C),(0xF37D),(0xF37E), +(0xF380),(0xF381),(0xF382),(0xF383),(0xF384),(0xF385),(0xF386),(0xF387), +(0xF388),(0xF389),(0xF38A),(0xF38B),(0xF38C),(0xF38D),(0xF38E),(0xF38F), +(0xF390),(0xF391),(0xF392),(0xF393),(0xF394),(0xF395),(0xF396),(0xF397), +(0xF398),(0xF399),(0xF39A),(0xF39B),(0xF39C),(0xF39D),(0xF39E),(0xF39F), +(0xF3A0),(0xF3A1),(0xF3A2),(0xF3A3),(0xF3A4),(0xF3A5),(0xF3A6),(0xF3A7), +(0xF3A8),(0xF3A9),(0xF3AA),(0xF3AB),(0xF3AC),(0xF3AD),(0xF3AE),(0xF3AF), +(0xF3B0),(0xF3B1),(0xF3B2),(0xF3B3),(0xF3B4),(0xF3B5),(0xF3B6),(0xF3B7), +(0xF3B8),(0xF3B9),(0xF3BA),(0xF3BB),(0xF3BC),(0xF3BD),(0xF3BE),(0xF3BF), +(0xF3C0),(0xF3C1),(0xF3C2),(0xF3C3),(0xF3C4),(0xF3C5),(0xF3C6),(0xF3C7), +(0xF3C8),(0xF3C9),(0xF3CA),(0xF3CB),(0xF3CC),(0xF3CD),(0xF3CE),(0xF3CF), +(0xF3D0),(0xF3D1),(0xF3D2),(0xF3D3),(0xF3D4),(0xF3D5),(0xF3D6),(0xF3D7), +(0xF3D8),(0xF3D9),(0xF3DA),(0xF3DB),(0xF3DC),(0xF3DD),(0xF3DE),(0xF3DF), +(0xF3E0),(0xF3E1),(0xF3E2),(0xF3E3),(0xF3E4),(0xF3E5),(0xF3E6),(0xF3E7), +(0xF3E8),(0xF3E9),(0xF3EA),(0xF3EB),(0xF3EC),(0xF3ED),(0xF3EE),(0xF3EF), +(0xF3F0),(0xF3F1),(0xF3F2),(0xF3F3),(0xF3F4),(0xF3F5),(0xF3F6),(0xF3F7), +(0xF3F8),(0xF3F9),(0xF3FA),(0xF3FB),(0xF3FC), +(0xF440),(0xF441),(0xF442),(0xF443),(0xF444),(0xF445),(0xF446),(0xF447), +(0xF448),(0xF449),(0xF44A),(0xF44B),(0xF44C),(0xF44D),(0xF44E),(0xF44F), +(0xF450),(0xF451),(0xF452),(0xF453),(0xF454),(0xF455),(0xF456),(0xF457), +(0xF458),(0xF459),(0xF45A),(0xF45B),(0xF45C),(0xF45D),(0xF45E),(0xF45F), +(0xF460),(0xF461),(0xF462),(0xF463),(0xF464),(0xF465),(0xF466),(0xF467), +(0xF468),(0xF469),(0xF46A),(0xF46B),(0xF46C),(0xF46D),(0xF46E),(0xF46F), +(0xF470),(0xF471),(0xF472),(0xF473),(0xF474),(0xF475),(0xF476),(0xF477), +(0xF478),(0xF479),(0xF47A),(0xF47B),(0xF47C),(0xF47D),(0xF47E), +(0xF480),(0xF481),(0xF482),(0xF483),(0xF484),(0xF485),(0xF486),(0xF487), +(0xF488),(0xF489),(0xF48A),(0xF48B),(0xF48C),(0xF48D),(0xF48E),(0xF48F), +(0xF490),(0xF491),(0xF492),(0xF493),(0xF494),(0xF495),(0xF496),(0xF497), +(0xF498),(0xF499),(0xF49A),(0xF49B),(0xF49C),(0xF49D),(0xF49E),(0xF49F), +(0xF4A0),(0xF4A1),(0xF4A2),(0xF4A3),(0xF4A4),(0xF4A5),(0xF4A6),(0xF4A7), +(0xF4A8),(0xF4A9),(0xF4AA),(0xF4AB),(0xF4AC),(0xF4AD),(0xF4AE),(0xF4AF), +(0xF4B0),(0xF4B1),(0xF4B2),(0xF4B3),(0xF4B4),(0xF4B5),(0xF4B6),(0xF4B7), +(0xF4B8),(0xF4B9),(0xF4BA),(0xF4BB),(0xF4BC),(0xF4BD),(0xF4BE),(0xF4BF), +(0xF4C0),(0xF4C1),(0xF4C2),(0xF4C3),(0xF4C4),(0xF4C5),(0xF4C6),(0xF4C7), +(0xF4C8),(0xF4C9),(0xF4CA),(0xF4CB),(0xF4CC),(0xF4CD),(0xF4CE),(0xF4CF), +(0xF4D0),(0xF4D1),(0xF4D2),(0xF4D3),(0xF4D4),(0xF4D5),(0xF4D6),(0xF4D7), +(0xF4D8),(0xF4D9),(0xF4DA),(0xF4DB),(0xF4DC),(0xF4DD),(0xF4DE),(0xF4DF), +(0xF4E0),(0xF4E1),(0xF4E2),(0xF4E3),(0xF4E4),(0xF4E5),(0xF4E6),(0xF4E7), +(0xF4E8),(0xF4E9),(0xF4EA),(0xF4EB),(0xF4EC),(0xF4ED),(0xF4EE),(0xF4EF), +(0xF4F0),(0xF4F1),(0xF4F2),(0xF4F3),(0xF4F4),(0xF4F5),(0xF4F6),(0xF4F7), +(0xF4F8),(0xF4F9),(0xF4FA),(0xF4FB),(0xF4FC), +(0xF540),(0xF541),(0xF542),(0xF543),(0xF544),(0xF545),(0xF546),(0xF547), +(0xF548),(0xF549),(0xF54A),(0xF54B),(0xF54C),(0xF54D),(0xF54E),(0xF54F), +(0xF550),(0xF551),(0xF552),(0xF553),(0xF554),(0xF555),(0xF556),(0xF557), +(0xF558),(0xF559),(0xF55A),(0xF55B),(0xF55C),(0xF55D),(0xF55E),(0xF55F), +(0xF560),(0xF561),(0xF562),(0xF563),(0xF564),(0xF565),(0xF566),(0xF567), +(0xF568),(0xF569),(0xF56A),(0xF56B),(0xF56C),(0xF56D),(0xF56E),(0xF56F), +(0xF570),(0xF571),(0xF572),(0xF573),(0xF574),(0xF575),(0xF576),(0xF577), +(0xF578),(0xF579),(0xF57A),(0xF57B),(0xF57C),(0xF57D),(0xF57E), +(0xF580),(0xF581),(0xF582),(0xF583),(0xF584),(0xF585),(0xF586),(0xF587), +(0xF588),(0xF589),(0xF58A),(0xF58B),(0xF58C),(0xF58D),(0xF58E),(0xF58F), +(0xF590),(0xF591),(0xF592),(0xF593),(0xF594),(0xF595),(0xF596),(0xF597), +(0xF598),(0xF599),(0xF59A),(0xF59B),(0xF59C),(0xF59D),(0xF59E),(0xF59F), +(0xF5A0),(0xF5A1),(0xF5A2),(0xF5A3),(0xF5A4),(0xF5A5),(0xF5A6),(0xF5A7), +(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE),(0xF5AF), +(0xF5B0),(0xF5B1),(0xF5B2),(0xF5B3),(0xF5B4),(0xF5B5),(0xF5B6),(0xF5B7), +(0xF5B8),(0xF5B9),(0xF5BA),(0xF5BB),(0xF5BC),(0xF5BD),(0xF5BE),(0xF5BF), +(0xF5C0),(0xF5C1),(0xF5C2),(0xF5C3),(0xF5C4),(0xF5C5),(0xF5C6),(0xF5C7), +(0xF5C8),(0xF5C9),(0xF5CA),(0xF5CB),(0xF5CC),(0xF5CD),(0xF5CE),(0xF5CF), +(0xF5D0),(0xF5D1),(0xF5D2),(0xF5D3),(0xF5D4),(0xF5D5),(0xF5D6),(0xF5D7), +(0xF5D8),(0xF5D9),(0xF5DA),(0xF5DB),(0xF5DC),(0xF5DD),(0xF5DE),(0xF5DF), +(0xF5E0),(0xF5E1),(0xF5E2),(0xF5E3),(0xF5E4),(0xF5E5),(0xF5E6),(0xF5E7), +(0xF5E8),(0xF5E9),(0xF5EA),(0xF5EB),(0xF5EC),(0xF5ED),(0xF5EE),(0xF5EF), +(0xF5F0),(0xF5F1),(0xF5F2),(0xF5F3),(0xF5F4),(0xF5F5),(0xF5F6),(0xF5F7), +(0xF5F8),(0xF5F9),(0xF5FA),(0xF5FB),(0xF5FC), +(0xF640),(0xF641),(0xF642),(0xF643),(0xF644),(0xF645),(0xF646),(0xF647), +(0xF648),(0xF649),(0xF64A),(0xF64B),(0xF64C),(0xF64D),(0xF64E),(0xF64F), +(0xF650),(0xF651),(0xF652),(0xF653),(0xF654),(0xF655),(0xF656),(0xF657), +(0xF658),(0xF659),(0xF65A),(0xF65B),(0xF65C),(0xF65D),(0xF65E),(0xF65F), +(0xF660),(0xF661),(0xF662),(0xF663),(0xF664),(0xF665),(0xF666),(0xF667), +(0xF668),(0xF669),(0xF66A),(0xF66B),(0xF66C),(0xF66D),(0xF66E),(0xF66F), +(0xF670),(0xF671),(0xF672),(0xF673),(0xF674),(0xF675),(0xF676),(0xF677), +(0xF678),(0xF679),(0xF67A),(0xF67B),(0xF67C),(0xF67D),(0xF67E), +(0xF680),(0xF681),(0xF682),(0xF683),(0xF684),(0xF685),(0xF686),(0xF687), +(0xF688),(0xF689),(0xF68A),(0xF68B),(0xF68C),(0xF68D),(0xF68E),(0xF68F), +(0xF690),(0xF691),(0xF692),(0xF693),(0xF694),(0xF695),(0xF696),(0xF697), +(0xF698),(0xF699),(0xF69A),(0xF69B),(0xF69C),(0xF69D),(0xF69E),(0xF69F), +(0xF6A0),(0xF6A1),(0xF6A2),(0xF6A3),(0xF6A4),(0xF6A5),(0xF6A6),(0xF6A7), +(0xF6A8),(0xF6A9),(0xF6AA),(0xF6AB),(0xF6AC),(0xF6AD),(0xF6AE),(0xF6AF), +(0xF6B0),(0xF6B1),(0xF6B2),(0xF6B3),(0xF6B4),(0xF6B5),(0xF6B6),(0xF6B7), +(0xF6B8),(0xF6B9),(0xF6BA),(0xF6BB),(0xF6BC),(0xF6BD),(0xF6BE),(0xF6BF), +(0xF6C0),(0xF6C1),(0xF6C2),(0xF6C3),(0xF6C4),(0xF6C5),(0xF6C6),(0xF6C7), +(0xF6C8),(0xF6C9),(0xF6CA),(0xF6CB),(0xF6CC),(0xF6CD),(0xF6CE),(0xF6CF), +(0xF6D0),(0xF6D1),(0xF6D2),(0xF6D3),(0xF6D4),(0xF6D5),(0xF6D6),(0xF6D7), +(0xF6D8),(0xF6D9),(0xF6DA),(0xF6DB),(0xF6DC),(0xF6DD),(0xF6DE),(0xF6DF), +(0xF6E0),(0xF6E1),(0xF6E2),(0xF6E3),(0xF6E4),(0xF6E5),(0xF6E6),(0xF6E7), +(0xF6E8),(0xF6E9),(0xF6EA),(0xF6EB),(0xF6EC),(0xF6ED),(0xF6EE),(0xF6EF), +(0xF6F0),(0xF6F1),(0xF6F2),(0xF6F3),(0xF6F4),(0xF6F5),(0xF6F6),(0xF6F7), +(0xF6F8),(0xF6F9),(0xF6FA),(0xF6FB),(0xF6FC), +(0xF740),(0xF741),(0xF742),(0xF743),(0xF744),(0xF745),(0xF746),(0xF747), +(0xF748),(0xF749),(0xF74A),(0xF74B),(0xF74C),(0xF74D),(0xF74E),(0xF74F), +(0xF750),(0xF751),(0xF752),(0xF753),(0xF754),(0xF755),(0xF756),(0xF757), +(0xF758),(0xF759),(0xF75A),(0xF75B),(0xF75C),(0xF75D),(0xF75E),(0xF75F), +(0xF760),(0xF761),(0xF762),(0xF763),(0xF764),(0xF765),(0xF766),(0xF767), +(0xF768),(0xF769),(0xF76A),(0xF76B),(0xF76C),(0xF76D),(0xF76E),(0xF76F), +(0xF770),(0xF771),(0xF772),(0xF773),(0xF774),(0xF775),(0xF776),(0xF777), +(0xF778),(0xF779),(0xF77A),(0xF77B),(0xF77C),(0xF77D),(0xF77E), +(0xF780),(0xF781),(0xF782),(0xF783),(0xF784),(0xF785),(0xF786),(0xF787), +(0xF788),(0xF789),(0xF78A),(0xF78B),(0xF78C),(0xF78D),(0xF78E),(0xF78F), +(0xF790),(0xF791),(0xF792),(0xF793),(0xF794),(0xF795),(0xF796),(0xF797), +(0xF798),(0xF799),(0xF79A),(0xF79B),(0xF79C),(0xF79D),(0xF79E),(0xF79F), +(0xF7A0),(0xF7A1),(0xF7A2),(0xF7A3),(0xF7A4),(0xF7A5),(0xF7A6),(0xF7A7), +(0xF7A8),(0xF7A9),(0xF7AA),(0xF7AB),(0xF7AC),(0xF7AD),(0xF7AE),(0xF7AF), +(0xF7B0),(0xF7B1),(0xF7B2),(0xF7B3),(0xF7B4),(0xF7B5),(0xF7B6),(0xF7B7), +(0xF7B8),(0xF7B9),(0xF7BA),(0xF7BB),(0xF7BC),(0xF7BD),(0xF7BE),(0xF7BF), +(0xF7C0),(0xF7C1),(0xF7C2),(0xF7C3),(0xF7C4),(0xF7C5),(0xF7C6),(0xF7C7), +(0xF7C8),(0xF7C9),(0xF7CA),(0xF7CB),(0xF7CC),(0xF7CD),(0xF7CE),(0xF7CF), +(0xF7D0),(0xF7D1),(0xF7D2),(0xF7D3),(0xF7D4),(0xF7D5),(0xF7D6),(0xF7D7), +(0xF7D8),(0xF7D9),(0xF7DA),(0xF7DB),(0xF7DC),(0xF7DD),(0xF7DE),(0xF7DF), +(0xF7E0),(0xF7E1),(0xF7E2),(0xF7E3),(0xF7E4),(0xF7E5),(0xF7E6),(0xF7E7), +(0xF7E8),(0xF7E9),(0xF7EA),(0xF7EB),(0xF7EC),(0xF7ED),(0xF7EE),(0xF7EF), +(0xF7F0),(0xF7F1),(0xF7F2),(0xF7F3),(0xF7F4),(0xF7F5),(0xF7F6),(0xF7F7), +(0xF7F8),(0xF7F9),(0xF7FA),(0xF7FB),(0xF7FC), +(0xF840),(0xF841),(0xF842),(0xF843),(0xF844),(0xF845),(0xF846),(0xF847), +(0xF848),(0xF849),(0xF84A),(0xF84B),(0xF84C),(0xF84D),(0xF84E),(0xF84F), +(0xF850),(0xF851),(0xF852),(0xF853),(0xF854),(0xF855),(0xF856),(0xF857), +(0xF858),(0xF859),(0xF85A),(0xF85B),(0xF85C),(0xF85D),(0xF85E),(0xF85F), +(0xF860),(0xF861),(0xF862),(0xF863),(0xF864),(0xF865),(0xF866),(0xF867), +(0xF868),(0xF869),(0xF86A),(0xF86B),(0xF86C),(0xF86D),(0xF86E),(0xF86F), +(0xF870),(0xF871),(0xF872),(0xF873),(0xF874),(0xF875),(0xF876),(0xF877), +(0xF878),(0xF879),(0xF87A),(0xF87B),(0xF87C),(0xF87D),(0xF87E), +(0xF880),(0xF881),(0xF882),(0xF883),(0xF884),(0xF885),(0xF886),(0xF887), +(0xF888),(0xF889),(0xF88A),(0xF88B),(0xF88C),(0xF88D),(0xF88E),(0xF88F), +(0xF890),(0xF891),(0xF892),(0xF893),(0xF894),(0xF895),(0xF896),(0xF897), +(0xF898),(0xF899),(0xF89A),(0xF89B),(0xF89C),(0xF89D),(0xF89E),(0xF89F), +(0xF8A0),(0xF8A1),(0xF8A2),(0xF8A3),(0xF8A4),(0xF8A5),(0xF8A6),(0xF8A7), +(0xF8A8),(0xF8A9),(0xF8AA),(0xF8AB),(0xF8AC),(0xF8AD),(0xF8AE),(0xF8AF), +(0xF8B0),(0xF8B1),(0xF8B2),(0xF8B3),(0xF8B4),(0xF8B5),(0xF8B6),(0xF8B7), +(0xF8B8),(0xF8B9),(0xF8BA),(0xF8BB),(0xF8BC),(0xF8BD),(0xF8BE),(0xF8BF), +(0xF8C0),(0xF8C1),(0xF8C2),(0xF8C3),(0xF8C4),(0xF8C5),(0xF8C6),(0xF8C7), +(0xF8C8),(0xF8C9),(0xF8CA),(0xF8CB),(0xF8CC),(0xF8CD),(0xF8CE),(0xF8CF), +(0xF8D0),(0xF8D1),(0xF8D2),(0xF8D3),(0xF8D4),(0xF8D5),(0xF8D6),(0xF8D7), +(0xF8D8),(0xF8D9),(0xF8DA),(0xF8DB),(0xF8DC),(0xF8DD),(0xF8DE),(0xF8DF), +(0xF8E0),(0xF8E1),(0xF8E2),(0xF8E3),(0xF8E4),(0xF8E5),(0xF8E6),(0xF8E7), +(0xF8E8),(0xF8E9),(0xF8EA),(0xF8EB),(0xF8EC),(0xF8ED),(0xF8EE),(0xF8EF), +(0xF8F0),(0xF8F1),(0xF8F2),(0xF8F3),(0xF8F4),(0xF8F5),(0xF8F6),(0xF8F7), +(0xF8F8),(0xF8F9),(0xF8FA),(0xF8FB),(0xF8FC), +(0xF940),(0xF941),(0xF942),(0xF943),(0xF944),(0xF945),(0xF946),(0xF947), +(0xF948),(0xF949),(0xF94A),(0xF94B),(0xF94C),(0xF94D),(0xF94E),(0xF94F), +(0xF950),(0xF951),(0xF952),(0xF953),(0xF954),(0xF955),(0xF956),(0xF957), +(0xF958),(0xF959),(0xF95A),(0xF95B),(0xF95C),(0xF95D),(0xF95E),(0xF95F), +(0xF960),(0xF961),(0xF962),(0xF963),(0xF964),(0xF965),(0xF966),(0xF967), +(0xF968),(0xF969),(0xF96A),(0xF96B),(0xF96C),(0xF96D),(0xF96E),(0xF96F), +(0xF970),(0xF971),(0xF972),(0xF973),(0xF974),(0xF975),(0xF976),(0xF977), +(0xF978),(0xF979),(0xF97A),(0xF97B),(0xF97C),(0xF97D),(0xF97E), +(0xF980),(0xF981),(0xF982),(0xF983),(0xF984),(0xF985),(0xF986),(0xF987), +(0xF988),(0xF989),(0xF98A),(0xF98B),(0xF98C),(0xF98D),(0xF98E),(0xF98F), +(0xF990),(0xF991),(0xF992),(0xF993),(0xF994),(0xF995),(0xF996),(0xF997), +(0xF998),(0xF999),(0xF99A),(0xF99B),(0xF99C),(0xF99D),(0xF99E),(0xF99F), +(0xF9A0),(0xF9A1),(0xF9A2),(0xF9A3),(0xF9A4),(0xF9A5),(0xF9A6),(0xF9A7), +(0xF9A8),(0xF9A9),(0xF9AA),(0xF9AB),(0xF9AC),(0xF9AD),(0xF9AE),(0xF9AF), +(0xF9B0),(0xF9B1),(0xF9B2),(0xF9B3),(0xF9B4),(0xF9B5),(0xF9B6),(0xF9B7), +(0xF9B8),(0xF9B9),(0xF9BA),(0xF9BB),(0xF9BC),(0xF9BD),(0xF9BE),(0xF9BF), +(0xF9C0),(0xF9C1),(0xF9C2),(0xF9C3),(0xF9C4),(0xF9C5),(0xF9C6),(0xF9C7), +(0xF9C8),(0xF9C9),(0xF9CA),(0xF9CB),(0xF9CC),(0xF9CD),(0xF9CE),(0xF9CF), +(0xF9D0),(0xF9D1),(0xF9D2),(0xF9D3),(0xF9D4),(0xF9D5),(0xF9D6),(0xF9D7), +(0xF9D8),(0xF9D9),(0xF9DA),(0xF9DB),(0xF9DC),(0xF9DD),(0xF9DE),(0xF9DF), +(0xF9E0),(0xF9E1),(0xF9E2),(0xF9E3),(0xF9E4),(0xF9E5),(0xF9E6),(0xF9E7), +(0xF9E8),(0xF9E9),(0xF9EA),(0xF9EB),(0xF9EC),(0xF9ED),(0xF9EE),(0xF9EF), +(0xF9F0),(0xF9F1),(0xF9F2),(0xF9F3),(0xF9F4),(0xF9F5),(0xF9F6),(0xF9F7), +(0xF9F8),(0xF9F9),(0xF9FA),(0xF9FB),(0xF9FC); +SELECT HEX(c1) FROM t1; +HEX(c1) +05 +7E +815C +815F +8160 +8161 +817C +8191 +8192 +81CA +8740 +8741 +8742 +8743 +8744 +8745 +8746 +8747 +8748 +8749 +874A +874B +874C +874D +874E +874F +8750 +8751 +8752 +8753 +8754 +8755 +8756 +8757 +8758 +8759 +875A +875B +875C +875D +875F +8760 +8761 +8762 +8763 +8764 +8765 +8766 +8767 +8768 +8769 +876A +876B +876C +876D +876E +876F +8770 +8771 +8772 +8773 +8774 +8775 +877E +8780 +8781 +8782 +8783 +8784 +8785 +8786 +8787 +8788 +8789 +878A +878B +878C +878D +878E +878F +8790 +8791 +8792 +8793 +8794 +8795 +8796 +8797 +8798 +8799 +879A +879B +879C +ED40 +ED41 +ED42 +ED43 +ED44 +ED45 +ED46 +ED47 +ED48 +ED49 +ED4A +ED4B +ED4C +ED4D +ED4E +ED4F +ED50 +ED51 +ED52 +ED53 +ED54 +ED55 +ED56 +ED57 +ED58 +ED59 +ED5A +ED5B +ED5C +ED5D +ED5E +ED5F +ED60 +ED61 +ED62 +ED63 +ED64 +ED65 +ED66 +ED67 +ED68 +ED69 +ED6A +ED6B +ED6C +ED6D +ED6E +ED6F +ED70 +ED71 +ED72 +ED73 +ED74 +ED75 +ED76 +ED77 +ED78 +ED79 +ED7A +ED7B +ED7C +ED7D +ED7E +ED80 +ED81 +ED82 +ED83 +ED84 +ED85 +ED86 +ED87 +ED88 +ED89 +ED8A +ED8B +ED8C +ED8D +ED8E +ED8F +ED90 +ED91 +ED92 +ED93 +ED94 +ED95 +ED96 +ED97 +ED98 +ED99 +ED9A +ED9B +ED9C +ED9D +ED9E +ED9F +EDA0 +EDA1 +EDA2 +EDA3 +EDA4 +EDA5 +EDA6 +EDA7 +EDA8 +EDA9 +EDAA +EDAB +EDAC +EDAD +EDAE +EDAF +EDB0 +EDB1 +EDB2 +EDB3 +EDB4 +EDB5 +EDB6 +EDB7 +EDB8 +EDB9 +EDBA +EDBB +EDBC +EDBD +EDBE +EDBF +EDC0 +EDC1 +EDC2 +EDC3 +EDC4 +EDC5 +EDC6 +EDC7 +EDC8 +EDC9 +EDCA +EDCB +EDCC +EDCD +EDCE +EDCF +EDD0 +EDD1 +EDD2 +EDD3 +EDD4 +EDD5 +EDD6 +EDD7 +EDD8 +EDD9 +EDDA +EDDB +EDDC +EDDD +EDDE +EDDF +EDE0 +EDE1 +EDE2 +EDE3 +EDE4 +EDE5 +EDE6 +EDE7 +EDE8 +EDE9 +EDEA +EDEB +EDEC +EDED +EDEE +EDEF +EDF0 +EDF1 +EDF2 +EDF3 +EDF4 +EDF5 +EDF6 +EDF7 +EDF8 +EDF9 +EDFA +EDFB +EDFC +EE40 +EE41 +EE42 +EE43 +EE44 +EE45 +EE46 +EE47 +EE48 +EE49 +EE4A +EE4B +EE4C +EE4D +EE4E +EE4F +EE50 +EE51 +EE52 +EE53 +EE54 +EE55 +EE56 +EE57 +EE58 +EE59 +EE5A +EE5B +EE5C +EE5D +EE5E +EE5F +EE60 +EE61 +EE62 +EE63 +EE64 +EE65 +EE66 +EE67 +EE68 +EE69 +EE6A +EE6B +EE6C +EE6D +EE6E +EE6F +EE70 +EE71 +EE72 +EE73 +EE74 +EE75 +EE76 +EE77 +EE78 +EE79 +EE7A +EE7B +EE7C +EE7D +EE7E +EE80 +EE81 +EE82 +EE83 +EE84 +EE85 +EE86 +EE87 +EE88 +EE89 +EE8A +EE8B +EE8C +EE8D +EE8E +EE8F +EE90 +EE91 +EE92 +EE93 +EE94 +EE95 +EE96 +EE97 +EE98 +EE99 +EE9A +EE9B +EE9C +EE9D +EE9E +EE9F +EEA0 +EEA1 +EEA2 +EEA3 +EEA4 +EEA5 +EEA6 +EEA7 +EEA8 +EEA9 +EEAA +EEAB +EEAC +EEAD +EEAE +EEAF +EEB0 +EEB1 +EEB2 +EEB3 +EEB4 +EEB5 +EEB6 +EEB7 +EEB8 +EEB9 +EEBA +EEBB +EEBC +EEBD +EEBE +EEBF +EEC0 +EEC1 +EEC2 +EEC3 +EEC4 +EEC5 +EEC6 +EEC7 +EEC8 +EEC9 +EECA +EECB +EECC +EECD +EECE +EECF +EED0 +EED1 +EED2 +EED3 +EED4 +EED5 +EED6 +EED7 +EED8 +EED9 +EEDA +EEDB +EEDC +EEDD +EEDE +EEDF +EEE0 +EEE1 +EEE2 +EEE3 +EEE4 +EEE5 +EEE6 +EEE7 +EEE8 +EEE9 +EEEA +EEEB +EEEC +EEEF +EEF0 +EEF1 +EEF2 +EEF3 +EEF4 +EEF5 +EEF6 +EEF7 +EEF8 +EEF9 +EEFA +EEFB +EEFC +FA40 +FA41 +FA42 +FA43 +FA44 +FA45 +FA46 +FA47 +FA48 +FA49 +FA4A +FA4B +FA4C +FA4D +FA4E +FA4F +FA50 +FA51 +FA52 +FA53 +FA54 +FA55 +FA56 +FA57 +FA58 +FA59 +FA5A +FA5B +FA5C +FA5D +FA5E +FA5F +FA60 +FA61 +FA62 +FA63 +FA64 +FA65 +FA66 +FA67 +FA68 +FA69 +FA6A +FA6B +FA6C +FA6D +FA6E +FA6F +FA70 +FA71 +FA72 +FA73 +FA74 +FA75 +FA76 +FA77 +FA78 +FA79 +FA7A +FA7B +FA7C +FA7D +FA7E +FA80 +FA81 +FA82 +FA83 +FA84 +FA85 +FA86 +FA87 +FA88 +FA89 +FA8A +FA8B +FA8C +FA8D +FA8E +FA8F +FA90 +FA91 +FA92 +FA93 +FA94 +FA95 +FA96 +FA97 +FA98 +FA99 +FA9A +FA9B +FA9C +FA9D +FA9E +FA9F +FAA0 +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FB40 +FB41 +FB42 +FB43 +FB44 +FB45 +FB46 +FB47 +FB48 +FB49 +FB4A +FB4B +FB4C +FB4D +FB4E +FB4F +FB50 +FB51 +FB52 +FB53 +FB54 +FB55 +FB56 +FB57 +FB58 +FB59 +FB5A +FB5B +FB5C +FB5D +FB5E +FB5F +FB60 +FB61 +FB62 +FB63 +FB64 +FB65 +FB66 +FB67 +FB68 +FB69 +FB6A +FB6B +FB6C +FB6D +FB6E +FB6F +FB70 +FB71 +FB72 +FB73 +FB74 +FB75 +FB76 +FB77 +FB78 +FB79 +FB7A +FB7B +FB7C +FB7D +FB7E +FB80 +FB81 +FB82 +FB83 +FB84 +FB85 +FB86 +FB87 +FB88 +FB89 +FB8A +FB8B +FB8C +FB8D +FB8E +FB8F +FB90 +FB91 +FB92 +FB93 +FB94 +FB95 +FB96 +FB97 +FB98 +FB99 +FB9A +FB9B +FB9C +FB9D +FB9E +FB9F +FBA0 +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FC40 +FC41 +FC42 +FC43 +FC44 +FC45 +FC46 +FC47 +FC48 +FC49 +FC4A +FC4B +F040 +F041 +F042 +F043 +F044 +F045 +F046 +F047 +F048 +F049 +F04A +F04B +F04C +F04D +F04E +F04F +F050 +F051 +F052 +F053 +F054 +F055 +F056 +F057 +F058 +F059 +F05A +F05B +F05C +F05D +F05E +F05F +F060 +F061 +F062 +F063 +F064 +F065 +F066 +F067 +F068 +F069 +F06A +F06B +F06C +F06D +F06E +F06F +F070 +F071 +F072 +F073 +F074 +F075 +F076 +F077 +F078 +F079 +F07A +F07B +F07C +F07D +F07E +F080 +F081 +F082 +F083 +F084 +F085 +F086 +F087 +F088 +F089 +F08A +F08B +F08C +F08D +F08E +F08F +F090 +F091 +F092 +F093 +F094 +F095 +F096 +F097 +F098 +F099 +F09A +F09B +F09C +F09D +F09E +F09F +F0A0 +F0A1 +F0A2 +F0A3 +F0A4 +F0A5 +F0A6 +F0A7 +F0A8 +F0A9 +F0AA +F0AB +F0AC +F0AD +F0AE +F0AF +F0B0 +F0B1 +F0B2 +F0B3 +F0B4 +F0B5 +F0B6 +F0B7 +F0B8 +F0B9 +F0BA +F0BB +F0BC +F0BD +F0BE +F0BF +F0C0 +F0C1 +F0C2 +F0C3 +F0C4 +F0C5 +F0C6 +F0C7 +F0C8 +F0C9 +F0CA +F0CB +F0CC +F0CD +F0CE +F0CF +F0D0 +F0D1 +F0D2 +F0D3 +F0D4 +F0D5 +F0D6 +F0D7 +F0D8 +F0D9 +F0DA +F0DB +F0DC +F0DD +F0DE +F0DF +F0E0 +F0E1 +F0E2 +F0E3 +F0E4 +F0E5 +F0E6 +F0E7 +F0E8 +F0E9 +F0EA +F0EB +F0EC +F0ED +F0EE +F0EF +F0F0 +F0F1 +F0F2 +F0F3 +F0F4 +F0F5 +F0F6 +F0F7 +F0F8 +F0F9 +F0FA +F0FB +F0FC +F140 +F141 +F142 +F143 +F144 +F145 +F146 +F147 +F148 +F149 +F14A +F14B +F14C +F14D +F14E +F14F +F150 +F151 +F152 +F153 +F154 +F155 +F156 +F157 +F158 +F159 +F15A +F15B +F15C +F15D +F15E +F15F +F160 +F161 +F162 +F163 +F164 +F165 +F166 +F167 +F168 +F169 +F16A +F16B +F16C +F16D +F16E +F16F +F170 +F171 +F172 +F173 +F174 +F175 +F176 +F177 +F178 +F179 +F17A +F17B +F17C +F17D +F17E +F180 +F181 +F182 +F183 +F184 +F185 +F186 +F187 +F188 +F189 +F18A +F18B +F18C +F18D +F18E +F18F +F190 +F191 +F192 +F193 +F194 +F195 +F196 +F197 +F198 +F199 +F19A +F19B +F19C +F19D +F19E +F19F +F1A0 +F1A1 +F1A2 +F1A3 +F1A4 +F1A5 +F1A6 +F1A7 +F1A8 +F1A9 +F1AA +F1AB +F1AC +F1AD +F1AE +F1AF +F1B0 +F1B1 +F1B2 +F1B3 +F1B4 +F1B5 +F1B6 +F1B7 +F1B8 +F1B9 +F1BA +F1BB +F1BC +F1BD +F1BE +F1BF +F1C0 +F1C1 +F1C2 +F1C3 +F1C4 +F1C5 +F1C6 +F1C7 +F1C8 +F1C9 +F1CA +F1CB +F1CC +F1CD +F1CE +F1CF +F1D0 +F1D1 +F1D2 +F1D3 +F1D4 +F1D5 +F1D6 +F1D7 +F1D8 +F1D9 +F1DA +F1DB +F1DC +F1DD +F1DE +F1DF +F1E0 +F1E1 +F1E2 +F1E3 +F1E4 +F1E5 +F1E6 +F1E7 +F1E8 +F1E9 +F1EA +F1EB +F1EC +F1ED +F1EE +F1EF +F1F0 +F1F1 +F1F2 +F1F3 +F1F4 +F1F5 +F1F6 +F1F7 +F1F8 +F1F9 +F1FA +F1FB +F1FC +F240 +F241 +F242 +F243 +F244 +F245 +F246 +F247 +F248 +F249 +F24A +F24B +F24C +F24D +F24E +F24F +F250 +F251 +F252 +F253 +F254 +F255 +F256 +F257 +F258 +F259 +F25A +F25B +F25C +F25D +F25E +F25F +F260 +F261 +F262 +F263 +F264 +F265 +F266 +F267 +F268 +F269 +F26A +F26B +F26C +F26D +F26E +F26F +F270 +F271 +F272 +F273 +F274 +F275 +F276 +F277 +F278 +F279 +F27A +F27B +F27C +F27D +F27E +F280 +F281 +F282 +F283 +F284 +F285 +F286 +F287 +F288 +F289 +F28A +F28B +F28C +F28D +F28E +F28F +F290 +F291 +F292 +F293 +F294 +F295 +F296 +F297 +F298 +F299 +F29A +F29B +F29C +F29D +F29E +F29F +F2A0 +F2A1 +F2A2 +F2A3 +F2A4 +F2A5 +F2A6 +F2A7 +F2A8 +F2A9 +F2AA +F2AB +F2AC +F2AD +F2AE +F2AF +F2B0 +F2B1 +F2B2 +F2B3 +F2B4 +F2B5 +F2B6 +F2B7 +F2B8 +F2B9 +F2BA +F2BB +F2BC +F2BD +F2BE +F2BF +F2C0 +F2C1 +F2C2 +F2C3 +F2C4 +F2C5 +F2C6 +F2C7 +F2C8 +F2C9 +F2CA +F2CB +F2CC +F2CD +F2CE +F2CF +F2D0 +F2D1 +F2D2 +F2D3 +F2D4 +F2D5 +F2D6 +F2D7 +F2D8 +F2D9 +F2DA +F2DB +F2DC +F2DD +F2DE +F2DF +F2E0 +F2E1 +F2E2 +F2E3 +F2E4 +F2E5 +F2E6 +F2E7 +F2E8 +F2E9 +F2EA +F2EB +F2EC +F2ED +F2EE +F2EF +F2F0 +F2F1 +F2F2 +F2F3 +F2F4 +F2F5 +F2F6 +F2F7 +F2F8 +F2F9 +F2FA +F2FB +F2FC +F340 +F341 +F342 +F343 +F344 +F345 +F346 +F347 +F348 +F349 +F34A +F34B +F34C +F34D +F34E +F34F +F350 +F351 +F352 +F353 +F354 +F355 +F356 +F357 +F358 +F359 +F35A +F35B +F35C +F35D +F35E +F35F +F360 +F361 +F362 +F363 +F364 +F365 +F366 +F367 +F368 +F369 +F36A +F36B +F36C +F36D +F36E +F36F +F370 +F371 +F372 +F373 +F374 +F375 +F376 +F377 +F378 +F379 +F37A +F37B +F37C +F37D +F37E +F380 +F381 +F382 +F383 +F384 +F385 +F386 +F387 +F388 +F389 +F38A +F38B +F38C +F38D +F38E +F38F +F390 +F391 +F392 +F393 +F394 +F395 +F396 +F397 +F398 +F399 +F39A +F39B +F39C +F39D +F39E +F39F +F3A0 +F3A1 +F3A2 +F3A3 +F3A4 +F3A5 +F3A6 +F3A7 +F3A8 +F3A9 +F3AA +F3AB +F3AC +F3AD +F3AE +F3AF +F3B0 +F3B1 +F3B2 +F3B3 +F3B4 +F3B5 +F3B6 +F3B7 +F3B8 +F3B9 +F3BA +F3BB +F3BC +F3BD +F3BE +F3BF +F3C0 +F3C1 +F3C2 +F3C3 +F3C4 +F3C5 +F3C6 +F3C7 +F3C8 +F3C9 +F3CA +F3CB +F3CC +F3CD +F3CE +F3CF +F3D0 +F3D1 +F3D2 +F3D3 +F3D4 +F3D5 +F3D6 +F3D7 +F3D8 +F3D9 +F3DA +F3DB +F3DC +F3DD +F3DE +F3DF +F3E0 +F3E1 +F3E2 +F3E3 +F3E4 +F3E5 +F3E6 +F3E7 +F3E8 +F3E9 +F3EA +F3EB +F3EC +F3ED +F3EE +F3EF +F3F0 +F3F1 +F3F2 +F3F3 +F3F4 +F3F5 +F3F6 +F3F7 +F3F8 +F3F9 +F3FA +F3FB +F3FC +F440 +F441 +F442 +F443 +F444 +F445 +F446 +F447 +F448 +F449 +F44A +F44B +F44C +F44D +F44E +F44F +F450 +F451 +F452 +F453 +F454 +F455 +F456 +F457 +F458 +F459 +F45A +F45B +F45C +F45D +F45E +F45F +F460 +F461 +F462 +F463 +F464 +F465 +F466 +F467 +F468 +F469 +F46A +F46B +F46C +F46D +F46E +F46F +F470 +F471 +F472 +F473 +F474 +F475 +F476 +F477 +F478 +F479 +F47A +F47B +F47C +F47D +F47E +F480 +F481 +F482 +F483 +F484 +F485 +F486 +F487 +F488 +F489 +F48A +F48B +F48C +F48D +F48E +F48F +F490 +F491 +F492 +F493 +F494 +F495 +F496 +F497 +F498 +F499 +F49A +F49B +F49C +F49D +F49E +F49F +F4A0 +F4A1 +F4A2 +F4A3 +F4A4 +F4A5 +F4A6 +F4A7 +F4A8 +F4A9 +F4AA +F4AB +F4AC +F4AD +F4AE +F4AF +F4B0 +F4B1 +F4B2 +F4B3 +F4B4 +F4B5 +F4B6 +F4B7 +F4B8 +F4B9 +F4BA +F4BB +F4BC +F4BD +F4BE +F4BF +F4C0 +F4C1 +F4C2 +F4C3 +F4C4 +F4C5 +F4C6 +F4C7 +F4C8 +F4C9 +F4CA +F4CB +F4CC +F4CD +F4CE +F4CF +F4D0 +F4D1 +F4D2 +F4D3 +F4D4 +F4D5 +F4D6 +F4D7 +F4D8 +F4D9 +F4DA +F4DB +F4DC +F4DD +F4DE +F4DF +F4E0 +F4E1 +F4E2 +F4E3 +F4E4 +F4E5 +F4E6 +F4E7 +F4E8 +F4E9 +F4EA +F4EB +F4EC +F4ED +F4EE +F4EF +F4F0 +F4F1 +F4F2 +F4F3 +F4F4 +F4F5 +F4F6 +F4F7 +F4F8 +F4F9 +F4FA +F4FB +F4FC +F540 +F541 +F542 +F543 +F544 +F545 +F546 +F547 +F548 +F549 +F54A +F54B +F54C +F54D +F54E +F54F +F550 +F551 +F552 +F553 +F554 +F555 +F556 +F557 +F558 +F559 +F55A +F55B +F55C +F55D +F55E +F55F +F560 +F561 +F562 +F563 +F564 +F565 +F566 +F567 +F568 +F569 +F56A +F56B +F56C +F56D +F56E +F56F +F570 +F571 +F572 +F573 +F574 +F575 +F576 +F577 +F578 +F579 +F57A +F57B +F57C +F57D +F57E +F580 +F581 +F582 +F583 +F584 +F585 +F586 +F587 +F588 +F589 +F58A +F58B +F58C +F58D +F58E +F58F +F590 +F591 +F592 +F593 +F594 +F595 +F596 +F597 +F598 +F599 +F59A +F59B +F59C +F59D +F59E +F59F +F5A0 +F5A1 +F5A2 +F5A3 +F5A4 +F5A5 +F5A6 +F5A7 +F5A8 +F5A9 +F5AA +F5AB +F5AC +F5AD +F5AE +F5AF +F5B0 +F5B1 +F5B2 +F5B3 +F5B4 +F5B5 +F5B6 +F5B7 +F5B8 +F5B9 +F5BA +F5BB +F5BC +F5BD +F5BE +F5BF +F5C0 +F5C1 +F5C2 +F5C3 +F5C4 +F5C5 +F5C6 +F5C7 +F5C8 +F5C9 +F5CA +F5CB +F5CC +F5CD +F5CE +F5CF +F5D0 +F5D1 +F5D2 +F5D3 +F5D4 +F5D5 +F5D6 +F5D7 +F5D8 +F5D9 +F5DA +F5DB +F5DC +F5DD +F5DE +F5DF +F5E0 +F5E1 +F5E2 +F5E3 +F5E4 +F5E5 +F5E6 +F5E7 +F5E8 +F5E9 +F5EA +F5EB +F5EC +F5ED +F5EE +F5EF +F5F0 +F5F1 +F5F2 +F5F3 +F5F4 +F5F5 +F5F6 +F5F7 +F5F8 +F5F9 +F5FA +F5FB +F5FC +F640 +F641 +F642 +F643 +F644 +F645 +F646 +F647 +F648 +F649 +F64A +F64B +F64C +F64D +F64E +F64F +F650 +F651 +F652 +F653 +F654 +F655 +F656 +F657 +F658 +F659 +F65A +F65B +F65C +F65D +F65E +F65F +F660 +F661 +F662 +F663 +F664 +F665 +F666 +F667 +F668 +F669 +F66A +F66B +F66C +F66D +F66E +F66F +F670 +F671 +F672 +F673 +F674 +F675 +F676 +F677 +F678 +F679 +F67A +F67B +F67C +F67D +F67E +F680 +F681 +F682 +F683 +F684 +F685 +F686 +F687 +F688 +F689 +F68A +F68B +F68C +F68D +F68E +F68F +F690 +F691 +F692 +F693 +F694 +F695 +F696 +F697 +F698 +F699 +F69A +F69B +F69C +F69D +F69E +F69F +F6A0 +F6A1 +F6A2 +F6A3 +F6A4 +F6A5 +F6A6 +F6A7 +F6A8 +F6A9 +F6AA +F6AB +F6AC +F6AD +F6AE +F6AF +F6B0 +F6B1 +F6B2 +F6B3 +F6B4 +F6B5 +F6B6 +F6B7 +F6B8 +F6B9 +F6BA +F6BB +F6BC +F6BD +F6BE +F6BF +F6C0 +F6C1 +F6C2 +F6C3 +F6C4 +F6C5 +F6C6 +F6C7 +F6C8 +F6C9 +F6CA +F6CB +F6CC +F6CD +F6CE +F6CF +F6D0 +F6D1 +F6D2 +F6D3 +F6D4 +F6D5 +F6D6 +F6D7 +F6D8 +F6D9 +F6DA +F6DB +F6DC +F6DD +F6DE +F6DF +F6E0 +F6E1 +F6E2 +F6E3 +F6E4 +F6E5 +F6E6 +F6E7 +F6E8 +F6E9 +F6EA +F6EB +F6EC +F6ED +F6EE +F6EF +F6F0 +F6F1 +F6F2 +F6F3 +F6F4 +F6F5 +F6F6 +F6F7 +F6F8 +F6F9 +F6FA +F6FB +F6FC +F740 +F741 +F742 +F743 +F744 +F745 +F746 +F747 +F748 +F749 +F74A +F74B +F74C +F74D +F74E +F74F +F750 +F751 +F752 +F753 +F754 +F755 +F756 +F757 +F758 +F759 +F75A +F75B +F75C +F75D +F75E +F75F +F760 +F761 +F762 +F763 +F764 +F765 +F766 +F767 +F768 +F769 +F76A +F76B +F76C +F76D +F76E +F76F +F770 +F771 +F772 +F773 +F774 +F775 +F776 +F777 +F778 +F779 +F77A +F77B +F77C +F77D +F77E +F780 +F781 +F782 +F783 +F784 +F785 +F786 +F787 +F788 +F789 +F78A +F78B +F78C +F78D +F78E +F78F +F790 +F791 +F792 +F793 +F794 +F795 +F796 +F797 +F798 +F799 +F79A +F79B +F79C +F79D +F79E +F79F +F7A0 +F7A1 +F7A2 +F7A3 +F7A4 +F7A5 +F7A6 +F7A7 +F7A8 +F7A9 +F7AA +F7AB +F7AC +F7AD +F7AE +F7AF +F7B0 +F7B1 +F7B2 +F7B3 +F7B4 +F7B5 +F7B6 +F7B7 +F7B8 +F7B9 +F7BA +F7BB +F7BC +F7BD +F7BE +F7BF +F7C0 +F7C1 +F7C2 +F7C3 +F7C4 +F7C5 +F7C6 +F7C7 +F7C8 +F7C9 +F7CA +F7CB +F7CC +F7CD +F7CE +F7CF +F7D0 +F7D1 +F7D2 +F7D3 +F7D4 +F7D5 +F7D6 +F7D7 +F7D8 +F7D9 +F7DA +F7DB +F7DC +F7DD +F7DE +F7DF +F7E0 +F7E1 +F7E2 +F7E3 +F7E4 +F7E5 +F7E6 +F7E7 +F7E8 +F7E9 +F7EA +F7EB +F7EC +F7ED +F7EE +F7EF +F7F0 +F7F1 +F7F2 +F7F3 +F7F4 +F7F5 +F7F6 +F7F7 +F7F8 +F7F9 +F7FA +F7FB +F7FC +F840 +F841 +F842 +F843 +F844 +F845 +F846 +F847 +F848 +F849 +F84A +F84B +F84C +F84D +F84E +F84F +F850 +F851 +F852 +F853 +F854 +F855 +F856 +F857 +F858 +F859 +F85A +F85B +F85C +F85D +F85E +F85F +F860 +F861 +F862 +F863 +F864 +F865 +F866 +F867 +F868 +F869 +F86A +F86B +F86C +F86D +F86E +F86F +F870 +F871 +F872 +F873 +F874 +F875 +F876 +F877 +F878 +F879 +F87A +F87B +F87C +F87D +F87E +F880 +F881 +F882 +F883 +F884 +F885 +F886 +F887 +F888 +F889 +F88A +F88B +F88C +F88D +F88E +F88F +F890 +F891 +F892 +F893 +F894 +F895 +F896 +F897 +F898 +F899 +F89A +F89B +F89C +F89D +F89E +F89F +F8A0 +F8A1 +F8A2 +F8A3 +F8A4 +F8A5 +F8A6 +F8A7 +F8A8 +F8A9 +F8AA +F8AB +F8AC +F8AD +F8AE +F8AF +F8B0 +F8B1 +F8B2 +F8B3 +F8B4 +F8B5 +F8B6 +F8B7 +F8B8 +F8B9 +F8BA +F8BB +F8BC +F8BD +F8BE +F8BF +F8C0 +F8C1 +F8C2 +F8C3 +F8C4 +F8C5 +F8C6 +F8C7 +F8C8 +F8C9 +F8CA +F8CB +F8CC +F8CD +F8CE +F8CF +F8D0 +F8D1 +F8D2 +F8D3 +F8D4 +F8D5 +F8D6 +F8D7 +F8D8 +F8D9 +F8DA +F8DB +F8DC +F8DD +F8DE +F8DF +F8E0 +F8E1 +F8E2 +F8E3 +F8E4 +F8E5 +F8E6 +F8E7 +F8E8 +F8E9 +F8EA +F8EB +F8EC +F8ED +F8EE +F8EF +F8F0 +F8F1 +F8F2 +F8F3 +F8F4 +F8F5 +F8F6 +F8F7 +F8F8 +F8F9 +F8FA +F8FB +F8FC +F940 +F941 +F942 +F943 +F944 +F945 +F946 +F947 +F948 +F949 +F94A +F94B +F94C +F94D +F94E +F94F +F950 +F951 +F952 +F953 +F954 +F955 +F956 +F957 +F958 +F959 +F95A +F95B +F95C +F95D +F95E +F95F +F960 +F961 +F962 +F963 +F964 +F965 +F966 +F967 +F968 +F969 +F96A +F96B +F96C +F96D +F96E +F96F +F970 +F971 +F972 +F973 +F974 +F975 +F976 +F977 +F978 +F979 +F97A +F97B +F97C +F97D +F97E +F980 +F981 +F982 +F983 +F984 +F985 +F986 +F987 +F988 +F989 +F98A +F98B +F98C +F98D +F98E +F98F +F990 +F991 +F992 +F993 +F994 +F995 +F996 +F997 +F998 +F999 +F99A +F99B +F99C +F99D +F99E +F99F +F9A0 +F9A1 +F9A2 +F9A3 +F9A4 +F9A5 +F9A6 +F9A7 +F9A8 +F9A9 +F9AA +F9AB +F9AC +F9AD +F9AE +F9AF +F9B0 +F9B1 +F9B2 +F9B3 +F9B4 +F9B5 +F9B6 +F9B7 +F9B8 +F9B9 +F9BA +F9BB +F9BC +F9BD +F9BE +F9BF +F9C0 +F9C1 +F9C2 +F9C3 +F9C4 +F9C5 +F9C6 +F9C7 +F9C8 +F9C9 +F9CA +F9CB +F9CC +F9CD +F9CE +F9CF +F9D0 +F9D1 +F9D2 +F9D3 +F9D4 +F9D5 +F9D6 +F9D7 +F9D8 +F9D9 +F9DA +F9DB +F9DC +F9DD +F9DE +F9DF +F9E0 +F9E1 +F9E2 +F9E3 +F9E4 +F9E5 +F9E6 +F9E7 +F9E8 +F9E9 +F9EA +F9EB +F9EC +F9ED +F9EE +F9EF +F9F0 +F9F1 +F9F2 +F9F3 +F9F4 +F9F5 +F9F6 +F9F7 +F9F8 +F9F9 +F9FA +F9FB +F9FC +CREATE TABLE t2 SELECT CONVERT(c1 USING ucs2) AS c1 FROM t1; +SELECT HEX(c1) FROM t2; +HEX(c1) +0005 +007E +2015 +FF3C +FF5E +2225 +FF0D +FFE0 +FFE1 +FFE2 +2460 +2461 +2462 +2463 +2464 +2465 +2466 +2467 +2468 +2469 +246A +246B +246C +246D +246E +246F +2470 +2471 +2472 +2473 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +3349 +3314 +3322 +334D +3318 +3327 +3303 +3336 +3351 +3357 +330D +3326 +3323 +332B +334A +333B +339C +339D +339E +338E +338F +33C4 +33A1 +337B +301D +301F +2116 +33CD +2121 +32A4 +32A5 +32A6 +32A7 +32A8 +3231 +3232 +3239 +337E +337D +337C +2252 +2261 +222B +222E +2211 +221A +22A5 +2220 +221F +22BF +2235 +2229 +222A +7E8A +891C +9348 +9288 +84DC +4FC9 +70BB +6631 +68C8 +92F9 +66FB +5F45 +4E28 +4EE1 +4EFC +4F00 +4F03 +4F39 +4F56 +4F92 +4F8A +4F9A +4F94 +4FCD +5040 +5022 +4FFF +501E +5046 +5070 +5042 +5094 +50F4 +50D8 +514A +5164 +519D +51BE +51EC +5215 +529C +52A6 +52C0 +52DB +5300 +5307 +5324 +5372 +5393 +53B2 +53DD +FA0E +549C +548A +54A9 +54FF +5586 +5759 +5765 +57AC +57C8 +57C7 +FA0F +FA10 +589E +58B2 +590B +5953 +595B +595D +5963 +59A4 +59BA +5B56 +5BC0 +752F +5BD8 +5BEC +5C1E +5CA6 +5CBA +5CF5 +5D27 +5D53 +FA11 +5D42 +5D6D +5DB8 +5DB9 +5DD0 +5F21 +5F34 +5F67 +5FB7 +5FDE +605D +6085 +608A +60DE +60D5 +6120 +60F2 +6111 +6137 +6130 +6198 +6213 +62A6 +63F5 +6460 +649D +64CE +654E +6600 +6615 +663B +6609 +662E +661E +6624 +6665 +6657 +6659 +FA12 +6673 +6699 +66A0 +66B2 +66BF +66FA +670E +F929 +6766 +67BB +6852 +67C0 +6801 +6844 +68CF +FA13 +6968 +FA14 +6998 +69E2 +6A30 +6A6B +6A46 +6A73 +6A7E +6AE2 +6AE4 +6BD6 +6C3F +6C5C +6C86 +6C6F +6CDA +6D04 +6D87 +6D6F +6D96 +6DAC +6DCF +6DF8 +6DF2 +6DFC +6E39 +6E5C +6E27 +6E3C +6EBF +6F88 +6FB5 +6FF5 +7005 +7007 +7028 +7085 +70AB +710F +7104 +715C +7146 +7147 +FA15 +71C1 +71FE +72B1 +72BE +7324 +FA16 +7377 +73BD +73C9 +73D6 +73E3 +73D2 +7407 +73F5 +7426 +742A +7429 +742E +7462 +7489 +749F +7501 +756F +7682 +769C +769E +769B +76A6 +FA17 +7746 +52AF +7821 +784E +7864 +787A +7930 +FA18 +FA19 +FA1A +7994 +FA1B +799B +7AD1 +7AE7 +FA1C +7AEB +7B9E +FA1D +7D48 +7D5C +7DB7 +7DA0 +7DD6 +7E52 +7F47 +7FA1 +FA1E +8301 +8362 +837F +83C7 +83F6 +8448 +84B4 +8553 +8559 +856B +FA1F +85B0 +FA20 +FA21 +8807 +88F5 +8A12 +8A37 +8A79 +8AA7 +8ABE +8ADF +FA22 +8AF6 +8B53 +8B7F +8CF0 +8CF4 +8D12 +8D76 +FA23 +8ECF +FA24 +FA25 +9067 +90DE +FA26 +9115 +9127 +91DA +91D7 +91DE +91ED +91EE +91E4 +91E5 +9206 +9210 +920A +923A +9240 +923C +924E +9259 +9251 +9239 +9267 +92A7 +9277 +9278 +92E7 +92D7 +92D9 +92D0 +FA27 +92D5 +92E0 +92D3 +9325 +9321 +92FB +FA28 +931E +92FF +931D +9302 +9370 +9357 +93A4 +93C6 +93DE +93F8 +9431 +9445 +9448 +9592 +F9DC +FA29 +969D +96AF +9733 +973B +9743 +974D +974F +9751 +9755 +9857 +9865 +FA2A +FA2B +9927 +FA2C +999E +9A4E +9AD9 +9ADC +9B75 +9B72 +9B8F +9BB1 +9BBB +9C00 +9D70 +9D6B +FA2D +9E19 +9ED1 +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +FFE2 +FFE4 +FF07 +FF02 +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +FFE2 +FFE4 +FF07 +FF02 +3231 +2116 +2121 +2235 +7E8A +891C +9348 +9288 +84DC +4FC9 +70BB +6631 +68C8 +92F9 +66FB +5F45 +4E28 +4EE1 +4EFC +4F00 +4F03 +4F39 +4F56 +4F92 +4F8A +4F9A +4F94 +4FCD +5040 +5022 +4FFF +501E +5046 +5070 +5042 +5094 +50F4 +50D8 +514A +5164 +519D +51BE +51EC +5215 +529C +52A6 +52C0 +52DB +5300 +5307 +5324 +5372 +5393 +53B2 +53DD +FA0E +549C +548A +54A9 +54FF +5586 +5759 +5765 +57AC +57C8 +57C7 +FA0F +FA10 +589E +58B2 +590B +5953 +595B +595D +5963 +59A4 +59BA +5B56 +5BC0 +752F +5BD8 +5BEC +5C1E +5CA6 +5CBA +5CF5 +5D27 +5D53 +FA11 +5D42 +5D6D +5DB8 +5DB9 +5DD0 +5F21 +5F34 +5F67 +5FB7 +5FDE +605D +6085 +608A +60DE +60D5 +6120 +60F2 +6111 +6137 +6130 +6198 +6213 +62A6 +63F5 +6460 +649D +64CE +654E +6600 +6615 +663B +6609 +662E +661E +6624 +6665 +6657 +6659 +FA12 +6673 +6699 +66A0 +66B2 +66BF +66FA +670E +F929 +6766 +67BB +6852 +67C0 +6801 +6844 +68CF +FA13 +6968 +FA14 +6998 +69E2 +6A30 +6A6B +6A46 +6A73 +6A7E +6AE2 +6AE4 +6BD6 +6C3F +6C5C +6C86 +6C6F +6CDA +6D04 +6D87 +6D6F +6D96 +6DAC +6DCF +6DF8 +6DF2 +6DFC +6E39 +6E5C +6E27 +6E3C +6EBF +6F88 +6FB5 +6FF5 +7005 +7007 +7028 +7085 +70AB +710F +7104 +715C +7146 +7147 +FA15 +71C1 +71FE +72B1 +72BE +7324 +FA16 +7377 +73BD +73C9 +73D6 +73E3 +73D2 +7407 +73F5 +7426 +742A +7429 +742E +7462 +7489 +749F +7501 +756F +7682 +769C +769E +769B +76A6 +FA17 +7746 +52AF +7821 +784E +7864 +787A +7930 +FA18 +FA19 +FA1A +7994 +FA1B +799B +7AD1 +7AE7 +FA1C +7AEB +7B9E +FA1D +7D48 +7D5C +7DB7 +7DA0 +7DD6 +7E52 +7F47 +7FA1 +FA1E +8301 +8362 +837F +83C7 +83F6 +8448 +84B4 +8553 +8559 +856B +FA1F +85B0 +FA20 +FA21 +8807 +88F5 +8A12 +8A37 +8A79 +8AA7 +8ABE +8ADF +FA22 +8AF6 +8B53 +8B7F +8CF0 +8CF4 +8D12 +8D76 +FA23 +8ECF +FA24 +FA25 +9067 +90DE +FA26 +9115 +9127 +91DA +91D7 +91DE +91ED +91EE +91E4 +91E5 +9206 +9210 +920A +923A +9240 +923C +924E +9259 +9251 +9239 +9267 +92A7 +9277 +9278 +92E7 +92D7 +92D9 +92D0 +FA27 +92D5 +92E0 +92D3 +9325 +9321 +92FB +FA28 +931E +92FF +931D +9302 +9370 +9357 +93A4 +93C6 +93DE +93F8 +9431 +9445 +9448 +9592 +F9DC +FA29 +969D +96AF +9733 +973B +9743 +974D +974F +9751 +9755 +9857 +9865 +FA2A +FA2B +9927 +FA2C +999E +9A4E +9AD9 +9ADC +9B75 +9B72 +9B8F +9BB1 +9BBB +9C00 +9D70 +9D6B +FA2D +9E19 +9ED1 +E000 +E001 +E002 +E003 +E004 +E005 +E006 +E007 +E008 +E009 +E00A +E00B +E00C +E00D +E00E +E00F +E010 +E011 +E012 +E013 +E014 +E015 +E016 +E017 +E018 +E019 +E01A +E01B +E01C +E01D +E01E +E01F +E020 +E021 +E022 +E023 +E024 +E025 +E026 +E027 +E028 +E029 +E02A +E02B +E02C +E02D +E02E +E02F +E030 +E031 +E032 +E033 +E034 +E035 +E036 +E037 +E038 +E039 +E03A +E03B +E03C +E03D +E03E +E03F +E040 +E041 +E042 +E043 +E044 +E045 +E046 +E047 +E048 +E049 +E04A +E04B +E04C +E04D +E04E +E04F +E050 +E051 +E052 +E053 +E054 +E055 +E056 +E057 +E058 +E059 +E05A +E05B +E05C +E05D +E05E +E05F +E060 +E061 +E062 +E063 +E064 +E065 +E066 +E067 +E068 +E069 +E06A +E06B +E06C +E06D +E06E +E06F +E070 +E071 +E072 +E073 +E074 +E075 +E076 +E077 +E078 +E079 +E07A +E07B +E07C +E07D +E07E +E07F +E080 +E081 +E082 +E083 +E084 +E085 +E086 +E087 +E088 +E089 +E08A +E08B +E08C +E08D +E08E +E08F +E090 +E091 +E092 +E093 +E094 +E095 +E096 +E097 +E098 +E099 +E09A +E09B +E09C +E09D +E09E +E09F +E0A0 +E0A1 +E0A2 +E0A3 +E0A4 +E0A5 +E0A6 +E0A7 +E0A8 +E0A9 +E0AA +E0AB +E0AC +E0AD +E0AE +E0AF +E0B0 +E0B1 +E0B2 +E0B3 +E0B4 +E0B5 +E0B6 +E0B7 +E0B8 +E0B9 +E0BA +E0BB +E0BC +E0BD +E0BE +E0BF +E0C0 +E0C1 +E0C2 +E0C3 +E0C4 +E0C5 +E0C6 +E0C7 +E0C8 +E0C9 +E0CA +E0CB +E0CC +E0CD +E0CE +E0CF +E0D0 +E0D1 +E0D2 +E0D3 +E0D4 +E0D5 +E0D6 +E0D7 +E0D8 +E0D9 +E0DA +E0DB +E0DC +E0DD +E0DE +E0DF +E0E0 +E0E1 +E0E2 +E0E3 +E0E4 +E0E5 +E0E6 +E0E7 +E0E8 +E0E9 +E0EA +E0EB +E0EC +E0ED +E0EE +E0EF +E0F0 +E0F1 +E0F2 +E0F3 +E0F4 +E0F5 +E0F6 +E0F7 +E0F8 +E0F9 +E0FA +E0FB +E0FC +E0FD +E0FE +E0FF +E100 +E101 +E102 +E103 +E104 +E105 +E106 +E107 +E108 +E109 +E10A +E10B +E10C +E10D +E10E +E10F +E110 +E111 +E112 +E113 +E114 +E115 +E116 +E117 +E118 +E119 +E11A +E11B +E11C +E11D +E11E +E11F +E120 +E121 +E122 +E123 +E124 +E125 +E126 +E127 +E128 +E129 +E12A +E12B +E12C +E12D +E12E +E12F +E130 +E131 +E132 +E133 +E134 +E135 +E136 +E137 +E138 +E139 +E13A +E13B +E13C +E13D +E13E +E13F +E140 +E141 +E142 +E143 +E144 +E145 +E146 +E147 +E148 +E149 +E14A +E14B +E14C +E14D +E14E +E14F +E150 +E151 +E152 +E153 +E154 +E155 +E156 +E157 +E158 +E159 +E15A +E15B +E15C +E15D +E15E +E15F +E160 +E161 +E162 +E163 +E164 +E165 +E166 +E167 +E168 +E169 +E16A +E16B +E16C +E16D +E16E +E16F +E170 +E171 +E172 +E173 +E174 +E175 +E176 +E177 +E178 +E179 +E17A +E17B +E17C +E17D +E17E +E17F +E180 +E181 +E182 +E183 +E184 +E185 +E186 +E187 +E188 +E189 +E18A +E18B +E18C +E18D +E18E +E18F +E190 +E191 +E192 +E193 +E194 +E195 +E196 +E197 +E198 +E199 +E19A +E19B +E19C +E19D +E19E +E19F +E1A0 +E1A1 +E1A2 +E1A3 +E1A4 +E1A5 +E1A6 +E1A7 +E1A8 +E1A9 +E1AA +E1AB +E1AC +E1AD +E1AE +E1AF +E1B0 +E1B1 +E1B2 +E1B3 +E1B4 +E1B5 +E1B6 +E1B7 +E1B8 +E1B9 +E1BA +E1BB +E1BC +E1BD +E1BE +E1BF +E1C0 +E1C1 +E1C2 +E1C3 +E1C4 +E1C5 +E1C6 +E1C7 +E1C8 +E1C9 +E1CA +E1CB +E1CC +E1CD +E1CE +E1CF +E1D0 +E1D1 +E1D2 +E1D3 +E1D4 +E1D5 +E1D6 +E1D7 +E1D8 +E1D9 +E1DA +E1DB +E1DC +E1DD +E1DE +E1DF +E1E0 +E1E1 +E1E2 +E1E3 +E1E4 +E1E5 +E1E6 +E1E7 +E1E8 +E1E9 +E1EA +E1EB +E1EC +E1ED +E1EE +E1EF +E1F0 +E1F1 +E1F2 +E1F3 +E1F4 +E1F5 +E1F6 +E1F7 +E1F8 +E1F9 +E1FA +E1FB +E1FC +E1FD +E1FE +E1FF +E200 +E201 +E202 +E203 +E204 +E205 +E206 +E207 +E208 +E209 +E20A +E20B +E20C +E20D +E20E +E20F +E210 +E211 +E212 +E213 +E214 +E215 +E216 +E217 +E218 +E219 +E21A +E21B +E21C +E21D +E21E +E21F +E220 +E221 +E222 +E223 +E224 +E225 +E226 +E227 +E228 +E229 +E22A +E22B +E22C +E22D +E22E +E22F +E230 +E231 +E232 +E233 +E234 +E235 +E236 +E237 +E238 +E239 +E23A +E23B +E23C +E23D +E23E +E23F +E240 +E241 +E242 +E243 +E244 +E245 +E246 +E247 +E248 +E249 +E24A +E24B +E24C +E24D +E24E +E24F +E250 +E251 +E252 +E253 +E254 +E255 +E256 +E257 +E258 +E259 +E25A +E25B +E25C +E25D +E25E +E25F +E260 +E261 +E262 +E263 +E264 +E265 +E266 +E267 +E268 +E269 +E26A +E26B +E26C +E26D +E26E +E26F +E270 +E271 +E272 +E273 +E274 +E275 +E276 +E277 +E278 +E279 +E27A +E27B +E27C +E27D +E27E +E27F +E280 +E281 +E282 +E283 +E284 +E285 +E286 +E287 +E288 +E289 +E28A +E28B +E28C +E28D +E28E +E28F +E290 +E291 +E292 +E293 +E294 +E295 +E296 +E297 +E298 +E299 +E29A +E29B +E29C +E29D +E29E +E29F +E2A0 +E2A1 +E2A2 +E2A3 +E2A4 +E2A5 +E2A6 +E2A7 +E2A8 +E2A9 +E2AA +E2AB +E2AC +E2AD +E2AE +E2AF +E2B0 +E2B1 +E2B2 +E2B3 +E2B4 +E2B5 +E2B6 +E2B7 +E2B8 +E2B9 +E2BA +E2BB +E2BC +E2BD +E2BE +E2BF +E2C0 +E2C1 +E2C2 +E2C3 +E2C4 +E2C5 +E2C6 +E2C7 +E2C8 +E2C9 +E2CA +E2CB +E2CC +E2CD +E2CE +E2CF +E2D0 +E2D1 +E2D2 +E2D3 +E2D4 +E2D5 +E2D6 +E2D7 +E2D8 +E2D9 +E2DA +E2DB +E2DC +E2DD +E2DE +E2DF +E2E0 +E2E1 +E2E2 +E2E3 +E2E4 +E2E5 +E2E6 +E2E7 +E2E8 +E2E9 +E2EA +E2EB +E2EC +E2ED +E2EE +E2EF +E2F0 +E2F1 +E2F2 +E2F3 +E2F4 +E2F5 +E2F6 +E2F7 +E2F8 +E2F9 +E2FA +E2FB +E2FC +E2FD +E2FE +E2FF +E300 +E301 +E302 +E303 +E304 +E305 +E306 +E307 +E308 +E309 +E30A +E30B +E30C +E30D +E30E +E30F +E310 +E311 +E312 +E313 +E314 +E315 +E316 +E317 +E318 +E319 +E31A +E31B +E31C +E31D +E31E +E31F +E320 +E321 +E322 +E323 +E324 +E325 +E326 +E327 +E328 +E329 +E32A +E32B +E32C +E32D +E32E +E32F +E330 +E331 +E332 +E333 +E334 +E335 +E336 +E337 +E338 +E339 +E33A +E33B +E33C +E33D +E33E +E33F +E340 +E341 +E342 +E343 +E344 +E345 +E346 +E347 +E348 +E349 +E34A +E34B +E34C +E34D +E34E +E34F +E350 +E351 +E352 +E353 +E354 +E355 +E356 +E357 +E358 +E359 +E35A +E35B +E35C +E35D +E35E +E35F +E360 +E361 +E362 +E363 +E364 +E365 +E366 +E367 +E368 +E369 +E36A +E36B +E36C +E36D +E36E +E36F +E370 +E371 +E372 +E373 +E374 +E375 +E376 +E377 +E378 +E379 +E37A +E37B +E37C +E37D +E37E +E37F +E380 +E381 +E382 +E383 +E384 +E385 +E386 +E387 +E388 +E389 +E38A +E38B +E38C +E38D +E38E +E38F +E390 +E391 +E392 +E393 +E394 +E395 +E396 +E397 +E398 +E399 +E39A +E39B +E39C +E39D +E39E +E39F +E3A0 +E3A1 +E3A2 +E3A3 +E3A4 +E3A5 +E3A6 +E3A7 +E3A8 +E3A9 +E3AA +E3AB +E3AC +E3AD +E3AE +E3AF +E3B0 +E3B1 +E3B2 +E3B3 +E3B4 +E3B5 +E3B6 +E3B7 +E3B8 +E3B9 +E3BA +E3BB +E3BC +E3BD +E3BE +E3BF +E3C0 +E3C1 +E3C2 +E3C3 +E3C4 +E3C5 +E3C6 +E3C7 +E3C8 +E3C9 +E3CA +E3CB +E3CC +E3CD +E3CE +E3CF +E3D0 +E3D1 +E3D2 +E3D3 +E3D4 +E3D5 +E3D6 +E3D7 +E3D8 +E3D9 +E3DA +E3DB +E3DC +E3DD +E3DE +E3DF +E3E0 +E3E1 +E3E2 +E3E3 +E3E4 +E3E5 +E3E6 +E3E7 +E3E8 +E3E9 +E3EA +E3EB +E3EC +E3ED +E3EE +E3EF +E3F0 +E3F1 +E3F2 +E3F3 +E3F4 +E3F5 +E3F6 +E3F7 +E3F8 +E3F9 +E3FA +E3FB +E3FC +E3FD +E3FE +E3FF +E400 +E401 +E402 +E403 +E404 +E405 +E406 +E407 +E408 +E409 +E40A +E40B +E40C +E40D +E40E +E40F +E410 +E411 +E412 +E413 +E414 +E415 +E416 +E417 +E418 +E419 +E41A +E41B +E41C +E41D +E41E +E41F +E420 +E421 +E422 +E423 +E424 +E425 +E426 +E427 +E428 +E429 +E42A +E42B +E42C +E42D +E42E +E42F +E430 +E431 +E432 +E433 +E434 +E435 +E436 +E437 +E438 +E439 +E43A +E43B +E43C +E43D +E43E +E43F +E440 +E441 +E442 +E443 +E444 +E445 +E446 +E447 +E448 +E449 +E44A +E44B +E44C +E44D +E44E +E44F +E450 +E451 +E452 +E453 +E454 +E455 +E456 +E457 +E458 +E459 +E45A +E45B +E45C +E45D +E45E +E45F +E460 +E461 +E462 +E463 +E464 +E465 +E466 +E467 +E468 +E469 +E46A +E46B +E46C +E46D +E46E +E46F +E470 +E471 +E472 +E473 +E474 +E475 +E476 +E477 +E478 +E479 +E47A +E47B +E47C +E47D +E47E +E47F +E480 +E481 +E482 +E483 +E484 +E485 +E486 +E487 +E488 +E489 +E48A +E48B +E48C +E48D +E48E +E48F +E490 +E491 +E492 +E493 +E494 +E495 +E496 +E497 +E498 +E499 +E49A +E49B +E49C +E49D +E49E +E49F +E4A0 +E4A1 +E4A2 +E4A3 +E4A4 +E4A5 +E4A6 +E4A7 +E4A8 +E4A9 +E4AA +E4AB +E4AC +E4AD +E4AE +E4AF +E4B0 +E4B1 +E4B2 +E4B3 +E4B4 +E4B5 +E4B6 +E4B7 +E4B8 +E4B9 +E4BA +E4BB +E4BC +E4BD +E4BE +E4BF +E4C0 +E4C1 +E4C2 +E4C3 +E4C4 +E4C5 +E4C6 +E4C7 +E4C8 +E4C9 +E4CA +E4CB +E4CC +E4CD +E4CE +E4CF +E4D0 +E4D1 +E4D2 +E4D3 +E4D4 +E4D5 +E4D6 +E4D7 +E4D8 +E4D9 +E4DA +E4DB +E4DC +E4DD +E4DE +E4DF +E4E0 +E4E1 +E4E2 +E4E3 +E4E4 +E4E5 +E4E6 +E4E7 +E4E8 +E4E9 +E4EA +E4EB +E4EC +E4ED +E4EE +E4EF +E4F0 +E4F1 +E4F2 +E4F3 +E4F4 +E4F5 +E4F6 +E4F7 +E4F8 +E4F9 +E4FA +E4FB +E4FC +E4FD +E4FE +E4FF +E500 +E501 +E502 +E503 +E504 +E505 +E506 +E507 +E508 +E509 +E50A +E50B +E50C +E50D +E50E +E50F +E510 +E511 +E512 +E513 +E514 +E515 +E516 +E517 +E518 +E519 +E51A +E51B +E51C +E51D +E51E +E51F +E520 +E521 +E522 +E523 +E524 +E525 +E526 +E527 +E528 +E529 +E52A +E52B +E52C +E52D +E52E +E52F +E530 +E531 +E532 +E533 +E534 +E535 +E536 +E537 +E538 +E539 +E53A +E53B +E53C +E53D +E53E +E53F +E540 +E541 +E542 +E543 +E544 +E545 +E546 +E547 +E548 +E549 +E54A +E54B +E54C +E54D +E54E +E54F +E550 +E551 +E552 +E553 +E554 +E555 +E556 +E557 +E558 +E559 +E55A +E55B +E55C +E55D +E55E +E55F +E560 +E561 +E562 +E563 +E564 +E565 +E566 +E567 +E568 +E569 +E56A +E56B +E56C +E56D +E56E +E56F +E570 +E571 +E572 +E573 +E574 +E575 +E576 +E577 +E578 +E579 +E57A +E57B +E57C +E57D +E57E +E57F +E580 +E581 +E582 +E583 +E584 +E585 +E586 +E587 +E588 +E589 +E58A +E58B +E58C +E58D +E58E +E58F +E590 +E591 +E592 +E593 +E594 +E595 +E596 +E597 +E598 +E599 +E59A +E59B +E59C +E59D +E59E +E59F +E5A0 +E5A1 +E5A2 +E5A3 +E5A4 +E5A5 +E5A6 +E5A7 +E5A8 +E5A9 +E5AA +E5AB +E5AC +E5AD +E5AE +E5AF +E5B0 +E5B1 +E5B2 +E5B3 +E5B4 +E5B5 +E5B6 +E5B7 +E5B8 +E5B9 +E5BA +E5BB +E5BC +E5BD +E5BE +E5BF +E5C0 +E5C1 +E5C2 +E5C3 +E5C4 +E5C5 +E5C6 +E5C7 +E5C8 +E5C9 +E5CA +E5CB +E5CC +E5CD +E5CE +E5CF +E5D0 +E5D1 +E5D2 +E5D3 +E5D4 +E5D5 +E5D6 +E5D7 +E5D8 +E5D9 +E5DA +E5DB +E5DC +E5DD +E5DE +E5DF +E5E0 +E5E1 +E5E2 +E5E3 +E5E4 +E5E5 +E5E6 +E5E7 +E5E8 +E5E9 +E5EA +E5EB +E5EC +E5ED +E5EE +E5EF +E5F0 +E5F1 +E5F2 +E5F3 +E5F4 +E5F5 +E5F6 +E5F7 +E5F8 +E5F9 +E5FA +E5FB +E5FC +E5FD +E5FE +E5FF +E600 +E601 +E602 +E603 +E604 +E605 +E606 +E607 +E608 +E609 +E60A +E60B +E60C +E60D +E60E +E60F +E610 +E611 +E612 +E613 +E614 +E615 +E616 +E617 +E618 +E619 +E61A +E61B +E61C +E61D +E61E +E61F +E620 +E621 +E622 +E623 +E624 +E625 +E626 +E627 +E628 +E629 +E62A +E62B +E62C +E62D +E62E +E62F +E630 +E631 +E632 +E633 +E634 +E635 +E636 +E637 +E638 +E639 +E63A +E63B +E63C +E63D +E63E +E63F +E640 +E641 +E642 +E643 +E644 +E645 +E646 +E647 +E648 +E649 +E64A +E64B +E64C +E64D +E64E +E64F +E650 +E651 +E652 +E653 +E654 +E655 +E656 +E657 +E658 +E659 +E65A +E65B +E65C +E65D +E65E +E65F +E660 +E661 +E662 +E663 +E664 +E665 +E666 +E667 +E668 +E669 +E66A +E66B +E66C +E66D +E66E +E66F +E670 +E671 +E672 +E673 +E674 +E675 +E676 +E677 +E678 +E679 +E67A +E67B +E67C +E67D +E67E +E67F +E680 +E681 +E682 +E683 +E684 +E685 +E686 +E687 +E688 +E689 +E68A +E68B +E68C +E68D +E68E +E68F +E690 +E691 +E692 +E693 +E694 +E695 +E696 +E697 +E698 +E699 +E69A +E69B +E69C +E69D +E69E +E69F +E6A0 +E6A1 +E6A2 +E6A3 +E6A4 +E6A5 +E6A6 +E6A7 +E6A8 +E6A9 +E6AA +E6AB +E6AC +E6AD +E6AE +E6AF +E6B0 +E6B1 +E6B2 +E6B3 +E6B4 +E6B5 +E6B6 +E6B7 +E6B8 +E6B9 +E6BA +E6BB +E6BC +E6BD +E6BE +E6BF +E6C0 +E6C1 +E6C2 +E6C3 +E6C4 +E6C5 +E6C6 +E6C7 +E6C8 +E6C9 +E6CA +E6CB +E6CC +E6CD +E6CE +E6CF +E6D0 +E6D1 +E6D2 +E6D3 +E6D4 +E6D5 +E6D6 +E6D7 +E6D8 +E6D9 +E6DA +E6DB +E6DC +E6DD +E6DE +E6DF +E6E0 +E6E1 +E6E2 +E6E3 +E6E4 +E6E5 +E6E6 +E6E7 +E6E8 +E6E9 +E6EA +E6EB +E6EC +E6ED +E6EE +E6EF +E6F0 +E6F1 +E6F2 +E6F3 +E6F4 +E6F5 +E6F6 +E6F7 +E6F8 +E6F9 +E6FA +E6FB +E6FC +E6FD +E6FE +E6FF +E700 +E701 +E702 +E703 +E704 +E705 +E706 +E707 +E708 +E709 +E70A +E70B +E70C +E70D +E70E +E70F +E710 +E711 +E712 +E713 +E714 +E715 +E716 +E717 +E718 +E719 +E71A +E71B +E71C +E71D +E71E +E71F +E720 +E721 +E722 +E723 +E724 +E725 +E726 +E727 +E728 +E729 +E72A +E72B +E72C +E72D +E72E +E72F +E730 +E731 +E732 +E733 +E734 +E735 +E736 +E737 +E738 +E739 +E73A +E73B +E73C +E73D +E73E +E73F +E740 +E741 +E742 +E743 +E744 +E745 +E746 +E747 +E748 +E749 +E74A +E74B +E74C +E74D +E74E +E74F +E750 +E751 +E752 +E753 +E754 +E755 +E756 +E757 +CREATE TABLE t3 SELECT CONVERT(c1 USING cp932) AS c1 FROM t2; +SELECT HEX(c1) FROM t3; +HEX(c1) +05 +7E +815C +815F +8160 +8161 +817C +8191 +8192 +81CA +8740 +8741 +8742 +8743 +8744 +8745 +8746 +8747 +8748 +8749 +874A +874B +874C +874D +874E +874F +8750 +8751 +8752 +8753 +8754 +8755 +8756 +8757 +8758 +8759 +875A +875B +875C +875D +875F +8760 +8761 +8762 +8763 +8764 +8765 +8766 +8767 +8768 +8769 +876A +876B +876C +876D +876E +876F +8770 +8771 +8772 +8773 +8774 +8775 +877E +8780 +8781 +8782 +8783 +8784 +8785 +8786 +8787 +8788 +8789 +878A +878B +878C +878D +878E +878F +81E0 +81DF +81E7 +8793 +8794 +81E3 +81DB +81DA +8798 +8799 +81E6 +81BF +81BE +FA5C +FA5D +FA5E +FA5F +FA60 +FA61 +FA62 +FA63 +FA64 +FA65 +FA66 +FA67 +FA68 +FA69 +FA6A +FA6B +FA6C +FA6D +FA6E +FA6F +FA70 +FA71 +FA72 +FA73 +FA74 +FA75 +FA76 +FA77 +FA78 +FA79 +FA7A +FA7B +FA7C +FA7D +FA7E +FA80 +FA81 +FA82 +FA83 +FA84 +FA85 +FA86 +FA87 +FA88 +FA89 +FA8A +FA8B +FA8C +FA8D +FA8E +FA8F +FA90 +FA91 +FA92 +FA93 +FA94 +FA95 +FA96 +FA97 +FA98 +FA99 +FA9A +FA9B +FA9C +FA9D +FA9E +FA9F +FAA0 +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FB40 +FB41 +FB42 +FB43 +FB44 +FB45 +FB46 +FB47 +FB48 +FB49 +FB4A +FB4B +FB4C +FB4D +FB4E +FB4F +FB50 +FB51 +FB52 +FB53 +FB54 +FB55 +FB56 +FB57 +FB58 +FB59 +FB5A +FB5B +FB5C +FB5D +FB5E +FB5F +FB60 +FB61 +FB62 +FB63 +FB64 +FB65 +FB66 +FB67 +FB68 +FB69 +FB6A +FB6B +FB6C +FB6D +FB6E +FB6F +FB70 +FB71 +FB72 +FB73 +FB74 +FB75 +FB76 +FB77 +FB78 +FB79 +FB7A +FB7B +FB7C +FB7D +FB7E +FB80 +FB81 +FB82 +FB83 +FB84 +FB85 +FB86 +FB87 +FB88 +FB89 +FB8A +FB8B +FB8C +FB8D +FB8E +FB8F +FB90 +FB91 +FB92 +FB93 +FB94 +FB95 +FB96 +FB97 +FB98 +FB99 +FB9A +FB9B +FB9C +FB9D +FB9E +FB9F +FBA0 +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FC40 +FC41 +FC42 +FC43 +FC44 +FC45 +FC46 +FC47 +FC48 +FC49 +FC4A +FC4B +FA40 +FA41 +FA42 +FA43 +FA44 +FA45 +FA46 +FA47 +FA48 +FA49 +81CA +FA55 +FA56 +FA57 +FA40 +FA41 +FA42 +FA43 +FA44 +FA45 +FA46 +FA47 +FA48 +FA49 +8754 +8755 +8756 +8757 +8758 +8759 +875A +875B +875C +875D +81CA +FA55 +FA56 +FA57 +878A +8782 +8784 +81E6 +FA5C +FA5D +FA5E +FA5F +FA60 +FA61 +FA62 +FA63 +FA64 +FA65 +FA66 +FA67 +FA68 +FA69 +FA6A +FA6B +FA6C +FA6D +FA6E +FA6F +FA70 +FA71 +FA72 +FA73 +FA74 +FA75 +FA76 +FA77 +FA78 +FA79 +FA7A +FA7B +FA7C +FA7D +FA7E +FA80 +FA81 +FA82 +FA83 +FA84 +FA85 +FA86 +FA87 +FA88 +FA89 +FA8A +FA8B +FA8C +FA8D +FA8E +FA8F +FA90 +FA91 +FA92 +FA93 +FA94 +FA95 +FA96 +FA97 +FA98 +FA99 +FA9A +FA9B +FA9C +FA9D +FA9E +FA9F +FAA0 +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FB40 +FB41 +FB42 +FB43 +FB44 +FB45 +FB46 +FB47 +FB48 +FB49 +FB4A +FB4B +FB4C +FB4D +FB4E +FB4F +FB50 +FB51 +FB52 +FB53 +FB54 +FB55 +FB56 +FB57 +FB58 +FB59 +FB5A +FB5B +FB5C +FB5D +FB5E +FB5F +FB60 +FB61 +FB62 +FB63 +FB64 +FB65 +FB66 +FB67 +FB68 +FB69 +FB6A +FB6B +FB6C +FB6D +FB6E +FB6F +FB70 +FB71 +FB72 +FB73 +FB74 +FB75 +FB76 +FB77 +FB78 +FB79 +FB7A +FB7B +FB7C +FB7D +FB7E +FB80 +FB81 +FB82 +FB83 +FB84 +FB85 +FB86 +FB87 +FB88 +FB89 +FB8A +FB8B +FB8C +FB8D +FB8E +FB8F +FB90 +FB91 +FB92 +FB93 +FB94 +FB95 +FB96 +FB97 +FB98 +FB99 +FB9A +FB9B +FB9C +FB9D +FB9E +FB9F +FBA0 +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FC40 +FC41 +FC42 +FC43 +FC44 +FC45 +FC46 +FC47 +FC48 +FC49 +FC4A +FC4B +F040 +F041 +F042 +F043 +F044 +F045 +F046 +F047 +F048 +F049 +F04A +F04B +F04C +F04D +F04E +F04F +F050 +F051 +F052 +F053 +F054 +F055 +F056 +F057 +F058 +F059 +F05A +F05B +F05C +F05D +F05E +F05F +F060 +F061 +F062 +F063 +F064 +F065 +F066 +F067 +F068 +F069 +F06A +F06B +F06C +F06D +F06E +F06F +F070 +F071 +F072 +F073 +F074 +F075 +F076 +F077 +F078 +F079 +F07A +F07B +F07C +F07D +F07E +F080 +F081 +F082 +F083 +F084 +F085 +F086 +F087 +F088 +F089 +F08A +F08B +F08C +F08D +F08E +F08F +F090 +F091 +F092 +F093 +F094 +F095 +F096 +F097 +F098 +F099 +F09A +F09B +F09C +F09D +F09E +F09F +F0A0 +F0A1 +F0A2 +F0A3 +F0A4 +F0A5 +F0A6 +F0A7 +F0A8 +F0A9 +F0AA +F0AB +F0AC +F0AD +F0AE +F0AF +F0B0 +F0B1 +F0B2 +F0B3 +F0B4 +F0B5 +F0B6 +F0B7 +F0B8 +F0B9 +F0BA +F0BB +F0BC +F0BD +F0BE +F0BF +F0C0 +F0C1 +F0C2 +F0C3 +F0C4 +F0C5 +F0C6 +F0C7 +F0C8 +F0C9 +F0CA +F0CB +F0CC +F0CD +F0CE +F0CF +F0D0 +F0D1 +F0D2 +F0D3 +F0D4 +F0D5 +F0D6 +F0D7 +F0D8 +F0D9 +F0DA +F0DB +F0DC +F0DD +F0DE +F0DF +F0E0 +F0E1 +F0E2 +F0E3 +F0E4 +F0E5 +F0E6 +F0E7 +F0E8 +F0E9 +F0EA +F0EB +F0EC +F0ED +F0EE +F0EF +F0F0 +F0F1 +F0F2 +F0F3 +F0F4 +F0F5 +F0F6 +F0F7 +F0F8 +F0F9 +F0FA +F0FB +F0FC +F140 +F141 +F142 +F143 +F144 +F145 +F146 +F147 +F148 +F149 +F14A +F14B +F14C +F14D +F14E +F14F +F150 +F151 +F152 +F153 +F154 +F155 +F156 +F157 +F158 +F159 +F15A +F15B +F15C +F15D +F15E +F15F +F160 +F161 +F162 +F163 +F164 +F165 +F166 +F167 +F168 +F169 +F16A +F16B +F16C +F16D +F16E +F16F +F170 +F171 +F172 +F173 +F174 +F175 +F176 +F177 +F178 +F179 +F17A +F17B +F17C +F17D +F17E +F180 +F181 +F182 +F183 +F184 +F185 +F186 +F187 +F188 +F189 +F18A +F18B +F18C +F18D +F18E +F18F +F190 +F191 +F192 +F193 +F194 +F195 +F196 +F197 +F198 +F199 +F19A +F19B +F19C +F19D +F19E +F19F +F1A0 +F1A1 +F1A2 +F1A3 +F1A4 +F1A5 +F1A6 +F1A7 +F1A8 +F1A9 +F1AA +F1AB +F1AC +F1AD +F1AE +F1AF +F1B0 +F1B1 +F1B2 +F1B3 +F1B4 +F1B5 +F1B6 +F1B7 +F1B8 +F1B9 +F1BA +F1BB +F1BC +F1BD +F1BE +F1BF +F1C0 +F1C1 +F1C2 +F1C3 +F1C4 +F1C5 +F1C6 +F1C7 +F1C8 +F1C9 +F1CA +F1CB +F1CC +F1CD +F1CE +F1CF +F1D0 +F1D1 +F1D2 +F1D3 +F1D4 +F1D5 +F1D6 +F1D7 +F1D8 +F1D9 +F1DA +F1DB +F1DC +F1DD +F1DE +F1DF +F1E0 +F1E1 +F1E2 +F1E3 +F1E4 +F1E5 +F1E6 +F1E7 +F1E8 +F1E9 +F1EA +F1EB +F1EC +F1ED +F1EE +F1EF +F1F0 +F1F1 +F1F2 +F1F3 +F1F4 +F1F5 +F1F6 +F1F7 +F1F8 +F1F9 +F1FA +F1FB +F1FC +F240 +F241 +F242 +F243 +F244 +F245 +F246 +F247 +F248 +F249 +F24A +F24B +F24C +F24D +F24E +F24F +F250 +F251 +F252 +F253 +F254 +F255 +F256 +F257 +F258 +F259 +F25A +F25B +F25C +F25D +F25E +F25F +F260 +F261 +F262 +F263 +F264 +F265 +F266 +F267 +F268 +F269 +F26A +F26B +F26C +F26D +F26E +F26F +F270 +F271 +F272 +F273 +F274 +F275 +F276 +F277 +F278 +F279 +F27A +F27B +F27C +F27D +F27E +F280 +F281 +F282 +F283 +F284 +F285 +F286 +F287 +F288 +F289 +F28A +F28B +F28C +F28D +F28E +F28F +F290 +F291 +F292 +F293 +F294 +F295 +F296 +F297 +F298 +F299 +F29A +F29B +F29C +F29D +F29E +F29F +F2A0 +F2A1 +F2A2 +F2A3 +F2A4 +F2A5 +F2A6 +F2A7 +F2A8 +F2A9 +F2AA +F2AB +F2AC +F2AD +F2AE +F2AF +F2B0 +F2B1 +F2B2 +F2B3 +F2B4 +F2B5 +F2B6 +F2B7 +F2B8 +F2B9 +F2BA +F2BB +F2BC +F2BD +F2BE +F2BF +F2C0 +F2C1 +F2C2 +F2C3 +F2C4 +F2C5 +F2C6 +F2C7 +F2C8 +F2C9 +F2CA +F2CB +F2CC +F2CD +F2CE +F2CF +F2D0 +F2D1 +F2D2 +F2D3 +F2D4 +F2D5 +F2D6 +F2D7 +F2D8 +F2D9 +F2DA +F2DB +F2DC +F2DD +F2DE +F2DF +F2E0 +F2E1 +F2E2 +F2E3 +F2E4 +F2E5 +F2E6 +F2E7 +F2E8 +F2E9 +F2EA +F2EB +F2EC +F2ED +F2EE +F2EF +F2F0 +F2F1 +F2F2 +F2F3 +F2F4 +F2F5 +F2F6 +F2F7 +F2F8 +F2F9 +F2FA +F2FB +F2FC +F340 +F341 +F342 +F343 +F344 +F345 +F346 +F347 +F348 +F349 +F34A +F34B +F34C +F34D +F34E +F34F +F350 +F351 +F352 +F353 +F354 +F355 +F356 +F357 +F358 +F359 +F35A +F35B +F35C +F35D +F35E +F35F +F360 +F361 +F362 +F363 +F364 +F365 +F366 +F367 +F368 +F369 +F36A +F36B +F36C +F36D +F36E +F36F +F370 +F371 +F372 +F373 +F374 +F375 +F376 +F377 +F378 +F379 +F37A +F37B +F37C +F37D +F37E +F380 +F381 +F382 +F383 +F384 +F385 +F386 +F387 +F388 +F389 +F38A +F38B +F38C +F38D +F38E +F38F +F390 +F391 +F392 +F393 +F394 +F395 +F396 +F397 +F398 +F399 +F39A +F39B +F39C +F39D +F39E +F39F +F3A0 +F3A1 +F3A2 +F3A3 +F3A4 +F3A5 +F3A6 +F3A7 +F3A8 +F3A9 +F3AA +F3AB +F3AC +F3AD +F3AE +F3AF +F3B0 +F3B1 +F3B2 +F3B3 +F3B4 +F3B5 +F3B6 +F3B7 +F3B8 +F3B9 +F3BA +F3BB +F3BC +F3BD +F3BE +F3BF +F3C0 +F3C1 +F3C2 +F3C3 +F3C4 +F3C5 +F3C6 +F3C7 +F3C8 +F3C9 +F3CA +F3CB +F3CC +F3CD +F3CE +F3CF +F3D0 +F3D1 +F3D2 +F3D3 +F3D4 +F3D5 +F3D6 +F3D7 +F3D8 +F3D9 +F3DA +F3DB +F3DC +F3DD +F3DE +F3DF +F3E0 +F3E1 +F3E2 +F3E3 +F3E4 +F3E5 +F3E6 +F3E7 +F3E8 +F3E9 +F3EA +F3EB +F3EC +F3ED +F3EE +F3EF +F3F0 +F3F1 +F3F2 +F3F3 +F3F4 +F3F5 +F3F6 +F3F7 +F3F8 +F3F9 +F3FA +F3FB +F3FC +F440 +F441 +F442 +F443 +F444 +F445 +F446 +F447 +F448 +F449 +F44A +F44B +F44C +F44D +F44E +F44F +F450 +F451 +F452 +F453 +F454 +F455 +F456 +F457 +F458 +F459 +F45A +F45B +F45C +F45D +F45E +F45F +F460 +F461 +F462 +F463 +F464 +F465 +F466 +F467 +F468 +F469 +F46A +F46B +F46C +F46D +F46E +F46F +F470 +F471 +F472 +F473 +F474 +F475 +F476 +F477 +F478 +F479 +F47A +F47B +F47C +F47D +F47E +F480 +F481 +F482 +F483 +F484 +F485 +F486 +F487 +F488 +F489 +F48A +F48B +F48C +F48D +F48E +F48F +F490 +F491 +F492 +F493 +F494 +F495 +F496 +F497 +F498 +F499 +F49A +F49B +F49C +F49D +F49E +F49F +F4A0 +F4A1 +F4A2 +F4A3 +F4A4 +F4A5 +F4A6 +F4A7 +F4A8 +F4A9 +F4AA +F4AB +F4AC +F4AD +F4AE +F4AF +F4B0 +F4B1 +F4B2 +F4B3 +F4B4 +F4B5 +F4B6 +F4B7 +F4B8 +F4B9 +F4BA +F4BB +F4BC +F4BD +F4BE +F4BF +F4C0 +F4C1 +F4C2 +F4C3 +F4C4 +F4C5 +F4C6 +F4C7 +F4C8 +F4C9 +F4CA +F4CB +F4CC +F4CD +F4CE +F4CF +F4D0 +F4D1 +F4D2 +F4D3 +F4D4 +F4D5 +F4D6 +F4D7 +F4D8 +F4D9 +F4DA +F4DB +F4DC +F4DD +F4DE +F4DF +F4E0 +F4E1 +F4E2 +F4E3 +F4E4 +F4E5 +F4E6 +F4E7 +F4E8 +F4E9 +F4EA +F4EB +F4EC +F4ED +F4EE +F4EF +F4F0 +F4F1 +F4F2 +F4F3 +F4F4 +F4F5 +F4F6 +F4F7 +F4F8 +F4F9 +F4FA +F4FB +F4FC +F540 +F541 +F542 +F543 +F544 +F545 +F546 +F547 +F548 +F549 +F54A +F54B +F54C +F54D +F54E +F54F +F550 +F551 +F552 +F553 +F554 +F555 +F556 +F557 +F558 +F559 +F55A +F55B +F55C +F55D +F55E +F55F +F560 +F561 +F562 +F563 +F564 +F565 +F566 +F567 +F568 +F569 +F56A +F56B +F56C +F56D +F56E +F56F +F570 +F571 +F572 +F573 +F574 +F575 +F576 +F577 +F578 +F579 +F57A +F57B +F57C +F57D +F57E +F580 +F581 +F582 +F583 +F584 +F585 +F586 +F587 +F588 +F589 +F58A +F58B +F58C +F58D +F58E +F58F +F590 +F591 +F592 +F593 +F594 +F595 +F596 +F597 +F598 +F599 +F59A +F59B +F59C +F59D +F59E +F59F +F5A0 +F5A1 +F5A2 +F5A3 +F5A4 +F5A5 +F5A6 +F5A7 +F5A8 +F5A9 +F5AA +F5AB +F5AC +F5AD +F5AE +F5AF +F5B0 +F5B1 +F5B2 +F5B3 +F5B4 +F5B5 +F5B6 +F5B7 +F5B8 +F5B9 +F5BA +F5BB +F5BC +F5BD +F5BE +F5BF +F5C0 +F5C1 +F5C2 +F5C3 +F5C4 +F5C5 +F5C6 +F5C7 +F5C8 +F5C9 +F5CA +F5CB +F5CC +F5CD +F5CE +F5CF +F5D0 +F5D1 +F5D2 +F5D3 +F5D4 +F5D5 +F5D6 +F5D7 +F5D8 +F5D9 +F5DA +F5DB +F5DC +F5DD +F5DE +F5DF +F5E0 +F5E1 +F5E2 +F5E3 +F5E4 +F5E5 +F5E6 +F5E7 +F5E8 +F5E9 +F5EA +F5EB +F5EC +F5ED +F5EE +F5EF +F5F0 +F5F1 +F5F2 +F5F3 +F5F4 +F5F5 +F5F6 +F5F7 +F5F8 +F5F9 +F5FA +F5FB +F5FC +F640 +F641 +F642 +F643 +F644 +F645 +F646 +F647 +F648 +F649 +F64A +F64B +F64C +F64D +F64E +F64F +F650 +F651 +F652 +F653 +F654 +F655 +F656 +F657 +F658 +F659 +F65A +F65B +F65C +F65D +F65E +F65F +F660 +F661 +F662 +F663 +F664 +F665 +F666 +F667 +F668 +F669 +F66A +F66B +F66C +F66D +F66E +F66F +F670 +F671 +F672 +F673 +F674 +F675 +F676 +F677 +F678 +F679 +F67A +F67B +F67C +F67D +F67E +F680 +F681 +F682 +F683 +F684 +F685 +F686 +F687 +F688 +F689 +F68A +F68B +F68C +F68D +F68E +F68F +F690 +F691 +F692 +F693 +F694 +F695 +F696 +F697 +F698 +F699 +F69A +F69B +F69C +F69D +F69E +F69F +F6A0 +F6A1 +F6A2 +F6A3 +F6A4 +F6A5 +F6A6 +F6A7 +F6A8 +F6A9 +F6AA +F6AB +F6AC +F6AD +F6AE +F6AF +F6B0 +F6B1 +F6B2 +F6B3 +F6B4 +F6B5 +F6B6 +F6B7 +F6B8 +F6B9 +F6BA +F6BB +F6BC +F6BD +F6BE +F6BF +F6C0 +F6C1 +F6C2 +F6C3 +F6C4 +F6C5 +F6C6 +F6C7 +F6C8 +F6C9 +F6CA +F6CB +F6CC +F6CD +F6CE +F6CF +F6D0 +F6D1 +F6D2 +F6D3 +F6D4 +F6D5 +F6D6 +F6D7 +F6D8 +F6D9 +F6DA +F6DB +F6DC +F6DD +F6DE +F6DF +F6E0 +F6E1 +F6E2 +F6E3 +F6E4 +F6E5 +F6E6 +F6E7 +F6E8 +F6E9 +F6EA +F6EB +F6EC +F6ED +F6EE +F6EF +F6F0 +F6F1 +F6F2 +F6F3 +F6F4 +F6F5 +F6F6 +F6F7 +F6F8 +F6F9 +F6FA +F6FB +F6FC +F740 +F741 +F742 +F743 +F744 +F745 +F746 +F747 +F748 +F749 +F74A +F74B +F74C +F74D +F74E +F74F +F750 +F751 +F752 +F753 +F754 +F755 +F756 +F757 +F758 +F759 +F75A +F75B +F75C +F75D +F75E +F75F +F760 +F761 +F762 +F763 +F764 +F765 +F766 +F767 +F768 +F769 +F76A +F76B +F76C +F76D +F76E +F76F +F770 +F771 +F772 +F773 +F774 +F775 +F776 +F777 +F778 +F779 +F77A +F77B +F77C +F77D +F77E +F780 +F781 +F782 +F783 +F784 +F785 +F786 +F787 +F788 +F789 +F78A +F78B +F78C +F78D +F78E +F78F +F790 +F791 +F792 +F793 +F794 +F795 +F796 +F797 +F798 +F799 +F79A +F79B +F79C +F79D +F79E +F79F +F7A0 +F7A1 +F7A2 +F7A3 +F7A4 +F7A5 +F7A6 +F7A7 +F7A8 +F7A9 +F7AA +F7AB +F7AC +F7AD +F7AE +F7AF +F7B0 +F7B1 +F7B2 +F7B3 +F7B4 +F7B5 +F7B6 +F7B7 +F7B8 +F7B9 +F7BA +F7BB +F7BC +F7BD +F7BE +F7BF +F7C0 +F7C1 +F7C2 +F7C3 +F7C4 +F7C5 +F7C6 +F7C7 +F7C8 +F7C9 +F7CA +F7CB +F7CC +F7CD +F7CE +F7CF +F7D0 +F7D1 +F7D2 +F7D3 +F7D4 +F7D5 +F7D6 +F7D7 +F7D8 +F7D9 +F7DA +F7DB +F7DC +F7DD +F7DE +F7DF +F7E0 +F7E1 +F7E2 +F7E3 +F7E4 +F7E5 +F7E6 +F7E7 +F7E8 +F7E9 +F7EA +F7EB +F7EC +F7ED +F7EE +F7EF +F7F0 +F7F1 +F7F2 +F7F3 +F7F4 +F7F5 +F7F6 +F7F7 +F7F8 +F7F9 +F7FA +F7FB +F7FC +F840 +F841 +F842 +F843 +F844 +F845 +F846 +F847 +F848 +F849 +F84A +F84B +F84C +F84D +F84E +F84F +F850 +F851 +F852 +F853 +F854 +F855 +F856 +F857 +F858 +F859 +F85A +F85B +F85C +F85D +F85E +F85F +F860 +F861 +F862 +F863 +F864 +F865 +F866 +F867 +F868 +F869 +F86A +F86B +F86C +F86D +F86E +F86F +F870 +F871 +F872 +F873 +F874 +F875 +F876 +F877 +F878 +F879 +F87A +F87B +F87C +F87D +F87E +F880 +F881 +F882 +F883 +F884 +F885 +F886 +F887 +F888 +F889 +F88A +F88B +F88C +F88D +F88E +F88F +F890 +F891 +F892 +F893 +F894 +F895 +F896 +F897 +F898 +F899 +F89A +F89B +F89C +F89D +F89E +F89F +F8A0 +F8A1 +F8A2 +F8A3 +F8A4 +F8A5 +F8A6 +F8A7 +F8A8 +F8A9 +F8AA +F8AB +F8AC +F8AD +F8AE +F8AF +F8B0 +F8B1 +F8B2 +F8B3 +F8B4 +F8B5 +F8B6 +F8B7 +F8B8 +F8B9 +F8BA +F8BB +F8BC +F8BD +F8BE +F8BF +F8C0 +F8C1 +F8C2 +F8C3 +F8C4 +F8C5 +F8C6 +F8C7 +F8C8 +F8C9 +F8CA +F8CB +F8CC +F8CD +F8CE +F8CF +F8D0 +F8D1 +F8D2 +F8D3 +F8D4 +F8D5 +F8D6 +F8D7 +F8D8 +F8D9 +F8DA +F8DB +F8DC +F8DD +F8DE +F8DF +F8E0 +F8E1 +F8E2 +F8E3 +F8E4 +F8E5 +F8E6 +F8E7 +F8E8 +F8E9 +F8EA +F8EB +F8EC +F8ED +F8EE +F8EF +F8F0 +F8F1 +F8F2 +F8F3 +F8F4 +F8F5 +F8F6 +F8F7 +F8F8 +F8F9 +F8FA +F8FB +F8FC +F940 +F941 +F942 +F943 +F944 +F945 +F946 +F947 +F948 +F949 +F94A +F94B +F94C +F94D +F94E +F94F +F950 +F951 +F952 +F953 +F954 +F955 +F956 +F957 +F958 +F959 +F95A +F95B +F95C +F95D +F95E +F95F +F960 +F961 +F962 +F963 +F964 +F965 +F966 +F967 +F968 +F969 +F96A +F96B +F96C +F96D +F96E +F96F +F970 +F971 +F972 +F973 +F974 +F975 +F976 +F977 +F978 +F979 +F97A +F97B +F97C +F97D +F97E +F980 +F981 +F982 +F983 +F984 +F985 +F986 +F987 +F988 +F989 +F98A +F98B +F98C +F98D +F98E +F98F +F990 +F991 +F992 +F993 +F994 +F995 +F996 +F997 +F998 +F999 +F99A +F99B +F99C +F99D +F99E +F99F +F9A0 +F9A1 +F9A2 +F9A3 +F9A4 +F9A5 +F9A6 +F9A7 +F9A8 +F9A9 +F9AA +F9AB +F9AC +F9AD +F9AE +F9AF +F9B0 +F9B1 +F9B2 +F9B3 +F9B4 +F9B5 +F9B6 +F9B7 +F9B8 +F9B9 +F9BA +F9BB +F9BC +F9BD +F9BE +F9BF +F9C0 +F9C1 +F9C2 +F9C3 +F9C4 +F9C5 +F9C6 +F9C7 +F9C8 +F9C9 +F9CA +F9CB +F9CC +F9CD +F9CE +F9CF +F9D0 +F9D1 +F9D2 +F9D3 +F9D4 +F9D5 +F9D6 +F9D7 +F9D8 +F9D9 +F9DA +F9DB +F9DC +F9DD +F9DE +F9DF +F9E0 +F9E1 +F9E2 +F9E3 +F9E4 +F9E5 +F9E6 +F9E7 +F9E8 +F9E9 +F9EA +F9EB +F9EC +F9ED +F9EE +F9EF +F9F0 +F9F1 +F9F2 +F9F3 +F9F4 +F9F5 +F9F6 +F9F7 +F9F8 +F9F9 +F9FA +F9FB +F9FC +CREATE TABLE t4 SELECT CONVERT(c1 USING eucjpms) AS c1 FROM t1; +SELECT HEX(c1) FROM t4; +HEX(c1) +05 +7E +A1BD +A1C0 +A1C1 +A1C2 +A1DD +A1F1 +A1F2 +A2CC +ADA1 +ADA2 +ADA3 +ADA4 +ADA5 +ADA6 +ADA7 +ADA8 +ADA9 +ADAA +ADAB +ADAC +ADAD +ADAE +ADAF +ADB0 +ADB1 +ADB2 +ADB3 +ADB4 +ADB5 +ADB6 +ADB7 +ADB8 +ADB9 +ADBA +ADBB +ADBC +ADBD +ADBE +ADC0 +ADC1 +ADC2 +ADC3 +ADC4 +ADC5 +ADC6 +ADC7 +ADC8 +ADC9 +ADCA +ADCB +ADCC +ADCD +ADCE +ADCF +ADD0 +ADD1 +ADD2 +ADD3 +ADD4 +ADD5 +ADD6 +ADDF +ADE0 +ADE1 +ADE2 +ADE3 +ADE4 +ADE5 +ADE6 +ADE7 +ADE8 +ADE9 +ADEA +ADEB +ADEC +ADED +ADEE +ADEF +A2E2 +A2E1 +A2E9 +ADF3 +ADF4 +A2E5 +A2DD +A2DC +ADF8 +ADF9 +A2E8 +A2C1 +A2C0 +8FD4E3 +8FDCDF +8FE4E9 +8FE3F8 +8FD9A1 +8FB1BB +8FF4AE +8FC2AD +8FC3FC +8FE4D0 +8FC2BF +8FBCF4 +8FB0A9 +8FB0C8 +8FF4AF +8FB0D2 +8FB0D4 +8FB0E3 +8FB0EE +8FB1A7 +8FB1A3 +8FB1AC +8FB1A9 +8FB1BE +8FB1DF +8FB1D8 +8FB1C8 +8FB1D7 +8FB1E3 +8FB1F4 +8FB1E1 +8FB2A3 +8FF4B0 +8FB2BB +8FB2E6 +8FB2ED +8FB2F5 +8FB2FC +8FF4B1 +8FB3B5 +8FB3D8 +8FB3DB +8FB3E5 +8FB3EE +8FB3FB +8FF4B2 +8FF4B3 +8FB4C0 +8FB4C7 +8FB4D0 +8FB4DE +8FF4B4 +8FB5AA +8FF4B5 +8FB5AF +8FB5C4 +8FB5E8 +8FF4B6 +8FB7C2 +8FB7E4 +8FB7E8 +8FB7E7 +8FF4B7 +8FF4B8 +8FF4B9 +8FB8CE +8FB8E1 +8FB8F5 +8FB8F7 +8FB8F8 +8FB8FC +8FB9AF +8FB9B7 +8FBABE +8FBADB +8FCDAA +8FBAE1 +8FF4BA +8FBAEB +8FBBB3 +8FBBB8 +8FF4BB +8FBBCA +8FF4BC +8FF4BD +8FBBD0 +8FBBDE +8FBBF4 +8FBBF5 +8FBBF9 +8FBCE4 +8FBCED +8FBCFE +8FF4BE +8FBDC2 +8FBDE7 +8FF4BF +8FBDF0 +8FBEB0 +8FBEAC +8FF4C0 +8FBEB3 +8FBEBD +8FBECD +8FBEC9 +8FBEE4 +8FBFA8 +8FBFC9 +8FC0C4 +8FC0E4 +8FC0F4 +8FC1A6 +8FF4C1 +8FC1F5 +8FC1FC +8FF4C2 +8FC1F8 +8FC2AB +8FC2A1 +8FC2A5 +8FF4C3 +8FC2B8 +8FC2BA +8FF4C4 +8FC2C4 +8FC2D2 +8FC2D7 +8FC2DB +8FC2DE +8FC2ED +8FC2F0 +8FF4C5 +8FC3A1 +8FC3B5 +8FC3C9 +8FC3B9 +8FF4C6 +8FC3D8 +8FC3FE +8FF4C7 +8FC4CC +8FF4C8 +8FC4D9 +8FC4EA +8FC4FD +8FF4C9 +8FC5A7 +8FC5B5 +8FC5B6 +8FF4CA +8FC5D5 +8FC6B8 +8FC6D7 +8FC6E0 +8FC6EA +8FC6E3 +8FC7A1 +8FC7AB +8FC7C7 +8FC7C3 +8FC7CB +8FC7CF +8FC7D9 +8FF4CB +8FF4CC +8FC7E6 +8FC7EE +8FC7FC +8FC7EB +8FC7F0 +8FC8B1 +8FC8E5 +8FC8F8 +8FC9A6 +8FC9AB +8FC9AD +8FF4CD +8FC9CA +8FC9D3 +8FC9E9 +8FC9E3 +8FC9FC +8FC9F4 +8FC9F5 +8FF4CE +8FCAB3 +8FCABD +8FCAEF +8FCAF1 +8FCBAE +8FF4CF +8FCBCA +8FCBE6 +8FCBEA +8FCBF0 +8FCBF4 +8FCBEE +8FCCA5 +8FCBF9 +8FCCAB +8FCCAE +8FCCAD +8FCCB2 +8FCCC2 +8FCCD0 +8FCCD9 +8FF4D0 +8FCDBB +8FF4D1 +8FCEBB +8FF4D2 +8FCEBA +8FCEC3 +8FF4D3 +8FCEF2 +8FB3DD +8FCFD5 +8FCFE2 +8FCFE9 +8FCFED +8FF4D4 +8FF4D5 +8FF4D6 +8FF4D7 +8FD0E5 +8FF4D8 +8FD0E9 +8FD1E8 +8FF4D9 +8FF4DA +8FD1EC +8FD2BB +8FF4DB +8FD3E1 +8FD3E8 +8FD4A7 +8FF4DC +8FF4DD +8FD4D4 +8FD4F2 +8FD5AE +8FF4DE +8FD7DE +8FF4DF +8FD8A2 +8FD8B7 +8FD8C1 +8FD8D1 +8FD8F4 +8FD9C6 +8FD9C8 +8FD9D1 +8FF4E0 +8FF4E1 +8FF4E2 +8FF4E3 +8FF4E4 +8FDCD3 +8FDDC8 +8FDDD4 +8FDDEA +8FDDFA +8FDEA4 +8FDEB0 +8FF4E5 +8FDEB5 +8FDECB +8FF4E6 +8FDFB9 +8FF4E7 +8FDFC3 +8FF4E8 +8FF4E9 +8FE0D9 +8FF4EA +8FF4EB +8FE1E2 +8FF4EC +8FF4ED +8FF4EE +8FE2C7 +8FE3A8 +8FE3A6 +8FE3A9 +8FE3AF +8FE3B0 +8FE3AA +8FE3AB +8FE3BC +8FE3C1 +8FE3BF +8FE3D5 +8FE3D8 +8FE3D6 +8FE3DF +8FE3E3 +8FE3E1 +8FE3D4 +8FE3E9 +8FE4A6 +8FE3F1 +8FE3F2 +8FE4CB +8FE4C1 +8FE4C3 +8FE4BE +8FF4EF +8FE4C0 +8FE4C7 +8FE4BF +8FE4E0 +8FE4DE +8FE4D1 +8FF4F0 +8FE4DC +8FE4D2 +8FE4DB +8FE4D4 +8FE4FA +8FE4EF +8FE5B3 +8FE5BF +8FE5C9 +8FE5D0 +8FE5E2 +8FE5EA +8FE5EB +8FF4F1 +8FF4F2 +8FF4F3 +8FE6E8 +8FE6EF +8FE7AC +8FF4F4 +8FE7AE +8FF4F5 +8FE7B1 +8FF4F6 +8FE7B2 +8FE8B1 +8FE8B6 +8FF4F7 +8FF4F8 +8FE8DD +8FF4F9 +8FF4FA +8FE9D1 +8FF4FB +8FE9ED +8FEACD +8FF4FC +8FEADB +8FEAE6 +8FEAEA +8FEBA5 +8FEBFB +8FEBFA +8FF4FD +8FECD6 +8FF4FE +8FF3F3 +8FF3F4 +8FF3F5 +8FF3F6 +8FF3F7 +8FF3F8 +8FF3F9 +8FF3FA +8FF3FB +8FF3FC +A2CC +8FA2C3 +8FF4A9 +8FF4AA +8FF3F3 +8FF3F4 +8FF3F5 +8FF3F6 +8FF3F7 +8FF3F8 +8FF3F9 +8FF3FA +8FF3FB +8FF3FC +ADB5 +ADB6 +ADB7 +ADB8 +ADB9 +ADBA +ADBB +ADBC +ADBD +ADBE +A2CC +8FA2C3 +8FF4A9 +8FF4AA +ADEA +ADE2 +ADE4 +A2E8 +8FD4E3 +8FDCDF +8FE4E9 +8FE3F8 +8FD9A1 +8FB1BB +8FF4AE +8FC2AD +8FC3FC +8FE4D0 +8FC2BF +8FBCF4 +8FB0A9 +8FB0C8 +8FF4AF +8FB0D2 +8FB0D4 +8FB0E3 +8FB0EE +8FB1A7 +8FB1A3 +8FB1AC +8FB1A9 +8FB1BE +8FB1DF +8FB1D8 +8FB1C8 +8FB1D7 +8FB1E3 +8FB1F4 +8FB1E1 +8FB2A3 +8FF4B0 +8FB2BB +8FB2E6 +8FB2ED +8FB2F5 +8FB2FC +8FF4B1 +8FB3B5 +8FB3D8 +8FB3DB +8FB3E5 +8FB3EE +8FB3FB +8FF4B2 +8FF4B3 +8FB4C0 +8FB4C7 +8FB4D0 +8FB4DE +8FF4B4 +8FB5AA +8FF4B5 +8FB5AF +8FB5C4 +8FB5E8 +8FF4B6 +8FB7C2 +8FB7E4 +8FB7E8 +8FB7E7 +8FF4B7 +8FF4B8 +8FF4B9 +8FB8CE +8FB8E1 +8FB8F5 +8FB8F7 +8FB8F8 +8FB8FC +8FB9AF +8FB9B7 +8FBABE +8FBADB +8FCDAA +8FBAE1 +8FF4BA +8FBAEB +8FBBB3 +8FBBB8 +8FF4BB +8FBBCA +8FF4BC +8FF4BD +8FBBD0 +8FBBDE +8FBBF4 +8FBBF5 +8FBBF9 +8FBCE4 +8FBCED +8FBCFE +8FF4BE +8FBDC2 +8FBDE7 +8FF4BF +8FBDF0 +8FBEB0 +8FBEAC +8FF4C0 +8FBEB3 +8FBEBD +8FBECD +8FBEC9 +8FBEE4 +8FBFA8 +8FBFC9 +8FC0C4 +8FC0E4 +8FC0F4 +8FC1A6 +8FF4C1 +8FC1F5 +8FC1FC +8FF4C2 +8FC1F8 +8FC2AB +8FC2A1 +8FC2A5 +8FF4C3 +8FC2B8 +8FC2BA +8FF4C4 +8FC2C4 +8FC2D2 +8FC2D7 +8FC2DB +8FC2DE +8FC2ED +8FC2F0 +8FF4C5 +8FC3A1 +8FC3B5 +8FC3C9 +8FC3B9 +8FF4C6 +8FC3D8 +8FC3FE +8FF4C7 +8FC4CC +8FF4C8 +8FC4D9 +8FC4EA +8FC4FD +8FF4C9 +8FC5A7 +8FC5B5 +8FC5B6 +8FF4CA +8FC5D5 +8FC6B8 +8FC6D7 +8FC6E0 +8FC6EA +8FC6E3 +8FC7A1 +8FC7AB +8FC7C7 +8FC7C3 +8FC7CB +8FC7CF +8FC7D9 +8FF4CB +8FF4CC +8FC7E6 +8FC7EE +8FC7FC +8FC7EB +8FC7F0 +8FC8B1 +8FC8E5 +8FC8F8 +8FC9A6 +8FC9AB +8FC9AD +8FF4CD +8FC9CA +8FC9D3 +8FC9E9 +8FC9E3 +8FC9FC +8FC9F4 +8FC9F5 +8FF4CE +8FCAB3 +8FCABD +8FCAEF +8FCAF1 +8FCBAE +8FF4CF +8FCBCA +8FCBE6 +8FCBEA +8FCBF0 +8FCBF4 +8FCBEE +8FCCA5 +8FCBF9 +8FCCAB +8FCCAE +8FCCAD +8FCCB2 +8FCCC2 +8FCCD0 +8FCCD9 +8FF4D0 +8FCDBB +8FF4D1 +8FCEBB +8FF4D2 +8FCEBA +8FCEC3 +8FF4D3 +8FCEF2 +8FB3DD +8FCFD5 +8FCFE2 +8FCFE9 +8FCFED +8FF4D4 +8FF4D5 +8FF4D6 +8FF4D7 +8FD0E5 +8FF4D8 +8FD0E9 +8FD1E8 +8FF4D9 +8FF4DA +8FD1EC +8FD2BB +8FF4DB +8FD3E1 +8FD3E8 +8FD4A7 +8FF4DC +8FF4DD +8FD4D4 +8FD4F2 +8FD5AE +8FF4DE +8FD7DE +8FF4DF +8FD8A2 +8FD8B7 +8FD8C1 +8FD8D1 +8FD8F4 +8FD9C6 +8FD9C8 +8FD9D1 +8FF4E0 +8FF4E1 +8FF4E2 +8FF4E3 +8FF4E4 +8FDCD3 +8FDDC8 +8FDDD4 +8FDDEA +8FDDFA +8FDEA4 +8FDEB0 +8FF4E5 +8FDEB5 +8FDECB +8FF4E6 +8FDFB9 +8FF4E7 +8FDFC3 +8FF4E8 +8FF4E9 +8FE0D9 +8FF4EA +8FF4EB +8FE1E2 +8FF4EC +8FF4ED +8FF4EE +8FE2C7 +8FE3A8 +8FE3A6 +8FE3A9 +8FE3AF +8FE3B0 +8FE3AA +8FE3AB +8FE3BC +8FE3C1 +8FE3BF +8FE3D5 +8FE3D8 +8FE3D6 +8FE3DF +8FE3E3 +8FE3E1 +8FE3D4 +8FE3E9 +8FE4A6 +8FE3F1 +8FE3F2 +8FE4CB +8FE4C1 +8FE4C3 +8FE4BE +8FF4EF +8FE4C0 +8FE4C7 +8FE4BF +8FE4E0 +8FE4DE +8FE4D1 +8FF4F0 +8FE4DC +8FE4D2 +8FE4DB +8FE4D4 +8FE4FA +8FE4EF +8FE5B3 +8FE5BF +8FE5C9 +8FE5D0 +8FE5E2 +8FE5EA +8FE5EB +8FF4F1 +8FF4F2 +8FF4F3 +8FE6E8 +8FE6EF +8FE7AC +8FF4F4 +8FE7AE +8FF4F5 +8FE7B1 +8FF4F6 +8FE7B2 +8FE8B1 +8FE8B6 +8FF4F7 +8FF4F8 +8FE8DD +8FF4F9 +8FF4FA +8FE9D1 +8FF4FB +8FE9ED +8FEACD +8FF4FC +8FEADB +8FEAE6 +8FEAEA +8FEBA5 +8FEBFB +8FEBFA +8FF4FD +8FECD6 +8FF4FE +F5A1 +F5A2 +F5A3 +F5A4 +F5A5 +F5A6 +F5A7 +F5A8 +F5A9 +F5AA +F5AB +F5AC +F5AD +F5AE +F5AF +F5B0 +F5B1 +F5B2 +F5B3 +F5B4 +F5B5 +F5B6 +F5B7 +F5B8 +F5B9 +F5BA +F5BB +F5BC +F5BD +F5BE +F5BF +F5C0 +F5C1 +F5C2 +F5C3 +F5C4 +F5C5 +F5C6 +F5C7 +F5C8 +F5C9 +F5CA +F5CB +F5CC +F5CD +F5CE +F5CF +F5D0 +F5D1 +F5D2 +F5D3 +F5D4 +F5D5 +F5D6 +F5D7 +F5D8 +F5D9 +F5DA +F5DB +F5DC +F5DD +F5DE +F5DF +F5E0 +F5E1 +F5E2 +F5E3 +F5E4 +F5E5 +F5E6 +F5E7 +F5E8 +F5E9 +F5EA +F5EB +F5EC +F5ED +F5EE +F5EF +F5F0 +F5F1 +F5F2 +F5F3 +F5F4 +F5F5 +F5F6 +F5F7 +F5F8 +F5F9 +F5FA +F5FB +F5FC +F5FD +F5FE +F6A1 +F6A2 +F6A3 +F6A4 +F6A5 +F6A6 +F6A7 +F6A8 +F6A9 +F6AA +F6AB +F6AC +F6AD +F6AE +F6AF +F6B0 +F6B1 +F6B2 +F6B3 +F6B4 +F6B5 +F6B6 +F6B7 +F6B8 +F6B9 +F6BA +F6BB +F6BC +F6BD +F6BE +F6BF +F6C0 +F6C1 +F6C2 +F6C3 +F6C4 +F6C5 +F6C6 +F6C7 +F6C8 +F6C9 +F6CA +F6CB +F6CC +F6CD +F6CE +F6CF +F6D0 +F6D1 +F6D2 +F6D3 +F6D4 +F6D5 +F6D6 +F6D7 +F6D8 +F6D9 +F6DA +F6DB +F6DC +F6DD +F6DE +F6DF +F6E0 +F6E1 +F6E2 +F6E3 +F6E4 +F6E5 +F6E6 +F6E7 +F6E8 +F6E9 +F6EA +F6EB +F6EC +F6ED +F6EE +F6EF +F6F0 +F6F1 +F6F2 +F6F3 +F6F4 +F6F5 +F6F6 +F6F7 +F6F8 +F6F9 +F6FA +F6FB +F6FC +F6FD +F6FE +F7A1 +F7A2 +F7A3 +F7A4 +F7A5 +F7A6 +F7A7 +F7A8 +F7A9 +F7AA +F7AB +F7AC +F7AD +F7AE +F7AF +F7B0 +F7B1 +F7B2 +F7B3 +F7B4 +F7B5 +F7B6 +F7B7 +F7B8 +F7B9 +F7BA +F7BB +F7BC +F7BD +F7BE +F7BF +F7C0 +F7C1 +F7C2 +F7C3 +F7C4 +F7C5 +F7C6 +F7C7 +F7C8 +F7C9 +F7CA +F7CB +F7CC +F7CD +F7CE +F7CF +F7D0 +F7D1 +F7D2 +F7D3 +F7D4 +F7D5 +F7D6 +F7D7 +F7D8 +F7D9 +F7DA +F7DB +F7DC +F7DD +F7DE +F7DF +F7E0 +F7E1 +F7E2 +F7E3 +F7E4 +F7E5 +F7E6 +F7E7 +F7E8 +F7E9 +F7EA +F7EB +F7EC +F7ED +F7EE +F7EF +F7F0 +F7F1 +F7F2 +F7F3 +F7F4 +F7F5 +F7F6 +F7F7 +F7F8 +F7F9 +F7FA +F7FB +F7FC +F7FD +F7FE +F8A1 +F8A2 +F8A3 +F8A4 +F8A5 +F8A6 +F8A7 +F8A8 +F8A9 +F8AA +F8AB +F8AC +F8AD +F8AE +F8AF +F8B0 +F8B1 +F8B2 +F8B3 +F8B4 +F8B5 +F8B6 +F8B7 +F8B8 +F8B9 +F8BA +F8BB +F8BC +F8BD +F8BE +F8BF +F8C0 +F8C1 +F8C2 +F8C3 +F8C4 +F8C5 +F8C6 +F8C7 +F8C8 +F8C9 +F8CA +F8CB +F8CC +F8CD +F8CE +F8CF +F8D0 +F8D1 +F8D2 +F8D3 +F8D4 +F8D5 +F8D6 +F8D7 +F8D8 +F8D9 +F8DA +F8DB +F8DC +F8DD +F8DE +F8DF +F8E0 +F8E1 +F8E2 +F8E3 +F8E4 +F8E5 +F8E6 +F8E7 +F8E8 +F8E9 +F8EA +F8EB +F8EC +F8ED +F8EE +F8EF +F8F0 +F8F1 +F8F2 +F8F3 +F8F4 +F8F5 +F8F6 +F8F7 +F8F8 +F8F9 +F8FA +F8FB +F8FC +F8FD +F8FE +F9A1 +F9A2 +F9A3 +F9A4 +F9A5 +F9A6 +F9A7 +F9A8 +F9A9 +F9AA +F9AB +F9AC +F9AD +F9AE +F9AF +F9B0 +F9B1 +F9B2 +F9B3 +F9B4 +F9B5 +F9B6 +F9B7 +F9B8 +F9B9 +F9BA +F9BB +F9BC +F9BD +F9BE +F9BF +F9C0 +F9C1 +F9C2 +F9C3 +F9C4 +F9C5 +F9C6 +F9C7 +F9C8 +F9C9 +F9CA +F9CB +F9CC +F9CD +F9CE +F9CF +F9D0 +F9D1 +F9D2 +F9D3 +F9D4 +F9D5 +F9D6 +F9D7 +F9D8 +F9D9 +F9DA +F9DB +F9DC +F9DD +F9DE +F9DF +F9E0 +F9E1 +F9E2 +F9E3 +F9E4 +F9E5 +F9E6 +F9E7 +F9E8 +F9E9 +F9EA +F9EB +F9EC +F9ED +F9EE +F9EF +F9F0 +F9F1 +F9F2 +F9F3 +F9F4 +F9F5 +F9F6 +F9F7 +F9F8 +F9F9 +F9FA +F9FB +F9FC +F9FD +F9FE +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FAFD +FAFE +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FBFD +FBFE +FCA1 +FCA2 +FCA3 +FCA4 +FCA5 +FCA6 +FCA7 +FCA8 +FCA9 +FCAA +FCAB +FCAC +FCAD +FCAE +FCAF +FCB0 +FCB1 +FCB2 +FCB3 +FCB4 +FCB5 +FCB6 +FCB7 +FCB8 +FCB9 +FCBA +FCBB +FCBC +FCBD +FCBE +FCBF +FCC0 +FCC1 +FCC2 +FCC3 +FCC4 +FCC5 +FCC6 +FCC7 +FCC8 +FCC9 +FCCA +FCCB +FCCC +FCCD +FCCE +FCCF +FCD0 +FCD1 +FCD2 +FCD3 +FCD4 +FCD5 +FCD6 +FCD7 +FCD8 +FCD9 +FCDA +FCDB +FCDC +FCDD +FCDE +FCDF +FCE0 +FCE1 +FCE2 +FCE3 +FCE4 +FCE5 +FCE6 +FCE7 +FCE8 +FCE9 +FCEA +FCEB +FCEC +FCED +FCEE +FCEF +FCF0 +FCF1 +FCF2 +FCF3 +FCF4 +FCF5 +FCF6 +FCF7 +FCF8 +FCF9 +FCFA +FCFB +FCFC +FCFD +FCFE +FDA1 +FDA2 +FDA3 +FDA4 +FDA5 +FDA6 +FDA7 +FDA8 +FDA9 +FDAA +FDAB +FDAC +FDAD +FDAE +FDAF +FDB0 +FDB1 +FDB2 +FDB3 +FDB4 +FDB5 +FDB6 +FDB7 +FDB8 +FDB9 +FDBA +FDBB +FDBC +FDBD +FDBE +FDBF +FDC0 +FDC1 +FDC2 +FDC3 +FDC4 +FDC5 +FDC6 +FDC7 +FDC8 +FDC9 +FDCA +FDCB +FDCC +FDCD +FDCE +FDCF +FDD0 +FDD1 +FDD2 +FDD3 +FDD4 +FDD5 +FDD6 +FDD7 +FDD8 +FDD9 +FDDA +FDDB +FDDC +FDDD +FDDE +FDDF +FDE0 +FDE1 +FDE2 +FDE3 +FDE4 +FDE5 +FDE6 +FDE7 +FDE8 +FDE9 +FDEA +FDEB +FDEC +FDED +FDEE +FDEF +FDF0 +FDF1 +FDF2 +FDF3 +FDF4 +FDF5 +FDF6 +FDF7 +FDF8 +FDF9 +FDFA +FDFB +FDFC +FDFD +FDFE +FEA1 +FEA2 +FEA3 +FEA4 +FEA5 +FEA6 +FEA7 +FEA8 +FEA9 +FEAA +FEAB +FEAC +FEAD +FEAE +FEAF +FEB0 +FEB1 +FEB2 +FEB3 +FEB4 +FEB5 +FEB6 +FEB7 +FEB8 +FEB9 +FEBA +FEBB +FEBC +FEBD +FEBE +FEBF +FEC0 +FEC1 +FEC2 +FEC3 +FEC4 +FEC5 +FEC6 +FEC7 +FEC8 +FEC9 +FECA +FECB +FECC +FECD +FECE +FECF +FED0 +FED1 +FED2 +FED3 +FED4 +FED5 +FED6 +FED7 +FED8 +FED9 +FEDA +FEDB +FEDC +FEDD +FEDE +FEDF +FEE0 +FEE1 +FEE2 +FEE3 +FEE4 +FEE5 +FEE6 +FEE7 +FEE8 +FEE9 +FEEA +FEEB +FEEC +FEED +FEEE +FEEF +FEF0 +FEF1 +FEF2 +FEF3 +FEF4 +FEF5 +FEF6 +FEF7 +FEF8 +FEF9 +FEFA +FEFB +FEFC +FEFD +FEFE +8FF5A1 +8FF5A2 +8FF5A3 +8FF5A4 +8FF5A5 +8FF5A6 +8FF5A7 +8FF5A8 +8FF5A9 +8FF5AA +8FF5AB +8FF5AC +8FF5AD +8FF5AE +8FF5AF +8FF5B0 +8FF5B1 +8FF5B2 +8FF5B3 +8FF5B4 +8FF5B5 +8FF5B6 +8FF5B7 +8FF5B8 +8FF5B9 +8FF5BA +8FF5BB +8FF5BC +8FF5BD +8FF5BE +8FF5BF +8FF5C0 +8FF5C1 +8FF5C2 +8FF5C3 +8FF5C4 +8FF5C5 +8FF5C6 +8FF5C7 +8FF5C8 +8FF5C9 +8FF5CA +8FF5CB +8FF5CC +8FF5CD +8FF5CE +8FF5CF +8FF5D0 +8FF5D1 +8FF5D2 +8FF5D3 +8FF5D4 +8FF5D5 +8FF5D6 +8FF5D7 +8FF5D8 +8FF5D9 +8FF5DA +8FF5DB +8FF5DC +8FF5DD +8FF5DE +8FF5DF +8FF5E0 +8FF5E1 +8FF5E2 +8FF5E3 +8FF5E4 +8FF5E5 +8FF5E6 +8FF5E7 +8FF5E8 +8FF5E9 +8FF5EA +8FF5EB +8FF5EC +8FF5ED +8FF5EE +8FF5EF +8FF5F0 +8FF5F1 +8FF5F2 +8FF5F3 +8FF5F4 +8FF5F5 +8FF5F6 +8FF5F7 +8FF5F8 +8FF5F9 +8FF5FA +8FF5FB +8FF5FC +8FF5FD +8FF5FE +8FF6A1 +8FF6A2 +8FF6A3 +8FF6A4 +8FF6A5 +8FF6A6 +8FF6A7 +8FF6A8 +8FF6A9 +8FF6AA +8FF6AB +8FF6AC +8FF6AD +8FF6AE +8FF6AF +8FF6B0 +8FF6B1 +8FF6B2 +8FF6B3 +8FF6B4 +8FF6B5 +8FF6B6 +8FF6B7 +8FF6B8 +8FF6B9 +8FF6BA +8FF6BB +8FF6BC +8FF6BD +8FF6BE +8FF6BF +8FF6C0 +8FF6C1 +8FF6C2 +8FF6C3 +8FF6C4 +8FF6C5 +8FF6C6 +8FF6C7 +8FF6C8 +8FF6C9 +8FF6CA +8FF6CB +8FF6CC +8FF6CD +8FF6CE +8FF6CF +8FF6D0 +8FF6D1 +8FF6D2 +8FF6D3 +8FF6D4 +8FF6D5 +8FF6D6 +8FF6D7 +8FF6D8 +8FF6D9 +8FF6DA +8FF6DB +8FF6DC +8FF6DD +8FF6DE +8FF6DF +8FF6E0 +8FF6E1 +8FF6E2 +8FF6E3 +8FF6E4 +8FF6E5 +8FF6E6 +8FF6E7 +8FF6E8 +8FF6E9 +8FF6EA +8FF6EB +8FF6EC +8FF6ED +8FF6EE +8FF6EF +8FF6F0 +8FF6F1 +8FF6F2 +8FF6F3 +8FF6F4 +8FF6F5 +8FF6F6 +8FF6F7 +8FF6F8 +8FF6F9 +8FF6FA +8FF6FB +8FF6FC +8FF6FD +8FF6FE +8FF7A1 +8FF7A2 +8FF7A3 +8FF7A4 +8FF7A5 +8FF7A6 +8FF7A7 +8FF7A8 +8FF7A9 +8FF7AA +8FF7AB +8FF7AC +8FF7AD +8FF7AE +8FF7AF +8FF7B0 +8FF7B1 +8FF7B2 +8FF7B3 +8FF7B4 +8FF7B5 +8FF7B6 +8FF7B7 +8FF7B8 +8FF7B9 +8FF7BA +8FF7BB +8FF7BC +8FF7BD +8FF7BE +8FF7BF +8FF7C0 +8FF7C1 +8FF7C2 +8FF7C3 +8FF7C4 +8FF7C5 +8FF7C6 +8FF7C7 +8FF7C8 +8FF7C9 +8FF7CA +8FF7CB +8FF7CC +8FF7CD +8FF7CE +8FF7CF +8FF7D0 +8FF7D1 +8FF7D2 +8FF7D3 +8FF7D4 +8FF7D5 +8FF7D6 +8FF7D7 +8FF7D8 +8FF7D9 +8FF7DA +8FF7DB +8FF7DC +8FF7DD +8FF7DE +8FF7DF +8FF7E0 +8FF7E1 +8FF7E2 +8FF7E3 +8FF7E4 +8FF7E5 +8FF7E6 +8FF7E7 +8FF7E8 +8FF7E9 +8FF7EA +8FF7EB +8FF7EC +8FF7ED +8FF7EE +8FF7EF +8FF7F0 +8FF7F1 +8FF7F2 +8FF7F3 +8FF7F4 +8FF7F5 +8FF7F6 +8FF7F7 +8FF7F8 +8FF7F9 +8FF7FA +8FF7FB +8FF7FC +8FF7FD +8FF7FE +8FF8A1 +8FF8A2 +8FF8A3 +8FF8A4 +8FF8A5 +8FF8A6 +8FF8A7 +8FF8A8 +8FF8A9 +8FF8AA +8FF8AB +8FF8AC +8FF8AD +8FF8AE +8FF8AF +8FF8B0 +8FF8B1 +8FF8B2 +8FF8B3 +8FF8B4 +8FF8B5 +8FF8B6 +8FF8B7 +8FF8B8 +8FF8B9 +8FF8BA +8FF8BB +8FF8BC +8FF8BD +8FF8BE +8FF8BF +8FF8C0 +8FF8C1 +8FF8C2 +8FF8C3 +8FF8C4 +8FF8C5 +8FF8C6 +8FF8C7 +8FF8C8 +8FF8C9 +8FF8CA +8FF8CB +8FF8CC +8FF8CD +8FF8CE +8FF8CF +8FF8D0 +8FF8D1 +8FF8D2 +8FF8D3 +8FF8D4 +8FF8D5 +8FF8D6 +8FF8D7 +8FF8D8 +8FF8D9 +8FF8DA +8FF8DB +8FF8DC +8FF8DD +8FF8DE +8FF8DF +8FF8E0 +8FF8E1 +8FF8E2 +8FF8E3 +8FF8E4 +8FF8E5 +8FF8E6 +8FF8E7 +8FF8E8 +8FF8E9 +8FF8EA +8FF8EB +8FF8EC +8FF8ED +8FF8EE +8FF8EF +8FF8F0 +8FF8F1 +8FF8F2 +8FF8F3 +8FF8F4 +8FF8F5 +8FF8F6 +8FF8F7 +8FF8F8 +8FF8F9 +8FF8FA +8FF8FB +8FF8FC +8FF8FD +8FF8FE +8FF9A1 +8FF9A2 +8FF9A3 +8FF9A4 +8FF9A5 +8FF9A6 +8FF9A7 +8FF9A8 +8FF9A9 +8FF9AA +8FF9AB +8FF9AC +8FF9AD +8FF9AE +8FF9AF +8FF9B0 +8FF9B1 +8FF9B2 +8FF9B3 +8FF9B4 +8FF9B5 +8FF9B6 +8FF9B7 +8FF9B8 +8FF9B9 +8FF9BA +8FF9BB +8FF9BC +8FF9BD +8FF9BE +8FF9BF +8FF9C0 +8FF9C1 +8FF9C2 +8FF9C3 +8FF9C4 +8FF9C5 +8FF9C6 +8FF9C7 +8FF9C8 +8FF9C9 +8FF9CA +8FF9CB +8FF9CC +8FF9CD +8FF9CE +8FF9CF +8FF9D0 +8FF9D1 +8FF9D2 +8FF9D3 +8FF9D4 +8FF9D5 +8FF9D6 +8FF9D7 +8FF9D8 +8FF9D9 +8FF9DA +8FF9DB +8FF9DC +8FF9DD +8FF9DE +8FF9DF +8FF9E0 +8FF9E1 +8FF9E2 +8FF9E3 +8FF9E4 +8FF9E5 +8FF9E6 +8FF9E7 +8FF9E8 +8FF9E9 +8FF9EA +8FF9EB +8FF9EC +8FF9ED +8FF9EE +8FF9EF +8FF9F0 +8FF9F1 +8FF9F2 +8FF9F3 +8FF9F4 +8FF9F5 +8FF9F6 +8FF9F7 +8FF9F8 +8FF9F9 +8FF9FA +8FF9FB +8FF9FC +8FF9FD +8FF9FE +8FFAA1 +8FFAA2 +8FFAA3 +8FFAA4 +8FFAA5 +8FFAA6 +8FFAA7 +8FFAA8 +8FFAA9 +8FFAAA +8FFAAB +8FFAAC +8FFAAD +8FFAAE +8FFAAF +8FFAB0 +8FFAB1 +8FFAB2 +8FFAB3 +8FFAB4 +8FFAB5 +8FFAB6 +8FFAB7 +8FFAB8 +8FFAB9 +8FFABA +8FFABB +8FFABC +8FFABD +8FFABE +8FFABF +8FFAC0 +8FFAC1 +8FFAC2 +8FFAC3 +8FFAC4 +8FFAC5 +8FFAC6 +8FFAC7 +8FFAC8 +8FFAC9 +8FFACA +8FFACB +8FFACC +8FFACD +8FFACE +8FFACF +8FFAD0 +8FFAD1 +8FFAD2 +8FFAD3 +8FFAD4 +8FFAD5 +8FFAD6 +8FFAD7 +8FFAD8 +8FFAD9 +8FFADA +8FFADB +8FFADC +8FFADD +8FFADE +8FFADF +8FFAE0 +8FFAE1 +8FFAE2 +8FFAE3 +8FFAE4 +8FFAE5 +8FFAE6 +8FFAE7 +8FFAE8 +8FFAE9 +8FFAEA +8FFAEB +8FFAEC +8FFAED +8FFAEE +8FFAEF +8FFAF0 +8FFAF1 +8FFAF2 +8FFAF3 +8FFAF4 +8FFAF5 +8FFAF6 +8FFAF7 +8FFAF8 +8FFAF9 +8FFAFA +8FFAFB +8FFAFC +8FFAFD +8FFAFE +8FFBA1 +8FFBA2 +8FFBA3 +8FFBA4 +8FFBA5 +8FFBA6 +8FFBA7 +8FFBA8 +8FFBA9 +8FFBAA +8FFBAB +8FFBAC +8FFBAD +8FFBAE +8FFBAF +8FFBB0 +8FFBB1 +8FFBB2 +8FFBB3 +8FFBB4 +8FFBB5 +8FFBB6 +8FFBB7 +8FFBB8 +8FFBB9 +8FFBBA +8FFBBB +8FFBBC +8FFBBD +8FFBBE +8FFBBF +8FFBC0 +8FFBC1 +8FFBC2 +8FFBC3 +8FFBC4 +8FFBC5 +8FFBC6 +8FFBC7 +8FFBC8 +8FFBC9 +8FFBCA +8FFBCB +8FFBCC +8FFBCD +8FFBCE +8FFBCF +8FFBD0 +8FFBD1 +8FFBD2 +8FFBD3 +8FFBD4 +8FFBD5 +8FFBD6 +8FFBD7 +8FFBD8 +8FFBD9 +8FFBDA +8FFBDB +8FFBDC +8FFBDD +8FFBDE +8FFBDF +8FFBE0 +8FFBE1 +8FFBE2 +8FFBE3 +8FFBE4 +8FFBE5 +8FFBE6 +8FFBE7 +8FFBE8 +8FFBE9 +8FFBEA +8FFBEB +8FFBEC +8FFBED +8FFBEE +8FFBEF +8FFBF0 +8FFBF1 +8FFBF2 +8FFBF3 +8FFBF4 +8FFBF5 +8FFBF6 +8FFBF7 +8FFBF8 +8FFBF9 +8FFBFA +8FFBFB +8FFBFC +8FFBFD +8FFBFE +8FFCA1 +8FFCA2 +8FFCA3 +8FFCA4 +8FFCA5 +8FFCA6 +8FFCA7 +8FFCA8 +8FFCA9 +8FFCAA +8FFCAB +8FFCAC +8FFCAD +8FFCAE +8FFCAF +8FFCB0 +8FFCB1 +8FFCB2 +8FFCB3 +8FFCB4 +8FFCB5 +8FFCB6 +8FFCB7 +8FFCB8 +8FFCB9 +8FFCBA +8FFCBB +8FFCBC +8FFCBD +8FFCBE +8FFCBF +8FFCC0 +8FFCC1 +8FFCC2 +8FFCC3 +8FFCC4 +8FFCC5 +8FFCC6 +8FFCC7 +8FFCC8 +8FFCC9 +8FFCCA +8FFCCB +8FFCCC +8FFCCD +8FFCCE +8FFCCF +8FFCD0 +8FFCD1 +8FFCD2 +8FFCD3 +8FFCD4 +8FFCD5 +8FFCD6 +8FFCD7 +8FFCD8 +8FFCD9 +8FFCDA +8FFCDB +8FFCDC +8FFCDD +8FFCDE +8FFCDF +8FFCE0 +8FFCE1 +8FFCE2 +8FFCE3 +8FFCE4 +8FFCE5 +8FFCE6 +8FFCE7 +8FFCE8 +8FFCE9 +8FFCEA +8FFCEB +8FFCEC +8FFCED +8FFCEE +8FFCEF +8FFCF0 +8FFCF1 +8FFCF2 +8FFCF3 +8FFCF4 +8FFCF5 +8FFCF6 +8FFCF7 +8FFCF8 +8FFCF9 +8FFCFA +8FFCFB +8FFCFC +8FFCFD +8FFCFE +8FFDA1 +8FFDA2 +8FFDA3 +8FFDA4 +8FFDA5 +8FFDA6 +8FFDA7 +8FFDA8 +8FFDA9 +8FFDAA +8FFDAB +8FFDAC +8FFDAD +8FFDAE +8FFDAF +8FFDB0 +8FFDB1 +8FFDB2 +8FFDB3 +8FFDB4 +8FFDB5 +8FFDB6 +8FFDB7 +8FFDB8 +8FFDB9 +8FFDBA +8FFDBB +8FFDBC +8FFDBD +8FFDBE +8FFDBF +8FFDC0 +8FFDC1 +8FFDC2 +8FFDC3 +8FFDC4 +8FFDC5 +8FFDC6 +8FFDC7 +8FFDC8 +8FFDC9 +8FFDCA +8FFDCB +8FFDCC +8FFDCD +8FFDCE +8FFDCF +8FFDD0 +8FFDD1 +8FFDD2 +8FFDD3 +8FFDD4 +8FFDD5 +8FFDD6 +8FFDD7 +8FFDD8 +8FFDD9 +8FFDDA +8FFDDB +8FFDDC +8FFDDD +8FFDDE +8FFDDF +8FFDE0 +8FFDE1 +8FFDE2 +8FFDE3 +8FFDE4 +8FFDE5 +8FFDE6 +8FFDE7 +8FFDE8 +8FFDE9 +8FFDEA +8FFDEB +8FFDEC +8FFDED +8FFDEE +8FFDEF +8FFDF0 +8FFDF1 +8FFDF2 +8FFDF3 +8FFDF4 +8FFDF5 +8FFDF6 +8FFDF7 +8FFDF8 +8FFDF9 +8FFDFA +8FFDFB +8FFDFC +8FFDFD +8FFDFE +8FFEA1 +8FFEA2 +8FFEA3 +8FFEA4 +8FFEA5 +8FFEA6 +8FFEA7 +8FFEA8 +8FFEA9 +8FFEAA +8FFEAB +8FFEAC +8FFEAD +8FFEAE +8FFEAF +8FFEB0 +8FFEB1 +8FFEB2 +8FFEB3 +8FFEB4 +8FFEB5 +8FFEB6 +8FFEB7 +8FFEB8 +8FFEB9 +8FFEBA +8FFEBB +8FFEBC +8FFEBD +8FFEBE +8FFEBF +8FFEC0 +8FFEC1 +8FFEC2 +8FFEC3 +8FFEC4 +8FFEC5 +8FFEC6 +8FFEC7 +8FFEC8 +8FFEC9 +8FFECA +8FFECB +8FFECC +8FFECD +8FFECE +8FFECF +8FFED0 +8FFED1 +8FFED2 +8FFED3 +8FFED4 +8FFED5 +8FFED6 +8FFED7 +8FFED8 +8FFED9 +8FFEDA +8FFEDB +8FFEDC +8FFEDD +8FFEDE +8FFEDF +8FFEE0 +8FFEE1 +8FFEE2 +8FFEE3 +8FFEE4 +8FFEE5 +8FFEE6 +8FFEE7 +8FFEE8 +8FFEE9 +8FFEEA +8FFEEB +8FFEEC +8FFEED +8FFEEE +8FFEEF +8FFEF0 +8FFEF1 +8FFEF2 +8FFEF3 +8FFEF4 +8FFEF5 +8FFEF6 +8FFEF7 +8FFEF8 +8FFEF9 +8FFEFA +8FFEFB +8FFEFC +8FFEFD +8FFEFE +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE t4; +SET collation_connection='cp932_japanese_ci'; +create table t1 select repeat('a',4000) a; +delete from t1; +insert into t1 values ('a'), ('a '), ('a\t'); +select collation(a),hex(a) from t1 order by a; +collation(a) hex(a) +cp932_japanese_ci 6109 +cp932_japanese_ci 61 +cp932_japanese_ci 6120 +drop table t1; +SET collation_connection='cp932_bin'; +create table t1 select repeat('a',4000) a; +delete from t1; +insert into t1 values ('a'), ('a '), ('a\t'); +select collation(a),hex(a) from t1 order by a; +collation(a) hex(a) +cp932_bin 6109 +cp932_bin 61 +cp932_bin 6120 +drop table t1; +create table t1 (col1 varchar(1)) character set cp932; +insert into t1 values ('a'); +insert into t1 values ('ab'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +select * from t1; +col1 +a +a +insert into t1 values ('abc'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +select * from t1; +col1 +a +a +a +drop table t1; +set names utf8; +create table t1 (a text) default character set cp932; +insert into t1 values (_utf8 0xE38182); +show warnings; +Level Code Message +select * from t1; +a +ã‚ +select hex(a) from t1; +hex(a) +82A0 +drop table t1; +ƒ\ +ƒ\ +c_cp932 +ƒ\ +ƒ\ +ƒ\ +ソ +ソ +ƒ\ +ƒ\ diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result new file mode 100644 index 00000000000..4f4e7bcedd7 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result @@ -0,0 +1,19 @@ +SET TIMESTAMP=10000; +create table t2 (c char(30)) charset=ucs2; +set @v=convert('abc' using ucs2); +reset master; +insert into t2 values (@v); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +flush logs; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +drop table t2; diff --git a/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result b/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result new file mode 100644 index 00000000000..503076d66d9 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result @@ -0,0 +1,17 @@ +drop database if exists `drop-temp+table-test`; +reset master; +create database `drop-temp+table-test`; +use `drop-temp+table-test`; +create temporary table shortn1 (a int); +create temporary table `table:name` (a int); +create temporary table shortn2 (a int); +select get_lock("a",10); +get_lock("a",10) +1 +select get_lock("a",10); +get_lock("a",10) +1 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # create database `drop-temp+table-test` +drop database `drop-temp+table-test`; diff --git a/mysql-test/suite/binlog/r/binlog_row_innodb_stat.result b/mysql-test/suite/binlog/r/binlog_row_innodb_stat.result new file mode 100644 index 00000000000..e6813ee2719 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_row_innodb_stat.result @@ -0,0 +1,39 @@ +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 0 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 0 +drop table if exists t1; +create table t1 (a int) engine=innodb; +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 1 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 1 +begin; +delete from t1; +commit; +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 2 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 1 +drop table t1; +show status like "Innodb_buffer_pool_pages_total"; +Variable_name Value +Innodb_buffer_pool_pages_total 512 +show status like "Innodb_page_size"; +Variable_name Value +Innodb_page_size 16384 +show status like "Innodb_rows_deleted"; +Variable_name Value +Innodb_rows_deleted 2000 +show status like "Innodb_rows_inserted"; +Variable_name Value +Innodb_rows_inserted 2000 +show status like "Innodb_rows_updated"; +Variable_name Value +Innodb_rows_updated 0 diff --git a/mysql-test/suite/binlog/r/binlog_row_insert_select.result b/mysql-test/suite/binlog/r/binlog_row_insert_select.result new file mode 100644 index 00000000000..cd6ddafc47b --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_row_insert_select.result @@ -0,0 +1,25 @@ +drop table if exists t1,t2; +create table t1(a int, unique(a)); +insert into t1 values(2); +create table t2(a int); +insert into t2 values(1),(2); +reset master; +insert into t1 select * from t2; +ERROR 23000: Duplicate entry '2' for key 'a' +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +select * from t1; +a +1 +2 +drop table t1, t2; +create table t1(a int); +insert into t1 values(1),(1); +reset master; +create table t2(unique(a)) select a from t1; +ERROR 23000: Duplicate entry '1' for key 'a' +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +drop table t1; diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result new file mode 100644 index 00000000000..6ac942176c7 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -0,0 +1,415 @@ +drop table if exists t1, t2; +create table t1 (a int) engine=innodb; +create table t2 (a int) engine=myisam; +reset master; +begin; +insert into t1 values(1); +insert into t2 select * from t1; +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(2); +insert into t2 select * from t1; +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; ROLLBACK +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(3); +savepoint my_savepoint; +insert into t1 values(4); +insert into t2 select * from t1; +rollback to savepoint my_savepoint; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; savepoint my_savepoint +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; rollback to savepoint my_savepoint +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(5); +savepoint my_savepoint; +insert into t1 values(6); +insert into t2 select * from t1; +rollback to savepoint my_savepoint; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +insert into t1 values(7); +commit; +select a from t1 order by a; +a +5 +7 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; savepoint my_savepoint +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; rollback to savepoint my_savepoint +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +reset master; +select get_lock("a",10); +get_lock("a",10) +1 +begin; +insert into t1 values(8); +insert into t2 select * from t1; +select get_lock("a",10); +get_lock("a",10) +1 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; ROLLBACK +delete from t1; +delete from t2; +reset master; +insert into t1 values(9); +insert into t2 select * from t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +delete from t1; +delete from t2; +reset master; +insert into t1 values(10); +begin; +insert into t2 select * from t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +insert into t1 values(11); +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +alter table t2 engine=INNODB; +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(12); +insert into t2 select * from t1; +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(13); +insert into t2 select * from t1; +rollback; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(14); +savepoint my_savepoint; +insert into t1 values(15); +insert into t2 select * from t1; +rollback to savepoint my_savepoint; +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(16); +savepoint my_savepoint; +insert into t1 values(17); +insert into t2 select * from t1; +rollback to savepoint my_savepoint; +insert into t1 values(18); +commit; +select a from t1 order by a; +a +16 +18 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +alter table t2 engine=MyISAM; +insert into t1 values (1); +begin; +select * from t1 for update; +a +1 +select (@before:=unix_timestamp())*0; +(@before:=unix_timestamp())*0 +0 +begin; +select * from t1 for update; +insert into t2 values (20); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +select (@after:=unix_timestamp())*0; +(@after:=unix_timestamp())*0 +0 +select (@after-@before) >= 2; +(@after-@before) >= 2 +1 +drop table t1,t2; +commit; +begin; +create temporary table ti (a int) engine=innodb; +rollback; +insert into ti values(1); +set autocommit=0; +create temporary table t1 (a int) engine=myisam; +commit; +insert t1 values (1); +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +create table t0 (n int); +insert t0 select * from t1; +set autocommit=1; +insert into t0 select GET_LOCK("lock1",null); +set autocommit=0; +create table t2 (n int) engine=innodb; +insert into t2 values (3); +select get_lock("lock1",60); +get_lock("lock1",60) +1 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; alter table t2 engine=MyISAM +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; drop table t1,t2 +master-bin.000001 # Query # # use `test`; create table t0 (n int) +master-bin.000001 # Table_map # # table_id: # (test.t0) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t0) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb +do release_lock("lock1"); +drop table t0,t2; +set autocommit=0; +CREATE TABLE t1 (a int, b int) engine=myisam; +reset master; +INSERT INTO t1 values (1,1),(1,2); +CREATE TABLE t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +DROP TABLE if exists t2; +Warnings: +Note 1051 Unknown table 't2' +INSERT INTO t1 values (3,3); +CREATE TEMPORARY TABLE t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +DROP TABLE IF EXISTS t2; +Warnings: +Note 1051 Unknown table 't2' +CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb; +INSERT INTO t1 VALUES (4,4); +CREATE TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +SELECT * from t2; +a b +TRUNCATE table t2; +INSERT INTO t1 VALUES (5,5); +INSERT INTO t2 select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +SELECT * FROM t2; +a b +DROP TABLE t2; +INSERT INTO t1 values (6,6); +CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb ; +INSERT INTO t1 values (7,7); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +INSERT INTO t1 values (8,8); +CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +COMMIT; +INSERT INTO t1 values (9,9); +CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +SELECT * from t2; +a b +TRUNCATE table t2; +INSERT INTO t1 values (10,10); +INSERT INTO t2 select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +SELECT * from t1; +a b +1 1 +1 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +INSERT INTO t2 values (100,100); +CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +COMMIT; +INSERT INTO t2 values (101,101); +CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +ROLLBACK; +SELECT * from t2; +a b +100 100 +DROP TABLE t1,t2; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; DROP TABLE if exists t2 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2 +master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; TRUNCATE table t2 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t2 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; TRUNCATE table t2 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +reset master; +create table t1 (a int) engine=innodb; +create table t2 (a int) engine=myisam; +select get_lock("a",10); +get_lock("a",10) +1 +begin; +insert into t1 values(8); +insert into t2 select * from t1; +select get_lock("a",10); +get_lock("a",10) +1 +flush logs; +select +(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) +is not null; +(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) +is not null +1 +select +@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", +@a not like "%#%error_code=%error_code=%"; +@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%" +1 1 +drop table t1, t2; diff --git a/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result b/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result new file mode 100644 index 00000000000..3a2dc441632 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result @@ -0,0 +1,29 @@ +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; +insert delayed into t1 values (207); +insert delayed into t1 values (null); +insert delayed into t1 values (300); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam +master-bin.000001 # Query # # use `test`; insert delayed into t1 values (207) +master-bin.000001 # Intvar # # INSERT_ID=208 +master-bin.000001 # Query # # use `test`; insert delayed into t1 values (null) +master-bin.000001 # Query # # use `test`; insert delayed into t1 values (300) +insert delayed into t1 values (null),(null),(null),(null); +insert delayed into t1 values (null),(null),(400),(null); +11 == 11 +select * from t1; +a +207 +208 +300 +301 +302 +303 +304 +305 +306 +400 +401 +drop table t1; diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result new file mode 100644 index 00000000000..66fe3e40270 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -0,0 +1,237 @@ +create table t1 (a int, b int) engine=innodb; +begin; +insert into t1 values (1,2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server ver: #, Binlog ver: # +master-bin.000001 106 Query 1 213 use `test`; create table t1 (a int, b int) engine=innodb +master-bin.000001 213 Query 1 281 use `test`; BEGIN +master-bin.000001 281 Query 1 90 use `test`; insert into t1 values (1,2) +master-bin.000001 371 Xid 1 398 COMMIT /* XID */ +drop table t1; +drop table if exists t1, t2; +reset master; +create table t1 (a int) engine=innodb; +create table t2 (a int) engine=innodb; +begin; +insert t1 values (5); +commit; +begin; +insert t2 values (5); +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb +master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert t1 values (5) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert t2 values (5) +master-bin.000001 # Xid # # COMMIT /* XID */ +drop table t1,t2; +reset master; +create table t1 (n int) engine=innodb; +begin; +commit; +drop table t1; +show binlog events in 'master-bin.000001' from 106; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb +master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # use `test`; insert into t1 values(100 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(99 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(98 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(97 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(96 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(95 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(94 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(93 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(92 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(91 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(90 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(89 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(88 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(87 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(86 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(85 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(84 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(83 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(82 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(81 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(80 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(79 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(78 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(77 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(76 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(75 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(74 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(73 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(72 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(71 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(70 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(69 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(68 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(67 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(66 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(65 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(64 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(63 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(62 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(61 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(60 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(59 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(58 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(57 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(56 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(55 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(54 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(53 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(52 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(51 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(50 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(49 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(48 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(47 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(46 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(45 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(44 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(43 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(42 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(41 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(40 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(39 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(38 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(37 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(36 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(35 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(34 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(33 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(32 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(31 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(30 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(29 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(28 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(27 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(26 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(25 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(24 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(23 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(22 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(21 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(20 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(19 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(18 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(17 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(16 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(15 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(14 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(13 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(12 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(11 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(10 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(9 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(8 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(7 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(6 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(5 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(4 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(3 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(2 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(1 + 4) +master-bin.000001 # Xid 1 # COMMIT /* xid= */ +master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002' from 106; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query 1 # use `test`; drop table t1 +reset master; +create table t1 (id tinyint auto_increment primary key); +set insert_id=128; +insert into t1 values(null); +Warnings: +Warning 1264 Out of range value for column 'id' at row 1 +select * from t1; +id +127 +drop table t1; +create table t1 (a int); +create table if not exists t2 select * from t1; +create temporary table tt1 (a int); +create table if not exists t3 like tt1; +USE mysql; +INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test'); +UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'; +DELETE FROM user WHERE host='localhost' AND user='@#@'; +use test; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) +master-bin.000001 # Intvar # # INSERT_ID=127 +master-bin.000001 # Query # # use `test`; insert into t1 values(null) +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Query # # use `test`; create table if not exists t2 select * from t1 +master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int) +master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1 +master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test') +master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@' +master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@' +drop table t1,t2,t3,tt1; +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; +insert delayed into t1 values (207); +insert delayed into t1 values (null); +insert delayed into t1 values (300); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) +master-bin.000001 # Intvar # # INSERT_ID=127 +master-bin.000001 # Query # # use `test`; insert into t1 values(null) +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Query # # use `test`; create table if not exists t2 select * from t1 +master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int) +master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1 +master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test') +master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@' +master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@' +master-bin.000001 # Query # # use `test`; drop table t1,t2,t3,tt1 +master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +insert delayed into t1 values (null),(null),(null),(null); +insert delayed into t1 values (null),(null),(400),(null); +11 == 11 +select * from t1; +a +207 +208 +300 +301 +302 +303 +304 +305 +306 +400 +401 +drop table t1; +reset master; +drop table if exists t3; +create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 346 +insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +show master status /* must show new binlog index after rotating */; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000002 106 +drop table t3; diff --git a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result new file mode 100644 index 00000000000..a1c83ffc73d --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result @@ -0,0 +1,155 @@ +drop table if exists t1,t2; +CREATE TABLE t1 ( +Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, +Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL +) ENGINE=blackhole; +INSERT INTO t1 VALUES (9410,9412); +select period from t1; +period +select * from t1; +Period Varor_period +select t1.* from t1; +Period Varor_period +CREATE TABLE t2 ( +auto int NOT NULL auto_increment, +fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL, +companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL, +fld3 char(30) DEFAULT '' NOT NULL, +fld4 char(35) DEFAULT '' NOT NULL, +fld5 char(35) DEFAULT '' NOT NULL, +fld6 char(4) DEFAULT '' NOT NULL, +primary key (auto) +) ENGINE=blackhole; +INSERT INTO t2 VALUES (1192,068305,00,'Colombo','hardware','colicky',''); +INSERT INTO t2 VALUES (1193,000000,00,'nondecreasing','implant','thrillingly',''); +select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"; +fld3 +select fld3 from t2 where fld3 like "%cultivation" ; +fld3 +select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3; +fld3 companynr +select fld3,companynr from t2 where companynr = 58 order by fld3; +fld3 companynr +select fld3 from t2 order by fld3 desc limit 10; +fld3 +select fld3 from t2 order by fld3 desc limit 5; +fld3 +select fld3 from t2 order by fld3 desc limit 5,5; +fld3 +select t2.fld3 from t2 where fld3 = 'honeysuckle'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'h%le'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_'; +fld3 +select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%'; +fld3 +select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; +fld3 +select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3; +fld1 fld3 +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)); +INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), +('Full-text indexes', 'are called collections'), +('Only MyISAM tables','support collections'), +('Function MATCH ... AGAINST()','is used to do a search'), +('Full-text search in MySQL', 'implements vector space model'); +SHOW INDEX FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a NULL NULL NULL NULL YES FULLTEXT +t1 1 a 2 b NULL NULL NULL NULL YES FULLTEXT +select * from t1 where MATCH(a,b) AGAINST ("collections"); +a b +Only MyISAM tables support collections +Full-text indexes are called collections +explain extended select * from t1 where MATCH(a,b) AGAINST ("collections"); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 fulltext a a 0 1 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against (_latin1'collections')) +select * from t1 where MATCH(a,b) AGAINST ("indexes"); +a b +Full-text indexes are called collections +select * from t1 where MATCH(a,b) AGAINST ("indexes collections"); +a b +Full-text indexes are called collections +Only MyISAM tables support collections +select * from t1 where MATCH(a,b) AGAINST ("only"); +a b +reset master; +drop table t1,t2; +create table t1 (a int) engine=blackhole; +delete from t1 where a=10; +update t1 set a=11 where a=15; +insert into t1 values(1); +insert ignore into t1 values(1); +replace into t1 values(100); +create table t2 (a varchar(200)) engine=blackhole; +load data infile '../std_data_ln/words.dat' into table t2; +alter table t1 add b int; +alter table t1 drop b; +create table t3 like t1; +insert into t1 select * from t3; +replace into t1 select * from t3; +select * from t1; +a +select * from t2; +a +select * from t3; +a +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; drop table t1,t2 +master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole +master-bin.000001 # Query # # use `test`; delete from t1 where a=10 +master-bin.000001 # Query # # use `test`; update t1 set a=11 where a=15 +master-bin.000001 # Query # # use `test`; insert into t1 values(1) +master-bin.000001 # Query # # use `test`; insert ignore into t1 values(1) +master-bin.000001 # Query # # use `test`; replace into t1 values(100) +master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole +master-bin.000001 # Begin_load_query # # ;file_id=1;block_len=581 +master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/words.dat' into table t2 ;file_id=1 +master-bin.000001 # Query # # use `test`; alter table t1 add b int +master-bin.000001 # Query # # use `test`; alter table t1 drop b +master-bin.000001 # Query # # use `test`; create table t3 like t1 +master-bin.000001 # Query # # use `test`; insert into t1 select * from t3 +master-bin.000001 # Query # # use `test`; replace into t1 select * from t3 +drop table t1,t2,t3; +CREATE TABLE t1(a INT) ENGINE=BLACKHOLE; +INSERT DELAYED INTO t1 VALUES(1); +DROP TABLE t1; +CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE; +DELETE FROM t1 WHERE a=10; +ALTER TABLE t1 ADD INDEX(a); +DELETE FROM t1 WHERE a=10; +ALTER TABLE t1 DROP INDEX a; +ALTER TABLE t1 ADD UNIQUE INDEX(a); +DELETE FROM t1 WHERE a=10; +ALTER TABLE t1 DROP INDEX a; +ALTER TABLE t1 ADD PRIMARY KEY(a); +DELETE FROM t1 WHERE a=10; +DROP TABLE t1; +reset master; +create table t1 (a int) engine=blackhole; +set autocommit=0; +start transaction; +insert into t1 values(1); +commit; +start transaction; +insert into t1 values(2); +rollback; +set autocommit=1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(1) +master-bin.000001 # Query # # use `test`; COMMIT +drop table if exists t1; diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result new file mode 100755 index 00000000000..ca70f98c0e6 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result @@ -0,0 +1,11377 @@ +drop table if exists t1; +drop table if exists t2; +drop table if exists t3; +drop table if exists t4; +set names cp932; +set character_set_database = cp932; +CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = cp932; +INSERT INTO t1 VALUES +(0x05),(0x7E),(0x815C),(0x815F),(0x8160),(0x8161),(0x817C),(0x8191),(0x8192),(0x81CA); +INSERT INTO t1 VALUES +(0x8740),(0x8741),(0x8742),(0x8743),(0x8744),(0x8745),(0x8746),(0x8747), +(0x8748),(0x8749),(0x874A),(0x874B),(0x874C),(0x874D),(0x874E),(0x874F), +(0x8750),(0x8751),(0x8752),(0x8753),(0x8754),(0x8755),(0x8756),(0x8757), +(0x8758),(0x8759),(0x875A),(0x875B),(0x875C),(0x875D),(0x875F), +(0x8760),(0x8761),(0x8762),(0x8763),(0x8764),(0x8765),(0x8766),(0x8767), +(0x8768),(0x8769),(0x876A),(0x876B),(0x876C),(0x876D),(0x876E),(0x876F), +(0x8770),(0x8771),(0x8772),(0x8773),(0x8774),(0x8775),(0x877E), +(0x8780),(0x8781),(0x8782),(0x8783),(0x8784),(0x8785),(0x8786),(0x8787), +(0x8788),(0x8789),(0x878A),(0x878B),(0x878C),(0x878D),(0x878E),(0x878F), +(0x8790),(0x8791),(0x8792),(0x8793),(0x8794),(0x8795),(0x8796),(0x8797), +(0x8798),(0x8799),(0x879A),(0x879B),(0x879C); +INSERT INTO t1 VALUES +(0xED40),(0xED41),(0xED42),(0xED43),(0xED44),(0xED45),(0xED46),(0xED47), +(0xED48),(0xED49),(0xED4A),(0xED4B),(0xED4C),(0xED4D),(0xED4E),(0xED4F), +(0xED50),(0xED51),(0xED52),(0xED53),(0xED54),(0xED55),(0xED56),(0xED57), +(0xED58),(0xED59),(0xED5A),(0xED5B),(0xED5C),(0xED5D),(0xED5E),(0xED5F), +(0xED60),(0xED61),(0xED62),(0xED63),(0xED64),(0xED65),(0xED66),(0xED67), +(0xED68),(0xED69),(0xED6A),(0xED6B),(0xED6C),(0xED6D),(0xED6E),(0xED6F), +(0xED70),(0xED71),(0xED72),(0xED73),(0xED74),(0xED75),(0xED76),(0xED77), +(0xED78),(0xED79),(0xED7A),(0xED7B),(0xED7C),(0xED7D),(0xED7E), +(0xED80),(0xED81),(0xED82),(0xED83),(0xED84),(0xED85),(0xED86),(0xED87), +(0xED88),(0xED89),(0xED8A),(0xED8B),(0xED8C),(0xED8D),(0xED8E),(0xED8F), +(0xED90),(0xED91),(0xED92),(0xED93),(0xED94),(0xED95),(0xED96),(0xED97), +(0xED98),(0xED99),(0xED9A),(0xED9B),(0xED9C),(0xED9D),(0xED9E),(0xED9F), +(0xEDA0),(0xEDA1),(0xEDA2),(0xEDA3),(0xEDA4),(0xEDA5),(0xEDA6),(0xEDA7), +(0xEDA8),(0xEDA9),(0xEDAA),(0xEDAB),(0xEDAC),(0xEDAD),(0xEDAE),(0xEDAF), +(0xEDB0),(0xEDB1),(0xEDB2),(0xEDB3),(0xEDB4),(0xEDB5),(0xEDB6),(0xEDB7), +(0xEDB8),(0xEDB9),(0xEDBA),(0xEDBB),(0xEDBC),(0xEDBD),(0xEDBE),(0xEDBF), +(0xEDC0),(0xEDC1),(0xEDC2),(0xEDC3),(0xEDC4),(0xEDC5),(0xEDC6),(0xEDC7), +(0xEDC8),(0xEDC9),(0xEDCA),(0xEDCB),(0xEDCC),(0xEDCD),(0xEDCE),(0xEDCF), +(0xEDD0),(0xEDD1),(0xEDD2),(0xEDD3),(0xEDD4),(0xEDD5),(0xEDD6),(0xEDD7), +(0xEDD8),(0xEDD9),(0xEDDA),(0xEDDB),(0xEDDC),(0xEDDD),(0xEDDE),(0xEDDF), +(0xEDE0),(0xEDE1),(0xEDE2),(0xEDE3),(0xEDE4),(0xEDE5),(0xEDE6),(0xEDE7), +(0xEDE8),(0xEDE9),(0xEDEA),(0xEDEB),(0xEDEC),(0xEDED),(0xEDEE),(0xEDEF), +(0xEDF0),(0xEDF1),(0xEDF2),(0xEDF3),(0xEDF4),(0xEDF5),(0xEDF6),(0xEDF7), +(0xEDF8),(0xEDF9),(0xEDFA),(0xEDFB),(0xEDFC), +(0xEE40),(0xEE41),(0xEE42),(0xEE43),(0xEE44),(0xEE45),(0xEE46),(0xEE47), +(0xEE48),(0xEE49),(0xEE4A),(0xEE4B),(0xEE4C),(0xEE4D),(0xEE4E),(0xEE4F), +(0xEE50),(0xEE51),(0xEE52),(0xEE53),(0xEE54),(0xEE55),(0xEE56),(0xEE57), +(0xEE58),(0xEE59),(0xEE5A),(0xEE5B),(0xEE5C),(0xEE5D),(0xEE5E),(0xEE5F), +(0xEE60),(0xEE61),(0xEE62),(0xEE63),(0xEE64),(0xEE65),(0xEE66),(0xEE67), +(0xEE68),(0xEE69),(0xEE6A),(0xEE6B),(0xEE6C),(0xEE6D),(0xEE6E),(0xEE6F), +(0xEE70),(0xEE71),(0xEE72),(0xEE73),(0xEE74),(0xEE75),(0xEE76),(0xEE77), +(0xEE78),(0xEE79),(0xEE7A),(0xEE7B),(0xEE7C),(0xEE7D),(0xEE7E), +(0xEE80),(0xEE81),(0xEE82),(0xEE83),(0xEE84),(0xEE85),(0xEE86),(0xEE87), +(0xEE88),(0xEE89),(0xEE8A),(0xEE8B),(0xEE8C),(0xEE8D),(0xEE8E),(0xEE8F), +(0xEE90),(0xEE91),(0xEE92),(0xEE93),(0xEE94),(0xEE95),(0xEE96),(0xEE97), +(0xEE98),(0xEE99),(0xEE9A),(0xEE9B),(0xEE9C),(0xEE9D),(0xEE9E),(0xEE9F), +(0xEEA0),(0xEEA1),(0xEEA2),(0xEEA3),(0xEEA4),(0xEEA5),(0xEEA6),(0xEEA7), +(0xEEA8),(0xEEA9),(0xEEAA),(0xEEAB),(0xEEAC),(0xEEAD),(0xEEAE),(0xEEAF), +(0xEEB0),(0xEEB1),(0xEEB2),(0xEEB3),(0xEEB4),(0xEEB5),(0xEEB6),(0xEEB7), +(0xEEB8),(0xEEB9),(0xEEBA),(0xEEBB),(0xEEBC),(0xEEBD),(0xEEBE),(0xEEBF), +(0xEEC0),(0xEEC1),(0xEEC2),(0xEEC3),(0xEEC4),(0xEEC5),(0xEEC6),(0xEEC7), +(0xEEC8),(0xEEC9),(0xEECA),(0xEECB),(0xEECC),(0xEECD),(0xEECE),(0xEECF), +(0xEED0),(0xEED1),(0xEED2),(0xEED3),(0xEED4),(0xEED5),(0xEED6),(0xEED7), +(0xEED8),(0xEED9),(0xEEDA),(0xEEDB),(0xEEDC),(0xEEDD),(0xEEDE),(0xEEDF), +(0xEEE0),(0xEEE1),(0xEEE2),(0xEEE3),(0xEEE4),(0xEEE5),(0xEEE6),(0xEEE7), +(0xEEE8),(0xEEE9),(0xEEEA),(0xEEEB),(0xEEEC),(0xEEEF), +(0xEEF0),(0xEEF1),(0xEEF2),(0xEEF3),(0xEEF4),(0xEEF5),(0xEEF6),(0xEEF7), +(0xEEF8),(0xEEF9),(0xEEFA),(0xEEFB),(0xEEFC); +INSERT INTO t1 VALUES +(0xFA40),(0xFA41),(0xFA42),(0xFA43),(0xFA44),(0xFA45),(0xFA46),(0xFA47), +(0xFA48),(0xFA49),(0xFA4A),(0xFA4B),(0xFA4C),(0xFA4D),(0xFA4E),(0xFA4F), +(0xFA50),(0xFA51),(0xFA52),(0xFA53),(0xFA54),(0xFA55),(0xFA56),(0xFA57), +(0xFA58),(0xFA59),(0xFA5A),(0xFA5B),(0xFA5C),(0xFA5D),(0xFA5E),(0xFA5F), +(0xFA60),(0xFA61),(0xFA62),(0xFA63),(0xFA64),(0xFA65),(0xFA66),(0xFA67), +(0xFA68),(0xFA69),(0xFA6A),(0xFA6B),(0xFA6C),(0xFA6D),(0xFA6E),(0xFA6F), +(0xFA70),(0xFA71),(0xFA72),(0xFA73),(0xFA74),(0xFA75),(0xFA76),(0xFA77), +(0xFA78),(0xFA79),(0xFA7A),(0xFA7B),(0xFA7C),(0xFA7D),(0xFA7E), +(0xFA80),(0xFA81),(0xFA82),(0xFA83),(0xFA84),(0xFA85),(0xFA86),(0xFA87), +(0xFA88),(0xFA89),(0xFA8A),(0xFA8B),(0xFA8C),(0xFA8D),(0xFA8E),(0xFA8F), +(0xFA90),(0xFA91),(0xFA92),(0xFA93),(0xFA94),(0xFA95),(0xFA96),(0xFA97), +(0xFA98),(0xFA99),(0xFA9A),(0xFA9B),(0xFA9C),(0xFA9D),(0xFA9E),(0xFA9F), +(0xFAA0),(0xFAA1),(0xFAA2),(0xFAA3),(0xFAA4),(0xFAA5),(0xFAA6),(0xFAA7), +(0xFAA8),(0xFAA9),(0xFAAA),(0xFAAB),(0xFAAC),(0xFAAD),(0xFAAE),(0xFAAF), +(0xFAB0),(0xFAB1),(0xFAB2),(0xFAB3),(0xFAB4),(0xFAB5),(0xFAB6),(0xFAB7), +(0xFAB8),(0xFAB9),(0xFABA),(0xFABB),(0xFABC),(0xFABD),(0xFABE),(0xFABF), +(0xFAC0),(0xFAC1),(0xFAC2),(0xFAC3),(0xFAC4),(0xFAC5),(0xFAC6),(0xFAC7), +(0xFAC8),(0xFAC9),(0xFACA),(0xFACB),(0xFACC),(0xFACD),(0xFACE),(0xFACF), +(0xFAD0),(0xFAD1),(0xFAD2),(0xFAD3),(0xFAD4),(0xFAD5),(0xFAD6),(0xFAD7), +(0xFAD8),(0xFAD9),(0xFADA),(0xFADB),(0xFADC),(0xFADD),(0xFADE),(0xFADF), +(0xFAE0),(0xFAE1),(0xFAE2),(0xFAE3),(0xFAE4),(0xFAE5),(0xFAE6),(0xFAE7), +(0xFAE8),(0xFAE9),(0xFAEA),(0xFAEB),(0xFAEC),(0xFAED),(0xFAEE),(0xFAEF), +(0xFAF0),(0xFAF1),(0xFAF2),(0xFAF3),(0xFAF4),(0xFAF5),(0xFAF6),(0xFAF7), +(0xFAF8),(0xFAF9),(0xFAFA),(0xFAFB),(0xFAFC), +(0xFB40),(0xFB41),(0xFB42),(0xFB43),(0xFB44),(0xFB45),(0xFB46),(0xFB47), +(0xFB48),(0xFB49),(0xFB4A),(0xFB4B),(0xFB4C),(0xFB4D),(0xFB4E),(0xFB4F), +(0xFB50),(0xFB51),(0xFB52),(0xFB53),(0xFB54),(0xFB55),(0xFB56),(0xFB57), +(0xFB58),(0xFB59),(0xFB5A),(0xFB5B),(0xFB5C),(0xFB5D),(0xFB5E),(0xFB5F), +(0xFB60),(0xFB61),(0xFB62),(0xFB63),(0xFB64),(0xFB65),(0xFB66),(0xFB67), +(0xFB68),(0xFB69),(0xFB6A),(0xFB6B),(0xFB6C),(0xFB6D),(0xFB6E),(0xFB6F), +(0xFB70),(0xFB71),(0xFB72),(0xFB73),(0xFB74),(0xFB75),(0xFB76),(0xFB77), +(0xFB78),(0xFB79),(0xFB7A),(0xFB7B),(0xFB7C),(0xFB7D),(0xFB7E), +(0xFB80),(0xFB81),(0xFB82),(0xFB83),(0xFB84),(0xFB85),(0xFB86),(0xFB87), +(0xFB88),(0xFB89),(0xFB8A),(0xFB8B),(0xFB8C),(0xFB8D),(0xFB8E),(0xFB8F), +(0xFB90),(0xFB91),(0xFB92),(0xFB93),(0xFB94),(0xFB95),(0xFB96),(0xFB97), +(0xFB98),(0xFB99),(0xFB9A),(0xFB9B),(0xFB9C),(0xFB9D),(0xFB9E),(0xFB9F), +(0xFBA0),(0xFBA1),(0xFBA2),(0xFBA3),(0xFBA4),(0xFBA5),(0xFBA6),(0xFBA7), +(0xFBA8),(0xFBA9),(0xFBAA),(0xFBAB),(0xFBAC),(0xFBAD),(0xFBAE),(0xFBAF), +(0xFBB0),(0xFBB1),(0xFBB2),(0xFBB3),(0xFBB4),(0xFBB5),(0xFBB6),(0xFBB7), +(0xFBB8),(0xFBB9),(0xFBBA),(0xFBBB),(0xFBBC),(0xFBBD),(0xFBBE),(0xFBBF), +(0xFBC0),(0xFBC1),(0xFBC2),(0xFBC3),(0xFBC4),(0xFBC5),(0xFBC6),(0xFBC7), +(0xFBC8),(0xFBC9),(0xFBCA),(0xFBCB),(0xFBCC),(0xFBCD),(0xFBCE),(0xFBCF), +(0xFBD0),(0xFBD1),(0xFBD2),(0xFBD3),(0xFBD4),(0xFBD5),(0xFBD6),(0xFBD7), +(0xFBD8),(0xFBD9),(0xFBDA),(0xFBDB),(0xFBDC),(0xFBDD),(0xFBDE),(0xFBDF), +(0xFBE0),(0xFBE1),(0xFBE2),(0xFBE3),(0xFBE4),(0xFBE5),(0xFBE6),(0xFBE7), +(0xFBE8),(0xFBE9),(0xFBEA),(0xFBEB),(0xFBEC),(0xFBED),(0xFBEE),(0xFBEF), +(0xFBF0),(0xFBF1),(0xFBF2),(0xFBF3),(0xFBF4),(0xFBF5),(0xFBF6),(0xFBF7), +(0xFBF8),(0xFBF9),(0xFBFA),(0xFBFB),(0xFBFC), +(0xFC40),(0xFC41),(0xFC42),(0xFC43),(0xFC44),(0xFC45),(0xFC46),(0xFC47), +(0xFC48),(0xFC49),(0xFC4A),(0xFC4B); +INSERT INTO t1 VALUES +(0xF040),(0xF041),(0xF042),(0xF043),(0xF044),(0xF045),(0xF046),(0xF047), +(0xF048),(0xF049),(0xF04A),(0xF04B),(0xF04C),(0xF04D),(0xF04E),(0xF04F), +(0xF050),(0xF051),(0xF052),(0xF053),(0xF054),(0xF055),(0xF056),(0xF057), +(0xF058),(0xF059),(0xF05A),(0xF05B),(0xF05C),(0xF05D),(0xF05E),(0xF05F), +(0xF060),(0xF061),(0xF062),(0xF063),(0xF064),(0xF065),(0xF066),(0xF067), +(0xF068),(0xF069),(0xF06A),(0xF06B),(0xF06C),(0xF06D),(0xF06E),(0xF06F), +(0xF070),(0xF071),(0xF072),(0xF073),(0xF074),(0xF075),(0xF076),(0xF077), +(0xF078),(0xF079),(0xF07A),(0xF07B),(0xF07C),(0xF07D),(0xF07E), +(0xF080),(0xF081),(0xF082),(0xF083),(0xF084),(0xF085),(0xF086),(0xF087), +(0xF088),(0xF089),(0xF08A),(0xF08B),(0xF08C),(0xF08D),(0xF08E),(0xF08F), +(0xF090),(0xF091),(0xF092),(0xF093),(0xF094),(0xF095),(0xF096),(0xF097), +(0xF098),(0xF099),(0xF09A),(0xF09B),(0xF09C),(0xF09D),(0xF09E),(0xF09F), +(0xF0A0),(0xF0A1),(0xF0A2),(0xF0A3),(0xF0A4),(0xF0A5),(0xF0A6),(0xF0A7), +(0xF0A8),(0xF0A9),(0xF0AA),(0xF0AB),(0xF0AC),(0xF0AD),(0xF0AE),(0xF0AF), +(0xF0B0),(0xF0B1),(0xF0B2),(0xF0B3),(0xF0B4),(0xF0B5),(0xF0B6),(0xF0B7), +(0xF0B8),(0xF0B9),(0xF0BA),(0xF0BB),(0xF0BC),(0xF0BD),(0xF0BE),(0xF0BF), +(0xF0C0),(0xF0C1),(0xF0C2),(0xF0C3),(0xF0C4),(0xF0C5),(0xF0C6),(0xF0C7), +(0xF0C8),(0xF0C9),(0xF0CA),(0xF0CB),(0xF0CC),(0xF0CD),(0xF0CE),(0xF0CF), +(0xF0D0),(0xF0D1),(0xF0D2),(0xF0D3),(0xF0D4),(0xF0D5),(0xF0D6),(0xF0D7), +(0xF0D8),(0xF0D9),(0xF0DA),(0xF0DB),(0xF0DC),(0xF0DD),(0xF0DE),(0xF0DF), +(0xF0E0),(0xF0E1),(0xF0E2),(0xF0E3),(0xF0E4),(0xF0E5),(0xF0E6),(0xF0E7), +(0xF0E8),(0xF0E9),(0xF0EA),(0xF0EB),(0xF0EC),(0xF0ED),(0xF0EE),(0xF0EF), +(0xF0F0),(0xF0F1),(0xF0F2),(0xF0F3),(0xF0F4),(0xF0F5),(0xF0F6),(0xF0F7), +(0xF0F8),(0xF0F9),(0xF0FA),(0xF0FB),(0xF0FC), +(0xF140),(0xF141),(0xF142),(0xF143),(0xF144),(0xF145),(0xF146),(0xF147), +(0xF148),(0xF149),(0xF14A),(0xF14B),(0xF14C),(0xF14D),(0xF14E),(0xF14F), +(0xF150),(0xF151),(0xF152),(0xF153),(0xF154),(0xF155),(0xF156),(0xF157), +(0xF158),(0xF159),(0xF15A),(0xF15B),(0xF15C),(0xF15D),(0xF15E),(0xF15F), +(0xF160),(0xF161),(0xF162),(0xF163),(0xF164),(0xF165),(0xF166),(0xF167), +(0xF168),(0xF169),(0xF16A),(0xF16B),(0xF16C),(0xF16D),(0xF16E),(0xF16F), +(0xF170),(0xF171),(0xF172),(0xF173),(0xF174),(0xF175),(0xF176),(0xF177), +(0xF178),(0xF179),(0xF17A),(0xF17B),(0xF17C),(0xF17D),(0xF17E), +(0xF180),(0xF181),(0xF182),(0xF183),(0xF184),(0xF185),(0xF186),(0xF187), +(0xF188),(0xF189),(0xF18A),(0xF18B),(0xF18C),(0xF18D),(0xF18E),(0xF18F), +(0xF190),(0xF191),(0xF192),(0xF193),(0xF194),(0xF195),(0xF196),(0xF197), +(0xF198),(0xF199),(0xF19A),(0xF19B),(0xF19C),(0xF19D),(0xF19E),(0xF19F), +(0xF1A0),(0xF1A1),(0xF1A2),(0xF1A3),(0xF1A4),(0xF1A5),(0xF1A6),(0xF1A7), +(0xF1A8),(0xF1A9),(0xF1AA),(0xF1AB),(0xF1AC),(0xF1AD),(0xF1AE),(0xF1AF), +(0xF1B0),(0xF1B1),(0xF1B2),(0xF1B3),(0xF1B4),(0xF1B5),(0xF1B6),(0xF1B7), +(0xF1B8),(0xF1B9),(0xF1BA),(0xF1BB),(0xF1BC),(0xF1BD),(0xF1BE),(0xF1BF), +(0xF1C0),(0xF1C1),(0xF1C2),(0xF1C3),(0xF1C4),(0xF1C5),(0xF1C6),(0xF1C7), +(0xF1C8),(0xF1C9),(0xF1CA),(0xF1CB),(0xF1CC),(0xF1CD),(0xF1CE),(0xF1CF), +(0xF1D0),(0xF1D1),(0xF1D2),(0xF1D3),(0xF1D4),(0xF1D5),(0xF1D6),(0xF1D7), +(0xF1D8),(0xF1D9),(0xF1DA),(0xF1DB),(0xF1DC),(0xF1DD),(0xF1DE),(0xF1DF), +(0xF1E0),(0xF1E1),(0xF1E2),(0xF1E3),(0xF1E4),(0xF1E5),(0xF1E6),(0xF1E7), +(0xF1E8),(0xF1E9),(0xF1EA),(0xF1EB),(0xF1EC),(0xF1ED),(0xF1EE),(0xF1EF), +(0xF1F0),(0xF1F1),(0xF1F2),(0xF1F3),(0xF1F4),(0xF1F5),(0xF1F6),(0xF1F7), +(0xF1F8),(0xF1F9),(0xF1FA),(0xF1FB),(0xF1FC), +(0xF240),(0xF241),(0xF242),(0xF243),(0xF244),(0xF245),(0xF246),(0xF247), +(0xF248),(0xF249),(0xF24A),(0xF24B),(0xF24C),(0xF24D),(0xF24E),(0xF24F), +(0xF250),(0xF251),(0xF252),(0xF253),(0xF254),(0xF255),(0xF256),(0xF257), +(0xF258),(0xF259),(0xF25A),(0xF25B),(0xF25C),(0xF25D),(0xF25E),(0xF25F), +(0xF260),(0xF261),(0xF262),(0xF263),(0xF264),(0xF265),(0xF266),(0xF267), +(0xF268),(0xF269),(0xF26A),(0xF26B),(0xF26C),(0xF26D),(0xF26E),(0xF26F), +(0xF270),(0xF271),(0xF272),(0xF273),(0xF274),(0xF275),(0xF276),(0xF277), +(0xF278),(0xF279),(0xF27A),(0xF27B),(0xF27C),(0xF27D),(0xF27E), +(0xF280),(0xF281),(0xF282),(0xF283),(0xF284),(0xF285),(0xF286),(0xF287), +(0xF288),(0xF289),(0xF28A),(0xF28B),(0xF28C),(0xF28D),(0xF28E),(0xF28F), +(0xF290),(0xF291),(0xF292),(0xF293),(0xF294),(0xF295),(0xF296),(0xF297), +(0xF298),(0xF299),(0xF29A),(0xF29B),(0xF29C),(0xF29D),(0xF29E),(0xF29F), +(0xF2A0),(0xF2A1),(0xF2A2),(0xF2A3),(0xF2A4),(0xF2A5),(0xF2A6),(0xF2A7), +(0xF2A8),(0xF2A9),(0xF2AA),(0xF2AB),(0xF2AC),(0xF2AD),(0xF2AE),(0xF2AF), +(0xF2B0),(0xF2B1),(0xF2B2),(0xF2B3),(0xF2B4),(0xF2B5),(0xF2B6),(0xF2B7), +(0xF2B8),(0xF2B9),(0xF2BA),(0xF2BB),(0xF2BC),(0xF2BD),(0xF2BE),(0xF2BF), +(0xF2C0),(0xF2C1),(0xF2C2),(0xF2C3),(0xF2C4),(0xF2C5),(0xF2C6),(0xF2C7), +(0xF2C8),(0xF2C9),(0xF2CA),(0xF2CB),(0xF2CC),(0xF2CD),(0xF2CE),(0xF2CF), +(0xF2D0),(0xF2D1),(0xF2D2),(0xF2D3),(0xF2D4),(0xF2D5),(0xF2D6),(0xF2D7), +(0xF2D8),(0xF2D9),(0xF2DA),(0xF2DB),(0xF2DC),(0xF2DD),(0xF2DE),(0xF2DF), +(0xF2E0),(0xF2E1),(0xF2E2),(0xF2E3),(0xF2E4),(0xF2E5),(0xF2E6),(0xF2E7), +(0xF2E8),(0xF2E9),(0xF2EA),(0xF2EB),(0xF2EC),(0xF2ED),(0xF2EE),(0xF2EF), +(0xF2F0),(0xF2F1),(0xF2F2),(0xF2F3),(0xF2F4),(0xF2F5),(0xF2F6),(0xF2F7), +(0xF2F8),(0xF2F9),(0xF2FA),(0xF2FB),(0xF2FC), +(0xF340),(0xF341),(0xF342),(0xF343),(0xF344),(0xF345),(0xF346),(0xF347), +(0xF348),(0xF349),(0xF34A),(0xF34B),(0xF34C),(0xF34D),(0xF34E),(0xF34F), +(0xF350),(0xF351),(0xF352),(0xF353),(0xF354),(0xF355),(0xF356),(0xF357), +(0xF358),(0xF359),(0xF35A),(0xF35B),(0xF35C),(0xF35D),(0xF35E),(0xF35F), +(0xF360),(0xF361),(0xF362),(0xF363),(0xF364),(0xF365),(0xF366),(0xF367), +(0xF368),(0xF369),(0xF36A),(0xF36B),(0xF36C),(0xF36D),(0xF36E),(0xF36F), +(0xF370),(0xF371),(0xF372),(0xF373),(0xF374),(0xF375),(0xF376),(0xF377), +(0xF378),(0xF379),(0xF37A),(0xF37B),(0xF37C),(0xF37D),(0xF37E), +(0xF380),(0xF381),(0xF382),(0xF383),(0xF384),(0xF385),(0xF386),(0xF387), +(0xF388),(0xF389),(0xF38A),(0xF38B),(0xF38C),(0xF38D),(0xF38E),(0xF38F), +(0xF390),(0xF391),(0xF392),(0xF393),(0xF394),(0xF395),(0xF396),(0xF397), +(0xF398),(0xF399),(0xF39A),(0xF39B),(0xF39C),(0xF39D),(0xF39E),(0xF39F), +(0xF3A0),(0xF3A1),(0xF3A2),(0xF3A3),(0xF3A4),(0xF3A5),(0xF3A6),(0xF3A7), +(0xF3A8),(0xF3A9),(0xF3AA),(0xF3AB),(0xF3AC),(0xF3AD),(0xF3AE),(0xF3AF), +(0xF3B0),(0xF3B1),(0xF3B2),(0xF3B3),(0xF3B4),(0xF3B5),(0xF3B6),(0xF3B7), +(0xF3B8),(0xF3B9),(0xF3BA),(0xF3BB),(0xF3BC),(0xF3BD),(0xF3BE),(0xF3BF), +(0xF3C0),(0xF3C1),(0xF3C2),(0xF3C3),(0xF3C4),(0xF3C5),(0xF3C6),(0xF3C7), +(0xF3C8),(0xF3C9),(0xF3CA),(0xF3CB),(0xF3CC),(0xF3CD),(0xF3CE),(0xF3CF), +(0xF3D0),(0xF3D1),(0xF3D2),(0xF3D3),(0xF3D4),(0xF3D5),(0xF3D6),(0xF3D7), +(0xF3D8),(0xF3D9),(0xF3DA),(0xF3DB),(0xF3DC),(0xF3DD),(0xF3DE),(0xF3DF), +(0xF3E0),(0xF3E1),(0xF3E2),(0xF3E3),(0xF3E4),(0xF3E5),(0xF3E6),(0xF3E7), +(0xF3E8),(0xF3E9),(0xF3EA),(0xF3EB),(0xF3EC),(0xF3ED),(0xF3EE),(0xF3EF), +(0xF3F0),(0xF3F1),(0xF3F2),(0xF3F3),(0xF3F4),(0xF3F5),(0xF3F6),(0xF3F7), +(0xF3F8),(0xF3F9),(0xF3FA),(0xF3FB),(0xF3FC), +(0xF440),(0xF441),(0xF442),(0xF443),(0xF444),(0xF445),(0xF446),(0xF447), +(0xF448),(0xF449),(0xF44A),(0xF44B),(0xF44C),(0xF44D),(0xF44E),(0xF44F), +(0xF450),(0xF451),(0xF452),(0xF453),(0xF454),(0xF455),(0xF456),(0xF457), +(0xF458),(0xF459),(0xF45A),(0xF45B),(0xF45C),(0xF45D),(0xF45E),(0xF45F), +(0xF460),(0xF461),(0xF462),(0xF463),(0xF464),(0xF465),(0xF466),(0xF467), +(0xF468),(0xF469),(0xF46A),(0xF46B),(0xF46C),(0xF46D),(0xF46E),(0xF46F), +(0xF470),(0xF471),(0xF472),(0xF473),(0xF474),(0xF475),(0xF476),(0xF477), +(0xF478),(0xF479),(0xF47A),(0xF47B),(0xF47C),(0xF47D),(0xF47E), +(0xF480),(0xF481),(0xF482),(0xF483),(0xF484),(0xF485),(0xF486),(0xF487), +(0xF488),(0xF489),(0xF48A),(0xF48B),(0xF48C),(0xF48D),(0xF48E),(0xF48F), +(0xF490),(0xF491),(0xF492),(0xF493),(0xF494),(0xF495),(0xF496),(0xF497), +(0xF498),(0xF499),(0xF49A),(0xF49B),(0xF49C),(0xF49D),(0xF49E),(0xF49F), +(0xF4A0),(0xF4A1),(0xF4A2),(0xF4A3),(0xF4A4),(0xF4A5),(0xF4A6),(0xF4A7), +(0xF4A8),(0xF4A9),(0xF4AA),(0xF4AB),(0xF4AC),(0xF4AD),(0xF4AE),(0xF4AF), +(0xF4B0),(0xF4B1),(0xF4B2),(0xF4B3),(0xF4B4),(0xF4B5),(0xF4B6),(0xF4B7), +(0xF4B8),(0xF4B9),(0xF4BA),(0xF4BB),(0xF4BC),(0xF4BD),(0xF4BE),(0xF4BF), +(0xF4C0),(0xF4C1),(0xF4C2),(0xF4C3),(0xF4C4),(0xF4C5),(0xF4C6),(0xF4C7), +(0xF4C8),(0xF4C9),(0xF4CA),(0xF4CB),(0xF4CC),(0xF4CD),(0xF4CE),(0xF4CF), +(0xF4D0),(0xF4D1),(0xF4D2),(0xF4D3),(0xF4D4),(0xF4D5),(0xF4D6),(0xF4D7), +(0xF4D8),(0xF4D9),(0xF4DA),(0xF4DB),(0xF4DC),(0xF4DD),(0xF4DE),(0xF4DF), +(0xF4E0),(0xF4E1),(0xF4E2),(0xF4E3),(0xF4E4),(0xF4E5),(0xF4E6),(0xF4E7), +(0xF4E8),(0xF4E9),(0xF4EA),(0xF4EB),(0xF4EC),(0xF4ED),(0xF4EE),(0xF4EF), +(0xF4F0),(0xF4F1),(0xF4F2),(0xF4F3),(0xF4F4),(0xF4F5),(0xF4F6),(0xF4F7), +(0xF4F8),(0xF4F9),(0xF4FA),(0xF4FB),(0xF4FC), +(0xF540),(0xF541),(0xF542),(0xF543),(0xF544),(0xF545),(0xF546),(0xF547), +(0xF548),(0xF549),(0xF54A),(0xF54B),(0xF54C),(0xF54D),(0xF54E),(0xF54F), +(0xF550),(0xF551),(0xF552),(0xF553),(0xF554),(0xF555),(0xF556),(0xF557), +(0xF558),(0xF559),(0xF55A),(0xF55B),(0xF55C),(0xF55D),(0xF55E),(0xF55F), +(0xF560),(0xF561),(0xF562),(0xF563),(0xF564),(0xF565),(0xF566),(0xF567), +(0xF568),(0xF569),(0xF56A),(0xF56B),(0xF56C),(0xF56D),(0xF56E),(0xF56F), +(0xF570),(0xF571),(0xF572),(0xF573),(0xF574),(0xF575),(0xF576),(0xF577), +(0xF578),(0xF579),(0xF57A),(0xF57B),(0xF57C),(0xF57D),(0xF57E), +(0xF580),(0xF581),(0xF582),(0xF583),(0xF584),(0xF585),(0xF586),(0xF587), +(0xF588),(0xF589),(0xF58A),(0xF58B),(0xF58C),(0xF58D),(0xF58E),(0xF58F), +(0xF590),(0xF591),(0xF592),(0xF593),(0xF594),(0xF595),(0xF596),(0xF597), +(0xF598),(0xF599),(0xF59A),(0xF59B),(0xF59C),(0xF59D),(0xF59E),(0xF59F), +(0xF5A0),(0xF5A1),(0xF5A2),(0xF5A3),(0xF5A4),(0xF5A5),(0xF5A6),(0xF5A7), +(0xF5A8),(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE),(0xF5AF), +(0xF5B0),(0xF5B1),(0xF5B2),(0xF5B3),(0xF5B4),(0xF5B5),(0xF5B6),(0xF5B7), +(0xF5B8),(0xF5B9),(0xF5BA),(0xF5BB),(0xF5BC),(0xF5BD),(0xF5BE),(0xF5BF), +(0xF5C0),(0xF5C1),(0xF5C2),(0xF5C3),(0xF5C4),(0xF5C5),(0xF5C6),(0xF5C7), +(0xF5C8),(0xF5C9),(0xF5CA),(0xF5CB),(0xF5CC),(0xF5CD),(0xF5CE),(0xF5CF), +(0xF5D0),(0xF5D1),(0xF5D2),(0xF5D3),(0xF5D4),(0xF5D5),(0xF5D6),(0xF5D7), +(0xF5D8),(0xF5D9),(0xF5DA),(0xF5DB),(0xF5DC),(0xF5DD),(0xF5DE),(0xF5DF), +(0xF5E0),(0xF5E1),(0xF5E2),(0xF5E3),(0xF5E4),(0xF5E5),(0xF5E6),(0xF5E7), +(0xF5E8),(0xF5E9),(0xF5EA),(0xF5EB),(0xF5EC),(0xF5ED),(0xF5EE),(0xF5EF), +(0xF5F0),(0xF5F1),(0xF5F2),(0xF5F3),(0xF5F4),(0xF5F5),(0xF5F6),(0xF5F7), +(0xF5F8),(0xF5F9),(0xF5FA),(0xF5FB),(0xF5FC), +(0xF640),(0xF641),(0xF642),(0xF643),(0xF644),(0xF645),(0xF646),(0xF647), +(0xF648),(0xF649),(0xF64A),(0xF64B),(0xF64C),(0xF64D),(0xF64E),(0xF64F), +(0xF650),(0xF651),(0xF652),(0xF653),(0xF654),(0xF655),(0xF656),(0xF657), +(0xF658),(0xF659),(0xF65A),(0xF65B),(0xF65C),(0xF65D),(0xF65E),(0xF65F), +(0xF660),(0xF661),(0xF662),(0xF663),(0xF664),(0xF665),(0xF666),(0xF667), +(0xF668),(0xF669),(0xF66A),(0xF66B),(0xF66C),(0xF66D),(0xF66E),(0xF66F), +(0xF670),(0xF671),(0xF672),(0xF673),(0xF674),(0xF675),(0xF676),(0xF677), +(0xF678),(0xF679),(0xF67A),(0xF67B),(0xF67C),(0xF67D),(0xF67E), +(0xF680),(0xF681),(0xF682),(0xF683),(0xF684),(0xF685),(0xF686),(0xF687), +(0xF688),(0xF689),(0xF68A),(0xF68B),(0xF68C),(0xF68D),(0xF68E),(0xF68F), +(0xF690),(0xF691),(0xF692),(0xF693),(0xF694),(0xF695),(0xF696),(0xF697), +(0xF698),(0xF699),(0xF69A),(0xF69B),(0xF69C),(0xF69D),(0xF69E),(0xF69F), +(0xF6A0),(0xF6A1),(0xF6A2),(0xF6A3),(0xF6A4),(0xF6A5),(0xF6A6),(0xF6A7), +(0xF6A8),(0xF6A9),(0xF6AA),(0xF6AB),(0xF6AC),(0xF6AD),(0xF6AE),(0xF6AF), +(0xF6B0),(0xF6B1),(0xF6B2),(0xF6B3),(0xF6B4),(0xF6B5),(0xF6B6),(0xF6B7), +(0xF6B8),(0xF6B9),(0xF6BA),(0xF6BB),(0xF6BC),(0xF6BD),(0xF6BE),(0xF6BF), +(0xF6C0),(0xF6C1),(0xF6C2),(0xF6C3),(0xF6C4),(0xF6C5),(0xF6C6),(0xF6C7), +(0xF6C8),(0xF6C9),(0xF6CA),(0xF6CB),(0xF6CC),(0xF6CD),(0xF6CE),(0xF6CF), +(0xF6D0),(0xF6D1),(0xF6D2),(0xF6D3),(0xF6D4),(0xF6D5),(0xF6D6),(0xF6D7), +(0xF6D8),(0xF6D9),(0xF6DA),(0xF6DB),(0xF6DC),(0xF6DD),(0xF6DE),(0xF6DF), +(0xF6E0),(0xF6E1),(0xF6E2),(0xF6E3),(0xF6E4),(0xF6E5),(0xF6E6),(0xF6E7), +(0xF6E8),(0xF6E9),(0xF6EA),(0xF6EB),(0xF6EC),(0xF6ED),(0xF6EE),(0xF6EF), +(0xF6F0),(0xF6F1),(0xF6F2),(0xF6F3),(0xF6F4),(0xF6F5),(0xF6F6),(0xF6F7), +(0xF6F8),(0xF6F9),(0xF6FA),(0xF6FB),(0xF6FC), +(0xF740),(0xF741),(0xF742),(0xF743),(0xF744),(0xF745),(0xF746),(0xF747), +(0xF748),(0xF749),(0xF74A),(0xF74B),(0xF74C),(0xF74D),(0xF74E),(0xF74F), +(0xF750),(0xF751),(0xF752),(0xF753),(0xF754),(0xF755),(0xF756),(0xF757), +(0xF758),(0xF759),(0xF75A),(0xF75B),(0xF75C),(0xF75D),(0xF75E),(0xF75F), +(0xF760),(0xF761),(0xF762),(0xF763),(0xF764),(0xF765),(0xF766),(0xF767), +(0xF768),(0xF769),(0xF76A),(0xF76B),(0xF76C),(0xF76D),(0xF76E),(0xF76F), +(0xF770),(0xF771),(0xF772),(0xF773),(0xF774),(0xF775),(0xF776),(0xF777), +(0xF778),(0xF779),(0xF77A),(0xF77B),(0xF77C),(0xF77D),(0xF77E), +(0xF780),(0xF781),(0xF782),(0xF783),(0xF784),(0xF785),(0xF786),(0xF787), +(0xF788),(0xF789),(0xF78A),(0xF78B),(0xF78C),(0xF78D),(0xF78E),(0xF78F), +(0xF790),(0xF791),(0xF792),(0xF793),(0xF794),(0xF795),(0xF796),(0xF797), +(0xF798),(0xF799),(0xF79A),(0xF79B),(0xF79C),(0xF79D),(0xF79E),(0xF79F), +(0xF7A0),(0xF7A1),(0xF7A2),(0xF7A3),(0xF7A4),(0xF7A5),(0xF7A6),(0xF7A7), +(0xF7A8),(0xF7A9),(0xF7AA),(0xF7AB),(0xF7AC),(0xF7AD),(0xF7AE),(0xF7AF), +(0xF7B0),(0xF7B1),(0xF7B2),(0xF7B3),(0xF7B4),(0xF7B5),(0xF7B6),(0xF7B7), +(0xF7B8),(0xF7B9),(0xF7BA),(0xF7BB),(0xF7BC),(0xF7BD),(0xF7BE),(0xF7BF), +(0xF7C0),(0xF7C1),(0xF7C2),(0xF7C3),(0xF7C4),(0xF7C5),(0xF7C6),(0xF7C7), +(0xF7C8),(0xF7C9),(0xF7CA),(0xF7CB),(0xF7CC),(0xF7CD),(0xF7CE),(0xF7CF), +(0xF7D0),(0xF7D1),(0xF7D2),(0xF7D3),(0xF7D4),(0xF7D5),(0xF7D6),(0xF7D7), +(0xF7D8),(0xF7D9),(0xF7DA),(0xF7DB),(0xF7DC),(0xF7DD),(0xF7DE),(0xF7DF), +(0xF7E0),(0xF7E1),(0xF7E2),(0xF7E3),(0xF7E4),(0xF7E5),(0xF7E6),(0xF7E7), +(0xF7E8),(0xF7E9),(0xF7EA),(0xF7EB),(0xF7EC),(0xF7ED),(0xF7EE),(0xF7EF), +(0xF7F0),(0xF7F1),(0xF7F2),(0xF7F3),(0xF7F4),(0xF7F5),(0xF7F6),(0xF7F7), +(0xF7F8),(0xF7F9),(0xF7FA),(0xF7FB),(0xF7FC), +(0xF840),(0xF841),(0xF842),(0xF843),(0xF844),(0xF845),(0xF846),(0xF847), +(0xF848),(0xF849),(0xF84A),(0xF84B),(0xF84C),(0xF84D),(0xF84E),(0xF84F), +(0xF850),(0xF851),(0xF852),(0xF853),(0xF854),(0xF855),(0xF856),(0xF857), +(0xF858),(0xF859),(0xF85A),(0xF85B),(0xF85C),(0xF85D),(0xF85E),(0xF85F), +(0xF860),(0xF861),(0xF862),(0xF863),(0xF864),(0xF865),(0xF866),(0xF867), +(0xF868),(0xF869),(0xF86A),(0xF86B),(0xF86C),(0xF86D),(0xF86E),(0xF86F), +(0xF870),(0xF871),(0xF872),(0xF873),(0xF874),(0xF875),(0xF876),(0xF877), +(0xF878),(0xF879),(0xF87A),(0xF87B),(0xF87C),(0xF87D),(0xF87E), +(0xF880),(0xF881),(0xF882),(0xF883),(0xF884),(0xF885),(0xF886),(0xF887), +(0xF888),(0xF889),(0xF88A),(0xF88B),(0xF88C),(0xF88D),(0xF88E),(0xF88F), +(0xF890),(0xF891),(0xF892),(0xF893),(0xF894),(0xF895),(0xF896),(0xF897), +(0xF898),(0xF899),(0xF89A),(0xF89B),(0xF89C),(0xF89D),(0xF89E),(0xF89F), +(0xF8A0),(0xF8A1),(0xF8A2),(0xF8A3),(0xF8A4),(0xF8A5),(0xF8A6),(0xF8A7), +(0xF8A8),(0xF8A9),(0xF8AA),(0xF8AB),(0xF8AC),(0xF8AD),(0xF8AE),(0xF8AF), +(0xF8B0),(0xF8B1),(0xF8B2),(0xF8B3),(0xF8B4),(0xF8B5),(0xF8B6),(0xF8B7), +(0xF8B8),(0xF8B9),(0xF8BA),(0xF8BB),(0xF8BC),(0xF8BD),(0xF8BE),(0xF8BF), +(0xF8C0),(0xF8C1),(0xF8C2),(0xF8C3),(0xF8C4),(0xF8C5),(0xF8C6),(0xF8C7), +(0xF8C8),(0xF8C9),(0xF8CA),(0xF8CB),(0xF8CC),(0xF8CD),(0xF8CE),(0xF8CF), +(0xF8D0),(0xF8D1),(0xF8D2),(0xF8D3),(0xF8D4),(0xF8D5),(0xF8D6),(0xF8D7), +(0xF8D8),(0xF8D9),(0xF8DA),(0xF8DB),(0xF8DC),(0xF8DD),(0xF8DE),(0xF8DF), +(0xF8E0),(0xF8E1),(0xF8E2),(0xF8E3),(0xF8E4),(0xF8E5),(0xF8E6),(0xF8E7), +(0xF8E8),(0xF8E9),(0xF8EA),(0xF8EB),(0xF8EC),(0xF8ED),(0xF8EE),(0xF8EF), +(0xF8F0),(0xF8F1),(0xF8F2),(0xF8F3),(0xF8F4),(0xF8F5),(0xF8F6),(0xF8F7), +(0xF8F8),(0xF8F9),(0xF8FA),(0xF8FB),(0xF8FC), +(0xF940),(0xF941),(0xF942),(0xF943),(0xF944),(0xF945),(0xF946),(0xF947), +(0xF948),(0xF949),(0xF94A),(0xF94B),(0xF94C),(0xF94D),(0xF94E),(0xF94F), +(0xF950),(0xF951),(0xF952),(0xF953),(0xF954),(0xF955),(0xF956),(0xF957), +(0xF958),(0xF959),(0xF95A),(0xF95B),(0xF95C),(0xF95D),(0xF95E),(0xF95F), +(0xF960),(0xF961),(0xF962),(0xF963),(0xF964),(0xF965),(0xF966),(0xF967), +(0xF968),(0xF969),(0xF96A),(0xF96B),(0xF96C),(0xF96D),(0xF96E),(0xF96F), +(0xF970),(0xF971),(0xF972),(0xF973),(0xF974),(0xF975),(0xF976),(0xF977), +(0xF978),(0xF979),(0xF97A),(0xF97B),(0xF97C),(0xF97D),(0xF97E), +(0xF980),(0xF981),(0xF982),(0xF983),(0xF984),(0xF985),(0xF986),(0xF987), +(0xF988),(0xF989),(0xF98A),(0xF98B),(0xF98C),(0xF98D),(0xF98E),(0xF98F), +(0xF990),(0xF991),(0xF992),(0xF993),(0xF994),(0xF995),(0xF996),(0xF997), +(0xF998),(0xF999),(0xF99A),(0xF99B),(0xF99C),(0xF99D),(0xF99E),(0xF99F), +(0xF9A0),(0xF9A1),(0xF9A2),(0xF9A3),(0xF9A4),(0xF9A5),(0xF9A6),(0xF9A7), +(0xF9A8),(0xF9A9),(0xF9AA),(0xF9AB),(0xF9AC),(0xF9AD),(0xF9AE),(0xF9AF), +(0xF9B0),(0xF9B1),(0xF9B2),(0xF9B3),(0xF9B4),(0xF9B5),(0xF9B6),(0xF9B7), +(0xF9B8),(0xF9B9),(0xF9BA),(0xF9BB),(0xF9BC),(0xF9BD),(0xF9BE),(0xF9BF), +(0xF9C0),(0xF9C1),(0xF9C2),(0xF9C3),(0xF9C4),(0xF9C5),(0xF9C6),(0xF9C7), +(0xF9C8),(0xF9C9),(0xF9CA),(0xF9CB),(0xF9CC),(0xF9CD),(0xF9CE),(0xF9CF), +(0xF9D0),(0xF9D1),(0xF9D2),(0xF9D3),(0xF9D4),(0xF9D5),(0xF9D6),(0xF9D7), +(0xF9D8),(0xF9D9),(0xF9DA),(0xF9DB),(0xF9DC),(0xF9DD),(0xF9DE),(0xF9DF), +(0xF9E0),(0xF9E1),(0xF9E2),(0xF9E3),(0xF9E4),(0xF9E5),(0xF9E6),(0xF9E7), +(0xF9E8),(0xF9E9),(0xF9EA),(0xF9EB),(0xF9EC),(0xF9ED),(0xF9EE),(0xF9EF), +(0xF9F0),(0xF9F1),(0xF9F2),(0xF9F3),(0xF9F4),(0xF9F5),(0xF9F6),(0xF9F7), +(0xF9F8),(0xF9F9),(0xF9FA),(0xF9FB),(0xF9FC); +SELECT HEX(c1) FROM t1; +HEX(c1) +05 +7E +815C +815F +8160 +8161 +817C +8191 +8192 +81CA +8740 +8741 +8742 +8743 +8744 +8745 +8746 +8747 +8748 +8749 +874A +874B +874C +874D +874E +874F +8750 +8751 +8752 +8753 +8754 +8755 +8756 +8757 +8758 +8759 +875A +875B +875C +875D +875F +8760 +8761 +8762 +8763 +8764 +8765 +8766 +8767 +8768 +8769 +876A +876B +876C +876D +876E +876F +8770 +8771 +8772 +8773 +8774 +8775 +877E +8780 +8781 +8782 +8783 +8784 +8785 +8786 +8787 +8788 +8789 +878A +878B +878C +878D +878E +878F +8790 +8791 +8792 +8793 +8794 +8795 +8796 +8797 +8798 +8799 +879A +879B +879C +ED40 +ED41 +ED42 +ED43 +ED44 +ED45 +ED46 +ED47 +ED48 +ED49 +ED4A +ED4B +ED4C +ED4D +ED4E +ED4F +ED50 +ED51 +ED52 +ED53 +ED54 +ED55 +ED56 +ED57 +ED58 +ED59 +ED5A +ED5B +ED5C +ED5D +ED5E +ED5F +ED60 +ED61 +ED62 +ED63 +ED64 +ED65 +ED66 +ED67 +ED68 +ED69 +ED6A +ED6B +ED6C +ED6D +ED6E +ED6F +ED70 +ED71 +ED72 +ED73 +ED74 +ED75 +ED76 +ED77 +ED78 +ED79 +ED7A +ED7B +ED7C +ED7D +ED7E +ED80 +ED81 +ED82 +ED83 +ED84 +ED85 +ED86 +ED87 +ED88 +ED89 +ED8A +ED8B +ED8C +ED8D +ED8E +ED8F +ED90 +ED91 +ED92 +ED93 +ED94 +ED95 +ED96 +ED97 +ED98 +ED99 +ED9A +ED9B +ED9C +ED9D +ED9E +ED9F +EDA0 +EDA1 +EDA2 +EDA3 +EDA4 +EDA5 +EDA6 +EDA7 +EDA8 +EDA9 +EDAA +EDAB +EDAC +EDAD +EDAE +EDAF +EDB0 +EDB1 +EDB2 +EDB3 +EDB4 +EDB5 +EDB6 +EDB7 +EDB8 +EDB9 +EDBA +EDBB +EDBC +EDBD +EDBE +EDBF +EDC0 +EDC1 +EDC2 +EDC3 +EDC4 +EDC5 +EDC6 +EDC7 +EDC8 +EDC9 +EDCA +EDCB +EDCC +EDCD +EDCE +EDCF +EDD0 +EDD1 +EDD2 +EDD3 +EDD4 +EDD5 +EDD6 +EDD7 +EDD8 +EDD9 +EDDA +EDDB +EDDC +EDDD +EDDE +EDDF +EDE0 +EDE1 +EDE2 +EDE3 +EDE4 +EDE5 +EDE6 +EDE7 +EDE8 +EDE9 +EDEA +EDEB +EDEC +EDED +EDEE +EDEF +EDF0 +EDF1 +EDF2 +EDF3 +EDF4 +EDF5 +EDF6 +EDF7 +EDF8 +EDF9 +EDFA +EDFB +EDFC +EE40 +EE41 +EE42 +EE43 +EE44 +EE45 +EE46 +EE47 +EE48 +EE49 +EE4A +EE4B +EE4C +EE4D +EE4E +EE4F +EE50 +EE51 +EE52 +EE53 +EE54 +EE55 +EE56 +EE57 +EE58 +EE59 +EE5A +EE5B +EE5C +EE5D +EE5E +EE5F +EE60 +EE61 +EE62 +EE63 +EE64 +EE65 +EE66 +EE67 +EE68 +EE69 +EE6A +EE6B +EE6C +EE6D +EE6E +EE6F +EE70 +EE71 +EE72 +EE73 +EE74 +EE75 +EE76 +EE77 +EE78 +EE79 +EE7A +EE7B +EE7C +EE7D +EE7E +EE80 +EE81 +EE82 +EE83 +EE84 +EE85 +EE86 +EE87 +EE88 +EE89 +EE8A +EE8B +EE8C +EE8D +EE8E +EE8F +EE90 +EE91 +EE92 +EE93 +EE94 +EE95 +EE96 +EE97 +EE98 +EE99 +EE9A +EE9B +EE9C +EE9D +EE9E +EE9F +EEA0 +EEA1 +EEA2 +EEA3 +EEA4 +EEA5 +EEA6 +EEA7 +EEA8 +EEA9 +EEAA +EEAB +EEAC +EEAD +EEAE +EEAF +EEB0 +EEB1 +EEB2 +EEB3 +EEB4 +EEB5 +EEB6 +EEB7 +EEB8 +EEB9 +EEBA +EEBB +EEBC +EEBD +EEBE +EEBF +EEC0 +EEC1 +EEC2 +EEC3 +EEC4 +EEC5 +EEC6 +EEC7 +EEC8 +EEC9 +EECA +EECB +EECC +EECD +EECE +EECF +EED0 +EED1 +EED2 +EED3 +EED4 +EED5 +EED6 +EED7 +EED8 +EED9 +EEDA +EEDB +EEDC +EEDD +EEDE +EEDF +EEE0 +EEE1 +EEE2 +EEE3 +EEE4 +EEE5 +EEE6 +EEE7 +EEE8 +EEE9 +EEEA +EEEB +EEEC +EEEF +EEF0 +EEF1 +EEF2 +EEF3 +EEF4 +EEF5 +EEF6 +EEF7 +EEF8 +EEF9 +EEFA +EEFB +EEFC +FA40 +FA41 +FA42 +FA43 +FA44 +FA45 +FA46 +FA47 +FA48 +FA49 +FA4A +FA4B +FA4C +FA4D +FA4E +FA4F +FA50 +FA51 +FA52 +FA53 +FA54 +FA55 +FA56 +FA57 +FA58 +FA59 +FA5A +FA5B +FA5C +FA5D +FA5E +FA5F +FA60 +FA61 +FA62 +FA63 +FA64 +FA65 +FA66 +FA67 +FA68 +FA69 +FA6A +FA6B +FA6C +FA6D +FA6E +FA6F +FA70 +FA71 +FA72 +FA73 +FA74 +FA75 +FA76 +FA77 +FA78 +FA79 +FA7A +FA7B +FA7C +FA7D +FA7E +FA80 +FA81 +FA82 +FA83 +FA84 +FA85 +FA86 +FA87 +FA88 +FA89 +FA8A +FA8B +FA8C +FA8D +FA8E +FA8F +FA90 +FA91 +FA92 +FA93 +FA94 +FA95 +FA96 +FA97 +FA98 +FA99 +FA9A +FA9B +FA9C +FA9D +FA9E +FA9F +FAA0 +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FB40 +FB41 +FB42 +FB43 +FB44 +FB45 +FB46 +FB47 +FB48 +FB49 +FB4A +FB4B +FB4C +FB4D +FB4E +FB4F +FB50 +FB51 +FB52 +FB53 +FB54 +FB55 +FB56 +FB57 +FB58 +FB59 +FB5A +FB5B +FB5C +FB5D +FB5E +FB5F +FB60 +FB61 +FB62 +FB63 +FB64 +FB65 +FB66 +FB67 +FB68 +FB69 +FB6A +FB6B +FB6C +FB6D +FB6E +FB6F +FB70 +FB71 +FB72 +FB73 +FB74 +FB75 +FB76 +FB77 +FB78 +FB79 +FB7A +FB7B +FB7C +FB7D +FB7E +FB80 +FB81 +FB82 +FB83 +FB84 +FB85 +FB86 +FB87 +FB88 +FB89 +FB8A +FB8B +FB8C +FB8D +FB8E +FB8F +FB90 +FB91 +FB92 +FB93 +FB94 +FB95 +FB96 +FB97 +FB98 +FB99 +FB9A +FB9B +FB9C +FB9D +FB9E +FB9F +FBA0 +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FC40 +FC41 +FC42 +FC43 +FC44 +FC45 +FC46 +FC47 +FC48 +FC49 +FC4A +FC4B +F040 +F041 +F042 +F043 +F044 +F045 +F046 +F047 +F048 +F049 +F04A +F04B +F04C +F04D +F04E +F04F +F050 +F051 +F052 +F053 +F054 +F055 +F056 +F057 +F058 +F059 +F05A +F05B +F05C +F05D +F05E +F05F +F060 +F061 +F062 +F063 +F064 +F065 +F066 +F067 +F068 +F069 +F06A +F06B +F06C +F06D +F06E +F06F +F070 +F071 +F072 +F073 +F074 +F075 +F076 +F077 +F078 +F079 +F07A +F07B +F07C +F07D +F07E +F080 +F081 +F082 +F083 +F084 +F085 +F086 +F087 +F088 +F089 +F08A +F08B +F08C +F08D +F08E +F08F +F090 +F091 +F092 +F093 +F094 +F095 +F096 +F097 +F098 +F099 +F09A +F09B +F09C +F09D +F09E +F09F +F0A0 +F0A1 +F0A2 +F0A3 +F0A4 +F0A5 +F0A6 +F0A7 +F0A8 +F0A9 +F0AA +F0AB +F0AC +F0AD +F0AE +F0AF +F0B0 +F0B1 +F0B2 +F0B3 +F0B4 +F0B5 +F0B6 +F0B7 +F0B8 +F0B9 +F0BA +F0BB +F0BC +F0BD +F0BE +F0BF +F0C0 +F0C1 +F0C2 +F0C3 +F0C4 +F0C5 +F0C6 +F0C7 +F0C8 +F0C9 +F0CA +F0CB +F0CC +F0CD +F0CE +F0CF +F0D0 +F0D1 +F0D2 +F0D3 +F0D4 +F0D5 +F0D6 +F0D7 +F0D8 +F0D9 +F0DA +F0DB +F0DC +F0DD +F0DE +F0DF +F0E0 +F0E1 +F0E2 +F0E3 +F0E4 +F0E5 +F0E6 +F0E7 +F0E8 +F0E9 +F0EA +F0EB +F0EC +F0ED +F0EE +F0EF +F0F0 +F0F1 +F0F2 +F0F3 +F0F4 +F0F5 +F0F6 +F0F7 +F0F8 +F0F9 +F0FA +F0FB +F0FC +F140 +F141 +F142 +F143 +F144 +F145 +F146 +F147 +F148 +F149 +F14A +F14B +F14C +F14D +F14E +F14F +F150 +F151 +F152 +F153 +F154 +F155 +F156 +F157 +F158 +F159 +F15A +F15B +F15C +F15D +F15E +F15F +F160 +F161 +F162 +F163 +F164 +F165 +F166 +F167 +F168 +F169 +F16A +F16B +F16C +F16D +F16E +F16F +F170 +F171 +F172 +F173 +F174 +F175 +F176 +F177 +F178 +F179 +F17A +F17B +F17C +F17D +F17E +F180 +F181 +F182 +F183 +F184 +F185 +F186 +F187 +F188 +F189 +F18A +F18B +F18C +F18D +F18E +F18F +F190 +F191 +F192 +F193 +F194 +F195 +F196 +F197 +F198 +F199 +F19A +F19B +F19C +F19D +F19E +F19F +F1A0 +F1A1 +F1A2 +F1A3 +F1A4 +F1A5 +F1A6 +F1A7 +F1A8 +F1A9 +F1AA +F1AB +F1AC +F1AD +F1AE +F1AF +F1B0 +F1B1 +F1B2 +F1B3 +F1B4 +F1B5 +F1B6 +F1B7 +F1B8 +F1B9 +F1BA +F1BB +F1BC +F1BD +F1BE +F1BF +F1C0 +F1C1 +F1C2 +F1C3 +F1C4 +F1C5 +F1C6 +F1C7 +F1C8 +F1C9 +F1CA +F1CB +F1CC +F1CD +F1CE +F1CF +F1D0 +F1D1 +F1D2 +F1D3 +F1D4 +F1D5 +F1D6 +F1D7 +F1D8 +F1D9 +F1DA +F1DB +F1DC +F1DD +F1DE +F1DF +F1E0 +F1E1 +F1E2 +F1E3 +F1E4 +F1E5 +F1E6 +F1E7 +F1E8 +F1E9 +F1EA +F1EB +F1EC +F1ED +F1EE +F1EF +F1F0 +F1F1 +F1F2 +F1F3 +F1F4 +F1F5 +F1F6 +F1F7 +F1F8 +F1F9 +F1FA +F1FB +F1FC +F240 +F241 +F242 +F243 +F244 +F245 +F246 +F247 +F248 +F249 +F24A +F24B +F24C +F24D +F24E +F24F +F250 +F251 +F252 +F253 +F254 +F255 +F256 +F257 +F258 +F259 +F25A +F25B +F25C +F25D +F25E +F25F +F260 +F261 +F262 +F263 +F264 +F265 +F266 +F267 +F268 +F269 +F26A +F26B +F26C +F26D +F26E +F26F +F270 +F271 +F272 +F273 +F274 +F275 +F276 +F277 +F278 +F279 +F27A +F27B +F27C +F27D +F27E +F280 +F281 +F282 +F283 +F284 +F285 +F286 +F287 +F288 +F289 +F28A +F28B +F28C +F28D +F28E +F28F +F290 +F291 +F292 +F293 +F294 +F295 +F296 +F297 +F298 +F299 +F29A +F29B +F29C +F29D +F29E +F29F +F2A0 +F2A1 +F2A2 +F2A3 +F2A4 +F2A5 +F2A6 +F2A7 +F2A8 +F2A9 +F2AA +F2AB +F2AC +F2AD +F2AE +F2AF +F2B0 +F2B1 +F2B2 +F2B3 +F2B4 +F2B5 +F2B6 +F2B7 +F2B8 +F2B9 +F2BA +F2BB +F2BC +F2BD +F2BE +F2BF +F2C0 +F2C1 +F2C2 +F2C3 +F2C4 +F2C5 +F2C6 +F2C7 +F2C8 +F2C9 +F2CA +F2CB +F2CC +F2CD +F2CE +F2CF +F2D0 +F2D1 +F2D2 +F2D3 +F2D4 +F2D5 +F2D6 +F2D7 +F2D8 +F2D9 +F2DA +F2DB +F2DC +F2DD +F2DE +F2DF +F2E0 +F2E1 +F2E2 +F2E3 +F2E4 +F2E5 +F2E6 +F2E7 +F2E8 +F2E9 +F2EA +F2EB +F2EC +F2ED +F2EE +F2EF +F2F0 +F2F1 +F2F2 +F2F3 +F2F4 +F2F5 +F2F6 +F2F7 +F2F8 +F2F9 +F2FA +F2FB +F2FC +F340 +F341 +F342 +F343 +F344 +F345 +F346 +F347 +F348 +F349 +F34A +F34B +F34C +F34D +F34E +F34F +F350 +F351 +F352 +F353 +F354 +F355 +F356 +F357 +F358 +F359 +F35A +F35B +F35C +F35D +F35E +F35F +F360 +F361 +F362 +F363 +F364 +F365 +F366 +F367 +F368 +F369 +F36A +F36B +F36C +F36D +F36E +F36F +F370 +F371 +F372 +F373 +F374 +F375 +F376 +F377 +F378 +F379 +F37A +F37B +F37C +F37D +F37E +F380 +F381 +F382 +F383 +F384 +F385 +F386 +F387 +F388 +F389 +F38A +F38B +F38C +F38D +F38E +F38F +F390 +F391 +F392 +F393 +F394 +F395 +F396 +F397 +F398 +F399 +F39A +F39B +F39C +F39D +F39E +F39F +F3A0 +F3A1 +F3A2 +F3A3 +F3A4 +F3A5 +F3A6 +F3A7 +F3A8 +F3A9 +F3AA +F3AB +F3AC +F3AD +F3AE +F3AF +F3B0 +F3B1 +F3B2 +F3B3 +F3B4 +F3B5 +F3B6 +F3B7 +F3B8 +F3B9 +F3BA +F3BB +F3BC +F3BD +F3BE +F3BF +F3C0 +F3C1 +F3C2 +F3C3 +F3C4 +F3C5 +F3C6 +F3C7 +F3C8 +F3C9 +F3CA +F3CB +F3CC +F3CD +F3CE +F3CF +F3D0 +F3D1 +F3D2 +F3D3 +F3D4 +F3D5 +F3D6 +F3D7 +F3D8 +F3D9 +F3DA +F3DB +F3DC +F3DD +F3DE +F3DF +F3E0 +F3E1 +F3E2 +F3E3 +F3E4 +F3E5 +F3E6 +F3E7 +F3E8 +F3E9 +F3EA +F3EB +F3EC +F3ED +F3EE +F3EF +F3F0 +F3F1 +F3F2 +F3F3 +F3F4 +F3F5 +F3F6 +F3F7 +F3F8 +F3F9 +F3FA +F3FB +F3FC +F440 +F441 +F442 +F443 +F444 +F445 +F446 +F447 +F448 +F449 +F44A +F44B +F44C +F44D +F44E +F44F +F450 +F451 +F452 +F453 +F454 +F455 +F456 +F457 +F458 +F459 +F45A +F45B +F45C +F45D +F45E +F45F +F460 +F461 +F462 +F463 +F464 +F465 +F466 +F467 +F468 +F469 +F46A +F46B +F46C +F46D +F46E +F46F +F470 +F471 +F472 +F473 +F474 +F475 +F476 +F477 +F478 +F479 +F47A +F47B +F47C +F47D +F47E +F480 +F481 +F482 +F483 +F484 +F485 +F486 +F487 +F488 +F489 +F48A +F48B +F48C +F48D +F48E +F48F +F490 +F491 +F492 +F493 +F494 +F495 +F496 +F497 +F498 +F499 +F49A +F49B +F49C +F49D +F49E +F49F +F4A0 +F4A1 +F4A2 +F4A3 +F4A4 +F4A5 +F4A6 +F4A7 +F4A8 +F4A9 +F4AA +F4AB +F4AC +F4AD +F4AE +F4AF +F4B0 +F4B1 +F4B2 +F4B3 +F4B4 +F4B5 +F4B6 +F4B7 +F4B8 +F4B9 +F4BA +F4BB +F4BC +F4BD +F4BE +F4BF +F4C0 +F4C1 +F4C2 +F4C3 +F4C4 +F4C5 +F4C6 +F4C7 +F4C8 +F4C9 +F4CA +F4CB +F4CC +F4CD +F4CE +F4CF +F4D0 +F4D1 +F4D2 +F4D3 +F4D4 +F4D5 +F4D6 +F4D7 +F4D8 +F4D9 +F4DA +F4DB +F4DC +F4DD +F4DE +F4DF +F4E0 +F4E1 +F4E2 +F4E3 +F4E4 +F4E5 +F4E6 +F4E7 +F4E8 +F4E9 +F4EA +F4EB +F4EC +F4ED +F4EE +F4EF +F4F0 +F4F1 +F4F2 +F4F3 +F4F4 +F4F5 +F4F6 +F4F7 +F4F8 +F4F9 +F4FA +F4FB +F4FC +F540 +F541 +F542 +F543 +F544 +F545 +F546 +F547 +F548 +F549 +F54A +F54B +F54C +F54D +F54E +F54F +F550 +F551 +F552 +F553 +F554 +F555 +F556 +F557 +F558 +F559 +F55A +F55B +F55C +F55D +F55E +F55F +F560 +F561 +F562 +F563 +F564 +F565 +F566 +F567 +F568 +F569 +F56A +F56B +F56C +F56D +F56E +F56F +F570 +F571 +F572 +F573 +F574 +F575 +F576 +F577 +F578 +F579 +F57A +F57B +F57C +F57D +F57E +F580 +F581 +F582 +F583 +F584 +F585 +F586 +F587 +F588 +F589 +F58A +F58B +F58C +F58D +F58E +F58F +F590 +F591 +F592 +F593 +F594 +F595 +F596 +F597 +F598 +F599 +F59A +F59B +F59C +F59D +F59E +F59F +F5A0 +F5A1 +F5A2 +F5A3 +F5A4 +F5A5 +F5A6 +F5A7 +F5A8 +F5A9 +F5AA +F5AB +F5AC +F5AD +F5AE +F5AF +F5B0 +F5B1 +F5B2 +F5B3 +F5B4 +F5B5 +F5B6 +F5B7 +F5B8 +F5B9 +F5BA +F5BB +F5BC +F5BD +F5BE +F5BF +F5C0 +F5C1 +F5C2 +F5C3 +F5C4 +F5C5 +F5C6 +F5C7 +F5C8 +F5C9 +F5CA +F5CB +F5CC +F5CD +F5CE +F5CF +F5D0 +F5D1 +F5D2 +F5D3 +F5D4 +F5D5 +F5D6 +F5D7 +F5D8 +F5D9 +F5DA +F5DB +F5DC +F5DD +F5DE +F5DF +F5E0 +F5E1 +F5E2 +F5E3 +F5E4 +F5E5 +F5E6 +F5E7 +F5E8 +F5E9 +F5EA +F5EB +F5EC +F5ED +F5EE +F5EF +F5F0 +F5F1 +F5F2 +F5F3 +F5F4 +F5F5 +F5F6 +F5F7 +F5F8 +F5F9 +F5FA +F5FB +F5FC +F640 +F641 +F642 +F643 +F644 +F645 +F646 +F647 +F648 +F649 +F64A +F64B +F64C +F64D +F64E +F64F +F650 +F651 +F652 +F653 +F654 +F655 +F656 +F657 +F658 +F659 +F65A +F65B +F65C +F65D +F65E +F65F +F660 +F661 +F662 +F663 +F664 +F665 +F666 +F667 +F668 +F669 +F66A +F66B +F66C +F66D +F66E +F66F +F670 +F671 +F672 +F673 +F674 +F675 +F676 +F677 +F678 +F679 +F67A +F67B +F67C +F67D +F67E +F680 +F681 +F682 +F683 +F684 +F685 +F686 +F687 +F688 +F689 +F68A +F68B +F68C +F68D +F68E +F68F +F690 +F691 +F692 +F693 +F694 +F695 +F696 +F697 +F698 +F699 +F69A +F69B +F69C +F69D +F69E +F69F +F6A0 +F6A1 +F6A2 +F6A3 +F6A4 +F6A5 +F6A6 +F6A7 +F6A8 +F6A9 +F6AA +F6AB +F6AC +F6AD +F6AE +F6AF +F6B0 +F6B1 +F6B2 +F6B3 +F6B4 +F6B5 +F6B6 +F6B7 +F6B8 +F6B9 +F6BA +F6BB +F6BC +F6BD +F6BE +F6BF +F6C0 +F6C1 +F6C2 +F6C3 +F6C4 +F6C5 +F6C6 +F6C7 +F6C8 +F6C9 +F6CA +F6CB +F6CC +F6CD +F6CE +F6CF +F6D0 +F6D1 +F6D2 +F6D3 +F6D4 +F6D5 +F6D6 +F6D7 +F6D8 +F6D9 +F6DA +F6DB +F6DC +F6DD +F6DE +F6DF +F6E0 +F6E1 +F6E2 +F6E3 +F6E4 +F6E5 +F6E6 +F6E7 +F6E8 +F6E9 +F6EA +F6EB +F6EC +F6ED +F6EE +F6EF +F6F0 +F6F1 +F6F2 +F6F3 +F6F4 +F6F5 +F6F6 +F6F7 +F6F8 +F6F9 +F6FA +F6FB +F6FC +F740 +F741 +F742 +F743 +F744 +F745 +F746 +F747 +F748 +F749 +F74A +F74B +F74C +F74D +F74E +F74F +F750 +F751 +F752 +F753 +F754 +F755 +F756 +F757 +F758 +F759 +F75A +F75B +F75C +F75D +F75E +F75F +F760 +F761 +F762 +F763 +F764 +F765 +F766 +F767 +F768 +F769 +F76A +F76B +F76C +F76D +F76E +F76F +F770 +F771 +F772 +F773 +F774 +F775 +F776 +F777 +F778 +F779 +F77A +F77B +F77C +F77D +F77E +F780 +F781 +F782 +F783 +F784 +F785 +F786 +F787 +F788 +F789 +F78A +F78B +F78C +F78D +F78E +F78F +F790 +F791 +F792 +F793 +F794 +F795 +F796 +F797 +F798 +F799 +F79A +F79B +F79C +F79D +F79E +F79F +F7A0 +F7A1 +F7A2 +F7A3 +F7A4 +F7A5 +F7A6 +F7A7 +F7A8 +F7A9 +F7AA +F7AB +F7AC +F7AD +F7AE +F7AF +F7B0 +F7B1 +F7B2 +F7B3 +F7B4 +F7B5 +F7B6 +F7B7 +F7B8 +F7B9 +F7BA +F7BB +F7BC +F7BD +F7BE +F7BF +F7C0 +F7C1 +F7C2 +F7C3 +F7C4 +F7C5 +F7C6 +F7C7 +F7C8 +F7C9 +F7CA +F7CB +F7CC +F7CD +F7CE +F7CF +F7D0 +F7D1 +F7D2 +F7D3 +F7D4 +F7D5 +F7D6 +F7D7 +F7D8 +F7D9 +F7DA +F7DB +F7DC +F7DD +F7DE +F7DF +F7E0 +F7E1 +F7E2 +F7E3 +F7E4 +F7E5 +F7E6 +F7E7 +F7E8 +F7E9 +F7EA +F7EB +F7EC +F7ED +F7EE +F7EF +F7F0 +F7F1 +F7F2 +F7F3 +F7F4 +F7F5 +F7F6 +F7F7 +F7F8 +F7F9 +F7FA +F7FB +F7FC +F840 +F841 +F842 +F843 +F844 +F845 +F846 +F847 +F848 +F849 +F84A +F84B +F84C +F84D +F84E +F84F +F850 +F851 +F852 +F853 +F854 +F855 +F856 +F857 +F858 +F859 +F85A +F85B +F85C +F85D +F85E +F85F +F860 +F861 +F862 +F863 +F864 +F865 +F866 +F867 +F868 +F869 +F86A +F86B +F86C +F86D +F86E +F86F +F870 +F871 +F872 +F873 +F874 +F875 +F876 +F877 +F878 +F879 +F87A +F87B +F87C +F87D +F87E +F880 +F881 +F882 +F883 +F884 +F885 +F886 +F887 +F888 +F889 +F88A +F88B +F88C +F88D +F88E +F88F +F890 +F891 +F892 +F893 +F894 +F895 +F896 +F897 +F898 +F899 +F89A +F89B +F89C +F89D +F89E +F89F +F8A0 +F8A1 +F8A2 +F8A3 +F8A4 +F8A5 +F8A6 +F8A7 +F8A8 +F8A9 +F8AA +F8AB +F8AC +F8AD +F8AE +F8AF +F8B0 +F8B1 +F8B2 +F8B3 +F8B4 +F8B5 +F8B6 +F8B7 +F8B8 +F8B9 +F8BA +F8BB +F8BC +F8BD +F8BE +F8BF +F8C0 +F8C1 +F8C2 +F8C3 +F8C4 +F8C5 +F8C6 +F8C7 +F8C8 +F8C9 +F8CA +F8CB +F8CC +F8CD +F8CE +F8CF +F8D0 +F8D1 +F8D2 +F8D3 +F8D4 +F8D5 +F8D6 +F8D7 +F8D8 +F8D9 +F8DA +F8DB +F8DC +F8DD +F8DE +F8DF +F8E0 +F8E1 +F8E2 +F8E3 +F8E4 +F8E5 +F8E6 +F8E7 +F8E8 +F8E9 +F8EA +F8EB +F8EC +F8ED +F8EE +F8EF +F8F0 +F8F1 +F8F2 +F8F3 +F8F4 +F8F5 +F8F6 +F8F7 +F8F8 +F8F9 +F8FA +F8FB +F8FC +F940 +F941 +F942 +F943 +F944 +F945 +F946 +F947 +F948 +F949 +F94A +F94B +F94C +F94D +F94E +F94F +F950 +F951 +F952 +F953 +F954 +F955 +F956 +F957 +F958 +F959 +F95A +F95B +F95C +F95D +F95E +F95F +F960 +F961 +F962 +F963 +F964 +F965 +F966 +F967 +F968 +F969 +F96A +F96B +F96C +F96D +F96E +F96F +F970 +F971 +F972 +F973 +F974 +F975 +F976 +F977 +F978 +F979 +F97A +F97B +F97C +F97D +F97E +F980 +F981 +F982 +F983 +F984 +F985 +F986 +F987 +F988 +F989 +F98A +F98B +F98C +F98D +F98E +F98F +F990 +F991 +F992 +F993 +F994 +F995 +F996 +F997 +F998 +F999 +F99A +F99B +F99C +F99D +F99E +F99F +F9A0 +F9A1 +F9A2 +F9A3 +F9A4 +F9A5 +F9A6 +F9A7 +F9A8 +F9A9 +F9AA +F9AB +F9AC +F9AD +F9AE +F9AF +F9B0 +F9B1 +F9B2 +F9B3 +F9B4 +F9B5 +F9B6 +F9B7 +F9B8 +F9B9 +F9BA +F9BB +F9BC +F9BD +F9BE +F9BF +F9C0 +F9C1 +F9C2 +F9C3 +F9C4 +F9C5 +F9C6 +F9C7 +F9C8 +F9C9 +F9CA +F9CB +F9CC +F9CD +F9CE +F9CF +F9D0 +F9D1 +F9D2 +F9D3 +F9D4 +F9D5 +F9D6 +F9D7 +F9D8 +F9D9 +F9DA +F9DB +F9DC +F9DD +F9DE +F9DF +F9E0 +F9E1 +F9E2 +F9E3 +F9E4 +F9E5 +F9E6 +F9E7 +F9E8 +F9E9 +F9EA +F9EB +F9EC +F9ED +F9EE +F9EF +F9F0 +F9F1 +F9F2 +F9F3 +F9F4 +F9F5 +F9F6 +F9F7 +F9F8 +F9F9 +F9FA +F9FB +F9FC +CREATE TABLE t2 SELECT CONVERT(c1 USING ucs2) AS c1 FROM t1; +SELECT HEX(c1) FROM t2; +HEX(c1) +0005 +007E +2015 +FF3C +FF5E +2225 +FF0D +FFE0 +FFE1 +FFE2 +2460 +2461 +2462 +2463 +2464 +2465 +2466 +2467 +2468 +2469 +246A +246B +246C +246D +246E +246F +2470 +2471 +2472 +2473 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +3349 +3314 +3322 +334D +3318 +3327 +3303 +3336 +3351 +3357 +330D +3326 +3323 +332B +334A +333B +339C +339D +339E +338E +338F +33C4 +33A1 +337B +301D +301F +2116 +33CD +2121 +32A4 +32A5 +32A6 +32A7 +32A8 +3231 +3232 +3239 +337E +337D +337C +2252 +2261 +222B +222E +2211 +221A +22A5 +2220 +221F +22BF +2235 +2229 +222A +7E8A +891C +9348 +9288 +84DC +4FC9 +70BB +6631 +68C8 +92F9 +66FB +5F45 +4E28 +4EE1 +4EFC +4F00 +4F03 +4F39 +4F56 +4F92 +4F8A +4F9A +4F94 +4FCD +5040 +5022 +4FFF +501E +5046 +5070 +5042 +5094 +50F4 +50D8 +514A +5164 +519D +51BE +51EC +5215 +529C +52A6 +52C0 +52DB +5300 +5307 +5324 +5372 +5393 +53B2 +53DD +FA0E +549C +548A +54A9 +54FF +5586 +5759 +5765 +57AC +57C8 +57C7 +FA0F +FA10 +589E +58B2 +590B +5953 +595B +595D +5963 +59A4 +59BA +5B56 +5BC0 +752F +5BD8 +5BEC +5C1E +5CA6 +5CBA +5CF5 +5D27 +5D53 +FA11 +5D42 +5D6D +5DB8 +5DB9 +5DD0 +5F21 +5F34 +5F67 +5FB7 +5FDE +605D +6085 +608A +60DE +60D5 +6120 +60F2 +6111 +6137 +6130 +6198 +6213 +62A6 +63F5 +6460 +649D +64CE +654E +6600 +6615 +663B +6609 +662E +661E +6624 +6665 +6657 +6659 +FA12 +6673 +6699 +66A0 +66B2 +66BF +66FA +670E +F929 +6766 +67BB +6852 +67C0 +6801 +6844 +68CF +FA13 +6968 +FA14 +6998 +69E2 +6A30 +6A6B +6A46 +6A73 +6A7E +6AE2 +6AE4 +6BD6 +6C3F +6C5C +6C86 +6C6F +6CDA +6D04 +6D87 +6D6F +6D96 +6DAC +6DCF +6DF8 +6DF2 +6DFC +6E39 +6E5C +6E27 +6E3C +6EBF +6F88 +6FB5 +6FF5 +7005 +7007 +7028 +7085 +70AB +710F +7104 +715C +7146 +7147 +FA15 +71C1 +71FE +72B1 +72BE +7324 +FA16 +7377 +73BD +73C9 +73D6 +73E3 +73D2 +7407 +73F5 +7426 +742A +7429 +742E +7462 +7489 +749F +7501 +756F +7682 +769C +769E +769B +76A6 +FA17 +7746 +52AF +7821 +784E +7864 +787A +7930 +FA18 +FA19 +FA1A +7994 +FA1B +799B +7AD1 +7AE7 +FA1C +7AEB +7B9E +FA1D +7D48 +7D5C +7DB7 +7DA0 +7DD6 +7E52 +7F47 +7FA1 +FA1E +8301 +8362 +837F +83C7 +83F6 +8448 +84B4 +8553 +8559 +856B +FA1F +85B0 +FA20 +FA21 +8807 +88F5 +8A12 +8A37 +8A79 +8AA7 +8ABE +8ADF +FA22 +8AF6 +8B53 +8B7F +8CF0 +8CF4 +8D12 +8D76 +FA23 +8ECF +FA24 +FA25 +9067 +90DE +FA26 +9115 +9127 +91DA +91D7 +91DE +91ED +91EE +91E4 +91E5 +9206 +9210 +920A +923A +9240 +923C +924E +9259 +9251 +9239 +9267 +92A7 +9277 +9278 +92E7 +92D7 +92D9 +92D0 +FA27 +92D5 +92E0 +92D3 +9325 +9321 +92FB +FA28 +931E +92FF +931D +9302 +9370 +9357 +93A4 +93C6 +93DE +93F8 +9431 +9445 +9448 +9592 +F9DC +FA29 +969D +96AF +9733 +973B +9743 +974D +974F +9751 +9755 +9857 +9865 +FA2A +FA2B +9927 +FA2C +999E +9A4E +9AD9 +9ADC +9B75 +9B72 +9B8F +9BB1 +9BBB +9C00 +9D70 +9D6B +FA2D +9E19 +9ED1 +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +FFE2 +FFE4 +FF07 +FF02 +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +FFE2 +FFE4 +FF07 +FF02 +3231 +2116 +2121 +2235 +7E8A +891C +9348 +9288 +84DC +4FC9 +70BB +6631 +68C8 +92F9 +66FB +5F45 +4E28 +4EE1 +4EFC +4F00 +4F03 +4F39 +4F56 +4F92 +4F8A +4F9A +4F94 +4FCD +5040 +5022 +4FFF +501E +5046 +5070 +5042 +5094 +50F4 +50D8 +514A +5164 +519D +51BE +51EC +5215 +529C +52A6 +52C0 +52DB +5300 +5307 +5324 +5372 +5393 +53B2 +53DD +FA0E +549C +548A +54A9 +54FF +5586 +5759 +5765 +57AC +57C8 +57C7 +FA0F +FA10 +589E +58B2 +590B +5953 +595B +595D +5963 +59A4 +59BA +5B56 +5BC0 +752F +5BD8 +5BEC +5C1E +5CA6 +5CBA +5CF5 +5D27 +5D53 +FA11 +5D42 +5D6D +5DB8 +5DB9 +5DD0 +5F21 +5F34 +5F67 +5FB7 +5FDE +605D +6085 +608A +60DE +60D5 +6120 +60F2 +6111 +6137 +6130 +6198 +6213 +62A6 +63F5 +6460 +649D +64CE +654E +6600 +6615 +663B +6609 +662E +661E +6624 +6665 +6657 +6659 +FA12 +6673 +6699 +66A0 +66B2 +66BF +66FA +670E +F929 +6766 +67BB +6852 +67C0 +6801 +6844 +68CF +FA13 +6968 +FA14 +6998 +69E2 +6A30 +6A6B +6A46 +6A73 +6A7E +6AE2 +6AE4 +6BD6 +6C3F +6C5C +6C86 +6C6F +6CDA +6D04 +6D87 +6D6F +6D96 +6DAC +6DCF +6DF8 +6DF2 +6DFC +6E39 +6E5C +6E27 +6E3C +6EBF +6F88 +6FB5 +6FF5 +7005 +7007 +7028 +7085 +70AB +710F +7104 +715C +7146 +7147 +FA15 +71C1 +71FE +72B1 +72BE +7324 +FA16 +7377 +73BD +73C9 +73D6 +73E3 +73D2 +7407 +73F5 +7426 +742A +7429 +742E +7462 +7489 +749F +7501 +756F +7682 +769C +769E +769B +76A6 +FA17 +7746 +52AF +7821 +784E +7864 +787A +7930 +FA18 +FA19 +FA1A +7994 +FA1B +799B +7AD1 +7AE7 +FA1C +7AEB +7B9E +FA1D +7D48 +7D5C +7DB7 +7DA0 +7DD6 +7E52 +7F47 +7FA1 +FA1E +8301 +8362 +837F +83C7 +83F6 +8448 +84B4 +8553 +8559 +856B +FA1F +85B0 +FA20 +FA21 +8807 +88F5 +8A12 +8A37 +8A79 +8AA7 +8ABE +8ADF +FA22 +8AF6 +8B53 +8B7F +8CF0 +8CF4 +8D12 +8D76 +FA23 +8ECF +FA24 +FA25 +9067 +90DE +FA26 +9115 +9127 +91DA +91D7 +91DE +91ED +91EE +91E4 +91E5 +9206 +9210 +920A +923A +9240 +923C +924E +9259 +9251 +9239 +9267 +92A7 +9277 +9278 +92E7 +92D7 +92D9 +92D0 +FA27 +92D5 +92E0 +92D3 +9325 +9321 +92FB +FA28 +931E +92FF +931D +9302 +9370 +9357 +93A4 +93C6 +93DE +93F8 +9431 +9445 +9448 +9592 +F9DC +FA29 +969D +96AF +9733 +973B +9743 +974D +974F +9751 +9755 +9857 +9865 +FA2A +FA2B +9927 +FA2C +999E +9A4E +9AD9 +9ADC +9B75 +9B72 +9B8F +9BB1 +9BBB +9C00 +9D70 +9D6B +FA2D +9E19 +9ED1 +E000 +E001 +E002 +E003 +E004 +E005 +E006 +E007 +E008 +E009 +E00A +E00B +E00C +E00D +E00E +E00F +E010 +E011 +E012 +E013 +E014 +E015 +E016 +E017 +E018 +E019 +E01A +E01B +E01C +E01D +E01E +E01F +E020 +E021 +E022 +E023 +E024 +E025 +E026 +E027 +E028 +E029 +E02A +E02B +E02C +E02D +E02E +E02F +E030 +E031 +E032 +E033 +E034 +E035 +E036 +E037 +E038 +E039 +E03A +E03B +E03C +E03D +E03E +E03F +E040 +E041 +E042 +E043 +E044 +E045 +E046 +E047 +E048 +E049 +E04A +E04B +E04C +E04D +E04E +E04F +E050 +E051 +E052 +E053 +E054 +E055 +E056 +E057 +E058 +E059 +E05A +E05B +E05C +E05D +E05E +E05F +E060 +E061 +E062 +E063 +E064 +E065 +E066 +E067 +E068 +E069 +E06A +E06B +E06C +E06D +E06E +E06F +E070 +E071 +E072 +E073 +E074 +E075 +E076 +E077 +E078 +E079 +E07A +E07B +E07C +E07D +E07E +E07F +E080 +E081 +E082 +E083 +E084 +E085 +E086 +E087 +E088 +E089 +E08A +E08B +E08C +E08D +E08E +E08F +E090 +E091 +E092 +E093 +E094 +E095 +E096 +E097 +E098 +E099 +E09A +E09B +E09C +E09D +E09E +E09F +E0A0 +E0A1 +E0A2 +E0A3 +E0A4 +E0A5 +E0A6 +E0A7 +E0A8 +E0A9 +E0AA +E0AB +E0AC +E0AD +E0AE +E0AF +E0B0 +E0B1 +E0B2 +E0B3 +E0B4 +E0B5 +E0B6 +E0B7 +E0B8 +E0B9 +E0BA +E0BB +E0BC +E0BD +E0BE +E0BF +E0C0 +E0C1 +E0C2 +E0C3 +E0C4 +E0C5 +E0C6 +E0C7 +E0C8 +E0C9 +E0CA +E0CB +E0CC +E0CD +E0CE +E0CF +E0D0 +E0D1 +E0D2 +E0D3 +E0D4 +E0D5 +E0D6 +E0D7 +E0D8 +E0D9 +E0DA +E0DB +E0DC +E0DD +E0DE +E0DF +E0E0 +E0E1 +E0E2 +E0E3 +E0E4 +E0E5 +E0E6 +E0E7 +E0E8 +E0E9 +E0EA +E0EB +E0EC +E0ED +E0EE +E0EF +E0F0 +E0F1 +E0F2 +E0F3 +E0F4 +E0F5 +E0F6 +E0F7 +E0F8 +E0F9 +E0FA +E0FB +E0FC +E0FD +E0FE +E0FF +E100 +E101 +E102 +E103 +E104 +E105 +E106 +E107 +E108 +E109 +E10A +E10B +E10C +E10D +E10E +E10F +E110 +E111 +E112 +E113 +E114 +E115 +E116 +E117 +E118 +E119 +E11A +E11B +E11C +E11D +E11E +E11F +E120 +E121 +E122 +E123 +E124 +E125 +E126 +E127 +E128 +E129 +E12A +E12B +E12C +E12D +E12E +E12F +E130 +E131 +E132 +E133 +E134 +E135 +E136 +E137 +E138 +E139 +E13A +E13B +E13C +E13D +E13E +E13F +E140 +E141 +E142 +E143 +E144 +E145 +E146 +E147 +E148 +E149 +E14A +E14B +E14C +E14D +E14E +E14F +E150 +E151 +E152 +E153 +E154 +E155 +E156 +E157 +E158 +E159 +E15A +E15B +E15C +E15D +E15E +E15F +E160 +E161 +E162 +E163 +E164 +E165 +E166 +E167 +E168 +E169 +E16A +E16B +E16C +E16D +E16E +E16F +E170 +E171 +E172 +E173 +E174 +E175 +E176 +E177 +E178 +E179 +E17A +E17B +E17C +E17D +E17E +E17F +E180 +E181 +E182 +E183 +E184 +E185 +E186 +E187 +E188 +E189 +E18A +E18B +E18C +E18D +E18E +E18F +E190 +E191 +E192 +E193 +E194 +E195 +E196 +E197 +E198 +E199 +E19A +E19B +E19C +E19D +E19E +E19F +E1A0 +E1A1 +E1A2 +E1A3 +E1A4 +E1A5 +E1A6 +E1A7 +E1A8 +E1A9 +E1AA +E1AB +E1AC +E1AD +E1AE +E1AF +E1B0 +E1B1 +E1B2 +E1B3 +E1B4 +E1B5 +E1B6 +E1B7 +E1B8 +E1B9 +E1BA +E1BB +E1BC +E1BD +E1BE +E1BF +E1C0 +E1C1 +E1C2 +E1C3 +E1C4 +E1C5 +E1C6 +E1C7 +E1C8 +E1C9 +E1CA +E1CB +E1CC +E1CD +E1CE +E1CF +E1D0 +E1D1 +E1D2 +E1D3 +E1D4 +E1D5 +E1D6 +E1D7 +E1D8 +E1D9 +E1DA +E1DB +E1DC +E1DD +E1DE +E1DF +E1E0 +E1E1 +E1E2 +E1E3 +E1E4 +E1E5 +E1E6 +E1E7 +E1E8 +E1E9 +E1EA +E1EB +E1EC +E1ED +E1EE +E1EF +E1F0 +E1F1 +E1F2 +E1F3 +E1F4 +E1F5 +E1F6 +E1F7 +E1F8 +E1F9 +E1FA +E1FB +E1FC +E1FD +E1FE +E1FF +E200 +E201 +E202 +E203 +E204 +E205 +E206 +E207 +E208 +E209 +E20A +E20B +E20C +E20D +E20E +E20F +E210 +E211 +E212 +E213 +E214 +E215 +E216 +E217 +E218 +E219 +E21A +E21B +E21C +E21D +E21E +E21F +E220 +E221 +E222 +E223 +E224 +E225 +E226 +E227 +E228 +E229 +E22A +E22B +E22C +E22D +E22E +E22F +E230 +E231 +E232 +E233 +E234 +E235 +E236 +E237 +E238 +E239 +E23A +E23B +E23C +E23D +E23E +E23F +E240 +E241 +E242 +E243 +E244 +E245 +E246 +E247 +E248 +E249 +E24A +E24B +E24C +E24D +E24E +E24F +E250 +E251 +E252 +E253 +E254 +E255 +E256 +E257 +E258 +E259 +E25A +E25B +E25C +E25D +E25E +E25F +E260 +E261 +E262 +E263 +E264 +E265 +E266 +E267 +E268 +E269 +E26A +E26B +E26C +E26D +E26E +E26F +E270 +E271 +E272 +E273 +E274 +E275 +E276 +E277 +E278 +E279 +E27A +E27B +E27C +E27D +E27E +E27F +E280 +E281 +E282 +E283 +E284 +E285 +E286 +E287 +E288 +E289 +E28A +E28B +E28C +E28D +E28E +E28F +E290 +E291 +E292 +E293 +E294 +E295 +E296 +E297 +E298 +E299 +E29A +E29B +E29C +E29D +E29E +E29F +E2A0 +E2A1 +E2A2 +E2A3 +E2A4 +E2A5 +E2A6 +E2A7 +E2A8 +E2A9 +E2AA +E2AB +E2AC +E2AD +E2AE +E2AF +E2B0 +E2B1 +E2B2 +E2B3 +E2B4 +E2B5 +E2B6 +E2B7 +E2B8 +E2B9 +E2BA +E2BB +E2BC +E2BD +E2BE +E2BF +E2C0 +E2C1 +E2C2 +E2C3 +E2C4 +E2C5 +E2C6 +E2C7 +E2C8 +E2C9 +E2CA +E2CB +E2CC +E2CD +E2CE +E2CF +E2D0 +E2D1 +E2D2 +E2D3 +E2D4 +E2D5 +E2D6 +E2D7 +E2D8 +E2D9 +E2DA +E2DB +E2DC +E2DD +E2DE +E2DF +E2E0 +E2E1 +E2E2 +E2E3 +E2E4 +E2E5 +E2E6 +E2E7 +E2E8 +E2E9 +E2EA +E2EB +E2EC +E2ED +E2EE +E2EF +E2F0 +E2F1 +E2F2 +E2F3 +E2F4 +E2F5 +E2F6 +E2F7 +E2F8 +E2F9 +E2FA +E2FB +E2FC +E2FD +E2FE +E2FF +E300 +E301 +E302 +E303 +E304 +E305 +E306 +E307 +E308 +E309 +E30A +E30B +E30C +E30D +E30E +E30F +E310 +E311 +E312 +E313 +E314 +E315 +E316 +E317 +E318 +E319 +E31A +E31B +E31C +E31D +E31E +E31F +E320 +E321 +E322 +E323 +E324 +E325 +E326 +E327 +E328 +E329 +E32A +E32B +E32C +E32D +E32E +E32F +E330 +E331 +E332 +E333 +E334 +E335 +E336 +E337 +E338 +E339 +E33A +E33B +E33C +E33D +E33E +E33F +E340 +E341 +E342 +E343 +E344 +E345 +E346 +E347 +E348 +E349 +E34A +E34B +E34C +E34D +E34E +E34F +E350 +E351 +E352 +E353 +E354 +E355 +E356 +E357 +E358 +E359 +E35A +E35B +E35C +E35D +E35E +E35F +E360 +E361 +E362 +E363 +E364 +E365 +E366 +E367 +E368 +E369 +E36A +E36B +E36C +E36D +E36E +E36F +E370 +E371 +E372 +E373 +E374 +E375 +E376 +E377 +E378 +E379 +E37A +E37B +E37C +E37D +E37E +E37F +E380 +E381 +E382 +E383 +E384 +E385 +E386 +E387 +E388 +E389 +E38A +E38B +E38C +E38D +E38E +E38F +E390 +E391 +E392 +E393 +E394 +E395 +E396 +E397 +E398 +E399 +E39A +E39B +E39C +E39D +E39E +E39F +E3A0 +E3A1 +E3A2 +E3A3 +E3A4 +E3A5 +E3A6 +E3A7 +E3A8 +E3A9 +E3AA +E3AB +E3AC +E3AD +E3AE +E3AF +E3B0 +E3B1 +E3B2 +E3B3 +E3B4 +E3B5 +E3B6 +E3B7 +E3B8 +E3B9 +E3BA +E3BB +E3BC +E3BD +E3BE +E3BF +E3C0 +E3C1 +E3C2 +E3C3 +E3C4 +E3C5 +E3C6 +E3C7 +E3C8 +E3C9 +E3CA +E3CB +E3CC +E3CD +E3CE +E3CF +E3D0 +E3D1 +E3D2 +E3D3 +E3D4 +E3D5 +E3D6 +E3D7 +E3D8 +E3D9 +E3DA +E3DB +E3DC +E3DD +E3DE +E3DF +E3E0 +E3E1 +E3E2 +E3E3 +E3E4 +E3E5 +E3E6 +E3E7 +E3E8 +E3E9 +E3EA +E3EB +E3EC +E3ED +E3EE +E3EF +E3F0 +E3F1 +E3F2 +E3F3 +E3F4 +E3F5 +E3F6 +E3F7 +E3F8 +E3F9 +E3FA +E3FB +E3FC +E3FD +E3FE +E3FF +E400 +E401 +E402 +E403 +E404 +E405 +E406 +E407 +E408 +E409 +E40A +E40B +E40C +E40D +E40E +E40F +E410 +E411 +E412 +E413 +E414 +E415 +E416 +E417 +E418 +E419 +E41A +E41B +E41C +E41D +E41E +E41F +E420 +E421 +E422 +E423 +E424 +E425 +E426 +E427 +E428 +E429 +E42A +E42B +E42C +E42D +E42E +E42F +E430 +E431 +E432 +E433 +E434 +E435 +E436 +E437 +E438 +E439 +E43A +E43B +E43C +E43D +E43E +E43F +E440 +E441 +E442 +E443 +E444 +E445 +E446 +E447 +E448 +E449 +E44A +E44B +E44C +E44D +E44E +E44F +E450 +E451 +E452 +E453 +E454 +E455 +E456 +E457 +E458 +E459 +E45A +E45B +E45C +E45D +E45E +E45F +E460 +E461 +E462 +E463 +E464 +E465 +E466 +E467 +E468 +E469 +E46A +E46B +E46C +E46D +E46E +E46F +E470 +E471 +E472 +E473 +E474 +E475 +E476 +E477 +E478 +E479 +E47A +E47B +E47C +E47D +E47E +E47F +E480 +E481 +E482 +E483 +E484 +E485 +E486 +E487 +E488 +E489 +E48A +E48B +E48C +E48D +E48E +E48F +E490 +E491 +E492 +E493 +E494 +E495 +E496 +E497 +E498 +E499 +E49A +E49B +E49C +E49D +E49E +E49F +E4A0 +E4A1 +E4A2 +E4A3 +E4A4 +E4A5 +E4A6 +E4A7 +E4A8 +E4A9 +E4AA +E4AB +E4AC +E4AD +E4AE +E4AF +E4B0 +E4B1 +E4B2 +E4B3 +E4B4 +E4B5 +E4B6 +E4B7 +E4B8 +E4B9 +E4BA +E4BB +E4BC +E4BD +E4BE +E4BF +E4C0 +E4C1 +E4C2 +E4C3 +E4C4 +E4C5 +E4C6 +E4C7 +E4C8 +E4C9 +E4CA +E4CB +E4CC +E4CD +E4CE +E4CF +E4D0 +E4D1 +E4D2 +E4D3 +E4D4 +E4D5 +E4D6 +E4D7 +E4D8 +E4D9 +E4DA +E4DB +E4DC +E4DD +E4DE +E4DF +E4E0 +E4E1 +E4E2 +E4E3 +E4E4 +E4E5 +E4E6 +E4E7 +E4E8 +E4E9 +E4EA +E4EB +E4EC +E4ED +E4EE +E4EF +E4F0 +E4F1 +E4F2 +E4F3 +E4F4 +E4F5 +E4F6 +E4F7 +E4F8 +E4F9 +E4FA +E4FB +E4FC +E4FD +E4FE +E4FF +E500 +E501 +E502 +E503 +E504 +E505 +E506 +E507 +E508 +E509 +E50A +E50B +E50C +E50D +E50E +E50F +E510 +E511 +E512 +E513 +E514 +E515 +E516 +E517 +E518 +E519 +E51A +E51B +E51C +E51D +E51E +E51F +E520 +E521 +E522 +E523 +E524 +E525 +E526 +E527 +E528 +E529 +E52A +E52B +E52C +E52D +E52E +E52F +E530 +E531 +E532 +E533 +E534 +E535 +E536 +E537 +E538 +E539 +E53A +E53B +E53C +E53D +E53E +E53F +E540 +E541 +E542 +E543 +E544 +E545 +E546 +E547 +E548 +E549 +E54A +E54B +E54C +E54D +E54E +E54F +E550 +E551 +E552 +E553 +E554 +E555 +E556 +E557 +E558 +E559 +E55A +E55B +E55C +E55D +E55E +E55F +E560 +E561 +E562 +E563 +E564 +E565 +E566 +E567 +E568 +E569 +E56A +E56B +E56C +E56D +E56E +E56F +E570 +E571 +E572 +E573 +E574 +E575 +E576 +E577 +E578 +E579 +E57A +E57B +E57C +E57D +E57E +E57F +E580 +E581 +E582 +E583 +E584 +E585 +E586 +E587 +E588 +E589 +E58A +E58B +E58C +E58D +E58E +E58F +E590 +E591 +E592 +E593 +E594 +E595 +E596 +E597 +E598 +E599 +E59A +E59B +E59C +E59D +E59E +E59F +E5A0 +E5A1 +E5A2 +E5A3 +E5A4 +E5A5 +E5A6 +E5A7 +E5A8 +E5A9 +E5AA +E5AB +E5AC +E5AD +E5AE +E5AF +E5B0 +E5B1 +E5B2 +E5B3 +E5B4 +E5B5 +E5B6 +E5B7 +E5B8 +E5B9 +E5BA +E5BB +E5BC +E5BD +E5BE +E5BF +E5C0 +E5C1 +E5C2 +E5C3 +E5C4 +E5C5 +E5C6 +E5C7 +E5C8 +E5C9 +E5CA +E5CB +E5CC +E5CD +E5CE +E5CF +E5D0 +E5D1 +E5D2 +E5D3 +E5D4 +E5D5 +E5D6 +E5D7 +E5D8 +E5D9 +E5DA +E5DB +E5DC +E5DD +E5DE +E5DF +E5E0 +E5E1 +E5E2 +E5E3 +E5E4 +E5E5 +E5E6 +E5E7 +E5E8 +E5E9 +E5EA +E5EB +E5EC +E5ED +E5EE +E5EF +E5F0 +E5F1 +E5F2 +E5F3 +E5F4 +E5F5 +E5F6 +E5F7 +E5F8 +E5F9 +E5FA +E5FB +E5FC +E5FD +E5FE +E5FF +E600 +E601 +E602 +E603 +E604 +E605 +E606 +E607 +E608 +E609 +E60A +E60B +E60C +E60D +E60E +E60F +E610 +E611 +E612 +E613 +E614 +E615 +E616 +E617 +E618 +E619 +E61A +E61B +E61C +E61D +E61E +E61F +E620 +E621 +E622 +E623 +E624 +E625 +E626 +E627 +E628 +E629 +E62A +E62B +E62C +E62D +E62E +E62F +E630 +E631 +E632 +E633 +E634 +E635 +E636 +E637 +E638 +E639 +E63A +E63B +E63C +E63D +E63E +E63F +E640 +E641 +E642 +E643 +E644 +E645 +E646 +E647 +E648 +E649 +E64A +E64B +E64C +E64D +E64E +E64F +E650 +E651 +E652 +E653 +E654 +E655 +E656 +E657 +E658 +E659 +E65A +E65B +E65C +E65D +E65E +E65F +E660 +E661 +E662 +E663 +E664 +E665 +E666 +E667 +E668 +E669 +E66A +E66B +E66C +E66D +E66E +E66F +E670 +E671 +E672 +E673 +E674 +E675 +E676 +E677 +E678 +E679 +E67A +E67B +E67C +E67D +E67E +E67F +E680 +E681 +E682 +E683 +E684 +E685 +E686 +E687 +E688 +E689 +E68A +E68B +E68C +E68D +E68E +E68F +E690 +E691 +E692 +E693 +E694 +E695 +E696 +E697 +E698 +E699 +E69A +E69B +E69C +E69D +E69E +E69F +E6A0 +E6A1 +E6A2 +E6A3 +E6A4 +E6A5 +E6A6 +E6A7 +E6A8 +E6A9 +E6AA +E6AB +E6AC +E6AD +E6AE +E6AF +E6B0 +E6B1 +E6B2 +E6B3 +E6B4 +E6B5 +E6B6 +E6B7 +E6B8 +E6B9 +E6BA +E6BB +E6BC +E6BD +E6BE +E6BF +E6C0 +E6C1 +E6C2 +E6C3 +E6C4 +E6C5 +E6C6 +E6C7 +E6C8 +E6C9 +E6CA +E6CB +E6CC +E6CD +E6CE +E6CF +E6D0 +E6D1 +E6D2 +E6D3 +E6D4 +E6D5 +E6D6 +E6D7 +E6D8 +E6D9 +E6DA +E6DB +E6DC +E6DD +E6DE +E6DF +E6E0 +E6E1 +E6E2 +E6E3 +E6E4 +E6E5 +E6E6 +E6E7 +E6E8 +E6E9 +E6EA +E6EB +E6EC +E6ED +E6EE +E6EF +E6F0 +E6F1 +E6F2 +E6F3 +E6F4 +E6F5 +E6F6 +E6F7 +E6F8 +E6F9 +E6FA +E6FB +E6FC +E6FD +E6FE +E6FF +E700 +E701 +E702 +E703 +E704 +E705 +E706 +E707 +E708 +E709 +E70A +E70B +E70C +E70D +E70E +E70F +E710 +E711 +E712 +E713 +E714 +E715 +E716 +E717 +E718 +E719 +E71A +E71B +E71C +E71D +E71E +E71F +E720 +E721 +E722 +E723 +E724 +E725 +E726 +E727 +E728 +E729 +E72A +E72B +E72C +E72D +E72E +E72F +E730 +E731 +E732 +E733 +E734 +E735 +E736 +E737 +E738 +E739 +E73A +E73B +E73C +E73D +E73E +E73F +E740 +E741 +E742 +E743 +E744 +E745 +E746 +E747 +E748 +E749 +E74A +E74B +E74C +E74D +E74E +E74F +E750 +E751 +E752 +E753 +E754 +E755 +E756 +E757 +CREATE TABLE t3 SELECT CONVERT(c1 USING cp932) AS c1 FROM t2; +SELECT HEX(c1) FROM t3; +HEX(c1) +05 +7E +815C +815F +8160 +8161 +817C +8191 +8192 +81CA +8740 +8741 +8742 +8743 +8744 +8745 +8746 +8747 +8748 +8749 +874A +874B +874C +874D +874E +874F +8750 +8751 +8752 +8753 +8754 +8755 +8756 +8757 +8758 +8759 +875A +875B +875C +875D +875F +8760 +8761 +8762 +8763 +8764 +8765 +8766 +8767 +8768 +8769 +876A +876B +876C +876D +876E +876F +8770 +8771 +8772 +8773 +8774 +8775 +877E +8780 +8781 +8782 +8783 +8784 +8785 +8786 +8787 +8788 +8789 +878A +878B +878C +878D +878E +878F +81E0 +81DF +81E7 +8793 +8794 +81E3 +81DB +81DA +8798 +8799 +81E6 +81BF +81BE +FA5C +FA5D +FA5E +FA5F +FA60 +FA61 +FA62 +FA63 +FA64 +FA65 +FA66 +FA67 +FA68 +FA69 +FA6A +FA6B +FA6C +FA6D +FA6E +FA6F +FA70 +FA71 +FA72 +FA73 +FA74 +FA75 +FA76 +FA77 +FA78 +FA79 +FA7A +FA7B +FA7C +FA7D +FA7E +FA80 +FA81 +FA82 +FA83 +FA84 +FA85 +FA86 +FA87 +FA88 +FA89 +FA8A +FA8B +FA8C +FA8D +FA8E +FA8F +FA90 +FA91 +FA92 +FA93 +FA94 +FA95 +FA96 +FA97 +FA98 +FA99 +FA9A +FA9B +FA9C +FA9D +FA9E +FA9F +FAA0 +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FB40 +FB41 +FB42 +FB43 +FB44 +FB45 +FB46 +FB47 +FB48 +FB49 +FB4A +FB4B +FB4C +FB4D +FB4E +FB4F +FB50 +FB51 +FB52 +FB53 +FB54 +FB55 +FB56 +FB57 +FB58 +FB59 +FB5A +FB5B +FB5C +FB5D +FB5E +FB5F +FB60 +FB61 +FB62 +FB63 +FB64 +FB65 +FB66 +FB67 +FB68 +FB69 +FB6A +FB6B +FB6C +FB6D +FB6E +FB6F +FB70 +FB71 +FB72 +FB73 +FB74 +FB75 +FB76 +FB77 +FB78 +FB79 +FB7A +FB7B +FB7C +FB7D +FB7E +FB80 +FB81 +FB82 +FB83 +FB84 +FB85 +FB86 +FB87 +FB88 +FB89 +FB8A +FB8B +FB8C +FB8D +FB8E +FB8F +FB90 +FB91 +FB92 +FB93 +FB94 +FB95 +FB96 +FB97 +FB98 +FB99 +FB9A +FB9B +FB9C +FB9D +FB9E +FB9F +FBA0 +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FC40 +FC41 +FC42 +FC43 +FC44 +FC45 +FC46 +FC47 +FC48 +FC49 +FC4A +FC4B +FA40 +FA41 +FA42 +FA43 +FA44 +FA45 +FA46 +FA47 +FA48 +FA49 +81CA +FA55 +FA56 +FA57 +FA40 +FA41 +FA42 +FA43 +FA44 +FA45 +FA46 +FA47 +FA48 +FA49 +8754 +8755 +8756 +8757 +8758 +8759 +875A +875B +875C +875D +81CA +FA55 +FA56 +FA57 +878A +8782 +8784 +81E6 +FA5C +FA5D +FA5E +FA5F +FA60 +FA61 +FA62 +FA63 +FA64 +FA65 +FA66 +FA67 +FA68 +FA69 +FA6A +FA6B +FA6C +FA6D +FA6E +FA6F +FA70 +FA71 +FA72 +FA73 +FA74 +FA75 +FA76 +FA77 +FA78 +FA79 +FA7A +FA7B +FA7C +FA7D +FA7E +FA80 +FA81 +FA82 +FA83 +FA84 +FA85 +FA86 +FA87 +FA88 +FA89 +FA8A +FA8B +FA8C +FA8D +FA8E +FA8F +FA90 +FA91 +FA92 +FA93 +FA94 +FA95 +FA96 +FA97 +FA98 +FA99 +FA9A +FA9B +FA9C +FA9D +FA9E +FA9F +FAA0 +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FB40 +FB41 +FB42 +FB43 +FB44 +FB45 +FB46 +FB47 +FB48 +FB49 +FB4A +FB4B +FB4C +FB4D +FB4E +FB4F +FB50 +FB51 +FB52 +FB53 +FB54 +FB55 +FB56 +FB57 +FB58 +FB59 +FB5A +FB5B +FB5C +FB5D +FB5E +FB5F +FB60 +FB61 +FB62 +FB63 +FB64 +FB65 +FB66 +FB67 +FB68 +FB69 +FB6A +FB6B +FB6C +FB6D +FB6E +FB6F +FB70 +FB71 +FB72 +FB73 +FB74 +FB75 +FB76 +FB77 +FB78 +FB79 +FB7A +FB7B +FB7C +FB7D +FB7E +FB80 +FB81 +FB82 +FB83 +FB84 +FB85 +FB86 +FB87 +FB88 +FB89 +FB8A +FB8B +FB8C +FB8D +FB8E +FB8F +FB90 +FB91 +FB92 +FB93 +FB94 +FB95 +FB96 +FB97 +FB98 +FB99 +FB9A +FB9B +FB9C +FB9D +FB9E +FB9F +FBA0 +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FC40 +FC41 +FC42 +FC43 +FC44 +FC45 +FC46 +FC47 +FC48 +FC49 +FC4A +FC4B +F040 +F041 +F042 +F043 +F044 +F045 +F046 +F047 +F048 +F049 +F04A +F04B +F04C +F04D +F04E +F04F +F050 +F051 +F052 +F053 +F054 +F055 +F056 +F057 +F058 +F059 +F05A +F05B +F05C +F05D +F05E +F05F +F060 +F061 +F062 +F063 +F064 +F065 +F066 +F067 +F068 +F069 +F06A +F06B +F06C +F06D +F06E +F06F +F070 +F071 +F072 +F073 +F074 +F075 +F076 +F077 +F078 +F079 +F07A +F07B +F07C +F07D +F07E +F080 +F081 +F082 +F083 +F084 +F085 +F086 +F087 +F088 +F089 +F08A +F08B +F08C +F08D +F08E +F08F +F090 +F091 +F092 +F093 +F094 +F095 +F096 +F097 +F098 +F099 +F09A +F09B +F09C +F09D +F09E +F09F +F0A0 +F0A1 +F0A2 +F0A3 +F0A4 +F0A5 +F0A6 +F0A7 +F0A8 +F0A9 +F0AA +F0AB +F0AC +F0AD +F0AE +F0AF +F0B0 +F0B1 +F0B2 +F0B3 +F0B4 +F0B5 +F0B6 +F0B7 +F0B8 +F0B9 +F0BA +F0BB +F0BC +F0BD +F0BE +F0BF +F0C0 +F0C1 +F0C2 +F0C3 +F0C4 +F0C5 +F0C6 +F0C7 +F0C8 +F0C9 +F0CA +F0CB +F0CC +F0CD +F0CE +F0CF +F0D0 +F0D1 +F0D2 +F0D3 +F0D4 +F0D5 +F0D6 +F0D7 +F0D8 +F0D9 +F0DA +F0DB +F0DC +F0DD +F0DE +F0DF +F0E0 +F0E1 +F0E2 +F0E3 +F0E4 +F0E5 +F0E6 +F0E7 +F0E8 +F0E9 +F0EA +F0EB +F0EC +F0ED +F0EE +F0EF +F0F0 +F0F1 +F0F2 +F0F3 +F0F4 +F0F5 +F0F6 +F0F7 +F0F8 +F0F9 +F0FA +F0FB +F0FC +F140 +F141 +F142 +F143 +F144 +F145 +F146 +F147 +F148 +F149 +F14A +F14B +F14C +F14D +F14E +F14F +F150 +F151 +F152 +F153 +F154 +F155 +F156 +F157 +F158 +F159 +F15A +F15B +F15C +F15D +F15E +F15F +F160 +F161 +F162 +F163 +F164 +F165 +F166 +F167 +F168 +F169 +F16A +F16B +F16C +F16D +F16E +F16F +F170 +F171 +F172 +F173 +F174 +F175 +F176 +F177 +F178 +F179 +F17A +F17B +F17C +F17D +F17E +F180 +F181 +F182 +F183 +F184 +F185 +F186 +F187 +F188 +F189 +F18A +F18B +F18C +F18D +F18E +F18F +F190 +F191 +F192 +F193 +F194 +F195 +F196 +F197 +F198 +F199 +F19A +F19B +F19C +F19D +F19E +F19F +F1A0 +F1A1 +F1A2 +F1A3 +F1A4 +F1A5 +F1A6 +F1A7 +F1A8 +F1A9 +F1AA +F1AB +F1AC +F1AD +F1AE +F1AF +F1B0 +F1B1 +F1B2 +F1B3 +F1B4 +F1B5 +F1B6 +F1B7 +F1B8 +F1B9 +F1BA +F1BB +F1BC +F1BD +F1BE +F1BF +F1C0 +F1C1 +F1C2 +F1C3 +F1C4 +F1C5 +F1C6 +F1C7 +F1C8 +F1C9 +F1CA +F1CB +F1CC +F1CD +F1CE +F1CF +F1D0 +F1D1 +F1D2 +F1D3 +F1D4 +F1D5 +F1D6 +F1D7 +F1D8 +F1D9 +F1DA +F1DB +F1DC +F1DD +F1DE +F1DF +F1E0 +F1E1 +F1E2 +F1E3 +F1E4 +F1E5 +F1E6 +F1E7 +F1E8 +F1E9 +F1EA +F1EB +F1EC +F1ED +F1EE +F1EF +F1F0 +F1F1 +F1F2 +F1F3 +F1F4 +F1F5 +F1F6 +F1F7 +F1F8 +F1F9 +F1FA +F1FB +F1FC +F240 +F241 +F242 +F243 +F244 +F245 +F246 +F247 +F248 +F249 +F24A +F24B +F24C +F24D +F24E +F24F +F250 +F251 +F252 +F253 +F254 +F255 +F256 +F257 +F258 +F259 +F25A +F25B +F25C +F25D +F25E +F25F +F260 +F261 +F262 +F263 +F264 +F265 +F266 +F267 +F268 +F269 +F26A +F26B +F26C +F26D +F26E +F26F +F270 +F271 +F272 +F273 +F274 +F275 +F276 +F277 +F278 +F279 +F27A +F27B +F27C +F27D +F27E +F280 +F281 +F282 +F283 +F284 +F285 +F286 +F287 +F288 +F289 +F28A +F28B +F28C +F28D +F28E +F28F +F290 +F291 +F292 +F293 +F294 +F295 +F296 +F297 +F298 +F299 +F29A +F29B +F29C +F29D +F29E +F29F +F2A0 +F2A1 +F2A2 +F2A3 +F2A4 +F2A5 +F2A6 +F2A7 +F2A8 +F2A9 +F2AA +F2AB +F2AC +F2AD +F2AE +F2AF +F2B0 +F2B1 +F2B2 +F2B3 +F2B4 +F2B5 +F2B6 +F2B7 +F2B8 +F2B9 +F2BA +F2BB +F2BC +F2BD +F2BE +F2BF +F2C0 +F2C1 +F2C2 +F2C3 +F2C4 +F2C5 +F2C6 +F2C7 +F2C8 +F2C9 +F2CA +F2CB +F2CC +F2CD +F2CE +F2CF +F2D0 +F2D1 +F2D2 +F2D3 +F2D4 +F2D5 +F2D6 +F2D7 +F2D8 +F2D9 +F2DA +F2DB +F2DC +F2DD +F2DE +F2DF +F2E0 +F2E1 +F2E2 +F2E3 +F2E4 +F2E5 +F2E6 +F2E7 +F2E8 +F2E9 +F2EA +F2EB +F2EC +F2ED +F2EE +F2EF +F2F0 +F2F1 +F2F2 +F2F3 +F2F4 +F2F5 +F2F6 +F2F7 +F2F8 +F2F9 +F2FA +F2FB +F2FC +F340 +F341 +F342 +F343 +F344 +F345 +F346 +F347 +F348 +F349 +F34A +F34B +F34C +F34D +F34E +F34F +F350 +F351 +F352 +F353 +F354 +F355 +F356 +F357 +F358 +F359 +F35A +F35B +F35C +F35D +F35E +F35F +F360 +F361 +F362 +F363 +F364 +F365 +F366 +F367 +F368 +F369 +F36A +F36B +F36C +F36D +F36E +F36F +F370 +F371 +F372 +F373 +F374 +F375 +F376 +F377 +F378 +F379 +F37A +F37B +F37C +F37D +F37E +F380 +F381 +F382 +F383 +F384 +F385 +F386 +F387 +F388 +F389 +F38A +F38B +F38C +F38D +F38E +F38F +F390 +F391 +F392 +F393 +F394 +F395 +F396 +F397 +F398 +F399 +F39A +F39B +F39C +F39D +F39E +F39F +F3A0 +F3A1 +F3A2 +F3A3 +F3A4 +F3A5 +F3A6 +F3A7 +F3A8 +F3A9 +F3AA +F3AB +F3AC +F3AD +F3AE +F3AF +F3B0 +F3B1 +F3B2 +F3B3 +F3B4 +F3B5 +F3B6 +F3B7 +F3B8 +F3B9 +F3BA +F3BB +F3BC +F3BD +F3BE +F3BF +F3C0 +F3C1 +F3C2 +F3C3 +F3C4 +F3C5 +F3C6 +F3C7 +F3C8 +F3C9 +F3CA +F3CB +F3CC +F3CD +F3CE +F3CF +F3D0 +F3D1 +F3D2 +F3D3 +F3D4 +F3D5 +F3D6 +F3D7 +F3D8 +F3D9 +F3DA +F3DB +F3DC +F3DD +F3DE +F3DF +F3E0 +F3E1 +F3E2 +F3E3 +F3E4 +F3E5 +F3E6 +F3E7 +F3E8 +F3E9 +F3EA +F3EB +F3EC +F3ED +F3EE +F3EF +F3F0 +F3F1 +F3F2 +F3F3 +F3F4 +F3F5 +F3F6 +F3F7 +F3F8 +F3F9 +F3FA +F3FB +F3FC +F440 +F441 +F442 +F443 +F444 +F445 +F446 +F447 +F448 +F449 +F44A +F44B +F44C +F44D +F44E +F44F +F450 +F451 +F452 +F453 +F454 +F455 +F456 +F457 +F458 +F459 +F45A +F45B +F45C +F45D +F45E +F45F +F460 +F461 +F462 +F463 +F464 +F465 +F466 +F467 +F468 +F469 +F46A +F46B +F46C +F46D +F46E +F46F +F470 +F471 +F472 +F473 +F474 +F475 +F476 +F477 +F478 +F479 +F47A +F47B +F47C +F47D +F47E +F480 +F481 +F482 +F483 +F484 +F485 +F486 +F487 +F488 +F489 +F48A +F48B +F48C +F48D +F48E +F48F +F490 +F491 +F492 +F493 +F494 +F495 +F496 +F497 +F498 +F499 +F49A +F49B +F49C +F49D +F49E +F49F +F4A0 +F4A1 +F4A2 +F4A3 +F4A4 +F4A5 +F4A6 +F4A7 +F4A8 +F4A9 +F4AA +F4AB +F4AC +F4AD +F4AE +F4AF +F4B0 +F4B1 +F4B2 +F4B3 +F4B4 +F4B5 +F4B6 +F4B7 +F4B8 +F4B9 +F4BA +F4BB +F4BC +F4BD +F4BE +F4BF +F4C0 +F4C1 +F4C2 +F4C3 +F4C4 +F4C5 +F4C6 +F4C7 +F4C8 +F4C9 +F4CA +F4CB +F4CC +F4CD +F4CE +F4CF +F4D0 +F4D1 +F4D2 +F4D3 +F4D4 +F4D5 +F4D6 +F4D7 +F4D8 +F4D9 +F4DA +F4DB +F4DC +F4DD +F4DE +F4DF +F4E0 +F4E1 +F4E2 +F4E3 +F4E4 +F4E5 +F4E6 +F4E7 +F4E8 +F4E9 +F4EA +F4EB +F4EC +F4ED +F4EE +F4EF +F4F0 +F4F1 +F4F2 +F4F3 +F4F4 +F4F5 +F4F6 +F4F7 +F4F8 +F4F9 +F4FA +F4FB +F4FC +F540 +F541 +F542 +F543 +F544 +F545 +F546 +F547 +F548 +F549 +F54A +F54B +F54C +F54D +F54E +F54F +F550 +F551 +F552 +F553 +F554 +F555 +F556 +F557 +F558 +F559 +F55A +F55B +F55C +F55D +F55E +F55F +F560 +F561 +F562 +F563 +F564 +F565 +F566 +F567 +F568 +F569 +F56A +F56B +F56C +F56D +F56E +F56F +F570 +F571 +F572 +F573 +F574 +F575 +F576 +F577 +F578 +F579 +F57A +F57B +F57C +F57D +F57E +F580 +F581 +F582 +F583 +F584 +F585 +F586 +F587 +F588 +F589 +F58A +F58B +F58C +F58D +F58E +F58F +F590 +F591 +F592 +F593 +F594 +F595 +F596 +F597 +F598 +F599 +F59A +F59B +F59C +F59D +F59E +F59F +F5A0 +F5A1 +F5A2 +F5A3 +F5A4 +F5A5 +F5A6 +F5A7 +F5A8 +F5A9 +F5AA +F5AB +F5AC +F5AD +F5AE +F5AF +F5B0 +F5B1 +F5B2 +F5B3 +F5B4 +F5B5 +F5B6 +F5B7 +F5B8 +F5B9 +F5BA +F5BB +F5BC +F5BD +F5BE +F5BF +F5C0 +F5C1 +F5C2 +F5C3 +F5C4 +F5C5 +F5C6 +F5C7 +F5C8 +F5C9 +F5CA +F5CB +F5CC +F5CD +F5CE +F5CF +F5D0 +F5D1 +F5D2 +F5D3 +F5D4 +F5D5 +F5D6 +F5D7 +F5D8 +F5D9 +F5DA +F5DB +F5DC +F5DD +F5DE +F5DF +F5E0 +F5E1 +F5E2 +F5E3 +F5E4 +F5E5 +F5E6 +F5E7 +F5E8 +F5E9 +F5EA +F5EB +F5EC +F5ED +F5EE +F5EF +F5F0 +F5F1 +F5F2 +F5F3 +F5F4 +F5F5 +F5F6 +F5F7 +F5F8 +F5F9 +F5FA +F5FB +F5FC +F640 +F641 +F642 +F643 +F644 +F645 +F646 +F647 +F648 +F649 +F64A +F64B +F64C +F64D +F64E +F64F +F650 +F651 +F652 +F653 +F654 +F655 +F656 +F657 +F658 +F659 +F65A +F65B +F65C +F65D +F65E +F65F +F660 +F661 +F662 +F663 +F664 +F665 +F666 +F667 +F668 +F669 +F66A +F66B +F66C +F66D +F66E +F66F +F670 +F671 +F672 +F673 +F674 +F675 +F676 +F677 +F678 +F679 +F67A +F67B +F67C +F67D +F67E +F680 +F681 +F682 +F683 +F684 +F685 +F686 +F687 +F688 +F689 +F68A +F68B +F68C +F68D +F68E +F68F +F690 +F691 +F692 +F693 +F694 +F695 +F696 +F697 +F698 +F699 +F69A +F69B +F69C +F69D +F69E +F69F +F6A0 +F6A1 +F6A2 +F6A3 +F6A4 +F6A5 +F6A6 +F6A7 +F6A8 +F6A9 +F6AA +F6AB +F6AC +F6AD +F6AE +F6AF +F6B0 +F6B1 +F6B2 +F6B3 +F6B4 +F6B5 +F6B6 +F6B7 +F6B8 +F6B9 +F6BA +F6BB +F6BC +F6BD +F6BE +F6BF +F6C0 +F6C1 +F6C2 +F6C3 +F6C4 +F6C5 +F6C6 +F6C7 +F6C8 +F6C9 +F6CA +F6CB +F6CC +F6CD +F6CE +F6CF +F6D0 +F6D1 +F6D2 +F6D3 +F6D4 +F6D5 +F6D6 +F6D7 +F6D8 +F6D9 +F6DA +F6DB +F6DC +F6DD +F6DE +F6DF +F6E0 +F6E1 +F6E2 +F6E3 +F6E4 +F6E5 +F6E6 +F6E7 +F6E8 +F6E9 +F6EA +F6EB +F6EC +F6ED +F6EE +F6EF +F6F0 +F6F1 +F6F2 +F6F3 +F6F4 +F6F5 +F6F6 +F6F7 +F6F8 +F6F9 +F6FA +F6FB +F6FC +F740 +F741 +F742 +F743 +F744 +F745 +F746 +F747 +F748 +F749 +F74A +F74B +F74C +F74D +F74E +F74F +F750 +F751 +F752 +F753 +F754 +F755 +F756 +F757 +F758 +F759 +F75A +F75B +F75C +F75D +F75E +F75F +F760 +F761 +F762 +F763 +F764 +F765 +F766 +F767 +F768 +F769 +F76A +F76B +F76C +F76D +F76E +F76F +F770 +F771 +F772 +F773 +F774 +F775 +F776 +F777 +F778 +F779 +F77A +F77B +F77C +F77D +F77E +F780 +F781 +F782 +F783 +F784 +F785 +F786 +F787 +F788 +F789 +F78A +F78B +F78C +F78D +F78E +F78F +F790 +F791 +F792 +F793 +F794 +F795 +F796 +F797 +F798 +F799 +F79A +F79B +F79C +F79D +F79E +F79F +F7A0 +F7A1 +F7A2 +F7A3 +F7A4 +F7A5 +F7A6 +F7A7 +F7A8 +F7A9 +F7AA +F7AB +F7AC +F7AD +F7AE +F7AF +F7B0 +F7B1 +F7B2 +F7B3 +F7B4 +F7B5 +F7B6 +F7B7 +F7B8 +F7B9 +F7BA +F7BB +F7BC +F7BD +F7BE +F7BF +F7C0 +F7C1 +F7C2 +F7C3 +F7C4 +F7C5 +F7C6 +F7C7 +F7C8 +F7C9 +F7CA +F7CB +F7CC +F7CD +F7CE +F7CF +F7D0 +F7D1 +F7D2 +F7D3 +F7D4 +F7D5 +F7D6 +F7D7 +F7D8 +F7D9 +F7DA +F7DB +F7DC +F7DD +F7DE +F7DF +F7E0 +F7E1 +F7E2 +F7E3 +F7E4 +F7E5 +F7E6 +F7E7 +F7E8 +F7E9 +F7EA +F7EB +F7EC +F7ED +F7EE +F7EF +F7F0 +F7F1 +F7F2 +F7F3 +F7F4 +F7F5 +F7F6 +F7F7 +F7F8 +F7F9 +F7FA +F7FB +F7FC +F840 +F841 +F842 +F843 +F844 +F845 +F846 +F847 +F848 +F849 +F84A +F84B +F84C +F84D +F84E +F84F +F850 +F851 +F852 +F853 +F854 +F855 +F856 +F857 +F858 +F859 +F85A +F85B +F85C +F85D +F85E +F85F +F860 +F861 +F862 +F863 +F864 +F865 +F866 +F867 +F868 +F869 +F86A +F86B +F86C +F86D +F86E +F86F +F870 +F871 +F872 +F873 +F874 +F875 +F876 +F877 +F878 +F879 +F87A +F87B +F87C +F87D +F87E +F880 +F881 +F882 +F883 +F884 +F885 +F886 +F887 +F888 +F889 +F88A +F88B +F88C +F88D +F88E +F88F +F890 +F891 +F892 +F893 +F894 +F895 +F896 +F897 +F898 +F899 +F89A +F89B +F89C +F89D +F89E +F89F +F8A0 +F8A1 +F8A2 +F8A3 +F8A4 +F8A5 +F8A6 +F8A7 +F8A8 +F8A9 +F8AA +F8AB +F8AC +F8AD +F8AE +F8AF +F8B0 +F8B1 +F8B2 +F8B3 +F8B4 +F8B5 +F8B6 +F8B7 +F8B8 +F8B9 +F8BA +F8BB +F8BC +F8BD +F8BE +F8BF +F8C0 +F8C1 +F8C2 +F8C3 +F8C4 +F8C5 +F8C6 +F8C7 +F8C8 +F8C9 +F8CA +F8CB +F8CC +F8CD +F8CE +F8CF +F8D0 +F8D1 +F8D2 +F8D3 +F8D4 +F8D5 +F8D6 +F8D7 +F8D8 +F8D9 +F8DA +F8DB +F8DC +F8DD +F8DE +F8DF +F8E0 +F8E1 +F8E2 +F8E3 +F8E4 +F8E5 +F8E6 +F8E7 +F8E8 +F8E9 +F8EA +F8EB +F8EC +F8ED +F8EE +F8EF +F8F0 +F8F1 +F8F2 +F8F3 +F8F4 +F8F5 +F8F6 +F8F7 +F8F8 +F8F9 +F8FA +F8FB +F8FC +F940 +F941 +F942 +F943 +F944 +F945 +F946 +F947 +F948 +F949 +F94A +F94B +F94C +F94D +F94E +F94F +F950 +F951 +F952 +F953 +F954 +F955 +F956 +F957 +F958 +F959 +F95A +F95B +F95C +F95D +F95E +F95F +F960 +F961 +F962 +F963 +F964 +F965 +F966 +F967 +F968 +F969 +F96A +F96B +F96C +F96D +F96E +F96F +F970 +F971 +F972 +F973 +F974 +F975 +F976 +F977 +F978 +F979 +F97A +F97B +F97C +F97D +F97E +F980 +F981 +F982 +F983 +F984 +F985 +F986 +F987 +F988 +F989 +F98A +F98B +F98C +F98D +F98E +F98F +F990 +F991 +F992 +F993 +F994 +F995 +F996 +F997 +F998 +F999 +F99A +F99B +F99C +F99D +F99E +F99F +F9A0 +F9A1 +F9A2 +F9A3 +F9A4 +F9A5 +F9A6 +F9A7 +F9A8 +F9A9 +F9AA +F9AB +F9AC +F9AD +F9AE +F9AF +F9B0 +F9B1 +F9B2 +F9B3 +F9B4 +F9B5 +F9B6 +F9B7 +F9B8 +F9B9 +F9BA +F9BB +F9BC +F9BD +F9BE +F9BF +F9C0 +F9C1 +F9C2 +F9C3 +F9C4 +F9C5 +F9C6 +F9C7 +F9C8 +F9C9 +F9CA +F9CB +F9CC +F9CD +F9CE +F9CF +F9D0 +F9D1 +F9D2 +F9D3 +F9D4 +F9D5 +F9D6 +F9D7 +F9D8 +F9D9 +F9DA +F9DB +F9DC +F9DD +F9DE +F9DF +F9E0 +F9E1 +F9E2 +F9E3 +F9E4 +F9E5 +F9E6 +F9E7 +F9E8 +F9E9 +F9EA +F9EB +F9EC +F9ED +F9EE +F9EF +F9F0 +F9F1 +F9F2 +F9F3 +F9F4 +F9F5 +F9F6 +F9F7 +F9F8 +F9F9 +F9FA +F9FB +F9FC +CREATE TABLE t4 SELECT CONVERT(c1 USING eucjpms) AS c1 FROM t1; +SELECT HEX(c1) FROM t4; +HEX(c1) +05 +7E +A1BD +A1C0 +A1C1 +A1C2 +A1DD +A1F1 +A1F2 +A2CC +ADA1 +ADA2 +ADA3 +ADA4 +ADA5 +ADA6 +ADA7 +ADA8 +ADA9 +ADAA +ADAB +ADAC +ADAD +ADAE +ADAF +ADB0 +ADB1 +ADB2 +ADB3 +ADB4 +ADB5 +ADB6 +ADB7 +ADB8 +ADB9 +ADBA +ADBB +ADBC +ADBD +ADBE +ADC0 +ADC1 +ADC2 +ADC3 +ADC4 +ADC5 +ADC6 +ADC7 +ADC8 +ADC9 +ADCA +ADCB +ADCC +ADCD +ADCE +ADCF +ADD0 +ADD1 +ADD2 +ADD3 +ADD4 +ADD5 +ADD6 +ADDF +ADE0 +ADE1 +ADE2 +ADE3 +ADE4 +ADE5 +ADE6 +ADE7 +ADE8 +ADE9 +ADEA +ADEB +ADEC +ADED +ADEE +ADEF +A2E2 +A2E1 +A2E9 +ADF3 +ADF4 +A2E5 +A2DD +A2DC +ADF8 +ADF9 +A2E8 +A2C1 +A2C0 +8FD4E3 +8FDCDF +8FE4E9 +8FE3F8 +8FD9A1 +8FB1BB +8FF4AE +8FC2AD +8FC3FC +8FE4D0 +8FC2BF +8FBCF4 +8FB0A9 +8FB0C8 +8FF4AF +8FB0D2 +8FB0D4 +8FB0E3 +8FB0EE +8FB1A7 +8FB1A3 +8FB1AC +8FB1A9 +8FB1BE +8FB1DF +8FB1D8 +8FB1C8 +8FB1D7 +8FB1E3 +8FB1F4 +8FB1E1 +8FB2A3 +8FF4B0 +8FB2BB +8FB2E6 +8FB2ED +8FB2F5 +8FB2FC +8FF4B1 +8FB3B5 +8FB3D8 +8FB3DB +8FB3E5 +8FB3EE +8FB3FB +8FF4B2 +8FF4B3 +8FB4C0 +8FB4C7 +8FB4D0 +8FB4DE +8FF4B4 +8FB5AA +8FF4B5 +8FB5AF +8FB5C4 +8FB5E8 +8FF4B6 +8FB7C2 +8FB7E4 +8FB7E8 +8FB7E7 +8FF4B7 +8FF4B8 +8FF4B9 +8FB8CE +8FB8E1 +8FB8F5 +8FB8F7 +8FB8F8 +8FB8FC +8FB9AF +8FB9B7 +8FBABE +8FBADB +8FCDAA +8FBAE1 +8FF4BA +8FBAEB +8FBBB3 +8FBBB8 +8FF4BB +8FBBCA +8FF4BC +8FF4BD +8FBBD0 +8FBBDE +8FBBF4 +8FBBF5 +8FBBF9 +8FBCE4 +8FBCED +8FBCFE +8FF4BE +8FBDC2 +8FBDE7 +8FF4BF +8FBDF0 +8FBEB0 +8FBEAC +8FF4C0 +8FBEB3 +8FBEBD +8FBECD +8FBEC9 +8FBEE4 +8FBFA8 +8FBFC9 +8FC0C4 +8FC0E4 +8FC0F4 +8FC1A6 +8FF4C1 +8FC1F5 +8FC1FC +8FF4C2 +8FC1F8 +8FC2AB +8FC2A1 +8FC2A5 +8FF4C3 +8FC2B8 +8FC2BA +8FF4C4 +8FC2C4 +8FC2D2 +8FC2D7 +8FC2DB +8FC2DE +8FC2ED +8FC2F0 +8FF4C5 +8FC3A1 +8FC3B5 +8FC3C9 +8FC3B9 +8FF4C6 +8FC3D8 +8FC3FE +8FF4C7 +8FC4CC +8FF4C8 +8FC4D9 +8FC4EA +8FC4FD +8FF4C9 +8FC5A7 +8FC5B5 +8FC5B6 +8FF4CA +8FC5D5 +8FC6B8 +8FC6D7 +8FC6E0 +8FC6EA +8FC6E3 +8FC7A1 +8FC7AB +8FC7C7 +8FC7C3 +8FC7CB +8FC7CF +8FC7D9 +8FF4CB +8FF4CC +8FC7E6 +8FC7EE +8FC7FC +8FC7EB +8FC7F0 +8FC8B1 +8FC8E5 +8FC8F8 +8FC9A6 +8FC9AB +8FC9AD +8FF4CD +8FC9CA +8FC9D3 +8FC9E9 +8FC9E3 +8FC9FC +8FC9F4 +8FC9F5 +8FF4CE +8FCAB3 +8FCABD +8FCAEF +8FCAF1 +8FCBAE +8FF4CF +8FCBCA +8FCBE6 +8FCBEA +8FCBF0 +8FCBF4 +8FCBEE +8FCCA5 +8FCBF9 +8FCCAB +8FCCAE +8FCCAD +8FCCB2 +8FCCC2 +8FCCD0 +8FCCD9 +8FF4D0 +8FCDBB +8FF4D1 +8FCEBB +8FF4D2 +8FCEBA +8FCEC3 +8FF4D3 +8FCEF2 +8FB3DD +8FCFD5 +8FCFE2 +8FCFE9 +8FCFED +8FF4D4 +8FF4D5 +8FF4D6 +8FF4D7 +8FD0E5 +8FF4D8 +8FD0E9 +8FD1E8 +8FF4D9 +8FF4DA +8FD1EC +8FD2BB +8FF4DB +8FD3E1 +8FD3E8 +8FD4A7 +8FF4DC +8FF4DD +8FD4D4 +8FD4F2 +8FD5AE +8FF4DE +8FD7DE +8FF4DF +8FD8A2 +8FD8B7 +8FD8C1 +8FD8D1 +8FD8F4 +8FD9C6 +8FD9C8 +8FD9D1 +8FF4E0 +8FF4E1 +8FF4E2 +8FF4E3 +8FF4E4 +8FDCD3 +8FDDC8 +8FDDD4 +8FDDEA +8FDDFA +8FDEA4 +8FDEB0 +8FF4E5 +8FDEB5 +8FDECB +8FF4E6 +8FDFB9 +8FF4E7 +8FDFC3 +8FF4E8 +8FF4E9 +8FE0D9 +8FF4EA +8FF4EB +8FE1E2 +8FF4EC +8FF4ED +8FF4EE +8FE2C7 +8FE3A8 +8FE3A6 +8FE3A9 +8FE3AF +8FE3B0 +8FE3AA +8FE3AB +8FE3BC +8FE3C1 +8FE3BF +8FE3D5 +8FE3D8 +8FE3D6 +8FE3DF +8FE3E3 +8FE3E1 +8FE3D4 +8FE3E9 +8FE4A6 +8FE3F1 +8FE3F2 +8FE4CB +8FE4C1 +8FE4C3 +8FE4BE +8FF4EF +8FE4C0 +8FE4C7 +8FE4BF +8FE4E0 +8FE4DE +8FE4D1 +8FF4F0 +8FE4DC +8FE4D2 +8FE4DB +8FE4D4 +8FE4FA +8FE4EF +8FE5B3 +8FE5BF +8FE5C9 +8FE5D0 +8FE5E2 +8FE5EA +8FE5EB +8FF4F1 +8FF4F2 +8FF4F3 +8FE6E8 +8FE6EF +8FE7AC +8FF4F4 +8FE7AE +8FF4F5 +8FE7B1 +8FF4F6 +8FE7B2 +8FE8B1 +8FE8B6 +8FF4F7 +8FF4F8 +8FE8DD +8FF4F9 +8FF4FA +8FE9D1 +8FF4FB +8FE9ED +8FEACD +8FF4FC +8FEADB +8FEAE6 +8FEAEA +8FEBA5 +8FEBFB +8FEBFA +8FF4FD +8FECD6 +8FF4FE +8FF3F3 +8FF3F4 +8FF3F5 +8FF3F6 +8FF3F7 +8FF3F8 +8FF3F9 +8FF3FA +8FF3FB +8FF3FC +A2CC +8FA2C3 +8FF4A9 +8FF4AA +8FF3F3 +8FF3F4 +8FF3F5 +8FF3F6 +8FF3F7 +8FF3F8 +8FF3F9 +8FF3FA +8FF3FB +8FF3FC +ADB5 +ADB6 +ADB7 +ADB8 +ADB9 +ADBA +ADBB +ADBC +ADBD +ADBE +A2CC +8FA2C3 +8FF4A9 +8FF4AA +ADEA +ADE2 +ADE4 +A2E8 +8FD4E3 +8FDCDF +8FE4E9 +8FE3F8 +8FD9A1 +8FB1BB +8FF4AE +8FC2AD +8FC3FC +8FE4D0 +8FC2BF +8FBCF4 +8FB0A9 +8FB0C8 +8FF4AF +8FB0D2 +8FB0D4 +8FB0E3 +8FB0EE +8FB1A7 +8FB1A3 +8FB1AC +8FB1A9 +8FB1BE +8FB1DF +8FB1D8 +8FB1C8 +8FB1D7 +8FB1E3 +8FB1F4 +8FB1E1 +8FB2A3 +8FF4B0 +8FB2BB +8FB2E6 +8FB2ED +8FB2F5 +8FB2FC +8FF4B1 +8FB3B5 +8FB3D8 +8FB3DB +8FB3E5 +8FB3EE +8FB3FB +8FF4B2 +8FF4B3 +8FB4C0 +8FB4C7 +8FB4D0 +8FB4DE +8FF4B4 +8FB5AA +8FF4B5 +8FB5AF +8FB5C4 +8FB5E8 +8FF4B6 +8FB7C2 +8FB7E4 +8FB7E8 +8FB7E7 +8FF4B7 +8FF4B8 +8FF4B9 +8FB8CE +8FB8E1 +8FB8F5 +8FB8F7 +8FB8F8 +8FB8FC +8FB9AF +8FB9B7 +8FBABE +8FBADB +8FCDAA +8FBAE1 +8FF4BA +8FBAEB +8FBBB3 +8FBBB8 +8FF4BB +8FBBCA +8FF4BC +8FF4BD +8FBBD0 +8FBBDE +8FBBF4 +8FBBF5 +8FBBF9 +8FBCE4 +8FBCED +8FBCFE +8FF4BE +8FBDC2 +8FBDE7 +8FF4BF +8FBDF0 +8FBEB0 +8FBEAC +8FF4C0 +8FBEB3 +8FBEBD +8FBECD +8FBEC9 +8FBEE4 +8FBFA8 +8FBFC9 +8FC0C4 +8FC0E4 +8FC0F4 +8FC1A6 +8FF4C1 +8FC1F5 +8FC1FC +8FF4C2 +8FC1F8 +8FC2AB +8FC2A1 +8FC2A5 +8FF4C3 +8FC2B8 +8FC2BA +8FF4C4 +8FC2C4 +8FC2D2 +8FC2D7 +8FC2DB +8FC2DE +8FC2ED +8FC2F0 +8FF4C5 +8FC3A1 +8FC3B5 +8FC3C9 +8FC3B9 +8FF4C6 +8FC3D8 +8FC3FE +8FF4C7 +8FC4CC +8FF4C8 +8FC4D9 +8FC4EA +8FC4FD +8FF4C9 +8FC5A7 +8FC5B5 +8FC5B6 +8FF4CA +8FC5D5 +8FC6B8 +8FC6D7 +8FC6E0 +8FC6EA +8FC6E3 +8FC7A1 +8FC7AB +8FC7C7 +8FC7C3 +8FC7CB +8FC7CF +8FC7D9 +8FF4CB +8FF4CC +8FC7E6 +8FC7EE +8FC7FC +8FC7EB +8FC7F0 +8FC8B1 +8FC8E5 +8FC8F8 +8FC9A6 +8FC9AB +8FC9AD +8FF4CD +8FC9CA +8FC9D3 +8FC9E9 +8FC9E3 +8FC9FC +8FC9F4 +8FC9F5 +8FF4CE +8FCAB3 +8FCABD +8FCAEF +8FCAF1 +8FCBAE +8FF4CF +8FCBCA +8FCBE6 +8FCBEA +8FCBF0 +8FCBF4 +8FCBEE +8FCCA5 +8FCBF9 +8FCCAB +8FCCAE +8FCCAD +8FCCB2 +8FCCC2 +8FCCD0 +8FCCD9 +8FF4D0 +8FCDBB +8FF4D1 +8FCEBB +8FF4D2 +8FCEBA +8FCEC3 +8FF4D3 +8FCEF2 +8FB3DD +8FCFD5 +8FCFE2 +8FCFE9 +8FCFED +8FF4D4 +8FF4D5 +8FF4D6 +8FF4D7 +8FD0E5 +8FF4D8 +8FD0E9 +8FD1E8 +8FF4D9 +8FF4DA +8FD1EC +8FD2BB +8FF4DB +8FD3E1 +8FD3E8 +8FD4A7 +8FF4DC +8FF4DD +8FD4D4 +8FD4F2 +8FD5AE +8FF4DE +8FD7DE +8FF4DF +8FD8A2 +8FD8B7 +8FD8C1 +8FD8D1 +8FD8F4 +8FD9C6 +8FD9C8 +8FD9D1 +8FF4E0 +8FF4E1 +8FF4E2 +8FF4E3 +8FF4E4 +8FDCD3 +8FDDC8 +8FDDD4 +8FDDEA +8FDDFA +8FDEA4 +8FDEB0 +8FF4E5 +8FDEB5 +8FDECB +8FF4E6 +8FDFB9 +8FF4E7 +8FDFC3 +8FF4E8 +8FF4E9 +8FE0D9 +8FF4EA +8FF4EB +8FE1E2 +8FF4EC +8FF4ED +8FF4EE +8FE2C7 +8FE3A8 +8FE3A6 +8FE3A9 +8FE3AF +8FE3B0 +8FE3AA +8FE3AB +8FE3BC +8FE3C1 +8FE3BF +8FE3D5 +8FE3D8 +8FE3D6 +8FE3DF +8FE3E3 +8FE3E1 +8FE3D4 +8FE3E9 +8FE4A6 +8FE3F1 +8FE3F2 +8FE4CB +8FE4C1 +8FE4C3 +8FE4BE +8FF4EF +8FE4C0 +8FE4C7 +8FE4BF +8FE4E0 +8FE4DE +8FE4D1 +8FF4F0 +8FE4DC +8FE4D2 +8FE4DB +8FE4D4 +8FE4FA +8FE4EF +8FE5B3 +8FE5BF +8FE5C9 +8FE5D0 +8FE5E2 +8FE5EA +8FE5EB +8FF4F1 +8FF4F2 +8FF4F3 +8FE6E8 +8FE6EF +8FE7AC +8FF4F4 +8FE7AE +8FF4F5 +8FE7B1 +8FF4F6 +8FE7B2 +8FE8B1 +8FE8B6 +8FF4F7 +8FF4F8 +8FE8DD +8FF4F9 +8FF4FA +8FE9D1 +8FF4FB +8FE9ED +8FEACD +8FF4FC +8FEADB +8FEAE6 +8FEAEA +8FEBA5 +8FEBFB +8FEBFA +8FF4FD +8FECD6 +8FF4FE +F5A1 +F5A2 +F5A3 +F5A4 +F5A5 +F5A6 +F5A7 +F5A8 +F5A9 +F5AA +F5AB +F5AC +F5AD +F5AE +F5AF +F5B0 +F5B1 +F5B2 +F5B3 +F5B4 +F5B5 +F5B6 +F5B7 +F5B8 +F5B9 +F5BA +F5BB +F5BC +F5BD +F5BE +F5BF +F5C0 +F5C1 +F5C2 +F5C3 +F5C4 +F5C5 +F5C6 +F5C7 +F5C8 +F5C9 +F5CA +F5CB +F5CC +F5CD +F5CE +F5CF +F5D0 +F5D1 +F5D2 +F5D3 +F5D4 +F5D5 +F5D6 +F5D7 +F5D8 +F5D9 +F5DA +F5DB +F5DC +F5DD +F5DE +F5DF +F5E0 +F5E1 +F5E2 +F5E3 +F5E4 +F5E5 +F5E6 +F5E7 +F5E8 +F5E9 +F5EA +F5EB +F5EC +F5ED +F5EE +F5EF +F5F0 +F5F1 +F5F2 +F5F3 +F5F4 +F5F5 +F5F6 +F5F7 +F5F8 +F5F9 +F5FA +F5FB +F5FC +F5FD +F5FE +F6A1 +F6A2 +F6A3 +F6A4 +F6A5 +F6A6 +F6A7 +F6A8 +F6A9 +F6AA +F6AB +F6AC +F6AD +F6AE +F6AF +F6B0 +F6B1 +F6B2 +F6B3 +F6B4 +F6B5 +F6B6 +F6B7 +F6B8 +F6B9 +F6BA +F6BB +F6BC +F6BD +F6BE +F6BF +F6C0 +F6C1 +F6C2 +F6C3 +F6C4 +F6C5 +F6C6 +F6C7 +F6C8 +F6C9 +F6CA +F6CB +F6CC +F6CD +F6CE +F6CF +F6D0 +F6D1 +F6D2 +F6D3 +F6D4 +F6D5 +F6D6 +F6D7 +F6D8 +F6D9 +F6DA +F6DB +F6DC +F6DD +F6DE +F6DF +F6E0 +F6E1 +F6E2 +F6E3 +F6E4 +F6E5 +F6E6 +F6E7 +F6E8 +F6E9 +F6EA +F6EB +F6EC +F6ED +F6EE +F6EF +F6F0 +F6F1 +F6F2 +F6F3 +F6F4 +F6F5 +F6F6 +F6F7 +F6F8 +F6F9 +F6FA +F6FB +F6FC +F6FD +F6FE +F7A1 +F7A2 +F7A3 +F7A4 +F7A5 +F7A6 +F7A7 +F7A8 +F7A9 +F7AA +F7AB +F7AC +F7AD +F7AE +F7AF +F7B0 +F7B1 +F7B2 +F7B3 +F7B4 +F7B5 +F7B6 +F7B7 +F7B8 +F7B9 +F7BA +F7BB +F7BC +F7BD +F7BE +F7BF +F7C0 +F7C1 +F7C2 +F7C3 +F7C4 +F7C5 +F7C6 +F7C7 +F7C8 +F7C9 +F7CA +F7CB +F7CC +F7CD +F7CE +F7CF +F7D0 +F7D1 +F7D2 +F7D3 +F7D4 +F7D5 +F7D6 +F7D7 +F7D8 +F7D9 +F7DA +F7DB +F7DC +F7DD +F7DE +F7DF +F7E0 +F7E1 +F7E2 +F7E3 +F7E4 +F7E5 +F7E6 +F7E7 +F7E8 +F7E9 +F7EA +F7EB +F7EC +F7ED +F7EE +F7EF +F7F0 +F7F1 +F7F2 +F7F3 +F7F4 +F7F5 +F7F6 +F7F7 +F7F8 +F7F9 +F7FA +F7FB +F7FC +F7FD +F7FE +F8A1 +F8A2 +F8A3 +F8A4 +F8A5 +F8A6 +F8A7 +F8A8 +F8A9 +F8AA +F8AB +F8AC +F8AD +F8AE +F8AF +F8B0 +F8B1 +F8B2 +F8B3 +F8B4 +F8B5 +F8B6 +F8B7 +F8B8 +F8B9 +F8BA +F8BB +F8BC +F8BD +F8BE +F8BF +F8C0 +F8C1 +F8C2 +F8C3 +F8C4 +F8C5 +F8C6 +F8C7 +F8C8 +F8C9 +F8CA +F8CB +F8CC +F8CD +F8CE +F8CF +F8D0 +F8D1 +F8D2 +F8D3 +F8D4 +F8D5 +F8D6 +F8D7 +F8D8 +F8D9 +F8DA +F8DB +F8DC +F8DD +F8DE +F8DF +F8E0 +F8E1 +F8E2 +F8E3 +F8E4 +F8E5 +F8E6 +F8E7 +F8E8 +F8E9 +F8EA +F8EB +F8EC +F8ED +F8EE +F8EF +F8F0 +F8F1 +F8F2 +F8F3 +F8F4 +F8F5 +F8F6 +F8F7 +F8F8 +F8F9 +F8FA +F8FB +F8FC +F8FD +F8FE +F9A1 +F9A2 +F9A3 +F9A4 +F9A5 +F9A6 +F9A7 +F9A8 +F9A9 +F9AA +F9AB +F9AC +F9AD +F9AE +F9AF +F9B0 +F9B1 +F9B2 +F9B3 +F9B4 +F9B5 +F9B6 +F9B7 +F9B8 +F9B9 +F9BA +F9BB +F9BC +F9BD +F9BE +F9BF +F9C0 +F9C1 +F9C2 +F9C3 +F9C4 +F9C5 +F9C6 +F9C7 +F9C8 +F9C9 +F9CA +F9CB +F9CC +F9CD +F9CE +F9CF +F9D0 +F9D1 +F9D2 +F9D3 +F9D4 +F9D5 +F9D6 +F9D7 +F9D8 +F9D9 +F9DA +F9DB +F9DC +F9DD +F9DE +F9DF +F9E0 +F9E1 +F9E2 +F9E3 +F9E4 +F9E5 +F9E6 +F9E7 +F9E8 +F9E9 +F9EA +F9EB +F9EC +F9ED +F9EE +F9EF +F9F0 +F9F1 +F9F2 +F9F3 +F9F4 +F9F5 +F9F6 +F9F7 +F9F8 +F9F9 +F9FA +F9FB +F9FC +F9FD +F9FE +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FAFD +FAFE +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FBFD +FBFE +FCA1 +FCA2 +FCA3 +FCA4 +FCA5 +FCA6 +FCA7 +FCA8 +FCA9 +FCAA +FCAB +FCAC +FCAD +FCAE +FCAF +FCB0 +FCB1 +FCB2 +FCB3 +FCB4 +FCB5 +FCB6 +FCB7 +FCB8 +FCB9 +FCBA +FCBB +FCBC +FCBD +FCBE +FCBF +FCC0 +FCC1 +FCC2 +FCC3 +FCC4 +FCC5 +FCC6 +FCC7 +FCC8 +FCC9 +FCCA +FCCB +FCCC +FCCD +FCCE +FCCF +FCD0 +FCD1 +FCD2 +FCD3 +FCD4 +FCD5 +FCD6 +FCD7 +FCD8 +FCD9 +FCDA +FCDB +FCDC +FCDD +FCDE +FCDF +FCE0 +FCE1 +FCE2 +FCE3 +FCE4 +FCE5 +FCE6 +FCE7 +FCE8 +FCE9 +FCEA +FCEB +FCEC +FCED +FCEE +FCEF +FCF0 +FCF1 +FCF2 +FCF3 +FCF4 +FCF5 +FCF6 +FCF7 +FCF8 +FCF9 +FCFA +FCFB +FCFC +FCFD +FCFE +FDA1 +FDA2 +FDA3 +FDA4 +FDA5 +FDA6 +FDA7 +FDA8 +FDA9 +FDAA +FDAB +FDAC +FDAD +FDAE +FDAF +FDB0 +FDB1 +FDB2 +FDB3 +FDB4 +FDB5 +FDB6 +FDB7 +FDB8 +FDB9 +FDBA +FDBB +FDBC +FDBD +FDBE +FDBF +FDC0 +FDC1 +FDC2 +FDC3 +FDC4 +FDC5 +FDC6 +FDC7 +FDC8 +FDC9 +FDCA +FDCB +FDCC +FDCD +FDCE +FDCF +FDD0 +FDD1 +FDD2 +FDD3 +FDD4 +FDD5 +FDD6 +FDD7 +FDD8 +FDD9 +FDDA +FDDB +FDDC +FDDD +FDDE +FDDF +FDE0 +FDE1 +FDE2 +FDE3 +FDE4 +FDE5 +FDE6 +FDE7 +FDE8 +FDE9 +FDEA +FDEB +FDEC +FDED +FDEE +FDEF +FDF0 +FDF1 +FDF2 +FDF3 +FDF4 +FDF5 +FDF6 +FDF7 +FDF8 +FDF9 +FDFA +FDFB +FDFC +FDFD +FDFE +FEA1 +FEA2 +FEA3 +FEA4 +FEA5 +FEA6 +FEA7 +FEA8 +FEA9 +FEAA +FEAB +FEAC +FEAD +FEAE +FEAF +FEB0 +FEB1 +FEB2 +FEB3 +FEB4 +FEB5 +FEB6 +FEB7 +FEB8 +FEB9 +FEBA +FEBB +FEBC +FEBD +FEBE +FEBF +FEC0 +FEC1 +FEC2 +FEC3 +FEC4 +FEC5 +FEC6 +FEC7 +FEC8 +FEC9 +FECA +FECB +FECC +FECD +FECE +FECF +FED0 +FED1 +FED2 +FED3 +FED4 +FED5 +FED6 +FED7 +FED8 +FED9 +FEDA +FEDB +FEDC +FEDD +FEDE +FEDF +FEE0 +FEE1 +FEE2 +FEE3 +FEE4 +FEE5 +FEE6 +FEE7 +FEE8 +FEE9 +FEEA +FEEB +FEEC +FEED +FEEE +FEEF +FEF0 +FEF1 +FEF2 +FEF3 +FEF4 +FEF5 +FEF6 +FEF7 +FEF8 +FEF9 +FEFA +FEFB +FEFC +FEFD +FEFE +8FF5A1 +8FF5A2 +8FF5A3 +8FF5A4 +8FF5A5 +8FF5A6 +8FF5A7 +8FF5A8 +8FF5A9 +8FF5AA +8FF5AB +8FF5AC +8FF5AD +8FF5AE +8FF5AF +8FF5B0 +8FF5B1 +8FF5B2 +8FF5B3 +8FF5B4 +8FF5B5 +8FF5B6 +8FF5B7 +8FF5B8 +8FF5B9 +8FF5BA +8FF5BB +8FF5BC +8FF5BD +8FF5BE +8FF5BF +8FF5C0 +8FF5C1 +8FF5C2 +8FF5C3 +8FF5C4 +8FF5C5 +8FF5C6 +8FF5C7 +8FF5C8 +8FF5C9 +8FF5CA +8FF5CB +8FF5CC +8FF5CD +8FF5CE +8FF5CF +8FF5D0 +8FF5D1 +8FF5D2 +8FF5D3 +8FF5D4 +8FF5D5 +8FF5D6 +8FF5D7 +8FF5D8 +8FF5D9 +8FF5DA +8FF5DB +8FF5DC +8FF5DD +8FF5DE +8FF5DF +8FF5E0 +8FF5E1 +8FF5E2 +8FF5E3 +8FF5E4 +8FF5E5 +8FF5E6 +8FF5E7 +8FF5E8 +8FF5E9 +8FF5EA +8FF5EB +8FF5EC +8FF5ED +8FF5EE +8FF5EF +8FF5F0 +8FF5F1 +8FF5F2 +8FF5F3 +8FF5F4 +8FF5F5 +8FF5F6 +8FF5F7 +8FF5F8 +8FF5F9 +8FF5FA +8FF5FB +8FF5FC +8FF5FD +8FF5FE +8FF6A1 +8FF6A2 +8FF6A3 +8FF6A4 +8FF6A5 +8FF6A6 +8FF6A7 +8FF6A8 +8FF6A9 +8FF6AA +8FF6AB +8FF6AC +8FF6AD +8FF6AE +8FF6AF +8FF6B0 +8FF6B1 +8FF6B2 +8FF6B3 +8FF6B4 +8FF6B5 +8FF6B6 +8FF6B7 +8FF6B8 +8FF6B9 +8FF6BA +8FF6BB +8FF6BC +8FF6BD +8FF6BE +8FF6BF +8FF6C0 +8FF6C1 +8FF6C2 +8FF6C3 +8FF6C4 +8FF6C5 +8FF6C6 +8FF6C7 +8FF6C8 +8FF6C9 +8FF6CA +8FF6CB +8FF6CC +8FF6CD +8FF6CE +8FF6CF +8FF6D0 +8FF6D1 +8FF6D2 +8FF6D3 +8FF6D4 +8FF6D5 +8FF6D6 +8FF6D7 +8FF6D8 +8FF6D9 +8FF6DA +8FF6DB +8FF6DC +8FF6DD +8FF6DE +8FF6DF +8FF6E0 +8FF6E1 +8FF6E2 +8FF6E3 +8FF6E4 +8FF6E5 +8FF6E6 +8FF6E7 +8FF6E8 +8FF6E9 +8FF6EA +8FF6EB +8FF6EC +8FF6ED +8FF6EE +8FF6EF +8FF6F0 +8FF6F1 +8FF6F2 +8FF6F3 +8FF6F4 +8FF6F5 +8FF6F6 +8FF6F7 +8FF6F8 +8FF6F9 +8FF6FA +8FF6FB +8FF6FC +8FF6FD +8FF6FE +8FF7A1 +8FF7A2 +8FF7A3 +8FF7A4 +8FF7A5 +8FF7A6 +8FF7A7 +8FF7A8 +8FF7A9 +8FF7AA +8FF7AB +8FF7AC +8FF7AD +8FF7AE +8FF7AF +8FF7B0 +8FF7B1 +8FF7B2 +8FF7B3 +8FF7B4 +8FF7B5 +8FF7B6 +8FF7B7 +8FF7B8 +8FF7B9 +8FF7BA +8FF7BB +8FF7BC +8FF7BD +8FF7BE +8FF7BF +8FF7C0 +8FF7C1 +8FF7C2 +8FF7C3 +8FF7C4 +8FF7C5 +8FF7C6 +8FF7C7 +8FF7C8 +8FF7C9 +8FF7CA +8FF7CB +8FF7CC +8FF7CD +8FF7CE +8FF7CF +8FF7D0 +8FF7D1 +8FF7D2 +8FF7D3 +8FF7D4 +8FF7D5 +8FF7D6 +8FF7D7 +8FF7D8 +8FF7D9 +8FF7DA +8FF7DB +8FF7DC +8FF7DD +8FF7DE +8FF7DF +8FF7E0 +8FF7E1 +8FF7E2 +8FF7E3 +8FF7E4 +8FF7E5 +8FF7E6 +8FF7E7 +8FF7E8 +8FF7E9 +8FF7EA +8FF7EB +8FF7EC +8FF7ED +8FF7EE +8FF7EF +8FF7F0 +8FF7F1 +8FF7F2 +8FF7F3 +8FF7F4 +8FF7F5 +8FF7F6 +8FF7F7 +8FF7F8 +8FF7F9 +8FF7FA +8FF7FB +8FF7FC +8FF7FD +8FF7FE +8FF8A1 +8FF8A2 +8FF8A3 +8FF8A4 +8FF8A5 +8FF8A6 +8FF8A7 +8FF8A8 +8FF8A9 +8FF8AA +8FF8AB +8FF8AC +8FF8AD +8FF8AE +8FF8AF +8FF8B0 +8FF8B1 +8FF8B2 +8FF8B3 +8FF8B4 +8FF8B5 +8FF8B6 +8FF8B7 +8FF8B8 +8FF8B9 +8FF8BA +8FF8BB +8FF8BC +8FF8BD +8FF8BE +8FF8BF +8FF8C0 +8FF8C1 +8FF8C2 +8FF8C3 +8FF8C4 +8FF8C5 +8FF8C6 +8FF8C7 +8FF8C8 +8FF8C9 +8FF8CA +8FF8CB +8FF8CC +8FF8CD +8FF8CE +8FF8CF +8FF8D0 +8FF8D1 +8FF8D2 +8FF8D3 +8FF8D4 +8FF8D5 +8FF8D6 +8FF8D7 +8FF8D8 +8FF8D9 +8FF8DA +8FF8DB +8FF8DC +8FF8DD +8FF8DE +8FF8DF +8FF8E0 +8FF8E1 +8FF8E2 +8FF8E3 +8FF8E4 +8FF8E5 +8FF8E6 +8FF8E7 +8FF8E8 +8FF8E9 +8FF8EA +8FF8EB +8FF8EC +8FF8ED +8FF8EE +8FF8EF +8FF8F0 +8FF8F1 +8FF8F2 +8FF8F3 +8FF8F4 +8FF8F5 +8FF8F6 +8FF8F7 +8FF8F8 +8FF8F9 +8FF8FA +8FF8FB +8FF8FC +8FF8FD +8FF8FE +8FF9A1 +8FF9A2 +8FF9A3 +8FF9A4 +8FF9A5 +8FF9A6 +8FF9A7 +8FF9A8 +8FF9A9 +8FF9AA +8FF9AB +8FF9AC +8FF9AD +8FF9AE +8FF9AF +8FF9B0 +8FF9B1 +8FF9B2 +8FF9B3 +8FF9B4 +8FF9B5 +8FF9B6 +8FF9B7 +8FF9B8 +8FF9B9 +8FF9BA +8FF9BB +8FF9BC +8FF9BD +8FF9BE +8FF9BF +8FF9C0 +8FF9C1 +8FF9C2 +8FF9C3 +8FF9C4 +8FF9C5 +8FF9C6 +8FF9C7 +8FF9C8 +8FF9C9 +8FF9CA +8FF9CB +8FF9CC +8FF9CD +8FF9CE +8FF9CF +8FF9D0 +8FF9D1 +8FF9D2 +8FF9D3 +8FF9D4 +8FF9D5 +8FF9D6 +8FF9D7 +8FF9D8 +8FF9D9 +8FF9DA +8FF9DB +8FF9DC +8FF9DD +8FF9DE +8FF9DF +8FF9E0 +8FF9E1 +8FF9E2 +8FF9E3 +8FF9E4 +8FF9E5 +8FF9E6 +8FF9E7 +8FF9E8 +8FF9E9 +8FF9EA +8FF9EB +8FF9EC +8FF9ED +8FF9EE +8FF9EF +8FF9F0 +8FF9F1 +8FF9F2 +8FF9F3 +8FF9F4 +8FF9F5 +8FF9F6 +8FF9F7 +8FF9F8 +8FF9F9 +8FF9FA +8FF9FB +8FF9FC +8FF9FD +8FF9FE +8FFAA1 +8FFAA2 +8FFAA3 +8FFAA4 +8FFAA5 +8FFAA6 +8FFAA7 +8FFAA8 +8FFAA9 +8FFAAA +8FFAAB +8FFAAC +8FFAAD +8FFAAE +8FFAAF +8FFAB0 +8FFAB1 +8FFAB2 +8FFAB3 +8FFAB4 +8FFAB5 +8FFAB6 +8FFAB7 +8FFAB8 +8FFAB9 +8FFABA +8FFABB +8FFABC +8FFABD +8FFABE +8FFABF +8FFAC0 +8FFAC1 +8FFAC2 +8FFAC3 +8FFAC4 +8FFAC5 +8FFAC6 +8FFAC7 +8FFAC8 +8FFAC9 +8FFACA +8FFACB +8FFACC +8FFACD +8FFACE +8FFACF +8FFAD0 +8FFAD1 +8FFAD2 +8FFAD3 +8FFAD4 +8FFAD5 +8FFAD6 +8FFAD7 +8FFAD8 +8FFAD9 +8FFADA +8FFADB +8FFADC +8FFADD +8FFADE +8FFADF +8FFAE0 +8FFAE1 +8FFAE2 +8FFAE3 +8FFAE4 +8FFAE5 +8FFAE6 +8FFAE7 +8FFAE8 +8FFAE9 +8FFAEA +8FFAEB +8FFAEC +8FFAED +8FFAEE +8FFAEF +8FFAF0 +8FFAF1 +8FFAF2 +8FFAF3 +8FFAF4 +8FFAF5 +8FFAF6 +8FFAF7 +8FFAF8 +8FFAF9 +8FFAFA +8FFAFB +8FFAFC +8FFAFD +8FFAFE +8FFBA1 +8FFBA2 +8FFBA3 +8FFBA4 +8FFBA5 +8FFBA6 +8FFBA7 +8FFBA8 +8FFBA9 +8FFBAA +8FFBAB +8FFBAC +8FFBAD +8FFBAE +8FFBAF +8FFBB0 +8FFBB1 +8FFBB2 +8FFBB3 +8FFBB4 +8FFBB5 +8FFBB6 +8FFBB7 +8FFBB8 +8FFBB9 +8FFBBA +8FFBBB +8FFBBC +8FFBBD +8FFBBE +8FFBBF +8FFBC0 +8FFBC1 +8FFBC2 +8FFBC3 +8FFBC4 +8FFBC5 +8FFBC6 +8FFBC7 +8FFBC8 +8FFBC9 +8FFBCA +8FFBCB +8FFBCC +8FFBCD +8FFBCE +8FFBCF +8FFBD0 +8FFBD1 +8FFBD2 +8FFBD3 +8FFBD4 +8FFBD5 +8FFBD6 +8FFBD7 +8FFBD8 +8FFBD9 +8FFBDA +8FFBDB +8FFBDC +8FFBDD +8FFBDE +8FFBDF +8FFBE0 +8FFBE1 +8FFBE2 +8FFBE3 +8FFBE4 +8FFBE5 +8FFBE6 +8FFBE7 +8FFBE8 +8FFBE9 +8FFBEA +8FFBEB +8FFBEC +8FFBED +8FFBEE +8FFBEF +8FFBF0 +8FFBF1 +8FFBF2 +8FFBF3 +8FFBF4 +8FFBF5 +8FFBF6 +8FFBF7 +8FFBF8 +8FFBF9 +8FFBFA +8FFBFB +8FFBFC +8FFBFD +8FFBFE +8FFCA1 +8FFCA2 +8FFCA3 +8FFCA4 +8FFCA5 +8FFCA6 +8FFCA7 +8FFCA8 +8FFCA9 +8FFCAA +8FFCAB +8FFCAC +8FFCAD +8FFCAE +8FFCAF +8FFCB0 +8FFCB1 +8FFCB2 +8FFCB3 +8FFCB4 +8FFCB5 +8FFCB6 +8FFCB7 +8FFCB8 +8FFCB9 +8FFCBA +8FFCBB +8FFCBC +8FFCBD +8FFCBE +8FFCBF +8FFCC0 +8FFCC1 +8FFCC2 +8FFCC3 +8FFCC4 +8FFCC5 +8FFCC6 +8FFCC7 +8FFCC8 +8FFCC9 +8FFCCA +8FFCCB +8FFCCC +8FFCCD +8FFCCE +8FFCCF +8FFCD0 +8FFCD1 +8FFCD2 +8FFCD3 +8FFCD4 +8FFCD5 +8FFCD6 +8FFCD7 +8FFCD8 +8FFCD9 +8FFCDA +8FFCDB +8FFCDC +8FFCDD +8FFCDE +8FFCDF +8FFCE0 +8FFCE1 +8FFCE2 +8FFCE3 +8FFCE4 +8FFCE5 +8FFCE6 +8FFCE7 +8FFCE8 +8FFCE9 +8FFCEA +8FFCEB +8FFCEC +8FFCED +8FFCEE +8FFCEF +8FFCF0 +8FFCF1 +8FFCF2 +8FFCF3 +8FFCF4 +8FFCF5 +8FFCF6 +8FFCF7 +8FFCF8 +8FFCF9 +8FFCFA +8FFCFB +8FFCFC +8FFCFD +8FFCFE +8FFDA1 +8FFDA2 +8FFDA3 +8FFDA4 +8FFDA5 +8FFDA6 +8FFDA7 +8FFDA8 +8FFDA9 +8FFDAA +8FFDAB +8FFDAC +8FFDAD +8FFDAE +8FFDAF +8FFDB0 +8FFDB1 +8FFDB2 +8FFDB3 +8FFDB4 +8FFDB5 +8FFDB6 +8FFDB7 +8FFDB8 +8FFDB9 +8FFDBA +8FFDBB +8FFDBC +8FFDBD +8FFDBE +8FFDBF +8FFDC0 +8FFDC1 +8FFDC2 +8FFDC3 +8FFDC4 +8FFDC5 +8FFDC6 +8FFDC7 +8FFDC8 +8FFDC9 +8FFDCA +8FFDCB +8FFDCC +8FFDCD +8FFDCE +8FFDCF +8FFDD0 +8FFDD1 +8FFDD2 +8FFDD3 +8FFDD4 +8FFDD5 +8FFDD6 +8FFDD7 +8FFDD8 +8FFDD9 +8FFDDA +8FFDDB +8FFDDC +8FFDDD +8FFDDE +8FFDDF +8FFDE0 +8FFDE1 +8FFDE2 +8FFDE3 +8FFDE4 +8FFDE5 +8FFDE6 +8FFDE7 +8FFDE8 +8FFDE9 +8FFDEA +8FFDEB +8FFDEC +8FFDED +8FFDEE +8FFDEF +8FFDF0 +8FFDF1 +8FFDF2 +8FFDF3 +8FFDF4 +8FFDF5 +8FFDF6 +8FFDF7 +8FFDF8 +8FFDF9 +8FFDFA +8FFDFB +8FFDFC +8FFDFD +8FFDFE +8FFEA1 +8FFEA2 +8FFEA3 +8FFEA4 +8FFEA5 +8FFEA6 +8FFEA7 +8FFEA8 +8FFEA9 +8FFEAA +8FFEAB +8FFEAC +8FFEAD +8FFEAE +8FFEAF +8FFEB0 +8FFEB1 +8FFEB2 +8FFEB3 +8FFEB4 +8FFEB5 +8FFEB6 +8FFEB7 +8FFEB8 +8FFEB9 +8FFEBA +8FFEBB +8FFEBC +8FFEBD +8FFEBE +8FFEBF +8FFEC0 +8FFEC1 +8FFEC2 +8FFEC3 +8FFEC4 +8FFEC5 +8FFEC6 +8FFEC7 +8FFEC8 +8FFEC9 +8FFECA +8FFECB +8FFECC +8FFECD +8FFECE +8FFECF +8FFED0 +8FFED1 +8FFED2 +8FFED3 +8FFED4 +8FFED5 +8FFED6 +8FFED7 +8FFED8 +8FFED9 +8FFEDA +8FFEDB +8FFEDC +8FFEDD +8FFEDE +8FFEDF +8FFEE0 +8FFEE1 +8FFEE2 +8FFEE3 +8FFEE4 +8FFEE5 +8FFEE6 +8FFEE7 +8FFEE8 +8FFEE9 +8FFEEA +8FFEEB +8FFEEC +8FFEED +8FFEEE +8FFEEF +8FFEF0 +8FFEF1 +8FFEF2 +8FFEF3 +8FFEF4 +8FFEF5 +8FFEF6 +8FFEF7 +8FFEF8 +8FFEF9 +8FFEFA +8FFEFB +8FFEFC +8FFEFD +8FFEFE +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE t4; +SET collation_connection='cp932_japanese_ci'; +create table t1 select repeat('a',4000) a; +delete from t1; +insert into t1 values ('a'), ('a '), ('a\t'); +select collation(a),hex(a) from t1 order by a; +collation(a) hex(a) +cp932_japanese_ci 6109 +cp932_japanese_ci 61 +cp932_japanese_ci 6120 +drop table t1; +SET collation_connection='cp932_bin'; +create table t1 select repeat('a',4000) a; +delete from t1; +insert into t1 values ('a'), ('a '), ('a\t'); +select collation(a),hex(a) from t1 order by a; +collation(a) hex(a) +cp932_bin 6109 +cp932_bin 61 +cp932_bin 6120 +drop table t1; +create table t1 (col1 varchar(1)) character set cp932; +insert into t1 values ('a'); +insert into t1 values ('ab'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +select * from t1; +col1 +a +a +insert into t1 values ('abc'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +select * from t1; +col1 +a +a +a +drop table t1; +set names utf8; +create table t1 (a text) default character set cp932; +insert into t1 values (_utf8 0xE38182); +show warnings; +Level Code Message +select * from t1; +a +ã‚ +select hex(a) from t1; +hex(a) +82A0 +drop table t1; +ƒ\ +ƒ\ +c_cp932 +ƒ\ +ƒ\ +ƒ\ +ソ +ソ +ƒ\ +ƒ\ diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result new file mode 100644 index 00000000000..c789c618876 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result @@ -0,0 +1,27 @@ +SET TIMESTAMP=10000; +create table t2 (c char(30)) charset=ucs2; +set @v=convert('abc' using ucs2); +reset master; +insert into t2 values (@v); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # User var # # @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci +master-bin.000001 # Query # # use `test`; insert into t2 values (@v) +flush logs; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`/*!*/; +use test/*!*/; +SET TIMESTAMP=10000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t2 values (@v)/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +drop table t2; diff --git a/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result new file mode 100644 index 00000000000..dc4349dea59 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result @@ -0,0 +1,21 @@ +drop database if exists `drop-temp+table-test`; +reset master; +create database `drop-temp+table-test`; +use `drop-temp+table-test`; +create temporary table shortn1 (a int); +create temporary table `table:name` (a int); +create temporary table shortn2 (a int); +select get_lock("a",10); +get_lock("a",10) +1 +select get_lock("a",10); +get_lock("a",10) +1 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # create database `drop-temp+table-test` +master-bin.000001 # Query # # use `drop-temp+table-test`; create temporary table shortn1 (a int) +master-bin.000001 # Query # # use `drop-temp+table-test`; create temporary table `table:name` (a int) +master-bin.000001 # Query # # use `drop-temp+table-test`; create temporary table shortn2 (a int) +master-bin.000001 # Query # # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`,`drop-temp+table-test`.`table:name`,`drop-temp+table-test`.`shortn1` +drop database `drop-temp+table-test`; diff --git a/mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result b/mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result new file mode 100644 index 00000000000..e6813ee2719 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result @@ -0,0 +1,39 @@ +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 0 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 0 +drop table if exists t1; +create table t1 (a int) engine=innodb; +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 1 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 1 +begin; +delete from t1; +commit; +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 2 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 1 +drop table t1; +show status like "Innodb_buffer_pool_pages_total"; +Variable_name Value +Innodb_buffer_pool_pages_total 512 +show status like "Innodb_page_size"; +Variable_name Value +Innodb_page_size 16384 +show status like "Innodb_rows_deleted"; +Variable_name Value +Innodb_rows_deleted 2000 +show status like "Innodb_rows_inserted"; +Variable_name Value +Innodb_rows_inserted 2000 +show status like "Innodb_rows_updated"; +Variable_name Value +Innodb_rows_updated 0 diff --git a/mysql-test/suite/binlog/r/binlog_stm_insert_select.result b/mysql-test/suite/binlog/r/binlog_stm_insert_select.result new file mode 100644 index 00000000000..a93a8edf4aa --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_stm_insert_select.result @@ -0,0 +1,24 @@ +drop table if exists t1,t2; +create table t1(a int, unique(a)); +insert into t1 values(2); +create table t2(a int); +insert into t2 values(1),(2); +reset master; +insert into t1 select * from t2; +ERROR 23000: Duplicate entry '2' for key 'a' +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; insert into t1 select * from t2 +select * from t1; +a +1 +2 +drop table t1, t2; +create table t1(a int); +insert into t1 values(1),(1); +reset master; +create table t2(unique(a)) select a from t1; +ERROR 23000: Duplicate entry '1' for key 'a' +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +drop table t1; diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result new file mode 100644 index 00000000000..c74fb17d600 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result @@ -0,0 +1,382 @@ +drop table if exists t1, t2; +create table t1 (a int) engine=innodb; +create table t2 (a int) engine=myisam; +reset master; +begin; +insert into t1 values(1); +insert into t2 select * from t1; +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(1) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(2); +insert into t2 select * from t1; +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(2) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; ROLLBACK +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(3); +savepoint my_savepoint; +insert into t1 values(4); +insert into t2 select * from t1; +rollback to savepoint my_savepoint; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(3) +master-bin.000001 # Query # # use `test`; savepoint my_savepoint +master-bin.000001 # Query # # use `test`; insert into t1 values(4) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; rollback to savepoint my_savepoint +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(5); +savepoint my_savepoint; +insert into t1 values(6); +insert into t2 select * from t1; +rollback to savepoint my_savepoint; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +insert into t1 values(7); +commit; +select a from t1 order by a; +a +5 +7 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(5) +master-bin.000001 # Query # # use `test`; savepoint my_savepoint +master-bin.000001 # Query # # use `test`; insert into t1 values(6) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; rollback to savepoint my_savepoint +master-bin.000001 # Query # # use `test`; insert into t1 values(7) +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +reset master; +select get_lock("a",10); +get_lock("a",10) +1 +begin; +insert into t1 values(8); +insert into t2 select * from t1; +select get_lock("a",10); +get_lock("a",10) +1 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(8) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; ROLLBACK +delete from t1; +delete from t2; +reset master; +insert into t1 values(9); +insert into t2 select * from t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; insert into t1 values(9) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +delete from t1; +delete from t2; +reset master; +insert into t1 values(10); +begin; +insert into t2 select * from t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; insert into t1 values(10) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +insert into t1 values(11); +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; insert into t1 values(10) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(11) +master-bin.000001 # Xid # # COMMIT /* XID */ +alter table t2 engine=INNODB; +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(12); +insert into t2 select * from t1; +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(12) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(13); +insert into t2 select * from t1; +rollback; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(14); +savepoint my_savepoint; +insert into t1 values(15); +insert into t2 select * from t1; +rollback to savepoint my_savepoint; +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(14) +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +reset master; +begin; +insert into t1 values(16); +savepoint my_savepoint; +insert into t1 values(17); +insert into t2 select * from t1; +rollback to savepoint my_savepoint; +insert into t1 values(18); +commit; +select a from t1 order by a; +a +16 +18 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(16) +master-bin.000001 # Query # # use `test`; insert into t1 values(18) +master-bin.000001 # Xid # # COMMIT /* XID */ +delete from t1; +delete from t2; +alter table t2 engine=MyISAM; +insert into t1 values (1); +begin; +select * from t1 for update; +a +1 +select (@before:=unix_timestamp())*0; +(@before:=unix_timestamp())*0 +0 +begin; +select * from t1 for update; +insert into t2 values (20); +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +select (@after:=unix_timestamp())*0; +(@after:=unix_timestamp())*0 +0 +select (@after-@before) >= 2; +(@after-@before) >= 2 +1 +drop table t1,t2; +commit; +begin; +create temporary table ti (a int) engine=innodb; +rollback; +insert into ti values(1); +set autocommit=0; +create temporary table t1 (a int) engine=myisam; +commit; +insert t1 values (1); +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +create table t0 (n int); +insert t0 select * from t1; +set autocommit=1; +insert into t0 select GET_LOCK("lock1",null); +set autocommit=0; +create table t2 (n int) engine=innodb; +insert into t2 values (3); +select get_lock("lock1",60); +get_lock("lock1",60) +1 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(16) +master-bin.000001 # Query # # use `test`; insert into t1 values(18) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; delete from t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; delete from t2 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; alter table t2 engine=MyISAM +master-bin.000001 # Query # # use `test`; insert into t1 values (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; insert into t2 values (20) +master-bin.000001 # Query # # use `test`; drop table t1,t2 +master-bin.000001 # Query # # use `test`; create temporary table ti (a int) engine=innodb +master-bin.000001 # Query # # use `test`; insert into ti values(1) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; create temporary table t1 (a int) engine=myisam +master-bin.000001 # Query # # use `test`; insert t1 values (1) +master-bin.000001 # Query # # use `test`; create table t0 (n int) +master-bin.000001 # Query # # use `test`; insert t0 select * from t1 +master-bin.000001 # Query # # use `test`; insert into t0 select GET_LOCK("lock1",null) +master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb +master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `test`.`t1`,`test`.`ti` +do release_lock("lock1"); +drop table t0,t2; +set autocommit=0; +CREATE TABLE t1 (a int, b int) engine=myisam; +reset master; +INSERT INTO t1 values (1,1),(1,2); +CREATE TABLE t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +DROP TABLE if exists t2; +Warnings: +Note 1051 Unknown table 't2' +INSERT INTO t1 values (3,3); +CREATE TEMPORARY TABLE t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +DROP TABLE IF EXISTS t2; +Warnings: +Note 1051 Unknown table 't2' +CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb; +INSERT INTO t1 VALUES (4,4); +CREATE TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +SELECT * from t2; +a b +TRUNCATE table t2; +INSERT INTO t1 VALUES (5,5); +INSERT INTO t2 select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +SELECT * FROM t2; +a b +DROP TABLE t2; +INSERT INTO t1 values (6,6); +CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb ; +INSERT INTO t1 values (7,7); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +INSERT INTO t1 values (8,8); +CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +COMMIT; +INSERT INTO t1 values (9,9); +CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +SELECT * from t2; +a b +TRUNCATE table t2; +INSERT INTO t1 values (10,10); +INSERT INTO t2 select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +SELECT * from t1; +a b +1 1 +1 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +INSERT INTO t2 values (100,100); +CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +COMMIT; +INSERT INTO t2 values (101,101); +CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +ROLLBACK; +SELECT * from t2; +a b +100 100 +DROP TABLE t1,t2; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (1,1),(1,2) +master-bin.000001 # Query # # use `test`; DROP TABLE if exists t2 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (3,3) +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2 +master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4,4) +master-bin.000001 # Query # # use `test`; TRUNCATE table t2 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5,5) +master-bin.000001 # Query # # use `test`; DROP TABLE t2 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (6,6) +master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb +master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (7,7) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (8,8) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (9,9) +master-bin.000001 # Query # # use `test`; TRUNCATE table t2 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (10,10) +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (100,100) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1,t2 +reset master; +create table t1 (a int) engine=innodb; +create table t2 (a int) engine=myisam; +select get_lock("a",10); +get_lock("a",10) +1 +begin; +insert into t1 values(8); +insert into t2 select * from t1; +select get_lock("a",10); +get_lock("a",10) +1 +flush logs; +select +(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) +is not null; +(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) +is not null +1 +select +@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", +@a not like "%#%error_code=%error_code=%"; +@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%" +1 1 +drop table t1, t2; diff --git a/mysql-test/suite/binlog/r/binlog_stm_ps.result b/mysql-test/suite/binlog/r/binlog_stm_ps.result new file mode 100644 index 00000000000..47934665116 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_stm_ps.result @@ -0,0 +1,20 @@ +drop table if exists t1; +reset master; +create table t1 (a int); +prepare s from "insert into t1 values (@a),(?)"; +set @a=98; +execute s using @a; +prepare s from "insert into t1 values (?)"; +set @a=99; +execute s using @a; +prepare s from "insert into t1 select 100 limit ?"; +set @a=100; +execute s using @a; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # User var # # @`a`=98 +master-bin.000001 # Query # # use `test`; insert into t1 values (@a),(98) +master-bin.000001 # Query # # use `test`; insert into t1 values (99) +master-bin.000001 # Query # # use `test`; insert into t1 select 100 limit 100 +drop table t1; diff --git a/mysql-test/suite/binlog/t/binlog_killed.test b/mysql-test/suite/binlog/t/binlog_killed.test new file mode 100644 index 00000000000..6c0b4b46a4e --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_killed.test @@ -0,0 +1,248 @@ +-- source include/have_innodb.inc +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/not_embedded.inc + +### +### bug#22725 : incorrect killed error in binlogged query +### + +connect (con1, localhost, root,,); +connect (con2, localhost, root,,); + +create table t1 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB; +create table t2 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=MyISAM; +create table t3 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB; + +# +# effective test for bug#22725 +# + +connection con1; +select get_lock("a", 20); + +connection con2; +let $ID= `select connection_id()`; +reset master; +send insert into t2 values (null, null), (null, get_lock("a", 10)); + + +connection con1; + +disable_abort_on_error; +disable_query_log; +disable_result_log; + +eval kill query $ID; + +connection con2; +--error 0,ER_QUERY_INTERRUPTED +reap; +let $rows= `select count(*) from t2 /* must be 2 or 0 */`; + +--exec $MYSQL_BINLOG --start-position=134 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select +(@a:=load_file("$MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) +is not null; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +let $error_code= `select @a like "%#%error_code=0%" /* must return 1 or 0*/`; +let $insert_binlogged= `select @a like "%insert into%" /* must return 1 or 0 */`; +eval set @result= $rows- $error_code - $insert_binlogged; + +enable_abort_on_error; +enable_query_log; +enable_result_log; + +select @result /* must be zero either way */; + +# the functions are either *insensitive* to killing or killing can cause +# strange problmes with the error propagation out of SF's stack +# Bug#27563, Bug#27565, BUG#24971 +# +# TODO: use if's block as regression test for the bugs or remove +# +if (0) +{ +delimiter |; +create function bug27563() +RETURNS int(11) +DETERMINISTIC +begin + select get_lock("a", 10) into @a; + return 1; +end| +delimiter ;| + +# the function is sensitive to killing requiring innodb though with wrong client error +# TO FIX in BUG#27565; TODO: remove --error 1105 afterwards +delimiter |; +create function bug27565() +RETURNS int(11) +DETERMINISTIC +begin + select a from t1 where a=1 into @a for update; + return 1; +end| +delimiter ;| + +reset master; + + +### ta table case: killing causes rollback + +# A. autocommit ON +connection con1; +select get_lock("a", 20); + +connection con2; +let $ID= `select connection_id()`; +send insert into t1 values (bug27563(),1); + +connection con1; +eval kill query $ID; + +connection con2; +# todo (re-record test): after bugs 27563,27565 got fixed affected rows will report zero +--enable_info +# todo: remove 0 return after fixing Bug#27563 +--error 0,ER_QUERY_INTERRUPTED +reap; ### pb: wrong error +--disable_info +###--replace_column 2 # 5 # +### show binlog events from 98 /* nothing in binlog unless Bug#27563 */; +show master status /* must be only FD event unless Bug#27563 */; +select count(*) from t1 /* must be zero unless Bug#27563 */; + +# M. multi-statement-ta +connection con2; +let $ID= `select connection_id()`; +begin; +send insert into t1 values (bug27563(),1); + +connection con1; +eval kill query $ID; +connection con2; +# todo (re-record test): after bugs 27563,27565 got fixed affected rows will report zero +--enable_info +# todo: remove 0 return after fixing Bug#27563 +--error 0,ER_QUERY_INTERRUPTED +reap; +--disable_info +select count(*) from t1 /* must be zero unless Bug#27563 */; +commit; + + +### non-ta table case: killing must be recorded in binlog + +reset master; + +connection con2; +let $ID= `select connection_id()`; +send insert into t2 values (bug27563(),1); + +connection con1; +eval kill query $ID; + +connection con2; +# todo: remove 0 return after fixing Bug#27563 +--error 0,ER_QUERY_INTERRUPTED +reap; +select count(*) from t2 /* must be one */; +#show binlog events from 98 /* must have the insert on non-ta table */; +show master status /* must have the insert event more to FD */; +# the value of the error flag of KILLED_QUERY is tested further + +connection con1; +select RELEASE_LOCK("a"); + +### test with effective killing of SF() + +delete from t1; +delete from t2; +insert into t1 values (1,1); +insert into t2 values (1,1); + +# +# Bug#27565 +# test where KILL is propagated as error to the top level +# still another bug with the error message to the user +# todo: fix reexecute the result file after fixing +# +begin; update t1 set b=0 where a=1; + +connection con2; +let $ID= `select connection_id()`; +send update t2 set b=bug27565()-1 where a=1; + +connection con1; +eval kill query $ID; +commit; + +connection con2; +# todo: fix Bug #27565 killed query of SF() is not reported correctly and +# remove 1105 (wrong) +#--error ER_QUERY_INTERRUPTED +--error 1105,ER_QUERY_INTERRUPTED +reap; ### pb: wrong error +select * from t1 /* must be: (1,0) */; +select * from t2 /* must be as before: (1,1) */; + +## bug#22725 with effective and propagating killing +# +# top-level ta-table +connection con1; +delete from t3; +reset master; +begin; update t1 set b=0 where a=1; + +connection con2; +let $ID= `select connection_id()`; +# the query won't perform completely since the function gets interrupted +send insert into t3 values (0,0),(1,bug27565()); + +connection con1; +eval kill query $ID; +rollback; + +connection con2; +# todo: fix Bug #27565 killed query of SF() is not reported correctly and +# remove 1105 (wrong) +#--error ER_QUERY_INTERRUPTED +--error 1105,ER_QUERY_INTERRUPTED +reap; ### pb: wrong error +select count(*) from t3 /* must be zero */; +show master status /* nothing in binlog */; + +# top-level non-ta-table +connection con1; +delete from t2; +reset master; +begin; update t1 set b=0 where a=1; + +connection con2; +let $ID= `select connection_id()`; +# the query won't perform completely since the function gets intrurrupted +send insert into t2 values (0,0),(1,bug27565()) /* non-ta t2 */; + +connection con1; +eval kill query $ID; +rollback; + +connection con2; +# todo: fix Bug #27565 killed query of SF() is not reported correctly and +# remove 1105 (wrong) +#--error ER_QUERY_INTERRUPTED +--error 1105,ER_QUERY_INTERRUPTED +reap; ### pb: wrong error + +select count(*) from t2 /* count must be one */; +show master status /* insert into non-ta must be in binlog */; + +drop function bug27563; +drop function bug27565; +} + +system rm $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog ; + +drop table t1,t2,t3; + diff --git a/mysql-test/suite/binlog/t/binlog_row_binlog-master.opt b/mysql-test/suite/binlog/t/binlog_row_binlog-master.opt new file mode 100644 index 00000000000..ad2c6a647b5 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_binlog-master.opt @@ -0,0 +1 @@ +-O max_binlog_size=4096 diff --git a/mysql-test/suite/binlog/t/binlog_row_binlog.test b/mysql-test/suite/binlog/t/binlog_row_binlog.test new file mode 100644 index 00000000000..8adc8eee5c1 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_binlog.test @@ -0,0 +1,5 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_row.inc +-- source extra/binlog_tests/binlog.test diff --git a/mysql-test/suite/binlog/t/binlog_row_blackhole.test b/mysql-test/suite/binlog/t/binlog_row_blackhole.test new file mode 100644 index 00000000000..d5355ad1ff0 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_blackhole.test @@ -0,0 +1,11 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_row.inc + +# Bug#18326: Do not lock table for writing during prepare of statement +# The use of the ps protocol causes extra table maps in the binlog, so +# we disable the ps-protocol for this statement. +--disable_ps_protocol +-- source extra/binlog_tests/blackhole.test +--enable_ps_protocol diff --git a/mysql-test/suite/binlog/t/binlog_row_ctype_cp932.test b/mysql-test/suite/binlog/t/binlog_row_ctype_cp932.test new file mode 100644 index 00000000000..595af5a3114 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_ctype_cp932.test @@ -0,0 +1,5 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_row.inc +-- source extra/binlog_tests/ctype_cp932.test diff --git a/mysql-test/suite/binlog/t/binlog_row_ctype_ucs.test b/mysql-test/suite/binlog/t/binlog_row_ctype_ucs.test new file mode 100644 index 00000000000..96e14ed8882 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_ctype_ucs.test @@ -0,0 +1,6 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_row.inc +-- source extra/binlog_tests/ctype_ucs_binlog.test + diff --git a/mysql-test/suite/binlog/t/binlog_row_drop_tmp_tbl.test b/mysql-test/suite/binlog/t/binlog_row_drop_tmp_tbl.test new file mode 100644 index 00000000000..5b503b78d85 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_drop_tmp_tbl.test @@ -0,0 +1,5 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_row.inc +-- source extra/binlog_tests/drop_temp_table.test diff --git a/mysql-test/suite/binlog/t/binlog_row_innodb_stat-master.opt b/mysql-test/suite/binlog/t/binlog_row_innodb_stat-master.opt new file mode 100644 index 00000000000..4cb927540bf --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_innodb_stat-master.opt @@ -0,0 +1 @@ +--binlog_cache_size=32768 diff --git a/mysql-test/suite/binlog/t/binlog_row_innodb_stat.test b/mysql-test/suite/binlog/t/binlog_row_innodb_stat.test new file mode 100644 index 00000000000..e4e6762226b --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_innodb_stat.test @@ -0,0 +1,5 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_row.inc +-- source extra/binlog_tests/innodb_stat.test diff --git a/mysql-test/suite/binlog/t/binlog_row_insert_select.test b/mysql-test/suite/binlog/t/binlog_row_insert_select.test new file mode 100644 index 00000000000..806d495c8fb --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_insert_select.test @@ -0,0 +1,10 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_row.inc +# Bug#18326: Do not lock table for writing during prepare of statement +# The use of the ps protocol causes extra table maps in the binlog, so +# we disable the ps-protocol for this statement. +--disable_ps_protocol +-- source extra/binlog_tests/insert_select-binlog.test +--enable_ps_protocol diff --git a/mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam-master.opt b/mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam-master.opt new file mode 100644 index 00000000000..e76299453d3 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam-master.opt @@ -0,0 +1 @@ +--innodb_lock_wait_timeout=2 diff --git a/mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test b/mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test new file mode 100644 index 00000000000..335a05be146 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test @@ -0,0 +1,32 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_row.inc + +# Bug#18326: Do not lock table for writing during prepare of statement +# The use of the ps protocol causes extra table maps in the binlog, so +# we disable the ps-protocol for this statement. +--disable_ps_protocol + +-- source extra/binlog_tests/mix_innodb_myisam_binlog.test + +--enable_ps_protocol + +# This piece below cannot be put into +# extra/binlog_tests/mix_innodb_myisam_binlog.test +# because the argument of --start-position differs between statement- +# and row-based (and "eval --exec" doesn't work). +# we check that the error code of the "ROLLBACK" event is 0 and not +# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction +# and does not make slave to stop) +flush logs; +--exec $MYSQL_BINLOG --start-position=520 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select +(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) +is not null; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval select +@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", +@a not like "%#%error_code=%error_code=%"; +drop table t1, t2; diff --git a/mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test b/mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test new file mode 100644 index 00000000000..9b78296236f --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test @@ -0,0 +1,9 @@ +# This test is to verify replication with INSERT DELAY through +# unrecommended STATEMENT binlog format + +-- source include/not_embedded.inc +-- source include/have_binlog_format_statement.inc +-- disable_query_log +reset master; # get rid of previous tests binlog +-- enable_query_log +-- source extra/binlog_tests/binlog_insert_delayed.test diff --git a/mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt b/mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt new file mode 100644 index 00000000000..ad2c6a647b5 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_binlog-master.opt @@ -0,0 +1 @@ +-O max_binlog_size=4096 diff --git a/mysql-test/suite/binlog/t/binlog_stm_binlog.test b/mysql-test/suite/binlog/t/binlog_stm_binlog.test new file mode 100644 index 00000000000..280b7a3aef9 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_binlog.test @@ -0,0 +1,18 @@ +# REQUIREMENT +# replace_regex should replace output of SHOW BINLOG EVENTS + +create table t1 (a int, b int) engine=innodb; +begin; +insert into t1 values (1,2); +commit; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ +show binlog events; +drop table t1; + +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/not_embedded.inc +-- source include/have_binlog_format_mixed.inc +-- source extra/binlog_tests/binlog.test + diff --git a/mysql-test/suite/binlog/t/binlog_stm_blackhole.test b/mysql-test/suite/binlog/t/binlog_stm_blackhole.test new file mode 100644 index 00000000000..02ba2be095b --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_blackhole.test @@ -0,0 +1,6 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/not_embedded.inc +-- source include/have_binlog_format_mixed_or_statement.inc +-- source extra/binlog_tests/blackhole.test diff --git a/mysql-test/suite/binlog/t/binlog_stm_ctype_cp932.test b/mysql-test/suite/binlog/t/binlog_stm_ctype_cp932.test new file mode 100644 index 00000000000..c0791d81445 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_ctype_cp932.test @@ -0,0 +1,6 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/not_embedded.inc +-- source include/have_binlog_format_mixed_or_statement.inc +-- source extra/binlog_tests/ctype_cp932.test diff --git a/mysql-test/suite/binlog/t/binlog_stm_ctype_ucs.test b/mysql-test/suite/binlog/t/binlog_stm_ctype_ucs.test new file mode 100644 index 00000000000..c8cd7e06398 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_ctype_ucs.test @@ -0,0 +1,6 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_mixed_or_statement.inc +-- source extra/binlog_tests/ctype_ucs_binlog.test + diff --git a/mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test b/mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test new file mode 100644 index 00000000000..6017f272d01 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test @@ -0,0 +1,5 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_mixed_or_statement.inc +-- source extra/binlog_tests/drop_temp_table.test diff --git a/mysql-test/suite/binlog/t/binlog_stm_innodb_stat-master.opt b/mysql-test/suite/binlog/t/binlog_stm_innodb_stat-master.opt new file mode 100644 index 00000000000..4cb927540bf --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_innodb_stat-master.opt @@ -0,0 +1 @@ +--binlog_cache_size=32768 diff --git a/mysql-test/suite/binlog/t/binlog_stm_innodb_stat.test b/mysql-test/suite/binlog/t/binlog_stm_innodb_stat.test new file mode 100644 index 00000000000..a08039c4a41 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_innodb_stat.test @@ -0,0 +1,5 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_mixed_or_statement.inc +-- source extra/binlog_tests/innodb_stat.test diff --git a/mysql-test/suite/binlog/t/binlog_stm_insert_select.test b/mysql-test/suite/binlog/t/binlog_stm_insert_select.test new file mode 100644 index 00000000000..3aefa1e6cf7 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_insert_select.test @@ -0,0 +1,5 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_mixed_or_statement.inc +-- source extra/binlog_tests/insert_select-binlog.test diff --git a/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt b/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt new file mode 100644 index 00000000000..e76299453d3 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam-master.opt @@ -0,0 +1 @@ +--innodb_lock_wait_timeout=2 diff --git a/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test b/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test new file mode 100644 index 00000000000..72651c13be7 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test @@ -0,0 +1,24 @@ +# This is a wrapper for binlog.test so that the same test case can be used +# For both statement and row based bin logs 9/19/2005 [jbm] + +-- source include/have_binlog_format_mixed_or_statement.inc +-- source extra/binlog_tests/mix_innodb_myisam_binlog.test + +# This piece below cannot be put into +# extra/binlog_tests/mix_innodb_myisam_binlog.test +# because the argument of --start-position differs between statement- +# and row-based (and "eval --exec" doesn't work). +# we check that the error code of the "ROLLBACK" event is 0 and not +# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction +# and does not make slave to stop) +flush logs; +--exec $MYSQL_BINLOG --start-position=555 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select +(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) +is not null; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval select +@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", +@a not like "%#%error_code=%error_code=%"; +drop table t1, t2; diff --git a/mysql-test/suite/binlog/t/binlog_stm_ps.test b/mysql-test/suite/binlog/t/binlog_stm_ps.test new file mode 100644 index 00000000000..83add5af3d7 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_stm_ps.test @@ -0,0 +1,26 @@ +# This test is to verify replication with PS + +-- source include/not_embedded.inc +-- source include/have_binlog_format_mixed_or_statement.inc + +-- disable_query_log +reset master; # get rid of previous tests binlog +-- enable_query_log + +--disable_warnings +drop table if exists t1; +--enable_warnings +reset master; + +# +# Bug #26842: master binary log contains invalid queries - replication fails +# +create table t1 (a int); +prepare s from "insert into t1 values (@a),(?)"; +set @a=98; execute s using @a; +prepare s from "insert into t1 values (?)"; +set @a=99; execute s using @a; +prepare s from "insert into t1 select 100 limit ?"; +set @a=100; execute s using @a; +source include/show_binlog_events.inc; +drop table t1; diff --git a/mysql-test/suite/funcs_1/t/suite.opt b/mysql-test/suite/funcs_1/t/suite.opt new file mode 100644 index 00000000000..9b22c677b83 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/suite.opt @@ -0,0 +1,2 @@ +--secure-file-priv=$MYSQL_TEST_DIR + diff --git a/mysql-test/suite/funcs_2/t/suite.opt b/mysql-test/suite/funcs_2/t/suite.opt new file mode 100644 index 00000000000..9b22c677b83 --- /dev/null +++ b/mysql-test/suite/funcs_2/t/suite.opt @@ -0,0 +1,2 @@ +--secure-file-priv=$MYSQL_TEST_DIR + diff --git a/mysql-test/suite/ndb/r/loaddata_autocom_ndb.result b/mysql-test/suite/ndb/r/loaddata_autocom_ndb.result new file mode 100644 index 00000000000..f98e6a76981 --- /dev/null +++ b/mysql-test/suite/ndb/r/loaddata_autocom_ndb.result @@ -0,0 +1,23 @@ +SET SESSION STORAGE_ENGINE = ndbcluster; +drop table if exists t1; +create table t1 (id int unsigned not null auto_increment primary key, a text, b text); +start transaction; +load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''' (a, b); +Warnings: +Warning 1261 Row 3 doesn't contain data for all columns +commit; +select count(*) from t1; +count(*) +4 +truncate table t1; +start transaction; +load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''' (a, b); +Warnings: +Warning 1261 Row 3 doesn't contain data for all columns +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +select count(*) from t1; +count(*) +4 +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_alter_table.result b/mysql-test/suite/ndb/r/ndb_alter_table.result new file mode 100644 index 00000000000..13c445b44ca --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_alter_table.result @@ -0,0 +1,401 @@ +DROP TABLE IF EXISTS t1, t2; +drop database if exists mysqltest; +CREATE TABLE t1 ( +a INT NOT NULL, +b INT NOT NULL +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (9410,9412); +ALTER TABLE t1 ADD COLUMN c int not null; +SELECT * FROM t1; +a b c +9410 9412 0 +DROP TABLE t1; +CREATE DATABASE mysqltest; +USE mysqltest; +CREATE TABLE t1 ( +a INT NOT NULL, +b INT NOT NULL +) ENGINE=ndbcluster; +RENAME TABLE t1 TO test.t1; +SHOW TABLES; +Tables_in_mysqltest +DROP DATABASE mysqltest; +USE test; +SHOW TABLES; +Tables_in_test +t1 +DROP TABLE t1; +create table t1 ( +col1 int not null auto_increment primary key, +col2 varchar(30) not null, +col3 varchar (20) not null, +col4 varchar(4) not null, +col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, +col6 int not null, to_be_deleted int) ENGINE=ndbcluster; +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 NDBCLUSTER 10 Dynamic 0 # # # 0 # 1 # # # latin1_swedish_ci NULL # +SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +insert into t1 values +(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 NDBCLUSTER 10 Dynamic 9 # # # 0 # 102 # # # latin1_swedish_ci NULL # +select * from t1 order by col1; +col1 col2 col3 col4 col5 col6 to_be_deleted +0 4 3 5 PENDING 1 7 +1 4 3 5 PENDING 1 7 +7 4 3 5 PENDING 1 7 +8 4 3 5 PENDING 1 7 +31 4 3 5 PENDING 1 7 +32 4 3 5 PENDING 1 7 +99 4 3 5 PENDING 1 7 +100 4 3 5 PENDING 1 7 +101 4 3 5 PENDING 1 7 +alter table t1 +add column col4_5 varchar(20) not null after col4, +add column col7 varchar(30) not null after col5, +add column col8 datetime not null, drop column to_be_deleted, +change column col2 fourth varchar(30) not null after col3, +modify column col6 int not null first; +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 NDBCLUSTER 10 Dynamic 9 # # # 0 # 102 # # # latin1_swedish_ci NULL # +select * from t1 order by col1; +col6 col1 col3 fourth col4 col4_5 col5 col7 col8 +1 0 3 4 5 PENDING 0000-00-00 00:00:00 +1 1 3 4 5 PENDING 0000-00-00 00:00:00 +1 7 3 4 5 PENDING 0000-00-00 00:00:00 +1 8 3 4 5 PENDING 0000-00-00 00:00:00 +1 31 3 4 5 PENDING 0000-00-00 00:00:00 +1 32 3 4 5 PENDING 0000-00-00 00:00:00 +1 99 3 4 5 PENDING 0000-00-00 00:00:00 +1 100 3 4 5 PENDING 0000-00-00 00:00:00 +1 101 3 4 5 PENDING 0000-00-00 00:00:00 +insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 NDBCLUSTER 10 Dynamic 10 # # # 0 # 103 # # # latin1_swedish_ci NULL # +select * from t1 order by col1; +col6 col1 col3 fourth col4 col4_5 col5 col7 col8 +1 0 3 4 5 PENDING 0000-00-00 00:00:00 +1 1 3 4 5 PENDING 0000-00-00 00:00:00 +1 7 3 4 5 PENDING 0000-00-00 00:00:00 +1 8 3 4 5 PENDING 0000-00-00 00:00:00 +1 31 3 4 5 PENDING 0000-00-00 00:00:00 +1 32 3 4 5 PENDING 0000-00-00 00:00:00 +1 99 3 4 5 PENDING 0000-00-00 00:00:00 +1 100 3 4 5 PENDING 0000-00-00 00:00:00 +1 101 3 4 5 PENDING 0000-00-00 00:00:00 +2 102 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 +delete from t1; +insert into t1 values (0,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); +SET SQL_MODE=''; +insert into t1 values (1,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); +select * from t1 order by col1; +col6 col1 col3 fourth col4 col4_5 col5 col7 col8 +0 0 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 +1 103 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 +alter table t1 drop column col4_5; +insert into t1 values (2,0,4,3,5,"PENDING","EXTRA",'2004-01-01 00:00:00'); +select * from t1 order by col1; +col6 col1 col3 fourth col4 col5 col7 col8 +0 0 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 +1 103 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 +2 104 4 3 5 PENDING EXTRA 2004-01-01 00:00:00 +drop table t1; +CREATE TABLE t1 ( +a INT NOT NULL, +b INT NOT NULL +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (9410,9412); +ALTER TABLE t1 ADD COLUMN c int not null; +select * from t1 order by a; +a b c +9410 9412 0 +select * from t1 order by a; +a b c +9410 9412 0 +alter table t1 drop c; +select * from t1 order by a; +a b +9410 9412 +drop table t1; +select * from t1 order by a; +ERROR 42S02: Table 'test.t1' doesn't exist +CREATE TABLE t1 ( +a INT NOT NULL PRIMARY KEY, +b INT NOT NULL +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (0,1),(17,18); +select * from t1 order by a; +a b +0 1 +17 18 +SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +alter table t1 modify column a int not null auto_increment; +SET SQL_MODE=''; +select * from t1 order by a; +a b +0 1 +17 18 +INSERT INTO t1 VALUES (0,19),(20,21); +select * from t1 order by a; +a b +0 1 +17 18 +18 19 +20 21 +drop table t1; +CREATE TABLE t1 ( +a INT NOT NULL PRIMARY KEY, +b INT NOT NULL +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (0,1),(17,18); +select * from t1 order by a; +a b +0 1 +17 18 +alter table t1 add c int not null unique auto_increment; +select c from t1 order by c; +c +1 +2 +INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); +select c from t1 order by c; +c +1 +2 +3 +4 +5 +drop table t1; +create table t1 ( +ai bigint auto_increment, +c001 int(11) not null, +c002 int(11) not null, +c003 int(11) not null, +c004 int(11) not null, +c005 int(11) not null, +c006 int(11) not null, +c007 int(11) not null, +c008 int(11) not null, +c009 int(11) not null, +c010 int(11) not null, +c011 int(11) not null, +c012 int(11) not null, +c013 int(11) not null, +c014 int(11) not null, +c015 int(11) not null, +c016 int(11) not null, +c017 int(11) not null, +c018 int(11) not null, +c019 int(11) not null, +c020 int(11) not null, +c021 int(11) not null, +c022 int(11) not null, +c023 int(11) not null, +c024 int(11) not null, +c025 int(11) not null, +c026 int(11) not null, +c027 int(11) not null, +c028 int(11) not null, +c029 int(11) not null, +c030 int(11) not null, +c031 int(11) not null, +c032 int(11) not null, +c033 int(11) not null, +c034 int(11) not null, +c035 int(11) not null, +c036 int(11) not null, +c037 int(11) not null, +c038 int(11) not null, +c039 int(11) not null, +c040 int(11) not null, +c041 int(11) not null, +c042 int(11) not null, +c043 int(11) not null, +c044 int(11) not null, +c045 int(11) not null, +c046 int(11) not null, +c047 int(11) not null, +c048 int(11) not null, +c049 int(11) not null, +c050 int(11) not null, +c051 int(11) not null, +c052 int(11) not null, +c053 int(11) not null, +c054 int(11) not null, +c055 int(11) not null, +c056 int(11) not null, +c057 int(11) not null, +c058 int(11) not null, +c059 int(11) not null, +c060 int(11) not null, +c061 int(11) not null, +c062 int(11) not null, +c063 int(11) not null, +c064 int(11) not null, +c065 int(11) not null, +c066 int(11) not null, +c067 int(11) not null, +c068 int(11) not null, +c069 int(11) not null, +c070 int(11) not null, +c071 int(11) not null, +c072 int(11) not null, +c073 int(11) not null, +c074 int(11) not null, +c075 int(11) not null, +c076 int(11) not null, +c077 int(11) not null, +c078 int(11) not null, +c079 int(11) not null, +c080 int(11) not null, +c081 int(11) not null, +c082 int(11) not null, +c083 int(11) not null, +c084 int(11) not null, +c085 int(11) not null, +c086 int(11) not null, +c087 int(11) not null, +c088 int(11) not null, +c089 int(11) not null, +c090 int(11) not null, +c091 int(11) not null, +c092 int(11) not null, +c093 int(11) not null, +c094 int(11) not null, +c095 int(11) not null, +c096 int(11) not null, +c097 int(11) not null, +c098 int(11) not null, +c099 int(11) not null, +c100 int(11) not null, +c101 int(11) not null, +c102 int(11) not null, +c103 int(11) not null, +c104 int(11) not null, +c105 int(11) not null, +c106 int(11) not null, +c107 int(11) not null, +c108 int(11) not null, +c109 int(11) not null, +primary key (ai), +unique key tx1 (c002, c003, c004, c005)) engine=ndb; +create index tx2 +on t1 (c010, c011, c012, c013); +drop table t1; +CREATE TABLE t1 ( +auto int(5) unsigned NOT NULL auto_increment, +string char(10), +vstring varchar(10), +bin binary(2), +vbin varbinary(7), +tiny tinyint(4) DEFAULT '0' NOT NULL , +short smallint(6) DEFAULT '1' NOT NULL , +medium mediumint(8) DEFAULT '0' NOT NULL, +long_int int(11) DEFAULT '0' NOT NULL, +longlong bigint(13) DEFAULT '0' NOT NULL, +real_float float(13,1) DEFAULT 0.0 NOT NULL, +real_double double(16,4), +real_decimal decimal(16,4), +utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, +ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, +umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, +ulong int(11) unsigned DEFAULT '0' NOT NULL, +ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, +bits bit(3), +options enum('zero','one','two','three','four') not null, +flags set('zero','one','two','three','four') not null, +date_field date, +year_field year, +time_field time, +date_time datetime, +time_stamp timestamp, +PRIMARY KEY (auto) +) engine=ndb; +CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255)); +LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; +set @t1_id = (select id from ndb_show_tables where name like '%t1%'); +truncate ndb_show_tables; +alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; +LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; +select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; +no_copy +set @t1_id = (select id from ndb_show_tables where name like '%t1%'); +truncate ndb_show_tables; +create index i1 on t1(medium); +alter table t1 add index i2(new_tiny); +drop index i1 on t1; +LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; +select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; +no_copy +no_copy +DROP TABLE t1, ndb_show_tables; +create table t1 (a int primary key auto_increment, b int) engine=ndb; +insert into t1 (b) values (101),(102),(103); +select * from t1 where a = 3; +a b +3 103 +alter table t1 rename t2; +insert into t2 (b) values (201),(202),(203); +select * from t2 where a = 6; +a b +6 203 +alter table t2 add c int; +insert into t2 (b) values (301),(302),(303); +select * from t2 where a = 9; +a b c +9 303 NULL +alter table t2 rename t1; +insert into t1 (b) values (401),(402),(403); +select * from t1 where a = 12; +a b c +12 403 NULL +drop table t1; +create table t1 (a int not null, b varchar(10)) engine=ndb; +show index from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +alter table t1 add primary key (a); +show index from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A 0 NULL NULL BTREE +alter table t1 drop primary key; +show index from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +drop table t1; +create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` int(11) NOT NULL DEFAULT '0', + `c` varchar(254) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +alter table t1 alter b set default 1; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` int(11) NOT NULL DEFAULT '1', + `c` varchar(254) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a int not null, b int not null) engine=ndb; +insert into t1 values (1, 300), (2, 200), (3, 100); +select * from t1 order by a; +a b +1 300 +2 200 +3 100 +alter table t1 order by b; +select * from t1 order by b; +a b +3 100 +2 200 +1 300 +drop table t1; +End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_alter_table2.result b/mysql-test/suite/ndb/r/ndb_alter_table2.result new file mode 100644 index 00000000000..3783c76447c --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_alter_table2.result @@ -0,0 +1,41 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +a INT NOT NULL PRIMARY KEY, +b INT NOT NULL +) ENGINE=ndbcluster; +BEGIN; +INSERT INTO t1 VALUES (9410,9412); +BEGIN; +INSERT INTO t1 VALUES (9411,9412); +BEGIN; +INSERT INTO t1 VALUES (9412,9412); +BEGIN; +INSERT INTO t1 VALUES (9413,9412); +BEGIN; +INSERT INTO t1 VALUES (9414,9412); +BEGIN; +INSERT INTO t1 VALUES (9415,9412); +ROLLBACK; +ROLLBACK; +ROLLBACK; +ROLLBACK; +ROLLBACK; +ROLLBACK; +drop table t1; +CREATE TABLE t1 ( +a INT NOT NULL PRIMARY KEY, +b INT NOT NULL, +c INT NOT NULL +) ENGINE=ndbcluster; +select * from t1; +select * from t1; +a b c +select * from t1; +a b c +select * from t1; +a b c +select * from t1; +a b c +select * from t1; +a b c +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_alter_table3.result b/mysql-test/suite/ndb/r/ndb_alter_table3.result new file mode 100644 index 00000000000..ee7c9b1c7b0 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_alter_table3.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS t1; +create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) +engine=ndb; +insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); +create index c on t1(c); +show indexes from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A 3 NULL NULL BTREE +t1 1 b 1 b A 3 NULL NULL YES BTREE +t1 1 c 1 c A 3 NULL NULL YES BTREE +select * from t1 where c = 'two'; +a b c +2 two two +alter table t1 drop index c; +show indexes from t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 a A 3 NULL NULL BTREE +t1 1 b 1 b A 3 NULL NULL YES BTREE +select * from t1 where c = 'two'; +a b c +2 two two +drop table t1; +create table t3 (a int primary key) engine=ndbcluster; +begin; +insert into t3 values (1); +alter table t3 rename t4; +commit; +select * from t3; +ERROR 42S02: Table 'test.t3' doesn't exist +select * from t4; +a +1 +drop table t4; +show tables; +Tables_in_test diff --git a/mysql-test/suite/ndb/r/ndb_autodiscover.result b/mysql-test/suite/ndb/r/ndb_autodiscover.result new file mode 100644 index 00000000000..487f52f6427 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_autodiscover.result @@ -0,0 +1,397 @@ +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +flush status; +create table t1( +id int not null primary key, +name char(20) +) engine=ndb; +insert into t1 values(1, "Autodiscover"); +flush tables; +select * from t1; +id name +1 Autodiscover +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 1 +flush tables; +insert into t1 values (2, "Auto 2"); +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 2 +insert into t1 values (3, "Discover 3"); +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 2 +flush tables; +select * from t1 order by id; +id name +1 Autodiscover +2 Auto 2 +3 Discover 3 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 3 +flush tables; +update t1 set name="Autodiscover" where id = 2; +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 4 +select * from t1 order by id; +id name +1 Autodiscover +2 Autodiscover +3 Discover 3 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 4 +flush tables; +delete from t1 where id = 3; +select * from t1 order by id; +id name +1 Autodiscover +2 Autodiscover +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 5 +drop table t1; +flush status; +create table t2( +id int not null primary key, +name char(22) +) engine=ndb; +insert into t2 values (1, "Discoverer"); +select * from t2; +id name +1 Discoverer +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +flush tables; +select * from t2; +id name +1 Discoverer +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 1 +drop table t2; +flush status; +create table t3( +id int not null primary key, +name char(255) +) engine=ndb; +insert into t3 values (1, "Explorer"); +select * from t3; +id name +1 Explorer +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +flush tables; +create table t3( +id int not null primary key, +name char(20), a int, b float, c char(24) +) engine=ndb; +ERROR 42S01: Table 't3' already exists +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +create table IF NOT EXISTS t3( +id int not null primary key, +id2 int not null, +name char(20) +) engine=ndb; +Warnings: +Note 1050 Table 't3' already exists +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `id` int(11) NOT NULL, + `name` char(255) default NULL, + PRIMARY KEY (`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () +select * from t3; +id name +1 Explorer +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 1 +drop table t3; +flush status; +create table t7( +id int not null primary key, +name char(255) +) engine=ndb; +create table t6( +id int not null primary key, +name char(255) +) engine=MyISAM; +insert into t7 values (1, "Explorer"); +insert into t6 values (2, "MyISAM table"); +select * from t7; +id name +1 Explorer +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +flush tables; +show tables from test; +Tables_in_test +t6 +t7 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 1 +flush tables; +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t6 MyISAM 10 Fixed 1 # # # # 0 NULL # # NULL # NULL # +t7 NDBCLUSTER 10 Fixed 1 # # # # 0 NULL # # NULL # NULL # +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 2 +drop table t6, t7; +flush status; +create table t4( +id int not null primary key, +name char(27) +) engine=ndb; +insert into t4 values (1, "Automatic"); +select * from t4; +id name +1 Automatic +select * from t4; +ERROR 42S02: Table 'test.t4' doesn't exist +select * from t4; +ERROR 42S02: Table 'test.t4' doesn't exist +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +drop table t4; +ERROR 42S02: Unknown table 't4' +create table t4( +id int not null primary key, +name char(27) +) engine=ndb; +insert into t4 values (1, "Automatic"); +select * from t4; +id name +1 Automatic +select * from t4; +ERROR 42S02: Table 'test.t4' doesn't exist +drop table if exists t4; +Warnings: +Error 155 Table 'test.t4' doesn't exist +drop table t5; +ERROR 42S02: Unknown table 't5' +drop table if exists t5; +Warnings: +Note 1051 Unknown table 't5' +flush status; +create table t4( +id int not null primary key, +id2 int, +name char(27) +) engine=ndb; +insert into t4 values (1, 76, "Automatic2"); +select * from t4; +id id2 name +1 76 Automatic2 +flush tables; +SHOW TABLES; +Tables_in_test +select * from t4; +ERROR 42S02: Table 'test.t4' doesn't exist +flush status; +create table t1(id int) engine=ndbcluster; +create table t2(id int, b char(255)) engine=myisam; +create table t3(id int, c char(255)) engine=ndbcluster; +create table t4(id int) engine=myisam; +create table t5(id int, d char(56)) engine=ndbcluster; +create table t6(id int) engine=ndbcluster; +create table t7(id int) engine=ndbcluster; +create table t8(id int, e char(34)) engine=myisam; +create table t9(id int) engine=myisam; +insert into t2 values (2, "myisam table 2"); +insert into t3 values (3, "ndb table 3"); +insert into t5 values (5, "ndb table 5"); +insert into t6 values (6); +insert into t8 values (8, "myisam table 8"); +insert into t9 values (9); +SHOW TABLES; +Tables_in_test +t1 +t2 +t4 +t8 +t9 +t7 +t6 +select * from t6; +id +6 +select * from t7; +id +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 2 +drop table t1, t2, t4, t6, t7, t8, t9; +flush status; +create table t1(id int) engine=ndbcluster; +create table t2(id int, b char(255)) engine=myisam; +create table t3(id int, c char(255)) engine=ndbcluster; +create table t4(id int) engine=myisam; +create table t5(id int, d char(56)) engine=ndbcluster; +create table t6(id int) engine=ndbcluster; +create table t7(id int) engine=ndbcluster; +create table t8(id int, e char(34)) engine=myisam; +create table t9(id int) engine=myisam; +insert into t2 values (2, "myisam table 2"); +insert into t3 values (3, "ndb table 3"); +insert into t5 values (5, "ndb table 5"); +insert into t6 values (6); +insert into t8 values (8, "myisam table 8"); +insert into t9 values (9); +SHOW TABLES LIKE 't6'; +Tables_in_test (t6) +t6 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 1 +create table t3(a int); +ERROR 42S01: Table 't3' already exists +create table t5(a int); +ERROR 42S01: Table 't5' already exists +SHOW TABLES LIKE 't%'; +Tables_in_test (t%) +t1 +t2 +t4 +t6 +t8 +t9 +t7 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 2 +drop table t1, t2, t4, t6, t7, t8, t9; +flush status; +create table t1(id int) engine=ndbcluster; +create table t2(id int, b char(255)) engine=ndbcluster; +create table t3(id int, c char(255)) engine=ndbcluster; +create table t4(id int) engine=myisam; +insert into t1 values (1); +insert into t2 values (2, "table 2"); +insert into t3 values (3, "ndb table 3"); +insert into t4 values (4); +flush tables; +select * from t1, t2, t3, t4; +id id b id c id +1 2 table 2 3 ndb table 3 4 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 3 +drop table t1, t2, t3, t4; +flush status; +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +create table t5( +id int not null primary key, +name char(200) +) engine=ndb; +insert into t5 values (1, "Magnus"); +select * from t5; +id name +1 Magnus +ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; +select * from t5; +adress id name +NULL 1 Magnus +insert into t5 values +("Adress for record 2", 2, "Carl-Gustav"), +("Adress for record 3", 3, "Karl-Emil"); +update t5 set name="Bertil" where id = 2; +select * from t5 order by id; +adress id name +NULL 1 Magnus +Adress for record 2 2 Bertil +Adress for record 3 3 Karl-Emil +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +drop table t5; +flush status; +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +create table t6( +id int not null primary key, +name char(20) +) engine=ndb; +insert into t6 values (1, "Magnus"); +select * from t6; +id name +1 Magnus +ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; +select * from t6; +adress id name +NULL 1 Magnus +insert into t6 values +("Adress for record 2", 2, "Carl-Gustav"), +("Adress for record 3", 3, "Karl-Emil"); +update t6 set name="Bertil" where id = 2; +select * from t6 order by id; +adress id name +NULL 1 Magnus +Adress for record 2 2 Bertil +Adress for record 3 3 Karl-Emil +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +drop table t6; +show tables; +Tables_in_test +create table t1 (a int,b longblob) engine=ndb; +show tables; +Tables_in_test +t1 +create database test2; +use test2; +show tables; +Tables_in_test2 +select * from t1; +ERROR 42S02: Table 'test2.t1' doesn't exist +create table t2 (b int,c longblob) engine=ndb; +use test; +select * from t1; +a b +show tables; +Tables_in_test +t1 +drop table t1; +use test2; +drop table t2; +drop database test2; +use test; +drop database if exists test_only_ndb_tables; +create database test_only_ndb_tables; +use test_only_ndb_tables; +create table t1 (a int primary key) engine=ndb; +select * from t1; +a +select * from t1; +ERROR HY000: Can't lock file (errno: 157) +use test; +drop database test_only_ndb_tables; +CREATE TABLE t9 ( +a int NOT NULL PRIMARY KEY, +b int +) engine=ndb; +insert t9 values(1, 2), (2,3), (3, 4), (4, 5); +create table t10 ( +a int not null primary key, +b blob +) engine=ndb; +insert into t10 values (1, 'kalle'); diff --git a/mysql-test/suite/ndb/r/ndb_autodiscover2.result b/mysql-test/suite/ndb/r/ndb_autodiscover2.result new file mode 100644 index 00000000000..269888e0820 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_autodiscover2.result @@ -0,0 +1,13 @@ +select * from t9 order by a; +a b +1 2 +2 3 +3 4 +4 5 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +drop table t9; +select * from t10; +ERROR HY000: Got error 4263 'Invalid blob attributes or invalid blob parts table' from NDBCLUSTER +drop table t10; diff --git a/mysql-test/suite/ndb/r/ndb_autodiscover3.result b/mysql-test/suite/ndb/r/ndb_autodiscover3.result new file mode 100644 index 00000000000..86495ebb3eb --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_autodiscover3.result @@ -0,0 +1,53 @@ +drop table if exists t1, t2; +create table t1 (a int key) engine=ndbcluster; +begin; +insert into t1 values (1); +insert into t1 values (2); +ERROR HY000: Got temporary error 4025 'Node failure caused abort of transaction' from NDBCLUSTER +commit; +ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER +drop table t1; +create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; +insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); +select * from t2 order by a limit 3; +a b +1 1 +2 1 +3 1 +select * from t2; +ERROR 42S02: Table 'test.t2' doesn't exist +show tables like 't2'; +Tables_in_test (t2) +reset master; +create table t2 (a int key) engine=ndbcluster; +insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +select * from t2 order by a limit 3; +a +1 +2 +3 +select * from t2 order by a limit 3; +a +1 +2 +3 +reset master; +select * from t2; +ERROR 42S02: Table 'test.t2' doesn't exist +show tables like 't2'; +Tables_in_test (t2) +reset master; +create table t2 (a int key) engine=ndbcluster; +insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +select * from t2 order by a limit 3; +a +1 +2 +3 +select * from t2 order by a limit 3; +a +1 +2 +3 +reset master; +drop table t2; diff --git a/mysql-test/suite/ndb/r/ndb_backup_print.result b/mysql-test/suite/ndb/r/ndb_backup_print.result new file mode 100644 index 00000000000..fdd929802b2 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_backup_print.result @@ -0,0 +1,64 @@ +use test; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +Connected to Management Server at: : +Waiting for completed, this may take several minutes +Node : Backup started from node +Node : Backup started from node completed + StartGCP: StopGCP: + #Records: #LogRecords: + Data: bytes Log: bytes +create table t1 +(pk int key +,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) +,b1 TINYINT, b2 TINYINT UNSIGNED +,c1 SMALLINT, c2 SMALLINT UNSIGNED +,d1 INT, d2 INT UNSIGNED +,e1 BIGINT, e2 BIGINT UNSIGNED +,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY +,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY +,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) +,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) +) engine ndb; +insert into t1 values +(1 +,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 +,127, 255 +,32767, 65535 +,2147483647, 4294967295 +,9223372036854775807, 18446744073709551615 +,'1','12345678901234567890123456789012','123456789' + ,'1','12345678901234567890123456789012','123456789' + ,0x12,0x123456789abcdef0, 0x012345 +,0x12,0x123456789abcdef0, 0x00123450 +); +insert into t1 values +(2 +,0, 0, 0, 0, 0 +,-128, 0 +,-32768, 0 +,-2147483648, 0 +,-9223372036854775808, 0 +,'','','' + ,'','','' + ,0x0,0x0,0x0 +,0x0,0x0,0x0 +); +insert into t1 values +(3 +,NULL,NULL,NULL,NULL,NULL +,NULL,NULL +,NULL,NULL +,NULL,NULL +,NULL,NULL +,NULL,NULL,NULL +,NULL,NULL,NULL +,NULL,NULL,NULL +,NULL,NULL,NULL +); +Connected to Management Server at: : +Waiting for completed, this may take several minutes +Node : Backup started from node +Node : Backup started from node completed + StartGCP: StopGCP: + #Records: #LogRecords: + Data: bytes Log: bytes diff --git a/mysql-test/suite/ndb/r/ndb_basic.result b/mysql-test/suite/ndb/r/ndb_basic.result new file mode 100644 index 00000000000..4eddaeb1227 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_basic.result @@ -0,0 +1,901 @@ +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists mysqltest; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL, +attr2 INT, +attr3 VARCHAR(10) +) ENGINE=ndbcluster; +drop table t1; +SHOW GLOBAL STATUS LIKE 'ndb%'; +Variable_name Value +Ndb_cluster_node_id # +Ndb_config_from_host # +Ndb_config_from_port # +Ndb_number_of_data_nodes # +SHOW GLOBAL VARIABLES LIKE 'ndb%'; +Variable_name Value +ndb_autoincrement_prefetch_sz # +ndb_cache_check_time # +ndb_connectstring # +ndb_extra_logging # +ndb_force_send # +ndb_index_stat_cache_entries # +ndb_index_stat_enable # +ndb_index_stat_update_freq # +ndb_report_thresh_binlog_epoch_slip # +ndb_report_thresh_binlog_mem_usage # +ndb_use_copying_alter_table # +ndb_use_exact_count # +ndb_use_transactions # +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL, +attr2 INT, +attr3 VARCHAR(10) +) ENGINE=ndbcluster; +SHOW INDEX FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 pk1 A 0 NULL NULL BTREE +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); +SHOW INDEX FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 pk1 A 2 NULL NULL BTREE +SELECT pk1 FROM t1 ORDER BY pk1; +pk1 +9410 +9411 +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +9410 9412 NULL 9412 +9411 9413 17 9413 +SELECT t1.* FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +9410 9412 NULL 9412 +9411 9413 17 9413 +UPDATE t1 SET attr1=1 WHERE pk1=9410; +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +9410 1 NULL 9412 +9411 9413 17 9413 +UPDATE t1 SET pk1=2 WHERE attr1=1; +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +2 1 NULL 9412 +9411 9413 17 9413 +UPDATE t1 SET pk1=pk1 + 1; +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +3 1 NULL 9412 +9412 9413 17 9413 +UPDATE t1 SET pk1=4 WHERE pk1 = 3; +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +4 1 NULL 9412 +9412 9413 17 9413 +DELETE FROM t1; +SELECT * FROM t1; +pk1 attr1 attr2 attr3 +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), +(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); +UPDATE t1 SET attr1 = 9999; +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +7 9999 NULL NULL +8 9999 NULL NULL +9 9999 NULL NULL +10 9999 NULL NULL +11 9999 NULL NULL +12 9999 NULL NULL +13 9999 NULL NULL +9408 9999 NULL 8765 +9410 9999 NULL 9412 +UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000; +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +7 9998 NULL NULL +8 9998 NULL NULL +9 9998 NULL NULL +10 9998 NULL NULL +11 9998 NULL NULL +12 9998 NULL NULL +13 9998 NULL NULL +9408 9999 NULL 8765 +9410 9999 NULL 9412 +UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999; +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +7 9998 NULL NULL +8 9998 NULL NULL +9 9998 NULL NULL +10 9998 NULL NULL +11 9998 NULL NULL +12 9998 NULL NULL +13 9998 NULL NULL +9408 9997 NULL 8765 +9410 9997 NULL 9412 +DELETE FROM t1 WHERE pk1 = 9410; +SELECT * FROM t1 ORDER BY pk1; +pk1 attr1 attr2 attr3 +7 9998 NULL NULL +8 9998 NULL NULL +9 9998 NULL NULL +10 9998 NULL NULL +11 9998 NULL NULL +12 9998 NULL NULL +13 9998 NULL NULL +9408 9997 NULL 8765 +DELETE FROM t1; +SELECT * FROM t1; +pk1 attr1 attr2 attr3 +INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); +DELETE FROM t1 WHERE attr1=4; +SELECT * FROM t1 order by pk1; +pk1 attr1 attr2 attr3 +3 5 NULL NULL +5 5 NULL NULL +DELETE FROM t1; +INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); +DELETE FROM t1 WHERE pk1 = 9410; +SELECT * FROM t1; +pk1 attr1 attr2 attr3 +9411 9413 NULL NULL +DROP TABLE t1; +CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; +INSERT INTO t1 values(3456, 7890); +SELECT * FROM t1; +id id2 +3456 7890 +UPDATE t1 SET id=2 WHERE id2=12; +SELECT * FROM t1; +id id2 +3456 7890 +UPDATE t1 SET id=1234 WHERE id2=7890; +SELECT * FROM t1; +id id2 +1234 7890 +DELETE FROM t1; +INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); +SELECT * FROM t1 ORDER BY id; +id id2 +3454 7890 +3456 7890 +3456 7890 +3456 7890 +DELETE FROM t1 WHERE id = 3456; +SELECT * FROM t1 ORDER BY id; +id id2 +3454 7890 +DROP TABLE t1; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL +) ENGINE=NDBCLUSTER; +INSERT INTO t1 values(1, 9999); +DROP TABLE t1; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL +) ENGINE=NDB; +INSERT INTO t1 values(1, 9999); +DROP TABLE t1; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +CREATE TABLE t3 ( +a bigint unsigned NOT NULL, +b bigint unsigned not null, +c bigint unsigned, +PRIMARY KEY(a) +) engine=ndbcluster; +CREATE TABLE t4 ( +a bigint unsigned NOT NULL, +b bigint unsigned not null, +c bigint unsigned NOT NULL, +d int unsigned, +PRIMARY KEY(a, b, c) +) engine=ndbcluster; +select * from t2 where a = 7 order by b; +a b c +7 16 5 +select * from t2 where a = 7 order by a; +a b c +7 16 5 +select * from t2 where a = 7 order by 2; +a b c +7 16 5 +select * from t2 where a = 7 order by c; +a b c +7 16 5 +select * from t2 where a = 7 and b = 16 order by b; +a b c +7 16 5 +select * from t2 where a = 7 and b = 16 order by a; +a b c +7 16 5 +select * from t2 where a = 7 and b = 17 order by a; +a b c +select * from t2 where a = 7 and b != 16 order by b; +a b c +select * from t2 where a = 7 and b = 16 and c = 5 order by b; +a b c +7 16 5 +select * from t2 where a = 7 and b = 16 and c = 5 order by a; +a b c +7 16 5 +select * from t2 where a = 7 and b = 16 and c = 6 order by a; +a b c +select * from t2 where a = 7 and b != 16 and c = 5 order by b; +a b c +select * from t3 where a = 7 order by b; +a b c +7 16 5 +select * from t3 where a = 7 order by a; +a b c +7 16 5 +select * from t3 where a = 7 order by 2; +a b c +7 16 5 +select * from t3 where a = 7 order by c; +a b c +7 16 5 +select * from t3 where a = 7 and b = 16 order by b; +a b c +7 16 5 +select * from t3 where a = 7 and b = 16 order by a; +a b c +7 16 5 +select * from t3 where a = 7 and b = 17 order by a; +a b c +select * from t3 where a = 7 and b != 16 order by b; +a b c +select * from t4 where a = 7 order by b; +a b c d +7 16 5 26007 +select * from t4 where a = 7 order by a; +a b c d +7 16 5 26007 +select * from t4 where a = 7 order by 2; +a b c d +7 16 5 26007 +select * from t4 where a = 7 order by c; +a b c d +7 16 5 26007 +select * from t4 where a = 7 and b = 16 order by b; +a b c d +7 16 5 26007 +select * from t4 where a = 7 and b = 16 order by a; +a b c d +7 16 5 26007 +select * from t4 where a = 7 and b = 17 order by a; +a b c d +select * from t4 where a = 7 and b != 16 order by b; +a b c d +delete from t2 where a > 5; +select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; +a b +1 10 +3 12 +5 14 +select a, b FROM t2 outer_table where +a = (select a from t2 where b = outer_table.b ) order by a; +a b +1 10 +3 12 +5 14 +delete from t2; +delete from t3; +delete from t4; +drop table t2; +drop table t3; +drop table t4; +CREATE TABLE t5 ( +a bigint unsigned NOT NULL, +b bigint unsigned not null, +c bigint unsigned NOT NULL, +d int unsigned, +PRIMARY KEY(a, b, c) +) engine=ndbcluster; +insert into t5 values(10, 19, 5, 26010); +delete from t5 where a=10 and b=19 and c=5; +select * from t5; +a b c d +insert into t5 values(10, 19, 5, 26010); +update t5 set d=21997 where a=10 and b=19 and c=5; +select * from t5; +a b c d +10 19 5 21997 +delete from t5; +drop table t5; +CREATE TABLE t6 ( +adress char(255), +a int NOT NULL PRIMARY KEY, +b int +) engine = NDB; +insert into t6 values +("Nice road 3456", 1, 23), +("Street Road 78", 3, 92), +("Road street 89C", 5, 71), +(NULL, 7, NULL); +select * from t6 order by a; +adress a b +Nice road 3456 1 23 +Street Road 78 3 92 +Road street 89C 5 71 +NULL 7 NULL +select a, b from t6 order by a; +a b +1 23 +3 92 +5 71 +7 NULL +update t6 set adress="End of road 09" where a=3; +update t6 set b=181, adress="Street 76" where a=7; +select * from t6 order by a; +adress a b +Nice road 3456 1 23 +End of road 09 3 92 +Road street 89C 5 71 +Street 76 7 181 +select * from t6 where a=1; +adress a b +Nice road 3456 1 23 +delete from t6 where a=1; +select * from t6 order by a; +adress a b +End of road 09 3 92 +Road street 89C 5 71 +Street 76 7 181 +delete from t6 where b=71; +select * from t6 order by a; +adress a b +End of road 09 3 92 +Street 76 7 181 +drop table t6; +CREATE TABLE t7 ( +adress char(255), +a int NOT NULL, +b int, +c int NOT NULL, +PRIMARY KEY(a, c) +) engine = NDB; +insert into t7 values +("Highway 3456", 1, 23, 2), +("Street Road 78", 3, 92, 3), +("Main street 89C", 5, 71, 4), +(NULL, 8, NULL, 12); +select * from t7 order by a; +adress a b c +Highway 3456 1 23 2 +Street Road 78 3 92 3 +Main street 89C 5 71 4 +NULL 8 NULL 12 +select a, b from t7 order by a; +a b +1 23 +3 92 +5 71 +8 NULL +update t7 set adress="End of road 09" where a=3; +update t7 set adress="Gatuvägen 90C" where a=5 and c=4; +update t7 set adress="No adress" where adress is NULL; +select * from t7 order by a; +adress a b c +Highway 3456 1 23 2 +End of road 09 3 92 3 +Gatuvägen 90C 5 71 4 +No adress 8 NULL 12 +select * from t7 where a=1 and c=2; +adress a b c +Highway 3456 1 23 2 +delete from t7 where a=1; +delete from t7 where a=3 and c=3; +delete from t7 where a=5 and c=4; +select * from t7; +adress a b c +No adress 8 NULL 12 +delete from t7 where b=23; +select * from t7; +adress a b c +No adress 8 NULL 12 +drop table t7; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL, +attr2 INT, +attr3 VARCHAR(10) +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); +create database mysqltest; +use mysqltest; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +insert into t2 select pk1,attr1,attr2 from test.t1; +select * from t2 order by a; +a b c +9410 9412 NULL +9411 9413 17 +select b from test.t1, t2 where c = test.t1.attr2; +b +9413 +select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; +b attr1 +9413 9412 +drop table test.t1, t2; +drop database mysqltest; +drop database if exists ndbtest1; +create database ndbtest1; +use ndbtest1; +create table t1(id int) engine=ndbcluster; +drop database ndbtest1; +drop database ndbtest1; +ERROR HY000: Can't drop database 'ndbtest1'; database doesn't exist +use test; +create table t1 (a int primary key, b char(0)); +insert into t1 values (1,""); +insert into t1 values (2,NULL); +select * from t1 order by a; +a b +1 +2 NULL +select * from t1 order by b; +a b +2 NULL +1 +select * from t1 where b IS NULL; +a b +2 NULL +select * from t1 where b IS NOT NULL; +a b +1 +drop table t1; +create table t1 ( +c1 int, +c2 int, +c3 int, +c4 int, +c5 int, +c6 int, +c7 int, +c8 int, +c9 int, +c10 int, +c11 int, +c12 int, +c13 int, +c14 int, +c15 int, +c16 int, +c17 int, +c18 int, +c19 int, +c20 int, +c21 int, +c22 int, +c23 int, +c24 int, +c25 int, +c26 int, +c27 int, +c28 int, +c29 int, +c30 int, +c31 int, +c32 int, +c33 int, +c34 int, +c35 int, +c36 int, +c37 int, +c38 int, +c39 int, +c40 int, +c41 int, +c42 int, +c43 int, +c44 int, +c45 int, +c46 int, +c47 int, +c48 int, +c49 int, +c50 int, +c51 int, +c52 int, +c53 int, +c54 int, +c55 int, +c56 int, +c57 int, +c58 int, +c59 int, +c60 int, +c61 int, +c62 int, +c63 int, +c64 int, +c65 int, +c66 int, +c67 int, +c68 int, +c69 int, +c70 int, +c71 int, +c72 int, +c73 int, +c74 int, +c75 int, +c76 int, +c77 int, +c78 int, +c79 int, +c80 int, +c81 int, +c82 int, +c83 int, +c84 int, +c85 int, +c86 int, +c87 int, +c88 int, +c89 int, +c90 int, +c91 int, +c92 int, +c93 int, +c94 int, +c95 int, +c96 int, +c97 int, +c98 int, +c99 int, +c100 int, +c101 int, +c102 int, +c103 int, +c104 int, +c105 int, +c106 int, +c107 int, +c108 int, +c109 int, +c110 int, +c111 int, +c112 int, +c113 int, +c114 int, +c115 int, +c116 int, +c117 int, +c118 int, +c119 int, +c120 int, +c121 int, +c122 int, +c123 int, +c124 int, +c125 int, +c126 int, +c127 int, +c128 int, +primary key using hash(c1)) engine=ndb partition by key(c1); +drop table t1; +create table t1 ( +a1234567890123456789012345678901234567890 int primary key, +a12345678901234567890123456789a1234567890 int, +index(a12345678901234567890123456789a1234567890) +) engine=ndb; +show tables; +Tables_in_test +t1 +insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); +explain select * from t1 where a12345678901234567890123456789a1234567890=2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref a12345678901234567890123456789a1234567890 a12345678901234567890123456789a1234567890 5 const # Using where with pushed condition +select * from t1 where a12345678901234567890123456789a1234567890=2; +a1234567890123456789012345678901234567890 a12345678901234567890123456789a1234567890 +5 2 +drop table t1; +create table t1 +(a bigint, b bigint, c bigint, d bigint, +primary key (a,b,c,d)) +engine=ndb +max_rows=800000000; +Warnings: +Warning 1105 Ndb might have problems storing the max amount of rows specified +insert into t1 values +(1,2,3,4),(2,3,4,5),(3,4,5,6), +(3,2,3,4),(1,3,4,5),(2,4,5,6), +(1,2,3,5),(2,3,4,8),(3,4,5,9), +(3,2,3,5),(1,3,4,8),(2,4,5,9), +(1,2,3,6),(2,3,4,6),(3,4,5,7), +(3,2,3,6),(1,3,4,6),(2,4,5,7), +(1,2,3,7),(2,3,4,7),(3,4,5,8), +(3,2,3,7),(1,3,4,7),(2,4,5,8), +(1,3,3,4),(2,4,4,5),(3,5,5,6), +(3,3,3,4),(1,4,4,5),(2,5,5,6), +(1,3,3,5),(2,4,4,8),(3,5,5,9), +(3,3,3,5),(1,4,4,8),(2,5,5,9), +(1,3,3,6),(2,4,4,6),(3,5,5,7), +(3,3,3,6),(1,4,4,6),(2,5,5,7), +(1,3,3,7),(2,4,4,7),(3,5,5,8), +(3,3,3,7),(1,4,4,7),(2,5,5,8); +select count(*) from t1; +count(*) +48 +drop table t1; +create table t1 +(a bigint, b bigint, c bigint, d bigint, +primary key (a)) +engine=ndb +max_rows=1; +drop table t1; +create table t1 +(counter int(64) NOT NULL auto_increment, +datavalue char(40) default 'XXXX', +primary key (counter) +) ENGINE=ndbcluster; +insert into t1 (datavalue) values ('newval'); +insert into t1 (datavalue) values ('newval'); +select * from t1 order by counter; +counter datavalue +1 newval +2 newval +insert into t1 (datavalue) select datavalue from t1 where counter < 100; +insert into t1 (datavalue) select datavalue from t1 where counter < 100; +select * from t1 order by counter; +counter datavalue +1 newval +2 newval +3 newval +4 newval +5 newval +6 newval +7 newval +8 newval +insert into t1 (datavalue) select datavalue from t1 where counter < 100; +insert into t1 (datavalue) select datavalue from t1 where counter < 100; +select * from t1 order by counter; +counter datavalue +1 newval +2 newval +3 newval +4 newval +5 newval +6 newval +7 newval +8 newval +9 newval +10 newval +11 newval +12 newval +13 newval +14 newval +15 newval +16 newval +17 newval +18 newval +19 newval +20 newval +21 newval +22 newval +23 newval +24 newval +25 newval +26 newval +27 newval +28 newval +29 newval +30 newval +31 newval +32 newval +drop table t1; +create table t1 (a int primary key auto_increment) engine = ndb; +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +insert into t1(a) values (20),(28); +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +insert into t1() values (21), (22); +drop table t1; +CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; +select * from t1; +b +drop table t1; +create table t1 (a int) engine=ndb; +create table t2 (a int) engine=ndb; +insert into t1 values (1); +insert into t2 values (1); +delete t1.* from t1, t2 where t1.a = t2.a; +select * from t1; +a +select * from t2; +a +1 +drop table t1; +drop table t2; +CREATE TABLE t1 ( +i INT, +j INT, +x INT, +y INT, +z INT +) engine=ndb; +CREATE TABLE t2 ( +i INT, +k INT, +x INT, +y INT, +z INT +) engine=ndb; +CREATE TABLE t3 ( +j INT, +k INT, +x INT, +y INT, +z INT +) engine=ndb; +INSERT INTO t1 VALUES ( 1, 2,13,14,15); +INSERT INTO t2 VALUES ( 1, 3,23,24,25); +INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); +UPDATE t1 AS a +INNER JOIN t2 AS b +ON a.i = b.i +INNER JOIN t3 AS c +ON a.j = c.j AND b.k = c.k +SET a.x = b.x, +a.y = b.y, +a.z = ( +SELECT sum(z) +FROM t3 +WHERE y = 34 +) +WHERE b.x = 23; +select * from t1; +i j x y z +1 2 23 24 71 +drop table t1; +drop table t2; +drop table t3; +create table atablewithareallylongandirritatingname (a int); +insert into atablewithareallylongandirritatingname values (2); +select * from atablewithareallylongandirritatingname; +a +2 +drop table atablewithareallylongandirritatingname; +create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; +insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); +insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); +select * from t1 order by f1; +f1 f2 f3 +111111 aaaaaa 1 +222222 bbbbbb 2 +select * from t1 order by f2; +f1 f2 f3 +111111 aaaaaa 1 +222222 bbbbbb 2 +select * from t1 order by f3; +f1 f2 f3 +111111 aaaaaa 1 +222222 bbbbbb 2 +drop table t1; +Illegal ndb error code: 1186 +CREATE TABLE t1 ( +a VARBINARY(40) NOT NULL, +b VARCHAR (256) CHARACTER SET UTF8 NOT NULL, +c VARCHAR(256) CHARACTER SET UTF8 NOT NULL, +PRIMARY KEY (b,c)) ENGINE=ndbcluster; +INSERT INTO t1 VALUES +("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc"); +SELECT * FROM t1 ORDER BY a; +a b c +a ab abc +b abc abcd +c abc ab +d ab ab +e abc abc +DROP TABLE t1; +create table t1 (a int not null primary key, b int not null) engine=ndb; +create table t2 (a int not null primary key, b int not null) engine=ndb; +insert into t1 values (1,10), (2,20), (3,30); +insert into t2 values (1,10), (2,20), (3,30); +select * from t1 order by a; +a b +1 10 +2 20 +3 30 +delete from t1 where a > 0 order by a desc limit 1; +select * from t1 order by a; +a b +1 10 +2 20 +delete from t1,t2 using t1,t2 where t1.a = t2.a; +select * from t2 order by a; +a b +3 30 +drop table t1,t2; +create table t1 (a int not null primary key, b int not null) engine=ndb; +insert into t1 values (1,10), (2,20), (3,30); +insert into t1 set a=1, b=100; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +insert ignore into t1 set a=1, b=100; +select * from t1 order by a; +a b +1 10 +2 20 +3 30 +insert into t1 set a=1, b=1000 on duplicate key update b=b+1; +select * from t1 order by a; +a b +1 11 +2 20 +3 30 +drop table t1; +create table t1 (a int not null primary key, b int not null) engine=ndb; +create table t2 (c int not null primary key, d int not null) engine=ndb; +insert into t1 values (1,10), (2,10), (3,30), (4, 30); +insert into t2 values (1,10), (2,10), (3,30), (4, 30); +update t1 set a = 1 where a = 3; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +select * from t1 order by a; +a b +1 10 +2 10 +3 30 +4 30 +update t1 set b = 1 where a > 1 order by a desc limit 1; +select * from t1 order by a; +a b +1 10 +2 10 +3 30 +4 1 +update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +select * from t1 order by a; +a b +1 10 +2 10 +3 30 +4 1 +update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; +select * from t1 order by a; +a b +1 10 +2 10 +3 30 +4 1 +drop table t1,t2; +End of 5.0 tests +CREATE TABLE t1 (a VARCHAR(255) NOT NULL, +CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb; +CREATE TABLE t2(a VARCHAR(255) NOT NULL, +b VARCHAR(255) NOT NULL, +c VARCHAR(255) NOT NULL, +CONSTRAINT pk_b_c_id PRIMARY KEY (b,c), +CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb; +drop table t1, t2; +create table t1 (a int not null primary key, b int) engine=ndb; +insert into t1 values(1,1),(2,2),(3,3); +create table t2 like t1; +insert into t2 select * from t1; +select * from t1 order by a; +a b +1 1 +2 2 +3 3 +select * from t2 order by a; +a b +1 1 +2 2 +3 3 +drop table t1, t2; +create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; +create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; +create table t2 like t1; +rename table t1 to t10, t2 to t20; +drop table t10,t20; +End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_binlog_basic.result b/mysql-test/suite/ndb/r/ndb_binlog_basic.result new file mode 100644 index 00000000000..931d01dbebe --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_binlog_basic.result @@ -0,0 +1,51 @@ +drop table if exists t1, t2; +drop database if exists mysqltest; +create database mysqltest; +use mysqltest; +drop database mysqltest; +use test; +create table t1 (a int primary key) engine=ndb; +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; +@max_epoch:=max(epoch)-1 +# +delete from t1; +alter table t1 add (b int); +insert into t1 values (3,3),(4,4); +alter table t1 rename t2; +begin; +insert into t2 values (1,1),(2,2); +update t2 set b=1 where a=3; +delete from t2 where a=4; +commit; +drop table t2; +select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5; +inserts +10 +select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5; +deletes +10 +select inserts,updates,deletes from +mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0; +inserts updates deletes +2 1 1 +flush logs; +purge master logs before now(); +select count(*) from mysql.ndb_binlog_index; +count(*) +0 +create table t1 (a int primary key, b int) engine=ndb; +create database mysqltest; +use mysqltest; +create table t1 (c int, d int primary key) engine=ndb; +use test; +insert into mysqltest.t1 values (2,1),(2,2); +select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; +@max_epoch:=max(epoch)-1 +# +drop table t1; +drop database mysqltest; +select inserts,updates,deletes from +mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0; +inserts updates deletes +2 0 0 diff --git a/mysql-test/suite/ndb/r/ndb_binlog_basic2.result b/mysql-test/suite/ndb/r/ndb_binlog_basic2.result new file mode 100644 index 00000000000..9b9f642bd86 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_binlog_basic2.result @@ -0,0 +1,12 @@ +set session binlog_format=row; +ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet +set session binlog_format=statement; +ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet +set global binlog_format=row; +ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet +set global binlog_format=statement; +ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet +set session binlog_format=default; +ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet +set global binlog_format=default; +ERROR HY000: The NDB cluster engine does not support changing the binlog format on the fly yet diff --git a/mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result b/mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result new file mode 100644 index 00000000000..6631feeaa17 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_binlog_ddl_multi.result @@ -0,0 +1,196 @@ +drop database if exists mysqltest; +drop table if exists t1,t2,t3; +drop database if exists mysqltest; +drop table if exists t1,t2,t3; +reset master; +reset master; +create database mysqltest; +use mysqltest; +create table t1 (a int primary key) engine=ndb; +create table t2 (a int primary key) engine=ndb; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 1 # create database mysqltest +master-bin1.000001 # Query 1 # use `mysqltest`; create table t1 (a int primary key) engine=ndb +master-bin1.000001 # Query 102 # use `test`; create table t2 (a int primary key) engine=ndb +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # create database mysqltest +master-bin.000001 # Query 1 # use `mysqltest`; create table t1 (a int primary key) engine=ndb +master-bin.000001 # Query 102 # use `test`; create table t2 (a int primary key) engine=ndb +reset master; +reset master; +alter table t2 add column (b int); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 102 # use `test`; alter table t2 add column (b int) +reset master; +reset master; +ALTER DATABASE mysqltest CHARACTER SET latin1; +drop table mysqltest.t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 102 # ALTER DATABASE mysqltest CHARACTER SET latin1 +master-bin.000001 # Query 102 # use `mysqltest`; drop table `t1` +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 102 # ALTER DATABASE mysqltest CHARACTER SET latin1 +master-bin.000001 # Query 102 # use `mysqltest`; drop table `t1` +reset master; +reset master; +use test; +insert into t2 values (1,2); +drop database mysqltest; +create table t1 (a int primary key) engine=ndb; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 102 # BEGIN +master-bin1.000001 # Table_map 102 # table_id: # (test.t2) +master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F +master-bin1.000001 # Query 102 # COMMIT +master-bin1.000001 # Query 1 # drop database mysqltest +master-bin1.000001 # Query 1 # use `test`; create table t1 (a int primary key) engine=ndb +drop table t2; +reset master; +reset master; +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE = NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile02.dat' +ENGINE = NDB; +DROP TABLESPACE ts1 +ENGINE = NDB; +DROP LOGFILE GROUP lg1 +ENGINE =NDB; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 1 # CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB +master-bin1.000001 # Query 1 # ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB +master-bin1.000001 # Query 1 # CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB +master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB +master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE = NDB +master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile02.dat' +ENGINE = NDB +master-bin1.000001 # Query 1 # DROP TABLESPACE ts1 +ENGINE = NDB +master-bin1.000001 # Query 1 # DROP LOGFILE GROUP lg1 +ENGINE =NDB +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 1 # CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB +master-bin1.000001 # Query 1 # ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB +master-bin1.000001 # Query 1 # CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB +master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB +master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE = NDB +master-bin1.000001 # Query 1 # ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile02.dat' +ENGINE = NDB +master-bin1.000001 # Query 1 # DROP TABLESPACE ts1 +ENGINE = NDB +master-bin1.000001 # Query 1 # DROP LOGFILE GROUP lg1 +ENGINE =NDB +drop table t1; +reset master; +show tables; +Tables_in_test +reset master; +show tables; +Tables_in_test +create table t1 (a int key) engine=ndb; +create table t2 (a int key) engine=ndb; +create table t3 (a int key) engine=ndb; +rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 1 # use `test`; create table t1 (a int key) engine=ndb +master-bin1.000001 # Query 1 # use `test`; create table t2 (a int key) engine=ndb +master-bin1.000001 # Query 1 # use `test`; create table t3 (a int key) engine=ndb +master-bin1.000001 # Query 1 # use `test`; rename table `test.t3` to `test.t4` +master-bin1.000001 # Query 1 # use `test`; rename table `test.t2` to `test.t3` +master-bin1.000001 # Query 1 # use `test`; rename table `test.t1` to `test.t2` +master-bin1.000001 # Query 1 # use `test`; rename table `test.t4` to `test.t1` +drop table t1; +drop table t2; +drop table t3; +reset master; +show tables; +Tables_in_test +reset master; +show tables; +Tables_in_test +create table t1 (a int key) engine=ndb; +insert into t1 values(1); +rename table t1 to t2; +insert into t2 values(2); +drop table t2; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 1 # use `test`; create table t1 (a int key) engine=ndb +master-bin1.000001 # Query 102 # BEGIN +master-bin1.000001 # Table_map 102 # table_id: # (test.t1) +master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F +master-bin1.000001 # Query 102 # COMMIT +master-bin1.000001 # Query 1 # use `test`; rename table `test.t1` to `test.t2` +master-bin1.000001 # Query 102 # BEGIN +master-bin1.000001 # Table_map 102 # table_id: # (test.t2) +master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F +master-bin1.000001 # Query 102 # COMMIT +master-bin1.000001 # Query 102 # use `test`; drop table t2 diff --git a/mysql-test/suite/ndb/r/ndb_binlog_discover.result b/mysql-test/suite/ndb/r/ndb_binlog_discover.result new file mode 100644 index 00000000000..7c3a976c4d5 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_binlog_discover.result @@ -0,0 +1,17 @@ +drop table if exists t1; +create table t1 (a int key) engine=ndb; +reset master; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Incident 1 # #1 (LOST_EVENTS) +master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 +PURGE MASTER LOGS TO 'master-bin.000002'; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query 1 # BEGIN +master-bin.000002 # Table_map 1 # table_id: # (test.t1) +master-bin.000002 # Table_map 1 # table_id: # (mysql.ndb_apply_status) +master-bin.000002 # Write_rows 1 # table_id: # +master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000002 # Query 1 # COMMIT +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result b/mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result new file mode 100644 index 00000000000..e4c9faa802c --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_binlog_ignore_db.result @@ -0,0 +1,11 @@ +reset master; +drop table if exists t1; +drop database if exists mysqltest; +create database mysqltest; +use mysqltest; +create table t1 (a int primary key, b int) engine=ndb; +insert into t1 values (1, 1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; drop table if exists t1 +drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_log_bin.result b/mysql-test/suite/ndb/r/ndb_binlog_log_bin.result new file mode 100644 index 00000000000..f80a46324e0 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_binlog_log_bin.result @@ -0,0 +1,80 @@ +drop table if exists t1,t2,t3; +reset master; +drop table if exists t1,t2,t3; +reset master; +set SQL_LOG_BIN=0; +create database mysqltest; +use mysqltest; +create table t1 (a int key, b int) engine=ndb; +create table t2 (a int key, b int) engine=ndb; +insert into t1 values (1,1); +alter table t1 add c int; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # table_id: # (mysqltest.t1) +master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # COMMIT +reset master; +use mysqltest; +insert into t2 values (1,1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 102 # BEGIN +master-bin1.000001 # Table_map 102 # table_id: # (mysqltest.t1) +master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) +master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F +master-bin1.000001 # Query 102 # COMMIT +master-bin1.000001 # Query 102 # BEGIN +master-bin1.000001 # Table_map 102 # table_id: # (mysqltest.t2) +master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F +master-bin1.000001 # Query 102 # COMMIT +reset master; +use mysqltest; +drop table t1; +drop table t2; +create table t1 (d int key, e int) engine=ndb; +create table t2 (d int key, e int) engine=ndb; +insert into t1 values (1,1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # table_id: # (mysqltest.t2) +master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows 1 # table_id: # +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # COMMIT +master-bin.000001 # Query 1 # use `mysqltest`; drop table t1 +master-bin.000001 # Query 1 # use `mysqltest`; drop table t2 +master-bin.000001 # Query 1 # use `mysqltest`; create table t1 (d int key, e int) engine=ndb +master-bin.000001 # Query 1 # use `mysqltest`; create table t2 (d int key, e int) engine=ndb +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # table_id: # (mysqltest.t1) +master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows 1 # table_id: # +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # COMMIT +use mysqltest; +insert into t2 values (1,1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 1 # use `mysqltest`; drop table `t1` +master-bin1.000001 # Query 1 # use `mysqltest`; drop table `t2` +master-bin1.000001 # Query 1 # use `mysqltest`; create table t1 (d int key, e int) engine=ndb +master-bin1.000001 # Query 1 # use `mysqltest`; create table t2 (d int key, e int) engine=ndb +master-bin1.000001 # Query 102 # BEGIN +master-bin1.000001 # Table_map 102 # table_id: # (mysqltest.t1) +master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F +master-bin1.000001 # Query 102 # COMMIT +master-bin1.000001 # Query 102 # BEGIN +master-bin1.000001 # Table_map 102 # table_id: # (mysqltest.t2) +master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F +master-bin1.000001 # Query 102 # COMMIT +drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_multi.result b/mysql-test/suite/ndb/r/ndb_binlog_multi.result new file mode 100644 index 00000000000..bf9b34db64b --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_binlog_multi.result @@ -0,0 +1,84 @@ +drop table if exists t1,t2,t3; +drop table if exists t1,t2,t3; +CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; +DROP TABLE t3; +reset master; +reset master; +CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; +INSERT INTO t2 VALUES (1,1),(2,2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 102 # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB +master-bin1.000001 # Query 102 # BEGIN +master-bin1.000001 # Table_map 102 # table_id: # (test.t2) +master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F +master-bin1.000001 # Query 102 # COMMIT +select * from t2 order by a; +a b +1 1 +2 2 +SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM +mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; +@the_epoch:=epoch inserts updates deletes schemaops + 2 0 0 0 +SELECT * FROM t2 ORDER BY a; +a b +1 1 +2 2 +DROP TABLE t2; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 102 # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # table_id: # (test.t2) +master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows 1 # table_id: # +master-bin.000001 # Write_rows 1 # table_id: # +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # COMMIT +master-bin.000001 # Query 1 # use `test`; DROP TABLE t2 +SELECT inserts,updates,deletes,schemaops FROM +mysql.ndb_binlog_index WHERE epoch=; +inserts updates deletes schemaops +2 0 0 0 +reset master; +reset master; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; +INSERT INTO t1 VALUES (1),(2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 102 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB +master-bin1.000001 # Query 102 # BEGIN +master-bin1.000001 # Table_map 102 # table_id: # (test.t1) +master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F +master-bin1.000001 # Query 102 # COMMIT +SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM +mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; +@the_epoch2:=epoch inserts updates deletes schemaops + 2 0 0 0 +SELECT inserts,updates,deletes,schemaops FROM +mysql.ndb_binlog_index WHERE epoch > AND epoch <= ; +inserts updates deletes schemaops +2 0 0 0 +drop table t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin1.000001 # Query 102 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB +master-bin1.000001 # Query 102 # BEGIN +master-bin1.000001 # Table_map 102 # table_id: # (test.t1) +master-bin1.000001 # Table_map 102 # table_id: # (mysql.ndb_apply_status) +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # +master-bin1.000001 # Write_rows 102 # table_id: # flags: STMT_END_F +master-bin1.000001 # Query 102 # COMMIT +master-bin1.000001 # Query 102 # use `test`; drop table t1 +SELECT inserts,updates,deletes,schemaops FROM +mysql.ndb_binlog_index WHERE epoch > AND epoch <= ; +inserts updates deletes schemaops +2 0 0 0 diff --git a/mysql-test/suite/ndb/r/ndb_bitfield.result b/mysql-test/suite/ndb/r/ndb_bitfield.result new file mode 100644 index 00000000000..59c4d420b22 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_bitfield.result @@ -0,0 +1,224 @@ +drop table if exists t1; +create table t1 ( +pk1 int not null primary key, +b bit(64) +) engine=ndbcluster; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `pk1` int(11) NOT NULL, + `b` bit(64) DEFAULT NULL, + PRIMARY KEY (`pk1`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +insert into t1 values +(0,b'1111111111111111111111111111111111111111111111111111111111111111'), +(1,b'1000000000000000000000000000000000000000000000000000000000000000'), +(2,b'0000000000000000000000000000000000000000000000000000000000000001'), +(3,b'1010101010101010101010101010101010101010101010101010101010101010'), +(4,b'0101010101010101010101010101010101010101010101010101010101010101'); +select hex(b) from t1 order by pk1; +hex(b) +FFFFFFFFFFFFFFFF +8000000000000000 +1 +AAAAAAAAAAAAAAAA +5555555555555555 +drop table t1; +create table t1 ( +pk1 int not null primary key, +b bit(9) +) engine=ndbcluster; +insert into t1 values +(0,b'000000000'), +(1,b'000000001'), +(2,b'000000010'), +(3,b'000000011'), +(4,b'000000100'); +select hex(b) from t1 order by pk1; +hex(b) +0 +1 +2 +3 +4 +update t1 set b = b + b'101010101'; +select hex(b) from t1 order by pk1; +hex(b) +155 +156 +157 +158 +159 +drop table t1; +create table t1 (a bit(7), b bit(9)) engine = ndbcluster; +insert into t1 values +(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), +(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), +(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), +(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), +(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), +(44, 307), (68, 454), (57, 135); +select a+0 from t1 order by a; +a+0 +0 +4 +5 +9 +23 +24 +28 +29 +30 +31 +34 +44 +49 +56 +57 +59 +60 +61 +68 +68 +75 +77 +78 +79 +87 +88 +94 +94 +104 +106 +108 +111 +116 +118 +119 +122 +123 +127 +select b+0 from t1 order by b; +b+0 +36 +42 +46 +67 +83 +118 +123 +133 +135 +152 +177 +178 +188 +202 +206 +245 +280 +307 +343 +345 +349 +351 +363 +368 +368 +379 +380 +390 +398 +399 +403 +411 +411 +438 +446 +454 +468 +499 +drop table t1; +create table t1 ( +dummyKey INTEGER NOT NULL, +a001 TINYINT, +a010 TINYINT, +a012 TINYINT, +a015 TINYINT, +a016 TINYINT, +a017 TINYINT, +a019 TINYINT, +a029 TINYINT, +a030 TINYINT, +a031 TINYINT, +a032 TINYINT, +a042 TINYINT, +a043 TINYINT, +a044 TINYINT, +a3001 TINYINT, +a3002 TINYINT, +a3003 TINYINT, +a3004 TINYINT, +a3005 TINYINT, +a3021 TINYINT, +a3022 TINYINT, +a BIT(6), +b BIT(6), +c BIT(6), +d TINYINT, +e TINYINT, +f TINYINT, +g TINYINT, +h TINYINT, +i TINYINT, +j TINYINT, +k TINYINT, +l TINYINT, +m TINYINT, +n TINYINT, +o TINYINT, +a034 TINYINT, +PRIMARY KEY USING HASH (dummyKey) ) engine=ndb; +INSERT INTO `t1` VALUES +(1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1), +(2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1), +(3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1), +(4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1), +(5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1), +(6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1), +(7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1), +(8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO `t1` VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x01,0x3F,0x3E,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO `t1` VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x02,0x00,0x3D,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO `t1` VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x04,0x0F,0x3B,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO `t1` VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x08,0x30,0x37,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO `t1` VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x10,0x21,0x2F,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO `t1` VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x20,0x12,0x1F,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO `t1` VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x00,0x0C,0x3F,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO `t1` VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x3F,0x00,0x00,4,5,5,5,5,5,5,5,5,5,3,2,1); +drop table t1; +create table t1 ( +pk1 bit(9) not null primary key, +b int +) engine=ndbcluster; +ERROR HY000: Can't create table 'test.t1' (errno: 906) +show warnings; +Level Code Message +Error 1296 Got error 906 'Unsupported attribute type in index' from NDB +Error 1005 Can't create table 'test.t1' (errno: 906) +create table t1 ( +pk1 int not null primary key, +b bit(9), +key(b) +) engine=ndbcluster; +ERROR HY000: Can't create table 'test.t1' (errno: 906) +show warnings; +Level Code Message +Error 1296 Got error 906 'Unsupported attribute type in index' from NDB +Error 1005 Can't create table 'test.t1' (errno: 906) +create table t1 ( +pk1 int primary key, +b bit(32) not null +) engine=ndbcluster; +insert into t1 values (1,1); +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_blob.result b/mysql-test/suite/ndb/r/ndb_blob.result new file mode 100644 index 00000000000..34f2c5fdd66 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_blob.result @@ -0,0 +1,570 @@ +drop table if exists t1; +drop database if exists test2; +set autocommit=0; +create table t1 ( +a int not null primary key, +b text not null, +c int not null, +d longblob, +key (c) +) engine=ndbcluster; +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +select length(@x0),length(@b1),length(@d1) from dual; +length(@x0) length(@b1) length(@d1) +256 2256 3000 +select length(@x0),length(@b2),length(@d2) from dual; +length(@x0) length(@b2) length(@d2) +256 20000 30000 +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1 where a = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const # +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=1; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=2; +a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) +2 20000 b2 30000 dd2 +update t1 set b=@b2,d=@d2 where a=1; +update t1 set b=@b1,d=@d1 where a=2; +commit; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=1; +a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) +1 20000 b2 30000 dd2 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=2; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +2 2256 b1 3000 dd1 +update t1 set b=concat(b,b),d=concat(d,d) where a=1; +update t1 set b=concat(b,b),d=concat(d,d) where a=2; +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 where a=1; +a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) +1 40000 b2 60000 dd2 +select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) +from t1 where a=2; +a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3) +2 4512 b1 6000 dd1 +update t1 set d=null where a=1; +commit; +select a from t1 where d is null; +a +1 +delete from t1 where a=45567; +commit; +delete from t1 where a=1; +delete from t1 where a=2; +commit; +select count(*) from t1; +count(*) +0 +replace t1 set a=1,b=@b1,c=111,d=@d1; +replace t1 set a=2,b=@b2,c=222,d=@d2; +commit; +explain select * from t1 where a = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const # +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=1; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=2; +a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) +2 20000 b2 30000 dd2 +replace t1 set a=1,b=@b2,c=111,d=@d2; +replace t1 set a=2,b=@b1,c=222,d=@d1; +commit; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=1; +a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) +1 20000 b2 30000 dd2 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=2; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +2 2256 b1 3000 dd1 +replace t1 set a=1,b=concat(@b2,@b2),c=111,d=concat(@d2,@d2); +replace t1 set a=2,b=concat(@b1,@b1),c=222,d=concat(@d1,@d1); +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 where a=1; +a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) +1 40000 b2 60000 dd2 +select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) +from t1 where a=2; +a length(b) substr(b,1+4*900,2) length(d) substr(d,1+6*900,3) +2 4512 b1 6000 dd1 +replace t1 set a=1,b='xyz',c=111,d=null; +commit; +select a,b from t1 where d is null; +a b +1 xyz +delete from t1 where a=1; +delete from t1 where a=2; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1 where c = 111; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref c c 4 const # +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c=111; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where c=222; +a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) +2 20000 b2 30000 dd2 +update t1 set b=@b2,d=@d2 where c=111; +update t1 set b=@b1,d=@d1 where c=222; +commit; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where c=111; +a length(b) substr(b,1+2*9000,2) length(d) substr(d,1+3*9000,3) +1 20000 b2 30000 dd2 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c=222; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +2 2256 b1 3000 dd1 +update t1 set d=null where c=111; +commit; +select a from t1 where d is null; +a +1 +delete from t1 where c=111; +delete from t1 where c=222; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,'b1',111,'dd1'); +insert into t1 values(2,'b2',222,'dd2'); +insert into t1 values(3,'b3',333,'dd3'); +insert into t1 values(4,'b4',444,'dd4'); +insert into t1 values(5,'b5',555,'dd5'); +insert into t1 values(6,'b6',666,'dd6'); +insert into t1 values(7,'b7',777,'dd7'); +insert into t1 values(8,'b8',888,'dd8'); +insert into t1 values(9,'b9',999,'dd9'); +commit; +explain select * from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # +select * from t1 order by a; +a b c d +1 b1 111 dd1 +2 b2 222 dd2 +3 b3 333 dd3 +4 b4 444 dd4 +5 b5 555 dd5 +6 b6 666 dd6 +7 b7 777 dd7 +8 b8 888 dd8 +9 b9 999 dd9 +update t1 set b=concat(a,'x',b),d=concat(a,'x',d); +commit; +select * from t1 order by a; +a b c d +1 1xb1 111 1xdd1 +2 2xb2 222 2xdd2 +3 3xb3 333 3xdd3 +4 4xb4 444 4xdd4 +5 5xb5 555 5xdd5 +6 6xb6 666 6xdd6 +7 7xb7 777 7xdd7 +8 8xb8 888 8xdd8 +9 9xb9 999 9xdd9 +delete from t1; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 order by a; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +2 20000 b2 30000 dd2 +update t1 set b=concat(b,b),d=concat(d,d); +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 order by a; +a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) +1 4512 6000 +2 40000 b2 60000 dd2 +delete from t1; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,'b1',111,'dd1'); +insert into t1 values(2,'b2',222,'dd2'); +insert into t1 values(3,'b3',333,'dd3'); +insert into t1 values(4,'b4',444,'dd4'); +insert into t1 values(5,'b5',555,'dd5'); +insert into t1 values(6,'b6',666,'dd6'); +insert into t1 values(7,'b7',777,'dd7'); +insert into t1 values(8,'b8',888,'dd8'); +insert into t1 values(9,'b9',999,'dd9'); +commit; +explain select * from t1 where c >= 100 order by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 4 NULL # Using where with pushed condition; Using filesort +select * from t1 where c >= 100 order by a; +a b c d +1 b1 111 dd1 +2 b2 222 dd2 +3 b3 333 dd3 +4 b4 444 dd4 +5 b5 555 dd5 +6 b6 666 dd6 +7 b7 777 dd7 +8 b8 888 dd8 +9 b9 999 dd9 +update t1 set b=concat(a,'x',b),d=concat(a,'x',d) +where c >= 100; +commit; +select * from t1 where c >= 100 order by a; +a b c d +1 1xb1 111 1xdd1 +2 2xb2 222 2xdd2 +3 3xb3 333 3xdd3 +4 4xb4 444 4xdd4 +5 5xb5 555 5xdd5 +6 6xb6 666 6xdd6 +7 7xb7 777 7xdd7 +8 8xb8 888 8xdd8 +9 9xb9 999 9xdd9 +delete from t1 where c >= 100; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +explain select * from t1 where c >= 100 order by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range c c 4 NULL # Using where with pushed condition; Using filesort +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c >= 100 order by a; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +2 20000 b2 30000 dd2 +update t1 set b=concat(b,b),d=concat(d,d); +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 where c >= 100 order by a; +a length(b) substr(b,1+4*9000,2) length(d) substr(d,1+6*9000,3) +1 4512 6000 +2 40000 b2 60000 dd2 +delete from t1 where c >= 100; +commit; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 0; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 1; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 2; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +2 20000 b2 30000 dd2 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 order by a; +a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) +1 2256 b1 3000 dd1 +2 20000 b2 30000 dd2 +rollback; +select count(*) from t1; +count(*) +0 +insert into t1 values(1,'b1',111,'dd1'); +insert into t1 values(2,'b2',222,'dd2'); +insert into t1 values(3,'b3',333,'dd3'); +insert into t1 values(4,'b4',444,'dd4'); +insert into t1 values(5,'b5',555,'dd5'); +insert into t1 values(6,'b6',666,'dd6'); +insert into t1 values(7,'b7',777,'dd7'); +insert into t1 values(8,'b8',888,'dd8'); +insert into t1 values(9,'b9',999,'dd9'); +commit; +select * from t1 order by a; +a b c d +1 b1 111 dd1 +2 b2 222 dd2 +3 b3 333 dd3 +4 b4 444 dd4 +5 b5 555 dd5 +6 b6 666 dd6 +7 b7 777 dd7 +8 b8 888 dd8 +9 b9 999 dd9 +alter table t1 add x int; +select * from t1 order by a; +a b c d x +1 b1 111 dd1 NULL +2 b2 222 dd2 NULL +3 b3 333 dd3 NULL +4 b4 444 dd4 NULL +5 b5 555 dd5 NULL +6 b6 666 dd6 NULL +7 b7 777 dd7 NULL +8 b8 888 dd8 NULL +9 b9 999 dd9 NULL +alter table t1 drop x; +select * from t1 order by a; +a b c d +1 b1 111 dd1 +2 b2 222 dd2 +3 b3 333 dd3 +4 b4 444 dd4 +5 b5 555 dd5 +6 b6 666 dd6 +7 b7 777 dd7 +8 b8 888 dd8 +9 b9 999 dd9 +create database test2; +use test2; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +insert into t2 values (1,1,1),(2,2,2); +select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; +a b c d a b c +1 b1 111 dd1 1 1 1 +2 b2 222 dd2 2 2 2 +drop table t2; +use test; +select * from t1 order by a; +a b c d +1 b1 111 dd1 +2 b2 222 dd2 +3 b3 333 dd3 +4 b4 444 dd4 +5 b5 555 dd5 +6 b6 666 dd6 +7 b7 777 dd7 +8 b8 888 dd8 +9 b9 999 dd9 +alter table t1 add x int; +select * from t1 order by a; +a b c d x +1 b1 111 dd1 NULL +2 b2 222 dd2 NULL +3 b3 333 dd3 NULL +4 b4 444 dd4 NULL +5 b5 555 dd5 NULL +6 b6 666 dd6 NULL +7 b7 777 dd7 NULL +8 b8 888 dd8 NULL +9 b9 999 dd9 NULL +alter table t1 drop x; +select * from t1 order by a; +a b c d +1 b1 111 dd1 +2 b2 222 dd2 +3 b3 333 dd3 +4 b4 444 dd4 +5 b5 555 dd5 +6 b6 666 dd6 +7 b7 777 dd7 +8 b8 888 dd8 +9 b9 999 dd9 +drop table t1; +drop database test2; +set autocommit=0; +create table t1 ( +a int not null primary key, +b tinytext +) engine=ndbcluster; +insert into t1 values(1, 'x'); +update t1 set b = 'y'; +select * from t1; +a b +1 y +delete from t1; +select * from t1; +a b +commit; +replace t1 set a=2, b='y'; +select * from t1; +a b +2 y +delete from t1; +select * from t1; +a b +drop table t1; +set autocommit=0; +create table t1 ( +a int not null primary key, +b text not null +) engine=ndbcluster; +insert into t1 values(1, ''); +select * from t1; +a b +1 +commit; +drop table t1; +set autocommit=1; +use test; +CREATE TABLE t1 ( +a int, +b text, +PRIMARY KEY (a) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES +(1,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); +INSERT INTO t1 VALUES +(2,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'); +select * from t1 order by a; +a b +1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB +alter table t1 engine=ndb; +select * from t1 order by a; +a b +1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB +set autocommit=1; +alter table t1 engine=myisam; +select * from t1 order by a; +a b +1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +2 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB +drop table t1; +create table t1 ( +id int(11) unsigned primary key NOT NULL auto_increment, +msg text NOT NULL +) engine=ndbcluster default charset=utf8; +insert into t1 (msg) values( +'Tries to validate (8 byte length + inline bytes) as UTF8 :( +Fast fix: removed validation for Text. It is not yet indexable +so bad data will not crash kernel.'); +select * from t1; +id msg +1 Tries to validate (8 byte length + inline bytes) as UTF8 :( +Fast fix: removed validation for Text. It is not yet indexable +so bad data will not crash kernel. +drop table t1; +create table t1 ( +a int primary key not null auto_increment, +b text +) engine=ndbcluster; +select count(*) from t1; +count(*) +500 +truncate t1; +select count(*) from t1; +count(*) +0 +drop table t1; +create table t1 ( +a varchar(40) not null, +b mediumint not null, +t text, +c varchar(2) not null, +d bigint not null, +primary key (a,b,c), +key (c,a), +unique key (d) +) engine=ndb; +insert into t1 (a,b,c,d,t) values ('a',1110,'a',1,@v1); +insert into t1 (a,b,c,d,t) values ('b',1110,'a',2,@v2); +insert into t1 (a,b,c,d,t) values ('a',1110,'b',3,@v3); +insert into t1 (a,b,c,d,t) values ('b',1110,'b',4,@v4); +select a,b,c,d,sha1(t) from t1 order by c,a; +a b c d sha1(t) +a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 +b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e +a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 +b 1110 b 4 NULL +select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='a'; +a b c d sha1(t) +a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 +select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='b'; +a b c d sha1(t) +a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 +update t1 set t=@v4 where a='b' and b=1110 and c='a'; +update t1 set t=@v2 where a='b' and b=1110 and c='b'; +select a,b,c,d,sha1(t) from t1 order by c,a; +a b c d sha1(t) +a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 +b 1110 a 2 NULL +a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 +b 1110 b 4 b238654911689bfb626a3ef9dba4a1ca074e6a5e +update t1 set t=@v2 where d=2; +update t1 set t=@v4 where d=4; +select a,b,c,d,sha1(t) from t1 order by c,a; +a b c d sha1(t) +a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 +b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e +a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 +b 1110 b 4 NULL +update t1 set t=@v4 where a='b' and c='a'; +update t1 set t=@v2 where a='b' and c='b'; +select a,b,c,d,sha1(t) from t1 order by c,a; +a b c d sha1(t) +a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 +b 1110 a 2 NULL +a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 +b 1110 b 4 b238654911689bfb626a3ef9dba4a1ca074e6a5e +update t1 set t=@v2 where b+d=1112; +update t1 set t=@v4 where b+d=1114; +select a,b,c,d,sha1(t) from t1 order by c,a; +a b c d sha1(t) +a 1110 a 1 558a30713786aa72f66abc1e6a521d55aacdeeb5 +b 1110 a 2 b238654911689bfb626a3ef9dba4a1ca074e6a5e +a 1110 b 3 2b6515f29c20b8e9e17cc597527e516c0de8d612 +b 1110 b 4 NULL +delete from t1 where a='a' and b=1110 and c='a'; +delete from t1 where a='b' and c='a'; +delete from t1 where d=3; +delete from t1 where b+d=1114; +select count(*) from t1; +count(*) +0 +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_blob_partition.result b/mysql-test/suite/ndb/r/ndb_blob_partition.result new file mode 100644 index 00000000000..b08a91f0cdd --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_blob_partition.result @@ -0,0 +1,104 @@ +drop table if exists t1; +create table t1 ( +a mediumint not null, +b text not null, +c int not null, +d longblob, +primary key using hash (a,c), +unique key (c) +) +engine=ndb +partition by range (c) +partitions 3 +( partition p1 values less than (200), +partition p2 values less than (300), +partition p3 values less than (400)); +insert into t1 values (1, @v1, 101, @v2); +insert into t1 values (1, @v2, 102, @v3); +insert into t1 values (1, @v3, 103, @v4); +insert into t1 values (2, @v4, 201, @v5); +insert into t1 values (2, @v5, 202, @v6); +insert into t1 values (2, @v6, 203, @v7); +insert into t1 values (3, @v7, 301, @v8); +insert into t1 values (3, @v8, 302, @v9); +insert into t1 values (3, @v9, 303, @v1); +select a, sha1(b), c, sha1(d) from t1 order by a; +a sha1(b) c sha1(d) +1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 +1 10d3c783026b310218d10b7188da96a2401648c6 102 a33549d9844092289a58ac348dd59f09fc28406a +1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c +2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d +2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e +2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 +3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e +3 acbaba01bc2e682f015f40e79d9cbe475db3002e 302 9ee30d99162574f79c66ae95cdf132dcf9cbc259 +3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 +select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; +a sha1(b) c sha1(d) +1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 +select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; +a sha1(b) c sha1(d) +2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d +select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; +a sha1(b) c sha1(d) +3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e +update t1 set b = @v3, d = @v4 where a = 1 and c = 102; +update t1 set b = @v6, d = @v7 where a = 2 and c = 202; +update t1 set b = @v9, d = @v1 where a = 3 and c = 302; +select a, sha1(b), c, sha1(d) from t1 order by a; +a sha1(b) c sha1(d) +1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 +1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c +1 a33549d9844092289a58ac348dd59f09fc28406a 103 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c +2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d +2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 +2 090565c580809efed3d369481a4bbb168b20713e 203 1e0070bec426871a46291de27b9bd6e4255ab4e5 +3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e +3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 +3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 303 1d42dd9090cf78314a06665d4ea938c35cc760f4 +update t1 set b = @v4, d = @v5 where c = 103; +update t1 set b = @v7, d = @v8 where c = 203; +update t1 set b = @v1, d = @v2 where c = 303; +select a, sha1(b), c, sha1(d) from t1 order by a; +a sha1(b) c sha1(d) +1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 +1 a33549d9844092289a58ac348dd59f09fc28406a 102 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c +1 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 103 70fc9a7d08beebc522258bfb02000a30c77a8f1d +2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d +2 090565c580809efed3d369481a4bbb168b20713e 202 1e0070bec426871a46291de27b9bd6e4255ab4e5 +2 1e0070bec426871a46291de27b9bd6e4255ab4e5 203 acbaba01bc2e682f015f40e79d9cbe475db3002e +3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e +3 9ee30d99162574f79c66ae95cdf132dcf9cbc259 302 1d42dd9090cf78314a06665d4ea938c35cc760f4 +3 1d42dd9090cf78314a06665d4ea938c35cc760f4 303 10d3c783026b310218d10b7188da96a2401648c6 +update t1 set b = @v5, d = @v6; +select a, sha1(b), c, sha1(d) from t1 order by a; +a sha1(b) c sha1(d) +1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 101 090565c580809efed3d369481a4bbb168b20713e +1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 102 090565c580809efed3d369481a4bbb168b20713e +1 70fc9a7d08beebc522258bfb02000a30c77a8f1d 103 090565c580809efed3d369481a4bbb168b20713e +2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 201 090565c580809efed3d369481a4bbb168b20713e +2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 202 090565c580809efed3d369481a4bbb168b20713e +2 70fc9a7d08beebc522258bfb02000a30c77a8f1d 203 090565c580809efed3d369481a4bbb168b20713e +3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 301 090565c580809efed3d369481a4bbb168b20713e +3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 302 090565c580809efed3d369481a4bbb168b20713e +3 70fc9a7d08beebc522258bfb02000a30c77a8f1d 303 090565c580809efed3d369481a4bbb168b20713e +update t1 set b = @v1, d = @v2 where 100 < c and c < 200; +update t1 set b = @v4, d = @v5 where 200 < c and c < 300; +update t1 set b = @v7, d = @v8 where 300 < c and c < 400; +select a, sha1(b), c, sha1(d) from t1 order by a; +a sha1(b) c sha1(d) +1 1d42dd9090cf78314a06665d4ea938c35cc760f4 101 10d3c783026b310218d10b7188da96a2401648c6 +1 1d42dd9090cf78314a06665d4ea938c35cc760f4 102 10d3c783026b310218d10b7188da96a2401648c6 +1 1d42dd9090cf78314a06665d4ea938c35cc760f4 103 10d3c783026b310218d10b7188da96a2401648c6 +2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 201 70fc9a7d08beebc522258bfb02000a30c77a8f1d +2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 202 70fc9a7d08beebc522258bfb02000a30c77a8f1d +2 daa61c6de36a0526f0d47dc29d6b9de7e6d2630c 203 70fc9a7d08beebc522258bfb02000a30c77a8f1d +3 1e0070bec426871a46291de27b9bd6e4255ab4e5 301 acbaba01bc2e682f015f40e79d9cbe475db3002e +3 1e0070bec426871a46291de27b9bd6e4255ab4e5 302 acbaba01bc2e682f015f40e79d9cbe475db3002e +3 1e0070bec426871a46291de27b9bd6e4255ab4e5 303 acbaba01bc2e682f015f40e79d9cbe475db3002e +delete from t1 where a = 1 and c = 101; +delete from t1 where c = 102; +delete from t1; +select a, sha1(b), c, sha1(d) from t1 order by a; +a sha1(b) c sha1(d) +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_cache.result b/mysql-test/suite/ndb/r/ndb_cache.result new file mode 100644 index 00000000000..478663b1aa1 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_cache.result @@ -0,0 +1,191 @@ +drop table if exists t1; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; +CREATE TABLE t1 ( pk int not null primary key, +a int, b int not null, c varchar(20)) ENGINE=ndbcluster; +insert into t1 value (1, 2, 3, 'First row'); +select * from t1; +pk a b c +1 2 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +pk a b c +1 2 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +update t1 set a=3 where pk=1; +select * from t1; +pk a b c +1 3 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +insert into t1 value (2, 7, 8, 'Second row'); +insert into t1 value (4, 5, 6, 'Fourth row'); +select * from t1 order by pk; +pk a b c +1 3 3 First row +2 7 8 Second row +4 5 6 Fourth row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk; +pk a b c +1 3 3 First row +2 7 8 Second row +4 5 6 Fourth row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +delete from t1 where c='Fourth row'; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +use test; +select * from t1 order by pk; +pk a b c +1 3 3 First row +2 7 8 Second row +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 4 +update t1 set a=4 where b=3; +use test; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 5 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +begin; +update t1 set a=5 where pk=1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 8 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +commit; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 8 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 5 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 9 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 5 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 9 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 8 +drop table t1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +SET GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/ndb/r/ndb_cache2.result b/mysql-test/suite/ndb/r/ndb_cache2.result new file mode 100644 index 00000000000..2876002f864 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_cache2.result @@ -0,0 +1,623 @@ +drop table if exists t1, t2, t3, t4, t5; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=100; +reset query cache; +flush status; +CREATE TABLE t1 ( +pk int not null primary key, +a1 int, +b1 int not null, +c1 varchar(20) +) ENGINE=ndb; +CREATE TABLE t2 ( +pk int not null primary key, +a2 int, +b2 int not null +) ENGINE=ndb; +CREATE TABLE t3 ( +pk int not null primary key, +a3 int, +b3 int not null, +c3 int not null, +d3 varchar(20) +) ENGINE=ndb; +CREATE TABLE t4 ( +a4 int, +b4 int not null, +c4 char(20) +) ENGINE=ndbcluster; +CREATE TABLE t5 ( +pk int not null primary key, +a5 int, +b5 int not null, +c5 varchar(255) +) ENGINE=ndbcluster; +insert into t1 value (1, 2, 3, 'First row'); +insert into t2 value (1, 2, 3); +insert into t3 value (1, 2, 3, 4, '3 - First row'); +insert into t4 value (2, 3, '4 - First row'); +insert into t5 value (1, 2, 3, '5 - First row'); +select * from t1; +pk a1 b1 c1 +1 2 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +pk a1 b1 c1 +1 2 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +update t1 set a1=3 where pk=1; +select * from t1; +pk a1 b1 c1 +1 3 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +insert into t1 value (2, 7, 8, 'Second row'); +insert into t1 value (4, 5, 6, 'Fourth row'); +select * from t1 order by pk desc; +pk a1 b1 c1 +4 5 6 Fourth row +2 7 8 Second row +1 3 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk desc; +pk a1 b1 c1 +4 5 6 Fourth row +2 7 8 Second row +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b1=3; +pk a1 b1 c1 +1 3 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b1=3; +pk a1 b1 c1 +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +delete from t1 where c1='Fourth row'; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 where b1=3; +pk a1 b1 c1 +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +use test; +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 3 3 First row +select * from t1 where b1=3; +pk a1 b1 c1 +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 4 +update t1 set a1=4 where b1=3; +use test; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 4 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 5 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 4 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t2; +pk a2 b2 +1 2 3 +select * from t3; +pk a3 b3 c3 d3 +1 2 3 4 3 - First row +select * from t4; +a4 b4 c4 +2 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 2 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +flush status; +begin; +update t1 set a1=5 where pk=1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 4 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 4 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +commit; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 5 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 5 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +flush status; +begin; +update t1 set a1=6 where pk=1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 4 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 5 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 5 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 6 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +commit; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 6 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +flush status; +begin; +insert into t1 set pk=5, a1=6, b1=3, c1="New row"; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 4 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 where pk=5; +pk a1 b1 c1 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 where pk=5; +pk a1 b1 c1 +5 6 3 New row +select * from t1 where pk=5; +pk a1 b1 c1 +5 6 3 New row +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +2 7 8 Second row +1 6 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +commit; +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +flush status; +begin; +delete from t1 where pk=2; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 4 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 where pk=2; +pk a1 b1 c1 +2 7 8 Second row +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 where pk=2; +pk a1 b1 c1 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 6 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 6 3 First row +select * from t1 where pk=2; +pk a1 b1 c1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +commit; +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 6 3 First row +select * from t1 where pk=2; +pk a1 b1 c1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 4 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +flush status; +begin; +update t1 set a1=9 where pk=1; +update t2 set a2=9 where pk=1; +update t3 set a3=9 where pk=1; +update t4 set a4=9 where a4=2; +update t5 set a5=9 where pk=1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 6 3 First row +select * from t2; +pk a2 b2 +1 2 3 +select * from t3; +pk a3 b3 c3 d3 +1 2 3 4 3 - First row +select * from t4; +a4 b4 c4 +2 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 2 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 5 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t2; +pk a2 b2 +1 9 3 +select * from t3; +pk a3 b3 c3 d3 +1 9 3 4 3 - First row +select * from t4; +a4 b4 c4 +9 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 9 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 5 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +commit; +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t2; +pk a2 b2 +1 9 3 +select * from t3; +pk a3 b3 c3 d3 +1 9 3 4 3 - First row +select * from t4; +a4 b4 c4 +9 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 9 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 10 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t2; +pk a2 b2 +1 9 3 +select * from t3; +pk a3 b3 c3 d3 +1 9 3 4 3 - First row +select * from t4; +a4 b4 c4 +9 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 9 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 10 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 5 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t2; +pk a2 b2 +1 9 3 +select * from t3; +pk a3 b3 c3 d3 +1 9 3 4 3 - First row +select * from t4; +a4 b4 c4 +9 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 9 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 10 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 10 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t2; +pk a2 b2 +1 9 3 +select * from t3; +pk a3 b3 c3 d3 +1 9 3 4 3 - First row +select * from t4; +a4 b4 c4 +9 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 9 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 10 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 15 +drop table t1, t2, t3, t4, t5; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +SET GLOBAL query_cache_size=0; +SET GLOBAL ndb_cache_check_time=0; diff --git a/mysql-test/suite/ndb/r/ndb_cache_multi.result b/mysql-test/suite/ndb/r/ndb_cache_multi.result new file mode 100644 index 00000000000..388131ec30a --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_cache_multi.result @@ -0,0 +1,74 @@ +drop table if exists t1, t2; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +a +2 +select * from t2; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +update t1 set a=3 where a=2; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +drop table t1, t2; +set GLOBAL query_cache_size=0; +set GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/ndb/r/ndb_cache_multi2.result b/mysql-test/suite/ndb/r/ndb_cache_multi2.result new file mode 100644 index 00000000000..53767bb6d3c --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_cache_multi2.result @@ -0,0 +1,75 @@ +drop table if exists t1, t2; +== Connected to server1 == +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=1; +reset query cache; +flush status; +== Connected to server2 == +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=1; +reset query cache; +flush status; +== Connected to server1 == +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +a +2 +select a != 3 from t1; +a != 3 +1 +select * from t2; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 3 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +== Connected to server2 == +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +update t1 set a=3 where a=2; +== Connected to server1 == +select * from t1; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 3 +drop table t1, t2; +set GLOBAL query_cache_size=0; +set GLOBAL ndb_cache_check_time=0; +reset query cache; +flush status; +set GLOBAL query_cache_size=0; +set GLOBAL ndb_cache_check_time=0; +reset query cache; +flush status; diff --git a/mysql-test/suite/ndb/r/ndb_charset.result b/mysql-test/suite/ndb/r/ndb_charset.result new file mode 100644 index 00000000000..1c65a380039 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_charset.result @@ -0,0 +1,320 @@ +drop table if exists t1; +create table t1 ( +a char(3) character set latin1 collate latin1_bin primary key +) engine=ndb; +insert into t1 values('aAa'); +insert into t1 values('aaa'); +insert into t1 values('AAA'); +select * from t1 order by a; +a +AAA +aAa +aaa +select * from t1 where a = 'aAa'; +a +aAa +select * from t1 where a = 'aaa'; +a +aaa +select * from t1 where a = 'AaA'; +a +select * from t1 where a = 'AAA'; +a +AAA +drop table t1; +create table t1 ( +a char(3) character set latin1 collate latin1_swedish_ci primary key +) engine=ndb; +insert into t1 values('aAa'); +insert into t1 values('aaa'); +ERROR 23000: Duplicate entry 'aaa' for key 'PRIMARY' +insert into t1 values('AAA'); +ERROR 23000: Duplicate entry 'AAA' for key 'PRIMARY' +select * from t1 order by a; +a +aAa +select * from t1 where a = 'aAa'; +a +aAa +select * from t1 where a = 'aaa'; +a +aAa +select * from t1 where a = 'AaA'; +a +aAa +select * from t1 where a = 'AAA'; +a +aAa +drop table t1; +create table t1 ( +a varchar(20) character set latin1 collate latin1_swedish_ci primary key +) engine=ndb; +insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); +insert into t1 values('b'); +ERROR 23000: Duplicate entry 'b' for key 'PRIMARY' +insert into t1 values('a '); +ERROR 23000: Duplicate entry 'a ' for key 'PRIMARY' +select a,length(a) from t1 order by a; +a length(a) +A 1 +b 2 +C 3 +d 7 +E 1 +f 1 +select a,length(a) from t1 order by a desc; +a length(a) +f 1 +E 1 +d 7 +C 3 +b 2 +A 1 +select * from t1 where a = 'a'; +a +A +select * from t1 where a = 'a '; +a +A +select * from t1 where a = 'd'; +a +d +drop table t1; +create table t1 ( +p int primary key, +a char(3) character set latin1 collate latin1_bin not null, +unique key(a) +) engine=ndb; +insert into t1 values(1, 'aAa'); +insert into t1 values(2, 'aaa'); +insert into t1 values(3, 'AAA'); +select * from t1 order by p; +p a +1 aAa +2 aaa +3 AAA +select * from t1 where a = 'aAa'; +p a +1 aAa +select * from t1 where a = 'aaa'; +p a +2 aaa +select * from t1 where a = 'AaA'; +p a +select * from t1 where a = 'AAA'; +p a +3 AAA +drop table t1; +create table t1 ( +p int primary key, +a char(3) character set latin1 collate latin1_swedish_ci not null, +unique key(a) +) engine=ndb; +insert into t1 values(1, 'aAa'); +insert into t1 values(2, 'aaa'); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +insert into t1 values(3, 'AAA'); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +select * from t1 order by p; +p a +1 aAa +select * from t1 where a = 'aAa'; +p a +1 aAa +select * from t1 where a = 'aaa'; +p a +1 aAa +select * from t1 where a = 'AaA'; +p a +1 aAa +select * from t1 where a = 'AAA'; +p a +1 aAa +drop table t1; +create table t1 ( +p int primary key, +a varchar(20) character set latin1 collate latin1_swedish_ci not null, +unique key(a) +) engine=ndb; +insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); +insert into t1 values(99,'b'); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +insert into t1 values(99,'a '); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +select a,length(a) from t1 order by a; +a length(a) +A 1 +b 2 +C 3 +d 7 +E 1 +f 1 +select a,length(a) from t1 order by a desc; +a length(a) +f 1 +E 1 +d 7 +C 3 +b 2 +A 1 +select * from t1 where a = 'a'; +p a +1 A +select * from t1 where a = 'a '; +p a +1 A +select * from t1 where a = 'd'; +p a +4 d +drop table t1; +create table t1 ( +p int primary key, +a char(3) character set latin1 collate latin1_bin not null, +index(a) +) engine=ndb; +insert into t1 values(1, 'aAa'); +insert into t1 values(2, 'aaa'); +insert into t1 values(3, 'AAA'); +insert into t1 values(4, 'aAa'); +insert into t1 values(5, 'aaa'); +insert into t1 values(6, 'AAA'); +select * from t1 order by p; +p a +1 aAa +2 aaa +3 AAA +4 aAa +5 aaa +6 AAA +select * from t1 where a = 'aAa' order by p; +p a +1 aAa +4 aAa +select * from t1 where a = 'aaa' order by p; +p a +2 aaa +5 aaa +select * from t1 where a = 'AaA' order by p; +p a +select * from t1 where a = 'AAA' order by p; +p a +3 AAA +6 AAA +drop table t1; +create table t1 ( +p int primary key, +a char(3) character set latin1 collate latin1_swedish_ci not null, +index(a) +) engine=ndb; +insert into t1 values(1, 'aAa'); +insert into t1 values(2, 'aaa'); +insert into t1 values(3, 'AAA'); +insert into t1 values(4, 'aAa'); +insert into t1 values(5, 'aaa'); +insert into t1 values(6, 'AAA'); +select * from t1 order by p; +p a +1 aAa +2 aaa +3 AAA +4 aAa +5 aaa +6 AAA +select * from t1 where a = 'aAa' order by p; +p a +1 aAa +2 aaa +3 AAA +4 aAa +5 aaa +6 AAA +select * from t1 where a = 'aaa' order by p; +p a +1 aAa +2 aaa +3 AAA +4 aAa +5 aaa +6 AAA +select * from t1 where a = 'AaA' order by p; +p a +1 aAa +2 aaa +3 AAA +4 aAa +5 aaa +6 AAA +select * from t1 where a = 'AAA' order by p; +p a +1 aAa +2 aaa +3 AAA +4 aAa +5 aaa +6 AAA +drop table t1; +create table t1 ( +p int primary key, +a varchar(20) character set latin1 collate latin1_swedish_ci not null, +index(a, p) +) engine=ndb; +insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); +insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F '); +select p,a,length(a) from t1 order by a, p; +p a length(a) +1 A 1 +7 a 1 +2 b 2 +8 B 2 +3 C 3 +9 c 3 +4 d 7 +10 D 1 +5 E 1 +11 e 1 +6 f 1 +12 F 3 +select * from t1 where a = 'a ' order by a desc, p desc; +p a +7 a +1 A +select * from t1 where a >= 'D' order by a, p; +p a +4 d +10 D +5 E +11 e +6 f +12 F +select * from t1 where a < 'D' order by a, p; +p a +1 A +7 a +2 b +8 B +3 C +9 c +select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a; +count(*) +48 +drop table t1; +create table t1 ( +a char(10) primary key +) engine=ndbcluster default charset=latin1; +insert into t1 values ('aaabb'); +select * from t1; +a +aaabb +replace into t1 set a = 'AAABB'; +select * from t1; +a +AAABB +replace into t1 set a = 'aAaBb'; +select * from t1; +a +aAaBb +replace into t1 set a = 'aaabb'; +select * from t1; +a +aaabb +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_condition_pushdown.result b/mysql-test/suite/ndb/r/ndb_condition_pushdown.result new file mode 100644 index 00000000000..8d1dcc4ef18 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_condition_pushdown.result @@ -0,0 +1,1892 @@ +DROP TABLE IF EXISTS t1,t2,t3,t4; +CREATE TABLE t1 ( +auto int(5) unsigned NOT NULL auto_increment, +string char(10), +vstring varchar(10), +bin binary(2), +vbin varbinary(7), +tiny tinyint(4) DEFAULT '0' NOT NULL , +short smallint(6) DEFAULT '1' NOT NULL , +medium mediumint(8) DEFAULT '0' NOT NULL, +long_int int(11) DEFAULT '0' NOT NULL, +longlong bigint(13) DEFAULT '0' NOT NULL, +real_float float(13,1) DEFAULT 0.0 NOT NULL, +real_double double(16,4), +real_decimal decimal(16,4), +utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, +ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, +umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, +ulong int(11) unsigned DEFAULT '0' NOT NULL, +ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, +bits bit(3), +options enum('zero','one','two','three','four') not null, +flags set('zero','one','two','three','four') not null, +date_field date, +year_field year, +time_field time, +date_time datetime, +time_stamp timestamp, +PRIMARY KEY (auto) +) engine=ndb; +insert into t1 values +(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, +b'001','one','one', +'1901-01-01','1901', +'01:01:01','1901-01-01 01:01:01',NULL), +(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2, +b'010','two','one,two', +'1902-02-02','1902', +'02:02:02','1902-02-02 02:02:02',NULL), +(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3, +b'011','three','one,two,three', +'1903-03-03','1903', +'03:03:03','1903-03-03 03:03:03',NULL), +(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4, +b'100','four','one,two,three,four', +'1904-04-04','1904', +'04:04:04','1904-04-04 04:04:04',NULL); +CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster; +insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f"); +CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster; +insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); +CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster; +insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); +set @old_ecpd = @@session.engine_condition_pushdown; +set engine_condition_pushdown = off; +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +bits = b'001' and +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; +auto +1 +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +bits != b'001' and +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +bits > b'001' and +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +bits >= b'001' and +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; +auto +1 +2 +3 +4 +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +bits < b'100' and +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 and +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +bits <= b'100' and +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +4 +select auto from t1 where +string like "b%" and +vstring like "b%" and +bin like concat(0xBB, '%') and +vbin like concat(0xBB, '%') +order by auto; +auto +2 +select auto from t1 where +string not like "b%" and +vstring not like "b%" and +bin not like concat(0xBB, '%') and +vbin not like concat(0xBB, '%') +order by auto; +auto +1 +3 +4 +select auto from t1 where +(string between "aaaa" and "cccc") and +(vstring between "aaaa" and "cccc") and +(bin between 0xAAAA and 0xCCCC) and +(vbin between 0xAAAA and 0xCCCC) and +(tiny between -3 and -1) and +(short between -3 and -1) and +(medium between -3 and -1) and +(long_int between -3 and -1) and +(longlong between -3 and -1) and +(utiny between 1 and 3) and +(ushort between 1 and 3) and +(umedium between 1 and 3) and +(ulong between 1 and 3) and +(ulonglong between 1 and 3) and +(bits between b'001' and b'011') and +(options between 'one' and 'three') and +(flags between 'one' and 'one,two,three') and +(date_field between '1901-01-01' and '1903-03-03') and +(year_field between '1901' and '1903') and +(time_field between '01:01:01' and '03:03:03') and +(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +auto +1 +3 +select auto from t1 where +("aaaa" between string and string) and +("aaaa" between vstring and vstring) and +(0xAAAA between bin and bin) and +(0xAAAA between vbin and vbin) and +(-1 between tiny and tiny) and +(-1 between short and short) and +(-1 between medium and medium) and +(-1 between long_int and long_int) and +(-1 between longlong and longlong) and +(1 between utiny and utiny) and +(1 between ushort and ushort) and +(1 between umedium and umedium) and +(1 between ulong and ulong) and +(1 between ulonglong and ulonglong) and +(b'001' between bits and bits) and +('one' between options and options) and +('one' between flags and flags) and +('1901-01-01' between date_field and date_field) and +('1901' between year_field and year_field) and +('01:01:01' between time_field and time_field) and +('1901-01-01 01:01:01' between date_time and date_time) +order by auto; +auto +1 +select auto from t1 where +(string not between "aaaa" and "cccc") and +(vstring not between "aaaa" and "cccc") and +(bin not between 0xAAAA and 0xCCCC) and +(vbin not between 0xAAAA and 0xCCCC) and +(tiny not between -3 and -1) and +(short not between -3 and -1) and +(medium not between -3 and -1) and +(long_int not between -3 and -1) and +(longlong not between -3 and -1) and +(utiny not between 1 and 3) and +(ushort not between 1 and 3) and +(umedium not between 1 and 3) and +(ulong not between 1 and 3) and +(ulonglong not between 1 and 3) and +(bits not between b'001' and b'011') and +(options not between 'one' and 'three') and +(flags not between 'one' and 'one,two,three') and +(date_field not between '1901-01-01' and '1903-03-03') and +(year_field not between '1901' and '1903') and +(time_field not between '01:01:01' and '03:03:03') and +(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +auto +4 +select auto from t1 where +("aaaa" not between string and string) and +("aaaa" not between vstring and vstring) and +(0xAAAA not between bin and bin) and +(0xAAAA not between vbin and vbin) and +(-1 not between tiny and tiny) and +(-1 not between short and short) and +(-1 not between medium and medium) and +(-1 not between long_int and long_int) and +(-1 not between longlong and longlong) and +(1 not between utiny and utiny) and +(1 not between ushort and ushort) and +(1 not between umedium and umedium) and +(1 not between ulong and ulong) and +(1 not between ulonglong and ulonglong) and +(b'001' not between bits and bits) and +('one' not between options and options) and +('one' not between flags and flags) and +('1901-01-01' not between date_field and date_field) and +('1901' not between year_field and year_field) and +('01:01:01' not between time_field and time_field) and +('1901-01-01 01:01:01' not between date_time and date_time) +order by auto; +auto +2 +3 +4 +select auto from t1 where +string in("aaaa","cccc") and +vstring in("aaaa","cccc") and +bin in(0xAAAA,0xCCCC) and +vbin in(0xAAAA,0xCCCC) and +tiny in(-1,-3) and +short in(-1,-3) and +medium in(-1,-3) and +long_int in(-1,-3) and +longlong in(-1,-3) and +utiny in(1,3) and +ushort in(1,3) and +umedium in(1,3) and +ulong in(1,3) and +ulonglong in(1,3) and +bits in(b'001',b'011') and +options in('one','three') and +flags in('one','one,two,three') and +date_field in('1901-01-01','1903-03-03') and +year_field in('1901','1903') and +time_field in('01:01:01','03:03:03') and +date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +auto +1 +3 +select auto from t1 where +"aaaa" in(string) and +"aaaa" in(vstring) and +0xAAAA in(bin) and +0xAAAA in(vbin) and +(-1 in(tiny)) and +(-1 in(short)) and +(-1 in(medium)) and +(-1 in(long_int)) and +(-1 in(longlong)) and +1 in(utiny) and +1 in(ushort) and +1 in(umedium) and +1 in(ulong) and +1 in(ulonglong) and +b'001' in(bits) and +'one' in(options) and +'one' in(flags) and +'1901-01-01' in(date_field) and +'1901' in(year_field) and +'01:01:01' in(time_field) and +'1901-01-01 01:01:01' in(date_time) +order by auto; +auto +1 +select auto from t1 where +string not in("aaaa","cccc") and +vstring not in("aaaa","cccc") and +bin not in(0xAAAA,0xCCCC) and +vbin not in(0xAAAA,0xCCCC) and +tiny not in(-1,-3) and +short not in(-1,-3) and +medium not in(-1,-3) and +long_int not in(-1,-3) and +longlong not in(-1,-3) and +utiny not in(1,3) and +ushort not in(1,3) and +umedium not in(1,3) and +ulong not in(1,3) and +ulonglong not in(1,3) and +bits not in(b'001',b'011') and +options not in('one','three') and +flags not in('one','one,two,three') and +date_field not in('1901-01-01','1903-03-03') and +year_field not in('1901','1903') and +time_field not in('01:01:01','03:03:03') and +date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +auto +2 +4 +select auto from t1 where +"aaaa" not in(string) and +"aaaa" not in(vstring) and +0xAAAA not in(bin) and +0xAAAA not in(vbin) and +(-1 not in(tiny)) and +(-1 not in(short)) and +(-1 not in(medium)) and +(-1 not in(long_int)) and +(-1 not in(longlong)) and +1 not in(utiny) and +1 not in(ushort) and +1 not in(umedium) and +1 not in(ulong) and +1 not in(ulonglong) and +b'001' not in(bits) and +'one' not in(options) and +'one' not in(flags) and +'1901-01-01' not in(date_field) and +'1901' not in(year_field) and +'01:01:01' not in(time_field) and +'1901-01-01 01:01:01' not in(date_time) +order by auto; +auto +2 +3 +4 +select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; +pk1 attr1 attr2 attr3 +2 2 NULL NULL +3 3 3 d +select * from t2 where attr3 is not null and attr1 > 2 order by pk1; +pk1 attr1 attr2 attr3 +3 3 3 d +4 4 4 e +5 5 5 f +select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; +pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c +4 4 9223372036854775806 4 e +5 5 9223372036854775807 5 f +select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; +pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 +0 0 0 a 0 0 0 0 a +select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; +pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c +4 4 9223372036854775806 4 e +select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; +pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c +3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d +4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e +set engine_condition_pushdown = on; +explain +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; +auto +1 +explain +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +explain +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +explain +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; +auto +1 +2 +3 +4 +explain +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +explain +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +4 +create index medium_index on t1(medium); +explain +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref medium_index medium_index 3 const # Using where with pushed condition; Using filesort +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; +auto +1 +explain +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +explain +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +explain +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; +auto +1 +2 +3 +4 +explain +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +explain +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +4 +explain +select auto from t1 where +string like "b%" and +vstring like "b%" and +bin like concat(0xBB, '%') and +vbin like concat(0xBB, '%') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string like "b%" and +vstring like "b%" and +bin like concat(0xBB, '%') and +vbin like concat(0xBB, '%') +order by auto; +auto +2 +explain +select auto from t1 where +string not like "b%" and +vstring not like "b%" and +bin not like concat(0xBB, '%') and +vbin not like concat(0xBB, '%') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string not like "b%" and +vstring not like "b%" and +bin not like concat(0xBB, '%') and +vbin not like concat(0xBB, '%') +order by auto; +auto +1 +3 +4 +explain +select auto from t1 where +(string between "aaaa" and "cccc") and +(vstring between "aaaa" and "cccc") and +(bin between 0xAAAA and 0xCCCC) and +(vbin between 0xAAAA and 0xCCCC) and +(tiny between -3 and -1) and +(short between -3 and -1) and +(medium between -3 and -1) and +(long_int between -3 and -1) and +(longlong between -3 and -1) and +(utiny between 1 and 3) and +(ushort between 1 and 3) and +(umedium between 1 and 3) and +(ulong between 1 and 3) and +(ulonglong between 1 and 3) and +/* (bits between b'001' and b'011') and */ +(options between 'one' and 'three') and +(flags between 'one' and 'one,two,three') and +(date_field between '1901-01-01' and '1903-03-03') and +(year_field between '1901' and '1903') and +(time_field between '01:01:01' and '03:03:03') and +(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +(string between "aaaa" and "cccc") and +(vstring between "aaaa" and "cccc") and +(bin between 0xAAAA and 0xCCCC) and +(vbin between 0xAAAA and 0xCCCC) and +(tiny between -3 and -1) and +(short between -3 and -1) and +(medium between -3 and -1) and +(long_int between -3 and -1) and +(longlong between -3 and -1) and +(utiny between 1 and 3) and +(ushort between 1 and 3) and +(umedium between 1 and 3) and +(ulong between 1 and 3) and +(ulonglong between 1 and 3) and +/* (bits between b'001' and b'011') and */ +(options between 'one' and 'three') and +(flags between 'one' and 'one,two,three') and +(date_field between '1901-01-01' and '1903-03-03') and +(year_field between '1901' and '1903') and +(time_field between '01:01:01' and '03:03:03') and +(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +auto +1 +3 +explain +select auto from t1 where +("aaaa" between string and string) and +("aaaa" between vstring and vstring) and +(0xAAAA between bin and bin) and +(0xAAAA between vbin and vbin) and +(-1 between tiny and tiny) and +(-1 between short and short) and +(-1 between medium and medium) and +(-1 between long_int and long_int) and +(-1 between longlong and longlong) and +(1 between utiny and utiny) and +(1 between ushort and ushort) and +(1 between umedium and umedium) and +(1 between ulong and ulong) and +(1 between ulonglong and ulonglong) and +/* (b'001' between bits and bits) and */ +('one' between options and options) and +('one' between flags and flags) and +('1901-01-01' between date_field and date_field) and +('1901' between year_field and year_field) and +('01:01:01' between time_field and time_field) and +('1901-01-01 01:01:01' between date_time and date_time) +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +("aaaa" between string and string) and +("aaaa" between vstring and vstring) and +(0xAAAA between bin and bin) and +(0xAAAA between vbin and vbin) and +(-1 between tiny and tiny) and +(-1 between short and short) and +(-1 between medium and medium) and +(-1 between long_int and long_int) and +(-1 between longlong and longlong) and +(1 between utiny and utiny) and +(1 between ushort and ushort) and +(1 between umedium and umedium) and +(1 between ulong and ulong) and +(1 between ulonglong and ulonglong) and +/* (b'001' between bits and bits) and */ +('one' between options and options) and +('one' between flags and flags) and +('1901-01-01' between date_field and date_field) and +('1901' between year_field and year_field) and +('01:01:01' between time_field and time_field) and +('1901-01-01 01:01:01' between date_time and date_time) +order by auto; +auto +1 +explain +select auto from t1 where +(string not between "aaaa" and "cccc") and +(vstring not between "aaaa" and "cccc") and +(bin not between 0xAAAA and 0xCCCC) and +(vbin not between 0xAAAA and 0xCCCC) and +(tiny not between -3 and -1) and +(short not between -3 and -1) and +(medium not between -3 and -1) and +(long_int not between -3 and -1) and +(longlong not between -3 and -1) and +(utiny not between 1 and 3) and +(ushort not between 1 and 3) and +(umedium not between 1 and 3) and +(ulong not between 1 and 3) and +(ulonglong not between 1 and 3) and +/* (bits not between b'001' and b'011') and */ +(options not between 'one' and 'three') and +(flags not between 'one' and 'one,two,three') and +(date_field not between '1901-01-01' and '1903-03-03') and +(year_field not between '1901' and '1903') and +(time_field not between '01:01:01' and '03:03:03') and +(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +(string not between "aaaa" and "cccc") and +(vstring not between "aaaa" and "cccc") and +(bin not between 0xAAAA and 0xCCCC) and +(vbin not between 0xAAAA and 0xCCCC) and +(tiny not between -3 and -1) and +(short not between -3 and -1) and +(medium not between -3 and -1) and +(long_int not between -3 and -1) and +(longlong not between -3 and -1) and +(utiny not between 1 and 3) and +(ushort not between 1 and 3) and +(umedium not between 1 and 3) and +(ulong not between 1 and 3) and +(ulonglong not between 1 and 3) and +/* (bits not between b'001' and b'011') and */ +(options not between 'one' and 'three') and +(flags not between 'one' and 'one,two,three') and +(date_field not between '1901-01-01' and '1903-03-03') and +(year_field not between '1901' and '1903') and +(time_field not between '01:01:01' and '03:03:03') and +(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +auto +4 +explain +select auto from t1 where +("aaaa" not between string and string) and +("aaaa" not between vstring and vstring) and +(0xAAAA not between bin and bin) and +(0xAAAA not between vbin and vbin) and +(-1 not between tiny and tiny) and +(-1 not between short and short) and +(-1 not between medium and medium) and +(-1 not between long_int and long_int) and +(-1 not between longlong and longlong) and +(1 not between utiny and utiny) and +(1 not between ushort and ushort) and +(1 not between umedium and umedium) and +(1 not between ulong and ulong) and +(1 not between ulonglong and ulonglong) and +/* (b'001' not between bits and bits) and */ +('one' not between options and options) and +('one' not between flags and flags) and +('1901-01-01' not between date_field and date_field) and +('1901' not between year_field and year_field) and +('01:01:01' not between time_field and time_field) and +('1901-01-01 01:01:01' not between date_time and date_time) +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +("aaaa" not between string and string) and +("aaaa" not between vstring and vstring) and +(0xAAAA not between bin and bin) and +(0xAAAA not between vbin and vbin) and +(-1 not between tiny and tiny) and +(-1 not between short and short) and +(-1 not between medium and medium) and +(-1 not between long_int and long_int) and +(-1 not between longlong and longlong) and +(1 not between utiny and utiny) and +(1 not between ushort and ushort) and +(1 not between umedium and umedium) and +(1 not between ulong and ulong) and +(1 not between ulonglong and ulonglong) and +/* (b'001' not between bits and bits) and */ +('one' not between options and options) and +('one' not between flags and flags) and +('1901-01-01' not between date_field and date_field) and +('1901' not between year_field and year_field) and +('01:01:01' not between time_field and time_field) and +('1901-01-01 01:01:01' not between date_time and date_time) +order by auto; +auto +2 +3 +4 +explain +select auto from t1 where +string in("aaaa","cccc") and +vstring in("aaaa","cccc") and +bin in(0xAAAA,0xCCCC) and +vbin in(0xAAAA,0xCCCC) and +tiny in(-1,-3) and +short in(-1,-3) and +medium in(-1,-3) and +long_int in(-1,-3) and +longlong in(-1,-3) and +utiny in(1,3) and +ushort in(1,3) and +umedium in(1,3) and +ulong in(1,3) and +ulonglong in(1,3) and +/* bits in(b'001',b'011') and */ +options in('one','three') and +flags in('one','one,two,three') and +date_field in('1901-01-01','1903-03-03') and +year_field in('1901','1903') and +time_field in('01:01:01','03:03:03') and +date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string in("aaaa","cccc") and +vstring in("aaaa","cccc") and +bin in(0xAAAA,0xCCCC) and +vbin in(0xAAAA,0xCCCC) and +tiny in(-1,-3) and +short in(-1,-3) and +medium in(-1,-3) and +long_int in(-1,-3) and +longlong in(-1,-3) and +utiny in(1,3) and +ushort in(1,3) and +umedium in(1,3) and +ulong in(1,3) and +ulonglong in(1,3) and +/* bits in(b'001',b'011') and */ +options in('one','three') and +flags in('one','one,two,three') and +date_field in('1901-01-01','1903-03-03') and +year_field in('1901','1903') and +time_field in('01:01:01','03:03:03') and +date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +auto +1 +3 +explain +select auto from t1 where +"aaaa" in(string) and +"aaaa" in(vstring) and +0xAAAA in(bin) and +0xAAAA in(vbin) and +(-1 in(tiny)) and +(-1 in (short)) and +(-1 in(medium)) and +(-1 in(long_int)) and +(-1 in(longlong)) and +1 in(utiny) and +1 in(ushort) and +1 in(umedium) and +1 in(ulong) and +1 in(ulonglong) and +/* b'001' in(bits) and */ +'one' in(options) and +'one' in(flags) and +'1901-01-01' in(date_field) and +'1901' in(year_field) and +'01:01:01' in(time_field) and +'1901-01-01 01:01:01' in(date_time) +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref medium_index medium_index 3 const # Using where with pushed condition; Using filesort +select auto from t1 where +"aaaa" in(string) and +"aaaa" in(vstring) and +0xAAAA in(bin) and +0xAAAA in(vbin) and +(-1 in(tiny)) and +(-1 in (short)) and +(-1 in(medium)) and +(-1 in(long_int)) and +(-1 in(longlong)) and +1 in(utiny) and +1 in(ushort) and +1 in(umedium) and +1 in(ulong) and +1 in(ulonglong) and +/* b'001' in(bits) and */ +'one' in(options) and +'one' in(flags) and +'1901-01-01' in(date_field) and +'1901' in(year_field) and +'01:01:01' in(time_field) and +'1901-01-01 01:01:01' in(date_time) +order by auto; +auto +1 +explain +select auto from t1 where +string not in("aaaa","cccc") and +vstring not in("aaaa","cccc") and +bin not in(0xAAAA,0xCCCC) and +vbin not in(0xAAAA,0xCCCC) and +tiny not in(-1,-3) and +short not in(-1,-3) and +medium not in(-1,-3) and +long_int not in(-1,-3) and +longlong not in(-1,-3) and +utiny not in(1,3) and +ushort not in(1,3) and +umedium not in(1,3) and +ulong not in(1,3) and +ulonglong not in(1,3) and +/* bits not in(b'001',b'011') and */ +options not in('one','three') and +flags not in('one','one,two,three') and +date_field not in('1901-01-01','1903-03-03') and +year_field not in('1901','1903') and +time_field not in('01:01:01','03:03:03') and +date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL # Using where with pushed condition; Using filesort +select auto from t1 where +string not in("aaaa","cccc") and +vstring not in("aaaa","cccc") and +bin not in(0xAAAA,0xCCCC) and +vbin not in(0xAAAA,0xCCCC) and +tiny not in(-1,-3) and +short not in(-1,-3) and +medium not in(-1,-3) and +long_int not in(-1,-3) and +longlong not in(-1,-3) and +utiny not in(1,3) and +ushort not in(1,3) and +umedium not in(1,3) and +ulong not in(1,3) and +ulonglong not in(1,3) and +/* bits not in(b'001',b'011') and */ +options not in('one','three') and +flags not in('one','one,two,three') and +date_field not in('1901-01-01','1903-03-03') and +year_field not in('1901','1903') and +time_field not in('01:01:01','03:03:03') and +date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +auto +2 +4 +explain +select auto from t1 where +"aaaa" not in(string) and +"aaaa" not in(vstring) and +0xAAAA not in(bin) and +0xAAAA not in(vbin) and +(-1 not in(tiny)) and +(-1 not in(short)) and +(-1 not in(medium)) and +(-1 not in(long_int)) and +(-1 not in(longlong)) and +1 not in(utiny) and +1 not in(ushort) and +1 not in(umedium) and +1 not in(ulong) and +1 not in(ulonglong) and +/* b'001' not in(bits) and */ +'one' not in(options) and +'one' not in(flags) and +'1901-01-01' not in(date_field) and +'1901' not in(year_field) and +'01:01:01' not in(time_field) and +'1901-01-01 01:01:01' not in(date_time) +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select auto from t1 where +"aaaa" not in(string) and +"aaaa" not in(vstring) and +0xAAAA not in(bin) and +0xAAAA not in(vbin) and +(-1 not in(tiny)) and +(-1 not in(short)) and +(-1 not in(medium)) and +(-1 not in(long_int)) and +(-1 not in(longlong)) and +1 not in(utiny) and +1 not in(ushort) and +1 not in(umedium) and +1 not in(ulong) and +1 not in(ulonglong) and +/* b'001' not in(bits) and */ +'one' not in(options) and +'one' not in(flags) and +'1901-01-01' not in(date_field) and +'1901' not in(year_field) and +'01:01:01' not in(time_field) and +'1901-01-01 01:01:01' not in(date_time) +order by auto; +auto +2 +3 +4 +update t1 +set medium = 17 +where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01'; +delete from t1 +where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = 17 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01'; +select count(*) from t1; +count(*) +3 +explain +select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL PRIMARY NULL NULL NULL # Using where with pushed condition; Using filesort +select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; +pk1 attr1 attr2 attr3 +2 2 NULL NULL +3 3 3 d +explain +select * from t2 where attr3 is not null and attr1 > 2 order by pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select * from t2 where attr3 is not null and attr1 > 2 order by pk1; +pk1 attr1 attr2 attr3 +3 3 3 d +4 4 4 e +5 5 5 f +explain +select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition; Using filesort +select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; +pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c +4 4 9223372036854775806 4 e +5 5 9223372036854775807 5 f +explain +select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using temporary; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition; Using join buffer +select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; +pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 +0 0 0 a 0 0 0 0 a +explain +select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using filesort +select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; +pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c +4 4 9223372036854775806 4 e +explain +select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using temporary; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where; Using join buffer +select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; +pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c +3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d +4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e +explain +select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where; Using filesort +explain +select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where; Using filesort +explain +select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 ALL NULL NULL NULL NULL # Using temporary; Using filesort +1 SIMPLE t4 ALL NULL NULL NULL NULL # Using where +create table t5 (a int primary key auto_increment, b tinytext not null) +engine = ndb; +insert into t5 (b) values ('jonas'), ('jensing'), ('johan'); +set engine_condition_pushdown = off; +select * from t5 where b like '%jo%' order by a; +a b +1 jonas +3 johan +set engine_condition_pushdown = on; +explain select * from t5 where b like '%jo%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t5 ALL NULL NULL NULL NULL # Using where +select * from t5 where b like '%jo%' order by a; +a b +1 jonas +3 johan +set engine_condition_pushdown = off; +select auto from t1 where date_time like '1902-02-02 %' order by auto; +auto +2 +select auto from t1 where date_time not like '1902-02-02 %' order by auto; +auto +3 +4 +set engine_condition_pushdown = on; +explain select auto from t1 where date_time like '1902-02-02 %'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where +select auto from t1 where date_time like '1902-02-02 %' order by auto; +auto +2 +explain select auto from t1 where date_time not like '1902-02-02 %'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where +select auto from t1 where date_time not like '1902-02-02 %' order by auto; +auto +3 +4 +drop table t1; +create table t1 (a int, b varchar(3), primary key using hash(a)) +engine=ndb; +insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); +set engine_condition_pushdown = off; +select * from t1 where b like 'ab'; +a b +2 ab +select * from t1 where b like 'ab' or b like 'ab'; +a b +2 ab +select * from t1 where b like 'abc'; +a b +3 abc +select * from t1 where b like 'abc' or b like 'abc'; +a b +3 abc +set engine_condition_pushdown = on; +select * from t1 where b like 'ab'; +a b +2 ab +select * from t1 where b like 'ab' or b like 'ab'; +a b +2 ab +select * from t1 where b like 'abc'; +a b +3 abc +select * from t1 where b like 'abc' or b like 'abc'; +a b +3 abc +drop table t1; +create table t1 (a int, b char(3), primary key using hash(a)) +engine=ndb; +insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); +set engine_condition_pushdown = off; +select * from t1 where b like 'ab'; +a b +2 ab +select * from t1 where b like 'ab' or b like 'ab'; +a b +2 ab +select * from t1 where b like 'abc'; +a b +3 abc +select * from t1 where b like 'abc' or b like 'abc'; +a b +3 abc +set engine_condition_pushdown = on; +select * from t1 where b like 'ab'; +a b +2 ab +select * from t1 where b like 'ab' or b like 'ab'; +a b +2 ab +select * from t1 where b like 'abc'; +a b +3 abc +select * from t1 where b like 'abc' or b like 'abc'; +a b +3 abc +drop table t1; +create table t1 ( fname varchar(255), lname varchar(255) ) +engine=ndbcluster; +insert into t1 values ("Young","Foo"); +set engine_condition_pushdown = 0; +SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); +fname lname +Young Foo +set engine_condition_pushdown = 1; +SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); +fname lname +Young Foo +insert into t1 values ("aaa", "aaa"); +insert into t1 values ("bbb", "bbb"); +insert into t1 values ("ccc", "ccc"); +insert into t1 values ("ddd", "ddd"); +set engine_condition_pushdown = 0; +SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); +fname lname +Young Foo +set engine_condition_pushdown = 1; +SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); +fname lname +Young Foo +set engine_condition_pushdown = @old_ecpd; +DROP TABLE t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/ndb/r/ndb_config.result b/mysql-test/suite/ndb/r/ndb_config.result new file mode 100644 index 00000000000..9495af29df6 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_config.result @@ -0,0 +1,14 @@ +ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, mysqld,11, +1,localhost,20971520,1048576 2,localhost,20971520,1048576 +1 localhost 20971520 1048576 +2 localhost 20971520 1048576 +1 2 +ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, mysqld,11, +ndbd,1,localhost,52428800,26214400 ndbd,2,localhost,52428800,36700160 ndbd,3,localhost,52428800,52428800 ndbd,4,localhost,52428800,52428800 ndb_mgmd,5,localhost,, mysqld,6,localhost,, +ndbd,1,localhost ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndb_mgmd,5,localhost mysqld,6, mysqld,7, mysqld,8, mysqld,9, mysqld,10, +ndbd,2,localhost ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndb_mgmd,6,localhost mysqld,1, mysqld,7, mysqld,8, mysqld,9, mysqld,10, +ndbd,3,localhost ndbd,4,localhost ndbd,5,localhost ndbd,6,localhost ndb_mgmd,1,localhost ndb_mgmd,2,localhost mysqld,11, mysqld,12, mysqld,13, mysqld,14, mysqld,15, +shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2 +1 2 3 + +1 2 3 diff --git a/mysql-test/suite/ndb/r/ndb_config2.result b/mysql-test/suite/ndb/r/ndb_config2.result new file mode 100644 index 00000000000..cfd012933c4 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_config2.result @@ -0,0 +1 @@ +shm,3,4,35,3 shm,3,5,35,3 shm,3,6,35,3 shm,4,5,35,4 shm,4,6,35,4 shm,5,6,35,5 tcp,11,3,55,3 tcp,11,4,55,4 tcp,11,5,55,5 tcp,11,6,55,6 tcp,12,3,55,3 tcp,12,4,55,4 tcp,12,5,55,5 tcp,12,6,55,6 tcp,13,3,55,3 tcp,13,4,55,4 tcp,13,5,55,5 tcp,13,6,55,6 tcp,14,3,55,3 tcp,14,4,55,4 tcp,14,5,55,5 tcp,14,6,55,6 tcp,15,3,55,3 tcp,15,4,55,4 tcp,15,5,55,5 tcp,15,6,55,6 tcp,1,3,55,1 tcp,1,4,55,1 tcp,1,5,55,1 tcp,1,6,55,1 tcp,2,3,55,2 tcp,2,4,55,2 tcp,2,5,55,2 tcp,2,6,55,2 diff --git a/mysql-test/suite/ndb/r/ndb_cursor.result b/mysql-test/suite/ndb/r/ndb_cursor.result new file mode 100644 index 00000000000..b3b815ef891 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_cursor.result @@ -0,0 +1,40 @@ +drop table if exists t1; +drop table if exists t2; +create table t1 ( +a int not null primary key, +b int not null +) engine=ndb; +create table t2 ( +a int not null primary key, +b int not null +) engine=ndb; +insert into t1 values (1,10), (2,20), (3,30), (4, 40); +create procedure test_cursor () +begin +declare done int default 0; +declare temp_a int; +declare temp_b int; +declare cur1 cursor for select a,b from t1; +declare continue handler for sqlstate '02000' set done = 1; +open cur1; +repeat +fetch cur1 into temp_a, temp_b; +if not done then +insert into t2 values (temp_a, temp_b); +end if; +until done end repeat; +close cur1; +end; +// +select * from t2 order by a; +a b +call test_cursor(); +select * from t2 order by a; +a b +1 10 +2 20 +3 30 +4 40 +drop procedure test_cursor; +drop table t1,t2; +end of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_database.result b/mysql-test/suite/ndb/r/ndb_database.result new file mode 100644 index 00000000000..e3da4af0265 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_database.result @@ -0,0 +1,13 @@ +drop database if exists mysqltest; +create database mysqltest; +create table mysqltest.t1 (a int primary key, b int) engine=ndb; +use mysqltest; +show tables; +Tables_in_mysqltest +t1 +drop database mysqltest; +create database mysqltest; +use mysqltest; +show tables; +Tables_in_mysqltest +drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_dd_alter.result b/mysql-test/suite/ndb/r/ndb_dd_alter.result new file mode 100644 index 00000000000..94426546115 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_dd_alter.result @@ -0,0 +1,560 @@ +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +**** Test Setup Section **** +CREATE LOGFILE GROUP lg +ADD UNDOFILE './lg_group/undofile.dat' + INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +CREATE TABLESPACE ts +ADD DATAFILE './table_space/datafile.dat' + USE LOGFILE GROUP lg +INITIAL_SIZE 12M +ENGINE NDB; +CREATE TABLE test.t1 ( +a1 smallint NOT NULL, +a2 int NOT NULL, +a3 bigint NOT NULL, +a4 char(10), +a5 decimal(5,1), +a6 time, +a7 date, +a8 datetime, +a9 VARCHAR(255), +a10 blob, +PRIMARY KEY(a1) +) ENGINE=InnoDB; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` smallint(6) NOT NULL, + `a2` int(11) NOT NULL, + `a3` bigint(20) NOT NULL, + `a4` char(10) DEFAULT NULL, + `a5` decimal(5,1) DEFAULT NULL, + `a6` time DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` datetime DEFAULT NULL, + `a9` varchar(255) DEFAULT NULL, + `a10` blob, + PRIMARY KEY (`a1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 +1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data +2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data +3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data +4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data +5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data +6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data +7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data +8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data +9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data +10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data +11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data +12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data +13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data +14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data +15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data +16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data +17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data +18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data +19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data +20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data +ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` smallint(6) NOT NULL, + `a2` int(11) NOT NULL, + `a3` bigint(20) NOT NULL, + `a4` char(10) DEFAULT NULL, + `a5` decimal(5,1) DEFAULT NULL, + `a6` time DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` datetime DEFAULT NULL, + `a9` varchar(255) DEFAULT NULL, + `a10` blob, + PRIMARY KEY (`a1`) +) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +a2 Int NOT NULL AT=FIXED ST=DISK +a3 Bigint NOT NULL AT=FIXED ST=DISK +a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK +a5 Decimal(5,1) NULL AT=FIXED ST=DISK +a6 Time NULL AT=FIXED ST=DISK +a7 Date NULL AT=FIXED ST=DISK +a8 Datetime NULL AT=FIXED ST=DISK +a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK +a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 +1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data +2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data +3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data +4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data +5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data +6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data +7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data +8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data +9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data +10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data +11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data +12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data +13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data +14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data +15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data +16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data +17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data +18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data +19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data +20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data +DROP TABLE test.t1; +CREATE TABLE test.t1 ( +a1 smallint NOT NULL, +a2 int NOT NULL, +a3 bigint NOT NULL, +a4 char(10), +a5 decimal(5,1), +a6 time, +a7 date, +a8 datetime, +a9 VARCHAR(255), +a10 blob, +PRIMARY KEY(a1) +) ENGINE=MyISAM; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` smallint(6) NOT NULL, + `a2` int(11) NOT NULL, + `a3` bigint(20) NOT NULL, + `a4` char(10) DEFAULT NULL, + `a5` decimal(5,1) DEFAULT NULL, + `a6` time DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` datetime DEFAULT NULL, + `a9` varchar(255) DEFAULT NULL, + `a10` blob, + PRIMARY KEY (`a1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 +1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data +2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data +3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data +4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data +5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data +6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data +7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data +8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data +9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data +10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data +11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data +12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data +13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data +14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data +15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data +16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data +17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data +18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data +19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data +20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data +ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` smallint(6) NOT NULL, + `a2` int(11) NOT NULL, + `a3` bigint(20) NOT NULL, + `a4` char(10) DEFAULT NULL, + `a5` decimal(5,1) DEFAULT NULL, + `a6` time DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` datetime DEFAULT NULL, + `a9` varchar(255) DEFAULT NULL, + `a10` blob, + PRIMARY KEY (`a1`) +) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +a2 Int NOT NULL AT=FIXED ST=DISK +a3 Bigint NOT NULL AT=FIXED ST=DISK +a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK +a5 Decimal(5,1) NULL AT=FIXED ST=DISK +a6 Time NULL AT=FIXED ST=DISK +a7 Date NULL AT=FIXED ST=DISK +a8 Datetime NULL AT=FIXED ST=DISK +a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK +a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 +1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data +2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data +3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data +4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data +5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data +6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data +7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data +8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data +9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data +10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data +11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data +12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data +13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data +14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data +15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data +16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data +17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data +18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data +19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data +20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data +ALTER TABLE test.t1 ENGINE=InnoDB; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` smallint(6) NOT NULL, + `a2` int(11) NOT NULL, + `a3` bigint(20) NOT NULL, + `a4` char(10) DEFAULT NULL, + `a5` decimal(5,1) DEFAULT NULL, + `a6` time DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` datetime DEFAULT NULL, + `a9` varchar(255) DEFAULT NULL, + `a10` blob, + PRIMARY KEY (`a1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 +1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data +2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data +3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data +4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data +5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data +6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data +7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data +8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data +9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data +10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data +11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data +12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data +13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data +14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data +15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data +16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data +17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data +18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data +19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data +20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data +ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` smallint(6) NOT NULL, + `a2` int(11) NOT NULL, + `a3` bigint(20) NOT NULL, + `a4` char(10) DEFAULT NULL, + `a5` decimal(5,1) DEFAULT NULL, + `a6` time DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` datetime DEFAULT NULL, + `a9` varchar(255) DEFAULT NULL, + `a10` blob, + PRIMARY KEY (`a1`) +) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +a2 Int NOT NULL AT=FIXED ST=DISK +a3 Bigint NOT NULL AT=FIXED ST=DISK +a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK +a5 Decimal(5,1) NULL AT=FIXED ST=DISK +a6 Time NULL AT=FIXED ST=DISK +a7 Date NULL AT=FIXED ST=DISK +a8 Datetime NULL AT=FIXED ST=DISK +a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK +a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY +ALTER TABLE test.t1 ENGINE=MyISAM; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` smallint(6) NOT NULL, + `a2` int(11) NOT NULL, + `a3` bigint(20) NOT NULL, + `a4` char(10) DEFAULT NULL, + `a5` decimal(5,1) DEFAULT NULL, + `a6` time DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` datetime DEFAULT NULL, + `a9` varchar(255) DEFAULT NULL, + `a10` blob, + PRIMARY KEY (`a1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE test.t1; +CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB; +SELECT * FROM test.t1 ORDER BY a1; +a1 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t1 p0 NULL 1 NULL KEY NULL NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default ts +ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE; +SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t1 p0 NULL 1 NULL KEY NULL NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default ts +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 +1 2.2345 20000001 +2 3.2345 20000002 +3 4.2345 20000003 +4 5.2345 20000004 +5 6.2345 20000005 +6 7.2345 20000006 +7 8.2345 20000007 +8 9.2345 20000008 +9 10.2345 20000009 +10 11.2345 20000010 +11 12.2345 20000011 +12 13.2345 20000012 +13 14.2345 20000013 +14 15.2345 20000014 +15 16.2345 20000015 +16 17.2345 20000016 +17 18.2345 20000017 +18 19.2345 20000018 +19 20.2345 20000019 +20 21.2345 20000020 +ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME; +SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1; +a1 a2 a3 hex(a4) a5 a6 a7 a8 +1 2.2345 20000001 0 1 23457 2006-01-01 07:04:00 +2 3.2345 20000002 0 1 23458 2006-01-01 07:04:00 +3 4.2345 20000003 0 1 23459 2006-01-01 07:04:00 +4 5.2345 20000004 0 1 23460 2006-01-01 07:04:00 +5 6.2345 20000005 0 1 23461 2006-01-01 07:04:00 +6 7.2345 20000006 0 1 23462 2006-01-01 07:04:00 +7 8.2345 20000007 0 1 23463 2006-01-01 07:04:00 +8 9.2345 20000008 0 1 23464 2006-01-01 07:04:00 +9 10.2345 20000009 0 1 23465 2006-01-01 07:04:00 +10 11.2345 20000010 0 1 23466 2006-01-01 07:04:00 +11 12.2345 20000011 0 1 23467 2006-01-01 07:04:00 +12 13.2345 20000012 0 1 23468 2006-01-01 07:04:00 +13 14.2345 20000013 0 1 23469 2006-01-01 07:04:00 +14 15.2345 20000014 0 1 23470 2006-01-01 07:04:00 +15 16.2345 20000015 0 1 23471 2006-01-01 07:04:00 +16 17.2345 20000016 0 1 23472 2006-01-01 07:04:00 +17 18.2345 20000017 0 1 23473 2006-01-01 07:04:00 +18 19.2345 20000018 0 1 23474 2006-01-01 07:04:00 +19 20.2345 20000019 0 1 23475 2006-01-01 07:04:00 +20 21.2345 20000020 0 1 23476 2006-01-01 07:04:00 +ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` int(11) NOT NULL, + `a2` float DEFAULT NULL, + `a3` double DEFAULT NULL, + `a4` bit(1) DEFAULT NULL, + `a5` tinyint(4) DEFAULT NULL, + `a6` bigint(20) DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` time DEFAULT NULL, + `a9` datetime DEFAULT NULL, + `a10` tinytext, + `a11` mediumtext, + `a12` longtext, + `a13` text, + `a14` blob, + PRIMARY KEY (`a1`) +) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +a2 Float NULL AT=FIXED ST=DISK +a3 Double NULL AT=FIXED ST=DISK +a4 Bit(1) NULL AT=FIXED ST=DISK +a5 Tinyint NULL AT=FIXED ST=DISK +a6 Bigint NULL AT=FIXED ST=DISK +a7 Date NULL AT=FIXED ST=DISK +a8 Time NULL AT=FIXED ST=DISK +a9 Datetime NULL AT=FIXED ST=DISK +a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY +SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1; +a1 a2 a3 hex(a4) a5 a6 a7 a8 a9 a10 a11 a12 a13 +1 2.2345 20000001 0 1 23457 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +2 3.2345 20000002 0 1 23458 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +3 4.2345 20000003 0 1 23459 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +4 5.2345 20000004 0 1 23460 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +5 6.2345 20000005 0 1 23461 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +6 7.2345 20000006 0 1 23462 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +7 8.2345 20000007 0 1 23463 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +8 9.2345 20000008 0 1 23464 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +9 10.2345 20000009 0 1 23465 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +10 11.2345 20000010 0 1 23466 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +11 12.2345 20000011 0 1 23467 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +12 13.2345 20000012 0 1 23468 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +13 14.2345 20000013 0 1 23469 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +14 15.2345 20000014 0 1 23470 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +15 16.2345 20000015 0 1 23471 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +16 17.2345 20000016 0 1 23472 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +17 18.2345 20000017 0 1 23473 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +18 19.2345 20000018 0 1 23474 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +19 20.2345 20000019 0 1 23475 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +20 21.2345 20000020 0 1 23476 2006-01-01 07:04:00 1971-05-28 16:55:03 abc abcdefg LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Text Field +ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3); +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` int(11) NOT NULL, + `a2` float DEFAULT NULL, + `a3` double DEFAULT NULL, + `a4` bit(1) DEFAULT NULL, + `a5` tinyint(4) DEFAULT NULL, + `a6` bigint(20) DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` time DEFAULT NULL, + `a9` datetime DEFAULT NULL, + `a10` tinytext, + `a11` mediumtext, + `a12` longtext, + `a13` text, + `a14` blob, + PRIMARY KEY (`a1`), + KEY `a2_i` (`a2`), + KEY `a3_i` (`a3`) +) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +a2 Float NULL AT=FIXED ST=MEMORY +a3 Double NULL AT=FIXED ST=MEMORY +a4 Bit(1) NULL AT=FIXED ST=DISK +a5 Tinyint NULL AT=FIXED ST=DISK +a6 Bigint NULL AT=FIXED ST=DISK +a7 Date NULL AT=FIXED ST=DISK +a8 Time NULL AT=FIXED ST=DISK +a9 Datetime NULL AT=FIXED ST=DISK +a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY +ALTER TABLE test.t1 DROP INDEX a2_i; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` int(11) NOT NULL, + `a2` float DEFAULT NULL, + `a3` double DEFAULT NULL, + `a4` bit(1) DEFAULT NULL, + `a5` tinyint(4) DEFAULT NULL, + `a6` bigint(20) DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` time DEFAULT NULL, + `a9` datetime DEFAULT NULL, + `a10` tinytext, + `a11` mediumtext, + `a12` longtext, + `a13` text, + `a14` blob, + PRIMARY KEY (`a1`), + KEY `a3_i` (`a3`) +) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +a2 Float NULL AT=FIXED ST=DISK +a3 Double NULL AT=FIXED ST=MEMORY +a4 Bit(1) NULL AT=FIXED ST=DISK +a5 Tinyint NULL AT=FIXED ST=DISK +a6 Bigint NULL AT=FIXED ST=DISK +a7 Date NULL AT=FIXED ST=DISK +a8 Time NULL AT=FIXED ST=DISK +a9 Datetime NULL AT=FIXED ST=DISK +a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY +TRUNCATE TABLE test.t1; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` int(11) NOT NULL, + `a2` float DEFAULT NULL, + `a3` double DEFAULT NULL, + `a4` bit(1) DEFAULT NULL, + `a5` tinyint(4) DEFAULT NULL, + `a6` bigint(20) DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` time DEFAULT NULL, + `a9` datetime DEFAULT NULL, + `a10` tinytext, + `a11` mediumtext, + `a12` longtext, + `a13` text, + `a14` blob, + PRIMARY KEY (`a1`), + KEY `a3_i` (`a3`) +) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +a2 Float NULL AT=FIXED ST=DISK +a3 Double NULL AT=FIXED ST=MEMORY +a4 Bit(1) NULL AT=FIXED ST=DISK +a5 Tinyint NULL AT=FIXED ST=DISK +a6 Bigint NULL AT=FIXED ST=DISK +a7 Date NULL AT=FIXED ST=DISK +a8 Time NULL AT=FIXED ST=DISK +a9 Datetime NULL AT=FIXED ST=DISK +a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY +a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY +ALTER TABLE test.t1 DROP a14; +ALTER TABLE test.t1 DROP a13; +ALTER TABLE test.t1 DROP a12; +ALTER TABLE test.t1 DROP a11; +ALTER TABLE test.t1 DROP a10; +ALTER TABLE test.t1 DROP a9; +ALTER TABLE test.t1 DROP a8; +ALTER TABLE test.t1 DROP a7; +ALTER TABLE test.t1 DROP a6; +ALTER TABLE test.t1 DROP PRIMARY KEY; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` int(11) NOT NULL, + `a2` float DEFAULT NULL, + `a3` double DEFAULT NULL, + `a4` bit(1) DEFAULT NULL, + `a5` tinyint(4) DEFAULT NULL, + KEY `a3_i` (`a3`) +) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +a1 Int NOT NULL AT=FIXED ST=DISK +a2 Float NULL AT=FIXED ST=DISK +a3 Double NULL AT=FIXED ST=MEMORY +a4 Bit(1) NULL AT=FIXED ST=DISK +a5 Tinyint NULL AT=FIXED ST=DISK +$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +DROP TABLE test.t1; +ALTER TABLESPACE ts +DROP DATAFILE './table_space/datafile.dat' + ENGINE NDB; +DROP TABLESPACE ts ENGINE NDB; +DROP LOGFILE GROUP lg ENGINE=NDB; diff --git a/mysql-test/suite/ndb/r/ndb_dd_backuprestore.result b/mysql-test/suite/ndb/r/ndb_dd_backuprestore.result new file mode 100644 index 00000000000..c82fe560121 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_dd_backuprestore.result @@ -0,0 +1,487 @@ +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +DROP TABLE IF EXISTS test.t4; +DROP TABLE IF EXISTS test.t5; +DROP TABLE IF EXISTS test.t6; +**** Test 1 Simple DD backup and restore **** +CREATE LOGFILE GROUP log_group1 +ADD UNDOFILE './log_group1/undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +CREATE TABLESPACE table_space1 +ADD DATAFILE './table_space1/datafile.dat' +USE LOGFILE GROUP log_group1 +INITIAL_SIZE 12M +ENGINE NDB; +CREATE TABLE test.t1 +(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; +SELECT COUNT(*) FROM test.t1; +COUNT(*) +500 +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; +pk1 c2 c3 hex(c4) +1 Sweden 500 1 +2 Sweden 499 1 +3 Sweden 498 1 +4 Sweden 497 1 +5 Sweden 496 1 +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +DROP TABLE test.t1; +ALTER TABLESPACE table_space1 +DROP DATAFILE './table_space1/datafile.dat' +ENGINE = NDB; +DROP TABLESPACE table_space1 +ENGINE = NDB; +DROP LOGFILE GROUP log_group1 +ENGINE =NDB; +SELECT COUNT(*) FROM test.t1; +COUNT(*) +500 +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; +pk1 c2 c3 hex(c4) +1 Sweden 500 1 +2 Sweden 499 1 +3 Sweden 498 1 +4 Sweden 497 1 +5 Sweden 496 1 +**** Test 2 Mixed Cluster Test backup and restore **** +CREATE TABLE test.t2 +(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; +CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; +CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; +SELECT COUNT(*) FROM test.t1; +COUNT(*) +500 +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; +pk1 c2 c3 hex(c4) +1 Sweden 500 1 +2 Sweden 499 1 +3 Sweden 498 1 +4 Sweden 497 1 +5 Sweden 496 1 +SELECT COUNT(*) FROM test.t2; +COUNT(*) +500 +SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; +pk1 c2 c3 hex(c4) +1 Sweden, Texas 500 0 +2 Sweden, Texas 499 0 +3 Sweden, Texas 498 0 +4 Sweden, Texas 497 0 +5 Sweden, Texas 496 0 +SELECT COUNT(*) FROM test.t3; +COUNT(*) +100 +SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; +LENGTH(data) +16384 +SELECT COUNT(*) FROM test.t4; +COUNT(*) +100 +SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; +LENGTH(data) +16384 +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +DROP TABLE test.t4; +ALTER TABLESPACE table_space1 +DROP DATAFILE './table_space1/datafile.dat' +ENGINE = NDB; +DROP TABLESPACE table_space1 +ENGINE = NDB; +DROP LOGFILE GROUP log_group1 +ENGINE =NDB; +SELECT COUNT(*) FROM test.t1; +COUNT(*) +500 +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; +pk1 c2 c3 hex(c4) +1 Sweden 500 1 +2 Sweden 499 1 +3 Sweden 498 1 +4 Sweden 497 1 +5 Sweden 496 1 +SELECT COUNT(*) FROM test.t2; +COUNT(*) +500 +SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; +pk1 c2 c3 hex(c4) +1 Sweden, Texas 500 0 +2 Sweden, Texas 499 0 +3 Sweden, Texas 498 0 +4 Sweden, Texas 497 0 +5 Sweden, Texas 496 0 +SELECT COUNT(*) FROM test.t3; +COUNT(*) +100 +SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; +LENGTH(data) +16384 +SELECT COUNT(*) FROM test.t4; +COUNT(*) +100 +SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; +LENGTH(data) +16384 +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +DROP TABLE test.t4; +**** Test 3 Adding partition Test backup and restore **** +CREATE TABLESPACE table_space2 +ADD DATAFILE './table_space2/datafile.dat' +USE LOGFILE GROUP log_group1 +INITIAL_SIZE 12M +ENGINE NDB; +CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; +CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; +CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); +CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); +CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); +CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` varchar(150) NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c3) PARTITIONS 4 */ +SHOW CREATE TABLE test.t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` text NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c3) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ +SHOW CREATE TABLE test.t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` varchar(202) NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (c3) (PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ +SHOW CREATE TABLE test.t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` varchar(180) NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c3) PARTITIONS 2 */ +SHOW CREATE TABLE test.t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` text NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (pk1) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ +SHOW CREATE TABLE test.t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` varchar(220) NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (pk1) (PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ +SELECT * FROM information_schema.partitions WHERE table_name= 't1'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 +NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 +NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 +NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 +SELECT * FROM information_schema.partitions WHERE table_name= 't2'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 +NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 +SELECT * FROM information_schema.partitions WHERE table_name= 't3'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 +NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 +NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 +SELECT * FROM information_schema.partitions WHERE table_name= 't4'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +SELECT * FROM information_schema.partitions WHERE table_name= 't5'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +SELECT * FROM information_schema.partitions WHERE table_name= 't6'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +SELECT COUNT(*) FROM test.t1; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 Sweden, Texas 2 0 +249 Sweden, Texas 4 0 +248 Sweden, Texas 6 0 +247 Sweden, Texas 8 0 +246 Sweden, Texas 10 0 +SELECT COUNT(*) FROM test.t2; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 +249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 +248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 +247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 +246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 +SELECT COUNT(*) FROM test.t3; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 +249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 +248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 +247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 +246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 +SELECT COUNT(*) FROM test.t4; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 Sweden, Texas 2 0 +249 Sweden, Texas 4 0 +248 Sweden, Texas 6 0 +247 Sweden, Texas 8 0 +246 Sweden, Texas 10 0 +SELECT COUNT(*) FROM test.t5; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 +249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 +248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 +247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 +246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 +SELECT COUNT(*) FROM test.t6; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 +249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 +248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 +247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 +246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +DROP TABLE test.t4; +DROP TABLE test.t5; +DROP TABLE test.t6; +ALTER TABLESPACE table_space1 +DROP DATAFILE './table_space1/datafile.dat' +ENGINE = NDB; +ALTER TABLESPACE table_space2 +DROP DATAFILE './table_space2/datafile.dat' +ENGINE = NDB; +DROP TABLESPACE table_space1 +ENGINE = NDB; +DROP TABLESPACE table_space2 +ENGINE = NDB; +DROP LOGFILE GROUP log_group1 +ENGINE =NDB; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` varchar(150) NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c3) PARTITIONS 4 */ +SHOW CREATE TABLE test.t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` text NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c3) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ +SHOW CREATE TABLE test.t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` varchar(202) NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) /*!50100 TABLESPACE table_space2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (c3) (PARTITION x1 VALUES LESS THAN (105) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (333) ENGINE = ndbcluster, PARTITION x3 VALUES LESS THAN (720) ENGINE = ndbcluster) */ +SHOW CREATE TABLE test.t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` varchar(180) NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c3) PARTITIONS 2 */ +SHOW CREATE TABLE test.t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` text NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (pk1) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ +SHOW CREATE TABLE test.t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `pk1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` varchar(220) NOT NULL, + `c3` int(11) NOT NULL, + `c4` bit(1) NOT NULL, + PRIMARY KEY (`pk1`,`c3`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (pk1) (PARTITION x1 VALUES LESS THAN (333) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (720) ENGINE = ndbcluster) */ +SELECT * FROM information_schema.partitions WHERE table_name= 't1'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t1 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 +NULL test t1 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 +NULL test t1 p2 NULL 3 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 +NULL test t1 p3 NULL 4 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space1 +SELECT * FROM information_schema.partitions WHERE table_name= 't2'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t2 p0 NULL 1 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 +NULL test t2 p1 NULL 2 NULL KEY NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 +SELECT * FROM information_schema.partitions WHERE table_name= 't3'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t3 x1 NULL 1 NULL RANGE NULL c3 NULL 105 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 +NULL test t3 x2 NULL 2 NULL RANGE NULL c3 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 +NULL test t3 x3 NULL 3 NULL RANGE NULL c3 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default table_space2 +SELECT * FROM information_schema.partitions WHERE table_name= 't4'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t4 p0 NULL 1 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +NULL test t4 p1 NULL 2 NULL HASH NULL c3 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +SELECT * FROM information_schema.partitions WHERE table_name= 't5'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t5 p0 NULL 1 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +NULL test t5 p1 NULL 2 NULL KEY NULL pk1 NULL NULL 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +SELECT * FROM information_schema.partitions WHERE table_name= 't6'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t6 x1 NULL 1 NULL RANGE NULL pk1 NULL 333 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +NULL test t6 x2 NULL 2 NULL RANGE NULL pk1 NULL 720 0 0 0 NULL 0 0 NULL NULL NULL NULL default NULL +SELECT COUNT(*) FROM test.t1; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 Sweden, Texas 2 0 +249 Sweden, Texas 4 0 +248 Sweden, Texas 6 0 +247 Sweden, Texas 8 0 +246 Sweden, Texas 10 0 +SELECT COUNT(*) FROM test.t2; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 +249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 +248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 +247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 +246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 +SELECT COUNT(*) FROM test.t3; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 +249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 +248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 +247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 +246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 +SELECT COUNT(*) FROM test.t4; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 Sweden, Texas 2 0 +249 Sweden, Texas 4 0 +248 Sweden, Texas 6 0 +247 Sweden, Texas 8 0 +246 Sweden, Texas 10 0 +SELECT COUNT(*) FROM test.t5; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 1 1 +249 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 3 1 +248 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 5 1 +247 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 7 1 +246 Sweden, Texas, ITALY, Kyle, JO, JBM,TU 9 1 +SELECT COUNT(*) FROM test.t6; +COUNT(*) +250 +SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; +pk1 c2 c3 hex(c4) +250 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 0 1 +249 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 2 1 +248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 +247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 +246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +DROP TABLE test.t4; +DROP TABLE test.t5; +DROP TABLE test.t6; +ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; +ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; +DROP TABLESPACE table_space1 ENGINE = NDB; +DROP TABLESPACE table_space2 ENGINE = NDB; +DROP LOGFILE GROUP log_group1 ENGINE = NDB; diff --git a/mysql-test/suite/ndb/r/ndb_dd_basic.result b/mysql-test/suite/ndb/r/ndb_dd_basic.result new file mode 100644 index 00000000000..7aeb156869b --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_dd_basic.result @@ -0,0 +1,510 @@ +DROP TABLE IF EXISTS t1; +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=MYISAM; +Warnings: +Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE = 4M +ENGINE=XYZ; +Warnings: +Warning 1286 Unknown table engine 'XYZ' +Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M; +Warnings: +Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +set storage_engine=ndb; +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M; +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; +set storage_engine=myisam; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; +CREATE TABLE t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `pk1` int(11) NOT NULL, + `b` int(11) NOT NULL, + `c` int(11) NOT NULL, + PRIMARY KEY (`pk1`) +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (0, 0, 0); +SELECT * FROM t1; +pk1 b c +0 0 0 +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), +(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), +(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), +(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), +(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), +(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), +(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), +(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), +(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), +(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), +(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), +(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), +(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), +(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), +(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), +(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), +(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), +(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), +(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), +(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), +(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), +(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), +(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), +(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), +(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), +(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), +(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), +(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), +(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), +(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), +(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), +(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), +(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), +(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), +(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), +(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), +(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), +(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), +(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), +(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), +(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), +(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), +(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), +(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), +(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), +(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), +(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), +(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), +(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), +(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), +(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), +(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), +(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), +(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), +(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), +(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), +(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), +(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), +(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), +(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), +(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), +(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), +(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), +(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), +(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), +(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), +(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), +(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), +(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), +(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), +(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), +(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), +(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), +(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), +(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), +(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), +(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), +(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), +(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), +(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), +(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), +(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), +(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), +(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), +(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), +(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), +(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), +(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), +(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), +(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), +(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), +(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); +SELECT COUNT(*) FROM t1; +COUNT(*) +501 +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'x.dat' +INITIAL_SIZE 10y +ENGINE = NDB; +ERROR HY000: A size parameter was incorrectly specified, either number or on the form 10M +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'x.dat' +INITIAL_SIZE 10MB +ENGINE = NDB; +ERROR HY000: A size parameter was incorrectly specified, either number or on the form 10M +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'x.dat' +INITIAL_SIZE 10 MB +ENGINE = NDB; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MB +ENGINE = NDB' at line 3 +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'x.dat' +INITIAL_SIZE 10 M +ENGINE = NDB; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'M +ENGINE = NDB' at line 3 +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'x.dat' +INITIAL_SIZE 1000000000000K +ENGINE = NDB; +ERROR HY000: The size number was correct but we don't allow the digit part to be more than 2 billion +DROP TABLE t1; +create tablespace ts2 +add datafile 'datafile2_1.dat' +use logfile group lg1 +initial_size 12M +engine ndb; +CREATE TABLE City ( +ID int(11) NOT NULL AUTO_INCREMENT, +Name char(35) NOT NULL, +CountryCode char(3) NOT NULL, +District char(20) NOT NULL, +Population int(11) NOT NULL, +PRIMARY KEY (ID) +) ENGINE=ndbcluster +tablespace ts2 +storage disk; +alter tablespace ts2 +drop datafile 'datafile2_1.dat' +engine ndb; +insert +into City (Name,CountryCode,District,Population) +values ('BeiJing','CN','Beijing',2000); +ERROR HY000: Got error 1602 'No datafile in tablespace' from NDBCLUSTER +drop tablespace ts2 +engine ndb; +ERROR HY000: Failed to drop TABLESPACE +drop table City; +drop tablespace ts2 +engine ndb; +CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; +INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); +BEGIN; +UPDATE t1 SET b = '2' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +2 +SELECT * FROM t1 WHERE a = 1; +a b c +1 2 1 +UPDATE t1 SET c = '2' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +2 +SELECT * FROM t1 WHERE a = 1; +a b c +1 2 2 +UPDATE t1 SET b = '3' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +3 +SELECT * FROM t1 WHERE a = 1; +a b c +1 3 2 +COMMIT; +SELECT * FROM t1 ORDER BY 1; +a b c +1 3 2 +2 2 2 +3 3 3 +BEGIN; +UPDATE t1 SET c = '3' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +3 +SELECT * FROM t1 WHERE a = 1; +a b c +1 3 3 +UPDATE t1 SET b = '4' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +4 +SELECT * FROM t1 WHERE a = 1; +a b c +1 4 3 +UPDATE t1 SET c = '4' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +4 +SELECT * FROM t1 WHERE a = 1; +a b c +1 4 4 +COMMIT; +SELECT * FROM t1 ORDER BY 1; +a b c +1 4 4 +2 2 2 +3 3 3 +UPDATE t1 SET b = '5' WHERE a = 1; +SELECT * FROM t1 ORDER BY 1; +a b c +1 5 4 +2 2 2 +3 3 3 +UPDATE t1 SET b = '6' WHERE b = '5'; +SELECT * FROM t1 ORDER BY 1; +a b c +1 6 4 +2 2 2 +3 3 3 +UPDATE t1 SET b = '7'WHERE c = '4'; +SELECT * FROM t1 ORDER BY 1; +a b c +1 7 4 +2 2 2 +3 3 3 +UPDATE t1 SET c = '5' WHERE a = 1; +SELECT * FROM t1 ORDER BY 1; +a b c +1 7 5 +2 2 2 +3 3 3 +UPDATE t1 SET c = '6' WHERE b = '7'; +SELECT * FROM t1 ORDER BY 1; +a b c +1 7 6 +2 2 2 +3 3 3 +UPDATE t1 SET c = '7' WHERE c = '6'; +SELECT * FROM t1 ORDER BY 1; +a b c +1 7 7 +2 2 2 +3 3 3 +DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB; +INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3'); +BEGIN; +UPDATE t1 SET b = '2' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +2 +SELECT * FROM t1 WHERE a = 1; +a b c +1 2 1 +UPDATE t1 SET c = '2' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +2 +SELECT * FROM t1 WHERE a = 1; +a b c +1 2 2 +UPDATE t1 SET b = '3' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +3 +SELECT * FROM t1 WHERE a = 1; +a b c +1 3 2 +COMMIT; +SELECT * FROM t1 ORDER BY 1; +a b c +1 3 2 +2 2 2 +3 3 3 +BEGIN; +UPDATE t1 SET c = '3' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +3 +SELECT * FROM t1 WHERE a = 1; +a b c +1 3 3 +UPDATE t1 SET b = '4' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +4 +SELECT * FROM t1 WHERE a = 1; +a b c +1 4 3 +UPDATE t1 SET c = '4' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +b +4 +SELECT * FROM t1 WHERE a = 1; +a b c +1 4 4 +COMMIT; +SELECT * FROM t1 ORDER BY 1; +a b c +1 4 4 +2 2 2 +3 3 3 +UPDATE t1 SET b = '5' WHERE a = 1; +SELECT * FROM t1 ORDER BY 1; +a b c +1 5 4 +2 2 2 +3 3 3 +UPDATE t1 SET b = '6' WHERE b = '5'; +SELECT * FROM t1 ORDER BY 1; +a b c +1 6 4 +2 2 2 +3 3 3 +UPDATE t1 SET b = '7' WHERE c = '4'; +SELECT * FROM t1 ORDER BY 1; +a b c +1 7 4 +2 2 2 +3 3 3 +UPDATE t1 SET c = '5' WHERE a = 1; +SELECT * FROM t1 ORDER BY 1; +a b c +1 7 5 +2 2 2 +3 3 3 +UPDATE t1 SET c = '6' WHERE b = '7'; +SELECT * FROM t1 ORDER BY 1; +a b c +1 7 6 +2 2 2 +3 3 3 +UPDATE t1 SET c = '7' WHERE c = '6'; +SELECT * FROM t1 ORDER BY 1; +a b c +1 7 7 +2 2 2 +3 3 3 +DROP TABLE t1; +CREATE TABLE t1 ( +a INT NOT NULL PRIMARY KEY, +b TEXT NOT NULL +) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +INSERT INTO t1 VALUES(1,@b1); +INSERT INTO t1 VALUES(2,@b2); +SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1; +a length(b) substr(b,1+2*900,2) +1 2256 b1 +SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2; +a length(b) substr(b,1+2*9000,2) +2 20000 b2 +UPDATE t1 SET b=@b2 WHERE a=1; +UPDATE t1 SET b=@b1 WHERE a=2; +SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1; +a length(b) substr(b,1+2*9000,2) +1 20000 b2 +SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2; +a length(b) substr(b,1+2*900,2) +2 2256 b1 +UPDATE t1 SET b=concat(b,b) WHERE a=1; +UPDATE t1 SET b=concat(b,b) WHERE a=2; +SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1; +a length(b) substr(b,1+4*9000,2) +1 40000 b2 +SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2; +a length(b) substr(b,1+4*900,2) +2 4512 b1 +DELETE FROM t1 WHERE a=1; +DELETE FROM t1 WHERE a=2; +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +DROP TABLE t1; +CREATE TABLE t1 ( +a int NOT NULL, +b varchar(4000), -- must use 2 pages undo +PRIMARY KEY using hash (a) +) +TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; +set autocommit = 0; +insert into t1 values(0,'x'); +insert into t1 values(1,'x'); +insert into t1 values(2,'x'); +insert into t1 values(3,'x'); +insert into t1 values(4,'x'); +insert into t1 values(5,'x'); +insert into t1 values(6,'x'); +insert into t1 values(7,'x'); +insert into t1 values(8,'x'); +delete from t1 where a = 0; +commit; +delete from t1; +begin; +insert into t1 values (1, 'x'); +select * from t1; +a b +1 x +rollback; +set autocommit = 1; +drop table t1; +create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) +TABLESPACE ts1 STORAGE DISK engine=NDB; +insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); +insert into test.t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); +select * from test.t1 order by f1; +f1 f2 f3 +111111 aaaaaa 1 +222222 bbbbbb 2 +select f1,f2 from test.t1 order by f2; +f1 f2 +111111 aaaaaa +222222 bbbbbb +select f2 from test.t1 order by f2; +f2 +aaaaaa +bbbbbb +select f1,f2 from test.t1 order by f1; +f1 f2 +111111 aaaaaa +222222 bbbbbb +drop table test.t1; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE = NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile02.dat' +ENGINE = NDB; +DROP TABLESPACE ts1 +ENGINE = NDB; +DROP LOGFILE GROUP lg1 +ENGINE =NDB; diff --git a/mysql-test/suite/ndb/r/ndb_dd_ddl.result b/mysql-test/suite/ndb/r/ndb_dd_ddl.result new file mode 100644 index 00000000000..67857d39ab6 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_dd_ddl.result @@ -0,0 +1,240 @@ +DROP TABLE IF EXISTS t1; +DROP DATABASE IF EXISTS mysqltest; +CREATE DATABASE mysqltest; +**** Begin Duplicate Statement Testing **** +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 1M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'undofile2.dat' +INITIAL_SIZE 1M +UNDO_BUFFER_SIZE 1M +ENGINE NDB; +ERROR HY000: Failed to create LOGFILE GROUP +SHOW WARNINGS; +Level Code Message +Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB +Error 1516 Failed to create LOGFILE GROUP +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 1M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +ERROR HY000: Failed to create LOGFILE GROUP +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE 1M ENGINE NDB; +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE 1M ENGINE=NDB; +ERROR HY000: Failed to alter: CREATE UNDOFILE +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 1M +ENGINE NDB; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 1M +ENGINE NDB; +ERROR HY000: Failed to create TABLESPACE +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile2.dat' +INITIAL_SIZE 1M +ENGINE=NDB; +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile2.dat' +INITIAL_SIZE 1M +ENGINE=NDB; +ERROR HY000: Failed to alter: CREATE DATAFILE +CREATE TABLE mysqltest.t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; +CREATE TABLE mysqltest.t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; +ERROR 42S01: Table 't1' already exists +CREATE TABLE mysqltest.t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +ENGINE=NDB; +ERROR 42S01: Table 't1' already exists +DROP TABLE mysqltest.t1; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile2.dat' +ENGINE=NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile2.dat' +ENGINE=NDB; +ERROR HY000: Failed to alter: NO SUCH FILE +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; +ERROR HY000: Failed to alter: NO SUCH FILE +DROP TABLESPACE ts1 +ENGINE=NDB; +DROP TABLESPACE ts1 +ENGINE=NDB; +ERROR HY000: Failed to drop TABLESPACE +DROP LOGFILE GROUP lg1 +ENGINE=NDB; +DROP LOGFILE GROUP lg1 +ENGINE=NDB; +ERROR HY000: Failed to drop LOGFILE GROUP +DROP DATABASE IF EXISTS mysqltest; +**** End Duplicate Statement Testing **** + +**** Begin Statment CaSe Testing **** +creaTE LOgfilE GrOuP lg1 +adD undoFILE 'undofile.dat' +initiAL_siZE 1M +UnDo_BuFfEr_SiZe = 1M +ENGInE=NDb; +altER LOgFiLE GrOUp lg1 +AdD UnDOfILe 'uNdOfiLe02.daT' +INItIAl_SIzE 1M ENgINE nDB; +CrEAtE TABLEspaCE ts1 +ADD DATAfilE 'datafile.dat' +UsE LoGFiLE GRoUP lg1 +INITiaL_SizE 1M +ENGiNe NDb; +AlTeR tAbLeSpAcE ts1 +AdD DaTaFiLe 'dAtAfiLe2.daT' +InItIaL_SiZe 1M +EnGiNe=NDB; +CREATE TABLE t1 +(pk1 int not null primary key, b int not null, c int not null) +TABLEspace ts1 storAGE dISk +ENGine nDb; +DROP TABLE t1; +AlteR TAblespaCE ts1 +droP DATAfile 'dAtAfiLe2.daT' +ENGINE=NDB; +ALter tablesPACE ts1 +dROp dAtAfIlE 'datafile.dat' +ENGine=Ndb; +DrOp TaBleSpAcE ts1 +engINE=ndB; +DrOp lOgFiLe GrOuP lg1 +EnGiNe=nDb; +**** End Statment CaSe Testing **** + +**** Begin = And No = Testing **** +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE=1M +UNDO_BUFFER_SIZE=1M +ENGINE=NDB; +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE=1M +ENGINE=NDB; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE=1M +ENGINE=NDB; +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile2.dat' +INITIAL_SIZE=1M +ENGINE=NDB; +CREATE TABLE t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; +DROP TABLE t1; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile2.dat' +ENGINE=NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; +DROP TABLESPACE ts1 +ENGINE=NDB; +DROP LOGFILE GROUP lg1 +ENGINE=NDB; + +**** End of = **** + +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 1M +UNDO_BUFFER_SIZE 1M +ENGINE NDB; +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE 1M +ENGINE NDB; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 1M +ENGINE NDB; +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile2.dat' +INITIAL_SIZE 1M +ENGINE NDB; +CREATE TABLE t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE MEMORY +ENGINE NDB; +ERROR HY000: Can't create table 'test.t1' (errno: 138) +CREATE TABLE t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE NDB; +CREATE INDEX b_i on t1(b); +CREATE INDEX bc_i on t1(b, c); +DROP TABLE t1; +CREATE TABLESPACE ts2 +ADD DATAFILE 'datafile3.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 1M +ENGINE NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile3.dat' +ENGINE NDB; +ERROR HY000: Failed to alter: NO SUCH FILE +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile2.dat' +ENGINE NDB; +ERROR HY000: Failed to alter: NO SUCH FILE +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile2.dat' +ENGINE NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE NDB; +DROP TABLESPACE ts1 +ENGINE NDB; +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile3.dat' +ENGINE NDB; +DROP TABLESPACE ts2 +ENGINE NDB; +DROP LOGFILE GROUP lg1 +ENGINE NDB; +**** End = And No = **** +create table t1 (a int primary key) engine = myisam; +create logfile group lg1 add undofile 'MYSQLTEST_VARDIR/master-data/test/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;; +ERROR HY000: Failed to create UNDOFILE +create logfile group lg1 +add undofile 'undofile.dat' +initial_size 1M +undo_buffer_size = 1M +engine=ndb; +create tablespace ts1 add datafile 'MYSQLTEST_VARDIR/master-data/test/t1.frm' use logfile group lg1 initial_size 1M engine ndb;; +ERROR HY000: Failed to create DATAFILE +drop tablespace ts1 +engine ndb; +ERROR HY000: Failed to drop TABLESPACE +drop logfile group lg1 +engine ndb; +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_dd_disk2memory.result b/mysql-test/suite/ndb/r/ndb_dd_disk2memory.result new file mode 100644 index 00000000000..46661f36d1b --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_dd_disk2memory.result @@ -0,0 +1,505 @@ +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +**** Test Setup Section **** +CREATE LOGFILE GROUP log_group1 +ADD UNDOFILE './log_group1/undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +CREATE TABLESPACE table_space1 +ADD DATAFILE './table_space1/datafile.dat' +USE LOGFILE GROUP log_group1 +INITIAL_SIZE 12M +ENGINE NDB; +CREATE TABLE test.t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE table_space1 STORAGE DISK +ENGINE=NDB; +CREATE TABLE test.t2 +(pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL) +ENGINE=NDB; + +**** Data load for first test **** +INSERT INTO test.t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), +(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), +(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), +(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), +(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), +(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), +(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); +INSERT INTO test.t2 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), +(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), +(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), +(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), +(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), +(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), +(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); + +*** Test 1 Section Begins *** +SELECT COUNT(*) FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); +COUNT(*) +1 +SELECT * FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); +pk2 b2 c2 pk1 b c +4 4 4 4 4 4 +SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 WHERE b IN (4); +COUNT(*) +1 +SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2 WHERE pk1 IN (75); +COUNT(*) +1 +SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; +b c +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 +19 19 +20 20 +21 21 +22 22 +23 23 +24 24 +25 25 +26 26 +27 27 +28 28 +29 29 +30 30 +31 31 +32 32 +33 33 +34 34 +35 35 +36 36 +37 37 +38 38 +39 39 +40 40 +41 41 +42 42 +43 43 +44 44 +45 45 +46 46 +47 47 +48 48 +49 49 +50 50 +51 51 +52 52 +53 53 +54 54 +55 55 +56 56 +57 57 +58 58 +59 59 +60 60 +61 61 +62 62 +63 63 +64 64 +65 65 +66 66 +67 67 +68 68 +69 69 +70 70 +71 71 +72 72 +73 73 +74 74 +75 75 + +*** Setup for test 2 **** +DELETE FROM test.t1; +INSERT INTO test.t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45); + +**** Test Section 2 **** +SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; +b c +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 +19 19 +20 20 +21 21 +22 22 +23 23 +24 24 +25 25 +26 26 +27 27 +28 28 +29 29 +30 30 +31 31 +32 32 +33 33 +34 34 +35 35 +36 36 +37 37 +38 38 +39 39 +40 40 +41 41 +42 42 +43 43 +44 44 +45 45 +SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2; +COUNT(*) +45 +SELECT COUNT(*) FROM test.t1 RIGHT JOIN test.t2 ON b=b2; +COUNT(*) +75 +SHOW CREATE TABLE test.t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `pk2` int(11) NOT NULL, + `b2` int(11) NOT NULL, + `c2` int(11) NOT NULL, + PRIMARY KEY (`pk2`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `pk1` int(11) NOT NULL, + `b` int(11) NOT NULL, + `c` int(11) NOT NULL, + PRIMARY KEY (`pk1`) +) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK +ENGINE=NDB; +SHOW CREATE TABLE test.t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `pk2` int(11) NOT NULL, + `b2` int(11) NOT NULL, + `c2` int(11) NOT NULL, + PRIMARY KEY (`pk2`) +) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +ALTER TABLE test.t1 STORAGE MEMORY ENGINE=NDBCLUSTER; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `pk1` int(11) NOT NULL, + `b` int(11) NOT NULL, + `c` int(11) NOT NULL, + PRIMARY KEY (`pk1`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 + +DROP TABLE test.t1; +DROP TABLE test.t2; +*** Setup for Test Section 3 *** +CREATE TABLE test.t1 ( +usr_id INT unsigned NOT NULL, +uniq_id INT unsigned NOT NULL AUTO_INCREMENT, +start_num INT unsigned NOT NULL DEFAULT 1, +increment INT unsigned NOT NULL DEFAULT 1, +PRIMARY KEY (uniq_id), +INDEX usr_uniq_idx (usr_id, uniq_id), +INDEX uniq_usr_idx (uniq_id, usr_id)) +TABLESPACE table_space1 STORAGE DISK +ENGINE=NDB; +CREATE TABLE test.t2 ( +id INT unsigned NOT NULL DEFAULT 0, +usr2_id INT unsigned NOT NULL DEFAULT 0, +max INT unsigned NOT NULL DEFAULT 0, +c_amount INT unsigned NOT NULL DEFAULT 0, +d_max INT unsigned NOT NULL DEFAULT 0, +d_num INT unsigned NOT NULL DEFAULT 0, +orig_time INT unsigned NOT NULL DEFAULT 0, +c_time INT unsigned NOT NULL DEFAULT 0, +active ENUM ("no","yes") NOT NULL, +PRIMARY KEY (id,usr2_id), +INDEX id_idx (id), +INDEX usr2_idx (usr2_id)) +ENGINE=NDB; +INSERT INTO test.t1 VALUES (3,NULL,0,50),(3,NULL,0,200),(3,NULL,0,25),(3,NULL,0,84676),(3,NULL,0,235),(3,NULL,0,10),(3,NULL,0,3098),(3,NULL,0,2947),(3,NULL,0,8987),(3,NULL,0,8347654),(3,NULL,0,20398),(3,NULL,0,8976),(3,NULL,0,500),(3,NULL,0,198); + +**** Test Section 3 **** +SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, +test.t2.usr2_id,test.t2.c_amount,test.t2.max +FROM test.t1 +LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id +WHERE test.t1.uniq_id = 4 +ORDER BY test.t2.c_amount; +usr_id uniq_id increment usr2_id c_amount max +3 4 84676 NULL NULL NULL +INSERT INTO test.t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); +INSERT INTO test.t2 VALUES (4,3,3000,6000,0,0,746584,837484,'yes'); +INSERT INTO test.t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes'); +SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, +test.t2.usr2_id,test.t2.c_amount,test.t2.max +FROM test.t1 +LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id +WHERE test.t1.uniq_id = 4 +ORDER BY test.t2.c_amount; +usr_id uniq_id increment usr2_id c_amount max +3 4 84676 3 6000 3000 + +DROP TABLE test.t1; +DROP TABLE test.t2; +CREATE TABLE test.t1 ( +a1 smallint NOT NULL, +a2 int NOT NULL, +a3 bigint NOT NULL, +a4 char(10), +a5 decimal(5,1), +a6 time, +a7 date, +a8 datetime, +a9 VARCHAR(255), +a10 blob, +PRIMARY KEY(a1) +) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; +CREATE TABLE test.t2 ( +b1 smallint NOT NULL, +b2 int NOT NULL, +b3 bigint NOT NULL, +b4 char(10), +b5 decimal(5,1), +b6 time, +b7 date, +b8 datetime, +b9 VARCHAR(255), +b10 blob, +PRIMARY KEY(b1) +) ENGINE=NDB; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` smallint(6) NOT NULL, + `a2` int(11) NOT NULL, + `a3` bigint(20) NOT NULL, + `a4` char(10) DEFAULT NULL, + `a5` decimal(5,1) DEFAULT NULL, + `a6` time DEFAULT NULL, + `a7` date DEFAULT NULL, + `a8` datetime DEFAULT NULL, + `a9` varchar(255) DEFAULT NULL, + `a10` blob, + PRIMARY KEY (`a1`), + KEY `a2` (`a2`), + KEY `a3` (`a3`), + KEY `a8` (`a8`) +) /*!50100 TABLESPACE table_space1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +Table Create Table +t2 CREATE TABLE `t2` ( + `b1` smallint(6) NOT NULL, + `b2` int(11) NOT NULL, + `b3` bigint(20) NOT NULL, + `b4` char(10) DEFAULT NULL, + `b5` decimal(5,1) DEFAULT NULL, + `b6` time DEFAULT NULL, + `b7` date DEFAULT NULL, + `b8` datetime DEFAULT NULL, + `b9` varchar(255) DEFAULT NULL, + `b10` blob, + PRIMARY KEY (`b1`), + KEY `b2` (`b2`), + KEY `b3` (`b3`), + KEY `b8` (`b8`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 +1 2 2000000001 aaa1 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data +2 3 2000000002 aaa2 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data +3 4 2000000003 aaa3 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data +4 5 2000000004 aaa4 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data +5 6 2000000005 aaa5 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data +6 7 2000000006 aaa6 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data +7 8 2000000007 aaa7 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data +8 9 2000000008 aaa8 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data +9 10 2000000009 aaa9 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data +10 11 2000000010 aaa10 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data +11 12 2000000011 aaa11 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data +12 13 2000000012 aaa12 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data +13 14 2000000013 aaa13 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data +14 15 2000000014 aaa14 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data +15 16 2000000015 aaa15 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data +16 17 2000000016 aaa16 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data +17 18 2000000017 aaa17 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data +18 19 2000000018 aaa18 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data +19 20 2000000019 aaa19 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data +20 21 2000000020 aaa20 34.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data +b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 +3 4 3000000001 aaa1 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb1 binary data +4 5 3000000002 aaa2 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb2 binary data +5 6 3000000003 aaa3 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb3 binary data +6 7 3000000004 aaa4 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb4 binary data +7 8 3000000005 aaa5 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb5 binary data +8 9 3000000006 aaa6 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb6 binary data +9 10 3000000007 aaa7 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb7 binary data +10 11 3000000008 aaa8 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb8 binary data +11 12 3000000009 aaa9 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb9 binary data +12 13 3000000010 aaa10 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb10 binary data +13 14 3000000011 aaa11 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb11 binary data +14 15 3000000012 aaa12 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb12 binary data +15 16 3000000013 aaa13 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb13 binary data +16 17 3000000014 aaa14 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb14 binary data +17 18 3000000015 aaa15 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb15 binary data +18 19 3000000016 aaa16 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb16 binary data +19 20 3000000017 aaa17 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb17 binary data +20 21 3000000018 aaa18 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb18 binary data +21 22 3000000019 aaa19 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb19 binary data +22 23 3000000020 aaa20 35.2 04:03:02 2006-01-01 1971-05-28 16:55:03 bbbbbbbbbbbbb20 binary data +COUNT(a1) a1 COUNT(a1)*a1 +1 1 1 +1 2 2 +1 3 3 +1 4 4 +1 5 5 +1 6 6 +1 7 7 +1 8 8 +1 9 9 +1 10 10 +1 11 11 +1 12 12 +1 13 13 +1 14 14 +1 15 15 +1 16 16 +1 17 17 +1 18 18 +1 19 19 +1 20 20 +COUNT(a2) (a2+1) COUNT(a2)*(a2+0) +1 3 2 +1 4 3 +1 5 4 +1 6 5 +1 7 6 +1 8 7 +1 9 8 +1 10 9 +1 11 10 +1 12 11 +1 13 12 +1 14 13 +1 15 14 +1 16 15 +1 17 16 +1 18 17 +1 19 18 +1 20 19 +1 21 20 +1 22 21 +a +8 +7 +6 +5 +a c +8 Clavin +7 Serge +6 Jeb +5 Stewart +4 Martin +3 Pekka +a +2 +3 +4 +5 +6 +7 +8 +a c +4 Martin +5 Stewart +6 Jeb +7 Serge +8 Clavin +a +1 +1 +1 +2 +2 +3 +3 +a +3 +2 +1 +a +3 +2 +1 +a +1 +2 +3 +email shipcode +test1@testdomain.com Z001 +test2@testdomain.com R002 +test2@testdomain.com Z001 +test3@testdomain.com Z001 +email +test1@testdomain.com +test2@testdomain.com +test3@testdomain.com +email shipcode +test1@testdomain.com Z001 +test2@testdomain.com Z001 +test2@testdomain.com R002 +test3@testdomain.com Z001 diff --git a/mysql-test/suite/ndb/r/ndb_dd_dump.result b/mysql-test/suite/ndb/r/ndb_dd_dump.result new file mode 100644 index 00000000000..9b1a1295588 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_dd_dump.result @@ -0,0 +1,218 @@ +DROP TABLE IF EXISTS t1, t2, t3; +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile_lg1_01.dat' +INITIAL_SIZE 2M +UNDO_BUFFER_SIZE = 1M +ENGINE NDB; +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile_lg1_02.dat' +INITIAL_SIZE = 4M +ENGINE NDB; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile_ts1_01.dat' +USE LOGFILE GROUP lg1 +EXTENT_SIZE 1M +INITIAL_SIZE 2M +ENGINE NDB; +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile_ts1_02.dat' +INITIAL_SIZE = 1M +ENGINE=NDB; +CREATE TABLESPACE ts2 +ADD DATAFILE 'datafile_ts2_01.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 2M +ENGINE NDB; +CREATE TABLESPACE ts3 +ADD DATAFILE 'datafile_ts3_01.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 4M +ENGINE NDB; +CREATE TABLE t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; +CREATE TABLE t2 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts2 STORAGE DISK +ENGINE=NDB; +CREATE TABLE t3 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts3 STORAGE DISK +ENGINE=NDB; +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), +(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), +(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), +(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), +(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), +(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), +(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), +(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), +(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), +(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), +(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), +(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), +(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), +(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), +(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), +(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), +(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), +(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), +(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), +(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), +(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), +(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), +(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), +(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), +(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), +(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), +(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), +(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), +(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), +(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), +(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), +(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), +(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), +(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), +(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), +(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), +(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), +(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), +(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), +(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), +(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), +(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), +(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), +(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), +(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), +(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), +(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), +(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), +(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), +(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), +(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), +(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), +(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), +(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), +(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), +(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), +(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), +(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), +(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), +(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), +(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), +(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), +(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), +(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), +(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), +(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), +(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), +(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), +(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), +(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), +(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), +(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), +(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), +(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), +(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), +(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), +(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), +(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), +(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), +(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), +(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), +(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), +(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), +(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), +(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), +(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), +(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), +(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), +(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), +(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), +(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), +(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); +INSERT INTO t2 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); +INSERT INTO t3 VALUES +(1,1,1); +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile_ts1_01.dat' +ENGINE = NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile_ts1_02.dat' +ENGINE = NDB; +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile_ts2_01.dat' +ENGINE = NDB; +ALTER TABLESPACE ts3 +DROP DATAFILE 'datafile_ts3_01.dat' +ENGINE = NDB; +DROP TABLESPACE ts1 ENGINE = NDB; +DROP TABLESPACE ts2 ENGINE = NDB; +DROP TABLESPACE ts3 ENGINE = NDB; +DROP LOGFILE GROUP lg1 ENGINE = NDB; +SELECT DISTINCT +LOGFILE_GROUP_NAME, +FILE_NAME, +TOTAL_EXTENTS, +INITIAL_SIZE, +ENGINE +FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME; +LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE +lg1 NULL NULL NULL ndbcluster +lg1 undofile_lg1_01.dat 524288 2097152 ndbcluster +lg1 undofile_lg1_02.dat 1048576 4194304 ndbcluster +SELECT DISTINCT +TABLESPACE_NAME, +LOGFILE_GROUP_NAME, +FILE_NAME, +EXTENT_SIZE, +INITIAL_SIZE, +ENGINE +FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME; +TABLESPACE_NAME LOGFILE_GROUP_NAME FILE_NAME EXTENT_SIZE INITIAL_SIZE ENGINE +ts1 lg1 datafile_ts1_01.dat 1048576 2097152 ndbcluster +ts1 lg1 datafile_ts1_02.dat 1048576 1048576 ndbcluster +ts2 lg1 datafile_ts2_01.dat 1048576 2097152 ndbcluster +ts3 lg1 datafile_ts3_01.dat 1048576 4194304 ndbcluster +SELECT COUNT(*) FROM t1; +COUNT(*) +500 +SELECT COUNT(*) FROM t2; +COUNT(*) +5 +SELECT COUNT(*) FROM t3; +COUNT(*) +1 +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile_ts1_01.dat' +ENGINE = NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile_ts1_02.dat' +ENGINE = NDB; +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile_ts2_01.dat' +ENGINE = NDB; +ALTER TABLESPACE ts3 +DROP DATAFILE 'datafile_ts3_01.dat' +ENGINE = NDB; +DROP TABLESPACE ts1 ENGINE = NDB; +DROP TABLESPACE ts2 ENGINE = NDB; +DROP TABLESPACE ts3 ENGINE = NDB; +DROP LOGFILE GROUP lg1 ENGINE = NDB; diff --git a/mysql-test/suite/ndb/r/ndb_dd_sql_features.result b/mysql-test/suite/ndb/r/ndb_dd_sql_features.result new file mode 100644 index 00000000000..135250fe7e8 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_dd_sql_features.result @@ -0,0 +1,599 @@ +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +***** +**** Copy data from table in one table space to table +**** in different table space +***** +CREATE LOGFILE GROUP lg +ADD UNDOFILE './lg_group/undofile.dat' + INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +CREATE TABLESPACE ts1 +ADD DATAFILE './table_space1/datafile.dat' + USE LOGFILE GROUP lg +INITIAL_SIZE 25M +ENGINE NDB; +CREATE TABLESPACE ts2 +ADD DATAFILE './table_space2/datafile.dat' + USE LOGFILE GROUP lg +INITIAL_SIZE 20M +ENGINE NDB; +CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) +TABLESPACE ts2 STORAGE DISK ENGINE=NDB; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` int(11) NOT NULL, + `a2` varchar(256) DEFAULT NULL, + `a3` blob, + PRIMARY KEY (`a1`) +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +SHOW CREATE TABLE test.t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a1` int(11) NOT NULL, + `a2` varchar(256) DEFAULT NULL, + `a3` blob, + PRIMARY KEY (`a1`) +) /*!50100 TABLESPACE ts2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +INSERT INTO test.t1 VALUES (1,'111111','aaaaaaaa'); +INSERT INTO test.t1 VALUES (2,'222222','bbbbbbbb'); +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 +1 111111 aaaaaaaa +2 222222 bbbbbbbb +INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; +SELECT * FROM test.t2 ORDER BY a1; +a1 a2 a3 +1 111111 aaaaaaaa +2 222222 bbbbbbbb +DROP TABLE test.t1, test.t2; +set @vc1 = repeat('a', 200); +set @vc2 = repeat('b', 500); +set @vc3 = repeat('c', 1000); +set @vc4 = repeat('d', 4000); +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +select length(@x0),length(@b1),length(@d1) from dual; +length(@x0) length(@b1) length(@d1) +256 2256 3000 +select length(@x0),length(@b2),length(@d2) from dual; +length(@x0) length(@b2) length(@d2) +256 20000 30000 +CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) +TABLESPACE ts2 STORAGE DISK ENGINE=NDB; +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a1` int(11) NOT NULL, + `a2` varchar(5000) DEFAULT NULL, + `a3` blob, + PRIMARY KEY (`a1`) +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +SHOW CREATE TABLE test.t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a1` int(11) NOT NULL, + `a2` varchar(5000) DEFAULT NULL, + `a3` blob, + PRIMARY KEY (`a1`) +) /*!50100 TABLESPACE ts2 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +INSERT INTO test.t1 VALUES (1,@vc1,@d1); +INSERT INTO test.t1 VALUES (2,@vc2,@b1); +INSERT INTO test.t1 VALUES (3,@vc3,@d2); +INSERT INTO test.t1 VALUES (4,@vc4,@b2); +SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) +FROM test.t1 WHERE a1=1; +a1 length(a2) substr(a2,180,2) length(a3) substr(a3,1+3*900,3) +1 200 aa 3000 dd1 +SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) +FROM test.t1 where a1=2; +a1 length(a2) substr(a2,480,2) length(a3) substr(a3,1+2*900,3) +2 500 bb 2256 b1b +INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; +SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) +FROM test.t2 WHERE a1=1; +a1 length(a2) substr(a2,180,2) length(a3) substr(a3,1+3*900,3) +1 200 aa 3000 dd1 +SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) +FROM test.t2 where a1=2; +a1 length(a2) substr(a2,480,2) length(a3) substr(a3,1+2*900,3) +2 500 bb 2256 b1b +DROP TABLE test.t1, test.t2; +***** +**** Insert, Update, Delete from NDB table with BLOB fields +***** +set @vc1 = repeat('a', 200); +set @vc2 = repeat('b', 500); +set @vc3 = repeat('c', 1000); +set @vc4 = repeat('d', 4000); +set @vc5 = repeat('d', 5000); +set @bb1 = repeat('1', 2000); +set @bb2 = repeat('2', 5000); +set @bb3 = repeat('3', 10000); +set @bb4 = repeat('4', 40000); +set @bb5 = repeat('5', 50000); +select length(@vc1),length(@vc2),length(@vc3),length(@vc4),length(@vc5) +from dual; +length(@vc1) length(@vc2) length(@vc3) length(@vc4) length(@vc5) +200 500 1000 4000 5000 +select length(@bb1),length(@bb2),length(@bb3),length(@bb4),length(@bb5) +from dual; +length(@bb1) length(@bb2) length(@bb3) length(@bb4) length(@bb5) +2000 5000 10000 40000 50000 +CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +INSERT INTO test.t1 VALUES (1,@vc1,@bb1); +INSERT INTO test.t1 VALUES (2,@vc2,@bb2); +INSERT INTO test.t1 VALUES (3,@vc3,@bb3); +INSERT INTO test.t1 VALUES (4,@vc4,@bb4); +INSERT INTO test.t1 VALUES (5,@vc5,@bb5); +UPDATE test.t1 SET a2=@vc5, a3=@bb5 WHERE a1=1; +SELECT a1,length(a2),substr(a2,4998,2),length(a3),substr(a3,49997,3) +FROM test.t1 WHERE a1=1; +a1 length(a2) substr(a2,4998,2) length(a3) substr(a3,49997,3) +1 5000 dd 50000 555 +UPDATE test.t1 SET a2=@vc4, a3=@bb4 WHERE a1=2; +SELECT a1,length(a2),substr(a2,3998,2),length(a3),substr(a3,39997,3) +FROM test.t1 WHERE a1=2; +a1 length(a2) substr(a2,3998,2) length(a3) substr(a3,39997,3) +2 4000 dd 40000 444 +UPDATE test.t1 SET a2=@vc2, a3=@bb2 WHERE a1=3; +SELECT a1,length(a2),substr(a2,498,2),length(a3),substr(a3,3997,3) +FROM test.t1 WHERE a1=3; +a1 length(a2) substr(a2,498,2) length(a3) substr(a3,3997,3) +3 500 bb 5000 222 +UPDATE test.t1 SET a2=@vc3, a3=@bb3 WHERE a1=4; +SELECT a1,length(a2),substr(a2,998,2),length(a3),substr(a3,9997,3) +FROM test.t1 WHERE a1=4; +a1 length(a2) substr(a2,998,2) length(a3) substr(a3,9997,3) +4 1000 cc 10000 333 +UPDATE test.t1 SET a2=@vc1, a3=@bb1 WHERE a1=5; +SELECT a1,length(a2),substr(a2,198,2),length(a3),substr(a3,1997,3) +FROM test.t1 WHERE a1=5; +a1 length(a2) substr(a2,198,2) length(a3) substr(a3,1997,3) +5 200 aa 2000 111 +DELETE FROM test.t1 where a1=5; +SELECT count(*) from test.t1; +count(*) +4 +DELETE FROM test.t1 where a1=4; +SELECT count(*) from test.t1; +count(*) +3 +DELETE FROM test.t1 where a1=3; +SELECT count(*) from test.t1; +count(*) +2 +DELETE FROM test.t1 where a1=2; +SELECT count(*) from test.t1; +count(*) +1 +DELETE FROM test.t1 where a1=1; +SELECT count(*) from test.t1; +count(*) +0 +DROP TABLE test.t1; +***** +**** Create Stored procedures that use disk based tables +***** +CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB// +CREATE PROCEDURE test.sp1() +BEGIN +INSERT INTO test.t1 values (1,'111111','aaaaaaaa'); +END// +CALL test.sp1(); +SELECT * FROM test.t1; +a1 a2 a3 +1 111111 aaaaaaaa +CREATE PROCEDURE test.sp2(n INT, vc VARCHAR(256), blb BLOB) +BEGIN +UPDATE test.t1 SET a2=vc, a3=blb where a1=n; +END// +CALL test.sp2(1,'222222','bbbbbbbb'); +SELECT * FROM test.t1; +a1 a2 a3 +1 222222 bbbbbbbb +DELETE FROM test.t1; +DROP PROCEDURE test.sp1; +DROP PROCEDURE test.sp2; +DROP TABLE test.t1; +***** +***** Create function that operate on disk based tables +***** +CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +CREATE FUNCTION test.fn1(n INT) RETURNS INT +BEGIN +DECLARE v INT; +SELECT a1 INTO v FROM test.t1 WHERE a1=n; +RETURN v; +END// +CREATE FUNCTION test.fn2(n INT, blb BLOB) RETURNS BLOB +BEGIN +DECLARE vv BLOB; +UPDATE test.t1 SET a3=blb where a1=n; +SELECT a3 INTO vv FROM test.t1 WHERE a1=n; +RETURN vv; +END// +SELECT test.fn1(10) FROM DUAL; +test.fn1(10) +10 +SELECT test.fn2(50, 'new BLOB content') FROM DUAL; +test.fn2(50, 'new BLOB content') +new BLOB content +DELETE FROM test.t1; +DROP FUNCTION test.fn1; +DROP FUNCTION test.fn2; +DROP TABLE test.t1; +***** +***** Create triggers that operate on disk based tables +***** +CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +CREATE TRIGGER test.trg1 BEFORE INSERT ON test.t1 FOR EACH ROW +BEGIN +if isnull(new.a2) then +set new.a2:= 'trg1 works on a2 field'; +end if; +if isnull(new.a3) then +set new.a3:= 'trg1 works on a3 field'; +end if; +end// +insert into test.t1 (a1) values (1)// +insert into test.t1 (a1,a2) values (2, 'ccccccc')// +select * from test.t1 order by a1// +a1 a2 a3 +1 trg1 works on a2 field trg1 works on a3 field +2 ccccccc trg1 works on a3 field +DELETE FROM test.t1; +DROP TRIGGER test.trg1; +DROP TABLE test.t1; +***** +***** Create, update views that operate on disk based tables +***** +CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +CREATE VIEW test.v1 AS SELECT * FROM test.t1; +SELECT * FROM test.v1 order by a1; +a1 a2 a3 +1 aaaaa1 bbbbb1 +2 aaaaa2 bbbbb2 +3 aaaaa3 bbbbb3 +4 aaaaa4 bbbbb4 +5 aaaaa5 bbbbb5 +6 aaaaa6 bbbbb6 +7 aaaaa7 bbbbb7 +8 aaaaa8 bbbbb8 +9 aaaaa9 bbbbb9 +10 aaaaa10 bbbbb10 +CHECK TABLE test.v1, test.t1; +Table Op Msg_type Msg_text +test.v1 check status OK +test.t1 check note The storage engine for the table doesn't support check +UPDATE test.v1 SET a2='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' WHERE a1=5; +SELECT * FROM test.v1 order by a1; +a1 a2 a3 +1 aaaaa1 bbbbb1 +2 aaaaa2 bbbbb2 +3 aaaaa3 bbbbb3 +4 aaaaa4 bbbbb4 +5 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz bbbbb5 +6 aaaaa6 bbbbb6 +7 aaaaa7 bbbbb7 +8 aaaaa8 bbbbb8 +9 aaaaa9 bbbbb9 +10 aaaaa10 bbbbb10 +DROP VIEW test.v1; +DELETE FROM test.t1; +DROP TABLE test.t1; +***** +***** Create and use disk based table that use auto inc +***** +CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +a2 VARCHAR(256), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 +1 aaaaa10 bbbbb10 +2 aaaaa9 bbbbb9 +3 aaaaa8 bbbbb8 +4 aaaaa7 bbbbb7 +5 aaaaa6 bbbbb6 +6 aaaaa5 bbbbb5 +7 aaaaa4 bbbbb4 +8 aaaaa3 bbbbb3 +9 aaaaa2 bbbbb2 +10 aaaaa1 bbbbb1 +DELETE FROM test.t1; +DROP TABLE test.t1; +***** +***** Create test that use transaction (commit, rollback) +***** +SET AUTOCOMMIT=0; +CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +a2 VARCHAR(256), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); +COMMIT; +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 +1 aaaaa1 bbbbb1 +INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); +ROLLBACK; +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 +1 aaaaa1 bbbbb1 +DELETE FROM test.t1; +DROP TABLE test.t1; +SET AUTOCOMMIT=1; +CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +a2 VARCHAR(256), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +START TRANSACTION; +INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); +COMMIT; +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 +1 aaaaa1 bbbbb1 +START TRANSACTION; +INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); +ROLLBACK; +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 +1 aaaaa1 bbbbb1 +DELETE FROM test.t1; +DROP TABLE test.t1; +***** +***** Create test that uses locks +***** +drop table if exists test.t1; +CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +a2 VARCHAR(256), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +LOCK TABLES test.t1 write; +INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); +INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 +1 aaaaa1 bbbbb1 +2 aaaaa2 bbbbb2 +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 +1 aaaaa1 bbbbb1 +2 aaaaa2 bbbbb2 +INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); +UNLOCK TABLES; +INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); +SELECT * FROM test.t1 ORDER BY a1; +a1 a2 a3 +1 aaaaa1 bbbbb1 +2 aaaaa2 bbbbb2 +3 aaaaa3 bbbbb3 +4 aaaaa3 bbbbb3 +DELETE FROM test.t1; +DROP TABLE test.t1; +***** +***** Create large disk base table, do random queries, check cache hits +***** +set @vc1 = repeat('a', 200); +SELECT @vc1 FROM DUAL; +@vc1 +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +set @vc2 = repeat('b', 500); +set @vc3 = repeat('b', 998); +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +select length(@x0),length(@b1),length(@d1) from dual; +length(@x0) length(@b1) length(@d1) +256 2256 3000 +select length(@x0),length(@b2),length(@d2) from dual; +length(@x0) length(@b2) length(@d2) +256 20000 30000 +CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(1000), a3 BLOB) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +INSERT INTO test.t1 values(1,@vc1,@d1); +INSERT INTO test.t1 values(2,@vc2,@d2); +explain SELECT * from test.t1 WHERE a1 = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const # +SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) +FROM test.t1 WHERE a1=1 ORDER BY a1; +a1 length(a2) substr(a2,1+2*900,2) length(a3) substr(a3,1+3*900,3) +1 200 3000 dd1 +SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) +FROM test.t1 where a1=2 ORDER BY a1; +a1 length(a2) substr(a2,1+2*9000,2) length(a3) substr(a3,1+3*9000,3) +2 500 30000 dd2 +UPDATE test.t1 set a2=@vc2,a3=@d2 where a1=1; +UPDATE test.t1 set a2=@vc1,a3=@d1 where a1=2; +SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) +FROM test.t1 where a1=1; +a1 length(a2) substr(a2,1+2*9000,2) length(a3) substr(a3,1+3*9000,3) +1 500 30000 dd2 +SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) +FROM test.t1 where a1=2; +a1 length(a2) substr(a2,1+2*900,2) length(a3) substr(a3,1+3*900,3) +2 200 3000 dd1 +DELETE FROM test.t1; +DROP TABLE test.t1; +***** +***** Create test that uses COUNT(), SUM(), MAX(), MIN(), NOW(), +***** USER(), TRUNCATE +***** +CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), +a3 BLOB, a4 DATE, a5 CHAR(250)) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +SELECT COUNT(*) from test.t1; +COUNT(*) +100 +SELECT SUM(a1) from test.t1; +SUM(a1) +5050 +SELECT MIN(a1) from test.t1; +MIN(a1) +1 +SELECT MAX(a1) from test.t1; +MAX(a1) +100 +SELECT a5 from test.t1 where a1=50; +a5 +root@localhost +SELECT * from test.t1 order by a1; +a1 a2 a3 a4 a5 +1 aaaaaaaaaaaaaaaa1 bbbbbbbbbbbbbbbbbb1 2006-06-20 root@localhost +2 aaaaaaaaaaaaaaaa2 bbbbbbbbbbbbbbbbbb2 2006-06-20 root@localhost +3 aaaaaaaaaaaaaaaa3 bbbbbbbbbbbbbbbbbb3 2006-06-20 root@localhost +4 aaaaaaaaaaaaaaaa4 bbbbbbbbbbbbbbbbbb4 2006-06-20 root@localhost +5 aaaaaaaaaaaaaaaa5 bbbbbbbbbbbbbbbbbb5 2006-06-20 root@localhost +6 aaaaaaaaaaaaaaaa6 bbbbbbbbbbbbbbbbbb6 2006-06-20 root@localhost +7 aaaaaaaaaaaaaaaa7 bbbbbbbbbbbbbbbbbb7 2006-06-20 root@localhost +8 aaaaaaaaaaaaaaaa8 bbbbbbbbbbbbbbbbbb8 2006-06-20 root@localhost +9 aaaaaaaaaaaaaaaa9 bbbbbbbbbbbbbbbbbb9 2006-06-20 root@localhost +10 aaaaaaaaaaaaaaaa10 bbbbbbbbbbbbbbbbbb10 2006-06-20 root@localhost +11 aaaaaaaaaaaaaaaa11 bbbbbbbbbbbbbbbbbb11 2006-06-20 root@localhost +12 aaaaaaaaaaaaaaaa12 bbbbbbbbbbbbbbbbbb12 2006-06-20 root@localhost +13 aaaaaaaaaaaaaaaa13 bbbbbbbbbbbbbbbbbb13 2006-06-20 root@localhost +14 aaaaaaaaaaaaaaaa14 bbbbbbbbbbbbbbbbbb14 2006-06-20 root@localhost +15 aaaaaaaaaaaaaaaa15 bbbbbbbbbbbbbbbbbb15 2006-06-20 root@localhost +16 aaaaaaaaaaaaaaaa16 bbbbbbbbbbbbbbbbbb16 2006-06-20 root@localhost +17 aaaaaaaaaaaaaaaa17 bbbbbbbbbbbbbbbbbb17 2006-06-20 root@localhost +18 aaaaaaaaaaaaaaaa18 bbbbbbbbbbbbbbbbbb18 2006-06-20 root@localhost +19 aaaaaaaaaaaaaaaa19 bbbbbbbbbbbbbbbbbb19 2006-06-20 root@localhost +20 aaaaaaaaaaaaaaaa20 bbbbbbbbbbbbbbbbbb20 2006-06-20 root@localhost +21 aaaaaaaaaaaaaaaa21 bbbbbbbbbbbbbbbbbb21 2006-06-20 root@localhost +22 aaaaaaaaaaaaaaaa22 bbbbbbbbbbbbbbbbbb22 2006-06-20 root@localhost +23 aaaaaaaaaaaaaaaa23 bbbbbbbbbbbbbbbbbb23 2006-06-20 root@localhost +24 aaaaaaaaaaaaaaaa24 bbbbbbbbbbbbbbbbbb24 2006-06-20 root@localhost +25 aaaaaaaaaaaaaaaa25 bbbbbbbbbbbbbbbbbb25 2006-06-20 root@localhost +26 aaaaaaaaaaaaaaaa26 bbbbbbbbbbbbbbbbbb26 2006-06-20 root@localhost +27 aaaaaaaaaaaaaaaa27 bbbbbbbbbbbbbbbbbb27 2006-06-20 root@localhost +28 aaaaaaaaaaaaaaaa28 bbbbbbbbbbbbbbbbbb28 2006-06-20 root@localhost +29 aaaaaaaaaaaaaaaa29 bbbbbbbbbbbbbbbbbb29 2006-06-20 root@localhost +30 aaaaaaaaaaaaaaaa30 bbbbbbbbbbbbbbbbbb30 2006-06-20 root@localhost +31 aaaaaaaaaaaaaaaa31 bbbbbbbbbbbbbbbbbb31 2006-06-20 root@localhost +32 aaaaaaaaaaaaaaaa32 bbbbbbbbbbbbbbbbbb32 2006-06-20 root@localhost +33 aaaaaaaaaaaaaaaa33 bbbbbbbbbbbbbbbbbb33 2006-06-20 root@localhost +34 aaaaaaaaaaaaaaaa34 bbbbbbbbbbbbbbbbbb34 2006-06-20 root@localhost +35 aaaaaaaaaaaaaaaa35 bbbbbbbbbbbbbbbbbb35 2006-06-20 root@localhost +36 aaaaaaaaaaaaaaaa36 bbbbbbbbbbbbbbbbbb36 2006-06-20 root@localhost +37 aaaaaaaaaaaaaaaa37 bbbbbbbbbbbbbbbbbb37 2006-06-20 root@localhost +38 aaaaaaaaaaaaaaaa38 bbbbbbbbbbbbbbbbbb38 2006-06-20 root@localhost +39 aaaaaaaaaaaaaaaa39 bbbbbbbbbbbbbbbbbb39 2006-06-20 root@localhost +40 aaaaaaaaaaaaaaaa40 bbbbbbbbbbbbbbbbbb40 2006-06-20 root@localhost +41 aaaaaaaaaaaaaaaa41 bbbbbbbbbbbbbbbbbb41 2006-06-20 root@localhost +42 aaaaaaaaaaaaaaaa42 bbbbbbbbbbbbbbbbbb42 2006-06-20 root@localhost +43 aaaaaaaaaaaaaaaa43 bbbbbbbbbbbbbbbbbb43 2006-06-20 root@localhost +44 aaaaaaaaaaaaaaaa44 bbbbbbbbbbbbbbbbbb44 2006-06-20 root@localhost +45 aaaaaaaaaaaaaaaa45 bbbbbbbbbbbbbbbbbb45 2006-06-20 root@localhost +46 aaaaaaaaaaaaaaaa46 bbbbbbbbbbbbbbbbbb46 2006-06-20 root@localhost +47 aaaaaaaaaaaaaaaa47 bbbbbbbbbbbbbbbbbb47 2006-06-20 root@localhost +48 aaaaaaaaaaaaaaaa48 bbbbbbbbbbbbbbbbbb48 2006-06-20 root@localhost +49 aaaaaaaaaaaaaaaa49 bbbbbbbbbbbbbbbbbb49 2006-06-20 root@localhost +50 aaaaaaaaaaaaaaaa50 bbbbbbbbbbbbbbbbbb50 2006-06-20 root@localhost +51 aaaaaaaaaaaaaaaa51 bbbbbbbbbbbbbbbbbb51 2006-06-20 root@localhost +52 aaaaaaaaaaaaaaaa52 bbbbbbbbbbbbbbbbbb52 2006-06-20 root@localhost +53 aaaaaaaaaaaaaaaa53 bbbbbbbbbbbbbbbbbb53 2006-06-20 root@localhost +54 aaaaaaaaaaaaaaaa54 bbbbbbbbbbbbbbbbbb54 2006-06-20 root@localhost +55 aaaaaaaaaaaaaaaa55 bbbbbbbbbbbbbbbbbb55 2006-06-20 root@localhost +56 aaaaaaaaaaaaaaaa56 bbbbbbbbbbbbbbbbbb56 2006-06-20 root@localhost +57 aaaaaaaaaaaaaaaa57 bbbbbbbbbbbbbbbbbb57 2006-06-20 root@localhost +58 aaaaaaaaaaaaaaaa58 bbbbbbbbbbbbbbbbbb58 2006-06-20 root@localhost +59 aaaaaaaaaaaaaaaa59 bbbbbbbbbbbbbbbbbb59 2006-06-20 root@localhost +60 aaaaaaaaaaaaaaaa60 bbbbbbbbbbbbbbbbbb60 2006-06-20 root@localhost +61 aaaaaaaaaaaaaaaa61 bbbbbbbbbbbbbbbbbb61 2006-06-20 root@localhost +62 aaaaaaaaaaaaaaaa62 bbbbbbbbbbbbbbbbbb62 2006-06-20 root@localhost +63 aaaaaaaaaaaaaaaa63 bbbbbbbbbbbbbbbbbb63 2006-06-20 root@localhost +64 aaaaaaaaaaaaaaaa64 bbbbbbbbbbbbbbbbbb64 2006-06-20 root@localhost +65 aaaaaaaaaaaaaaaa65 bbbbbbbbbbbbbbbbbb65 2006-06-20 root@localhost +66 aaaaaaaaaaaaaaaa66 bbbbbbbbbbbbbbbbbb66 2006-06-20 root@localhost +67 aaaaaaaaaaaaaaaa67 bbbbbbbbbbbbbbbbbb67 2006-06-20 root@localhost +68 aaaaaaaaaaaaaaaa68 bbbbbbbbbbbbbbbbbb68 2006-06-20 root@localhost +69 aaaaaaaaaaaaaaaa69 bbbbbbbbbbbbbbbbbb69 2006-06-20 root@localhost +70 aaaaaaaaaaaaaaaa70 bbbbbbbbbbbbbbbbbb70 2006-06-20 root@localhost +71 aaaaaaaaaaaaaaaa71 bbbbbbbbbbbbbbbbbb71 2006-06-20 root@localhost +72 aaaaaaaaaaaaaaaa72 bbbbbbbbbbbbbbbbbb72 2006-06-20 root@localhost +73 aaaaaaaaaaaaaaaa73 bbbbbbbbbbbbbbbbbb73 2006-06-20 root@localhost +74 aaaaaaaaaaaaaaaa74 bbbbbbbbbbbbbbbbbb74 2006-06-20 root@localhost +75 aaaaaaaaaaaaaaaa75 bbbbbbbbbbbbbbbbbb75 2006-06-20 root@localhost +76 aaaaaaaaaaaaaaaa76 bbbbbbbbbbbbbbbbbb76 2006-06-20 root@localhost +77 aaaaaaaaaaaaaaaa77 bbbbbbbbbbbbbbbbbb77 2006-06-20 root@localhost +78 aaaaaaaaaaaaaaaa78 bbbbbbbbbbbbbbbbbb78 2006-06-20 root@localhost +79 aaaaaaaaaaaaaaaa79 bbbbbbbbbbbbbbbbbb79 2006-06-20 root@localhost +80 aaaaaaaaaaaaaaaa80 bbbbbbbbbbbbbbbbbb80 2006-06-20 root@localhost +81 aaaaaaaaaaaaaaaa81 bbbbbbbbbbbbbbbbbb81 2006-06-20 root@localhost +82 aaaaaaaaaaaaaaaa82 bbbbbbbbbbbbbbbbbb82 2006-06-20 root@localhost +83 aaaaaaaaaaaaaaaa83 bbbbbbbbbbbbbbbbbb83 2006-06-20 root@localhost +84 aaaaaaaaaaaaaaaa84 bbbbbbbbbbbbbbbbbb84 2006-06-20 root@localhost +85 aaaaaaaaaaaaaaaa85 bbbbbbbbbbbbbbbbbb85 2006-06-20 root@localhost +86 aaaaaaaaaaaaaaaa86 bbbbbbbbbbbbbbbbbb86 2006-06-20 root@localhost +87 aaaaaaaaaaaaaaaa87 bbbbbbbbbbbbbbbbbb87 2006-06-20 root@localhost +88 aaaaaaaaaaaaaaaa88 bbbbbbbbbbbbbbbbbb88 2006-06-20 root@localhost +89 aaaaaaaaaaaaaaaa89 bbbbbbbbbbbbbbbbbb89 2006-06-20 root@localhost +90 aaaaaaaaaaaaaaaa90 bbbbbbbbbbbbbbbbbb90 2006-06-20 root@localhost +91 aaaaaaaaaaaaaaaa91 bbbbbbbbbbbbbbbbbb91 2006-06-20 root@localhost +92 aaaaaaaaaaaaaaaa92 bbbbbbbbbbbbbbbbbb92 2006-06-20 root@localhost +93 aaaaaaaaaaaaaaaa93 bbbbbbbbbbbbbbbbbb93 2006-06-20 root@localhost +94 aaaaaaaaaaaaaaaa94 bbbbbbbbbbbbbbbbbb94 2006-06-20 root@localhost +95 aaaaaaaaaaaaaaaa95 bbbbbbbbbbbbbbbbbb95 2006-06-20 root@localhost +96 aaaaaaaaaaaaaaaa96 bbbbbbbbbbbbbbbbbb96 2006-06-20 root@localhost +97 aaaaaaaaaaaaaaaa97 bbbbbbbbbbbbbbbbbb97 2006-06-20 root@localhost +98 aaaaaaaaaaaaaaaa98 bbbbbbbbbbbbbbbbbb98 2006-06-20 root@localhost +99 aaaaaaaaaaaaaaaa99 bbbbbbbbbbbbbbbbbb99 2006-06-20 root@localhost +100 aaaaaaaaaaaaaaaa100 bbbbbbbbbbbbbbbbbb100 2006-06-20 root@localhost +DROP TABLE test.t1; +ALTER TABLESPACE ts1 +DROP DATAFILE './table_space1/datafile.dat' + ENGINE=NDB; +DROP TABLESPACE ts1 ENGINE=NDB; +ALTER TABLESPACE ts2 +DROP DATAFILE './table_space2/datafile.dat' + ENGINE=NDB; +DROP TABLESPACE ts2 ENGINE=NDB; +DROP LOGFILE GROUP lg +ENGINE=NDB; diff --git a/mysql-test/suite/ndb/r/ndb_gis.result b/mysql-test/suite/ndb/r/ndb_gis.result new file mode 100644 index 00000000000..3af7b71d72d --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_gis.result @@ -0,0 +1,1100 @@ +SET storage_engine=ndbcluster; +DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; +CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); +CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); +CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); +CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); +CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); +CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); +CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); +CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); +SHOW CREATE TABLE gis_point; +Table Create Table +gis_point CREATE TABLE `gis_point` ( + `fid` int(11) NOT NULL AUTO_INCREMENT, + `g` point DEFAULT NULL, + PRIMARY KEY (`fid`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +SHOW FIELDS FROM gis_point; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g point YES NULL +SHOW FIELDS FROM gis_line; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g linestring YES NULL +SHOW FIELDS FROM gis_polygon; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g polygon YES NULL +SHOW FIELDS FROM gis_multi_point; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g multipoint YES NULL +SHOW FIELDS FROM gis_multi_line; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g multilinestring YES NULL +SHOW FIELDS FROM gis_multi_polygon; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g multipolygon YES NULL +SHOW FIELDS FROM gis_geometrycollection; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g geometrycollection YES NULL +SHOW FIELDS FROM gis_geometry; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g geometry YES NULL +INSERT INTO gis_point VALUES +(101, PointFromText('POINT(10 10)')), +(102, PointFromText('POINT(20 10)')), +(103, PointFromText('POINT(20 20)')), +(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)')))); +INSERT INTO gis_line VALUES +(105, LineFromText('LINESTRING(0 0,0 10,10 0)')), +(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')), +(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10)))); +INSERT INTO gis_polygon VALUES +(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')), +(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')), +(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))); +INSERT INTO gis_multi_point VALUES +(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')), +(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')), +(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10)))); +INSERT INTO gis_multi_line VALUES +(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')), +(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')), +(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))); +INSERT INTO gis_multi_polygon VALUES +(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), +(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), +(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))); +INSERT INTO gis_geometrycollection VALUES +(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')), +(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))); +INSERT into gis_geometry SELECT * FROM gis_point; +INSERT into gis_geometry SELECT * FROM gis_line; +INSERT into gis_geometry SELECT * FROM gis_polygon; +INSERT into gis_geometry SELECT * FROM gis_multi_point; +INSERT into gis_geometry SELECT * FROM gis_multi_line; +INSERT into gis_geometry SELECT * FROM gis_multi_polygon; +INSERT into gis_geometry SELECT * FROM gis_geometrycollection; +SELECT fid, AsText(g) FROM gis_point ORDER by fid; +fid AsText(g) +101 POINT(10 10) +102 POINT(20 10) +103 POINT(20 20) +104 POINT(10 20) +SELECT fid, AsText(g) FROM gis_line ORDER by fid; +fid AsText(g) +105 LINESTRING(0 0,0 10,10 0) +106 LINESTRING(10 10,20 10,20 20,10 20,10 10) +107 LINESTRING(10 10,40 10) +SELECT fid, AsText(g) FROM gis_polygon ORDER by fid; +fid AsText(g) +108 POLYGON((10 10,20 10,20 20,10 20,10 10)) +109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) +110 POLYGON((0 0,30 0,30 30,0 0)) +SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid; +fid AsText(g) +111 MULTIPOINT(0 0,10 10,10 20,20 20) +112 MULTIPOINT(1 1,11 11,11 21,21 21) +113 MULTIPOINT(3 6,4 10) +SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid; +fid AsText(g) +114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) +115 MULTILINESTRING((10 48,10 21,10 0)) +116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) +SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid; +fid AsText(g) +117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) +118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) +119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) +SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid; +fid AsText(g) +120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) +121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) +SELECT fid, AsText(g) FROM gis_geometry ORDER by fid; +fid AsText(g) +101 POINT(10 10) +102 POINT(20 10) +103 POINT(20 20) +104 POINT(10 20) +105 LINESTRING(0 0,0 10,10 0) +106 LINESTRING(10 10,20 10,20 20,10 20,10 10) +107 LINESTRING(10 10,40 10) +108 POLYGON((10 10,20 10,20 20,10 20,10 10)) +109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) +110 POLYGON((0 0,30 0,30 30,0 0)) +111 MULTIPOINT(0 0,10 10,10 20,20 20) +112 MULTIPOINT(1 1,11 11,11 21,21 21) +113 MULTIPOINT(3 6,4 10) +114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) +115 MULTILINESTRING((10 48,10 21,10 0)) +116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) +117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) +118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) +119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) +120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) +121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) +SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid; +fid Dimension(g) +101 0 +102 0 +103 0 +104 0 +105 1 +106 1 +107 1 +108 2 +109 2 +110 2 +111 0 +112 0 +113 0 +114 1 +115 1 +116 1 +117 2 +118 2 +119 2 +120 1 +121 1 +SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid; +fid GeometryType(g) +101 POINT +102 POINT +103 POINT +104 POINT +105 LINESTRING +106 LINESTRING +107 LINESTRING +108 POLYGON +109 POLYGON +110 POLYGON +111 MULTIPOINT +112 MULTIPOINT +113 MULTIPOINT +114 MULTILINESTRING +115 MULTILINESTRING +116 MULTILINESTRING +117 MULTIPOLYGON +118 MULTIPOLYGON +119 MULTIPOLYGON +120 GEOMETRYCOLLECTION +121 GEOMETRYCOLLECTION +SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid; +fid IsEmpty(g) +101 0 +102 0 +103 0 +104 0 +105 0 +106 0 +107 0 +108 0 +109 0 +110 0 +111 0 +112 0 +113 0 +114 0 +115 0 +116 0 +117 0 +118 0 +119 0 +120 0 +121 0 +SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid; +fid AsText(Envelope(g)) +101 POLYGON((10 10,10 10,10 10,10 10,10 10)) +102 POLYGON((20 10,20 10,20 10,20 10,20 10)) +103 POLYGON((20 20,20 20,20 20,20 20,20 20)) +104 POLYGON((10 20,10 20,10 20,10 20,10 20)) +105 POLYGON((0 0,10 0,10 10,0 10,0 0)) +106 POLYGON((10 10,20 10,20 20,10 20,10 10)) +107 POLYGON((10 10,40 10,40 10,10 10,10 10)) +108 POLYGON((10 10,20 10,20 20,10 20,10 10)) +109 POLYGON((0 0,50 0,50 50,0 50,0 0)) +110 POLYGON((0 0,30 0,30 30,0 30,0 0)) +111 POLYGON((0 0,20 0,20 20,0 20,0 0)) +112 POLYGON((1 1,21 1,21 21,1 21,1 1)) +113 POLYGON((3 6,4 6,4 10,3 10,3 6)) +114 POLYGON((10 0,16 0,16 48,10 48,10 0)) +115 POLYGON((10 0,10 0,10 48,10 48,10 0)) +116 POLYGON((1 2,21 2,21 8,1 8,1 2)) +117 POLYGON((28 0,84 0,84 42,28 42,28 0)) +118 POLYGON((28 0,84 0,84 42,28 42,28 0)) +119 POLYGON((0 0,3 0,3 3,0 3,0 0)) +120 POLYGON((0 0,10 0,10 10,0 10,0 0)) +121 POLYGON((3 6,44 6,44 9,3 9,3 6)) +explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 +Warnings: +Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` +SELECT fid, X(g) FROM gis_point ORDER by fid; +fid X(g) +101 10 +102 20 +103 20 +104 10 +SELECT fid, Y(g) FROM gis_point ORDER by fid; +fid Y(g) +101 10 +102 10 +103 20 +104 20 +explain extended select X(g),Y(g) FROM gis_point; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 +Warnings: +Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` +SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; +fid AsText(StartPoint(g)) +105 POINT(0 0) +106 POINT(10 10) +107 POINT(10 10) +SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid; +fid AsText(EndPoint(g)) +105 POINT(10 0) +106 POINT(10 10) +107 POINT(40 10) +SELECT fid, GLength(g) FROM gis_line ORDER by fid; +fid GLength(g) +105 24.142135623731 +106 40 +107 30 +SELECT fid, NumPoints(g) FROM gis_line ORDER by fid; +fid NumPoints(g) +105 3 +106 5 +107 2 +SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid; +fid AsText(PointN(g, 2)) +105 POINT(0 10) +106 POINT(20 10) +107 POINT(40 10) +SELECT fid, IsClosed(g) FROM gis_line ORDER by fid; +fid IsClosed(g) +105 0 +106 1 +107 0 +explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` +SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; +fid AsText(Centroid(g)) +108 POINT(15 15) +109 POINT(25.416666666667 25.416666666667) +110 POINT(20 10) +SELECT fid, Area(g) FROM gis_polygon ORDER by fid; +fid Area(g) +108 100 +109 2400 +110 450 +SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid; +fid AsText(ExteriorRing(g)) +108 LINESTRING(10 10,20 10,20 20,10 20,10 10) +109 LINESTRING(0 0,50 0,50 50,0 50,0 0) +110 LINESTRING(0 0,30 0,30 30,0 0) +SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid; +fid NumInteriorRings(g) +108 0 +109 1 +110 0 +SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid; +fid AsText(InteriorRingN(g, 1)) +108 NULL +109 LINESTRING(10 10,20 10,20 20,10 20,10 10) +110 NULL +explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` +SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; +fid IsClosed(g) +114 0 +115 0 +116 0 +SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; +fid AsText(Centroid(g)) +117 POINT(55.588527753042 17.426536064114) +118 POINT(55.588527753042 17.426536064114) +119 POINT(2 2) +SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; +fid Area(g) +117 1684.5 +118 1684.5 +119 4.5 +SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid; +fid NumGeometries(g) +111 4 +112 4 +113 2 +SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid; +fid NumGeometries(g) +114 2 +115 1 +116 2 +SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid; +fid NumGeometries(g) +117 2 +118 2 +119 1 +SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid; +fid NumGeometries(g) +120 2 +121 2 +explain extended SELECT fid, NumGeometries(g) from gis_multi_point; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` +SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; +fid AsText(GeometryN(g, 2)) +111 POINT(10 10) +112 POINT(11 11) +113 POINT(4 10) +SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid; +fid AsText(GeometryN(g, 2)) +114 LINESTRING(16 0,16 23,16 48) +115 NULL +116 LINESTRING(2 5,5 8,21 7) +SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid; +fid AsText(GeometryN(g, 2)) +117 POLYGON((59 18,67 18,67 13,59 13,59 18)) +118 POLYGON((59 18,67 18,67 13,59 13,59 18)) +119 NULL +SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid; +fid AsText(GeometryN(g, 2)) +120 LINESTRING(0 0,10 10) +121 LINESTRING(3 6,7 9) +SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid; +fid AsText(GeometryN(g, 1)) +120 POINT(0 0) +121 POINT(44 6) +explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` +SELECT g1.fid as first, g2.fid as second, +Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, +Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, +Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r +FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +first second w c o e d t i r +120 120 1 1 0 1 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 +121 120 0 0 1 0 0 0 1 0 +121 121 1 1 0 1 0 0 1 0 +explain extended SELECT g1.fid as first, g2.fid as second, +Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, +Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, +Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r +FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer +Warnings: +Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` +DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; +CREATE TABLE t1 ( +a INTEGER PRIMARY KEY AUTO_INCREMENT, +gp point, +ln linestring, +pg polygon, +mp multipoint, +mln multilinestring, +mpg multipolygon, +gc geometrycollection, +gm geometry +); +SHOW FIELDS FROM t1; +Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment +gp point YES NULL +ln linestring YES NULL +pg polygon YES NULL +mp multipoint YES NULL +mln multilinestring YES NULL +mpg multipolygon YES NULL +gc geometrycollection YES NULL +gm geometry YES NULL +ALTER TABLE t1 ADD fid INT; +SHOW FIELDS FROM t1; +Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment +gp point YES NULL +ln linestring YES NULL +pg polygon YES NULL +mp multipoint YES NULL +mln multilinestring YES NULL +mpg multipolygon YES NULL +gc geometrycollection YES NULL +gm geometry YES NULL +fid int(11) YES NULL +DROP TABLE t1; +create table t1 (pk integer primary key auto_increment, a geometry not null); +insert into t1 (a) values (GeomFromText('Point(1 2)')); +insert into t1 (a) values ('Garbage'); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert IGNORE into t1 (a) values ('Garbage'); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +drop table t1; +create table t1 (pk integer primary key auto_increment, fl geometry not null); +insert into t1 (fl) values (1); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert into t1 (fl) values (1.11); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert into t1 (fl) values ("qwerty"); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert into t1 (fl) values (pointfromtext('point(1,1)')); +ERROR 23000: Column 'fl' cannot be null +drop table t1; +End of 4.1 tests +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +Warnings: +Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests +set engine_condition_pushdown = on; +DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; +CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT); +CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING); +CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON); +CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT); +CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING); +CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON); +CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION); +CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY); +SHOW CREATE TABLE gis_point; +Table Create Table +gis_point CREATE TABLE `gis_point` ( + `fid` int(11) NOT NULL AUTO_INCREMENT, + `g` point DEFAULT NULL, + PRIMARY KEY (`fid`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +SHOW FIELDS FROM gis_point; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g point YES NULL +SHOW FIELDS FROM gis_line; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g linestring YES NULL +SHOW FIELDS FROM gis_polygon; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g polygon YES NULL +SHOW FIELDS FROM gis_multi_point; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g multipoint YES NULL +SHOW FIELDS FROM gis_multi_line; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g multilinestring YES NULL +SHOW FIELDS FROM gis_multi_polygon; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g multipolygon YES NULL +SHOW FIELDS FROM gis_geometrycollection; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g geometrycollection YES NULL +SHOW FIELDS FROM gis_geometry; +Field Type Null Key Default Extra +fid int(11) NO PRI NULL auto_increment +g geometry YES NULL +INSERT INTO gis_point VALUES +(101, PointFromText('POINT(10 10)')), +(102, PointFromText('POINT(20 10)')), +(103, PointFromText('POINT(20 20)')), +(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)')))); +INSERT INTO gis_line VALUES +(105, LineFromText('LINESTRING(0 0,0 10,10 0)')), +(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')), +(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10)))); +INSERT INTO gis_polygon VALUES +(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')), +(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')), +(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))); +INSERT INTO gis_multi_point VALUES +(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')), +(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')), +(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10)))); +INSERT INTO gis_multi_line VALUES +(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')), +(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')), +(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))); +INSERT INTO gis_multi_polygon VALUES +(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), +(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')), +(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))); +INSERT INTO gis_geometrycollection VALUES +(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')), +(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))); +INSERT into gis_geometry SELECT * FROM gis_point; +INSERT into gis_geometry SELECT * FROM gis_line; +INSERT into gis_geometry SELECT * FROM gis_polygon; +INSERT into gis_geometry SELECT * FROM gis_multi_point; +INSERT into gis_geometry SELECT * FROM gis_multi_line; +INSERT into gis_geometry SELECT * FROM gis_multi_polygon; +INSERT into gis_geometry SELECT * FROM gis_geometrycollection; +SELECT fid, AsText(g) FROM gis_point ORDER by fid; +fid AsText(g) +101 POINT(10 10) +102 POINT(20 10) +103 POINT(20 20) +104 POINT(10 20) +SELECT fid, AsText(g) FROM gis_line ORDER by fid; +fid AsText(g) +105 LINESTRING(0 0,0 10,10 0) +106 LINESTRING(10 10,20 10,20 20,10 20,10 10) +107 LINESTRING(10 10,40 10) +SELECT fid, AsText(g) FROM gis_polygon ORDER by fid; +fid AsText(g) +108 POLYGON((10 10,20 10,20 20,10 20,10 10)) +109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) +110 POLYGON((0 0,30 0,30 30,0 0)) +SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid; +fid AsText(g) +111 MULTIPOINT(0 0,10 10,10 20,20 20) +112 MULTIPOINT(1 1,11 11,11 21,21 21) +113 MULTIPOINT(3 6,4 10) +SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid; +fid AsText(g) +114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) +115 MULTILINESTRING((10 48,10 21,10 0)) +116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) +SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid; +fid AsText(g) +117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) +118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) +119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) +SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid; +fid AsText(g) +120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) +121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) +SELECT fid, AsText(g) FROM gis_geometry ORDER by fid; +fid AsText(g) +101 POINT(10 10) +102 POINT(20 10) +103 POINT(20 20) +104 POINT(10 20) +105 LINESTRING(0 0,0 10,10 0) +106 LINESTRING(10 10,20 10,20 20,10 20,10 10) +107 LINESTRING(10 10,40 10) +108 POLYGON((10 10,20 10,20 20,10 20,10 10)) +109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10)) +110 POLYGON((0 0,30 0,30 30,0 0)) +111 MULTIPOINT(0 0,10 10,10 20,20 20) +112 MULTIPOINT(1 1,11 11,11 21,21 21) +113 MULTIPOINT(3 6,4 10) +114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) +115 MULTILINESTRING((10 48,10 21,10 0)) +116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7)) +117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) +118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18))) +119 MULTIPOLYGON(((0 3,3 3,3 0,0 3))) +120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10)) +121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9)) +SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid; +fid Dimension(g) +101 0 +102 0 +103 0 +104 0 +105 1 +106 1 +107 1 +108 2 +109 2 +110 2 +111 0 +112 0 +113 0 +114 1 +115 1 +116 1 +117 2 +118 2 +119 2 +120 1 +121 1 +SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid; +fid GeometryType(g) +101 POINT +102 POINT +103 POINT +104 POINT +105 LINESTRING +106 LINESTRING +107 LINESTRING +108 POLYGON +109 POLYGON +110 POLYGON +111 MULTIPOINT +112 MULTIPOINT +113 MULTIPOINT +114 MULTILINESTRING +115 MULTILINESTRING +116 MULTILINESTRING +117 MULTIPOLYGON +118 MULTIPOLYGON +119 MULTIPOLYGON +120 GEOMETRYCOLLECTION +121 GEOMETRYCOLLECTION +SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid; +fid IsEmpty(g) +101 0 +102 0 +103 0 +104 0 +105 0 +106 0 +107 0 +108 0 +109 0 +110 0 +111 0 +112 0 +113 0 +114 0 +115 0 +116 0 +117 0 +118 0 +119 0 +120 0 +121 0 +SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid; +fid AsText(Envelope(g)) +101 POLYGON((10 10,10 10,10 10,10 10,10 10)) +102 POLYGON((20 10,20 10,20 10,20 10,20 10)) +103 POLYGON((20 20,20 20,20 20,20 20,20 20)) +104 POLYGON((10 20,10 20,10 20,10 20,10 20)) +105 POLYGON((0 0,10 0,10 10,0 10,0 0)) +106 POLYGON((10 10,20 10,20 20,10 20,10 10)) +107 POLYGON((10 10,40 10,40 10,10 10,10 10)) +108 POLYGON((10 10,20 10,20 20,10 20,10 10)) +109 POLYGON((0 0,50 0,50 50,0 50,0 0)) +110 POLYGON((0 0,30 0,30 30,0 30,0 0)) +111 POLYGON((0 0,20 0,20 20,0 20,0 0)) +112 POLYGON((1 1,21 1,21 21,1 21,1 1)) +113 POLYGON((3 6,4 6,4 10,3 10,3 6)) +114 POLYGON((10 0,16 0,16 48,10 48,10 0)) +115 POLYGON((10 0,10 0,10 48,10 48,10 0)) +116 POLYGON((1 2,21 2,21 8,1 8,1 2)) +117 POLYGON((28 0,84 0,84 42,28 42,28 0)) +118 POLYGON((28 0,84 0,84 42,28 42,28 0)) +119 POLYGON((0 0,3 0,3 3,0 3,0 0)) +120 POLYGON((0 0,10 0,10 10,0 10,0 0)) +121 POLYGON((3 6,44 6,44 9,3 9,3 6)) +explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 +Warnings: +Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` +SELECT fid, X(g) FROM gis_point ORDER by fid; +fid X(g) +101 10 +102 20 +103 20 +104 10 +SELECT fid, Y(g) FROM gis_point ORDER by fid; +fid Y(g) +101 10 +102 10 +103 20 +104 20 +explain extended select X(g),Y(g) FROM gis_point; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 +Warnings: +Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` +SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; +fid AsText(StartPoint(g)) +105 POINT(0 0) +106 POINT(10 10) +107 POINT(10 10) +SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid; +fid AsText(EndPoint(g)) +105 POINT(10 0) +106 POINT(10 10) +107 POINT(40 10) +SELECT fid, GLength(g) FROM gis_line ORDER by fid; +fid GLength(g) +105 24.142135623731 +106 40 +107 30 +SELECT fid, NumPoints(g) FROM gis_line ORDER by fid; +fid NumPoints(g) +105 3 +106 5 +107 2 +SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid; +fid AsText(PointN(g, 2)) +105 POINT(0 10) +106 POINT(20 10) +107 POINT(40 10) +SELECT fid, IsClosed(g) FROM gis_line ORDER by fid; +fid IsClosed(g) +105 0 +106 1 +107 0 +explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` +SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; +fid AsText(Centroid(g)) +108 POINT(15 15) +109 POINT(25.416666666667 25.416666666667) +110 POINT(20 10) +SELECT fid, Area(g) FROM gis_polygon ORDER by fid; +fid Area(g) +108 100 +109 2400 +110 450 +SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid; +fid AsText(ExteriorRing(g)) +108 LINESTRING(10 10,20 10,20 20,10 20,10 10) +109 LINESTRING(0 0,50 0,50 50,0 50,0 0) +110 LINESTRING(0 0,30 0,30 30,0 0) +SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid; +fid NumInteriorRings(g) +108 0 +109 1 +110 0 +SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid; +fid AsText(InteriorRingN(g, 1)) +108 NULL +109 LINESTRING(10 10,20 10,20 20,10 20,10 10) +110 NULL +explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` +SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; +fid IsClosed(g) +114 0 +115 0 +116 0 +SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; +fid AsText(Centroid(g)) +117 POINT(55.588527753042 17.426536064114) +118 POINT(55.588527753042 17.426536064114) +119 POINT(2 2) +SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; +fid Area(g) +117 1684.5 +118 1684.5 +119 4.5 +SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid; +fid NumGeometries(g) +111 4 +112 4 +113 2 +SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid; +fid NumGeometries(g) +114 2 +115 1 +116 2 +SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid; +fid NumGeometries(g) +117 2 +118 2 +119 1 +SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid; +fid NumGeometries(g) +120 2 +121 2 +explain extended SELECT fid, NumGeometries(g) from gis_multi_point; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` +SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; +fid AsText(GeometryN(g, 2)) +111 POINT(10 10) +112 POINT(11 11) +113 POINT(4 10) +SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid; +fid AsText(GeometryN(g, 2)) +114 LINESTRING(16 0,16 23,16 48) +115 NULL +116 LINESTRING(2 5,5 8,21 7) +SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid; +fid AsText(GeometryN(g, 2)) +117 POLYGON((59 18,67 18,67 13,59 13,59 18)) +118 POLYGON((59 18,67 18,67 13,59 13,59 18)) +119 NULL +SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid; +fid AsText(GeometryN(g, 2)) +120 LINESTRING(0 0,10 10) +121 LINESTRING(3 6,7 9) +SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid; +fid AsText(GeometryN(g, 1)) +120 POINT(0 0) +121 POINT(44 6) +explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 +Warnings: +Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` +SELECT g1.fid as first, g2.fid as second, +Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, +Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, +Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r +FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +first second w c o e d t i r +120 120 1 1 0 1 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 +121 120 0 0 1 0 0 0 1 0 +121 121 1 1 0 1 0 0 1 0 +explain extended SELECT g1.fid as first, g2.fid as second, +Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, +Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, +Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r +FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer +Warnings: +Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` +DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; +CREATE TABLE t1 ( +a INTEGER PRIMARY KEY AUTO_INCREMENT, +gp point, +ln linestring, +pg polygon, +mp multipoint, +mln multilinestring, +mpg multipolygon, +gc geometrycollection, +gm geometry +); +SHOW FIELDS FROM t1; +Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment +gp point YES NULL +ln linestring YES NULL +pg polygon YES NULL +mp multipoint YES NULL +mln multilinestring YES NULL +mpg multipolygon YES NULL +gc geometrycollection YES NULL +gm geometry YES NULL +ALTER TABLE t1 ADD fid INT; +SHOW FIELDS FROM t1; +Field Type Null Key Default Extra +a int(11) NO PRI NULL auto_increment +gp point YES NULL +ln linestring YES NULL +pg polygon YES NULL +mp multipoint YES NULL +mln multilinestring YES NULL +mpg multipolygon YES NULL +gc geometrycollection YES NULL +gm geometry YES NULL +fid int(11) YES NULL +DROP TABLE t1; +create table t1 (pk integer primary key auto_increment, a geometry not null); +insert into t1 (a) values (GeomFromText('Point(1 2)')); +insert into t1 (a) values ('Garbage'); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert IGNORE into t1 (a) values ('Garbage'); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +drop table t1; +create table t1 (pk integer primary key auto_increment, fl geometry not null); +insert into t1 (fl) values (1); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert into t1 (fl) values (1.11); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert into t1 (fl) values ("qwerty"); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert into t1 (fl) values (pointfromtext('point(1,1)')); +ERROR 23000: Column 'fl' cannot be null +drop table t1; +End of 4.1 tests +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +Warnings: +Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/suite/ndb/r/ndb_grant.result b/mysql-test/suite/ndb/r/ndb_grant.result new file mode 100644 index 00000000000..6192a7cace5 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_grant.result @@ -0,0 +1,444 @@ +drop table if exists t1; +SET NAMES binary; +use mysql; +alter table columns_priv engine=ndb; +alter table db engine=ndb; +alter table func engine=ndb; +alter table help_category engine=ndb; +alter table help_keyword engine=ndb; +alter table help_relation engine=ndb; +alter table help_topic engine=ndb; +alter table host engine=ndb; +alter table tables_priv engine=ndb; +alter table time_zone engine=ndb; +alter table time_zone_leap_second engine=ndb; +alter table time_zone_name engine=ndb; +alter table time_zone_transition engine=ndb; +alter table time_zone_transition_type engine=ndb; +alter table user engine=ndb; +use test; +delete from mysql.user where user='mysqltest_1'; +delete from mysql.db where user='mysqltest_1'; +flush privileges; +begin; +grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' +GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +begin; +grant delete on mysqltest.* to mysqltest_1@localhost; +commit; +select * from mysql.user where user="mysqltest_1"; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections +localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N 0 0 0 +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' +GRANT SELECT, DELETE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +begin; +revoke delete on mysqltest.* from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' +GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +begin; +grant select on mysqltest.* to mysqltest_1@localhost require NONE; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +begin; +grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB"; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' +GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +begin; +revoke all privileges on mysqltest.* from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' +delete from mysql.user where user='mysqltest_1'; +flush privileges; +begin; +grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +flush privileges; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +begin; +revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +begin; +grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; +commit; +flush privileges; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +begin; +revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, CREATE VIEW, SHOW VIEW ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +begin; +revoke all privileges on mysqltest.* from mysqltest_1@localhost; +commit; +delete from mysql.user where user='mysqltest_1'; +flush privileges; +begin; +grant usage on test.* to mysqltest_1@localhost with grant option; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +GRANT USAGE ON `test`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +delete from mysql.user where user='mysqltest_1'; +delete from mysql.db where user='mysqltest_1'; +delete from mysql.tables_priv where user='mysqltest_1'; +delete from mysql.columns_priv where user='mysqltest_1'; +flush privileges; +show grants for mysqltest_1@localhost; +ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host 'localhost' +create table t1 (a int); +begin; +GRANT select,update,insert on t1 to mysqltest_1@localhost; +GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT, SELECT (a), INSERT, INSERT (a), UPDATE, UPDATE (a), REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' +select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; +table_priv column_priv +Select,Insert,Update Select,Insert,Update,References +begin; +REVOKE select (a), update on t1 from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT, INSERT, INSERT (a), REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' +begin; +REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' +begin; +GRANT select,references on t1 to mysqltest_1@localhost; +commit; +select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; +table_priv column_priv +Select,References References +begin; +grant all on test.* to mysqltest_3@localhost with grant option; +revoke all on test.* from mysqltest_3@localhost; +commit; +show grants for mysqltest_3@localhost; +Grants for mysqltest_3@localhost +GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' +GRANT USAGE ON `test`.* TO 'mysqltest_3'@'localhost' WITH GRANT OPTION +begin; +revoke grant option on test.* from mysqltest_3@localhost; +commit; +show grants for mysqltest_3@localhost; +Grants for mysqltest_3@localhost +GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' +begin; +grant all on test.t1 to mysqltest_2@localhost with grant option; +revoke all on test.t1 from mysqltest_2@localhost; +commit; +show grants for mysqltest_2@localhost; +Grants for mysqltest_2@localhost +GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' +GRANT USAGE ON `test`.`t1` TO 'mysqltest_2'@'localhost' WITH GRANT OPTION +begin; +revoke grant option on test.t1 from mysqltest_2@localhost; +commit; +show grants for mysqltest_2@localhost; +Grants for mysqltest_2@localhost +GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' +delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; +delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; +delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; +delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; +flush privileges; +drop table t1; +begin; +GRANT FILE on mysqltest.* to mysqltest_1@localhost; +ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES +commit; +select 1; +1 +1 +create database mysqltest1; +begin; +grant usage on mysqltest1.* to test6123 identified by 'magic123'; +commit; +select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; +host db user select_priv insert_priv +delete from mysql.user where user='test6123'; +drop database mysqltest1; +create table t1 (a int); +begin; +grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; +commit; +show grants for drop_user2@localhost; +Grants for drop_user2@localhost +GRANT ALL PRIVILEGES ON *.* TO 'drop_user2'@'localhost' WITH GRANT OPTION +begin; +revoke all privileges, grant option from drop_user2@localhost; +commit; +drop user drop_user2@localhost; +begin; +grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION; +grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION; +grant select(a) on test.t1 to drop_user@localhost; +commit; +show grants for drop_user@localhost; +Grants for drop_user@localhost +GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost' +set sql_mode=ansi_quotes; +show grants for drop_user@localhost; +Grants for drop_user@localhost +GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost' +set sql_mode=default; +set sql_quote_show_create=0; +show grants for drop_user@localhost; +Grants for drop_user@localhost +GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost' +set sql_mode="ansi_quotes"; +show grants for drop_user@localhost; +Grants for drop_user@localhost +GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost' +set sql_quote_show_create=1; +show grants for drop_user@localhost; +Grants for drop_user@localhost +GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost' +set sql_mode=""; +show grants for drop_user@localhost; +Grants for drop_user@localhost +GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION +GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost' +revoke all privileges, grant option from drop_user@localhost; +show grants for drop_user@localhost; +Grants for drop_user@localhost +GRANT USAGE ON *.* TO 'drop_user'@'localhost' +drop user drop_user@localhost; +begin; +revoke all privileges, grant option from drop_user@localhost; +ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users +commit; +begin; +grant select(a) on test.t1 to drop_user1@localhost; +commit; +flush privileges; +begin; +grant select on test.t1 to drop_user2@localhost; +grant select on test.* to drop_user3@localhost; +grant select on *.* to drop_user4@localhost; +commit; +flush privileges; +drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, +drop_user4@localhost; +begin; +revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, +drop_user3@localhost, drop_user4@localhost; +ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users +commit; +flush privileges; +drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, +drop_user4@localhost; +drop table t1; +begin; +grant usage on *.* to mysqltest_1@localhost identified by "password"; +grant select, update, insert on test.* to mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' +GRANT SELECT, INSERT, UPDATE ON `test`.* TO 'mysqltest_1'@'localhost' +drop user mysqltest_1@localhost; +SET NAMES koi8r; +CREATE DATABASE ÂÄ; +USE ÂÄ; +CREATE TABLE ÔÁ (ËÏÌ int); +begin; +GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost; +commit; +SHOW GRANTS FOR ÀÚÅÒ@localhost; +Grants for ÀÚÅÒ@localhost +GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' +GRANT SELECT ON `ÂÄ`.* TO 'ÀÚÅÒ'@'localhost' +begin; +REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost; +commit; +begin; +GRANT SELECT ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; +commit; +SHOW GRANTS FOR ÀÚÅÒ@localhost; +Grants for ÀÚÅÒ@localhost +GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' +GRANT SELECT ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' +begin; +REVOKE SELECT ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; +commit; +begin; +GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; +commit; +SHOW GRANTS FOR ÀÚÅÒ@localhost; +Grants for ÀÚÅÒ@localhost +GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' +GRANT SELECT (ËÏÌ) ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' +begin; +REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; +commit; +DROP DATABASE ÂÄ; +SET NAMES latin1; +USE test; +CREATE TABLE t1 (a int ); +CREATE TABLE t2 LIKE t1; +CREATE TABLE t3 LIKE t1; +CREATE TABLE t4 LIKE t1; +CREATE TABLE t5 LIKE t1; +CREATE TABLE t6 LIKE t1; +CREATE TABLE t7 LIKE t1; +CREATE TABLE t8 LIKE t1; +CREATE TABLE t9 LIKE t1; +CREATE TABLE t10 LIKE t1; +CREATE DATABASE testdb1; +CREATE DATABASE testdb2; +CREATE DATABASE testdb3; +CREATE DATABASE testdb4; +CREATE DATABASE testdb5; +CREATE DATABASE testdb6; +CREATE DATABASE testdb7; +CREATE DATABASE testdb8; +CREATE DATABASE testdb9; +CREATE DATABASE testdb10; +begin; +GRANT ALL ON testdb1.* TO testuser@localhost; +GRANT ALL ON testdb2.* TO testuser@localhost; +GRANT ALL ON testdb3.* TO testuser@localhost; +GRANT ALL ON testdb4.* TO testuser@localhost; +GRANT ALL ON testdb5.* TO testuser@localhost; +GRANT ALL ON testdb6.* TO testuser@localhost; +GRANT ALL ON testdb7.* TO testuser@localhost; +GRANT ALL ON testdb8.* TO testuser@localhost; +GRANT ALL ON testdb9.* TO testuser@localhost; +GRANT ALL ON testdb10.* TO testuser@localhost; +GRANT SELECT ON test.t1 TO testuser@localhost; +GRANT SELECT ON test.t2 TO testuser@localhost; +GRANT SELECT ON test.t3 TO testuser@localhost; +GRANT SELECT ON test.t4 TO testuser@localhost; +GRANT SELECT ON test.t5 TO testuser@localhost; +GRANT SELECT ON test.t6 TO testuser@localhost; +GRANT SELECT ON test.t7 TO testuser@localhost; +GRANT SELECT ON test.t8 TO testuser@localhost; +GRANT SELECT ON test.t9 TO testuser@localhost; +GRANT SELECT ON test.t10 TO testuser@localhost; +GRANT SELECT (a) ON test.t1 TO testuser@localhost; +GRANT SELECT (a) ON test.t2 TO testuser@localhost; +GRANT SELECT (a) ON test.t3 TO testuser@localhost; +GRANT SELECT (a) ON test.t4 TO testuser@localhost; +GRANT SELECT (a) ON test.t5 TO testuser@localhost; +GRANT SELECT (a) ON test.t6 TO testuser@localhost; +GRANT SELECT (a) ON test.t7 TO testuser@localhost; +GRANT SELECT (a) ON test.t8 TO testuser@localhost; +GRANT SELECT (a) ON test.t9 TO testuser@localhost; +GRANT SELECT (a) ON test.t10 TO testuser@localhost; +commit; +begin; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost; +commit; +SHOW GRANTS FOR testuser@localhost; +Grants for testuser@localhost +GRANT USAGE ON *.* TO 'testuser'@'localhost' +DROP USER testuser@localhost; +DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +DROP DATABASE testdb1; +DROP DATABASE testdb2; +DROP DATABASE testdb3; +DROP DATABASE testdb4; +DROP DATABASE testdb5; +DROP DATABASE testdb6; +DROP DATABASE testdb7; +DROP DATABASE testdb8; +DROP DATABASE testdb9; +DROP DATABASE testdb10; +SHOW PRIVILEGES; +Privilege Context Comment +Alter Tables To alter the table +Create Databases,Tables,Indexes To create new databases and tables +Create temporary tables Databases To use CREATE TEMPORARY TABLE +Create view Tables To create new views +Delete Tables To delete existing rows +Drop Databases,Tables To drop databases, tables, and views +File File access on server To read and write files on the server +Grant option Databases,Tables To give to other users those privileges you possess +Index Tables To create or drop indexes +Insert Tables To insert data into tables +Lock tables Databases To use LOCK TABLES (together with SELECT privilege) +Process Server Admin To view the plain text of currently executing queries +References Databases,Tables To have references on tables +Reload Server Admin To reload or refresh tables, logs and privileges +Replication client Server Admin To ask where the slave or master servers are +Replication slave Server Admin To read binary log events from the master +Select Tables To retrieve rows from table +Show databases Server Admin To see all databases with SHOW DATABASES +Show view Tables To see views with SHOW CREATE VIEW +Shutdown Server Admin To shut down the server +Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc. +Update Tables To update existing rows +Usage Server Admin No privileges - allow connect only +use mysql; +alter table columns_priv engine=myisam; +alter table db engine=myisam; +alter table func engine=myisam; +alter table help_category engine=myisam; +alter table help_keyword engine=myisam; +alter table help_relation engine=myisam; +alter table help_topic engine=myisam; +alter table host engine=myisam; +alter table tables_priv engine=myisam; +alter table time_zone engine=myisam; +alter table time_zone_leap_second engine=myisam; +alter table time_zone_name engine=myisam; +alter table time_zone_transition engine=myisam; +alter table time_zone_transition_type engine=myisam; +alter table user engine=myisam; +use test; +flush privileges; diff --git a/mysql-test/suite/ndb/r/ndb_index.result b/mysql-test/suite/ndb/r/ndb_index.result new file mode 100644 index 00000000000..5702552b0b5 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_index.result @@ -0,0 +1,154 @@ +drop table if exists t1; +CREATE TABLE t1 ( +PORT varchar(16) NOT NULL, +ACCESSNODE varchar(16) NOT NULL, +POP varchar(48) NOT NULL, +ACCESSTYPE int unsigned NOT NULL, +CUSTOMER_ID varchar(20) collate latin1_bin NOT NULL, +PROVIDER varchar(16), +TEXPIRE int unsigned, +NUM_IP int unsigned, +LEASED_NUM_IP int unsigned, +LOCKED_IP int unsigned, +STATIC_DNS int unsigned, +SUSPENDED_SERVICE int unsigned, +SUSPENDED_REASON int unsigned, +BGP_COMMUNITY int unsigned, +INDEX CUSTOMER_ID_INDEX(CUSTOMER_ID), +INDEX FQPN_INDEX(POP,ACCESSNODE,PORT), +PRIMARY KEY(POP,ACCESSNODE,PORT,ACCESSTYPE) +) engine=ndbcluster; +INSERT INTO t1 VALUES ('port67', 'node78', 'pop98', 1, 'kllopmn', 'pr_43', 121212, 1, 2, 3, 8, NULL, NULL, NULL); +INSERT INTO t1 VALUES ('port67', 'node78', 'pop99', 2, 'klkighh', 'pr_44', 121213, 3, 3, 6, 7, NULL, NULL, NULL); +INSERT INTO t1 VALUES ('port79', 'node79', 'pop79', 2, 'kpongfaa', 'pr_44', 981213, 2, 4, 10, 11, 2, 99, 1278); +select port, accessnode, pop, accesstype from t1 where port='port67' order by accesstype; +port accessnode pop accesstype +port67 node78 pop98 1 +port67 node78 pop99 2 +select port, accessnode, pop, accesstype from t1 where port='foo'; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where accessnode='node78' order by accesstype; +port accessnode pop accesstype +port67 node78 pop98 1 +port67 node78 pop99 2 +select port, accessnode, pop, accesstype from t1 where accessnode='foo'; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where pop='pop98'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where pop='pop98'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where pop='pop98'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where pop='pop98' order by accesstype; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where pop='foo'; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where accesstype=1; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where accesstype=2 order by port; +port accessnode pop accesstype +port67 node78 pop99 2 +port79 node79 pop79 2 +select port, accessnode, pop, accesstype from t1 where accesstype=98 order by port; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where customer_id='KLLOPMN'; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where customer_id='kLLoPMn'; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where customer_id='foo'; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where provider='pr_43'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where provider='foo'; +port accessnode pop accesstype +select port, accessnode from t1 where texpire=121212; +port accessnode +port67 node78 +select port, accessnode from t1 where texpire=2323; +port accessnode +select port, accessnode, pop, accesstype from t1 where num_ip=1; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where num_ip=89; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where leased_num_ip=2; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where leased_num_ip=89; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where locked_ip=3; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where locked_ip=89; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where static_dns=8; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where static_dns=89; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where suspended_service=8; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where suspended_service=89; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where suspended_reason=NULL; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where suspended_reason=89; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where suspended_reason=0; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where bgp_community=NULL; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where bgp_community=89; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where bgp_community=0; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where port='port67' and accessnode='node78' and pop='pop98' and accesstype=1; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78' and pop='pop98'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where pop='pop98' and port='port67' and accesstype=1 and accessnode='node78'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo' and accesstype=99; +port accessnode +select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accesstype=1; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where accesstype=1 and accessnode='node78' and pop='pop98'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo'; +port accessnode +select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=1; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=2; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where accesstype=2 and customer_id='kllopmn'; +port accessnode pop accesstype +select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn'; +port accessnode pop accesstype +port67 node78 pop98 1 +select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo'; +port accessnode pop accesstype +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_index_ordered.result b/mysql-test/suite/ndb/r/ndb_index_ordered.result new file mode 100644 index 00000000000..a29b5343d7c --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_index_ordered.result @@ -0,0 +1,854 @@ +drop table if exists t1, test1, test2; +CREATE TABLE t1 ( +a int unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned, +KEY(b) +) engine=ndbcluster; +insert t1 values(1, 2, 3), (2,3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); +select * from t1 order by b; +a b c +1 2 3 +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +select * from t1 where b >= 4 order by b; +a b c +3 4 6 +4 5 8 +5 6 2 +6 7 2 +select * from t1 where b = 4 order by b; +a b c +3 4 6 +select * from t1 where b > 4 order by b; +a b c +4 5 8 +5 6 2 +6 7 2 +select * from t1 where b < 4 order by b; +a b c +1 2 3 +2 3 5 +select * from t1 where b <= 4 order by b; +a b c +1 2 3 +2 3 5 +3 4 6 +select tt1.* from t1 as tt1, t1 as tt2 use index(b) where tt1.b = tt2.b order by tt1.b; +a b c +1 2 3 +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +select a, b, c from t1 where a!=2 and c=6; +a b c +3 4 6 +select a, b, c from t1 where a!=2 order by a; +a b c +1 2 3 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +update t1 set c = 3 where b = 3; +select * from t1 order by a; +a b c +1 2 3 +2 3 3 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +update t1 set c = 10 where b >= 6; +select * from t1 order by a; +a b c +1 2 3 +2 3 3 +3 4 6 +4 5 8 +5 6 10 +6 7 10 +update t1 set c = 11 where b < 5; +select * from t1 order by a; +a b c +1 2 11 +2 3 11 +3 4 11 +4 5 8 +5 6 10 +6 7 10 +update t1 set c = 12 where b > 0; +select * from t1 order by a; +a b c +1 2 12 +2 3 12 +3 4 12 +4 5 12 +5 6 12 +6 7 12 +update t1 set c = 13 where b <= 3; +select * from t1 order by a; +a b c +1 2 13 +2 3 13 +3 4 12 +4 5 12 +5 6 12 +6 7 12 +update t1 set b = b + 1 where b > 4 and b < 7; +select * from t1 order by a; +a b c +1 2 13 +2 3 13 +3 4 12 +4 6 12 +5 7 12 +6 7 12 +update t1 set a = a + 10 where b > 1 and b < 7; +select * from t1 order by a; +a b c +5 7 12 +6 7 12 +11 2 13 +12 3 13 +13 4 12 +14 6 12 +drop table t1; +CREATE TABLE t1 ( +a int unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned, +KEY(b) +) engine=ndbcluster; +insert t1 values(1, 2, 13), (2,3, 13), (3, 4, 12), (4, 5, 12), (5,6, 12), (6,7, 12); +delete from t1 where b = 3; +select * from t1 order by a; +a b c +1 2 13 +3 4 12 +4 5 12 +5 6 12 +6 7 12 +delete from t1 where b >= 6; +select * from t1 order by a; +a b c +1 2 13 +3 4 12 +4 5 12 +delete from t1 where b < 4; +select * from t1 order by a; +a b c +3 4 12 +4 5 12 +delete from t1 where b > 5; +select * from t1 order by a; +a b c +3 4 12 +4 5 12 +delete from t1 where b <= 4; +select * from t1 order by a; +a b c +4 5 12 +drop table t1; +CREATE TABLE t1 ( +a int unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned not null +) engine = ndb; +create index a1 on t1 (b, c); +insert into t1 values (1, 2, 13); +insert into t1 values (2,3, 13); +insert into t1 values (3, 4, 12); +insert into t1 values (4, 5, 12); +insert into t1 values (5,6, 12); +insert into t1 values (6,7, 12); +insert into t1 values (7, 2, 1); +insert into t1 values (8,3, 6); +insert into t1 values (9, 4, 12); +insert into t1 values (14, 5, 4); +insert into t1 values (15,5,5); +insert into t1 values (16,5, 6); +insert into t1 values (17,4,4); +insert into t1 values (18,1, 7); +select * from t1 order by a; +a b c +1 2 13 +2 3 13 +3 4 12 +4 5 12 +5 6 12 +6 7 12 +7 2 1 +8 3 6 +9 4 12 +14 5 4 +15 5 5 +16 5 6 +17 4 4 +18 1 7 +select * from t1 where b<=5 order by a; +a b c +1 2 13 +2 3 13 +3 4 12 +4 5 12 +7 2 1 +8 3 6 +9 4 12 +14 5 4 +15 5 5 +16 5 6 +17 4 4 +18 1 7 +select * from t1 where b<=5 and c=0; +a b c +insert into t1 values (19,4, 0); +select * from t1 where b<=5 and c=0; +a b c +19 4 0 +select * from t1 where b=4 and c<=5 order by a; +a b c +17 4 4 +19 4 0 +select * from t1 where b<=4 and c<=5 order by a; +a b c +7 2 1 +17 4 4 +19 4 0 +select * from t1 where b<=5 and c=0 or b<=5 and c=2; +a b c +19 4 0 +select count(*) from t1 where b = 0; +count(*) +0 +select count(*) from t1 where b = 1; +count(*) +1 +drop table t1; +CREATE TABLE t1 ( +a int unsigned NOT NULL PRIMARY KEY, +b int unsigned, +c int unsigned, +KEY bc(b,c) +) engine = ndb; +insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); +select * from t1 use index (bc) where b IS NULL order by a; +a b c +2 NULL 2 +3 NULL NULL +select * from t1 use index (bc)order by a; +a b c +1 1 1 +2 NULL 2 +3 NULL NULL +4 4 NULL +select * from t1 use index (bc) order by a; +a b c +1 1 1 +2 NULL 2 +3 NULL NULL +4 4 NULL +select * from t1 use index (PRIMARY) where b IS NULL order by a; +a b c +2 NULL 2 +3 NULL NULL +select * from t1 use index (bc) where b IS NULL order by a; +a b c +2 NULL 2 +3 NULL NULL +select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; +a b c +3 NULL NULL +select * from t1 use index (bc) where b IS NULL and c = 2 order by a; +a b c +2 NULL 2 +select * from t1 use index (bc) where b < 4 order by a; +a b c +1 1 1 +select * from t1 use index (bc) where b IS NOT NULL order by a; +a b c +1 1 1 +4 4 NULL +drop table t1; +create table t1 ( +a int unsigned primary key, +b int unsigned, +c char(10), +key bc (b, c) +) engine=ndb; +insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); +insert into t1 select a*7,10*b,'f' from t1; +insert into t1 select a*13,10*b,'g' from t1; +insert into t1 select a*17,10*b,'h' from t1; +insert into t1 select a*19,10*b,'i' from t1; +insert into t1 select a*23,10*b,'j' from t1; +insert into t1 select a*29,10*b,'k' from t1; +select b, c from t1 where b <= 10 and c <'f' order by b, c; +b c +1 a +2 b +3 c +4 d +5 e +select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; +b c +5 e +4 d +3 c +2 b +1 a +select b, c from t1 where b=4000 and c<'k' order by b, c; +b c +4000 h +4000 i +4000 i +4000 i +4000 j +4000 j +4000 j +4000 j +4000 j +4000 j +select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; +b c +4000 j +4000 j +4000 j +4000 j +4000 j +4000 j +4000 i +4000 i +4000 i +4000 h +select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; +b c +1000 h +1000 i +1000 i +1000 i +2000 h +2000 i +2000 i +2000 i +3000 h +3000 i +3000 i +3000 i +4000 h +4000 i +4000 i +4000 i +5000 h +5000 i +5000 i +5000 i +10000 i +20000 i +30000 i +40000 i +50000 i +select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; +b c +50000 i +40000 i +30000 i +20000 i +10000 i +5000 i +5000 i +5000 i +5000 h +4000 i +4000 i +4000 i +4000 h +3000 i +3000 i +3000 i +3000 h +2000 i +2000 i +2000 i +2000 h +1000 i +1000 i +1000 i +1000 h +select min(b), max(b) from t1; +min(b) max(b) +1 5000000 +drop table t1; +CREATE TABLE test1 ( +SubscrID int(11) NOT NULL auto_increment, +UsrID int(11) NOT NULL default '0', +PRIMARY KEY (SubscrID), +KEY idx_usrid (UsrID) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO test1 VALUES (2,224),(3,224),(1,224); +CREATE TABLE test2 ( +SbclID int(11) NOT NULL auto_increment, +SbcrID int(11) NOT NULL default '0', +PRIMARY KEY (SbclID), +KEY idx_sbcrid (SbcrID) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2); +select * from test1 order by 1; +SubscrID UsrID +1 224 +2 224 +3 224 +select * from test2 order by 1; +SbclID SbcrID +1 1 +2 1 +3 2 +4 2 +SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON +l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2; +SubscrID SbclID +1 1 +1 2 +2 3 +2 4 +3 NULL +drop table test1; +drop table test2; +create table t1 ( +pk int primary key, +dt datetime not null, +da date not null, +ye year not null, +ti time not null, +ts timestamp not null, +index(dt), +index(da), +index(ye), +index(ti), +index(ts) +) engine=ndb; +insert into t1 (pk,dt,da,ye,ti,ts) values +(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), +(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), +(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), +(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), +(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), +(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), +(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), +(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), +(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); +select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; +count(*)-9 +0 +select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; +count(*)-6 +0 +select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; +count(*)-5 +0 +select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; +count(*)-5 +0 +select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; +count(*)-7 +0 +select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; +count(*)-8 +0 +select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; +count(*)-9 +0 +select count(*)-9 from t1 use index (da) where da > '1900-01-01'; +count(*)-9 +0 +select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; +count(*)-6 +0 +select count(*)-5 from t1 use index (da) where da > '1955-12-31'; +count(*)-5 +0 +select count(*)-5 from t1 use index (da) where da < '1970-03-03'; +count(*)-5 +0 +select count(*)-6 from t1 use index (da) where da < '2001-01-01'; +count(*)-6 +0 +select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; +count(*)-8 +0 +select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; +count(*)-9 +0 +select count(*)-9 from t1 use index (ye) where ye > '1900'; +count(*)-9 +0 +select count(*)-6 from t1 use index (ye) where ye >= '1955'; +count(*)-6 +0 +select count(*)-5 from t1 use index (ye) where ye > '1955'; +count(*)-5 +0 +select count(*)-5 from t1 use index (ye) where ye < '1970'; +count(*)-5 +0 +select count(*)-6 from t1 use index (ye) where ye < '2001'; +count(*)-6 +0 +select count(*)-8 from t1 use index (ye) where ye <= '2001'; +count(*)-8 +0 +select count(*)-9 from t1 use index (ye) where ye <= '2055'; +count(*)-9 +0 +select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; +count(*)-9 +0 +select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; +count(*)-7 +0 +select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; +count(*)-7 +0 +select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; +count(*)-5 +0 +select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; +count(*)-5 +0 +select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; +count(*)-6 +0 +select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; +count(*)-8 +0 +select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; +count(*)-9 +0 +select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; +count(*)-9 +0 +select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; +count(*)-7 +0 +select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; +count(*)-7 +0 +select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; +count(*)-5 +0 +select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; +count(*)-5 +0 +select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; +count(*)-6 +0 +select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; +count(*)-8 +0 +select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; +count(*)-9 +0 +drop table t1; +create table t1 ( +a int primary key, +s decimal(12), +t decimal(12, 5), +u decimal(12) unsigned, +v decimal(12, 5) unsigned, +key (s), +key (t), +key (u), +key (v) +) engine=ndb; +insert into t1 values +( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042), +( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003), +( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488), +( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013), +( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002), +( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018), +( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001), +( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374), +( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000), +( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008); +select count(*)- 5 from t1 use index (s) where s < -000000000007; +count(*)- 5 +0 +select count(*)- 7 from t1 use index (s) where s <= -000000000007; +count(*)- 7 +0 +select count(*)- 2 from t1 use index (s) where s = -000000000007; +count(*)- 2 +0 +select count(*)- 5 from t1 use index (s) where s >= -000000000007; +count(*)- 5 +0 +select count(*)- 3 from t1 use index (s) where s > -000000000007; +count(*)- 3 +0 +select count(*)- 4 from t1 use index (t) where t < -0000061.00003; +count(*)- 4 +0 +select count(*)- 5 from t1 use index (t) where t <= -0000061.00003; +count(*)- 5 +0 +select count(*)- 1 from t1 use index (t) where t = -0000061.00003; +count(*)- 1 +0 +select count(*)- 6 from t1 use index (t) where t >= -0000061.00003; +count(*)- 6 +0 +select count(*)- 5 from t1 use index (t) where t > -0000061.00003; +count(*)- 5 +0 +select count(*)- 2 from t1 use index (u) where u < 000000000061; +count(*)- 2 +0 +select count(*)- 4 from t1 use index (u) where u <= 000000000061; +count(*)- 4 +0 +select count(*)- 2 from t1 use index (u) where u = 000000000061; +count(*)- 2 +0 +select count(*)- 8 from t1 use index (u) where u >= 000000000061; +count(*)- 8 +0 +select count(*)- 6 from t1 use index (u) where u > 000000000061; +count(*)- 6 +0 +select count(*)- 5 from t1 use index (v) where v < 0000965.00042; +count(*)- 5 +0 +select count(*)- 6 from t1 use index (v) where v <= 0000965.00042; +count(*)- 6 +0 +select count(*)- 1 from t1 use index (v) where v = 0000965.00042; +count(*)- 1 +0 +select count(*)- 5 from t1 use index (v) where v >= 0000965.00042; +count(*)- 5 +0 +select count(*)- 4 from t1 use index (v) where v > 0000965.00042; +count(*)- 4 +0 +drop table t1; +create table t1(a int primary key, b int not null, index(b)); +insert into t1 values (1,1), (2,2); +set autocommit=0; +begin; +select count(*) from t1; +count(*) +2 +ALTER TABLE t1 ADD COLUMN c int; +select a from t1 where b = 2; +a +2 +show tables; +Tables_in_test +t1 +drop table t1; +create table t1 (a int, c varchar(10), +primary key using hash (a), index(c)) engine=ndb; +insert into t1 (a, c) values (1,'aaa'),(3,'bbb'); +select count(*) from t1 where c<'bbb'; +count(*) +1 +drop table t1; +set autocommit=1; +show session variables like 'ndb_index_stat_%'; +Variable_name Value +ndb_index_stat_cache_entries 32 +ndb_index_stat_enable OFF +ndb_index_stat_update_freq 20 +set ndb_index_stat_enable = off; +show session variables like 'ndb_index_stat_%'; +Variable_name Value +ndb_index_stat_cache_entries 32 +ndb_index_stat_enable OFF +ndb_index_stat_update_freq 20 +create table t1 (a int, b int, c varchar(10) not null, +primary key using hash (a), index(b,c)) engine=ndb; +insert into t1 values +(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), +(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), +(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); +select count(*) from t1 where b < 10; +count(*) +0 +select count(*) from t1 where b >= 10 and c >= 'bbb'; +count(*) +6 +select count(*) from t1 where b > 10; +count(*) +6 +select count(*) from t1 where b <= 20 and c < 'ccc'; +count(*) +4 +select count(*) from t1 where b = 20 and c = 'ccc'; +count(*) +1 +select count(*) from t1 where b > 20; +count(*) +3 +select count(*) from t1 where b = 30 and c > 'aaa'; +count(*) +2 +select count(*) from t1 where b <= 20; +count(*) +6 +select count(*) from t1 where b >= 20 and c > 'aaa'; +count(*) +4 +drop table t1; +set ndb_index_stat_enable = on; +set ndb_index_stat_cache_entries = 0; +show session variables like 'ndb_index_stat_%'; +Variable_name Value +ndb_index_stat_cache_entries 0 +ndb_index_stat_enable ON +ndb_index_stat_update_freq 20 +create table t1 (a int, b int, c varchar(10) not null, +primary key using hash (a), index(b,c)) engine=ndb; +insert into t1 values +(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), +(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), +(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); +select count(*) from t1 where b < 10; +count(*) +0 +select count(*) from t1 where b >= 10 and c >= 'bbb'; +count(*) +6 +select count(*) from t1 where b > 10; +count(*) +6 +select count(*) from t1 where b <= 20 and c < 'ccc'; +count(*) +4 +select count(*) from t1 where b = 20 and c = 'ccc'; +count(*) +1 +select count(*) from t1 where b > 20; +count(*) +3 +select count(*) from t1 where b = 30 and c > 'aaa'; +count(*) +2 +select count(*) from t1 where b <= 20; +count(*) +6 +select count(*) from t1 where b >= 20 and c > 'aaa'; +count(*) +4 +drop table t1; +set ndb_index_stat_enable = on; +set ndb_index_stat_cache_entries = 4; +set ndb_index_stat_update_freq = 2; +show session variables like 'ndb_index_stat_%'; +Variable_name Value +ndb_index_stat_cache_entries 4 +ndb_index_stat_enable ON +ndb_index_stat_update_freq 2 +create table t1 (a int, b int, c varchar(10) not null, +primary key using hash (a), index(b,c)) engine=ndb; +insert into t1 values +(1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), +(4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), +(7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); +select count(*) from t1 where b < 10; +count(*) +0 +select count(*) from t1 where b >= 10 and c >= 'bbb'; +count(*) +6 +select count(*) from t1 where b > 10; +count(*) +6 +select count(*) from t1 where b <= 20 and c < 'ccc'; +count(*) +4 +select count(*) from t1 where b = 20 and c = 'ccc'; +count(*) +1 +select count(*) from t1 where b > 20; +count(*) +3 +select count(*) from t1 where b = 30 and c > 'aaa'; +count(*) +2 +select count(*) from t1 where b <= 20; +count(*) +6 +select count(*) from t1 where b >= 20 and c > 'aaa'; +count(*) +4 +drop table t1; +set ndb_index_stat_enable = @@global.ndb_index_stat_enable; +set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries; +set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq; +show session variables like 'ndb_index_stat_%'; +Variable_name Value +ndb_index_stat_cache_entries 32 +ndb_index_stat_enable OFF +ndb_index_stat_update_freq 20 +create table t1 (a int primary key) engine = ndb; +insert into t1 values (1), (2), (3); +begin; +delete from t1 where a > 1; +rollback; +select * from t1 order by a; +a +1 +2 +3 +begin; +delete from t1 where a > 1; +rollback; +begin; +select * from t1 order by a; +a +1 +2 +3 +delete from t1 where a > 2; +select * from t1 order by a; +a +1 +2 +delete from t1 where a > 1; +select * from t1 order by a; +a +1 +delete from t1 where a > 0; +select * from t1 order by a; +a +rollback; +select * from t1 order by a; +a +1 +2 +3 +delete from t1; +drop table t1; +create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, +CountryCode char(3) NOT NULL, +DishTitle varchar(64) NOT NULL, +calories smallint(5) unsigned DEFAULT NULL, +PRIMARY KEY (DishID), +INDEX i USING HASH (countrycode,calories) +) ENGINE=ndbcluster; +ERROR HY000: Can't create table 'test.nationaldish' (errno: 138) +create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, +CountryCode char(3) NOT NULL, +DishTitle varchar(64) NOT NULL, +calories smallint(5) unsigned DEFAULT NULL, +PRIMARY KEY (DishID) +) ENGINE=ndbcluster; +create index i on nationaldish(countrycode,calories) using hash; +ERROR 42000: Table 'nationaldish' uses an extension that doesn't exist in this MySQL version +drop table nationaldish; diff --git a/mysql-test/suite/ndb/r/ndb_index_unique.result b/mysql-test/suite/ndb/r/ndb_index_unique.result new file mode 100644 index 00000000000..cc63ce69760 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_index_unique.result @@ -0,0 +1,692 @@ +drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; +CREATE TABLE t1 ( +a int NOT NULL PRIMARY KEY, +b int not null, +c int, +UNIQUE ib(b) +) engine=ndbcluster; +insert t1 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); +select * from t1 order by b; +a b c +1 2 3 +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +select * from t1 where b = 4 order by b; +a b c +3 4 6 +insert into t1 values(7,8,3); +select * from t1 where b = 4 order by a; +a b c +3 4 6 +insert into t1 values(8, 2, 3); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +select * from t1 order by a; +a b c +1 2 3 +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +7 8 3 +delete from t1 where a = 1; +insert into t1 values(8, 2, 3); +select * from t1 order by a; +a b c +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +7 8 3 +8 2 3 +alter table t1 drop index ib; +insert into t1 values(1, 2, 3); +create unique index ib on t1(b); +ERROR 23000: Can't write, because of unique constraint, to table 't1' +drop table t1; +CREATE TABLE t1 ( +a int unsigned NOT NULL PRIMARY KEY, +b int unsigned, +c int unsigned, +UNIQUE bc(b,c) +) engine = ndb; +insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); +select * from t1 use index (bc) where b IS NULL order by a; +a b c +2 NULL 2 +3 NULL NULL +select * from t1 use index (bc)order by a; +a b c +1 1 1 +2 NULL 2 +3 NULL NULL +4 4 NULL +select * from t1 use index (bc) order by a; +a b c +1 1 1 +2 NULL 2 +3 NULL NULL +4 4 NULL +select * from t1 use index (PRIMARY) where b IS NULL order by a; +a b c +2 NULL 2 +3 NULL NULL +select * from t1 use index (bc) where b IS NULL order by a; +a b c +2 NULL 2 +3 NULL NULL +select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; +a b c +3 NULL NULL +select * from t1 use index (bc) where b IS NULL and c = 2 order by a; +a b c +2 NULL 2 +select * from t1 use index (bc) where b < 4 order by a; +a b c +1 1 1 +select * from t1 use index (bc) where b IS NOT NULL order by a; +a b c +1 1 1 +4 4 NULL +insert into t1 values(5,1,1); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +drop table t1; +CREATE TABLE t2 ( +a int unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned not null, +UNIQUE (b, c) USING HASH +) engine=ndbcluster; +insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); +select * from t2 where a = 3; +a b c +3 4 6 +select * from t2 where b = 4; +a b c +3 4 6 +select * from t2 where c = 6; +a b c +3 4 6 +insert into t2 values(7,8,3); +select * from t2 where b = 4 order by a; +a b c +3 4 6 +insert into t2 values(8, 2, 3); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +select * from t2 order by a; +a b c +1 2 3 +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +7 8 3 +delete from t2 where a = 1; +insert into t2 values(8, 2, 3); +select * from t2 order by a; +a b c +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +7 8 3 +8 2 3 +create unique index bi using hash on t2(b); +insert into t2 values(9, 3, 1); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +alter table t2 drop index bi; +insert into t2 values(9, 3, 1); +select * from t2 order by a; +a b c +2 3 5 +3 4 6 +4 5 8 +5 6 2 +6 7 2 +7 8 3 +8 2 3 +9 3 1 +drop table t2; +CREATE TABLE t2 ( +a int unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned, +UNIQUE (b, c) USING HASH +) engine=ndbcluster; +Warnings: +Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan +insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL); +select * from t2 where c IS NULL order by a; +a b c +1 1 NULL +3 3 NULL +5 5 NULL +7 7 NULL +8 3 NULL +9 3 NULL +select * from t2 where b = 3 AND c IS NULL order by a; +a b c +3 3 NULL +8 3 NULL +9 3 NULL +select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a; +a b c +3 3 NULL +5 5 NULL +8 3 NULL +9 3 NULL +set @old_ecpd = @@session.engine_condition_pushdown; +set engine_condition_pushdown = true; +explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range PRIMARY,b PRIMARY 4 NULL 1 Using where with pushed condition +select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; +a b c +3 3 NULL +5 5 NULL +8 3 NULL +set engine_condition_pushdown = @old_ecpd; +drop table t2; +CREATE TABLE t3 ( +a int unsigned NOT NULL, +b int unsigned not null, +c int unsigned, +PRIMARY KEY (a, b) USING HASH +) engine=ndbcluster; +insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); +select * from t3 where a = 3; +a b c +3 4 6 +select * from t3 where b = 4; +a b c +3 4 6 +select * from t3 where c = 6; +a b c +3 4 6 +insert into t3 values(7,8,3); +select * from t3 where b = 4 order by a; +a b c +3 4 6 +drop table t3; +CREATE TABLE t1 ( +pk int NOT NULL PRIMARY KEY, +a int unsigned, +UNIQUE KEY (a) +) engine=ndbcluster; +insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); +select * from t1 order by pk; +pk a +-1 NULL +0 0 +1 NULL +2 2 +3 NULL +4 4 +insert into t1 values (5,0); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +select * from t1 order by pk; +pk a +-1 NULL +0 0 +1 NULL +2 2 +3 NULL +4 4 +delete from t1 where a = 0; +insert into t1 values (5,0); +select * from t1 order by pk; +pk a +-1 NULL +1 NULL +2 2 +3 NULL +4 4 +5 0 +CREATE TABLE t2 ( +pk int NOT NULL PRIMARY KEY, +a int unsigned, +b tinyint NOT NULL, +c VARCHAR(10), +UNIQUE KEY si(a, c) +) engine=ndbcluster; +insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); +select * from t2 order by pk; +pk a b c +-1 1 17 NULL +0 NULL 18 NULL +1 3 19 abc +insert into t2 values(2,3,19,'abc'); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +select * from t2 order by pk; +pk a b c +-1 1 17 NULL +0 NULL 18 NULL +1 3 19 abc +delete from t2 where c IS NOT NULL; +insert into t2 values(2,3,19,'abc'); +select * from t2 order by pk; +pk a b c +-1 1 17 NULL +0 NULL 18 NULL +2 3 19 abc +drop table t1, t2; +CREATE TABLE t1 ( +cid smallint(5) unsigned NOT NULL default '0', +cv varchar(250) NOT NULL default '', +PRIMARY KEY (cid), +UNIQUE KEY cv (cv) +) engine=ndbcluster; +INSERT INTO t1 VALUES (8,'dummy'); +CREATE TABLE t2 ( +cid bigint(20) unsigned NOT NULL auto_increment, +cap varchar(255) NOT NULL default '', +PRIMARY KEY (cid), +UNIQUE KEY (cid, cap) +) engine=ndbcluster; +INSERT INTO t2 VALUES (NULL,'another dummy'); +CREATE TABLE t3 ( +gid bigint(20) unsigned NOT NULL auto_increment, +gn varchar(255) NOT NULL default '', +must tinyint(4) default NULL, +PRIMARY KEY (gid) +) engine=ndbcluster; +INSERT INTO t3 VALUES (1,'V1',NULL); +CREATE TABLE t4 ( +uid bigint(20) unsigned NOT NULL default '0', +gid bigint(20) unsigned NOT NULL, +rid bigint(20) unsigned NOT NULL, +cid bigint(20) unsigned NOT NULL, +UNIQUE KEY m (uid,gid,rid,cid) +) engine=ndbcluster; +INSERT INTO t4 VALUES (1,1,2,4); +INSERT INTO t4 VALUES (1,1,2,3); +INSERT INTO t4 VALUES (1,1,5,7); +INSERT INTO t4 VALUES (1,1,10,8); +CREATE TABLE t5 ( +rid bigint(20) unsigned NOT NULL auto_increment, +rl varchar(255) NOT NULL default '', +PRIMARY KEY (rid) +) engine=ndbcluster; +CREATE TABLE t6 ( +uid bigint(20) unsigned NOT NULL auto_increment, +un varchar(250) NOT NULL default '', +uc smallint(5) unsigned NOT NULL default '0', +PRIMARY KEY (uid), +UNIQUE KEY nc (un,uc) +) engine=ndbcluster; +INSERT INTO t6 VALUES (1,'test',8); +INSERT INTO t6 VALUES (2,'test2',9); +INSERT INTO t6 VALUES (3,'tre',3); +CREATE TABLE t7 ( +mid bigint(20) unsigned NOT NULL PRIMARY KEY, +uid bigint(20) unsigned NOT NULL default '0', +gid bigint(20) unsigned NOT NULL, +rid bigint(20) unsigned NOT NULL, +cid bigint(20) unsigned NOT NULL, +UNIQUE KEY m (uid,gid,rid,cid) +) engine=ndbcluster; +INSERT INTO t7 VALUES(1, 1, 1, 1, 1); +INSERT INTO t7 VALUES(2, 2, 1, 1, 1); +INSERT INTO t7 VALUES(3, 3, 1, 1, 1); +INSERT INTO t7 VALUES(4, 4, 1, 1, 1); +INSERT INTO t7 VALUES(5, 5, 1, 1, 1); +INSERT INTO t7 VALUES(6, 1, 1, 1, 6); +INSERT INTO t7 VALUES(7, 2, 1, 1, 7); +INSERT INTO t7 VALUES(8, 3, 1, 1, 8); +INSERT INTO t7 VALUES(9, 4, 1, 1, 9); +INSERT INTO t7 VALUES(10, 5, 1, 1, 10); +select * from t1 where cv = 'dummy'; +cid cv +8 dummy +select * from t1 where cv = 'test'; +cid cv +select * from t2 where cap = 'another dummy'; +cid cap +1 another dummy +select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; +uid gid rid cid +1 1 2 4 +select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; +uid gid rid cid +select * from t4 where uid = 1 order by cid; +uid gid rid cid +1 1 2 3 +1 1 2 4 +1 1 5 7 +1 1 10 8 +select * from t4 where rid = 2 order by cid; +uid gid rid cid +1 1 2 3 +1 1 2 4 +select * from t6 where un='test' and uc=8; +uid un uc +1 test 8 +select * from t6 where un='test' and uc=7; +uid un uc +select * from t6 where un='test'; +uid un uc +1 test 8 +select * from t7 where mid = 8; +mid uid gid rid cid +8 3 1 1 8 +select * from t7 where uid = 8; +mid uid gid rid cid +select * from t7 where uid = 1 order by mid; +mid uid gid rid cid +1 1 1 1 1 +6 1 1 1 6 +select * from t7 where uid = 4 order by mid; +mid uid gid rid cid +4 4 1 1 1 +9 4 1 1 9 +select * from t7 where gid = 4; +mid uid gid rid cid +select * from t7 where gid = 1 order by mid; +mid uid gid rid cid +1 1 1 1 1 +2 2 1 1 1 +3 3 1 1 1 +4 4 1 1 1 +5 5 1 1 1 +6 1 1 1 6 +7 2 1 1 7 +8 3 1 1 8 +9 4 1 1 9 +10 5 1 1 10 +select * from t7 where cid = 4; +mid uid gid rid cid +select * from t7 where cid = 8; +mid uid gid rid cid +8 3 1 1 8 +select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; +uid gid rid cid +1 1 2 4 +select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; +uid gid rid cid +select * from t4 where uid = 1 order by gid,cid; +uid gid rid cid +1 1 2 3 +1 1 2 4 +1 1 5 7 +1 1 10 8 +1 1 5 12 +1 2 5 12 +1 3 9 11 +1 3 5 12 +1 4 5 12 +1 5 5 12 +1 6 5 12 +1 7 5 12 +1 8 5 12 +1 9 5 12 +1 10 5 12 +1 11 5 12 +1 12 5 12 +1 13 5 12 +1 14 5 12 +1 15 5 12 +1 16 5 12 +1 17 5 12 +1 18 5 12 +1 19 5 12 +1 20 5 12 +1 21 5 12 +1 22 5 12 +1 23 5 12 +1 24 5 12 +1 25 5 12 +1 26 5 12 +1 27 5 12 +1 28 5 12 +1 29 5 12 +1 30 5 12 +1 31 5 12 +1 32 5 12 +1 33 5 12 +1 34 5 12 +1 35 5 12 +1 36 5 12 +1 37 5 12 +1 38 5 12 +1 39 5 12 +1 40 5 12 +1 41 5 12 +1 42 5 12 +1 43 5 12 +1 44 5 12 +1 45 5 12 +1 46 5 12 +1 47 5 12 +1 48 5 12 +1 49 5 12 +1 50 5 12 +1 51 5 12 +1 52 5 12 +1 53 5 12 +1 54 5 12 +1 55 5 12 +1 56 5 12 +1 57 5 12 +1 58 5 12 +1 59 5 12 +1 60 5 12 +1 61 5 12 +1 62 5 12 +1 63 5 12 +1 64 5 12 +1 65 5 12 +1 66 5 12 +1 67 5 12 +1 68 5 12 +1 69 5 12 +1 70 5 12 +1 71 5 12 +1 72 5 12 +1 73 5 12 +1 74 5 12 +1 75 5 12 +1 76 5 12 +1 77 5 12 +1 78 5 12 +1 79 5 12 +1 80 5 12 +1 81 5 12 +1 82 5 12 +1 83 5 12 +1 84 5 12 +1 85 5 12 +1 86 5 12 +1 87 5 12 +1 88 5 12 +1 89 5 12 +1 90 5 12 +1 91 5 12 +1 92 5 12 +1 93 5 12 +1 94 5 12 +1 95 5 12 +1 96 5 12 +1 97 5 12 +1 98 5 12 +1 99 5 12 +1 100 5 12 +select * from t4 where uid = 1 order by gid,cid; +uid gid rid cid +1 1 2 3 +1 1 2 4 +1 1 5 7 +1 1 10 8 +1 1 5 12 +1 2 5 12 +1 3 9 11 +1 3 5 12 +1 4 5 12 +1 5 5 12 +1 6 5 12 +1 7 5 12 +1 8 5 12 +1 9 5 12 +1 10 5 12 +1 11 5 12 +1 12 5 12 +1 13 5 12 +1 14 5 12 +1 15 5 12 +1 16 5 12 +1 17 5 12 +1 18 5 12 +1 19 5 12 +1 20 5 12 +1 21 5 12 +1 22 5 12 +1 23 5 12 +1 24 5 12 +1 25 5 12 +1 26 5 12 +1 27 5 12 +1 28 5 12 +1 29 5 12 +1 30 5 12 +1 31 5 12 +1 32 5 12 +1 33 5 12 +1 34 5 12 +1 35 5 12 +1 36 5 12 +1 37 5 12 +1 38 5 12 +1 39 5 12 +1 40 5 12 +1 41 5 12 +1 42 5 12 +1 43 5 12 +1 44 5 12 +1 45 5 12 +1 46 5 12 +1 47 5 12 +1 48 5 12 +1 49 5 12 +1 50 5 12 +1 51 5 12 +1 52 5 12 +1 53 5 12 +1 54 5 12 +1 55 5 12 +1 56 5 12 +1 57 5 12 +1 58 5 12 +1 59 5 12 +1 60 5 12 +1 61 5 12 +1 62 5 12 +1 63 5 12 +1 64 5 12 +1 65 5 12 +1 66 5 12 +1 67 5 12 +1 68 5 12 +1 69 5 12 +1 70 5 12 +1 71 5 12 +1 72 5 12 +1 73 5 12 +1 74 5 12 +1 75 5 12 +1 76 5 12 +1 77 5 12 +1 78 5 12 +1 79 5 12 +1 80 5 12 +1 81 5 12 +1 82 5 12 +1 83 5 12 +1 84 5 12 +1 85 5 12 +1 86 5 12 +1 87 5 12 +1 88 5 12 +1 89 5 12 +1 90 5 12 +1 91 5 12 +1 92 5 12 +1 93 5 12 +1 94 5 12 +1 95 5 12 +1 96 5 12 +1 97 5 12 +1 98 5 12 +1 99 5 12 +1 100 5 12 +select * from t4 where rid = 2 order by cid; +uid gid rid cid +1 1 2 3 +1 1 2 4 +drop table t1,t2,t3,t4,t5,t6,t7; +CREATE TABLE t1 ( +a int unsigned NOT NULL PRIMARY KEY, +b int unsigned, +c int unsigned, +UNIQUE bc(b,c) ) engine = ndb; +insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); +select * from t1 where b=1 and c=1; +a b c +1 1 1 +select * from t1 where b is null and c is null; +a b c +3 NULL NULL +select * from t1 where b is null and c = 2; +a b c +2 NULL 2 +select * from t1 where b = 4 and c is null; +a b c +4 4 NULL +create table t8 as +select * from t1 where (b = 1 and c = 1) +or (b is null and c is null) +or (b is null and c = 2) +or (b = 4 and c is null); +select * from t8 order by a; +a b c +1 1 1 +2 NULL 2 +3 NULL NULL +4 4 NULL +select * from t1 order by a; +a b c +1 1 1 +2 NULL 2 +3 NULL NULL +4 4 NULL +drop table t1, t8; +create table t1( +id integer not null auto_increment, +month integer not null, +year integer not null, +code varchar( 2) not null, +primary key ( id), +unique idx_t1( month, code, year) +) engine=ndb; +INSERT INTO t1 (month, year, code) VALUES (4,2004,'12'); +INSERT INTO t1 (month, year, code) VALUES (5,2004,'12'); +select * from t1 where code = '12' and month = 4 and year = 2004 ; +id month year code +1 4 2004 12 +drop table t1; +create table t1 (a int primary key, b varchar(1000) not null, unique key (b)) +engine=ndb charset=utf8; +insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200)); +insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200)); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +select a, sha1(b) from t1; +a sha1(b) +1 08f5d02c8b8bc244f275bdfc22c42c5cab0d9d7d +drop table t1; +create table t1(id int not null) engine = NDB; +alter table t1 add constraint uk_test unique (id) using hash; +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_insert.result b/mysql-test/suite/ndb/r/ndb_insert.result new file mode 100644 index 00000000000..51b346bbf7b --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_insert.result @@ -0,0 +1,828 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +b INT NOT NULL, +c INT NOT NULL +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (0, 0, 0); +SELECT * FROM t1; +pk1 b c +0 0 0 +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), +(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), +(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), +(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), +(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), +(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), +(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), +(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), +(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), +(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), +(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), +(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), +(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), +(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), +(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), +(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), +(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), +(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), +(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), +(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), +(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), +(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), +(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), +(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), +(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), +(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), +(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), +(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), +(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), +(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), +(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), +(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), +(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), +(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), +(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), +(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), +(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), +(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), +(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), +(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), +(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), +(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), +(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), +(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), +(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), +(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), +(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), +(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), +(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), +(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), +(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), +(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), +(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), +(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), +(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), +(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), +(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), +(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), +(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), +(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), +(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), +(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), +(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), +(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), +(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), +(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), +(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), +(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), +(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), +(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), +(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), +(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), +(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), +(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), +(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), +(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), +(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), +(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), +(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), +(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), +(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), +(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), +(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), +(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), +(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), +(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), +(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), +(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), +(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), +(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), +(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), +(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); +SELECT COUNT(*) FROM t1; +COUNT(*) +501 +INSERT INTO t1 VALUES +(501,501,501),(502,502,502),(503,503,503),(504,504,504),(505,505,505), +(506,506,506),(507,507,507),(508,508,508),(509,509,509),(510,510,510), +(511,511,511),(512,512,512),(513,513,513),(514,514,514),(515,515,515), +(516,516,516),(517,517,517),(518,518,518),(519,519,519),(520,520,520), +(521,521,521),(522,522,522),(523,523,523),(524,524,524),(525,525,525), +(526,526,526),(527,527,527),(528,528,528),(529,529,529),(530,530,530), +(531,531,531),(532,532,532),(533,533,533),(534,534,534),(535,535,535), +(536,536,536),(537,537,537),(538,538,538),(539,539,539),(540,540,540), +(541,541,541),(542,542,542),(543,543,543),(544,544,544),(545,545,545), +(546,546,546),(547,547,547),(548,548,548),(549,549,549),(550,550,550), +(551,551,551),(552,552,552),(553,553,553),(554,554,554),(555,555,555), +(556,556,556),(557,557,557),(558,558,558),(559,559,559),(560,560,560), +(561,561,561),(562,562,562),(563,563,563),(564,564,564),(565,565,565), +(566,566,566),(567,567,567),(568,568,568),(569,569,569),(570,570,570), +(571,571,571),(572,572,572),(573,573,573),(574,574,574),(575,575,575), +(576,576,576),(577,577,577),(578,578,578),(579,579,579),(580,580,580), +(581,581,581),(582,582,582),(583,583,583),(584,584,584),(585,585,585), +(586,586,586),(587,587,587),(588,588,588),(589,589,589),(590,590,590), +(591,591,591),(592,592,592),(593,593,593),(594,594,594),(595,595,595), +(596,596,596),(597,597,597),(598,598,598),(599,599,599),(600,600,600), +(601,601,601),(602,602,602),(603,603,603),(604,604,604),(605,605,605), +(606,606,606),(607,607,607),(608,608,608),(609,609,609),(610,610,610), +(611,611,611),(612,612,612),(613,613,613),(614,614,614),(615,615,615), +(616,616,616),(617,617,617),(618,618,618),(619,619,619),(620,620,620), +(621,621,621),(622,622,622),(623,623,623),(624,624,624),(625,625,625), +(626,626,626),(627,627,627),(628,628,628),(629,629,629),(630,630,630), +(631,631,631),(632,632,632),(633,633,633),(634,634,634),(635,635,635), +(636,636,636),(637,637,637),(638,638,638),(639,639,639),(640,640,640), +(641,641,641),(642,642,642),(643,643,643),(644,644,644),(645,645,645), +(646,646,646),(647,647,647),(648,648,648),(649,649,649),(650,650,650), +(651,651,651),(652,652,652),(653,653,653),(654,654,654),(655,655,655), +(656,656,656),(657,657,657),(658,658,658),(659,659,659),(660,660,660), +(661,661,661),(662,662,662),(663,663,663),(664,664,664),(665,665,665), +(666,666,666),(667,667,667),(668,668,668),(669,669,669),(670,670,670), +(671,671,671),(672,672,672),(673,673,673),(674,674,674),(675,675,675), +(676,676,676),(677,677,677),(678,678,678),(679,679,679),(680,680,680), +(681,681,681),(682,682,682),(683,683,683),(684,684,684),(685,685,685), +(686,686,686),(687,687,687),(688,688,688),(689,689,689),(690,690,690), +(691,691,691),(692,692,692),(693,693,693),(694,694,694),(695,695,695), +(696,696,696),(697,697,697),(698,698,698),(699,699,699),(700,700,700), +(701,701,701),(702,702,702),(703,703,703),(704,704,704),(705,705,705), +(706,706,706),(707,707,707),(708,708,708),(709,709,709),(710,710,710), +(711,711,711),(712,712,712),(713,713,713),(714,714,714),(715,715,715), +(716,716,716),(717,717,717),(718,718,718),(719,719,719),(720,720,720), +(721,721,721),(722,722,722),(723,723,723),(724,724,724),(725,725,725), +(726,726,726),(727,727,727),(728,728,728),(729,729,729),(730,730,730), +(731,731,731),(732,732,732),(733,733,733),(734,734,734),(735,735,735), +(736,736,736),(737,737,737),(738,738,738),(739,739,739),(740,740,740), +(741,741,741),(742,742,742),(743,743,743),(744,744,744),(745,745,745), +(746,746,746),(747,747,747),(748,748,748),(749,749,749),(750,750,750), +(751,751,751),(752,752,752),(753,753,753),(754,754,754),(755,755,755), +(756,756,756),(757,757,757),(758,758,758),(759,759,759),(760,760,760), +(761,761,761),(762,762,762),(763,763,763),(764,764,764),(765,765,765), +(766,766,766),(767,767,767),(768,768,768),(769,769,769),(770,770,770), +(771,771,771),(772,772,772),(773,773,773),(774,774,774),(775,775,775), +(776,776,776),(777,777,777),(778,778,778),(779,779,779),(780,780,780), +(781,781,781),(782,782,782),(783,783,783),(784,784,784),(785,785,785), +(786,786,786),(787,787,787),(788,788,788),(789,789,789),(790,790,790), +(791,791,791),(792,792,792),(793,793,793),(794,794,794),(795,795,795), +(796,796,796),(797,797,797),(798,798,798),(799,799,799),(800,800,800), +(801,801,801),(802,802,802),(803,803,803),(804,804,804),(805,805,805), +(806,806,806),(807,807,807),(808,808,808),(809,809,809),(810,810,810), +(811,811,811),(812,812,812),(813,813,813),(814,814,814),(815,815,815), +(816,816,816),(817,817,817),(818,818,818),(819,819,819),(820,820,820), +(821,821,821),(822,822,822),(823,823,823),(824,824,824),(825,825,825), +(826,826,826),(827,827,827),(828,828,828),(829,829,829),(830,830,830), +(831,831,831),(832,832,832),(833,833,833),(834,834,834),(835,835,835), +(836,836,836),(837,837,837),(838,838,838),(839,839,839),(840,840,840), +(841,841,841),(842,842,842),(843,843,843),(844,844,844),(845,845,845), +(846,846,846),(847,847,847),(848,848,848),(849,849,849),(850,850,850), +(851,851,851),(852,852,852),(853,853,853),(854,854,854),(855,855,855), +(856,856,856),(857,857,857),(858,858,858),(859,859,859),(860,860,860), +(861,861,861),(862,862,862),(863,863,863),(864,864,864),(865,865,865), +(866,866,866),(867,867,867),(868,868,868),(869,869,869),(870,870,870), +(871,871,871),(872,872,872),(873,873,873),(874,874,874),(875,875,875), +(876,876,876),(877,877,877),(878,878,878),(879,879,879),(880,880,880), +(881,881,881),(882,882,882),(883,883,883),(884,884,884),(885,885,885), +(886,886,886),(887,887,887),(888,888,888),(889,889,889),(890,890,890), +(891,891,891),(892,892,892),(893,893,893),(894,894,894),(895,895,895), +(896,896,896),(897,897,897),(898,898,898),(899,899,899),(900,900,900), +(901,901,901),(902,902,902),(903,903,903),(904,904,904),(905,905,905), +(906,906,906),(907,907,907),(908,908,908),(909,909,909),(910,910,910), +(911,911,911),(912,912,912),(913,913,913),(914,914,914),(915,915,915), +(916,916,916),(917,917,917),(918,918,918),(919,919,919),(920,920,920), +(921,921,921),(922,922,922),(923,923,923),(924,924,924),(925,925,925), +(926,926,926),(927,927,927),(928,928,928),(929,929,929),(930,930,930), +(931,931,931),(932,932,932),(933,933,933),(934,934,934),(935,935,935), +(936,936,936),(937,937,937),(938,938,938),(939,939,939),(940,940,940), +(941,941,941),(942,942,942),(943,943,943),(944,944,944),(945,945,945), +(946,946,946),(947,947,947),(948,948,948),(949,949,949),(950,950,950), +(951,951,951),(952,952,952),(953,953,953),(954,954,954),(955,955,955), +(956,956,956),(957,957,957),(958,958,958),(959,959,959),(960,960,960), +(961,961,961),(962,962,962),(963,963,963),(964,964,964),(965,965,965), +(966,966,966),(967,967,967),(968,968,968),(969,969,969),(970,970,970), +(971,971,971),(972,972,972),(973,973,973),(974,974,974),(975,975,975), +(976,976,976),(977,977,977),(978,978,978),(979,979,979),(980,980,980), +(981,981,981),(982,982,982),(983,983,983),(984,984,984),(985,985,985), +(986,986,986),(987,987,987),(988,988,988),(989,989,989),(990,990,990), +(991,991,991),(992,992,992),(993,993,993),(994,994,994),(995,995,995), +(996,996,996),(997,997,997),(998,998,998),(999,999,999),(1000,1000,1000), +(1001,1001,1001),(1002,1002,1002),(1003,1003,1003),(1004,1004,1004),(1005,1005,1005), +(1006,1006,1006),(1007,1007,1007),(1008,1008,1008),(1009,1009,1009),(1010,1010,1010), +(1011,1011,1011),(1012,1012,1012),(1013,1013,1013),(1014,1014,1014),(1015,1015,1015), +(1016,1016,1016),(1017,1017,1017),(1018,1018,1018),(1019,1019,1019),(1020,1020,1020), +(1021,1021,1021),(1022,1022,1022),(1023,1023,1023),(1024,1024,1024),(1025,1025,1025), +(1026,1026,1026),(1027,1027,1027),(1028,1028,1028),(1029,1029,1029),(1030,1030,1030), +(1031,1031,1031),(1032,1032,1032),(1033,1033,1033),(1034,1034,1034),(1035,1035,1035), +(1036,1036,1036),(1037,1037,1037),(1038,1038,1038),(1039,1039,1039),(1040,1040,1040), +(1041,1041,1041),(1042,1042,1042),(1043,1043,1043),(1044,1044,1044),(1045,1045,1045), +(1046,1046,1046),(1047,1047,1047),(1048,1048,1048),(1049,1049,1049),(1050,1050,1050), +(1051,1051,1051),(1052,1052,1052),(1053,1053,1053),(1054,1054,1054),(1055,1055,1055), +(1056,1056,1056),(1057,1057,1057),(1058,1058,1058),(1059,1059,1059),(1060,1060,1060), +(1061,1061,1061),(1062,1062,1062),(1063,1063,1063),(1064,1064,1064),(1065,1065,1065), +(1066,1066,1066),(1067,1067,1067),(1068,1068,1068),(1069,1069,1069),(1070,1070,1070), +(1071,1071,1071),(1072,1072,1072),(1073,1073,1073),(1074,1074,1074),(1075,1075,1075), +(1076,1076,1076),(1077,1077,1077),(1078,1078,1078),(1079,1079,1079),(1080,1080,1080), +(1081,1081,1081),(1082,1082,1082),(1083,1083,1083),(1084,1084,1084),(1085,1085,1085), +(1086,1086,1086),(1087,1087,1087),(1088,1088,1088),(1089,1089,1089),(1090,1090,1090), +(1091,1091,1091),(1092,1092,1092),(1093,1093,1093),(1094,1094,1094),(1095,1095,1095), +(1096,1096,1096),(1097,1097,1097),(1098,1098,1098),(1099,1099,1099),(1100,1100,1100), +(1101,1101,1101),(1102,1102,1102),(1103,1103,1103),(1104,1104,1104),(1105,1105,1105), +(1106,1106,1106),(1107,1107,1107),(1108,1108,1108),(1109,1109,1109),(1110,1110,1110), +(1111,1111,1111),(1112,1112,1112),(1113,1113,1113),(1114,1114,1114),(1115,1115,1115), +(1116,1116,1116),(1117,1117,1117),(1118,1118,1118),(1119,1119,1119),(1120,1120,1120), +(1121,1121,1121),(1122,1122,1122),(1123,1123,1123),(1124,1124,1124),(1125,1125,1125), +(1126,1126,1126),(1127,1127,1127),(1128,1128,1128),(1129,1129,1129),(1130,1130,1130), +(1131,1131,1131),(1132,1132,1132),(1133,1133,1133),(1134,1134,1134),(1135,1135,1135), +(1136,1136,1136),(1137,1137,1137),(1138,1138,1138),(1139,1139,1139),(1140,1140,1140), +(1141,1141,1141),(1142,1142,1142),(1143,1143,1143),(1144,1144,1144),(1145,1145,1145), +(1146,1146,1146),(1147,1147,1147),(1148,1148,1148),(1149,1149,1149),(1150,1150,1150), +(1151,1151,1151),(1152,1152,1152),(1153,1153,1153),(1154,1154,1154),(1155,1155,1155), +(1156,1156,1156),(1157,1157,1157),(1158,1158,1158),(1159,1159,1159),(1160,1160,1160), +(1161,1161,1161),(1162,1162,1162),(1163,1163,1163),(1164,1164,1164),(1165,1165,1165), +(1166,1166,1166),(1167,1167,1167),(1168,1168,1168),(1169,1169,1169),(1170,1170,1170), +(1171,1171,1171),(1172,1172,1172),(1173,1173,1173),(1174,1174,1174),(1175,1175,1175), +(1176,1176,1176),(1177,1177,1177),(1178,1178,1178),(1179,1179,1179),(1180,1180,1180), +(1181,1181,1181),(1182,1182,1182),(1183,1183,1183),(1184,1184,1184),(1185,1185,1185), +(1186,1186,1186),(1187,1187,1187),(1188,1188,1188),(1189,1189,1189),(1190,1190,1190), +(1191,1191,1191),(1192,1192,1192),(1193,1193,1193),(1194,1194,1194),(1195,1195,1195), +(1196,1196,1196),(1197,1197,1197),(1198,1198,1198),(1199,1199,1199),(1200,1200,1200), +(1201,1201,1201),(1202,1202,1202),(1203,1203,1203),(1204,1204,1204),(1205,1205,1205), +(1206,1206,1206),(1207,1207,1207),(1208,1208,1208),(1209,1209,1209),(1210,1210,1210), +(1211,1211,1211),(1212,1212,1212),(1213,1213,1213),(1214,1214,1214),(1215,1215,1215), +(1216,1216,1216),(1217,1217,1217),(1218,1218,1218),(1219,1219,1219),(1220,1220,1220), +(1221,1221,1221),(1222,1222,1222),(1223,1223,1223),(1224,1224,1224),(1225,1225,1225), +(1226,1226,1226),(1227,1227,1227),(1228,1228,1228),(1229,1229,1229),(1230,1230,1230), +(1231,1231,1231),(1232,1232,1232),(1233,1233,1233),(1234,1234,1234),(1235,1235,1235), +(1236,1236,1236),(1237,1237,1237),(1238,1238,1238),(1239,1239,1239),(1240,1240,1240), +(1241,1241,1241),(1242,1242,1242),(1243,1243,1243),(1244,1244,1244),(1245,1245,1245), +(1246,1246,1246),(1247,1247,1247),(1248,1248,1248),(1249,1249,1249),(1250,1250,1250), +(1251,1251,1251),(1252,1252,1252),(1253,1253,1253),(1254,1254,1254),(1255,1255,1255), +(1256,1256,1256),(1257,1257,1257),(1258,1258,1258),(1259,1259,1259),(1260,1260,1260), +(1261,1261,1261),(1262,1262,1262),(1263,1263,1263),(1264,1264,1264),(1265,1265,1265), +(1266,1266,1266),(1267,1267,1267),(1268,1268,1268),(1269,1269,1269),(1270,1270,1270), +(1271,1271,1271),(1272,1272,1272),(1273,1273,1273),(1274,1274,1274),(1275,1275,1275), +(1276,1276,1276),(1277,1277,1277),(1278,1278,1278),(1279,1279,1279),(1280,1280,1280), +(1281,1281,1281),(1282,1282,1282),(1283,1283,1283),(1284,1284,1284),(1285,1285,1285), +(1286,1286,1286),(1287,1287,1287),(1288,1288,1288),(1289,1289,1289),(1290,1290,1290), +(1291,1291,1291),(1292,1292,1292),(1293,1293,1293),(1294,1294,1294),(1295,1295,1295), +(1296,1296,1296),(1297,1297,1297),(1298,1298,1298),(1299,1299,1299),(1300,1300,1300), +(1301,1301,1301),(1302,1302,1302),(1303,1303,1303),(1304,1304,1304),(1305,1305,1305), +(1306,1306,1306),(1307,1307,1307),(1308,1308,1308),(1309,1309,1309),(1310,1310,1310), +(1311,1311,1311),(1312,1312,1312),(1313,1313,1313),(1314,1314,1314),(1315,1315,1315), +(1316,1316,1316),(1317,1317,1317),(1318,1318,1318),(1319,1319,1319),(1320,1320,1320), +(1321,1321,1321),(1322,1322,1322),(1323,1323,1323),(1324,1324,1324),(1325,1325,1325), +(1326,1326,1326),(1327,1327,1327),(1328,1328,1328),(1329,1329,1329),(1330,1330,1330), +(1331,1331,1331),(1332,1332,1332),(1333,1333,1333),(1334,1334,1334),(1335,1335,1335), +(1336,1336,1336),(1337,1337,1337),(1338,1338,1338),(1339,1339,1339),(1340,1340,1340), +(1341,1341,1341),(1342,1342,1342),(1343,1343,1343),(1344,1344,1344),(1345,1345,1345), +(1346,1346,1346),(1347,1347,1347),(1348,1348,1348),(1349,1349,1349),(1350,1350,1350), +(1351,1351,1351),(1352,1352,1352),(1353,1353,1353),(1354,1354,1354),(1355,1355,1355), +(1356,1356,1356),(1357,1357,1357),(1358,1358,1358),(1359,1359,1359),(1360,1360,1360), +(1361,1361,1361),(1362,1362,1362),(1363,1363,1363),(1364,1364,1364),(1365,1365,1365), +(1366,1366,1366),(1367,1367,1367),(1368,1368,1368),(1369,1369,1369),(1370,1370,1370), +(1371,1371,1371),(1372,1372,1372),(1373,1373,1373),(1374,1374,1374),(1375,1375,1375), +(1376,1376,1376),(1377,1377,1377),(1378,1378,1378),(1379,1379,1379),(1380,1380,1380), +(1381,1381,1381),(1382,1382,1382),(1383,1383,1383),(1384,1384,1384),(1385,1385,1385), +(1386,1386,1386),(1387,1387,1387),(1388,1388,1388),(1389,1389,1389),(1390,1390,1390), +(1391,1391,1391),(1392,1392,1392),(1393,1393,1393),(1394,1394,1394),(1395,1395,1395), +(1396,1396,1396),(1397,1397,1397),(1398,1398,1398),(1399,1399,1399),(1400,1400,1400), +(1401,1401,1401),(1402,1402,1402),(1403,1403,1403),(1404,1404,1404),(1405,1405,1405), +(1406,1406,1406),(1407,1407,1407),(1408,1408,1408),(1409,1409,1409),(1410,1410,1410), +(1411,1411,1411),(1412,1412,1412),(1413,1413,1413),(1414,1414,1414),(1415,1415,1415), +(1416,1416,1416),(1417,1417,1417),(1418,1418,1418),(1419,1419,1419),(1420,1420,1420), +(1421,1421,1421),(1422,1422,1422),(1423,1423,1423),(1424,1424,1424),(1425,1425,1425), +(1426,1426,1426),(1427,1427,1427),(1428,1428,1428),(1429,1429,1429),(1430,1430,1430), +(1431,1431,1431),(1432,1432,1432),(1433,1433,1433),(1434,1434,1434),(1435,1435,1435), +(1436,1436,1436),(1437,1437,1437),(1438,1438,1438),(1439,1439,1439),(1440,1440,1440), +(1441,1441,1441),(1442,1442,1442),(1443,1443,1443),(1444,1444,1444),(1445,1445,1445), +(1446,1446,1446),(1447,1447,1447),(1448,1448,1448),(1449,1449,1449),(1450,1450,1450), +(1451,1451,1451),(1452,1452,1452),(1453,1453,1453),(1454,1454,1454),(1455,1455,1455), +(1456,1456,1456),(1457,1457,1457),(1458,1458,1458),(1459,1459,1459),(1460,1460,1460), +(1461,1461,1461),(1462,1462,1462),(1463,1463,1463),(1464,1464,1464),(1465,1465,1465), +(1466,1466,1466),(1467,1467,1467),(1468,1468,1468),(1469,1469,1469),(1470,1470,1470), +(1471,1471,1471),(1472,1472,1472),(1473,1473,1473),(1474,1474,1474),(1475,1475,1475), +(1476,1476,1476),(1477,1477,1477),(1478,1478,1478),(1479,1479,1479),(1480,1480,1480), +(1481,1481,1481),(1482,1482,1482),(1483,1483,1483),(1484,1484,1484),(1485,1485,1485), +(1486,1486,1486),(1487,1487,1487),(1488,1488,1488),(1489,1489,1489),(1490,1490,1490), +(1491,1491,1491),(1492,1492,1492),(1493,1493,1493),(1494,1494,1494),(1495,1495,1495), +(1496,1496,1496),(1497,1497,1497),(1498,1498,1498),(1499,1499,1499),(1500,1500,1500), +(1501,1501,1501),(1502,1502,1502),(1503,1503,1503),(1504,1504,1504),(1505,1505,1505), +(1506,1506,1506),(1507,1507,1507),(1508,1508,1508),(1509,1509,1509),(1510,1510,1510), +(1511,1511,1511),(1512,1512,1512),(1513,1513,1513),(1514,1514,1514),(1515,1515,1515), +(1516,1516,1516),(1517,1517,1517),(1518,1518,1518),(1519,1519,1519),(1520,1520,1520), +(1521,1521,1521),(1522,1522,1522),(1523,1523,1523),(1524,1524,1524),(1525,1525,1525), +(1526,1526,1526),(1527,1527,1527),(1528,1528,1528),(1529,1529,1529),(1530,1530,1530), +(1531,1531,1531),(1532,1532,1532),(1533,1533,1533),(1534,1534,1534),(1535,1535,1535), +(1536,1536,1536),(1537,1537,1537),(1538,1538,1538),(1539,1539,1539),(1540,1540,1540), +(1541,1541,1541),(1542,1542,1542),(1543,1543,1543),(1544,1544,1544),(1545,1545,1545), +(1546,1546,1546),(1547,1547,1547),(1548,1548,1548),(1549,1549,1549),(1550,1550,1550), +(1551,1551,1551),(1552,1552,1552),(1553,1553,1553),(1554,1554,1554),(1555,1555,1555), +(1556,1556,1556),(1557,1557,1557),(1558,1558,1558),(1559,1559,1559),(1560,1560,1560), +(1561,1561,1561),(1562,1562,1562),(1563,1563,1563),(1564,1564,1564),(1565,1565,1565), +(1566,1566,1566),(1567,1567,1567),(1568,1568,1568),(1569,1569,1569),(1570,1570,1570), +(1571,1571,1571),(1572,1572,1572),(1573,1573,1573),(1574,1574,1574),(1575,1575,1575), +(1576,1576,1576),(1577,1577,1577),(1578,1578,1578),(1579,1579,1579),(1580,1580,1580), +(1581,1581,1581),(1582,1582,1582),(1583,1583,1583),(1584,1584,1584),(1585,1585,1585), +(1586,1586,1586),(1587,1587,1587),(1588,1588,1588),(1589,1589,1589),(1590,1590,1590), +(1591,1591,1591),(1592,1592,1592),(1593,1593,1593),(1594,1594,1594),(1595,1595,1595), +(1596,1596,1596),(1597,1597,1597),(1598,1598,1598),(1599,1599,1599),(1600,1600,1600), +(1601,1601,1601),(1602,1602,1602),(1603,1603,1603),(1604,1604,1604),(1605,1605,1605), +(1606,1606,1606),(1607,1607,1607),(1608,1608,1608),(1609,1609,1609),(1610,1610,1610), +(1611,1611,1611),(1612,1612,1612),(1613,1613,1613),(1614,1614,1614),(1615,1615,1615), +(1616,1616,1616),(1617,1617,1617),(1618,1618,1618),(1619,1619,1619),(1620,1620,1620), +(1621,1621,1621),(1622,1622,1622),(1623,1623,1623),(1624,1624,1624),(1625,1625,1625), +(1626,1626,1626),(1627,1627,1627),(1628,1628,1628),(1629,1629,1629),(1630,1630,1630), +(1631,1631,1631),(1632,1632,1632),(1633,1633,1633),(1634,1634,1634),(1635,1635,1635), +(1636,1636,1636),(1637,1637,1637),(1638,1638,1638),(1639,1639,1639),(1640,1640,1640), +(1641,1641,1641),(1642,1642,1642),(1643,1643,1643),(1644,1644,1644),(1645,1645,1645), +(1646,1646,1646),(1647,1647,1647),(1648,1648,1648),(1649,1649,1649),(1650,1650,1650), +(1651,1651,1651),(1652,1652,1652),(1653,1653,1653),(1654,1654,1654),(1655,1655,1655), +(1656,1656,1656),(1657,1657,1657),(1658,1658,1658),(1659,1659,1659),(1660,1660,1660), +(1661,1661,1661),(1662,1662,1662),(1663,1663,1663),(1664,1664,1664),(1665,1665,1665), +(1666,1666,1666),(1667,1667,1667),(1668,1668,1668),(1669,1669,1669),(1670,1670,1670), +(1671,1671,1671),(1672,1672,1672),(1673,1673,1673),(1674,1674,1674),(1675,1675,1675), +(1676,1676,1676),(1677,1677,1677),(1678,1678,1678),(1679,1679,1679),(1680,1680,1680), +(1681,1681,1681),(1682,1682,1682),(1683,1683,1683),(1684,1684,1684),(1685,1685,1685), +(1686,1686,1686),(1687,1687,1687),(1688,1688,1688),(1689,1689,1689),(1690,1690,1690), +(1691,1691,1691),(1692,1692,1692),(1693,1693,1693),(1694,1694,1694),(1695,1695,1695), +(1696,1696,1696),(1697,1697,1697),(1698,1698,1698),(1699,1699,1699),(1700,1700,1700), +(1701,1701,1701),(1702,1702,1702),(1703,1703,1703),(1704,1704,1704),(1705,1705,1705), +(1706,1706,1706),(1707,1707,1707),(1708,1708,1708),(1709,1709,1709),(1710,1710,1710), +(1711,1711,1711),(1712,1712,1712),(1713,1713,1713),(1714,1714,1714),(1715,1715,1715), +(1716,1716,1716),(1717,1717,1717),(1718,1718,1718),(1719,1719,1719),(1720,1720,1720), +(1721,1721,1721),(1722,1722,1722),(1723,1723,1723),(1724,1724,1724),(1725,1725,1725), +(1726,1726,1726),(1727,1727,1727),(1728,1728,1728),(1729,1729,1729),(1730,1730,1730), +(1731,1731,1731),(1732,1732,1732),(1733,1733,1733),(1734,1734,1734),(1735,1735,1735), +(1736,1736,1736),(1737,1737,1737),(1738,1738,1738),(1739,1739,1739),(1740,1740,1740), +(1741,1741,1741),(1742,1742,1742),(1743,1743,1743),(1744,1744,1744),(1745,1745,1745), +(1746,1746,1746),(1747,1747,1747),(1748,1748,1748),(1749,1749,1749),(1750,1750,1750), +(1751,1751,1751),(1752,1752,1752),(1753,1753,1753),(1754,1754,1754),(1755,1755,1755), +(1756,1756,1756),(1757,1757,1757),(1758,1758,1758),(1759,1759,1759),(1760,1760,1760), +(1761,1761,1761),(1762,1762,1762),(1763,1763,1763),(1764,1764,1764),(1765,1765,1765), +(1766,1766,1766),(1767,1767,1767),(1768,1768,1768),(1769,1769,1769),(1770,1770,1770), +(1771,1771,1771),(1772,1772,1772),(1773,1773,1773),(1774,1774,1774),(1775,1775,1775), +(1776,1776,1776),(1777,1777,1777),(1778,1778,1778),(1779,1779,1779),(1780,1780,1780), +(1781,1781,1781),(1782,1782,1782),(1783,1783,1783),(1784,1784,1784),(1785,1785,1785), +(1786,1786,1786),(1787,1787,1787),(1788,1788,1788),(1789,1789,1789),(1790,1790,1790), +(1791,1791,1791),(1792,1792,1792),(1793,1793,1793),(1794,1794,1794),(1795,1795,1795), +(1796,1796,1796),(1797,1797,1797),(1798,1798,1798),(1799,1799,1799),(1800,1800,1800), +(1801,1801,1801),(1802,1802,1802),(1803,1803,1803),(1804,1804,1804),(1805,1805,1805), +(1806,1806,1806),(1807,1807,1807),(1808,1808,1808),(1809,1809,1809),(1810,1810,1810), +(1811,1811,1811),(1812,1812,1812),(1813,1813,1813),(1814,1814,1814),(1815,1815,1815), +(1816,1816,1816),(1817,1817,1817),(1818,1818,1818),(1819,1819,1819),(1820,1820,1820), +(1821,1821,1821),(1822,1822,1822),(1823,1823,1823),(1824,1824,1824),(1825,1825,1825), +(1826,1826,1826),(1827,1827,1827),(1828,1828,1828),(1829,1829,1829),(1830,1830,1830), +(1831,1831,1831),(1832,1832,1832),(1833,1833,1833),(1834,1834,1834),(1835,1835,1835), +(1836,1836,1836),(1837,1837,1837),(1838,1838,1838),(1839,1839,1839),(1840,1840,1840), +(1841,1841,1841),(1842,1842,1842),(1843,1843,1843),(1844,1844,1844),(1845,1845,1845), +(1846,1846,1846),(1847,1847,1847),(1848,1848,1848),(1849,1849,1849),(1850,1850,1850), +(1851,1851,1851),(1852,1852,1852),(1853,1853,1853),(1854,1854,1854),(1855,1855,1855), +(1856,1856,1856),(1857,1857,1857),(1858,1858,1858),(1859,1859,1859),(1860,1860,1860), +(1861,1861,1861),(1862,1862,1862),(1863,1863,1863),(1864,1864,1864),(1865,1865,1865), +(1866,1866,1866),(1867,1867,1867),(1868,1868,1868),(1869,1869,1869),(1870,1870,1870), +(1871,1871,1871),(1872,1872,1872),(1873,1873,1873),(1874,1874,1874),(1875,1875,1875), +(1876,1876,1876),(1877,1877,1877),(1878,1878,1878),(1879,1879,1879),(1880,1880,1880), +(1881,1881,1881),(1882,1882,1882),(1883,1883,1883),(1884,1884,1884),(1885,1885,1885), +(1886,1886,1886),(1887,1887,1887),(1888,1888,1888),(1889,1889,1889),(1890,1890,1890), +(1891,1891,1891),(1892,1892,1892),(1893,1893,1893),(1894,1894,1894),(1895,1895,1895), +(1896,1896,1896),(1897,1897,1897),(1898,1898,1898),(1899,1899,1899),(1900,1900,1900), +(1901,1901,1901),(1902,1902,1902),(1903,1903,1903),(1904,1904,1904),(1905,1905,1905), +(1906,1906,1906),(1907,1907,1907),(1908,1908,1908),(1909,1909,1909),(1910,1910,1910), +(1911,1911,1911),(1912,1912,1912),(1913,1913,1913),(1914,1914,1914),(1915,1915,1915), +(1916,1916,1916),(1917,1917,1917),(1918,1918,1918),(1919,1919,1919),(1920,1920,1920), +(1921,1921,1921),(1922,1922,1922),(1923,1923,1923),(1924,1924,1924),(1925,1925,1925), +(1926,1926,1926),(1927,1927,1927),(1928,1928,1928),(1929,1929,1929),(1930,1930,1930), +(1931,1931,1931),(1932,1932,1932),(1933,1933,1933),(1934,1934,1934),(1935,1935,1935), +(1936,1936,1936),(1937,1937,1937),(1938,1938,1938),(1939,1939,1939),(1940,1940,1940), +(1941,1941,1941),(1942,1942,1942),(1943,1943,1943),(1944,1944,1944),(1945,1945,1945), +(1946,1946,1946),(1947,1947,1947),(1948,1948,1948),(1949,1949,1949),(1950,1950,1950), +(1951,1951,1951),(1952,1952,1952),(1953,1953,1953),(1954,1954,1954),(1955,1955,1955), +(1956,1956,1956),(1957,1957,1957),(1958,1958,1958),(1959,1959,1959),(1960,1960,1960), +(1961,1961,1961),(1962,1962,1962),(1963,1963,1963),(1964,1964,1964),(1965,1965,1965), +(1966,1966,1966),(1967,1967,1967),(1968,1968,1968),(1969,1969,1969),(1970,1970,1970), +(1971,1971,1971),(1972,1972,1972),(1973,1973,1973),(1974,1974,1974),(1975,1975,1975), +(1976,1976,1976),(1977,1977,1977),(1978,1978,1978),(1979,1979,1979),(1980,1980,1980), +(1981,1981,1981),(1982,1982,1982),(1983,1983,1983),(1984,1984,1984),(1985,1985,1985), +(1986,1986,1986),(1987,1987,1987),(1988,1988,1988),(1989,1989,1989),(1990,1990,1990), +(1991,1991,1991),(1992,1992,1992),(1993,1993,1993),(1994,1994,1994),(1995,1995,1995), +(1996,1996,1996),(1997,1997,1997),(1998,1998,1998),(1999,1999,1999); +SELECT COUNT(*) FROM t1; +COUNT(*) +2000 +INSERT INTO t1 VALUES (1,1,1); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); +ERROR 23000: Can't write; duplicate key in table 't1' +select count(*) from t1; +count(*) +2000 +begin; +SELECT COUNT(*) FROM t1; +COUNT(*) +2000 +INSERT INTO t1 VALUES +(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005); +SELECT COUNT(*) FROM t1; +COUNT(*) +2005 +rollback; +begin; +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); +ERROR 23000: Can't write; duplicate key in table 't1' +commit; +ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER +select * from t1 where pk1=1; +pk1 b c +1 1 1 +select * from t1 where pk1=10; +pk1 b c +10 10 10 +select count(*) from t1 where pk1 <= 10 order by pk1; +count(*) +11 +select count(*) from t1; +count(*) +2000 +begin; +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); +ERROR 23000: Can't write; duplicate key in table 't1' +rollback; +select * from t1 where pk1=1; +pk1 b c +1 1 1 +select * from t1 where pk1=10; +pk1 b c +10 10 10 +select count(*) from t1 where pk1 <= 10 order by pk1; +count(*) +11 +select count(*) from t1; +count(*) +2000 +begin; +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); +ERROR 23000: Can't write; duplicate key in table 't1' +SELECT * FROM t1 WHERE pk1=10; +ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER +rollback; +select * from t1 where pk1=1; +pk1 b c +1 1 1 +select * from t1 where pk1=10; +pk1 b c +10 10 10 +select count(*) from t1 where pk1 <= 10 order by pk1; +count(*) +11 +select count(*) from t1; +count(*) +2000 +begin; +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); +ERROR 23000: Can't write; duplicate key in table 't1' +SELECT * FROM t1 WHERE pk1=10; +ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER +SELECT * FROM t1 WHERE pk1=10; +ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER +commit; +ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER +select * from t1 where pk1=1; +pk1 b c +1 1 1 +select * from t1 where pk1=10; +pk1 b c +10 10 10 +select count(*) from t1 where pk1 <= 10 order by pk1; +count(*) +11 +select count(*) from t1; +count(*) +2000 +begin; +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); +ERROR 23000: Can't write; duplicate key in table 't1' +INSERT INTO t1 values (4000, 40, 44); +ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER +rollback; +select * from t1 where pk1=1; +pk1 b c +1 1 1 +select * from t1 where pk1=10; +pk1 b c +10 10 10 +select count(*) from t1 where pk1 <= 10 order by pk1; +count(*) +11 +select count(*) from t1; +count(*) +2000 +insert into t1 select * from t1 where b < 10 order by pk1; +ERROR 23000: Can't write; duplicate key in table 't1' +DELETE FROM t1 WHERE pk1=2; +begin; +INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); +select * from t1 where pk1 < 3 order by pk1; +pk1 b c +0 0 0 +1 1 1 +2 3 4 +rollback; +INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); +select * from t1 where pk1 < 3 order by pk1; +pk1 b c +0 0 0 +1 1 1 +2 3 4 +REPLACE INTO t1 values(1, 78, 3); +select * from t1 where pk1=1; +pk1 b c +1 78 3 +INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79; +select * from t1 where pk1 < 4 order by pk1; +pk1 b c +0 0 0 +1 79 3 +2 3 4 +3 79 3 +INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c; +select * from t1 where pk1 < 4 order by pk1; +pk1 b c +0 0 0 +1 4 3 +2 3 4 +3 6 3 +DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6; +INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b; +select * from t1 where pk1 = b and b != c order by pk1; +pk1 b c +2 2 17 +4 4 3 +6 6 3 +DELETE FROM t1; +CREATE UNIQUE INDEX bi ON t1(b); +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); +INSERT INTO t1 VALUES(0,1,0),(21,21,21) ON DUPLICATE KEY UPDATE pk1=b+10,b=b+10; +select * from t1 order by pk1; +pk1 b c +2 2 2 +3 3 3 +4 4 4 +5 5 5 +6 6 6 +7 7 7 +8 8 8 +9 9 9 +10 10 10 +11 11 1 +21 21 21 +DROP TABLE t1; +CREATE TABLE t1(a INT) ENGINE=ndb; +INSERT IGNORE INTO t1 VALUES (1); +INSERT IGNORE INTO t1 VALUES (1); +INSERT IGNORE INTO t1 SELECT a FROM t1; +INSERT IGNORE INTO t1 SELECT a FROM t1; +INSERT IGNORE INTO t1 SELECT a FROM t1; +INSERT IGNORE INTO t1 VALUES (1); +INSERT IGNORE INTO t1 VALUES (1); +SELECT * FROM t1 ORDER BY a; +a +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +DELETE FROM t1; +CREATE UNIQUE INDEX ai ON t1(a); +INSERT IGNORE INTO t1 VALUES (1); +INSERT IGNORE INTO t1 VALUES (1); +INSERT IGNORE INTO t1 VALUES (NULL),(2); +SELECT * FROM t1 ORDER BY a; +a +NULL +1 +2 +DROP TABLE t1; +CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb; +INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3); +INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4); +SELECT * FROM t1 ORDER BY pk; +pk a +1 1 +2 2 +3 3 +4 NULL +5 NULL +6 NULL +7 4 +DROP TABLE t1; +create table t1(a int primary key, b int, unique key(b)) engine=ndb; +insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); +select * from t1 order by a; +a b +1 0 +2 NULL +3 NULL +drop table t1; +CREATE TABLE t1 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER; +CREATE TABLE t2 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=MYISAM; +SET @@session.auto_increment_increment=10; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +pk b c +1 1 0 +11 2 1 +21 3 2 +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +COUNT(t1.pk) +3 +TRUNCATE t1; +TRUNCATE t2; +SET @@session.auto_increment_offset=5; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); +SELECT * FROM t1 ORDER BY pk; +pk b c +5 1 0 +15 2 1 +25 3 2 +27 4 3 +35 5 4 +99 6 5 +105 7 6 +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +COUNT(t1.pk) +7 +TRUNCATE t1; +TRUNCATE t2; +SET @@session.auto_increment_increment=2; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +pk b c +1 1 0 +3 2 1 +5 3 2 +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +COUNT(t1.pk) +3 +DROP TABLE t1, t2; +CREATE TABLE t1 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; +CREATE TABLE t2 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=MYISAM AUTO_INCREMENT = 7; +SET @@session.auto_increment_offset=1; +SET @@session.auto_increment_increment=1; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +pk b c +7 1 0 +8 2 1 +9 3 2 +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +COUNT(t1.pk) +3 +DROP TABLE t1, t2; +CREATE TABLE t1 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3; +CREATE TABLE t2 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=MYISAM AUTO_INCREMENT = 3; +SET @@session.auto_increment_offset=5; +SET @@session.auto_increment_increment=10; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +pk b c +5 1 0 +15 2 1 +25 3 2 +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +COUNT(t1.pk) +3 +DROP TABLE t1, t2; +CREATE TABLE t1 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; +CREATE TABLE t2 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=MYISAM AUTO_INCREMENT = 7; +SET @@session.auto_increment_offset=5; +SET @@session.auto_increment_increment=10; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +pk b c +15 1 0 +25 2 1 +35 3 2 +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +COUNT(t1.pk) +3 +DROP TABLE t1, t2; +CREATE TABLE t1 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5; +CREATE TABLE t2 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=MYISAM AUTO_INCREMENT = 5; +SET @@session.auto_increment_offset=5; +SET @@session.auto_increment_increment=10; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +pk b c +5 1 0 +15 2 1 +25 3 2 +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +COUNT(t1.pk) +3 +DROP TABLE t1, t2; +CREATE TABLE t1 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100; +CREATE TABLE t2 ( +pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=MYISAM AUTO_INCREMENT = 100; +SET @@session.auto_increment_offset=5; +SET @@session.auto_increment_increment=10; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +pk b c +105 1 0 +115 2 1 +125 3 2 +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +COUNT(t1.pk) +3 +DROP TABLE t1, t2; diff --git a/mysql-test/suite/ndb/r/ndb_limit.result b/mysql-test/suite/ndb/r/ndb_limit.result new file mode 100644 index 00000000000..da1ec3b61c3 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_limit.result @@ -0,0 +1,72 @@ +DROP TABLE IF EXISTS t2; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +select count(*) from t2; +count(*) +10000 +delete from t2 limit 1; +select count(*) from t2; +count(*) +9999 +delete from t2 limit 100; +select count(*) from t2; +count(*) +9899 +delete from t2 limit 1000; +select count(*) from t2; +count(*) +8899 +update t2 set c=12345678 limit 100; +select count(*) from t2 where c=12345678; +count(*) +100 +select count(*) from t2 where c=12345678 limit 1000; +count(*) +100 +select * from t2 limit 0; +a b c +drop table t2; +CREATE TABLE `t2` ( +`views` int(11) NOT NULL default '0', +`clicks` int(11) NOT NULL default '0', +`day` date NOT NULL default '0000-00-00', +`hour` tinyint(4) NOT NULL default '0', +`bannerid` smallint(6) NOT NULL default '0', +`zoneid` smallint(6) NOT NULL default '0', +`source` varchar(50) NOT NULL default '', +PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`), +KEY `bannerid_day` (`bannerid`,`day`), +KEY `zoneid` (`zoneid`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t2` VALUES +( 1,0,'2004-09-17', 5,100,100,''), +( 1,0,'2004-09-18', 7,100,100,''), +( 17,0,'2004-09-27',20,132,100,''), +( 4,0,'2004-09-16',23,132,100,''), +( 86,0,'2004-09-18', 7,196,196,''), +( 11,0,'2004-09-16',16,132,100,''), +(140,0,'2004-09-18', 0,100,164,''), +( 2,0,'2004-09-17', 7,132,100,''), +(846,0,'2004-09-27',11,132,164,''), +( 1,0,'2004-09-18', 8,132,100,''), +( 22,0,'2004-09-27', 9,164,132,''), +(711,0,'2004-09-27', 9,100,164,''), +( 11,0,'2004-09-18', 0,196,132,''), +( 41,0,'2004-09-27',15,196,132,''), +( 57,0,'2004-09-18', 2,164,196,''); +SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') +as date_formatted FROM t2 GROUP BY day ORDER BY day DESC; +date date_formatted +20040927 27-09-2004 +20040918 18-09-2004 +20040917 17-09-2004 +20040916 16-09-2004 +SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') +as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2; +date date_formatted +20040927 27-09-2004 +20040918 18-09-2004 +drop table t2; diff --git a/mysql-test/suite/ndb/r/ndb_load.result b/mysql-test/suite/ndb/r/ndb_load.result new file mode 100644 index 00000000000..416a350066b --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_load.result @@ -0,0 +1,80 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ; +ERROR 23000: Can't write; duplicate key in table 't1' +DROP TABLE t1; +CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ; +SELECT * FROM t1 ORDER BY word; +word +Aarhus +Aarhus +Aaron +Aaron +Ababa +Ababa +aback +aback +abaft +abaft +abandon +abandon +abandoned +abandoned +abandoning +abandoning +abandonment +abandonment +abandons +abandons +abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration +DROP TABLE t1; diff --git a/mysql-test/suite/ndb/r/ndb_loaddatalocal.result b/mysql-test/suite/ndb/r/ndb_loaddatalocal.result new file mode 100644 index 00000000000..1d15c608f03 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_loaddatalocal.result @@ -0,0 +1,46 @@ +DROP TABLE IF EXISTS t1; +create table t1(a int) engine=myisam; +select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; +drop table t1; +create table t1(a int) engine=ndb; +load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; +select count(*) from t1; +count(*) +10000 +drop table t1; +create table t1(a int) engine=myisam; +insert into t1 values (1), (2), (2), (3); +select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; +drop table t1; +create table t1(a int primary key) engine=ndb; +load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; +select * from t1 order by a; +a +1 +2 +3 +drop table t1; +create table t1(a int) engine=myisam; +insert into t1 values (1), (1), (2), (3); +select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; +drop table t1; +create table t1(a int primary key) engine=ndb; +load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; +select * from t1 order by a; +a +1 +2 +3 +drop table t1; +create table t1(a int) engine=myisam; +insert into t1 values (1), (2), (3), (3); +select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; +drop table t1; +create table t1(a int primary key) engine=ndb; +load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; +select * from t1 order by a; +a +1 +2 +3 +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_lock.result b/mysql-test/suite/ndb/r/ndb_lock.result new file mode 100644 index 00000000000..9057731c3f4 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_lock.result @@ -0,0 +1,200 @@ +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; +insert into t1 values (1,'one'), (2,'two'); +select * from t1 order by x; +x y +1 one +2 two +select * from t1 order by x; +x y +1 one +2 two +start transaction; +insert into t1 values (3,'three'); +select * from t1 order by x; +x y +1 one +2 two +3 three +start transaction; +select * from t1 order by x; +x y +1 one +2 two +commit; +select * from t1 order by x; +x y +1 one +2 two +3 three +commit; +drop table t1; +create table t1 (pk integer not null primary key, u int not null, o int not null, +unique(u), key(o)) engine = ndb; +insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); +lock tables t1 write; +delete from t1 where pk = 1; +unlock tables; +select * from t1 order by pk; +pk u o +2 2 2 +3 3 3 +4 4 4 +5 5 5 +insert into t1 values (1,1,1); +lock tables t1 write; +delete from t1 where u = 1; +unlock tables; +select * from t1 order by pk; +pk u o +2 2 2 +3 3 3 +4 4 4 +5 5 5 +insert into t1 values (1,1,1); +lock tables t1 write; +delete from t1 where o = 1; +unlock tables; +select * from t1 order by pk; +pk u o +2 2 2 +3 3 3 +4 4 4 +5 5 5 +insert into t1 values (1,1,1); +drop table t1; +create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb; +insert into t1 values (1,'one',1); +begin; +select * from t1 where x = 1 for update; +x y z +1 one 1 +begin; +select * from t1 where x = 1 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +rollback; +insert into t1 values (2,'two',2),(3,"three",3); +begin; +select * from t1 where x = 1 for update; +x y z +1 one 1 +select * from t1 where x = 1 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +select * from t1 where x = 2 for update; +x y z +2 two 2 +rollback; +commit; +begin; +select * from t1 where y = 'one' or y = 'three' for update; +x y z +# # # +# # # +begin; +select * from t1 where x = 2 for update; +x y z +2 two 2 +select * from t1 where x = 1 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +commit; +begin; +select * from t1 where y = 'one' or y = 'three' order by x for update; +x y z +1 one 1 +3 three 3 +begin; +select * from t1 where x = 2 for update; +x y z +2 two 2 +select * from t1 where x = 1 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +commit; +begin; +select * from t1 where z > 1 and z < 3 for update; +x y z +2 two 2 +begin; +select * from t1 where x = 1 for update; +x y z +1 one 1 +select * from t1 where x = 2 for update; +Got one of the listed errors +rollback; +commit; +begin; +select * from t1 where x = 1 lock in share mode; +x y z +1 one 1 +begin; +select * from t1 where x = 1 lock in share mode; +x y z +1 one 1 +select * from t1 where x = 2 for update; +x y z +2 two 2 +select * from t1 where x = 1 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +commit; +begin; +select * from t1 where y = 'one' or y = 'three' lock in share mode; +x y z +# # # +# # # +begin; +select * from t1 where y = 'one' lock in share mode; +x y z +1 one 1 +select * from t1 where x = 2 for update; +x y z +2 two 2 +select * from t1 where x = 1 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +commit; +begin; +select * from t1 where y = 'one' or y = 'three' order by x lock in share mode; +x y z +1 one 1 +3 three 3 +begin; +select * from t1 where y = 'one' lock in share mode; +x y z +1 one 1 +select * from t1 where x = 2 for update; +x y z +2 two 2 +select * from t1 where x = 1 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +commit; +begin; +select * from t1 where z > 1 and z < 3 lock in share mode; +x y z +2 two 2 +begin; +select * from t1 where z = 1 lock in share mode; +x y z +1 one 1 +select * from t1 where x = 1 for update; +x y z +1 one 1 +select * from t1 where x = 2 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +commit; +drop table t1; +create table t3 (id2 int) engine=ndb; +lock tables t3 write; +unlock tables; +drop table t3; +create table t2 (id int, j int) engine=ndb; +insert into t2 values (2, 2); +create table t3 (id int) engine=ndb; +lock tables t3 read; +delete t2 from t2, t3 where t2.id = t3.id; +unlock tables; +drop table t2, t3; diff --git a/mysql-test/suite/ndb/r/ndb_minmax.result b/mysql-test/suite/ndb/r/ndb_minmax.result new file mode 100644 index 00000000000..cc0c238ac6e --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_minmax.result @@ -0,0 +1,120 @@ +drop table if exists t1, t2; +CREATE TABLE t1 ( +a int PRIMARY KEY +) engine = ndb; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +INSERT INTO t1 VALUES (6); +select MAX(a) from t1; +MAX(a) +6 +select MAX(a) from t1; +MAX(a) +6 +select MAX(a) from t1; +MAX(a) +6 +select MAX(a) from t1; +MAX(a) +6 +select MIN(a) from t1; +MIN(a) +1 +select MIN(a) from t1; +MIN(a) +1 +select MIN(a) from t1; +MIN(a) +1 +select * from t1 order by a; +a +1 +2 +3 +4 +5 +6 +select MIN(a) from t1; +MIN(a) +1 +select MAX(a) from t1; +MAX(a) +6 +select MAX(a) from t1; +MAX(a) +6 +select * from t1 order by a; +a +1 +2 +3 +4 +5 +6 +drop table t1; +CREATE TABLE t2 ( +a int PRIMARY KEY, +b int not null, +c int not null, +KEY(b), +UNIQUE(c) +) engine = ndb; +INSERT INTO t2 VALUES (1, 5, 1); +INSERT INTO t2 VALUES (2, 2, 7); +INSERT INTO t2 VALUES (3, 3, 3); +INSERT INTO t2 VALUES (4, 4, 4); +INSERT INTO t2 VALUES (5, 5, 5); +INSERT INTO t2 VALUES (6, 6, 6); +INSERT INTO t2 VALUES (7, 2, 10); +INSERT INTO t2 VALUES (8, 10, 2); +select MAX(a) from t2; +MAX(a) +8 +select MAX(b) from t2; +MAX(b) +10 +select MAX(c) from t2; +MAX(c) +10 +select MIN(a) from t2; +MIN(a) +1 +select MIN(b) from t2; +MIN(b) +2 +select MIN(c) from t2; +MIN(c) +1 +select * from t2 order by a; +a b c +1 5 1 +2 2 7 +3 3 3 +4 4 4 +5 5 5 +6 6 6 +7 2 10 +8 10 2 +select MIN(b) from t2; +MIN(b) +2 +select MAX(a) from t2; +MAX(a) +8 +select MAX(c) from t2; +MAX(c) +10 +select * from t2 order by a; +a b c +1 5 1 +2 2 7 +3 3 3 +4 4 4 +5 5 5 +6 6 6 +7 2 10 +8 10 2 +drop table t2; diff --git a/mysql-test/suite/ndb/r/ndb_multi.result b/mysql-test/suite/ndb/r/ndb_multi.result new file mode 100644 index 00000000000..2bc49bf9b45 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_multi.result @@ -0,0 +1,123 @@ +drop table if exists t1, t2, t3, t4; +drop table if exists t1, t2, t3, t4; +flush status; +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +a +2 +select * from t2; +a +3 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +select * from t1; +a +2 +drop table t1; +create table t1 (a int) engine=ndbcluster; +insert into t1 value (2); +select * from t1; +a +2 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +drop table t1; +create table t1 (a int) engine=ndbcluster; +insert into t1 value (2); +select * from t1; +a +2 +select * from t1; +a +2 +flush status; +select * from t1; +a +2 +update t1 set a=3 where a=2; +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +create table t3 (a int not null primary key, b varchar(22), +c int, last_col text) engine=ndb; +insert into t3 values(1, 'Hi!', 89, 'Longtext column'); +create table t4 (pk int primary key, b int) engine=ndb; +select * from t1; +a +3 +select * from t3; +a b c last_col +1 Hi! 89 Longtext column +show tables like 't4'; +Tables_in_test (t4) +t4 +show tables; +Tables_in_test +t1 +t2 +t3 +t4 +drop table t1, t2, t3, t4; +create table t1(c1 int key)ENGINE=MyISAM; +insert into t1 values(1),(3),(5); +select * from t1 order by c1; +c1 +1 +3 +5 +show tables; +Tables_in_test +create table t1(c1 int key)ENGINE=MyISAM; +insert into t1 values(100),(344),(533); +select * from t1 order by c1; +c1 +100 +344 +533 +alter table t1 engine=ndb; +show tables; +Tables_in_test +t1 +Warnings: +Warning 1050 Local table test.t1 shadows ndb table +select * from t1 order by c1; +c1 +100 +344 +533 +drop table t1; +select * from t1 order by c1; +c1 +1 +3 +5 +drop table t1; +create database db; +use db; +create table t1(x int) engine=ndb; +use db; +show tables; +Tables_in_db +t1 +drop database db; +show tables; +ERROR 42000: Unknown database 'db' +create database db; +use db; +create table t1(x int) engine=ndb; +use db; +create table t2(x int) engine=myisam; +show tables; +Tables_in_db +t1 +t2 +drop database db; +show tables; +Tables_in_db +t2 +drop database db; diff --git a/mysql-test/suite/ndb/r/ndb_multi_row.result b/mysql-test/suite/ndb/r/ndb_multi_row.result new file mode 100644 index 00000000000..cf5a76d6f01 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_multi_row.result @@ -0,0 +1,67 @@ +drop table if exists t1, t2, t3, t4; +drop table if exists t1, t2, t3, t4; +flush status; +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +a +2 +select * from t2; +a +3 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +select * from t1; +a +2 +drop table t1; +create table t1 (a int) engine=ndbcluster; +insert into t1 value (2); +select * from t1; +a +2 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +drop table t1; +create table t1 (a int) engine=ndbcluster; +insert into t1 value (2); +select * from t1; +a +2 +flush status; +select * from t1; +a +2 +update t1 set a=3 where a=2; +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +create table t3 (a int not null primary key, b varchar(22), +c int, last_col text) engine=ndb; +insert into t3 values(1, 'Hi!', 89, 'Longtext column'); +create table t4 (pk int primary key, b int) engine=ndb; +select * from t1; +a +3 +select * from t3; +a b c last_col +1 Hi! 89 Longtext column +show tables like 't4'; +Tables_in_test (t4) +t4 +show tables; +Tables_in_test +t1 +t2 +t3 +t4 +drop table t1, t2, t3, t4; +drop table if exists t1, t3, t4; +Warnings: +Error 155 Table 'test.t1' doesn't exist +Error 155 Table 'test.t3' doesn't exist +Error 155 Table 'test.t4' doesn't exist diff --git a/mysql-test/suite/ndb/r/ndb_partition_error.result b/mysql-test/suite/ndb/r/ndb_partition_error.result new file mode 100644 index 00000000000..d86dc382185 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_partition_error.result @@ -0,0 +1,47 @@ +drop table if exists t1; +CREATE TABLE t1 ( +a int not null, +b int not null, +c int not null, +primary key(a,b), +index (a)) +engine = ndb +partition by range (a) +partitions 3 +(partition x1 values less than (5) nodegroup 12, +partition x2 values less than (10) nodegroup 13, +partition x3 values less than (20) nodegroup 14); +ERROR HY000: Can't create table 'test.t1' (errno: 140) +show warnings; +Level Code Message +Error 1296 Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB +Error 1005 Can't create table 'test.t1' (errno: 140) +CREATE TABLE t1 ( +a int not null, +b int not null, +c int not null, +primary key(a)) +engine = ndb +partition by range (a) +partitions 3 +(partition x1 values less than (5), +partition x2 values less than (10), +partition x3 values less than (20)); +drop table t1; +CREATE TABLE t1 (id INT) ENGINE=NDB +PARTITION BY LIST(id) +(PARTITION p0 VALUES IN (2, 4), +PARTITION p1 VALUES IN (42, 142)); +INSERT INTO t1 VALUES (2); +UPDATE t1 SET id=5 WHERE id=2; +ERROR HY000: Table has no partition for value 5 +DROP TABLE t1; +create table t1 (a int,b int, c int) +engine = ndb +partition by list(a) +partitions 2 +(partition x123 values in (11, 12), +partition x234 values in (5, 1)); +insert into t1 values (NULL,1,1); +ERROR HY000: Table has no partition for value NULL +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_partition_error2.result b/mysql-test/suite/ndb/r/ndb_partition_error2.result new file mode 100644 index 00000000000..a739ef3923c --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_partition_error2.result @@ -0,0 +1,3 @@ +drop table if exists t1; +create table t1 (s1 int) engine=ndbcluster; +ERROR HY000: For the partitioned engine it is necessary to define all partitions diff --git a/mysql-test/suite/ndb/r/ndb_partition_key.result b/mysql-test/suite/ndb/r/ndb_partition_key.result new file mode 100644 index 00000000000..60e96ce03b6 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_partition_key.result @@ -0,0 +1,255 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c)) +ENGINE = NDB +PARTITION BY KEY (a,b); +insert into t1 values (1,1,1,1); +select * from t1; +a b c d +1 1 1 1 +update t1 set d = 2 where a = 1 and b = 1 and c = 1; +select * from t1; +a b c d +1 1 1 2 +delete from t1; +select * from t1; +a b c d +drop table t1; +CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b)) +ENGINE = NDB +PARTITION BY KEY (c); +ERROR HY000: A PRIMARY KEY must include all columns in the table's partitioning function +CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b)) +ENGINE = NDB +PARTITION BY KEY (a); +insert into t1 values +(1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3), +(1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3); +select * from t1 order by b; +a b c +1 1 3 +1 2 3 +1 3 3 +1 4 3 +1 5 3 +1 6 3 +1 7 3 +1 8 3 +1 9 3 +1 10 3 +1 11 3 +1 12 3 +DROP TABLE t1; +CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT, +PRIMARY KEY (a,b,c) USING HASH) +ENGINE=NDB +DEFAULT CHARSET=latin1 +PARTITION BY KEY (b); +insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1); +-- t1 -- + +Fragment type: 5 +K Value: 6 +Min load factor: 78 +Max load factor: 80 +Temporary table: no +Number of attributes: 4 +Number of primary keys: 3 +Length of frm data: # +Row Checksum: 1 +Row GCI: 1 +SingleUserMode: 0 +ForceVarPart: 1 +TableStatus: Retrieved +-- Attributes -- +a Int PRIMARY KEY AT=FIXED ST=MEMORY +b Char(10;latin1_bin) PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +c Int PRIMARY KEY AT=FIXED ST=MEMORY +d Int NULL AT=FIXED ST=MEMORY + +-- Indexes -- +PRIMARY KEY(a, b, c) - UniqueHashIndex + + +NDBT_ProgramExit: 0 - OK + +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL DEFAULT '0', + `b` char(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '', + `c` int(11) NOT NULL DEFAULT '0', + `d` int(11) DEFAULT NULL, + PRIMARY KEY (`a`,`b`,`c`) USING HASH +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (b) */ +DROP TABLE t1; +CREATE TABLE t1 (a int not null primary key) +PARTITION BY KEY(a) +(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); +drop table t1; +CREATE TABLE t1 (a int not null primary key); +ALTER TABLE t1 +PARTITION BY KEY(a) +(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); +drop table t1; +create table t1 (a int) +engine=ndb +partition by key(a) +(partition p0, partition p1); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ +alter table t1 engine=heap; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = MEMORY, PARTITION p1 ENGINE = MEMORY) */ +alter table t1 engine=ndb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ +alter table t1 engine=heap remove partitioning; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +alter table t1 engine=ndb +partition by key(a) +(partition p0, partition p1 engine = ndb); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ +alter table t1 +partition by key (a) +(partition p0 engine=ndb, partition p1 engine=ndb); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ +alter table t1 remove partitioning; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +alter table t1 +partition by key(a) +(partition p0 engine=ndb, partition p1); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +alter table t1 +engine=ndb +partition by key(a) +(partition p0 engine=ndb, partition p1 engine = ndb); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 ENGINE = ndbcluster, PARTITION p1 ENGINE = ndbcluster) */ +drop table t1; +CREATE TABLE t1 ( +c1 MEDIUMINT NOT NULL AUTO_INCREMENT, +c2 TEXT NOT NULL, +c3 INT NOT NULL, +c4 BIT NOT NULL, +c5 FLOAT, +c6 VARCHAR(255), +c7 TIMESTAMP, +PRIMARY KEY(c1,c3)) +ENGINE=NDB +PARTITION BY KEY(c3) PARTITIONS 5; +ALTER TABLE t1 COALESCE PARTITION 4; +DROP TABLE t1; +CREATE TABLE t1 (a int primary key) +ENGINE=NDB +PARTITION BY KEY(a); +ALTER TABLE t1 OPTIMIZE PARTITION p0; +ERROR HY000: Table storage engine for 't1' doesn't have this option +ALTER TABLE t1 CHECK PARTITION p0; +ERROR HY000: Table storage engine for 't1' doesn't have this option +ALTER TABLE t1 REPAIR PARTITION p0; +ERROR HY000: Table storage engine for 't1' doesn't have this option +ALTER TABLE t1 ANALYZE PARTITION p0; +ERROR HY000: Table storage engine for 't1' doesn't have this option +ALTER TABLE t1 REBUILD PARTITION p0; +ERROR HY000: Table storage engine for 't1' doesn't have this option +DROP TABLE t1; +CREATE TABLE t1 ( +c1 MEDIUMINT NOT NULL AUTO_INCREMENT, +c2 TEXT NOT NULL, +c3 INT NOT NULL, +PRIMARY KEY(c1,c3)) +ENGINE=NDB +PARTITION BY KEY(c3) PARTITIONS 5; +ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; +DROP TABLE t1; +CREATE TABLE t1 ( +c1 MEDIUMINT NOT NULL AUTO_INCREMENT, +c2 TEXT NOT NULL, +c3 INT NOT NULL, +PRIMARY KEY(c1,c3)) +ENGINE=NDB +PARTITION BY KEY(c3) +(PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); +ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; +SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE +table_name = "t1"; +NODEGROUP PARTITION_NAME +0 p0 +0 p1 +DROP TABLE t1; +CREATE TABLE t1 ( +a tinyint unsigned NOT NULL, +b bigint(20) unsigned NOT NULL, +c char(12), +PRIMARY KEY (a,b) +) ENGINE ndb DEFAULT CHARSET=latin1 PARTITION BY KEY (a); +insert into t1 values(1,1,'1'), (2,2,'2'), (3,3,'3'), (4,4,'4'), (5,5,'5'); +select * from t1 where a = 1; +a b c +1 1 1 +select * from t1 where a = 2; +a b c +2 2 2 +select * from t1 where a = 3; +a b c +3 3 3 +select * from t1 where a = 4; +a b c +4 4 4 +select * from t1 where a = 5; +a b c +5 5 5 +delete from t1 where a = 1; +select * from t1 order by 1; +a b c +2 2 2 +3 3 3 +4 4 4 +5 5 5 +delete from t1 where a = 2; +select * from t1 order by 1; +a b c +3 3 3 +4 4 4 +5 5 5 +delete from t1 where a = 3; +select * from t1 order by 1; +a b c +4 4 4 +5 5 5 +delete from t1 where a = 4; +select * from t1 order by 1; +a b c +5 5 5 +delete from t1 where a = 5; +select * from t1 order by 1; +a b c +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_partition_list.result b/mysql-test/suite/ndb/r/ndb_partition_list.result new file mode 100644 index 00000000000..ce2574ddcc4 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_partition_list.result @@ -0,0 +1,51 @@ +drop table if exists t1; +CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL, +f_char1 CHAR(10), +f_char2 CHAR(10), f_charbig VARCHAR(1000), +PRIMARY KEY (f_int1,f_int2)) +ENGINE = NDB +PARTITION BY LIST(MOD(f_int1 + f_int2,4)) +(PARTITION part_3 VALUES IN (-3), +PARTITION part_2 VALUES IN (-2), +PARTITION part_1 VALUES IN (-1), +PARTITION part0 VALUES IN (0), +PARTITION part1 VALUES IN (1), +PARTITION part2 VALUES IN (2), +PARTITION part3 VALUES IN (3,4,5)); +INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; +INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +SELECT * FROM t1 ORDER BY f_int1; +f_int1 f_int2 f_char1 f_char2 f_charbig +-2 20 20 20 ===20=== +1 1 1 1 ===1=== +2 1 1 1 ===1=== +3 1 1 1 ===1=== +4 1 1 1 ===1=== +5 1 1 1 ===1=== +20 1 1 1 ===1=== +DROP TABLE t1; +CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10), +f_char2 CHAR(10), f_charbig VARCHAR(1000)) +ENGINE = NDB +PARTITION BY LIST(f_int1) +(PARTITION part_1 VALUES IN (-1), +PARTITION part0 VALUES IN (0,1), +PARTITION part1 VALUES IN (2)); +INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; +INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; +INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +ERROR HY000: Table has no partition for value 20 +SELECT * FROM t1 ORDER BY f_int1; +f_int1 f_int2 f_char1 f_char2 f_charbig +-1 20 20 20 ===20=== +0 20 20 20 ===20=== +1 1 1 1 ===1=== +2 1 1 1 ===1=== +DROP TABLE t1; diff --git a/mysql-test/suite/ndb/r/ndb_partition_range.result b/mysql-test/suite/ndb/r/ndb_partition_range.result new file mode 100644 index 00000000000..0c717ed55e9 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_partition_range.result @@ -0,0 +1,263 @@ +drop table if exists t1; +CREATE TABLE t1 ( +a int not null, +b int not null, +c int not null, +primary key(a,b), +index (a)) +engine = ndb +partition by range (a) +partitions 3 +(partition x1 values less than (5), +partition x2 values less than (10), +partition x3 values less than (20)); +INSERT into t1 values (1, 1, 1); +INSERT into t1 values (6, 1, 1); +INSERT into t1 values (10, 1, 1); +INSERT into t1 values (15, 1, 1); +select * from information_schema.partitions where table_name= 't1'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME +NULL test t1 x1 NULL 1 NULL RANGE NULL a NULL 5 0 0 0 # 0 0 # # NULL NULL default NULL +NULL test t1 x2 NULL 2 NULL RANGE NULL a NULL 10 0 0 0 # 0 0 # # NULL NULL default NULL +NULL test t1 x3 NULL 3 NULL RANGE NULL a NULL 20 0 0 0 # 0 0 # # NULL NULL default NULL +select * from t1 order by a; +a b c +1 1 1 +6 1 1 +10 1 1 +15 1 1 +select * from t1 where a=1 order by a; +a b c +1 1 1 +select * from t1 where a=15 and b=1 order by a; +a b c +15 1 1 +select * from t1 where a=21 and b=1 order by a; +a b c +select * from t1 where a=21 order by a; +a b c +select * from t1 where a in (1,6,10,21) order by a; +a b c +1 1 1 +6 1 1 +10 1 1 +select * from t1 where b=1 and a in (1,6,10,21) order by a; +a b c +1 1 1 +6 1 1 +10 1 1 +drop table t1; +CREATE TABLE t1 ( +a int not null, +b int not null, +c int not null, +primary key(b), +unique (a)) +engine = ndb +partition by range (b) +partitions 3 +(partition x1 values less than (5), +partition x2 values less than (10), +partition x3 values less than (20)); +INSERT into t1 values (1, 1, 1); +INSERT into t1 values (2, 6, 1); +INSERT into t1 values (3, 10, 1); +INSERT into t1 values (4, 15, 1); +select * from t1 order by a; +a b c +1 1 1 +2 6 1 +3 10 1 +4 15 1 +UPDATE t1 set a = 5 WHERE b = 15; +select * from t1 order by a; +a b c +1 1 1 +2 6 1 +3 10 1 +5 15 1 +UPDATE t1 set a = 6 WHERE a = 5; +select * from t1 order by a; +a b c +1 1 1 +2 6 1 +3 10 1 +6 15 1 +select * from t1 where b=1 order by b; +a b c +1 1 1 +select * from t1 where b=15 and a=1 order by b; +a b c +select * from t1 where b=21 and a=1 order by b; +a b c +select * from t1 where b=21 order by b; +a b c +select * from t1 where b in (1,6,10,21) order by b; +a b c +1 1 1 +2 6 1 +3 10 1 +select * from t1 where a in (1,2,5,6) order by b; +a b c +1 1 1 +2 6 1 +6 15 1 +select * from t1 where a=1 and b in (1,6,10,21) order by b; +a b c +1 1 1 +DELETE from t1 WHERE b = 6; +DELETE from t1 WHERE a = 6; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` int(11) NOT NULL, + `c` int(11) NOT NULL, + PRIMARY KEY (`b`), + UNIQUE KEY `a` (`a`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (b) (PARTITION x1 VALUES LESS THAN (5) ENGINE = ndbcluster, PARTITION x2 VALUES LESS THAN (10) ENGINE = ndbcluster, PARTITION x3 VALUES LESS THAN (20) ENGINE = ndbcluster) */ +drop table t1; +CREATE TABLE t1 +(id MEDIUMINT NOT NULL, +b1 BIT(8), +vc VARCHAR(255), +bc CHAR(255), +d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, +total BIGINT UNSIGNED, +y YEAR, +t DATE) ENGINE=NDB +PARTITION BY RANGE (YEAR(t)) +(PARTITION p0 VALUES LESS THAN (1901), +PARTITION p1 VALUES LESS THAN (1946), +PARTITION p2 VALUES LESS THAN (1966), +PARTITION p3 VALUES LESS THAN (1986), +PARTITION p4 VALUES LESS THAN (2005), +PARTITION p5 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +SELECT * FROM t1; +id b1 vc bc d f total y t +0 NULL NULL NULL NULL NULL NULL NULL NULL +ALTER TABLE t1 ENGINE=MYISAM; +SELECT * FROM t1; +id b1 vc bc d f total y t +0 NULL NULL NULL NULL NULL NULL NULL NULL +DROP TABLE t1; +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' + INITIAL_SIZE 16M +UNDO_BUFFER_SIZE=1M +ENGINE=NDB; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' + USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; +CREATE TABLE test.t1 ( +a1 INT, +a2 TEXT NOT NULL, +a3 BIT NOT NULL, +a4 DECIMAL(8,3), +a5 INT NOT NULL, +a6 INT, +PRIMARY KEY(a1)) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB +PARTITION BY LIST (a1) +(PARTITION p0 VALUES IN (1,2,3,4,5), +PARTITION p1 VALUES IN (6,7,8,9, 10), +PARTITION p2 VALUES IN (11, 12, 13, 14, 15)); +ALTER TABLE test.t1 DROP COLUMN a6; +ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255); +SELECT COUNT(*) FROM test.t1; +COUNT(*) +15 +ALTER TABLE test.t1 DROP COLUMN a4; +SELECT COUNT(*) FROM test.t1; +COUNT(*) +15 +DROP TABLE t1; +CREATE TABLE test.t1 ( +a1 INT, +a2 TEXT NOT NULL, +a3 BIT NOT NULL, +a4 DECIMAL(8,3), +a5 INT NOT NULL, +a6 VARCHAR(255), +PRIMARY KEY(a1)) +TABLESPACE ts1 STORAGE DISK ENGINE=NDB +PARTITION BY HASH(a1) +PARTITIONS 4; +SELECT COUNT(*) FROM test.t1; +COUNT(*) +15 +ALTER TABLE test.t1 DROP COLUMN a4; +SELECT COUNT(*) FROM test.t1; +COUNT(*) +15 +DROP TABLE t1; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; +DROP TABLESPACE ts1 ENGINE=NDB; +DROP LOGFILE GROUP lg1 ENGINE=NDB; +CREATE TABLE t1 +(id MEDIUMINT NOT NULL, +b1 BIT(8), +vc VARCHAR(255), +bc CHAR(255), +d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, +total BIGINT UNSIGNED, +y YEAR, +t DATE) ENGINE=NDB +PARTITION BY LIST(id) +(PARTITION p0 VALUES IN (2, 4), +PARTITION p1 VALUES IN (42, 142)); +INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +SELECT * FROM t1; +id b1 vc bc d f total y t +2 NULL NULL NULL NULL NULL NULL NULL NULL +ALTER TABLE t1 ADD PARTITION +(PARTITION p2 VALUES IN (412)); +SELECT * FROM t1; +id b1 vc bc d f total y t +2 NULL NULL NULL NULL NULL NULL NULL NULL +DROP TABLE t1; +CREATE TABLE t1 ( +a int not null, +b int not null, +c int not null) +partition by list(a) +partitions 2 +(partition x123 values in (1,5,6), +partition x234 values in (4,7,8)); +INSERT into t1 VALUES (5,1,1); +select * from t1; +a b c +5 1 1 +UPDATE t1 SET a=8 WHERE a=5 AND b=1; +select * from t1; +a b c +8 1 1 +drop table t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb +PARTITION BY RANGE(f1) +( PARTITION part1 VALUES LESS THAN (2), +PARTITION part2 VALUES LESS THAN (1000)); +INSERT INTO t1 VALUES(1, '---1---'); +INSERT INTO t1 VALUES(2, '---2---'); +select * from t1 order by f1; +f1 f2 +1 ---1--- +2 ---2--- +UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2; +select * from t1 order by f1; +f1 f2 +1 ---1--- +6 ---2--- +UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1; +select * from t1 order by f1; +f1 f2 +5 ---1--- +6 ---2--- +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_read_multi_range.result b/mysql-test/suite/ndb/r/ndb_read_multi_range.result new file mode 100644 index 00000000000..aef009212a4 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_read_multi_range.result @@ -0,0 +1,475 @@ +DROP TABLE IF EXISTS t1, t2, r1; +create table t1 ( +a int primary key, +b int not null, +c int not null, +index(b), unique index using hash(c) +) engine = ndb; +insert into t1 values +(1,2,1),(2,3,2),(3,4,3),(4,5,4), +(5,2,12),(6,3,11),(7,4,10),(8,5,9), +(9,2,8),(10,3,7),(11,4,6),(12,5,5); +create table r1 as select * from t1 where a in (2,8,12); +select * from r1 order by a; +a b c +2 3 2 +8 5 9 +12 5 5 +drop table r1; +create table r1 as select * from t1 where b in (1,2,5); +select * from r1 order by a; +a b c +1 2 1 +4 5 4 +5 2 12 +8 5 9 +9 2 8 +12 5 5 +drop table r1; +create table r1 as select * from t1 where c in (2,8,12); +select * from r1 order by a; +a b c +2 3 2 +5 2 12 +9 2 8 +drop table r1; +create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1); +select * from r1 order by a; +a b c +1 2 1 +2 3 2 +8 5 9 +12 5 5 +drop table r1; +create table r1 as select * from t1 where a in (33,8,12); +select * from r1 order by a; +a b c +8 5 9 +12 5 5 +drop table r1; +create table r1 as select * from t1 where a in (2,33,8,12,34); +select * from r1 order by a; +a b c +2 3 2 +8 5 9 +12 5 5 +drop table r1; +create table r1 as select * from t1 where b in (1,33,5); +select * from r1 order by a; +a b c +4 5 4 +8 5 9 +12 5 5 +drop table r1; +select * from t1 where b in (1,33,5) order by a; +a b c +4 5 4 +8 5 9 +12 5 5 +create table r1 as select * from t1 where b in (45,1,33,5,44); +select * from r1 order by a; +a b c +4 5 4 +8 5 9 +12 5 5 +drop table r1; +select * from t1 where b in (45,22) order by a; +a b c +create table r1 as select * from t1 where c in (2,8,33); +select * from r1 order by a; +a b c +2 3 2 +9 2 8 +drop table r1; +create table r1 as select * from t1 where c in (13,2,8,33,12); +select * from r1 order by a; +a b c +2 3 2 +5 2 12 +9 2 8 +drop table r1; +select * from t1 where a in (33,8,12) order by a; +a b c +8 5 9 +12 5 5 +select * from t1 where a in (33,34,35) order by a; +a b c +select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a; +a b c +1 2 1 +2 3 2 +8 5 9 +12 5 5 +select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a; +a b c +1 2 1 +5 2 12 +9 2 8 +2 3 2 +6 3 11 +10 3 7 +3 4 3 +7 4 10 +11 4 6 +4 5 4 +8 5 9 +12 5 5 +select * from t1 where c in (13,2,8,33,12) order by c,a; +a b c +2 3 2 +9 2 8 +5 2 12 +drop table t1; +create table t1 ( +a int not null, +b int not null, +c int not null, +d int not null, +e int not null, +primary key (a,b,c,d), index (d) +) engine = ndb; +insert into t1 values +(1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1), +(5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1), +(9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1), +(1,2,1,2,1), +(1,2,1,3,1), +(1,2,1,4,1), +(1,2,1,5,1); +create table r1 as select * from t1 +where a=1 and b=2 and c=1 and d in (1,4,3,2); +select * from r1 order by a,b,c,d; +a b c d e +1 2 1 1 1 +1 2 1 2 1 +1 2 1 3 1 +1 2 1 4 1 +drop table r1; +update t1 set e = 100 +where d in (12,6,7); +select * from t1 where d in (12,6,7) order by a,b,c,d; +a b c d e +4 5 4 7 100 +5 2 12 12 100 +9 2 8 6 100 +select * from t1 where d not in (12,6,7) and e = 100; +a b c d e +update t1 +set e = 101 +where a=1 and +b=2 and +c=1 and +d in (1,4,3,2); +select * +from t1 +where a=1 and b=2 and c=1 and d in (1,4,3,2) +order by a,b,c,d; +a b c d e +1 2 1 1 101 +1 2 1 2 101 +1 2 1 3 101 +1 2 1 4 101 +select * +from t1 +where not (a=1 and b=2 and c=1 and d in (1,4,3,2)) +and e=101; +a b c d e +update t1 +set e = +(case d +when 12 then 112 +when 6 then 106 +when 7 then 107 +end) +where d in (12,6,7); +select * from t1 where d in (12,6,7) order by a,b,c,d; +a b c d e +4 5 4 7 107 +5 2 12 12 112 +9 2 8 6 106 +update t1 +set e = +(case d +when 1 then 111 +when 4 then 444 +when 3 then 333 +when 2 then 222 +end) +where a=1 and +b=2 and +c=1 and +d in (1,4,3,2); +select * +from t1 +where a=1 and b=2 and c=1 and d in (1,4,3,2) +order by a,b,c,d; +a b c d e +1 2 1 1 111 +1 2 1 2 222 +1 2 1 3 333 +1 2 1 4 444 +delete from t1 where d in (12,6,7); +select * from t1 where d in (12,6,7); +a b c d e +drop table t1; +create table t1 ( +a int not null primary key, +b int, +c int, +d int, +unique index (b), +index(c) +) engine = ndb; +insert into t1 values +(1,null,1,1), +(2,2,2,2), +(3,null,null,3), +(4,4,null,4), +(5,null,5,null), +(6,6,6,null), +(7,null,null,null), +(8,8,null,null), +(9,null,9,9), +(10,10,10,10), +(11,null,null,11), +(12,12,null,12), +(13,null,13,null), +(14,14,14,null), +(15,null,null,null), +(16,16,null,null); +create table t2 as select * from t1 where a in (5,6,7,8,9,10); +select * from t2 order by a; +a b c d +5 NULL 5 NULL +6 6 6 NULL +7 NULL NULL NULL +8 8 NULL NULL +9 NULL 9 9 +10 10 10 10 +drop table t2; +create table t2 as select * from t1 where b in (5,6,7,8,9,10); +select * from t2 order by a; +a b c d +6 6 6 NULL +8 8 NULL NULL +10 10 10 10 +drop table t2; +create table t2 as select * from t1 where c in (5,6,7,8,9,10); +select * from t2 order by a; +a b c d +5 NULL 5 NULL +6 6 6 NULL +9 NULL 9 9 +10 10 10 10 +drop table t2; +drop table t1; +CREATE TABLE t1 ( +a int(11) NOT NULL, +b int(11) NOT NULL, +c datetime default NULL, +PRIMARY KEY (a), +KEY idx_bc (b,c) +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES +(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), +(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), +(406994,67,'2006-02-27 11:26:46'), (256,67,NULL), +(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), +(406988,67,'2006-02-23 17:07:22'), (255,67,NULL), +(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), +(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), +(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), +(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), +(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), +(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), +(223456,67,NULL),(4101,67,NULL),(1133,67,NULL), +(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), +(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), +(154503,67,'2005-10-28 11:52:38'); +create table t11 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; +create table t12 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; +create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; +create table t22 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; +select * from t11 order by 1,2,3; +a b c +254 67 NULL +255 67 NULL +256 67 NULL +1120 67 NULL +1133 67 NULL +4101 67 NULL +9199 67 NULL +223456 67 NULL +select * from t12 order by 1,2,3; +a b c +254 67 NULL +255 67 NULL +256 67 NULL +1120 67 NULL +1133 67 NULL +4101 67 NULL +9199 67 NULL +223456 67 NULL +select * from t21 order by 1,2,3; +a b c +1 67 2006-02-23 15:01:35 +254 67 NULL +255 67 NULL +256 67 NULL +1120 67 NULL +1133 67 NULL +4101 67 NULL +9199 67 NULL +223456 67 NULL +245651 67 2005-12-08 15:58:27 +245652 67 2005-12-08 15:58:27 +245653 67 2005-12-08 15:59:07 +245654 67 2005-12-08 15:59:08 +245655 67 2005-12-08 15:59:08 +398340 67 2006-02-20 04:38:53 +398341 67 2006-02-20 04:48:44 +398545 67 2006-02-20 04:53:13 +406631 67 2006-02-23 10:49:42 +406988 67 2006-02-23 17:07:22 +406989 67 2006-02-23 17:08:46 +406990 67 2006-02-23 18:01:45 +406991 67 2006-02-24 16:42:32 +406992 67 2006-02-24 16:47:18 +406993 67 2006-02-27 11:20:57 +406994 67 2006-02-27 11:26:46 +406995 67 2006-02-28 11:55:00 +select * from t22 order by 1,2,3; +a b c +1 67 2006-02-23 15:01:35 +254 67 NULL +255 67 NULL +256 67 NULL +1120 67 NULL +1133 67 NULL +4101 67 NULL +9199 67 NULL +223456 67 NULL +245651 67 2005-12-08 15:58:27 +245652 67 2005-12-08 15:58:27 +245653 67 2005-12-08 15:59:07 +245654 67 2005-12-08 15:59:08 +245655 67 2005-12-08 15:59:08 +398340 67 2006-02-20 04:38:53 +398341 67 2006-02-20 04:48:44 +398545 67 2006-02-20 04:53:13 +406631 67 2006-02-23 10:49:42 +406988 67 2006-02-23 17:07:22 +406989 67 2006-02-23 17:08:46 +406990 67 2006-02-23 18:01:45 +406991 67 2006-02-24 16:42:32 +406992 67 2006-02-24 16:47:18 +406993 67 2006-02-27 11:20:57 +406994 67 2006-02-27 11:26:46 +406995 67 2006-02-28 11:55:00 +select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null order by t12.a; +a +255 +256 +update t22 set c = '2005-12-08 15:58:27' where a = 255; +select * from t22 order by 1,2,3; +a b c +1 67 2006-02-23 15:01:35 +254 67 NULL +255 67 2005-12-08 15:58:27 +256 67 NULL +1120 67 NULL +1133 67 NULL +4101 67 NULL +9199 67 NULL +223456 67 NULL +245651 67 2005-12-08 15:58:27 +245652 67 2005-12-08 15:58:27 +245653 67 2005-12-08 15:59:07 +245654 67 2005-12-08 15:59:08 +245655 67 2005-12-08 15:59:08 +398340 67 2006-02-20 04:38:53 +398341 67 2006-02-20 04:48:44 +398545 67 2006-02-20 04:53:13 +406631 67 2006-02-23 10:49:42 +406988 67 2006-02-23 17:07:22 +406989 67 2006-02-23 17:08:46 +406990 67 2006-02-23 18:01:45 +406991 67 2006-02-24 16:42:32 +406992 67 2006-02-24 16:47:18 +406993 67 2006-02-27 11:20:57 +406994 67 2006-02-27 11:26:46 +406995 67 2006-02-28 11:55:00 +select t21.* from t21,t22 where t21.a = t22.a and +t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; +a b c +256 67 NULL +delete from t22 where a > 245651; +update t22 set b = a + 1; +select * from t22 order by 1,2,3; +a b c +1 2 2006-02-23 15:01:35 +254 255 NULL +255 256 2005-12-08 15:58:27 +256 257 NULL +1120 1121 NULL +1133 1134 NULL +4101 4102 NULL +9199 9200 NULL +223456 223457 NULL +245651 245652 2005-12-08 15:58:27 +select t21.c, count(*) +from t21 +inner join t22 using (a) +where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652) +group by t21.c +order by t21.c; +c count(*) +NULL 7 +2005-12-08 15:58:27 1 +2006-02-23 15:01:35 1 +DROP TABLE t1, t11, t12, t21, t22; +CREATE TABLE t1 (id varchar(255) NOT NULL, +tag int(11) NOT NULL, +doc text NOT NULL, +type varchar(150) NOT NULL, +modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, +PRIMARY KEY (id) +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP); +SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); +id tag doc type +SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); +id tag doc type +sakila 1 Some text goes here text +DROP TABLE t1; +CREATE TABLE t1 ( +var1 int(2) NOT NULL, +var2 int(2) NOT NULL, +PRIMARY KEY (var1) +) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; +CREATE TABLE t2 ( +var1 int(2) NOT NULL, +var2 int(2) NOT NULL, +PRIMARY KEY (var1) +) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; +CREATE TRIGGER testtrigger +AFTER UPDATE ON t1 FOR EACH ROW BEGIN +REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); +DROP TRIGGER testtrigger; +DROP TABLE t1, t2; +create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; +insert into t1 values (1,1), (10,10); +select * from t1 use index (ab) where a in(1,10) order by a; +a b +1 1 +10 10 +create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster +partition by key(a); +insert into t2 values (1,1), (10,10); +select * from t2 where a in (1,10) order by a; +a b +1 1 +10 10 +drop table t1, t2; diff --git a/mysql-test/suite/ndb/r/ndb_rename.result b/mysql-test/suite/ndb/r/ndb_rename.result new file mode 100644 index 00000000000..2cc2dfb3ff1 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_rename.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS t1,t2; +drop database if exists mysqltest; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL, +attr2 INT, +attr3 VARCHAR(10), +INDEX i1(attr1) +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (0,0,0,"zero"),(1,1,1,"one"),(2,2,2,"two"); +SELECT * FROM t1 WHERE attr1 = 1; +pk1 attr1 attr2 attr3 +1 1 1 one +alter table t1 rename t2; +SELECT * FROM t2 WHERE attr1 = 1; +pk1 attr1 attr2 attr3 +1 1 1 one +create database ndbtest; +alter table t2 rename ndbtest.t2; +SELECT * FROM ndbtest.t2 WHERE attr1 = 1; +pk1 attr1 attr2 attr3 +1 1 1 one +drop table ndbtest.t2; +drop database ndbtest; diff --git a/mysql-test/suite/ndb/r/ndb_replace.result b/mysql-test/suite/ndb/r/ndb_replace.result new file mode 100644 index 00000000000..23844ce3bff --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_replace.result @@ -0,0 +1,99 @@ +drop table if exists t1,t2; +CREATE TABLE t1 ( +gesuchnr int(11) DEFAULT '0' NOT NULL, +benutzer_id int(11) DEFAULT '0' NOT NULL, +PRIMARY KEY (gesuchnr,benutzer_id) +) engine=ndbcluster; +replace into t1 (gesuchnr,benutzer_id) values (2,1); +replace into t1 (gesuchnr,benutzer_id) values (1,1); +replace into t1 (gesuchnr,benutzer_id) values (1,1); +insert into t1 (gesuchnr, benutzer_id) value (3,2); +replace into t1 (gesuchnr,benutzer_id) values (1,1); +replace into t1 (gesuchnr,benutzer_id) values (1,1); +insert into t1 (gesuchnr,benutzer_id) values (1,1); +ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY' +replace into t1 (gesuchnr,benutzer_id) values (1,1); +select * from t1 order by gesuchnr; +gesuchnr benutzer_id +1 1 +2 1 +3 2 +drop table t1; +CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT, +j INT, +k INT, +UNIQUE INDEX(j) +) ENGINE = ndb; +INSERT INTO t1 VALUES (1,1,23),(2,2,24); +REPLACE INTO t1 (j,k) VALUES (1,42); +REPLACE INTO t1 (i,j) VALUES (17,2); +SELECT * from t1 ORDER BY i; +i j k +3 1 42 +17 2 NULL +DROP TABLE t1; +CREATE TABLE t2 (a INT(11) NOT NULL, +b INT(11) NOT NULL, +c INT(11) NOT NULL, +x TEXT, +y TEXT, +z TEXT, +id INT(10) unsigned NOT NULL AUTO_INCREMENT, +i INT(11) DEFAULT NULL, +PRIMARY KEY (id), +UNIQUE KEY a (a,b,c) +) ENGINE=ndbcluster; +REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3); +SELECT * FROM t2 ORDER BY id; +a b c x y z id i +1 1 1 c c c 3 3 +REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1); +REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2); +SELECT * FROM t2 ORDER BY id; +a b c x y z id i +1 1 1 b b b 5 2 +DROP TABLE t2; +drop table if exists t1; +create table t1 (pk int primary key, apk int unique, data int) engine=ndbcluster; +insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); +replace into t1 (pk, apk) values (4, 1), (5, 2); +select * from t1 order by pk; +pk apk data +3 3 3 +4 1 NULL +5 2 NULL +delete from t1; +insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); +replace into t1 (pk, apk) values (1, 4), (2, 5); +select * from t1 order by pk; +pk apk data +1 4 NULL +2 5 NULL +3 3 3 +delete from t1; +insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6); +load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); +select * from t1 order by pk; +pk apk data +1 1 1 +3 4 NULL +5 6 NULL +delete from t1; +insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5); +load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); +select * from t1 order by pk; +pk apk data +1 1 1 +3 4 NULL +5 6 NULL +delete from t1; +insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); +replace into t1 (pk, apk) select 4, 1; +replace into t1 (pk, apk) select 2, 4; +select * from t1 order by pk; +pk apk data +2 4 NULL +3 3 3 +4 1 NULL +drop table t1; +End of 5.0 tests. diff --git a/mysql-test/suite/ndb/r/ndb_restore.result b/mysql-test/suite/ndb/r/ndb_restore.result new file mode 100644 index 00000000000..d1c76192cef --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_restore.result @@ -0,0 +1,485 @@ +use test; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; +CREATE TABLE `t1_c` ( +`capgoaledatta` mediumint(5) unsigned NOT NULL auto_increment, +`goaledatta` char(2) NOT NULL default '', +`maturegarbagefa` varchar(32) NOT NULL default '', +PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(400,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3000,'20','threetrees.qt'); +CREATE TABLE `t2_c` ( +`capgotod` smallint(5) unsigned NOT NULL auto_increment, +`gotod` smallint(5) unsigned NOT NULL default '0', +`goaledatta` char(2) default NULL, +`maturegarbagefa` varchar(32) default NULL, +`descrpooppo` varchar(64) default NULL, +`svcutonsa` varchar(64) NOT NULL default '', +PRIMARY KEY (`capgotod`), +KEY `i quadaddsvr` (`gotod`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'),(5,0,'',NULL,NULL,''); +CREATE TABLE `t3_c` ( +`CapGoaledatta` smallint(5) unsigned NOT NULL default '0', +`capgotod` smallint(5) unsigned NOT NULL default '0', +PRIMARY KEY (`capgotod`,`CapGoaledatta`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED; +INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); +CREATE TABLE `t4_c` ( +`capfa` bigint(20) unsigned NOT NULL auto_increment, +`realm` varchar(32) NOT NULL default '', +`authpwchap` varchar(32) default NULL, +`fa` varchar(32) NOT NULL default '', +`payyingatta` tinyint(4) NOT NULL default '0', +`status` char(1) default NULL, +PRIMARY KEY (`fa`,`realm`), +KEY `capfa` (`capfa`), +KEY `i_quadentity` (`fa`,`realm`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(2200,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32000,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(290000000,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); +CREATE TABLE `t5_c` ( +`capfa` bigint(20) unsigned NOT NULL default '0', +`gotod` smallint(5) unsigned NOT NULL default '0', +`orderutonsa` varchar(64) NOT NULL default '', +PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); +CREATE TABLE `t6_c` ( +`capfa_parent` bigint(20) unsigned NOT NULL default '0', +`capfa_child` bigint(20) unsigned NOT NULL default '0', +`relatta` smallint(5) unsigned NOT NULL default '0', +PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); +CREATE TABLE `t7_c` ( +`dardpo` char(15) NOT NULL default '', +`dardtestard` tinyint(3) unsigned NOT NULL auto_increment, +`FastFA` char(5) NOT NULL default '', +`FastCode` char(6) NOT NULL default '', +`Fastca` char(1) NOT NULL default '', +`Fastmag` char(1) NOT NULL default '', +`Beareratta` char(2) NOT NULL default '', +PRIMARY KEY (`dardpo`,`dardtestard`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); +CREATE TABLE `t8_c` ( +`kattjame` varchar(32) NOT NULL default '', +`realm` varchar(32) NOT NULL default '', +`realm_entered` varchar(32) NOT NULL default '', +`maturegarbagefa` varchar(32) NOT NULL default '', +`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', +`kattjame_entered` varchar(32) NOT NULL default '', +`hunderaaarbagefa` varchar(32) NOT NULL default '', +`gest` varchar(16) default NULL, +`hassetino` varchar(16) NOT NULL default '', +`aaaproxysessfa` varchar(255) default NULL, +`autologonallowed` char(1) default NULL, +`squardporoot` varchar(15) NOT NULL default '', +`naspo` varchar(15) default NULL, +`beareratta` char(2) default NULL, +`fastCode` varchar(6) default NULL, +`fastFA` varchar(5) default NULL, +`fastca` char(1) default NULL, +`fastmag` char(1) default NULL, +`lastupdate` datetime default NULL, +`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', +`accthassetitime` int(10) unsigned default NULL, +`acctoutputoctets` bigint(20) unsigned default NULL, +`acctinputoctets` bigint(20) unsigned default NULL, +PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), +KEY `squardporoot` (`squardporoot`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); +CREATE TABLE `t9_c` ( +`kattjame` varchar(32) NOT NULL default '', +`kattjame_entered` varchar(32) NOT NULL default '', +`realm` varchar(32) NOT NULL default '', +`realm_entered` varchar(32) NOT NULL default '', +`maturegarbagefa` varchar(32) NOT NULL default '', +`hunderaaarbagefa` varchar(32) NOT NULL default '', +`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', +`gest` varchar(16) default NULL, +`hassetino` varchar(16) NOT NULL default '', +`squardporoot` varchar(15) NOT NULL default '', +`naspo` varchar(15) default NULL, +`beareratta` char(2) default NULL, +`fastCode` varchar(6) default NULL, +`fastFA` varchar(5) default NULL, +`fastca` char(1) default NULL, +`fastmag` char(1) default NULL, +`lastupdate` datetime default NULL, +`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', +`accthassetitime` int(10) unsigned default NULL, +`actcoutpuocttets` bigint(20) unsigned default NULL, +`actinputocctets` bigint(20) unsigned default NULL, +`terminateraste` tinyint(3) unsigned default NULL, +PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); +CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO t10_c VALUES (1),(2),(3); +insert into t10_c values (10000),(2000),(3000); +create table t1 engine=myisam as select * from t1_c; +create table t2 engine=myisam as select * from t2_c; +create table t3 engine=myisam as select * from t3_c; +create table t4 engine=myisam as select * from t4_c; +create table t5 engine=myisam as select * from t5_c; +create table t6 engine=myisam as select * from t6_c; +create table t7 engine=myisam as select * from t7_c; +create table t8 engine=myisam as select * from t8_c; +create table t9 engine=myisam as select * from t9_c; +create table t10 engine=myisam as select * from t10_c; +ForceVarPart: 0 +ForceVarPart: 1 +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; +ForceVarPart: 0 +ForceVarPart: 1 +select count(*) from t1; +count(*) +5 +select count(*) from t1_c; +count(*) +5 +select count(*) +from (select * from t1 union +select * from t1_c) a; +count(*) +5 +select count(*) from t2; +count(*) +7 +select count(*) from t2_c; +count(*) +7 +select count(*) +from (select * from t2 union +select * from t2_c) a; +count(*) +7 +select count(*) from t3; +count(*) +4 +select count(*) from t3_c; +count(*) +4 +select count(*) +from (select * from t3 union +select * from t3_c) a; +count(*) +4 +select count(*) from t4; +count(*) +22 +select count(*) from t4_c; +count(*) +22 +select count(*) +from (select * from t4 union +select * from t4_c) a; +count(*) +22 +select count(*) from t5; +count(*) +3 +select count(*) from t5_c; +count(*) +3 +select count(*) +from (select * from t5 union +select * from t5_c) a; +count(*) +3 +select count(*) from t6; +count(*) +8 +select count(*) from t6_c; +count(*) +8 +select count(*) +from (select * from t6 union +select * from t6_c) a; +count(*) +8 +select count(*) from t7; +count(*) +5 +select count(*) from t7_c; +count(*) +5 +select count(*) +from (select * from t7 union +select * from t7_c) a; +count(*) +5 +select count(*) from t8; +count(*) +3 +select count(*) from t8_c; +count(*) +3 +select count(*) +from (select * from t8 union +select * from t8_c) a; +count(*) +3 +select count(*) from t9; +count(*) +3 +select count(*) from t9_c; +count(*) +3 +select count(*) +from (select * from t9 union +select * from t9_c) a; +count(*) +3 +select * from t10_c order by a; +a +1 +2 +3 +2000 +3000 +10000 +show table status like 't1_c'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +X X X X X X X X X X 3001 X X X X X X X +show table status like 't2_c'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +X X X X X X X X X X 501 X X X X X X X +show table status like 't4_c'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +X X X X X X X X X X 290000001 X X X X X X X +show table status like 't7_c'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +X X X X X X X X X X 29 X X X X X X X +show table status like 't10_c'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +X X X X X X X X X X 10001 X X X X X X X +ALTER TABLE t7_c +PARTITION BY LINEAR KEY (`dardtestard`); +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; +select count(*) from t1; +count(*) +5 +select count(*) from t1_c; +count(*) +5 +select count(*) +from (select * from t1 union +select * from t1_c) a; +count(*) +5 +select count(*) from t2; +count(*) +7 +select count(*) from t2_c; +count(*) +7 +select count(*) +from (select * from t2 union +select * from t2_c) a; +count(*) +7 +select count(*) from t3; +count(*) +4 +select count(*) from t3_c; +count(*) +4 +select count(*) +from (select * from t3 union +select * from t3_c) a; +count(*) +4 +select count(*) from t4; +count(*) +22 +select count(*) from t4_c; +count(*) +22 +select count(*) +from (select * from t4 union +select * from t4_c) a; +count(*) +22 +select count(*) from t5; +count(*) +3 +select count(*) from t5_c; +count(*) +3 +select count(*) +from (select * from t5 union +select * from t5_c) a; +count(*) +3 +select count(*) from t6; +count(*) +8 +select count(*) from t6_c; +count(*) +8 +select count(*) +from (select * from t6 union +select * from t6_c) a; +count(*) +8 +select count(*) from t7; +count(*) +5 +select count(*) from t7_c; +count(*) +5 +select count(*) +from (select * from t7 union +select * from t7_c) a; +count(*) +5 +select count(*) from t8; +count(*) +3 +select count(*) from t8_c; +count(*) +3 +select count(*) +from (select * from t8 union +select * from t8_c) a; +count(*) +3 +select count(*) from t9; +count(*) +3 +select count(*) from t9_c; +count(*) +3 +select count(*) +from (select * from t9 union +select * from t9_c) a; +count(*) +3 +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; +select count(*) from t1; +count(*) +5 +select count(*) from t1_c; +count(*) +5 +select count(*) +from (select * from t1 union +select * from t1_c) a; +count(*) +5 +select count(*) from t2; +count(*) +7 +select count(*) from t2_c; +count(*) +7 +select count(*) +from (select * from t2 union +select * from t2_c) a; +count(*) +7 +select count(*) from t3; +count(*) +4 +select count(*) from t3_c; +count(*) +4 +select count(*) +from (select * from t3 union +select * from t3_c) a; +count(*) +4 +select count(*) from t4; +count(*) +22 +select count(*) from t4_c; +count(*) +22 +select count(*) +from (select * from t4 union +select * from t4_c) a; +count(*) +22 +select count(*) from t5; +count(*) +3 +select count(*) from t5_c; +count(*) +3 +select count(*) +from (select * from t5 union +select * from t5_c) a; +count(*) +3 +select count(*) from t6; +count(*) +8 +select count(*) from t6_c; +count(*) +8 +select count(*) +from (select * from t6 union +select * from t6_c) a; +count(*) +8 +select count(*) from t7; +count(*) +5 +select count(*) from t7_c; +count(*) +5 +select count(*) +from (select * from t7 union +select * from t7_c) a; +count(*) +5 +select count(*) from t8; +count(*) +3 +select count(*) from t8_c; +count(*) +3 +select count(*) +from (select * from t8 union +select * from t8_c) a; +count(*) +3 +select count(*) from t9; +count(*) +3 +select count(*) from t9_c; +count(*) +3 +select count(*) +from (select * from t9 union +select * from t9_c) a; +count(*) +3 +drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +drop table if exists t2_c; +520093696, diff --git a/mysql-test/suite/ndb/r/ndb_restore_compat.result b/mysql-test/suite/ndb/r/ndb_restore_compat.result new file mode 100644 index 00000000000..db17f9af32b --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_restore_compat.result @@ -0,0 +1,114 @@ +DROP DATABASE IF EXISTS BANK; +CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; +USE BANK; +SHOW TABLES; +Tables_in_BANK +ACCOUNT +GL +ACCOUNT_TYPE +TRANSACTION +SYSTEM_VALUES +SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; +TIME ACCOUNT_TYPE BALANCE DEPOSIT_COUNT DEPOSIT_SUM WITHDRAWAL_COUNT WITHDRAWAL_SUM PURGED +0 0 10000000 0 0 0 0 1 +0 1 30000 0 0 0 0 1 +0 2 20000 0 0 0 0 1 +0 3 20000 0 0 0 0 1 +0 4 20000 0 0 0 0 1 +1 0 10000000 0 0 0 0 0 +1 1 30000 0 0 0 0 0 +1 2 20000 0 0 0 0 0 +1 3 20000 0 0 0 0 0 +1 4 20000 0 0 0 0 0 +2 0 9981761 17 80457 19 98696 0 +2 1 17823 55 203688 46 215865 0 +2 2 47056 33 159275 33 132219 0 +2 3 15719 26 126833 29 131114 0 +2 4 27641 32 133459 36 125818 0 +SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; +ACCOUNT_ID OWNER BALANCE ACCOUNT_TYPE +0 0 9863546 0 +1 3001 12885 1 +2 3002 11012 2 +3 3003 32789 3 +4 3004 10992 4 +5 3005 2247 1 +6 3006 3170 1 +7 3007 60321 2 +8 3008 30508 3 +9 3009 62530 4 +SELECT COUNT(*) FROM TRANSACTION; +COUNT(*) +3444 +SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; +SYSTEM_VALUES_ID VALUE +0 2039 +1 3 +SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; +server_id epoch log_name start_pos end_pos +0 151 0 0 +ForceVarPart: 1 +ForceVarPart: 1 +ForceVarPart: 1 +ForceVarPart: 1 +ForceVarPart: 1 +TRUNCATE GL; +TRUNCATE ACCOUNT; +TRUNCATE TRANSACTION; +TRUNCATE SYSTEM_VALUES; +TRUNCATE ACCOUNT_TYPE; +ForceVarPart: 1 +ForceVarPart: 1 +ForceVarPart: 1 +ForceVarPart: 1 +ForceVarPart: 1 +SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; +TIME ACCOUNT_TYPE BALANCE DEPOSIT_COUNT DEPOSIT_SUM WITHDRAWAL_COUNT WITHDRAWAL_SUM PURGED +0 0 10000000 0 0 0 0 1 +0 1 30000 0 0 0 0 1 +0 2 20000 0 0 0 0 1 +0 3 20000 0 0 0 0 1 +0 4 20000 0 0 0 0 1 +1 0 10000000 0 0 0 0 1 +1 1 30000 0 0 0 0 1 +1 2 20000 0 0 0 0 1 +1 3 20000 0 0 0 0 1 +1 4 20000 0 0 0 0 1 +2 0 10000000 0 0 0 0 1 +2 1 30000 0 0 0 0 1 +2 2 20000 0 0 0 0 1 +2 3 20000 0 0 0 0 1 +2 4 20000 0 0 0 0 1 +3 0 9963591 14 59111 19 95520 0 +3 1 44264 49 255559 53 241295 0 +3 2 25515 39 177806 36 172291 0 +3 3 16779 26 129200 29 132421 0 +3 4 39851 43 182771 34 162920 0 +4 0 9733661 141 632616 162 862546 0 +4 1 63853 426 2005337 415 1985748 0 +4 2 140473 314 1548632 297 1433674 0 +4 3 13481 310 1528043 324 1531341 0 +4 4 138532 316 1540206 309 1441525 0 +SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; +ACCOUNT_ID OWNER BALANCE ACCOUNT_TYPE +0 0 9679579 0 +1 3001 18130 1 +2 3002 12318 2 +3 3003 3049 3 +4 3004 39517 4 +5 3005 37051 1 +6 3006 144497 1 +7 3007 130670 2 +8 3008 13747 3 +9 3009 11442 4 +SELECT COUNT(*) FROM TRANSACTION; +COUNT(*) +4056 +SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; +SYSTEM_VALUES_ID VALUE +0 2297 +1 5 +SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; +server_id epoch log_name start_pos end_pos +0 331 0 0 +DROP DATABASE BANK; diff --git a/mysql-test/suite/ndb/r/ndb_restore_partition.result b/mysql-test/suite/ndb/r/ndb_restore_partition.result new file mode 100644 index 00000000000..7dc4057e615 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_restore_partition.result @@ -0,0 +1,469 @@ +use test; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; +CREATE TABLE `t1_c` ( +`capgoaledatta` smallint(5) unsigned NOT NULL auto_increment, +`goaledatta` char(2) NOT NULL default '', +`maturegarbagefa` varchar(32) NOT NULL default '', +PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt'); +CREATE TABLE `t2_c` ( +`capgotod` smallint(5) unsigned NOT NULL auto_increment, +`gotod` smallint(5) unsigned NOT NULL default '0', +`goaledatta` char(2) default NULL, +`maturegarbagefa` varchar(32) default NULL, +`descrpooppo` varchar(64) default NULL, +`svcutonsa` varchar(64) NOT NULL default '', +PRIMARY KEY (`capgotod`), +KEY `i_quadaddsvr` (`gotod`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'); +CREATE TABLE `t3_c` ( +`CapGoaledatta` smallint(5) unsigned NOT NULL default '0', +`capgotod` smallint(5) unsigned NOT NULL default '0', +PRIMARY KEY (`capgotod`,`CapGoaledatta`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); +CREATE TABLE `t4_c` ( +`capfa` bigint(20) unsigned NOT NULL auto_increment, +`realm` varchar(32) NOT NULL default '', +`authpwchap` varchar(32) default NULL, +`fa` varchar(32) NOT NULL default '', +`payyingatta` tinyint(4) NOT NULL default '0', +`status` char(1) default NULL, +PRIMARY KEY (`fa`,`realm`), +KEY `capfa` (`capfa`), +KEY `i_quadentity` (`fa`,`realm`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); +CREATE TABLE `t5_c` ( +`capfa` bigint(20) unsigned NOT NULL default '0', +`gotod` smallint(5) unsigned NOT NULL default '0', +`orderutonsa` varchar(64) NOT NULL default '', +PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); +CREATE TABLE `t6_c` ( +`capfa_parent` bigint(20) unsigned NOT NULL default '0', +`capfa_child` bigint(20) unsigned NOT NULL default '0', +`relatta` smallint(5) unsigned NOT NULL default '0', +PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); +CREATE TABLE `t7_c` ( +`dardpo` char(15) NOT NULL default '', +`dardtestard` tinyint(3) unsigned NOT NULL default '0', +`FastFA` char(5) NOT NULL default '', +`FastCode` char(6) NOT NULL default '', +`Fastca` char(1) NOT NULL default '', +`Fastmag` char(1) NOT NULL default '', +`Beareratta` char(2) NOT NULL default '', +PRIMARY KEY (`dardpo`,`dardtestard`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); +CREATE TABLE `t8_c` ( +`kattjame` varchar(32) NOT NULL default '', +`realm` varchar(32) NOT NULL default '', +`realm_entered` varchar(32) NOT NULL default '', +`maturegarbagefa` varchar(32) NOT NULL default '', +`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', +`kattjame_entered` varchar(32) NOT NULL default '', +`hunderaaarbagefa` varchar(32) NOT NULL default '', +`gest` varchar(16) default NULL, +`hassetino` varchar(16) NOT NULL default '', +`aaaproxysessfa` varchar(255) default NULL, +`autologonallowed` char(1) default NULL, +`squardporoot` varchar(15) NOT NULL default '', +`naspo` varchar(15) default NULL, +`beareratta` char(2) default NULL, +`fastCode` varchar(6) default NULL, +`fastFA` varchar(5) default NULL, +`fastca` char(1) default NULL, +`fastmag` char(1) default NULL, +`lastupdate` datetime default NULL, +`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', +`accthassetitime` int(10) unsigned default NULL, +`acctoutputoctets` bigint(20) unsigned default NULL, +`acctinputoctets` bigint(20) unsigned default NULL, +PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), +KEY `squardporoot` (`squardporoot`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); +CREATE TABLE `t9_c` ( +`kattjame` varchar(32) NOT NULL default '', +`kattjame_entered` varchar(32) NOT NULL default '', +`realm` varchar(32) NOT NULL default '', +`realm_entered` varchar(32) NOT NULL default '', +`maturegarbagefa` varchar(32) NOT NULL default '', +`hunderaaarbagefa` varchar(32) NOT NULL default '', +`hunderaaarbagefa_parent` varchar(32) NOT NULL default '', +`gest` varchar(16) default NULL, +`hassetino` varchar(16) NOT NULL default '', +`squardporoot` varchar(15) NOT NULL default '', +`naspo` varchar(15) default NULL, +`beareratta` char(2) default NULL, +`fastCode` varchar(6) default NULL, +`fastFA` varchar(5) default NULL, +`fastca` char(1) default NULL, +`fastmag` char(1) default NULL, +`lastupdate` datetime default NULL, +`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', +`accthassetitime` int(10) unsigned default NULL, +`actcoutpuocttets` bigint(20) unsigned default NULL, +`actinputocctets` bigint(20) unsigned default NULL, +`terminateraste` tinyint(3) unsigned default NULL, +PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); +create table t1 engine=myisam as select * from t1_c; +create table t2 engine=myisam as select * from t2_c; +create table t3 engine=myisam as select * from t3_c; +create table t4 engine=myisam as select * from t4_c; +create table t5 engine=myisam as select * from t5_c; +create table t6 engine=myisam as select * from t6_c; +create table t7 engine=myisam as select * from t7_c; +create table t8 engine=myisam as select * from t8_c; +create table t9 engine=myisam as select * from t9_c; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; +select count(*) from t1; +count(*) +5 +select count(*) from t1_c; +count(*) +5 +select count(*) +from (select * from t1 union +select * from t1_c) a; +count(*) +5 +select count(*) from t2; +count(*) +6 +select count(*) from t2_c; +count(*) +6 +select count(*) +from (select * from t2 union +select * from t2_c) a; +count(*) +6 +select count(*) from t3; +count(*) +4 +select count(*) from t3_c; +count(*) +4 +select count(*) +from (select * from t3 union +select * from t3_c) a; +count(*) +4 +select count(*) from t4; +count(*) +22 +select count(*) from t4_c; +count(*) +22 +select count(*) +from (select * from t4 union +select * from t4_c) a; +count(*) +22 +select count(*) from t5; +count(*) +3 +select count(*) from t5_c; +count(*) +3 +select count(*) +from (select * from t5 union +select * from t5_c) a; +count(*) +3 +select count(*) from t6; +count(*) +8 +select count(*) from t6_c; +count(*) +8 +select count(*) +from (select * from t6 union +select * from t6_c) a; +count(*) +8 +select count(*) from t7; +count(*) +5 +select count(*) from t7_c; +count(*) +5 +select count(*) +from (select * from t7 union +select * from t7_c) a; +count(*) +5 +select count(*) from t8; +count(*) +3 +select count(*) from t8_c; +count(*) +3 +select count(*) +from (select * from t8 union +select * from t8_c) a; +count(*) +3 +select count(*) from t9; +count(*) +3 +select count(*) from t9_c; +count(*) +3 +select count(*) +from (select * from t9 union +select * from t9_c) a; +count(*) +3 +ALTER TABLE t1_c +PARTITION BY RANGE (`capgoaledatta`) +(PARTITION p0 VALUES LESS THAN MAXVALUE); +ALTER TABLE t2_c +PARTITION BY LIST(`capgotod`) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6)); +ALTER TABLE t3_c +PARTITION BY HASH (`CapGoaledatta`); +ALTER TABLE t5_c +PARTITION BY HASH (`capfa`) +PARTITIONS 4; +ALTER TABLE t6_c +PARTITION BY LINEAR HASH (`relatta`) +PARTITIONS 4; +ALTER TABLE t7_c +PARTITION BY LINEAR KEY (`dardtestard`); +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; +select count(*) from t1; +count(*) +5 +select count(*) from t1_c; +count(*) +5 +select count(*) +from (select * from t1 union +select * from t1_c) a; +count(*) +5 +select count(*) from t2; +count(*) +6 +select count(*) from t2_c; +count(*) +6 +select count(*) +from (select * from t2 union +select * from t2_c) a; +count(*) +6 +select count(*) from t3; +count(*) +4 +select count(*) from t3_c; +count(*) +4 +select count(*) +from (select * from t3 union +select * from t3_c) a; +count(*) +4 +select count(*) from t4; +count(*) +22 +select count(*) from t4_c; +count(*) +22 +select count(*) +from (select * from t4 union +select * from t4_c) a; +count(*) +22 +select count(*) from t5; +count(*) +3 +select count(*) from t5_c; +count(*) +3 +select count(*) +from (select * from t5 union +select * from t5_c) a; +count(*) +3 +select count(*) from t6; +count(*) +8 +select count(*) from t6_c; +count(*) +8 +select count(*) +from (select * from t6 union +select * from t6_c) a; +count(*) +8 +select count(*) from t7; +count(*) +5 +select count(*) from t7_c; +count(*) +5 +select count(*) +from (select * from t7 union +select * from t7_c) a; +count(*) +5 +select count(*) from t8; +count(*) +3 +select count(*) from t8_c; +count(*) +3 +select count(*) +from (select * from t8 union +select * from t8_c) a; +count(*) +3 +select count(*) from t9; +count(*) +3 +select count(*) from t9_c; +count(*) +3 +select count(*) +from (select * from t9 union +select * from t9_c) a; +count(*) +3 +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; +select count(*) from t1; +count(*) +5 +select count(*) from t1_c; +count(*) +5 +select count(*) +from (select * from t1 union +select * from t1_c) a; +count(*) +5 +select count(*) from t2; +count(*) +6 +select count(*) from t2_c; +count(*) +6 +select count(*) +from (select * from t2 union +select * from t2_c) a; +count(*) +6 +select count(*) from t3; +count(*) +4 +select count(*) from t3_c; +count(*) +4 +select count(*) +from (select * from t3 union +select * from t3_c) a; +count(*) +4 +select count(*) from t4; +count(*) +22 +select count(*) from t4_c; +count(*) +22 +select count(*) +from (select * from t4 union +select * from t4_c) a; +count(*) +22 +select count(*) from t5; +count(*) +3 +select count(*) from t5_c; +count(*) +3 +select count(*) +from (select * from t5 union +select * from t5_c) a; +count(*) +3 +select count(*) from t6; +count(*) +8 +select count(*) from t6_c; +count(*) +8 +select count(*) +from (select * from t6 union +select * from t6_c) a; +count(*) +8 +select count(*) from t7; +count(*) +5 +select count(*) from t7_c; +count(*) +5 +select count(*) +from (select * from t7 union +select * from t7_c) a; +count(*) +5 +select count(*) from t8; +count(*) +3 +select count(*) from t8_c; +count(*) +3 +select count(*) +from (select * from t8 union +select * from t8_c) a; +count(*) +3 +select count(*) from t9; +count(*) +3 +select count(*) from t9_c; +count(*) +3 +select count(*) +from (select * from t9 union +select * from t9_c) a; +count(*) +3 +drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +Create table test/def/t2_c failed: Translate frm error +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +drop table if exists t2_c; +520093696, diff --git a/mysql-test/suite/ndb/r/ndb_restore_print.result b/mysql-test/suite/ndb/r/ndb_restore_print.result new file mode 100644 index 00000000000..e05f8e43d1a --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_restore_print.result @@ -0,0 +1,321 @@ +use test; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +create table t1 +(pk int key +,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) +,b1 TINYINT, b2 TINYINT UNSIGNED +,c1 SMALLINT, c2 SMALLINT UNSIGNED +,d1 INT, d2 INT UNSIGNED +,e1 BIGINT, e2 BIGINT UNSIGNED +,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY +,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY +,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) +,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) +) engine myisam; +insert into t1 values +(1 +,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 +,127, 255 +,32767, 65535 +,2147483647, 4294967295 +,9223372036854775807, 18446744073709551615 +,'1','12345678901234567890123456789012','123456789' + ,'1','12345678901234567890123456789012','123456789' + ,0x12,0x123456789abcdef0, 0x012345 +,0x12,0x123456789abcdef0, 0x00123450 +); +insert into t1 values +(2 +,0, 0, 0, 0, 0 +,-128, 0 +,-32768, 0 +,-2147483648, 0 +,-9223372036854775808, 0 +,'','','' + ,'','','' + ,0x0,0x0,0x0 +,0x0,0x0,0x0 +); +insert into t1 values +(3 +,NULL,NULL,NULL,NULL,NULL +,NULL,NULL +,NULL,NULL +,NULL,NULL +,NULL,NULL +,NULL,NULL,NULL +,NULL,NULL,NULL +,NULL,NULL,NULL +,NULL,NULL,NULL +); +select pk +,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) +,b1, b2 +,c1 , c2 +,d1 , d2 +,e1 , e2 +,f1 , f2, f3 +,g1 , g2, g3 +,hex(h1), hex(h2), hex(h3) +,hex(i1), hex(i2), hex(i3) +from t1 order by pk; +pk 1 +hex(a1) 1 +hex(a2) 17 +hex(a3) 789A +hex(a4) 789ABCDE +hex(a5) FEDC0001 +b1 127 +b2 255 +c1 32767 +c2 65535 +d1 2147483647 +d2 4294967295 +e1 9223372036854775807 +e2 18446744073709551615 +f1 1 +f2 12345678901234567890123456789012 +f3 123456789 +g1 1 +g2 12345678901234567890123456789012 +g3 123456789 +hex(h1) 12 +hex(h2) 123456789ABCDEF0 +hex(h3) 012345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +hex(i1) 12 +hex(i2) 123456789ABCDEF0 +hex(i3) 00123450 +pk 2 +hex(a1) 0 +hex(a2) 0 +hex(a3) 0 +hex(a4) 0 +hex(a5) 0 +b1 -128 +b2 0 +c1 -32768 +c2 0 +d1 -2147483648 +d2 0 +e1 -9223372036854775808 +e2 0 +f1 +f2 +f3 +g1 +g2 +g3 +hex(h1) 00 +hex(h2) 0000000000000000 +hex(h3) 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +hex(i1) 00 +hex(i2) 00 +hex(i3) 00 +pk 3 +hex(a1) NULL +hex(a2) NULL +hex(a3) NULL +hex(a4) NULL +hex(a5) NULL +b1 NULL +b2 NULL +c1 NULL +c2 NULL +d1 NULL +d2 NULL +e1 NULL +e2 NULL +f1 NULL +f2 NULL +f3 NULL +g1 NULL +g2 NULL +g3 NULL +hex(h1) NULL +hex(h2) NULL +hex(h3) NULL +hex(i1) NULL +hex(i2) NULL +hex(i3) NULL +alter table t1 engine ndb; +select pk +,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) +,b1, b2 +,c1 , c2 +,d1 , d2 +,e1 , e2 +,f1 , f2, f3 +,g1 , g2, g3 +,hex(h1), hex(h2), hex(h3) +,hex(i1), hex(i2), hex(i3) +from t1 order by pk; +pk 1 +hex(a1) 1 +hex(a2) 17 +hex(a3) 789A +hex(a4) 789ABCDE +hex(a5) FEDC0001 +b1 127 +b2 255 +c1 32767 +c2 65535 +d1 2147483647 +d2 4294967295 +e1 9223372036854775807 +e2 18446744073709551615 +f1 1 +f2 12345678901234567890123456789012 +f3 123456789 +g1 1 +g2 12345678901234567890123456789012 +g3 123456789 +hex(h1) 12 +hex(h2) 123456789ABCDEF0 +hex(h3) 012345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +hex(i1) 12 +hex(i2) 123456789ABCDEF0 +hex(i3) 00123450 +pk 2 +hex(a1) 0 +hex(a2) 0 +hex(a3) 0 +hex(a4) 0 +hex(a5) 0 +b1 -128 +b2 0 +c1 -32768 +c2 0 +d1 -2147483648 +d2 0 +e1 -9223372036854775808 +e2 0 +f1 +f2 +f3 +g1 +g2 +g3 +hex(h1) 00 +hex(h2) 0000000000000000 +hex(h3) 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +hex(i1) 00 +hex(i2) 00 +hex(i3) 00 +pk 3 +hex(a1) NULL +hex(a2) NULL +hex(a3) NULL +hex(a4) NULL +hex(a5) NULL +b1 NULL +b2 NULL +c1 NULL +c2 NULL +d1 NULL +d2 NULL +e1 NULL +e2 NULL +f1 NULL +f2 NULL +f3 NULL +g1 NULL +g2 NULL +g3 NULL +hex(h1) NULL +hex(h2) NULL +hex(h3) NULL +hex(i1) NULL +hex(i2) NULL +hex(i3) NULL +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +1;0x1;0x17;0x789A;0x789ABCDE;0xFEDC0001;127;255;32767;65535;2147483647;4294967295;9223372036854775807;18446744073709551615;1;12345678901234567890123456789012;123456789;1;12345678901234567890123456789012;123456789;0x12;0x123456789ABCDEF0;0x012345;0x12;0x123456789ABCDEF0;0x00123450 +2;0x0;0x0;0x0;0x0;0x0;-128;0;-32768;0;-2147483648;0;-9223372036854775808;0;;;;;;;0x0;0x0;0x0;0x0;0x0;0x0 +3;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N;\N +1,0x1,0x17,0x789A,0x789ABCDE,0xFEDC0001,127,255,32767,65535,2147483647,4294967295,9223372036854775807,18446744073709551615,'1','12345678901234567890123456789012','123456789','1','12345678901234567890123456789012','123456789',0x12,0x123456789ABCDEF0,0x012345,0x12,0x123456789ABCDEF0,0x00123450 +2,0x0,0x0,0x0,0x0,0x0,-128,0,-32768,0,-2147483648,0,-9223372036854775808,0,'','','','','','',0x0,0x0,0x0,0x0,0x0,0x0 +3,,,,,,,,,,,,,,,,,,,,,,,,, +drop table t1; +create table t1 +(pk int key +,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY +,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY +,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255) +,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) +) engine ndb; +insert into t1 values +(1 +,'1','12345678901234567890123456789012','123456789 ' + ,'1 ','12345678901234567890123456789012 ','123456789 ' + ,0x20,0x123456789abcdef020, 0x012345000020 +,0x1200000020,0x123456789abcdef000000020, 0x00123450000020 +); +create table t2 (pk int key, a int) engine ndb; +create table t3 (pk int key, a int) engine ndb; +create table t4 (pk int key, a int) engine ndb; +insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15); +insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25); +insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +'1' '1' '12345678901234567890123456789012' '123456789' '1' '12345678901234567890123456789012' '123456789' '0x20' '0x123456789ABCDEF020' '0x012345000020' '0x1200000020' '0x123456789ABCDEF000000020' '0x00123450000020' + +t1 +-- +1 1 12345678901234567890123456789012 123456789 1 12345678901234567890123456789012 123456789 0x20 0x123456789ABCDEF020 0x012345000020 0x1200000020 0x123456789ABCDEF000000020 0x00123450000020 + +t2 +-- +1 11 +2 12 +3 13 +4 14 +5 15 + +t3 +-- +1 21 +2 22 +3 23 +4 24 +5 25 + +t4 +-- +1 31 +2 32 +3 33 +4 34 +5 35 +drop table t1; +create table t1 +(pk int key +,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED +) engine ndb; +insert into t1 values(1, 8388607, 16777215); +insert into t1 values(2, -8388608, 0); +insert into t1 values(3, -1, 1); +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +1;8388607;16777215 +2;-8388608;0 +3;-1;1 +drop table t1; +drop table t2; +drop table t3; +drop table t4; diff --git a/mysql-test/suite/ndb/r/ndb_row_format.result b/mysql-test/suite/ndb/r/ndb_row_format.result new file mode 100644 index 00000000000..ae165d87c5c --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_row_format.result @@ -0,0 +1,65 @@ +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists mysqltest; +CREATE TABLE t1 +( a INT KEY, +b VARCHAR(10) ) +ROW_FORMAT=FIXED +ENGINE=NDB; +ERROR HY000: Can't create table 'test.t1' (errno: 138) +SHOW WARNINGS; +Level Code Message +Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute' +Error 1005 Can't create table 'test.t1' (errno: 138) +CREATE TABLE t1 +( a INT KEY, +b INT ) +ENGINE=NDB; +ForceVarPart: 1 +DROP TABLE t1; +CREATE TABLE t1 +( a INT KEY, +b INT ) +ROW_FORMAT=DEFAULT +ENGINE=NDB; +ForceVarPart: 1 +DROP TABLE t1; +CREATE TABLE t1 +( a INT KEY, +b INT ) +ROW_FORMAT=FIXED +ENGINE=NDB; +ForceVarPart: 0 +DROP TABLE t1; +CREATE TABLE t1 +( a INT KEY, +b INT ) +ROW_FORMAT=DYNAMIC +ENGINE=NDB; +ForceVarPart: 1 +DROP TABLE t1; +create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; +insert into t1(b) values ('0123456789'); +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +select count(*) from t1; +count(*) +1024 +begin; +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +rollback; +select count(*),b from t1 group by b; +count(*) b +1024 0123456789 +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_single_user.result b/mysql-test/suite/ndb/r/ndb_single_user.result new file mode 100644 index 00000000000..54ae99b2f4f --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_single_user.result @@ -0,0 +1,119 @@ +use test; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +create table t1 (a int key, b int unique, c int) engine ndb; +ERROR HY000: Can't create table 'test.t1' (errno: 299) +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +ERROR HY000: Failed to create LOGFILE GROUP +show warnings; +Level Code Message +Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB +Error 1516 Failed to create LOGFILE GROUP +create table t1 (a int key, b int unique, c int) engine ndb; +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; +ERROR HY000: Failed to create TABLESPACE +show warnings; +Level Code Message +Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB +Error 1516 Failed to create TABLESPACE +DROP LOGFILE GROUP lg1 +ENGINE =NDB; +ERROR HY000: Failed to drop LOGFILE GROUP +show warnings; +Level Code Message +Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB +Error 1517 Failed to drop LOGFILE GROUP +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE NDB; +ERROR HY000: Failed to alter: DROP DATAFILE +show warnings; +Level Code Message +Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB +Error 1521 Failed to alter: DROP DATAFILE +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE NDB; +DROP TABLESPACE ts1 +ENGINE NDB; +ERROR HY000: Failed to drop TABLESPACE +show warnings; +Level Code Message +Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB +Error 1517 Failed to drop TABLESPACE +DROP TABLESPACE ts1 +ENGINE NDB; +DROP LOGFILE GROUP lg1 +ENGINE =NDB; +insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0); +create table t2 as select * from t1; +select * from t1 where a = 1; +a b c +1 1 0 +select * from t1 where b = 4; +a b c +4 4 0 +select * from t1 where a > 4 order by a; +a b c +5 5 0 +6 6 0 +7 7 0 +8 8 0 +9 9 0 +10 10 0 +update t1 set b=102 where a = 2; +update t1 set b=103 where b = 3; +update t1 set b=b+100; +update t1 set b=b+100 where a > 7; +delete from t1; +insert into t1 select * from t2; +create unique index new_index on t1 (b,c); +drop table t1; +ERROR 42S02: Unknown table 't1' +create index new_index_fail on t1 (c); +ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER +insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0); +ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER +select * from t1 where a = 1; +ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER +select * from t1 where b = 4; +ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER +update t1 set b=102 where a = 2; +ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER +update t1 set b=103 where b = 3; +ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER +update t1 set b=b+100; +ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER +update t1 set b=b+100 where a > 7; +ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER +BEGIN; +update t1 set b=b+100 where a=1; +BEGIN; +update t1 set b=b+100 where a=2; +update t1 set b=b+100 where a=3; +COMMIT; +update t1 set b=b+100 where a=4; +ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from NDBCLUSTER +COMMIT; +ERROR HY000: Got error 4350 'Transaction already aborted' from NDBCLUSTER +create table t2 (a int) engine myisam; +alter table t2 add column (b int); +drop table t2; +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_sp.result b/mysql-test/suite/ndb/r/ndb_sp.result new file mode 100644 index 00000000000..32e6d2eddd7 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_sp.result @@ -0,0 +1,44 @@ +drop table if exists t1; +create table t1 ( +a int not null primary key, +b int not null +) engine=ndb; +insert into t1 values (1,10), (2,20), (3,100), (4, 100); +create procedure test_proc1 (in var_in int) +begin +select * from t1 where a = var_in; +end; +create procedure test_proc2 (out var_out int) +begin +select b from t1 where a = 1 into var_out; +end; +create procedure test_proc3 (inout var_inout int) +begin +select b from t1 where a = var_inout into var_inout; +end; +// +call test_proc1(1); +a b +1 10 +call test_proc2(@test_var); +select @test_var; +@test_var +10 +set @test_var = 1; +call test_proc3(@test_var); +select @test_var; +@test_var +10 +alter procedure test_proc1 comment 'new comment'; +show create procedure test_proc1; +Procedure sql_mode Create Procedure +test_proc1 CREATE DEFINER=`root`@`localhost` PROCEDURE `test_proc1`(in var_in int) + COMMENT 'new comment' +begin +select * from t1 where a = var_in; +end +drop procedure test_proc1; +drop procedure test_proc2; +drop procedure test_proc3; +drop table t1; +End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_subquery.result b/mysql-test/suite/ndb/r/ndb_subquery.result new file mode 100644 index 00000000000..45662882d3a --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_subquery.result @@ -0,0 +1,92 @@ +drop table if exists t1, t2, t3, t4; +create table t1 (p int not null primary key, u int not null, o int not null, +unique (u), key(o)) engine=ndb; +create table t2 (p int not null primary key, u int not null, o int not null, +unique (u), key(o)) engine=ndb; +create table t3 (a int not null primary key, b int not null) engine=ndb; +create table t4 (c int not null primary key, d int not null) engine=ndb; +insert into t1 values (1,1,1),(2,2,2),(3,3,3); +insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5); +insert into t3 values (1,10), (2,10), (3,30), (4, 30); +insert into t4 values (1,10), (2,10), (3,30), (4, 30); +explain select * from t2 where p NOT IN (select p from t1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where +2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func # +select * from t2 where p NOT IN (select p from t1) order by p; +p u o +4 4 4 +5 5 5 +explain select * from t2 where p NOT IN (select u from t1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where +2 DEPENDENT SUBQUERY t1 unique_subquery u u 4 func # +select * from t2 where p NOT IN (select u from t1) order by p; +p u o +4 4 4 +5 5 5 +explain select * from t2 where p NOT IN (select o from t1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where +2 DEPENDENT SUBQUERY t1 index_subquery o o 4 func # +select * from t2 where p NOT IN (select o from t1) order by p; +p u o +4 4 4 +5 5 5 +explain select * from t2 where p NOT IN (select p+0 from t1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL # Using where +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL # Using where +select * from t2 where p NOT IN (select p+0 from t1) order by p; +p u o +4 4 4 +5 5 5 +drop table t1; +drop table t2; +create table t1 (p int not null primary key, u int not null) engine=ndb; +insert into t1 values (1,1),(2,2),(3,3); +create table t2 as +select t1.* +from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8 +where t1.u = t2.u +and t2.u = t3.u +and t3.u = t4.u +and t4.u = t5.u +and t5.u = t6.u +and t6.u = t7.u +and t7.u = t8.u; +select * from t2 order by 1; +p u +1 1 +2 2 +3 3 +select * from t3 where a = any (select c from t4 where c = 1) order by a; +a b +1 10 +select * from t3 where a in (select c from t4 where c = 1) order by a; +a b +1 10 +select * from t3 where a <> some (select c from t4 where c = 1) order by a; +a b +2 10 +3 30 +4 30 +select * from t3 where a > all (select c from t4 where c = 1) order by a; +a b +2 10 +3 30 +4 30 +select * from t3 where row(1,10) = (select c,d from t4 where c = 1) order by a; +a b +1 10 +2 10 +3 30 +4 30 +select * from t3 where exists (select * from t4 where c = 1) order by a; +a b +1 10 +2 10 +3 30 +4 30 +drop table if exists t1, t2, t3, t4; +End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_temporary.result b/mysql-test/suite/ndb/r/ndb_temporary.result new file mode 100644 index 00000000000..61fc1561e4f --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_temporary.result @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS t1; +create temporary table t1 (a int key) engine=ndb; +ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' +create temporary table t1 (a int key) engine=myisam; +alter table t1 engine=ndb; +ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY' +drop table t1; +SET SESSION storage_engine=NDBCLUSTER; +create table t1 (a int key); +select engine from information_schema.tables where table_name = 't1'; +engine +NDBCLUSTER +drop table t1; +create temporary table t1 (a int key); +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_transaction.result b/mysql-test/suite/ndb/r/ndb_transaction.result new file mode 100644 index 00000000000..691b91b1d36 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_transaction.result @@ -0,0 +1,257 @@ +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists mysqltest; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL +) ENGINE=ndbcluster; +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 1 +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; +attr1 +2 +rollback; +select count(*) from t1; +count(*) +0 +select * from t1 where pk1 = 1; +pk1 attr1 +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; +attr1 +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +commit; +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 1 +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; +attr1 +2 +begin; +update t1 set attr1 = attr1 * 2; +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 2 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +2 4 1 2 +rollback; +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 1 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +begin; +update t1 set attr1 = attr1 * 2; +commit; +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 2 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +2 4 1 2 +begin; +delete from t1 where attr1 = 2; +select count(*) from t1; +count(*) +1 +select * from t1 where pk1 = 1; +pk1 attr1 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +rollback; +select count(*) from t1; +count(*) +2 +select * from t1 where pk1 = 1; +pk1 attr1 +1 2 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +2 4 1 2 +begin; +delete from t1 where attr1 = 2; +commit; +select count(*) from t1; +count(*) +1 +select * from t1 where pk1 = 1; +pk1 attr1 +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +pk1 attr1 pk1 attr1 +DROP TABLE t1; +CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +select sum(id) from t1; +sum(id) +3 +select * from t1 where id = 1; +id id2 +1 1 +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; +id +2 +rollback; +select sum(id) from t1; +sum(id) +NULL +select * from t1 where id = 1; +id id2 +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; +id +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +commit; +select sum(id) from t1; +sum(id) +3 +select * from t1 where id = 1; +id id2 +1 1 +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; +id +2 +begin; +update t1 set id = id * 2; +select sum(id) from t1; +sum(id) +6 +select * from t1 where id = 2; +id id2 +2 1 +select * from t1, t1 as t1x where t1x.id = t1.id - 2; +id id2 id id2 +4 2 2 1 +rollback; +select sum(id) from t1; +sum(id) +3 +select * from t1 where id = 2; +id id2 +2 2 +select * from t1, t1 as t1x where t1x.id = t1.id - 2; +id id2 id id2 +begin; +update t1 set id = id * 2; +commit; +select sum(id) from t1; +sum(id) +6 +select * from t1 where id = 2; +id id2 +2 1 +select * from t1, t1 as t1x where t1x.id = t1.id - 2; +id id2 id id2 +4 2 2 1 +DROP TABLE t1; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +CREATE TABLE t3 ( +a bigint unsigned NOT NULL, +b bigint unsigned not null, +c bigint unsigned, +PRIMARY KEY(a) +) engine=ndbcluster; +CREATE TABLE t4 ( +a bigint unsigned NOT NULL, +b bigint unsigned not null, +c bigint unsigned NOT NULL, +d int unsigned, +PRIMARY KEY(a, b, c) +) engine=ndbcluster; +select count(*) from t2; +count(*) +0 +select count(*) from t3; +count(*) +0 +select count(*) from t4; +count(*) +0 +select count(*) from t2; +count(*) +100 +select count(*) from t3; +count(*) +100 +select count(*) from t4; +count(*) +100 +begin; +begin; +drop table t2; +drop table t3; +drop table t4; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +attr1 INT NOT NULL +) ENGINE=ndbcluster; +create database mysqltest; +use mysqltest; +CREATE TABLE t2 ( +a bigint unsigned NOT NULL PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +begin; +insert into test.t1 values(1,1); +insert into t2 values(1,1,1); +insert into test.t1 values(2,2); +insert into t2 values(2,2,2); +select count(*) from test.t1; +count(*) +2 +select count(*) from t2; +count(*) +2 +select * from test.t1 where pk1 = 1; +pk1 attr1 +1 1 +select * from t2 where a = 1; +a b c +1 1 1 +select test.t1.attr1 +from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; +attr1 +2 +select t2.a +from t2, t2 as t2x where t2.a = t2x.a + 1; +a +2 +select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; +pk1 a +1 2 +rollback; +select count(*) from test.t1; +count(*) +0 +select count(*) from t2; +count(*) +0 +drop table test.t1, t2; +drop database mysqltest; diff --git a/mysql-test/suite/ndb/r/ndb_trigger.result b/mysql-test/suite/ndb/r/ndb_trigger.result new file mode 100644 index 00000000000..28f9f9bdc37 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_trigger.result @@ -0,0 +1,315 @@ +drop table if exists t1, t2, t3, t4, t5; +create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; +create table t2 (op char(1), a int not null, b decimal (63,30)); +create table t3 select 1 as i; +create table t4 (a int not null primary key, b int) engine=ndb; +create table t5 (a int not null primary key, b int) engine=ndb; +create trigger t1_bu before update on t1 for each row +begin +insert into t2 values ("u", old.a, old.b); +set new.b = old.b + 10; +end;// +create trigger t1_bd before delete on t1 for each row +begin +insert into t2 values ("d", old.a, old.b); +end;// +create trigger t4_au after update on t4 +for each row begin +update t5 set b = b+1; +end; +// +create trigger t4_ad after delete on t4 +for each row begin +update t5 set b = b+1; +end; +// +insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (3, 3, 3.05), (4, 4, 4.05); +insert into t4 values (1,1), (2,2), (3,3), (4, 4); +insert into t5 values (1,0); +update t1 set a=5 where a != 3; +select * from t1 order by id; +id a b +1 5 11.050000000000000000000000000000 +2 5 12.050000000000000000000000000000 +3 3 3.050000000000000000000000000000 +4 5 14.050000000000000000000000000000 +select * from t2 order by op, a, b; +op a b +u 1 1.050000000000000000000000000000 +u 2 2.050000000000000000000000000000 +u 4 4.050000000000000000000000000000 +delete from t2; +update t1, t3 set a=6 where a = 5; +select * from t1 order by id; +id a b +1 6 21.050000000000000000000000000000 +2 6 22.050000000000000000000000000000 +3 3 3.050000000000000000000000000000 +4 6 24.050000000000000000000000000000 +select * from t2 order by op, a, b; +op a b +u 5 11.050000000000000000000000000000 +u 5 12.050000000000000000000000000000 +u 5 14.050000000000000000000000000000 +delete from t2; +delete from t1 where a != 3; +select * from t1 order by id; +id a b +3 3 3.050000000000000000000000000000 +select * from t2 order by op, a, b; +op a b +d 6 21.050000000000000000000000000000 +d 6 22.050000000000000000000000000000 +d 6 24.050000000000000000000000000000 +delete from t2; +insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (4, 4, 4.05); +delete t1 from t1, t3 where a != 3; +select * from t1 order by id; +id a b +3 3 3.050000000000000000000000000000 +select * from t2 order by op, a, b; +op a b +d 1 1.050000000000000000000000000000 +d 2 2.050000000000000000000000000000 +d 4 4.050000000000000000000000000000 +delete from t2; +insert into t1 values (4, 4, 4.05); +insert into t1 (id, a) values (4, 1), (3, 1) on duplicate key update a= a + 1; +select * from t1 order by id; +id a b +3 4 13.050000000000000000000000000000 +4 5 14.050000000000000000000000000000 +select * from t2 order by op, a, b; +op a b +u 3 3.050000000000000000000000000000 +u 4 4.050000000000000000000000000000 +delete from t2; +delete from t3; +insert into t3 values (4), (3); +insert into t1 (id, a) (select i, 1 from t3) on duplicate key update a= a + 1; +select * from t1 order by id; +id a b +3 5 23.050000000000000000000000000000 +4 6 24.050000000000000000000000000000 +select * from t2 order by op, a, b; +op a b +u 4 13.050000000000000000000000000000 +u 5 14.050000000000000000000000000000 +delete from t2; +replace into t1 (id, a) values (4, 1), (3, 1); +select * from t1 order by id; +id a b +3 1 0.000000000000000000000000000000 +4 1 0.000000000000000000000000000000 +select * from t2 order by op, a, b; +op a b +d 5 23.050000000000000000000000000000 +d 6 24.050000000000000000000000000000 +delete from t1; +delete from t2; +insert into t1 values (3, 1, 1.05), (4, 1, 2.05); +replace into t1 (id, a) (select i, 2 from t3); +select * from t1 order by id; +id a b +3 2 0.000000000000000000000000000000 +4 2 0.000000000000000000000000000000 +select * from t2 order by op, a, b; +op a b +d 1 1.050000000000000000000000000000 +d 1 2.050000000000000000000000000000 +delete from t1; +delete from t2; +insert into t1 values (3, 1, 1.05), (5, 2, 2.05); +load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a); +select * from t1 order by id; +id a b +3 4 0.000000000000000000000000000000 +5 6 0.000000000000000000000000000000 +select * from t2 order by op, a, b; +op a b +d 1 1.050000000000000000000000000000 +d 2 2.050000000000000000000000000000 +update t4 set b = 10 where a = 1; +select * from t5 order by a; +a b +1 1 +update t5 set b = 0; +delete from t4 where a = 1; +select * from t5 order by a; +a b +1 1 +drop trigger t4_au; +drop trigger t4_ad; +drop table t1, t2, t3, t4, t5; +CREATE TABLE t1 ( +id INT NOT NULL PRIMARY KEY, +xy INT +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (1, 0); +CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // +CREATE TABLE t2 ( +id INT NOT NULL PRIMARY KEY, +xy INT +) ENGINE=ndbcluster; +INSERT INTO t2 VALUES (2, 0); +CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; +INSERT INTO t3 VALUES (1); +CREATE TABLE t4 LIKE t1; +CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // +CREATE TABLE t5 LIKE t2; +UPDATE t1 SET xy = 3 WHERE id = 1; +SELECT xy FROM t1 where id = 1; +xy +3 +SELECT xy FROM t2 where id = 1; +xy +3 +UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +xy +4 +SELECT xy FROM t2 where id = 1; +xy +4 +INSERT INTO t4 SELECT * FROM t1; +INSERT INTO t5 SELECT * FROM t2; +UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; +SELECT xy FROM t1 where id = 1; +xy +3 +SELECT xy FROM t2 where id = 1; +xy +3 +SELECT xy FROM t4 where id = 1; +xy +3 +SELECT xy FROM t5 where id = 1; +xy +3 +UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +xy +4 +SELECT xy FROM t2 where id = 1; +xy +4 +SELECT xy FROM t4 where id = 1; +xy +4 +SELECT xy FROM t5 where id = 1; +xy +4 +INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; +SELECT xy FROM t1 where id = 1; +xy +5 +SELECT xy FROM t2 where id = 1; +xy +5 +DROP TRIGGER t1_update; +DROP TRIGGER t4_update; +CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // +CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // +INSERT INTO t1 VALUES (5, 0),(6,0); +INSERT INTO t2 VALUES (5, 1),(6,1); +INSERT INTO t3 VALUES (5); +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +id xy +1 5 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +INSERT INTO t1 VALUES (5,0); +UPDATE t2 SET xy = 1 WHERE id = 6; +TRUNCATE t4; +INSERT INTO t4 SELECT * FROM t1; +TRUNCATE t5; +INSERT INTO t5 SELECT * FROM t2; +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +SELECT * FROM t4 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t5 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +id xy +1 5 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +SELECT * FROM t4 order by id; +id xy +1 5 +6 0 +SELECT * FROM t5 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +INSERT INTO t1 VALUES (5, 0); +REPLACE INTO t2 VALUES (6,1); +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +REPLACE INTO t1 VALUES (5, 1); +SELECT * FROM t1 order by id; +id xy +1 5 +5 1 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +DROP TRIGGER t1_delete; +DROP TRIGGER t4_delete; +DROP TABLE t1, t2, t3, t4, t5; +End of 5.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_truncate.result b/mysql-test/suite/ndb/r/ndb_truncate.result new file mode 100644 index 00000000000..811e5e3afeb --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_truncate.result @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 ( +a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, +b int unsigned not null, +c int unsigned +) engine=ndbcluster; +select count(*) from t1; +count(*) +5000 +select * from t1 order by a limit 2; +a b c +1 509 2500 +2 510 7 +truncate table t1; +select count(*) from t1; +count(*) +0 +insert into t1 values(NULL,1,1),(NULL,2,2); +select * from t1 order by a; +a b c +1 1 1 +2 2 2 +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndb_types.result b/mysql-test/suite/ndb/r/ndb_types.result new file mode 100644 index 00000000000..ec2858d818a --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_types.result @@ -0,0 +1,76 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +auto int(5) unsigned NOT NULL auto_increment, +string char(10) default "hello", +vstring varchar(10) default "hello", +bin binary(2), +vbin varbinary(7), +tiny tinyint(4) DEFAULT '0' NOT NULL , +short smallint(6) DEFAULT '1' NOT NULL , +medium mediumint(8) DEFAULT '0' NOT NULL, +long_int int(11) DEFAULT '0' NOT NULL, +longlong bigint(13) DEFAULT '0' NOT NULL, +real_float float(13,1) DEFAULT 0.0 NOT NULL, +real_double double(16,4), +real_decimal decimal(16,4), +utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, +ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, +umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, +ulong int(11) unsigned DEFAULT '0' NOT NULL, +ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, +bits bit(3), +options enum('one','two','tree') not null, +flags set('one','two','tree') not null, +date_field date, +year_field year, +time_field time, +date_time datetime, +time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, +PRIMARY KEY (auto), +KEY (utiny), +KEY (tiny), +KEY (short), +KEY any_name (medium), +KEY (longlong), +KEY (real_float), +KEY (ushort), +KEY (umedium), +KEY (ulong), +KEY (ulonglong,ulong), +KEY (options,flags) +); +set @now = now(); +insert into t1 +(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, +real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong, +bits,options,flags,date_field,year_field,time_field,date_time) +values +("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, +b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); +select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, +real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, +bits,options,flags,date_field,year_field,time_field,date_time +from t1; +auto string vstring bin vbin tiny short medium long_int longlong real_float real_double real_decimal utiny ushort umedium ulong ulonglong bits options flags date_field year_field time_field date_time +1 aaaa aaaa ªª ªª -1 -1 -1 -1 -1 1.1 1.1000 1.1000 1 00001 1 1 1  one one 1901-01-01 1901 01:01:01 1901-01-01 01:01:01 +select time_stamp>@now from t1; +time_stamp>@now +1 +set @now = now(); +update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB, +tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2, +real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2, +ulonglong=2, bits=b'010', +options='one',flags='one', date_field='1902-02-02',year_field='1902', +time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1; +select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, +real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, +bits,options,flags,date_field,year_field,time_field,date_time +from t1; +auto string vstring bin vbin tiny short medium long_int longlong real_float real_double real_decimal utiny ushort umedium ulong ulonglong bits options flags date_field year_field time_field date_time +1 bbbb bbbb »» »» -2 -2 -2 -2 -2 2.2 2.2000 2.2000 2 00002 2 2 2  one one 1902-02-02 1902 02:02:02 1902-02-02 02:02:02 +select time_stamp>@now from t1; +time_stamp>@now +1 +drop table t1; +End of 4.1 tests diff --git a/mysql-test/suite/ndb/r/ndb_update.result b/mysql-test/suite/ndb/r/ndb_update.result new file mode 100644 index 00000000000..919b8c44a40 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_update.result @@ -0,0 +1,42 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +pk1 INT NOT NULL PRIMARY KEY, +b INT NOT NULL, +c INT NOT NULL UNIQUE +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2); +UPDATE t1 set b = c; +select * from t1 order by pk1; +pk1 b c +0 0 0 +1 1 1 +2 2 2 +UPDATE t1 set pk1 = 4 where pk1 = 1; +select * from t1 order by pk1; +pk1 b c +0 0 0 +2 2 2 +4 1 1 +UPDATE t1 set pk1 = 4 where pk1 = 2; +ERROR 23000: Duplicate entry '4' for key 'PRIMARY' +UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2; +select * from t1 order by pk1; +pk1 b c +0 0 0 +2 2 2 +4 1 1 +UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4; +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4; +select * from t1 order by pk1; +pk1 b c +0 0 0 +2 2 2 +4 1 1 +UPDATE t1 set pk1 = pk1 + 10; +select * from t1 order by pk1; +pk1 b c +10 0 0 +12 2 2 +14 1 1 +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/ndb/r/ndb_view.result b/mysql-test/suite/ndb/r/ndb_view.result new file mode 100644 index 00000000000..b7d1b6860c8 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_view.result @@ -0,0 +1,24 @@ +DROP TABLE IF EXISTS t1,t2,t3; +DROP VIEW IF EXISTS v1,v2,v3; +create table t1 (a int, b int, c int, d int) engine=ndb; +insert into t1 values (1,2,3,4),(5,6,7,8); +create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1; +select * from v1 order by a,b,c; +a b c d +3 1 4 6 +7 5 8 18 +update v1 set a=a+100 where b=1; +select * from v1 order by a,b,c; +a b c d +7 5 8 18 +103 1 4 106 +drop view v1; +create view v1 as select t1.c as a from t1; +insert into v1 values (200); +select * from t1 order by a,b,c,d; +a b c d +NULL NULL 200 NULL +1 2 103 4 +5 6 7 8 +drop view v1; +drop table t1; diff --git a/mysql-test/suite/ndb/r/ndbapi.result b/mysql-test/suite/ndb/r/ndbapi.result new file mode 100644 index 00000000000..8e680391a81 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndbapi.result @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS t0; +drop database if exists mysqltest; +Running ndbapi_simple +Running ndbapi_simple_index +Running ndbapi_scan +Running ndbapi_retries +Running ndbapi_async +Running ndbapi_async1 +use TEST_DB; +create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text, +primary key(c0, c2)) engine ndb charset latin1; +insert into t0 values (1, 2, 'a', 'b', null); +insert into t0 values (3, 4, 'c', 'd', null); +update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; +update t0 set c3 = 'f'; +update t0 set c3 = 'F'; +update t0 set c2 = 'g' where c0 = 1; +update t0 set c2 = 'G' where c0 = 1; +update t0 set c0 = 5, c2 = 'H' where c0 = 3; +delete from t0; +drop table t0; +Running mgmapi_logevent diff --git a/mysql-test/suite/ndb/r/partition_03ndb.result b/mysql-test/suite/ndb/r/partition_03ndb.result new file mode 100644 index 00000000000..28339cc7435 --- /dev/null +++ b/mysql-test/suite/ndb/r/partition_03ndb.result @@ -0,0 +1,1361 @@ +SET SESSION storage_engine='NDB' ; +SET @max_row = 200; +SET AUTOCOMMIT= 1; +#------------------------------------------------------------------------ +# 0. Creation of an auxiliary table needed in all testcases +#------------------------------------------------------------------------ +DROP TABLE IF EXISTS t0_template; +CREATE TABLE t0_template ( f1 INTEGER, f2 char(20), PRIMARY KEY(f1)) +ENGINE = MEMORY; +# Logging of 200 INSERTs into t0_template suppressed +#------------------------------------------------------------------------ +# 1. Some syntax checks +#------------------------------------------------------------------------ +# 1.1 Subpartioned table without subpartitioning rule must be rejected +DROP TABLE IF EXISTS t1; +#------------------------------------------------------------------------ +# 2. Checks where the engine is set on all supported CREATE TABLE +# statement positions + basic operations on the tables +#------------------------------------------------------------------------ +DROP TABLE IF EXISTS t1; +# 2.1 table (non partitioned) for comparison +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB' ; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +# 2.2 table with engine setting just after column list +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB' +PARTITION BY HASH(f1) PARTITIONS 2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 2 +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +# 2.3 table with engine setting in the named partition part +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) +( PARTITION part1 STORAGE ENGINE = 'NDB' , +PARTITION part2 STORAGE ENGINE = 'NDB' +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +# 2.4 table with engine setting in the named subpartition part +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) +SUBPARTITION BY HASH(f1) +( PARTITION part1 VALUES LESS THAN (1000) +(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' , +SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), +PARTITION part2 VALUES LESS THAN (2000) +(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' , +SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' ) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +# 2.5 Ugly "incomplete" storage engine assignments +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) +( PARTITION part1 STORAGE ENGINE = 'NDB' , +PARTITION part2 +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) +( PARTITION part1 , +PARTITION part2 STORAGE ENGINE = 'NDB' +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) +SUBPARTITION BY HASH(f1) +( PARTITION part1 VALUES LESS THAN (1000) +(SUBPARTITION subpart11, +SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), +PARTITION part2 VALUES LESS THAN (2000) +(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' , +SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' ) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) +SUBPARTITION BY HASH(f1) +( PARTITION part1 VALUES LESS THAN (1000) +(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' , +SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), +PARTITION part2 VALUES LESS THAN (2000) +(SUBPARTITION subpart21 , +SUBPARTITION subpart22 ) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +# 2.6 Ugly "over determined" storage engine assignments +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB' +PARTITION BY HASH(f1) +( PARTITION part1 STORAGE ENGINE = 'NDB' , +PARTITION part2 STORAGE ENGINE = 'NDB' +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) ENGINE = 'NDB' +PARTITION BY RANGE(f1) +SUBPARTITION BY HASH(f1) +( PARTITION part1 VALUES LESS THAN (1000) +(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' , +SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), +PARTITION part2 VALUES LESS THAN (2000) +(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' , +SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' ) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) +SUBPARTITION BY HASH(f1) +( PARTITION part1 VALUES LESS THAN (1000) STORAGE ENGINE = 'NDB' +(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' , +SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), +PARTITION part2 VALUES LESS THAN (2000) +(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' , +SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' ) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +# 2.7 Ugly storage engine assignments mixups +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) +SUBPARTITION BY HASH(f1) +( PARTITION part1 VALUES LESS THAN (1000) ENGINE = 'NDB' +(SUBPARTITION subpart11 , +SUBPARTITION subpart12 ), +PARTITION part2 VALUES LESS THAN (2000) +(SUBPARTITION subpart21 STORAGE ENGINE = 'NDB' , +SUBPARTITION subpart22 STORAGE ENGINE = 'NDB' ) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) +SUBPARTITION BY HASH(f1) +( PARTITION part1 VALUES LESS THAN (1000) +(SUBPARTITION subpart11 STORAGE ENGINE = 'NDB' , +SUBPARTITION subpart12 STORAGE ENGINE = 'NDB' ), +PARTITION part2 VALUES LESS THAN (2000) ENGINE = 'NDB' +(SUBPARTITION subpart21 , +SUBPARTITION subpart22 ) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +# 2.8 Session default engine differs from engine used within create table +SET SESSION storage_engine='MEMORY'; +SET SESSION storage_engine='NDB' ; +#------------------------------------------------------------------------ +# 3. Check number of partitions and subpartitions +#------------------------------------------------------------------------ +DROP TABLE IF EXISTS t1; +# 3.1 (positive) without partition/subpartition number assignment +# 3.1.1 no partition number, no named partitions, no subpartitions mentioned +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +# 3.1.2 no partition number, named partitions, no subpartitions mentioned +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) (PARTITION part1, PARTITION part2); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +# 3.1.3 variations on no partition/subpartition number, named partitions, +# different subpartitions are/are not named +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) (PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2000), PARTITION part3 VALUES LESS THAN (2147483647)) ; +DROP TABLE t1; +# FIXME several subtestcases of 3.1.3 disabled because of server crashes +# Bug#15407 Partitions: crash if subpartition +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) (PARTITION part1 VALUES LESS THAN (1000) +(SUBPARTITION subpart11 , SUBPARTITION subpart12 ), PARTITION part2 VALUES LESS THAN (2000) +(SUBPARTITION subpart21 , SUBPARTITION subpart22 ), PARTITION part3 VALUES LESS THAN (2147483647) +(SUBPARTITION subpart21 , SUBPARTITION subpart22 )) ; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2000) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster), PARTITION part3 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +# 3.2 partition/subpartition numbers good and bad values and notations +DROP TABLE IF EXISTS t1; +# 3.2.1 partition/subpartition numbers INTEGER notation +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS 2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 2 +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS 2 +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 2 (PARTITION part1 VALUES LESS THAN (1000) , PARTITION part2 VALUES LESS THAN (2147483647) ) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS 1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) PARTITIONS 1 +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS 1 +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) SUBPARTITIONS 1 (PARTITION part1 VALUES LESS THAN (1000) , PARTITION part2 VALUES LESS THAN (2147483647) ) +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 200; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +UPDATE t1 SET f1 = f1 + 200 +WHERE f1 BETWEEN 100 - 50 AND 100 + 50; +SELECT (COUNT(*) = 200) AND (MIN(f1) = 1) AND (MAX(f1) = 100 + 50 + 200 ) +AS my_value FROM t1; +my_value +1 +DELETE FROM t1 +WHERE f1 BETWEEN 100 - 50 + 200 AND 100 + 50 + 200; +SELECT (COUNT(*) = 200 - 50 - 50 - 1) AND (MIN(f1) = 1) AND (MAX(f1) = 200) +AS my_value FROM t1; +my_value +1 +INSERT INTO t1 SET f1 = 0 , f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 0 AND f2 = '#######'; +my_value +1 +INSERT INTO t1 SET f1 = 200 + 1, f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 1 AND f2 = '#######'; +my_value +1 +UPDATE t1 SET f1 = 200 + 2, f2 = 'ZZZZZZZ' + WHERE f1 = 0 AND f2 = '#######'; +SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +my_value +1 +DELETE FROM t1 WHERE f1 = 200 + 2 AND f2 = 'ZZZZZZZ'; +SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ'; +my_value +1 +TRUNCATE t1; +SELECT COUNT(*) = 0 AS my_value FROM t1; +my_value +1 +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS 0; +ERROR HY000: Number of partitions = 0 is not an allowed value +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS 0 +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR HY000: Number of subpartitions = 0 is not an allowed value +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS -1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS -1 +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1 +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS 1000000; +ERROR HY000: Too many partitions were defined +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS 1000000 +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR HY000: Too many partitions were defined +# 3.2.4 partition/subpartition numbers STRING notation +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS '2'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2'' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS '2' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS '2.0'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2.0'' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS '2.0' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2.0' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS '0.2E+1'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0.2E+1'' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS '0.2E+1' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''0.2E+1' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS T' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS '2A'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2A'' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS '2A' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2A' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS 'A2'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''A2'' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS 'A2' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''A2' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS ''; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS '' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS 'GARBAGE'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''GARBAGE'' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS 'GARBAGE' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''GARBAGE' +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS ' at line 3 +# 3.2.5 partition/subpartition numbers other notations +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS 2A; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2A' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS 2A +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2A +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS A2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A2' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS A2 +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A2 +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS GARBAGE; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS GARBAGE +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GARBAGE +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS TH' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS "2"; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2"' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS "2" +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2" +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS "2A"; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2A"' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS "2A" +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"2A" +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS "A2"; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"A2"' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS "A2" +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"A2" +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN ' at line 3 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS "GARBAGE"; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GARBAGE"' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) SUBPARTITION BY HASH(f1) +SUBPARTITIONS "GARBAGE" +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS THAN (2147483647)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"GARBAGE" +(PARTITION part1 VALUES LESS THAN (1000), PARTITION part2 VALUES LESS ' at line 3 +# 3.3 Mixups of number and names of partition/subpartition assigned +# 3.3.1 (positive) number of partition/subpartition = number of named partition/subpartition +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1, PARTITION part2 ) ; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH (f1) (PARTITION part1 ENGINE = ndbcluster, PARTITION part2 ENGINE = ndbcluster) +DROP TABLE t1; +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) PARTITIONS 2 +SUBPARTITION BY HASH(f1) SUBPARTITIONS 2 +( PARTITION part1 VALUES LESS THAN (1000) +(SUBPARTITION subpart11, SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (2147483647) +(SUBPARTITION subpart21, SUBPARTITION subpart22) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) default NULL, + `f2` char(20) default NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (f1) SUBPARTITION BY HASH (f1) (PARTITION part1 VALUES LESS THAN (1000) (SUBPARTITION subpart11 ENGINE = ndbcluster, SUBPARTITION subpart12 ENGINE = ndbcluster), PARTITION part2 VALUES LESS THAN (2147483647) (SUBPARTITION subpart21 ENGINE = ndbcluster, SUBPARTITION subpart22 ENGINE = ndbcluster)) +DROP TABLE t1; +# 3.3.2 (positive) number of partition/subpartition , 0 (= no) named partition/subpartition +# already checked above +# 3.3.3 (negative) number of partitions > number of named partitions +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) PARTITIONS 2 ( PARTITION part1 ) ; +ERROR 42000: Wrong number of partitions defined, mismatch with previous setting near ')' at line 2 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) +SUBPARTITION BY HASH(f1) SUBPARTITIONS 2 +( PARTITION part1 VALUES LESS THAN (1000) +(SUBPARTITION subpart11 ), +PARTITION part2 VALUES LESS THAN (2147483647) +(SUBPARTITION subpart21, SUBPARTITION subpart22) +); +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), +PARTITION part2 VALUES LESS THAN (2147483647) +(SUBPARTITION subpart21, SUBPAR' at line 5 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) +SUBPARTITION BY HASH(f1) SUBPARTITIONS 2 +( PARTITION part1 VALUES LESS THAN (1000) +(SUBPARTITION subpart11, SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (2000) +(SUBPARTITION subpart21 ), +PARTITION part3 VALUES LESS THAN (2147483647) +(SUBPARTITION subpart31, SUBPARTITION subpart32) +); +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '), +PARTITION part3 VALUES LESS THAN (2147483647) +(SUBPARTITION subpart31, SUBPAR' at line 7 +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY RANGE(f1) PARTITIONS 2 +SUBPARTITION BY HASH(f1) SUBPARTITIONS 2 +( PARTITION part1 VALUES LESS THAN (1000) +(SUBPARTITION subpart11, SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (2147483647) +(SUBPARTITION subpart21 ) +); +ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ') +)' at line 7 +#------------------------------------------------------------------------ +# 4. Checks of logical partition/subpartition name +# file name clashes during CREATE TABLE +#------------------------------------------------------------------------ +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1) (PARTITION part1, PARTITION part1); +ERROR HY000: Duplicate partition name part1 +#------------------------------------------------------------------------ +# 5. Alter table experiments +#------------------------------------------------------------------------ +# 5.1 alter table add partition +# 5.1.1 (negative) add partition to non partitioned table +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)); +# FIXME Why does the error numbers of MyISAM(1482) and NDB(1005) differ ? +ALTER TABLE t1 ADD PARTITION (PARTITION part1); +Got one of the listed errors +DROP TABLE t1; +# 5.1.2 Add one partition to a table with one partition +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) +PARTITION BY HASH(f1); +INSERT INTO t1 SELECT * FROM t0_template WHERE f1 BETWEEN 1 AND 100; diff --git a/mysql-test/suite/ndb/r/ps_7ndb.result b/mysql-test/suite/ndb/r/ps_7ndb.result new file mode 100644 index 00000000000..26475f4c147 --- /dev/null +++ b/mysql-test/suite/ndb/r/ps_7ndb.result @@ -0,0 +1,3127 @@ +use test; +drop table if exists t1, t9 ; +create table t1 +( +a int, b varchar(30), +primary key(a) +) engine = 'NDB' ; +create table t9 +( +c1 tinyint, c2 smallint, c3 mediumint, c4 int, +c5 integer, c6 bigint, c7 float, c8 double, +c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, +c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, +c25 blob, c26 text, c27 mediumblob, c28 mediumtext, +c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), +c32 set('monday', 'tuesday', 'wednesday'), +primary key(c1) +) engine = 'NDB' ; +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +test_sequence +------ simple select tests ------ +prepare stmt1 from ' select * from t9 order by c1 ' ; +execute stmt1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def test t9 t9 c1 c1 1 4 1 N 49155 0 63 +def test t9 t9 c2 c2 2 6 1 Y 32768 0 63 +def test t9 t9 c3 c3 9 9 1 Y 32768 0 63 +def test t9 t9 c4 c4 3 11 1 Y 32768 0 63 +def test t9 t9 c5 c5 3 11 1 Y 32768 0 63 +def test t9 t9 c6 c6 8 20 1 Y 32768 0 63 +def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 +def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 +def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 +def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 +def test t9 t9 c11 c11 246 9 6 Y 0 4 63 +def test t9 t9 c12 c12 246 10 6 Y 0 4 63 +def test t9 t9 c13 c13 10 10 10 Y 128 0 63 +def test t9 t9 c14 c14 12 19 19 Y 128 0 63 +def test t9 t9 c15 c15 7 19 19 N 1249 0 63 +def test t9 t9 c16 c16 11 8 8 Y 128 0 63 +def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 +def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 +def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 +def test t9 t9 c20 c20 254 1 1 Y 0 0 8 +def test t9 t9 c21 c21 254 10 10 Y 0 0 8 +def test t9 t9 c22 c22 253 30 30 Y 0 0 8 +def test t9 t9 c23 c23 252 255 8 Y 144 0 63 +def test t9 t9 c24 c24 252 255 8 Y 16 0 8 +def test t9 t9 c25 c25 252 65535 4 Y 144 0 63 +def test t9 t9 c26 c26 252 65535 4 Y 16 0 8 +def test t9 t9 c27 c27 252 16777215 10 Y 144 0 63 +def test t9 t9 c28 c28 252 16777215 10 Y 16 0 8 +def test t9 t9 c29 c29 252 4294967295 8 Y 144 0 63 +def test t9 t9 c30 c30 252 4294967295 8 Y 16 0 8 +def test t9 t9 c31 c31 254 5 3 Y 256 0 8 +def test t9 t9 c32 c32 254 24 7 Y 2048 0 8 +c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 c31 c32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +9 9 9 9 9 9 9 9 9 9 9.0000 9.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 0 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext two tuesday +set @arg00='SELECT' ; +@arg00 a from t1 where a=1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a from t1 where a=1' at line 1 +prepare stmt1 from ' ? a from t1 where a=1 '; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a from t1 where a=1' at line 1 +set @arg00=1 ; +select @arg00, b from t1 where a=1 ; +@arg00 b +1 one +prepare stmt1 from ' select ?, b from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +? b +1 one +set @arg00='lion' ; +select @arg00, b from t1 where a=1 ; +@arg00 b +lion one +prepare stmt1 from ' select ?, b from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +? b +lion one +set @arg00=NULL ; +select @arg00, b from t1 where a=1 ; +@arg00 b +NULL one +prepare stmt1 from ' select ?, b from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +? b +NULL one +set @arg00=1 ; +select b, a - @arg00 from t1 where a=1 ; +b a - @arg00 +one 0 +prepare stmt1 from ' select b, a - ? from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +b a - ? +one 0 +set @arg00=null ; +select @arg00 as my_col ; +my_col +NULL +prepare stmt1 from ' select ? as my_col'; +execute stmt1 using @arg00 ; +my_col +NULL +select @arg00 + 1 as my_col ; +my_col +NULL +prepare stmt1 from ' select ? + 1 as my_col'; +execute stmt1 using @arg00 ; +my_col +NULL +select 1 + @arg00 as my_col ; +my_col +NULL +prepare stmt1 from ' select 1 + ? as my_col'; +execute stmt1 using @arg00 ; +my_col +NULL +set @arg00='MySQL' ; +select substr(@arg00,1,2) from t1 where a=1 ; +substr(@arg00,1,2) +My +prepare stmt1 from ' select substr(?,1,2) from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +substr(?,1,2) +My +set @arg00=3 ; +select substr('MySQL',@arg00,5) from t1 where a=1 ; +substr('MySQL',@arg00,5) +SQL +prepare stmt1 from ' select substr(''MySQL'',?,5) from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +substr('MySQL',?,5) +SQL +select substr('MySQL',1,@arg00) from t1 where a=1 ; +substr('MySQL',1,@arg00) +MyS +prepare stmt1 from ' select substr(''MySQL'',1,?) from t1 where a=1 ' ; +execute stmt1 using @arg00 ; +substr('MySQL',1,?) +MyS +set @arg00='MySQL' ; +select a , concat(@arg00,b) from t1 order by a; +a concat(@arg00,b) +1 MySQLone +2 MySQLtwo +3 MySQLthree +4 MySQLfour +prepare stmt1 from ' select a , concat(?,b) from t1 order by a ' ; +execute stmt1 using @arg00; +a concat(?,b) +1 MySQLone +2 MySQLtwo +3 MySQLthree +4 MySQLfour +select a , concat(b,@arg00) from t1 order by a ; +a concat(b,@arg00) +1 oneMySQL +2 twoMySQL +3 threeMySQL +4 fourMySQL +prepare stmt1 from ' select a , concat(b,?) from t1 order by a ' ; +execute stmt1 using @arg00; +a concat(b,?) +1 oneMySQL +2 twoMySQL +3 threeMySQL +4 fourMySQL +set @arg00='MySQL' ; +select group_concat(@arg00,b order by a) from t1 +group by 'a' ; +group_concat(@arg00,b order by a) +MySQLone,MySQLtwo,MySQLthree,MySQLfour +prepare stmt1 from ' select group_concat(?,b order by a) from t1 +group by ''a'' ' ; +execute stmt1 using @arg00; +group_concat(?,b order by a) +MySQLone,MySQLtwo,MySQLthree,MySQLfour +select group_concat(b,@arg00 order by a) from t1 +group by 'a' ; +group_concat(b,@arg00 order by a) +oneMySQL,twoMySQL,threeMySQL,fourMySQL +prepare stmt1 from ' select group_concat(b,? order by a) from t1 +group by ''a'' ' ; +execute stmt1 using @arg00; +group_concat(b,? order by a) +oneMySQL,twoMySQL,threeMySQL,fourMySQL +set @arg00='first' ; +set @arg01='second' ; +set @arg02=NULL; +select @arg00, @arg01 from t1 where a=1 ; +@arg00 @arg01 +first second +prepare stmt1 from ' select ?, ? from t1 where a=1 ' ; +execute stmt1 using @arg00, @arg01 ; +? ? +first second +execute stmt1 using @arg02, @arg01 ; +? ? +NULL second +execute stmt1 using @arg00, @arg02 ; +? ? +first NULL +execute stmt1 using @arg02, @arg02 ; +? ? +NULL NULL +drop table if exists t5 ; +create table t5 (id1 int(11) not null default '0', +value2 varchar(100), value1 varchar(100)) ; +insert into t5 values (1,'hh','hh'),(2,'hh','hh'), +(1,'ii','ii'),(2,'ii','ii') ; +prepare stmt1 from ' select id1,value1 from t5 where id1=? or value1=? order by id1,value1 ' ; +set @arg00=1 ; +set @arg01='hh' ; +execute stmt1 using @arg00, @arg01 ; +id1 value1 +1 hh +1 ii +2 hh +drop table t5 ; +drop table if exists t5 ; +create table t5(session_id char(9) not null) ; +insert into t5 values ('abc') ; +prepare stmt1 from ' select * from t5 +where ?=''1111'' and session_id = ''abc'' ' ; +set @arg00='abc' ; +execute stmt1 using @arg00 ; +session_id +set @arg00='1111' ; +execute stmt1 using @arg00 ; +session_id +abc +set @arg00='abc' ; +execute stmt1 using @arg00 ; +session_id +drop table t5 ; +set @arg00='FROM' ; +select a @arg00 t1 where a=1 ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 t1 where a=1' at line 1 +prepare stmt1 from ' select a ? t1 where a=1 ' ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? t1 where a=1' at line 1 +set @arg00='t1' ; +select a from @arg00 where a=1 ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 where a=1' at line 1 +prepare stmt1 from ' select a from ? where a=1 ' ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? where a=1' at line 1 +set @arg00='WHERE' ; +select a from t1 @arg00 a=1 ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 a=1' at line 1 +prepare stmt1 from ' select a from t1 ? a=1 ' ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? a=1' at line 1 +set @arg00=1 ; +select a FROM t1 where a=@arg00 ; +a +1 +prepare stmt1 from ' select a FROM t1 where a=? ' ; +execute stmt1 using @arg00 ; +a +1 +set @arg00=1000 ; +execute stmt1 using @arg00 ; +a +set @arg00=NULL ; +select a FROM t1 where a=@arg00 ; +a +prepare stmt1 from ' select a FROM t1 where a=? ' ; +execute stmt1 using @arg00 ; +a +set @arg00=4 ; +select a FROM t1 where a=sqrt(@arg00) ; +a +2 +prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ; +execute stmt1 using @arg00 ; +a +2 +set @arg00=NULL ; +select a FROM t1 where a=sqrt(@arg00) ; +a +prepare stmt1 from ' select a FROM t1 where a=sqrt(?) ' ; +execute stmt1 using @arg00 ; +a +set @arg00=2 ; +set @arg01=3 ; +select a FROM t1 where a in (@arg00,@arg01) order by a; +a +2 +3 +prepare stmt1 from ' select a FROM t1 where a in (?,?) order by a '; +execute stmt1 using @arg00, @arg01; +a +2 +3 +set @arg00= 'one' ; +set @arg01= 'two' ; +set @arg02= 'five' ; +prepare stmt1 from ' select b FROM t1 where b in (?,?,?) order by b ' ; +execute stmt1 using @arg00, @arg01, @arg02 ; +b +one +two +prepare stmt1 from ' select b FROM t1 where b like ? '; +set @arg00='two' ; +execute stmt1 using @arg00 ; +b +two +set @arg00='tw%' ; +execute stmt1 using @arg00 ; +b +two +set @arg00='%wo' ; +execute stmt1 using @arg00 ; +b +two +set @arg00=null ; +insert into t9 set c1= 0, c5 = NULL ; +select c5 from t9 where c5 > NULL ; +c5 +prepare stmt1 from ' select c5 from t9 where c5 > ? '; +execute stmt1 using @arg00 ; +c5 +select c5 from t9 where c5 < NULL ; +c5 +prepare stmt1 from ' select c5 from t9 where c5 < ? '; +execute stmt1 using @arg00 ; +c5 +select c5 from t9 where c5 = NULL ; +c5 +prepare stmt1 from ' select c5 from t9 where c5 = ? '; +execute stmt1 using @arg00 ; +c5 +select c5 from t9 where c5 <=> NULL ; +c5 +NULL +prepare stmt1 from ' select c5 from t9 where c5 <=> ? '; +execute stmt1 using @arg00 ; +c5 +NULL +delete from t9 where c1= 0 ; +set @arg00='>' ; +select a FROM t1 where a @arg00 1 ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@arg00 1' at line 1 +prepare stmt1 from ' select a FROM t1 where a ? 1 ' ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? 1' at line 1 +set @arg00=1 ; +select a,b FROM t1 where a is not NULL +AND b is not NULL group by a - @arg00 ; +a b +1 one +2 two +3 three +4 four +prepare stmt1 from ' select a,b FROM t1 where a is not NULL +AND b is not NULL group by a - ? ' ; +execute stmt1 using @arg00 ; +a b +1 one +2 two +3 three +4 four +set @arg00='two' ; +select a,b FROM t1 where a is not NULL +AND b is not NULL having b <> @arg00 order by a ; +a b +1 one +3 three +4 four +prepare stmt1 from ' select a,b FROM t1 where a is not NULL +AND b is not NULL having b <> ? order by a ' ; +execute stmt1 using @arg00 ; +a b +1 one +3 three +4 four +set @arg00=1 ; +select a,b FROM t1 where a is not NULL +AND b is not NULL order by a - @arg00 ; +a b +1 one +2 two +3 three +4 four +prepare stmt1 from ' select a,b FROM t1 where a is not NULL +AND b is not NULL order by a - ? ' ; +execute stmt1 using @arg00 ; +a b +1 one +2 two +3 three +4 four +set @arg00=2 ; +select a,b from t1 order by 2 ; +a b +4 four +1 one +3 three +2 two +prepare stmt1 from ' select a,b from t1 +order by ? '; +execute stmt1 using @arg00; +a b +4 four +1 one +3 three +2 two +set @arg00=1 ; +execute stmt1 using @arg00; +a b +1 one +2 two +3 three +4 four +set @arg00=0 ; +execute stmt1 using @arg00; +ERROR 42S22: Unknown column '?' in 'order clause' +set @arg00=1; +prepare stmt1 from ' select a,b from t1 order by a +limit 1 '; +execute stmt1 ; +a b +1 one +prepare stmt1 from ' select a,b from t1 order by a limit ? '; +execute stmt1 using @arg00; +a b +1 one +set @arg00='b' ; +set @arg01=0 ; +set @arg02=2 ; +set @arg03=2 ; +select sum(a), @arg00 from t1 where a > @arg01 +and b is not null group by substr(b,@arg02) +having sum(a) <> @arg03 ; +sum(a) @arg00 +3 b +1 b +4 b +prepare stmt1 from ' select sum(a), ? from t1 where a > ? +and b is not null group by substr(b,?) +having sum(a) <> ? '; +execute stmt1 using @arg00, @arg01, @arg02, @arg03; +sum(a) ? +3 b +1 b +4 b +test_sequence +------ join tests ------ +select first.a as a1, second.a as a2 +from t1 first, t1 second +where first.a = second.a order by a1 ; +a1 a2 +1 1 +2 2 +3 3 +4 4 +prepare stmt1 from ' select first.a as a1, second.a as a2 + from t1 first, t1 second + where first.a = second.a order by a1 '; +execute stmt1 ; +a1 a2 +1 1 +2 2 +3 3 +4 4 +set @arg00='ABC'; +set @arg01='two'; +set @arg02='one'; +select first.a, @arg00, second.a FROM t1 first, t1 second +where @arg01 = first.b or first.a = second.a or second.b = @arg02 +order by second.a, first.a; +a @arg00 a +1 ABC 1 +2 ABC 1 +3 ABC 1 +4 ABC 1 +2 ABC 2 +2 ABC 3 +3 ABC 3 +2 ABC 4 +4 ABC 4 +prepare stmt1 from ' select first.a, ?, second.a FROM t1 first, t1 second + where ? = first.b or first.a = second.a or second.b = ? + order by second.a, first.a'; +execute stmt1 using @arg00, @arg01, @arg02; +a ? a +1 ABC 1 +2 ABC 1 +3 ABC 1 +4 ABC 1 +2 ABC 2 +2 ABC 3 +3 ABC 3 +2 ABC 4 +4 ABC 4 +drop table if exists t2 ; +create table t2 as select * from t1 ; +set @query1= 'SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a ' ; +set @query2= 'SELECT * FROM t2 natural join t1 order by t2.a ' ; +set @query3= 'SELECT * FROM t2 join t1 using(a) order by t2.a ' ; +set @query4= 'SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a ' ; +set @query5= 'SELECT * FROM t2 natural left join t1 order by t2.a ' ; +set @query6= 'SELECT * FROM t2 left join t1 using(a) order by t2.a ' ; +set @query7= 'SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a ' ; +set @query8= 'SELECT * FROM t2 natural right join t1 order by t2.a ' ; +set @query9= 'SELECT * FROM t2 right join t1 using(a) order by t2.a ' ; +the join statement is: +SELECT * FROM t2 right join t1 using(a) order by t2.a +prepare stmt1 from @query9 ; +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +the join statement is: +SELECT * FROM t2 natural right join t1 order by t2.a +prepare stmt1 from @query8 ; +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +the join statement is: +SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a +prepare stmt1 from @query7 ; +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +the join statement is: +SELECT * FROM t2 left join t1 using(a) order by t2.a +prepare stmt1 from @query6 ; +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +the join statement is: +SELECT * FROM t2 natural left join t1 order by t2.a +prepare stmt1 from @query5 ; +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +the join statement is: +SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a +prepare stmt1 from @query4 ; +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +the join statement is: +SELECT * FROM t2 join t1 using(a) order by t2.a +prepare stmt1 from @query3 ; +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +the join statement is: +SELECT * FROM t2 natural join t1 order by t2.a +prepare stmt1 from @query2 ; +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +the join statement is: +SELECT * FROM t2 join t1 on (t1.a=t2.a) order by t2.a +prepare stmt1 from @query1 ; +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +execute stmt1 ; +a b a b +1 one 1 one +2 two 2 two +3 three 3 three +4 four 4 four +drop table t2 ; +test_sequence +------ subquery tests ------ +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where b = ''two'') '; +execute stmt1 ; +a b +2 two +set @arg00='two' ; +select a, b FROM t1 outer_table where +a = (select a from t1 where b = 'two' ) and b=@arg00 ; +a b +2 two +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where b = ''two'') and b=? '; +execute stmt1 using @arg00; +a b +2 two +set @arg00='two' ; +select a, b FROM t1 outer_table where +a = (select a from t1 where b = @arg00 ) and b='two' ; +a b +2 two +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where b = ? ) and b=''two'' ' ; +execute stmt1 using @arg00; +a b +2 two +set @arg00=3 ; +set @arg01='three' ; +select a,b FROM t1 where (a,b) in (select 3, 'three'); +a b +3 three +select a FROM t1 where (a,b) in (select @arg00,@arg01); +a +3 +prepare stmt1 from ' select a FROM t1 where (a,b) in (select ?, ?) '; +execute stmt1 using @arg00, @arg01; +a +3 +set @arg00=1 ; +set @arg01='two' ; +set @arg02=2 ; +set @arg03='two' ; +select a, @arg00, b FROM t1 outer_table where +b=@arg01 and a = (select @arg02 from t1 where b = @arg03 ) ; +a @arg00 b +2 1 two +prepare stmt1 from ' select a, ?, b FROM t1 outer_table where + b=? and a = (select ? from t1 where b = ? ) ' ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; +a ? b +2 1 two +prepare stmt1 from 'select c4 FROM t9 where + c13 = (select MAX(b) from t1 where a = ?) and c22 = ? ' ; +execute stmt1 using @arg01, @arg02; +c4 +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where b = outer_table.b ) order by a '; +execute stmt1 ; +a b +1 one +2 two +3 three +4 four +prepare stmt1 from ' SELECT a as ccc from t1 where a+1= + (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) '; +execute stmt1 ; +ccc +1 +deallocate prepare stmt1 ; +prepare stmt1 from ' SELECT a as ccc from t1 where a+1= + (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) '; +execute stmt1 ; +ccc +1 +deallocate prepare stmt1 ; +prepare stmt1 from ' SELECT a as ccc from t1 where a+1= + (SELECT 1+ccc from t1 where ccc+1=a+1 and a=1) '; +execute stmt1 ; +ccc +1 +deallocate prepare stmt1 ; +set @arg00='two' ; +select a, b FROM t1 outer_table where +a = (select a from t1 where b = outer_table.b ) and b=@arg00 ; +a b +2 two +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where b = outer_table.b) and b=? '; +execute stmt1 using @arg00; +a b +2 two +set @arg00=2 ; +select a, b FROM t1 outer_table where +a = (select a from t1 where a = @arg00 and b = outer_table.b) and b='two' ; +a b +2 two +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where a = ? and b = outer_table.b) and b=''two'' ' ; +execute stmt1 using @arg00; +a b +2 two +set @arg00=2 ; +select a, b FROM t1 outer_table where +a = (select a from t1 where outer_table.a = @arg00 and a=2) and b='two' ; +a b +2 two +prepare stmt1 from ' select a, b FROM t1 outer_table where + a = (select a from t1 where outer_table.a = ? and a=2) and b=''two'' ' ; +execute stmt1 using @arg00; +a b +2 two +set @arg00=1 ; +set @arg01='two' ; +set @arg02=2 ; +set @arg03='two' ; +select a, @arg00, b FROM t1 outer_table where +b=@arg01 and a = (select @arg02 from t1 where outer_table.b = @arg03 +and outer_table.a=a ) ; +a @arg00 b +2 1 two +prepare stmt1 from ' select a, ?, b FROM t1 outer_table where + b=? and a = (select ? from t1 where outer_table.b = ? + and outer_table.a=a ) ' ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; +a ? b +2 1 two +set @arg00=1 ; +set @arg01=0 ; +select a, @arg00 +from ( select a - @arg00 as a from t1 where a=@arg00 ) as t2 +where a=@arg01; +a @arg00 +0 1 +prepare stmt1 from ' select a, ? + from ( select a - ? as a from t1 where a=? ) as t2 + where a=? '; +execute stmt1 using @arg00, @arg00, @arg00, @arg01 ; +a ? +0 1 +drop table if exists t2 ; +create table t2 as select * from t1; +prepare stmt1 from ' select a in (select a from t2) from t1 ' ; +execute stmt1 ; +a in (select a from t2) +1 +1 +1 +1 +drop table if exists t5, t6, t7 ; +create table t5 (a int , b int) ; +create table t6 like t5 ; +create table t7 like t5 ; +insert into t5 values (0, 100), (1, 2), (1, 3), (2, 2), (2, 7), +(2, -1), (3, 10) ; +insert into t6 values (0, 0), (1, 1), (2, 1), (3, 1), (4, 1) ; +insert into t7 values (3, 3), (2, 2), (1, 1) ; +prepare stmt1 from ' select a, (select count(distinct t5.b) as sum from t5, t6 + where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b + group by t5.a order by sum limit 1) from t7 ' ; +execute stmt1 ; +a (select count(distinct t5.b) as sum from t5, t6 + where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b + group by t5.a order by sum limit 1) +3 1 +2 2 +1 2 +execute stmt1 ; +a (select count(distinct t5.b) as sum from t5, t6 + where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b + group by t5.a order by sum limit 1) +3 1 +2 2 +1 2 +execute stmt1 ; +a (select count(distinct t5.b) as sum from t5, t6 + where t5.a=t6.a and t6.b > 0 and t5.a <= t7.b + group by t5.a order by sum limit 1) +3 1 +2 2 +1 2 +drop table t5, t6, t7 ; +drop table if exists t2 ; +create table t2 as select * from t9; +set @stmt= ' SELECT + (SELECT SUM(c1 + c12 + 0.0) FROM t2 + where (t9.c2 - 0e-3) = t2.c2 + GROUP BY t9.c15 LIMIT 1) as scalar_s, + exists (select 1.0e+0 from t2 + where t2.c3 * 9.0000000000 = t9.c4) as exists_s, + c5 * 4 in (select c6 + 0.3e+1 from t2) as in_s, + (c7 - 4, c8 - 4) in (select c9 + 4.0, c10 + 40e-1 from t2) as in_row_s +FROM t9, +(select c25 x, c32 y from t2) tt WHERE x = c25 ' ; +prepare stmt1 from @stmt ; +execute stmt1 ; +execute stmt1 ; +set @stmt= concat('explain ',@stmt); +prepare stmt1 from @stmt ; +execute stmt1 ; +execute stmt1 ; +set @stmt= ' SELECT + (SELECT SUM(c1+c12+?) FROM t2 where (t9.c2-?)=t2.c2 + GROUP BY t9.c15 LIMIT 1) as scalar_s, + exists (select ? from t2 + where t2.c3*?=t9.c4) as exists_s, + c5*? in (select c6+? from t2) as in_s, + (c7-?, c8-?) in (select c9+?, c10+? from t2) as in_row_s +FROM t9, +(select c25 x, c32 y from t2) tt WHERE x =c25 ' ; +set @arg00= 0.0 ; +set @arg01= 0e-3 ; +set @arg02= 1.0e+0 ; +set @arg03= 9.0000000000 ; +set @arg04= 4 ; +set @arg05= 0.3e+1 ; +set @arg06= 4 ; +set @arg07= 4 ; +set @arg08= 4.0 ; +set @arg09= 40e-1 ; +prepare stmt1 from @stmt ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, +@arg07, @arg08, @arg09 ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, +@arg07, @arg08, @arg09 ; +set @stmt= concat('explain ',@stmt); +prepare stmt1 from @stmt ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, +@arg07, @arg08, @arg09 ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, +@arg07, @arg08, @arg09 ; +drop table t2 ; +select 1 < (select a from t1) ; +ERROR 21000: Subquery returns more than 1 row +prepare stmt1 from ' select 1 < (select a from t1) ' ; +execute stmt1 ; +ERROR 21000: Subquery returns more than 1 row +select 1 as my_col ; +my_col +1 +test_sequence +------ union tests ------ +prepare stmt1 from ' select a FROM t1 where a=1 + union distinct + select a FROM t1 where a=1 '; +execute stmt1 ; +a +1 +execute stmt1 ; +a +1 +prepare stmt1 from ' select a FROM t1 where a=1 + union all + select a FROM t1 where a=1 '; +execute stmt1 ; +a +1 +1 +prepare stmt1 from ' SELECT 1, 2 union SELECT 1 ' ; +ERROR 21000: The used SELECT statements have a different number of columns +prepare stmt1 from ' SELECT 1 union SELECT 1, 2 ' ; +ERROR 21000: The used SELECT statements have a different number of columns +prepare stmt1 from ' SELECT * from t1 union SELECT 1 ' ; +ERROR 21000: The used SELECT statements have a different number of columns +prepare stmt1 from ' SELECT 1 union SELECT * from t1 ' ; +ERROR 21000: The used SELECT statements have a different number of columns +set @arg00=1 ; +select @arg00 FROM t1 where a=1 +union distinct +select 1 FROM t1 where a=1; +@arg00 +1 +prepare stmt1 from ' select ? FROM t1 where a=1 + union distinct + select 1 FROM t1 where a=1 ' ; +execute stmt1 using @arg00; +? +1 +set @arg00=1 ; +select 1 FROM t1 where a=1 +union distinct +select @arg00 FROM t1 where a=1; +1 +1 +prepare stmt1 from ' select 1 FROM t1 where a=1 + union distinct + select ? FROM t1 where a=1 ' ; +execute stmt1 using @arg00; +1 +1 +set @arg00='a' ; +select @arg00 FROM t1 where a=1 +union distinct +select @arg00 FROM t1 where a=1; +@arg00 +a +prepare stmt1 from ' select ? FROM t1 where a=1 + union distinct + select ? FROM t1 where a=1 '; +execute stmt1 using @arg00, @arg00; +? +a +prepare stmt1 from ' select ? + union distinct + select ? '; +execute stmt1 using @arg00, @arg00; +? +a +set @arg00='a' ; +set @arg01=1 ; +set @arg02='a' ; +set @arg03=2 ; +select @arg00 FROM t1 where a=@arg01 +union distinct +select @arg02 FROM t1 where a=@arg03; +@arg00 +a +prepare stmt1 from ' select ? FROM t1 where a=? + union distinct + select ? FROM t1 where a=? ' ; +execute stmt1 using @arg00, @arg01, @arg02, @arg03; +? +a +set @arg00=1 ; +prepare stmt1 from ' select sum(a) + 200, ? from t1 +union distinct +select sum(a) + 200, 1 from t1 +group by b ' ; +execute stmt1 using @arg00; +sum(a) + 200 ? +210 1 +204 1 +201 1 +203 1 +202 1 +set @Oporto='Oporto' ; +set @Lisboa='Lisboa' ; +set @0=0 ; +set @1=1 ; +set @2=2 ; +set @3=3 ; +set @4=4 ; +select @Oporto,@Lisboa,@0,@1,@2,@3,@4 ; +@Oporto @Lisboa @0 @1 @2 @3 @4 +Oporto Lisboa 0 1 2 3 4 +select sum(a) + 200 as the_sum, @Oporto as the_town from t1 +group by b +union distinct +select sum(a) + 200, @Lisboa from t1 +group by b ; +the_sum the_town +204 Oporto +201 Oporto +203 Oporto +202 Oporto +204 Lisboa +201 Lisboa +203 Lisboa +202 Lisboa +prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 + group by b + union distinct + select sum(a) + 200, ? from t1 + group by b ' ; +execute stmt1 using @Oporto, @Lisboa; +the_sum the_town +204 Oporto +201 Oporto +203 Oporto +202 Oporto +204 Lisboa +201 Lisboa +203 Lisboa +202 Lisboa +select sum(a) + 200 as the_sum, @Oporto as the_town from t1 +where a > @1 +group by b +union distinct +select sum(a) + 200, @Lisboa from t1 +where a > @2 +group by b ; +the_sum the_town +204 Oporto +203 Oporto +202 Oporto +204 Lisboa +203 Lisboa +prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 + where a > ? + group by b + union distinct + select sum(a) + 200, ? from t1 + where a > ? + group by b ' ; +execute stmt1 using @Oporto, @1, @Lisboa, @2; +the_sum the_town +204 Oporto +203 Oporto +202 Oporto +204 Lisboa +203 Lisboa +select sum(a) + 200 as the_sum, @Oporto as the_town from t1 +where a > @1 +group by b +having avg(a) > @2 +union distinct +select sum(a) + 200, @Lisboa from t1 +where a > @2 +group by b +having avg(a) > @3; +the_sum the_town +204 Oporto +203 Oporto +204 Lisboa +prepare stmt1 from ' select sum(a) + 200 as the_sum, ? as the_town from t1 + where a > ? + group by b + having avg(a) > ? + union distinct + select sum(a) + 200, ? from t1 + where a > ? + group by b + having avg(a) > ? '; +execute stmt1 using @Oporto, @1, @2, @Lisboa, @2, @3; +the_sum the_town +204 Oporto +203 Oporto +204 Lisboa +test_sequence +------ explain select tests ------ +prepare stmt1 from ' explain select * from t9 ' ; +execute stmt1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def id 8 3 1 N 32929 0 63 +def select_type 253 19 6 N 1 31 8 +def table 253 64 2 Y 0 31 8 +def type 253 10 3 Y 0 31 8 +def possible_keys 253 4096 0 Y 0 31 8 +def key 253 64 0 Y 0 31 8 +def key_len 253 4096 0 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 +def rows 8 10 1 Y 32928 0 63 +def Extra 253 255 0 N 1 31 8 +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t9 ALL NULL NULL NULL NULL 2 +test_sequence +------ delete tests ------ +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +prepare stmt1 from 'delete from t1 where a=2' ; +execute stmt1; +select a,b from t1 where a=2; +a b +execute stmt1; +insert into t1 values(0,NULL); +set @arg00=NULL; +prepare stmt1 from 'delete from t1 where b=?' ; +execute stmt1 using @arg00; +select a,b from t1 where b is NULL ; +a b +0 NULL +set @arg00='one'; +execute stmt1 using @arg00; +select a,b from t1 where b=@arg00; +a b +prepare stmt1 from 'truncate table t1' ; +test_sequence +------ update tests ------ +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +prepare stmt1 from 'update t1 set b=''a=two'' where a=2' ; +execute stmt1; +select a,b from t1 where a=2; +a b +2 a=two +execute stmt1; +select a,b from t1 where a=2; +a b +2 a=two +set @arg00=NULL; +prepare stmt1 from 'update t1 set b=? where a=2' ; +execute stmt1 using @arg00; +select a,b from t1 where a=2; +a b +2 NULL +set @arg00='two'; +execute stmt1 using @arg00; +select a,b from t1 where a=2; +a b +2 two +set @arg00=2; +prepare stmt1 from 'update t1 set b=NULL where a=?' ; +execute stmt1 using @arg00; +select a,b from t1 where a=@arg00; +a b +2 NULL +update t1 set b='two' where a=@arg00; +set @arg00=2000; +execute stmt1 using @arg00; +select a,b from t1 where a=@arg00; +a b +set @arg00=2; +set @arg01=22; +prepare stmt1 from 'update t1 set a=? where a=?' ; +execute stmt1 using @arg00, @arg00; +select a,b from t1 where a=@arg00; +a b +2 two +execute stmt1 using @arg01, @arg00; +select a,b from t1 where a=@arg01; +a b +22 two +execute stmt1 using @arg00, @arg01; +select a,b from t1 where a=@arg00; +a b +2 two +set @arg00=NULL; +set @arg01=2; +execute stmt1 using @arg00, @arg01; +Warnings: +Warning 1048 Column 'a' cannot be null +select a,b from t1 order by a; +a b +0 two +1 one +3 three +4 four +set @arg00=0; +execute stmt1 using @arg01, @arg00; +select a,b from t1 order by a; +a b +1 one +2 two +3 three +4 four +set @arg00=23; +set @arg01='two'; +set @arg02=2; +set @arg03='two'; +set @arg04=2; +drop table if exists t2; +create table t2 as select a,b from t1 ; +prepare stmt1 from 'update t1 set a=? where b=? + and a in (select ? from t2 + where b = ? or a = ?)'; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +select a,b from t1 where a = @arg00 ; +a b +23 two +prepare stmt1 from 'update t1 set a=? where b=? + and a not in (select ? from t2 + where b = ? or a = ?)'; +execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +select a,b from t1 order by a ; +a b +1 one +2 two +3 three +4 four +drop table t2 ; +create table t2 +( +a int, b varchar(30), +primary key(a) +) engine = 'NDB' ; +insert into t2(a,b) select a, b from t1 ; +prepare stmt1 from 'update t1 set a=? where b=? + and a in (select ? from t2 + where b = ? or a = ?)'; +execute stmt1 using @arg00, @arg01, @arg02, @arg03, @arg04 ; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +select a,b from t1 where a = @arg00 ; +a b +23 two +prepare stmt1 from 'update t1 set a=? where b=? + and a not in (select ? from t2 + where b = ? or a = ?)'; +execute stmt1 using @arg04, @arg01, @arg02, @arg03, @arg00 ; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +select a,b from t1 order by a ; +a b +1 one +2 two +3 three +4 four +drop table t2 ; +set @arg00=1; +prepare stmt1 from 'update t1 set b=''bla'' +where a=2 +limit 1'; +execute stmt1 ; +select a,b from t1 where b = 'bla' ; +a b +2 bla +prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; +execute stmt1 using @arg00; +test_sequence +------ insert tests ------ +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +prepare stmt1 from 'insert into t1 values(5, ''five'' )'; +execute stmt1; +select a,b from t1 where a = 5; +a b +5 five +set @arg00='six' ; +prepare stmt1 from 'insert into t1 values(6, ? )'; +execute stmt1 using @arg00; +select a,b from t1 where b = @arg00; +a b +6 six +execute stmt1 using @arg00; +ERROR 23000: Duplicate entry '6' for key 'PRIMARY' +set @arg00=NULL ; +prepare stmt1 from 'insert into t1 values(0, ? )'; +execute stmt1 using @arg00; +select a,b from t1 where b is NULL; +a b +0 NULL +set @arg00=8 ; +set @arg01='eight' ; +prepare stmt1 from 'insert into t1 values(?, ? )'; +execute stmt1 using @arg00, @arg01 ; +select a,b from t1 where b = @arg01; +a b +8 eight +set @NULL= null ; +set @arg00= 'abc' ; +execute stmt1 using @NULL, @NULL ; +ERROR 23000: Column 'a' cannot be null +execute stmt1 using @NULL, @NULL ; +ERROR 23000: Column 'a' cannot be null +execute stmt1 using @NULL, @arg00 ; +ERROR 23000: Column 'a' cannot be null +execute stmt1 using @NULL, @arg00 ; +ERROR 23000: Column 'a' cannot be null +set @arg01= 10000 + 2 ; +execute stmt1 using @arg01, @arg00 ; +set @arg01= 10000 + 1 ; +execute stmt1 using @arg01, @arg00 ; +select * from t1 where a > 10000 order by a ; +a b +10001 abc +10002 abc +delete from t1 where a > 10000 ; +set @arg01= 10000 + 2 ; +execute stmt1 using @arg01, @NULL ; +set @arg01= 10000 + 1 ; +execute stmt1 using @arg01, @NULL ; +select * from t1 where a > 10000 order by a ; +a b +10001 NULL +10002 NULL +delete from t1 where a > 10000 ; +set @arg01= 10000 + 10 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 9 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 8 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 7 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 6 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 5 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 4 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 3 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 2 ; +execute stmt1 using @arg01, @arg01 ; +set @arg01= 10000 + 1 ; +execute stmt1 using @arg01, @arg01 ; +select * from t1 where a > 10000 order by a ; +a b +10001 10001 +10002 10002 +10003 10003 +10004 10004 +10005 10005 +10006 10006 +10007 10007 +10008 10008 +10009 10009 +10010 10010 +delete from t1 where a > 10000 ; +set @arg00=81 ; +set @arg01='8-1' ; +set @arg02=82 ; +set @arg03='8-2' ; +prepare stmt1 from 'insert into t1 values(?,?),(?,?)'; +execute stmt1 using @arg00, @arg01, @arg02, @arg03 ; +select a,b from t1 where a in (@arg00,@arg02) ; +a b +81 8-1 +82 8-2 +set @arg00=9 ; +set @arg01='nine' ; +prepare stmt1 from 'insert into t1 set a=?, b=? '; +execute stmt1 using @arg00, @arg01 ; +select a,b from t1 where a = @arg00 ; +a b +9 nine +set @arg00=6 ; +set @arg01=1 ; +prepare stmt1 from 'insert into t1 set a=?, b=''sechs'' + on duplicate key update a=a + ?, b=concat(b,''modified'') '; +execute stmt1 using @arg00, @arg01; +select * from t1 order by a; +a b +0 NULL +1 one +2 two +3 three +4 four +5 five +7 sixmodified +8 eight +9 nine +81 8-1 +82 8-2 +set @arg00=81 ; +set @arg01=1 ; +execute stmt1 using @arg00, @arg01; +ERROR 23000: Duplicate entry '82' for key 'PRIMARY' +drop table if exists t2 ; +create table t2 (id int auto_increment primary key) +ENGINE= 'NDB' ; +prepare stmt1 from ' select last_insert_id() ' ; +insert into t2 values (NULL) ; +execute stmt1 ; +last_insert_id() +1 +insert into t2 values (NULL) ; +execute stmt1 ; +last_insert_id() +2 +drop table t2 ; +set @1000=1000 ; +set @x1000_2="x1000_2" ; +set @x1000_3="x1000_3" ; +set @x1000="x1000" ; +set @1100=1100 ; +set @x1100="x1100" ; +set @100=100 ; +set @updated="updated" ; +insert into t1 values(1000,'x1000_1') ; +insert into t1 values(@1000,@x1000_2),(@1000,@x1000_3) +on duplicate key update a = a + @100, b = concat(b,@updated) ; +select a,b from t1 where a >= 1000 order by a ; +a b +1000 x1000_3 +1100 x1000_1updated +delete from t1 where a >= 1000 ; +insert into t1 values(1000,'x1000_1') ; +prepare stmt1 from ' insert into t1 values(?,?),(?,?) + on duplicate key update a = a + ?, b = concat(b,?) '; +execute stmt1 using @1000, @x1000_2, @1000, @x1000_3, @100, @updated ; +select a,b from t1 where a >= 1000 order by a ; +a b +1000 x1000_3 +1100 x1000_1updated +delete from t1 where a >= 1000 ; +insert into t1 values(1000,'x1000_1') ; +execute stmt1 using @1000, @x1000_2, @1100, @x1000_3, @100, @updated ; +select a,b from t1 where a >= 1000 order by a ; +a b +1200 x1000_1updatedupdated +delete from t1 where a >= 1000 ; +prepare stmt1 from ' replace into t1 (a,b) select 100, ''hundred'' '; +execute stmt1; +execute stmt1; +execute stmt1; +test_sequence +------ multi table tests ------ +delete from t1 ; +delete from t9 ; +insert into t1(a,b) values (1, 'one'), (2, 'two'), (3, 'three') ; +insert into t9 (c1,c21) +values (1, 'one'), (2, 'two'), (3, 'three') ; +prepare stmt_delete from " delete t1, t9 + from t1, t9 where t1.a=t9.c1 and t1.b='updated' "; +prepare stmt_update from " update t1, t9 + set t1.b='updated', t9.c21='updated' + where t1.a=t9.c1 and t1.a=? "; +prepare stmt_select1 from " select a, b from t1 order by a" ; +prepare stmt_select2 from " select c1, c21 from t9 order by c1" ; +set @arg00= 1 ; +execute stmt_update using @arg00 ; +execute stmt_delete ; +execute stmt_select1 ; +a b +2 two +3 three +execute stmt_select2 ; +c1 c21 +2 two +3 three +set @arg00= @arg00 + 1 ; +execute stmt_update using @arg00 ; +execute stmt_delete ; +execute stmt_select1 ; +a b +3 three +execute stmt_select2 ; +c1 c21 +3 three +set @arg00= @arg00 + 1 ; +execute stmt_update using @arg00 ; +execute stmt_delete ; +execute stmt_select1 ; +a b +execute stmt_select2 ; +c1 c21 +set @arg00= @arg00 + 1 ; +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +insert into t1 values(0,NULL) ; +set @duplicate='duplicate ' ; +set @1000=1000 ; +set @5=5 ; +select a,b from t1 where a < 5 order by a ; +a b +0 NULL +1 one +2 two +3 three +4 four +insert into t1 select a + @1000, concat(@duplicate,b) from t1 +where a < @5 ; +affected rows: 5 +info: Records: 5 Duplicates: 0 Warnings: 0 +select a,b from t1 where a >= 1000 order by a ; +a b +1000 NULL +1001 duplicate one +1002 duplicate two +1003 duplicate three +1004 duplicate four +delete from t1 where a >= 1000 ; +prepare stmt1 from ' insert into t1 select a + ?, concat(?,b) from t1 +where a < ? ' ; +execute stmt1 using @1000, @duplicate, @5; +affected rows: 5 +info: Records: 5 Duplicates: 0 Warnings: 0 +select a,b from t1 where a >= 1000 order by a ; +a b +1000 NULL +1001 duplicate one +1002 duplicate two +1003 duplicate three +1004 duplicate four +delete from t1 where a >= 1000 ; +set @1=1 ; +set @2=2 ; +set @100=100 ; +set @float=1.00; +set @five='five' ; +drop table if exists t2; +create table t2 like t1 ; +insert into t2 (b,a) +select @duplicate, sum(first.a) from t1 first, t1 second +where first.a <> @5 and second.b = first.b +and second.b <> @five +group by second.b +having sum(second.a) > @2 +union +select b, a + @100 from t1 +where (a,b) in ( select sqrt(a+@1)+CAST(@float AS signed),b +from t1); +affected rows: 3 +info: Records: 3 Duplicates: 0 Warnings: 0 +select a,b from t2 order by a ; +a b +3 duplicate +4 duplicate +103 three +delete from t2 ; +prepare stmt1 from ' insert into t2 (b,a) +select ?, sum(first.a) + from t1 first, t1 second + where first.a <> ? and second.b = first.b and second.b <> ? + group by second.b + having sum(second.a) > ? +union +select b, a + ? from t1 + where (a,b) in ( select sqrt(a+?)+CAST(? AS signed),b + from t1 ) ' ; +execute stmt1 using @duplicate, @5, @five, @2, @100, @1, @float ; +affected rows: 3 +info: Records: 3 Duplicates: 0 Warnings: 0 +select a,b from t2 order by a ; +a b +3 duplicate +4 duplicate +103 three +drop table t2; +drop table if exists t5 ; +set @arg01= 8; +set @arg02= 8.0; +set @arg03= 80.00000000000e-1; +set @arg04= 'abc' ; +set @arg05= CAST('abc' as binary) ; +set @arg06= '1991-08-05' ; +set @arg07= CAST('1991-08-05' as date); +set @arg08= '1991-08-05 01:01:01' ; +set @arg09= CAST('1991-08-05 01:01:01' as datetime) ; +set @arg10= unix_timestamp('1991-01-01 01:01:01'); +set @arg11= YEAR('1991-01-01 01:01:01'); +set @arg12= 8 ; +set @arg12= NULL ; +set @arg13= 8.0 ; +set @arg13= NULL ; +set @arg14= 'abc'; +set @arg14= NULL ; +set @arg15= CAST('abc' as binary) ; +set @arg15= NULL ; +create table t5 as select +8 as const01, @arg01 as param01, +8.0 as const02, @arg02 as param02, +80.00000000000e-1 as const03, @arg03 as param03, +'abc' as const04, @arg04 as param04, +CAST('abc' as binary) as const05, @arg05 as param05, +'1991-08-05' as const06, @arg06 as param06, +CAST('1991-08-05' as date) as const07, @arg07 as param07, +'1991-08-05 01:01:01' as const08, @arg08 as param08, +CAST('1991-08-05 01:01:01' as datetime) as const09, @arg09 as param09, +unix_timestamp('1991-01-01 01:01:01') as const10, @arg10 as param10, +YEAR('1991-01-01 01:01:01') as const11, @arg11 as param11, +NULL as const12, @arg12 as param12, +@arg13 as param13, +@arg14 as param14, +@arg15 as param15; +show create table t5 ; +Table Create Table +t5 CREATE TABLE `t5` ( + `const01` int(1) NOT NULL DEFAULT '0', + `param01` bigint(20) DEFAULT NULL, + `const02` decimal(2,1) NOT NULL DEFAULT '0.0', + `param02` decimal(65,30) DEFAULT NULL, + `const03` double NOT NULL DEFAULT '0', + `param03` double DEFAULT NULL, + `const04` varchar(3) NOT NULL DEFAULT '', + `param04` longtext, + `const05` varbinary(3) NOT NULL DEFAULT '', + `param05` longblob, + `const06` varchar(10) NOT NULL DEFAULT '', + `param06` longtext, + `const07` date DEFAULT NULL, + `param07` longblob, + `const08` varchar(19) NOT NULL DEFAULT '', + `param08` longtext, + `const09` datetime DEFAULT NULL, + `param09` longblob, + `const10` int(10) NOT NULL DEFAULT '0', + `param10` bigint(20) DEFAULT NULL, + `const11` int(4) DEFAULT NULL, + `param11` bigint(20) DEFAULT NULL, + `const12` binary(0) DEFAULT NULL, + `param12` bigint(20) DEFAULT NULL, + `param13` decimal(65,30) DEFAULT NULL, + `param14` longtext, + `param15` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from t5 ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def test t5 t5 const01 const01 3 1 1 N 32769 0 63 +def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 +def test t5 t5 const02 const02 246 4 3 N 1 1 63 +def test t5 t5 param02 param02 246 67 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 +def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 +def test t5 t5 const04 const04 253 3 3 N 1 0 8 +def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 +def test t5 t5 const05 const05 253 3 3 N 129 0 63 +def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 +def test t5 t5 const06 const06 253 10 10 N 1 0 8 +def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 +def test t5 t5 const07 const07 10 10 10 Y 128 0 63 +def test t5 t5 param07 param07 252 4294967295 10 Y 144 0 63 +def test t5 t5 const08 const08 253 19 19 N 1 0 8 +def test t5 t5 param08 param08 252 4294967295 19 Y 16 0 8 +def test t5 t5 const09 const09 12 19 19 Y 128 0 63 +def test t5 t5 param09 param09 252 4294967295 19 Y 144 0 63 +def test t5 t5 const10 const10 3 10 9 N 32769 0 63 +def test t5 t5 param10 param10 8 20 9 Y 32768 0 63 +def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 +def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 +def test t5 t5 const12 const12 254 0 0 Y 128 0 63 +def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 +def test t5 t5 param13 param13 246 67 0 Y 0 30 63 +def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 +def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 +const01 8 +param01 8 +const02 8.0 +param02 8.000000000000000000000000000000 +const03 8 +param03 8 +const04 abc +param04 abc +const05 abc +param05 abc +const06 1991-08-05 +param06 1991-08-05 +const07 1991-08-05 +param07 1991-08-05 +const08 1991-08-05 01:01:01 +param08 1991-08-05 01:01:01 +const09 1991-08-05 01:01:01 +param09 1991-08-05 01:01:01 +const10 662680861 +param10 662680861 +const11 1991 +param11 1991 +const12 NULL +param12 NULL +param13 NULL +param14 NULL +param15 NULL +drop table t5 ; +test_sequence +------ data type conversion tests ------ +delete from t1 ; +insert into t1 values (1,'one'); +insert into t1 values (2,'two'); +insert into t1 values (3,'three'); +insert into t1 values (4,'four'); +commit ; +delete from t9 ; +insert into t9 +set c1= 1, c2= 1, c3= 1, c4= 1, c5= 1, c6= 1, c7= 1, c8= 1, c9= 1, +c10= 1, c11= 1, c12 = 1, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=true, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='one', c32= 'monday'; +insert into t9 +set c1= 9, c2= 9, c3= 9, c4= 9, c5= 9, c6= 9, c7= 9, c8= 9, c9= 9, +c10= 9, c11= 9, c12 = 9, +c13= '2004-02-29', c14= '2004-02-29 11:11:11', c15= '2004-02-29 11:11:11', +c16= '11:11:11', c17= '2004', +c18= 1, c19=false, c20= 'a', c21= '123456789a', +c22= '123456789a123456789b123456789c', c23= 'tinyblob', c24= 'tinytext', +c25= 'blob', c26= 'text', c27= 'mediumblob', c28= 'mediumtext', +c29= 'longblob', c30= 'longtext', c31='two', c32= 'tuesday'; +commit ; +insert into t9 set c1= 0, c15= '1991-01-01 01:01:01' ; +select * from t9 order by c1 ; +c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 c17 c18 c19 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 c31 c32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +9 9 9 9 9 9 9 9 9 9 9.0000 9.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 0 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext two tuesday +test_sequence +------ select @parameter:= column ------ +prepare full_info from "select @arg01, @arg02, @arg03, @arg04, + @arg05, @arg06, @arg07, @arg08, + @arg09, @arg10, @arg11, @arg12, + @arg13, @arg14, @arg15, @arg16, + @arg17, @arg18, @arg19, @arg20, + @arg21, @arg22, @arg23, @arg24, + @arg25, @arg26, @arg27, @arg28, + @arg29, @arg30, @arg31, @arg32" ; +select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, +@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, +@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, +@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, +@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, +@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, +@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, +@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 +from t9 where c1= 1 ; +@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 1 Y 32896 0 63 +def @arg03 8 20 1 Y 32896 0 63 +def @arg04 8 20 1 Y 32896 0 63 +def @arg05 8 20 1 Y 32896 0 63 +def @arg06 8 20 1 Y 32896 0 63 +def @arg07 5 23 1 Y 32896 31 63 +def @arg08 5 23 1 Y 32896 31 63 +def @arg09 5 23 1 Y 32896 31 63 +def @arg10 5 23 1 Y 32896 31 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 +def @arg13 251 16777216 10 Y 128 31 63 +def @arg14 251 16777216 19 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 8 Y 128 31 63 +def @arg17 8 20 4 Y 32928 0 63 +def @arg18 8 20 1 Y 32896 0 63 +def @arg19 8 20 1 Y 32896 0 63 +def @arg20 251 16777216 1 Y 0 31 8 +def @arg21 251 16777216 10 Y 0 31 8 +def @arg22 251 16777216 30 Y 0 31 8 +def @arg23 251 16777216 8 Y 128 31 63 +def @arg24 251 16777216 8 Y 0 31 8 +def @arg25 251 16777216 4 Y 128 31 63 +def @arg26 251 16777216 4 Y 0 31 8 +def @arg27 251 16777216 10 Y 128 31 63 +def @arg28 251 16777216 10 Y 0 31 8 +def @arg29 251 16777216 8 Y 128 31 63 +def @arg30 251 16777216 8 Y 0 31 8 +def @arg31 251 16777216 3 Y 0 31 8 +def @arg32 251 16777216 6 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, +@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, +@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, +@arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, +@arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, +@arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, +@arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, +@arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 +from t9 where c1= 0 ; +@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 0 Y 32896 0 63 +def @arg03 8 20 0 Y 32896 0 63 +def @arg04 8 20 0 Y 32896 0 63 +def @arg05 8 20 0 Y 32896 0 63 +def @arg06 8 20 0 Y 32896 0 63 +def @arg07 5 23 0 Y 32896 31 63 +def @arg08 5 23 0 Y 32896 31 63 +def @arg09 5 23 0 Y 32896 31 63 +def @arg10 5 23 0 Y 32896 31 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 +def @arg13 251 16777216 0 Y 128 31 63 +def @arg14 251 16777216 0 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 0 Y 128 31 63 +def @arg17 8 20 0 Y 32928 0 63 +def @arg18 8 20 0 Y 32896 0 63 +def @arg19 8 20 0 Y 32896 0 63 +def @arg20 251 16777216 0 Y 0 31 8 +def @arg21 251 16777216 0 Y 0 31 8 +def @arg22 251 16777216 0 Y 0 31 8 +def @arg23 251 16777216 0 Y 128 31 63 +def @arg24 251 16777216 0 Y 0 31 8 +def @arg25 251 16777216 0 Y 128 31 63 +def @arg26 251 16777216 0 Y 0 31 8 +def @arg27 251 16777216 0 Y 128 31 63 +def @arg28 251 16777216 0 Y 0 31 8 +def @arg29 251 16777216 0 Y 128 31 63 +def @arg30 251 16777216 0 Y 0 31 8 +def @arg31 251 16777216 0 Y 0 31 8 +def @arg32 251 16777216 0 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +prepare stmt1 from "select + @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, + @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, + @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, + @arg13:= c13, @arg14:= c14, @arg15:= c15, @arg16:= c16, + @arg17:= c17, @arg18:= c18, @arg19:= c19, @arg20:= c20, + @arg21:= c21, @arg22:= c22, @arg23:= c23, @arg24:= c24, + @arg25:= c25, @arg26:= c26, @arg27:= c27, @arg28:= c28, + @arg29:= c29, @arg30:= c30, @arg31:= c31, @arg32:= c32 +from t9 where c1= ?" ; +set @my_key= 1 ; +execute stmt1 using @my_key ; +@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 1 Y 32896 0 63 +def @arg03 8 20 1 Y 32896 0 63 +def @arg04 8 20 1 Y 32896 0 63 +def @arg05 8 20 1 Y 32896 0 63 +def @arg06 8 20 1 Y 32896 0 63 +def @arg07 5 23 1 Y 32896 31 63 +def @arg08 5 23 1 Y 32896 31 63 +def @arg09 5 23 1 Y 32896 31 63 +def @arg10 5 23 1 Y 32896 31 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 +def @arg13 251 16777216 10 Y 128 31 63 +def @arg14 251 16777216 19 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 8 Y 128 31 63 +def @arg17 8 20 4 Y 32928 0 63 +def @arg18 8 20 1 Y 32896 0 63 +def @arg19 8 20 1 Y 32896 0 63 +def @arg20 251 16777216 1 Y 0 31 8 +def @arg21 251 16777216 10 Y 0 31 8 +def @arg22 251 16777216 30 Y 0 31 8 +def @arg23 251 16777216 8 Y 128 31 63 +def @arg24 251 16777216 8 Y 0 31 8 +def @arg25 251 16777216 4 Y 128 31 63 +def @arg26 251 16777216 4 Y 0 31 8 +def @arg27 251 16777216 10 Y 128 31 63 +def @arg28 251 16777216 10 Y 0 31 8 +def @arg29 251 16777216 8 Y 128 31 63 +def @arg30 251 16777216 8 Y 0 31 8 +def @arg31 251 16777216 3 Y 0 31 8 +def @arg32 251 16777216 6 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +set @my_key= 0 ; +execute stmt1 using @my_key ; +@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 0 Y 32896 0 63 +def @arg03 8 20 0 Y 32896 0 63 +def @arg04 8 20 0 Y 32896 0 63 +def @arg05 8 20 0 Y 32896 0 63 +def @arg06 8 20 0 Y 32896 0 63 +def @arg07 5 23 0 Y 32896 31 63 +def @arg08 5 23 0 Y 32896 31 63 +def @arg09 5 23 0 Y 32896 31 63 +def @arg10 5 23 0 Y 32896 31 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 +def @arg13 251 16777216 0 Y 128 31 63 +def @arg14 251 16777216 0 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 0 Y 128 31 63 +def @arg17 8 20 0 Y 32928 0 63 +def @arg18 8 20 0 Y 32896 0 63 +def @arg19 8 20 0 Y 32896 0 63 +def @arg20 251 16777216 0 Y 0 31 8 +def @arg21 251 16777216 0 Y 0 31 8 +def @arg22 251 16777216 0 Y 0 31 8 +def @arg23 251 16777216 0 Y 128 31 63 +def @arg24 251 16777216 0 Y 0 31 8 +def @arg25 251 16777216 0 Y 128 31 63 +def @arg26 251 16777216 0 Y 0 31 8 +def @arg27 251 16777216 0 Y 128 31 63 +def @arg28 251 16777216 0 Y 0 31 8 +def @arg29 251 16777216 0 Y 128 31 63 +def @arg30 251 16777216 0 Y 0 31 8 +def @arg31 251 16777216 0 Y 0 31 8 +def @arg32 251 16777216 0 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':= c1 from t9 where c1= 1' at line 1 +test_sequence +------ select column, .. into @parm,.. ------ +select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, +c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, +c25, c26, c27, c28, c29, c30, c31, c32 +into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, +@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, +@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, +@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 +from t9 where c1= 1 ; +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 1 Y 32896 0 63 +def @arg03 8 20 1 Y 32896 0 63 +def @arg04 8 20 1 Y 32896 0 63 +def @arg05 8 20 1 Y 32896 0 63 +def @arg06 8 20 1 Y 32896 0 63 +def @arg07 5 23 1 Y 32896 31 63 +def @arg08 5 23 1 Y 32896 31 63 +def @arg09 5 23 1 Y 32896 31 63 +def @arg10 5 23 1 Y 32896 31 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 +def @arg13 251 16777216 10 Y 128 31 63 +def @arg14 251 16777216 19 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 8 Y 128 31 63 +def @arg17 8 20 4 Y 32928 0 63 +def @arg18 8 20 1 Y 32896 0 63 +def @arg19 8 20 1 Y 32896 0 63 +def @arg20 251 16777216 1 Y 0 31 8 +def @arg21 251 16777216 10 Y 0 31 8 +def @arg22 251 16777216 30 Y 0 31 8 +def @arg23 251 16777216 8 Y 128 31 63 +def @arg24 251 16777216 8 Y 0 31 8 +def @arg25 251 16777216 4 Y 128 31 63 +def @arg26 251 16777216 4 Y 0 31 8 +def @arg27 251 16777216 10 Y 128 31 63 +def @arg28 251 16777216 10 Y 0 31 8 +def @arg29 251 16777216 8 Y 128 31 63 +def @arg30 251 16777216 8 Y 0 31 8 +def @arg31 251 16777216 3 Y 0 31 8 +def @arg32 251 16777216 6 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, +c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, +c25, c26, c27, c28, c29, c30, c31, c32 +into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, +@arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, +@arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, +@arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 +from t9 where c1= 0 ; +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 0 Y 32896 0 63 +def @arg03 8 20 0 Y 32896 0 63 +def @arg04 8 20 0 Y 32896 0 63 +def @arg05 8 20 0 Y 32896 0 63 +def @arg06 8 20 0 Y 32896 0 63 +def @arg07 5 23 0 Y 32896 31 63 +def @arg08 5 23 0 Y 32896 31 63 +def @arg09 5 23 0 Y 32896 31 63 +def @arg10 5 23 0 Y 32896 31 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 +def @arg13 251 16777216 0 Y 128 31 63 +def @arg14 251 16777216 0 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 0 Y 128 31 63 +def @arg17 8 20 0 Y 32928 0 63 +def @arg18 8 20 0 Y 32896 0 63 +def @arg19 8 20 0 Y 32896 0 63 +def @arg20 251 16777216 0 Y 0 31 8 +def @arg21 251 16777216 0 Y 0 31 8 +def @arg22 251 16777216 0 Y 0 31 8 +def @arg23 251 16777216 0 Y 128 31 63 +def @arg24 251 16777216 0 Y 0 31 8 +def @arg25 251 16777216 0 Y 128 31 63 +def @arg26 251 16777216 0 Y 0 31 8 +def @arg27 251 16777216 0 Y 128 31 63 +def @arg28 251 16777216 0 Y 0 31 8 +def @arg29 251 16777216 0 Y 128 31 63 +def @arg30 251 16777216 0 Y 0 31 8 +def @arg31 251 16777216 0 Y 0 31 8 +def @arg32 251 16777216 0 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, + c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, + c25, c26, c27, c28, c29, c30, c31, c32 +into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, + @arg09, @arg10, @arg11, @arg12, @arg13, @arg14, @arg15, @arg16, + @arg17, @arg18, @arg19, @arg20, @arg21, @arg22, @arg23, @arg24, + @arg25, @arg26, @arg27, @arg28, @arg29, @arg30, @arg31, @arg32 +from t9 where c1= ?" ; +set @my_key= 1 ; +execute stmt1 using @my_key ; +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 1 Y 32896 0 63 +def @arg03 8 20 1 Y 32896 0 63 +def @arg04 8 20 1 Y 32896 0 63 +def @arg05 8 20 1 Y 32896 0 63 +def @arg06 8 20 1 Y 32896 0 63 +def @arg07 5 23 1 Y 32896 31 63 +def @arg08 5 23 1 Y 32896 31 63 +def @arg09 5 23 1 Y 32896 31 63 +def @arg10 5 23 1 Y 32896 31 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 +def @arg13 251 16777216 10 Y 128 31 63 +def @arg14 251 16777216 19 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 8 Y 128 31 63 +def @arg17 8 20 4 Y 32928 0 63 +def @arg18 8 20 1 Y 32896 0 63 +def @arg19 8 20 1 Y 32896 0 63 +def @arg20 251 16777216 1 Y 0 31 8 +def @arg21 251 16777216 10 Y 0 31 8 +def @arg22 251 16777216 30 Y 0 31 8 +def @arg23 251 16777216 8 Y 128 31 63 +def @arg24 251 16777216 8 Y 0 31 8 +def @arg25 251 16777216 4 Y 128 31 63 +def @arg26 251 16777216 4 Y 0 31 8 +def @arg27 251 16777216 10 Y 128 31 63 +def @arg28 251 16777216 10 Y 0 31 8 +def @arg29 251 16777216 8 Y 128 31 63 +def @arg30 251 16777216 8 Y 0 31 8 +def @arg31 251 16777216 3 Y 0 31 8 +def @arg32 251 16777216 6 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +set @my_key= 0 ; +execute stmt1 using @my_key ; +execute full_info ; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def @arg01 8 20 1 Y 32896 0 63 +def @arg02 8 20 0 Y 32896 0 63 +def @arg03 8 20 0 Y 32896 0 63 +def @arg04 8 20 0 Y 32896 0 63 +def @arg05 8 20 0 Y 32896 0 63 +def @arg06 8 20 0 Y 32896 0 63 +def @arg07 5 23 0 Y 32896 31 63 +def @arg08 5 23 0 Y 32896 31 63 +def @arg09 5 23 0 Y 32896 31 63 +def @arg10 5 23 0 Y 32896 31 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 +def @arg13 251 16777216 0 Y 128 31 63 +def @arg14 251 16777216 0 Y 128 31 63 +def @arg15 251 16777216 19 Y 128 31 63 +def @arg16 251 16777216 0 Y 128 31 63 +def @arg17 8 20 0 Y 32928 0 63 +def @arg18 8 20 0 Y 32896 0 63 +def @arg19 8 20 0 Y 32896 0 63 +def @arg20 251 16777216 0 Y 0 31 8 +def @arg21 251 16777216 0 Y 0 31 8 +def @arg22 251 16777216 0 Y 0 31 8 +def @arg23 251 16777216 0 Y 128 31 63 +def @arg24 251 16777216 0 Y 0 31 8 +def @arg25 251 16777216 0 Y 128 31 63 +def @arg26 251 16777216 0 Y 0 31 8 +def @arg27 251 16777216 0 Y 128 31 63 +def @arg28 251 16777216 0 Y 0 31 8 +def @arg29 251 16777216 0 Y 128 31 63 +def @arg30 251 16777216 0 Y 0 31 8 +def @arg31 251 16777216 0 Y 0 31 8 +def @arg32 251 16777216 0 Y 0 31 8 +@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 +0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from t9 where c1= 1' at line 1 +test_sequence +-- insert into numeric columns -- +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 ) ; +set @arg00= 21 ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt1 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22 )" ; +execute stmt1 ; +set @arg00= 23; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, +30.0, 30.0, 30.0 ) ; +set @arg00= 31.0 ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt1 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, 32.0, + 32.0, 32.0, 32.0 )" ; +execute stmt1 ; +set @arg00= 33.0; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( '40', '40', '40', '40', '40', '40', '40', '40', +'40', '40', '40' ) ; +set @arg00= '41' ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt1 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( '42', '42', '42', '42', '42', '42', '42', '42', + '42', '42', '42' )" ; +execute stmt1 ; +set @arg00= '43'; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( CAST('50' as binary), CAST('50' as binary), +CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), +CAST('50' as binary), CAST('50' as binary), CAST('50' as binary), +CAST('50' as binary), CAST('50' as binary), CAST('50' as binary) ) ; +set @arg00= CAST('51' as binary) ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt1 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( CAST('52' as binary), CAST('52' as binary), + CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), + CAST('52' as binary), CAST('52' as binary), CAST('52' as binary), + CAST('52' as binary), CAST('52' as binary), CAST('52' as binary) )" ; +execute stmt1 ; +set @arg00= CAST('53' as binary) ; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +set @arg00= 2 ; +set @arg00= NULL ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 60, NULL, NULL, NULL, NULL, NULL, NULL, NULL, +NULL, NULL, NULL ) ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 61, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt1 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 62, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL )" ; +execute stmt1 ; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 63, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +set @arg00= 8.0 ; +set @arg00= NULL ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 71, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 73, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +set @arg00= 'abc' ; +set @arg00= NULL ; +insert into t9 +( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values +( 81, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ) ; +prepare stmt2 from "insert into t9 + ( c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 83, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 +from t9 where c1 >= 20 +order by c1 ; +c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c12 +20 20 20 20 20 20 20 20 20 20 20.0000 +21 21 21 21 21 21 21 21 21 21 21.0000 +22 22 22 22 22 22 22 22 22 22 22.0000 +23 23 23 23 23 23 23 23 23 23 23.0000 +30 30 30 30 30 30 30 30 30 30 30.0000 +31 31 31 31 31 31 31 31 31 31 31.0000 +32 32 32 32 32 32 32 32 32 32 32.0000 +33 33 33 33 33 33 33 33 33 33 33.0000 +40 40 40 40 40 40 40 40 40 40 40.0000 +41 41 41 41 41 41 41 41 41 41 41.0000 +42 42 42 42 42 42 42 42 42 42 42.0000 +43 43 43 43 43 43 43 43 43 43 43.0000 +50 50 50 50 50 50 50 50 50 50 50.0000 +51 51 51 51 51 51 51 51 51 51 51.0000 +52 52 52 52 52 52 52 52 52 52 52.0000 +53 53 53 53 53 53 53 53 53 53 53.0000 +60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +71 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +73 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +81 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +83 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +test_sequence +-- select .. where numeric column = .. -- +set @arg00= 20; +select 'true' as found from t9 +where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20 +and c8= 20 and c9= 20 and c10= 20 and c12= 20; +found +true +select 'true' as found from t9 +where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 +and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 +and c12= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c2= 20 and c3= 20 and c4= 20 and c5= 20 and c6= 20 and c7= 20 + and c8= 20 and c9= 20 and c10= 20 and c12= 20 "; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? + and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? + and c12= ? "; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= 20.0; +select 'true' as found from t9 +where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0 +and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0; +found +true +select 'true' as found from t9 +where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 +and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 +and c12= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20.0 and c2= 20.0 and c3= 20.0 and c4= 20.0 and c5= 20.0 and c6= 20.0 + and c7= 20.0 and c8= 20.0 and c9= 20.0 and c10= 20.0 and c12= 20.0 "; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? + and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? + and c12= ? "; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +found +true +select 'true' as found from t9 +where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20' + and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20'; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= '20' and c2= '20' and c3= '20' and c4= '20' and c5= '20' and c6= '20' + and c7= '20' and c8= '20' and c9= '20' and c10= '20' and c12= '20' "; +execute stmt1 ; +found +true +set @arg00= '20'; +select 'true' as found from t9 +where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 +and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 +and c12= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? + and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? + and c12= ? "; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +found +true +select 'true' as found from t9 +where c1= CAST('20' as binary) and c2= CAST('20' as binary) and +c3= CAST('20' as binary) and c4= CAST('20' as binary) and +c5= CAST('20' as binary) and c6= CAST('20' as binary) and +c7= CAST('20' as binary) and c8= CAST('20' as binary) and +c9= CAST('20' as binary) and c10= CAST('20' as binary) and +c12= CAST('20' as binary); +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= CAST('20' as binary) and c2= CAST('20' as binary) and + c3= CAST('20' as binary) and c4= CAST('20' as binary) and + c5= CAST('20' as binary) and c6= CAST('20' as binary) and + c7= CAST('20' as binary) and c8= CAST('20' as binary) and + c9= CAST('20' as binary) and c10= CAST('20' as binary) and + c12= CAST('20' as binary) "; +execute stmt1 ; +found +true +set @arg00= CAST('20' as binary) ; +select 'true' as found from t9 +where c1= @arg00 and c2= @arg00 and c3= @arg00 and c4= @arg00 and c5= @arg00 +and c6= @arg00 and c7= @arg00 and c8= @arg00 and c9= @arg00 and c10= @arg00 +and c12= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= ? and c2= ? and c3= ? and c4= ? and c5= ? + and c6= ? and c7= ? and c8= ? and c9= ? and c10= ? + and c12= ? "; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00 ; +found +true +delete from t9 ; +test_sequence +-- some numeric overflow experiments -- +prepare my_insert from "insert into t9 + ( c21, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 ) +values + ( 'O', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ; +prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12 +from t9 where c21 = 'O' "; +prepare my_delete from "delete from t9 where c21 = 'O' "; +set @arg00= 9223372036854775807 ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 127 +c2 32767 +c3 8388607 +c4 2147483647 +c5 2147483647 +c6 9223372036854775807 +c7 9.22337e+18 +c8 9.22337203685478e+18 +c9 9.22337203685478e+18 +c10 9.22337203685478e+18 +c12 9999.9999 +execute my_delete ; +set @arg00= '9223372036854775807' ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 127 +c2 32767 +c3 8388607 +c4 2147483647 +c5 2147483647 +c6 9223372036854775807 +c7 9.22337e+18 +c8 9.22337203685478e+18 +c9 9.22337203685478e+18 +c10 9.22337203685478e+18 +c12 9999.9999 +execute my_delete ; +set @arg00= -9223372036854775808 ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 -128 +c2 -32768 +c3 -8388608 +c4 -2147483648 +c5 -2147483648 +c6 -9223372036854775808 +c7 -9.22337e+18 +c8 -9.22337203685478e+18 +c9 -9.22337203685478e+18 +c10 -9.22337203685478e+18 +c12 -9999.9999 +execute my_delete ; +set @arg00= '-9223372036854775808' ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 -128 +c2 -32768 +c3 -8388608 +c4 -2147483648 +c5 -2147483648 +c6 -9223372036854775808 +c7 -9.22337e+18 +c8 -9.22337203685478e+18 +c9 -9.22337203685478e+18 +c10 -9.22337203685478e+18 +c12 -9999.9999 +execute my_delete ; +set @arg00= 1.11111111111111111111e+50 ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c6' at row 1 +Warning 1264 Out of range value for column 'c7' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 127 +c2 32767 +c3 8388607 +c4 2147483647 +c5 2147483647 +c6 9223372036854775807 +c7 3.40282e+38 +c8 1.11111111111111e+50 +c9 1.11111111111111e+50 +c10 1.11111111111111e+50 +c12 9999.9999 +execute my_delete ; +set @arg00= '1.11111111111111111111e+50' ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c6' at row 1 +Warning 1264 Out of range value for column 'c7' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 127 +c2 32767 +c3 8388607 +c4 2147483647 +c5 2147483647 +c6 9223372036854775807 +c7 3.40282e+38 +c8 1.11111111111111e+50 +c9 1.11111111111111e+50 +c10 1.11111111111111e+50 +c12 9999.9999 +execute my_delete ; +set @arg00= -1.11111111111111111111e+50 ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c6' at row 1 +Warning 1264 Out of range value for column 'c7' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 -128 +c2 -32768 +c3 -8388608 +c4 -2147483648 +c5 -2147483648 +c6 -9223372036854775808 +c7 -3.40282e+38 +c8 -1.11111111111111e+50 +c9 -1.11111111111111e+50 +c10 -1.11111111111111e+50 +c12 -9999.9999 +execute my_delete ; +set @arg00= '-1.11111111111111111111e+50' ; +execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c3' at row 1 +Warning 1264 Out of range value for column 'c4' at row 1 +Warning 1264 Out of range value for column 'c5' at row 1 +Warning 1264 Out of range value for column 'c6' at row 1 +Warning 1264 Out of range value for column 'c7' at row 1 +Warning 1264 Out of range value for column 'c12' at row 1 +execute my_select ; +c1 -128 +c2 -32768 +c3 -8388608 +c4 -2147483648 +c5 -2147483648 +c6 -9223372036854775808 +c7 -3.40282e+38 +c8 -1.11111111111111e+50 +c9 -1.11111111111111e+50 +c10 -1.11111111111111e+50 +c12 -9999.9999 +execute my_delete ; +test_sequence +-- insert into string columns -- +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 +select c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 +from t9 where c1 >= 20 +order by c1 ; +c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 +20 2 20 20 20 20 20 20 20 20 20 20 +21 2 21 21 21 21 21 21 21 21 21 21 +22 2 22 22 22 22 22 22 22 22 22 22 +23 2 23 23 23 23 23 23 23 23 23 23 +30 3 30 30 30 30 30 30 30 30 30 30 +31 3 31 31 31 31 31 31 31 31 31 31 +32 3 32 32 32 32 32 32 32 32 32 32 +33 3 33 33 33 33 33 33 33 33 33 33 +40 4 40 40 40 40 40 40 40 40 40 40 +41 4 41 41 41 41 41 41 41 41 41 41 +42 4 42 42 42 42 42 42 42 42 42 42 +43 4 43 43 43 43 43 43 43 43 43 43 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 +52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 +53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 +54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 +55 5 55 55 55 55 55 55 55 55 55 55 +56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 +57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00 +60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +63 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +71 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +73 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +81 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +83 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +test_sequence +-- select .. where string column = .. -- +set @arg00= '20'; +select 'true' as found from t9 +where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and +c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and +c27= '20' and c28= '20' and c29= '20' and c30= '20' ; +found +true +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and +c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and +c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr('20',1+length(c20)))= '20' and c21= '20' and + c22= '20' and c23= '20' and c24= '20' and c25= '20' and c26= '20' and + c27= '20' and c28= '20' and c29= '20' and c30= '20'" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and + c21= ? and c22= ? and c23= ? and c25= ? and + c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= CAST('20' as binary); +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20))) += CAST('20' as binary) and c21= CAST('20' as binary) +and c22= CAST('20' as binary) and c23= CAST('20' as binary) and +c24= CAST('20' as binary) and c25= CAST('20' as binary) and +c26= CAST('20' as binary) and c27= CAST('20' as binary) and +c28= CAST('20' as binary) and c29= CAST('20' as binary) and +c30= CAST('20' as binary) ; +found +true +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(@arg00,1+length(c20))) = @arg00 and +c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and +c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and +c30= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(CAST('20' as binary),1+length(c20))) + = CAST('20' as binary) and c21= CAST('20' as binary) + and c22= CAST('20' as binary) and c23= CAST('20' as binary) and + c24= CAST('20' as binary) and c25= CAST('20' as binary) and + c26= CAST('20' as binary) and c27= CAST('20' as binary) and + c28= CAST('20' as binary) and c29= CAST('20' as binary) and + c30= CAST('20' as binary)" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(?,1+length(c20))) = ? and c21= ? and + c22= ? and c23= ? and c25= ? and c26= ? and c27= ? and c28= ? and + c29= ? and c30= ?"; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= 20; +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and +c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and +c27= 20 and c28= 20 and c29= 20 and c30= 20 ; +found +true +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and +c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and +c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(20,1+length(c20)))= 20 and c21= 20 and + c22= 20 and c23= 20 and c24= 20 and c25= 20 and c26= 20 and + c27= 20 and c28= 20 and c29= 20 and c30= 20" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and + c21= ? and c22= ? and c23= ? and c25= ? and + c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= 20.0; +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and +c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and +c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0 ; +found +true +select 'true' as found from t9 +where c1= 20 and concat(c20,substr(@arg00,1+length(c20)))= @arg00 and +c21= @arg00 and c22= @arg00 and c23= @arg00 and c25= @arg00 and +c26= @arg00 and c27= @arg00 and c28= @arg00 and c29= @arg00 and c30= @arg00; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(20.0,1+length(c20)))= 20.0 and c21= 20.0 and + c22= 20.0 and c23= 20.0 and c24= 20.0 and c25= 20.0 and c26= 20.0 and + c27= 20.0 and c28= 20.0 and c29= 20.0 and c30= 20.0" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and concat(c20,substr(?,1+length(c20)))= ? and + c21= ? and c22= ? and c23= ? and c25= ? and + c26= ? and c27= ? and c28= ? and c29= ? and c30= ?" ; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, +@arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +delete from t9 ; +test_sequence +-- insert into date/time columns -- +Warnings: +Note 1265 Data truncated for column 'c13' at row 1 +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Note 1265 Data truncated for column 'c13' at row 1 +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Note 1265 Data truncated for column 'c13' at row 1 +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Note 1265 Data truncated for column 'c13' at row 1 +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Note 1265 Data truncated for column 'c13' at row 1 +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Note 1265 Data truncated for column 'c13' at row 1 +Warning 1265 Data truncated for column 'c17' at row 1 +Warnings: +Warning 1264 Out of range value for column 'c13' at row 1 +Warning 1264 Out of range value for column 'c14' at row 1 +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1264 Out of range value for column 'c13' at row 1 +Warning 1264 Out of range value for column 'c14' at row 1 +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1264 Out of range value for column 'c13' at row 1 +Warning 1264 Out of range value for column 'c14' at row 1 +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1264 Out of range value for column 'c13' at row 1 +Warning 1264 Out of range value for column 'c14' at row 1 +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Note 1265 Data truncated for column 'c13' at row 1 +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +Warnings: +Warning 1265 Data truncated for column 'c15' at row 1 +Warning 1264 Out of range value for column 'c16' at row 1 +Warning 1264 Out of range value for column 'c17' at row 1 +select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; +c1 c13 c14 c15 c16 c17 +20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +21 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +22 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +23 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +30 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +31 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +32 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +33 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 +40 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +41 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +60 NULL NULL 1991-01-01 01:01:01 NULL NULL +61 NULL NULL 1991-01-01 01:01:01 NULL NULL +62 NULL NULL 1991-01-01 01:01:01 NULL NULL +63 NULL NULL 1991-01-01 01:01:01 NULL NULL +71 NULL NULL 1991-01-01 01:01:01 NULL NULL +73 NULL NULL 1991-01-01 01:01:01 NULL NULL +81 NULL NULL 1991-01-01 01:01:01 NULL NULL +83 NULL NULL 1991-01-01 01:01:01 NULL NULL +test_sequence +-- select .. where date/time column = .. -- +set @arg00= '1991-01-01 01:01:01' ; +select 'true' as found from t9 +where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and +c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and +c17= '1991-01-01 01:01:01' ; +found +true +select 'true' as found from t9 +where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 +and c17= @arg00 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and + c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and + c17= '1991-01-01 01:01:01'" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= CAST('1991-01-01 01:01:01' as datetime) ; +select 'true' as found from t9 +where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and +c14= CAST('1991-01-01 01:01:01' as datetime) and +c15= CAST('1991-01-01 01:01:01' as datetime) and +c16= CAST('1991-01-01 01:01:01' as datetime) and +c17= CAST('1991-01-01 01:01:01' as datetime) ; +found +true +select 'true' as found from t9 +where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00 +and c17= @arg00 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c13= CAST('1991-01-01 00:00:00' as datetime) and + c14= CAST('1991-01-01 01:01:01' as datetime) and + c15= CAST('1991-01-01 01:01:01' as datetime) and + c16= CAST('1991-01-01 01:01:01' as datetime) and + c17= CAST('1991-01-01 01:01:01' as datetime)" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ; +execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ; +found +true +set @arg00= 1991 ; +select 'true' as found from t9 +where c1= 20 and c17= 1991 ; +found +true +select 'true' as found from t9 +where c1= 20 and c17= @arg00 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c17= 1991" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and c17= ?" ; +execute stmt1 using @arg00 ; +found +true +set @arg00= 1.991e+3 ; +select 'true' as found from t9 +where c1= 20 and abs(c17 - 1.991e+3) < 0.01 ; +found +true +select 'true' as found from t9 +where c1= 20 and abs(c17 - @arg00) < 0.01 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and abs(c17 - 1.991e+3) < 0.01" ; +execute stmt1 ; +found +true +prepare stmt1 from "select 'true' as found from t9 +where c1= 20 and abs(c17 - ?) < 0.01" ; +execute stmt1 using @arg00 ; +found +true +drop table t1, t9; diff --git a/mysql-test/suite/ndb/r/strict_autoinc_5ndb.result b/mysql-test/suite/ndb/r/strict_autoinc_5ndb.result new file mode 100644 index 00000000000..ea6e5ffc741 --- /dev/null +++ b/mysql-test/suite/ndb/r/strict_autoinc_5ndb.result @@ -0,0 +1,28 @@ +drop table if exists t1; +set @org_mode=@@sql_mode; +create table t1 +( +`a` tinyint(4) NOT NULL auto_increment, +primary key (`a`) +) engine = 'NDB' ; +set @@sql_mode='strict_all_tables'; +insert into t1 values(1000); +ERROR 22003: Out of range value for column 'a' at row 1 +select count(*) from t1; +count(*) +0 +set auto_increment_increment=1000; +set auto_increment_offset=700; +insert into t1 values(null); +ERROR 22003: Out of range value for column 'a' at row 1 +select count(*) from t1; +count(*) +0 +set @@sql_mode=@org_mode; +insert into t1 values(null); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +select * from t1; +a +127 +drop table t1; diff --git a/mysql-test/suite/ndb/t/disabled.def b/mysql-test/suite/ndb/t/disabled.def new file mode 100644 index 00000000000..ec1dc26039f --- /dev/null +++ b/mysql-test/suite/ndb/t/disabled.def @@ -0,0 +1,23 @@ +############################################################################## +# +# List the test cases that are to be disabled temporarily. +# +# Separate the test case name and the comment with ':'. +# +# : BUG# +# +# Do not use any TAB characters for whitespace. +# +############################################################################## +ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog +ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog +ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed + +partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table + +ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms + +# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open +#ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent CRBR: multiple binlog, second binlog may miss schema log events +#ndb_binlog_discover : bug#21806 2006-08-24 +#ndb_autodiscover3 : bug#21806 diff --git a/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test b/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test new file mode 100644 index 00000000000..f4a6743aabe --- /dev/null +++ b/mysql-test/suite/ndb/t/loaddata_autocom_ndb.test @@ -0,0 +1,4 @@ +--source include/have_ndb.inc +let $engine_type=ndbcluster; + +--source include/loaddata_autocom.inc diff --git a/mysql-test/suite/ndb/t/ndb_alter_table.test b/mysql-test/suite/ndb/t/ndb_alter_table.test new file mode 100644 index 00000000000..a7b52d54710 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_alter_table.test @@ -0,0 +1,439 @@ +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +drop database if exists mysqltest; +--enable_warnings + +connect (con1,localhost,root,,test); +connect (con2,localhost,root,,test); + +connection con2; +-- sleep 2 +connection con1; + +# +# Basic test to show that the ALTER TABLE +# is working +# +CREATE TABLE t1 ( + a INT NOT NULL, + b INT NOT NULL +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (9410,9412); + +ALTER TABLE t1 ADD COLUMN c int not null; +SELECT * FROM t1; + +DROP TABLE t1; + +# +# Verfify changing table names between databases +# +CREATE DATABASE mysqltest; +USE mysqltest; +CREATE TABLE t1 ( + a INT NOT NULL, + b INT NOT NULL +) ENGINE=ndbcluster; +RENAME TABLE t1 TO test.t1; +SHOW TABLES; +DROP DATABASE mysqltest; +USE test; +SHOW TABLES; +DROP TABLE t1; + +# +# More advanced test +# +create table t1 ( +col1 int not null auto_increment primary key, +col2 varchar(30) not null, +col3 varchar (20) not null, +col4 varchar(4) not null, +col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, +col6 int not null, to_be_deleted int) ENGINE=ndbcluster; +--replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # +show table status; +SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +insert into t1 values +(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); +--replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # +show table status; +select * from t1 order by col1; +alter table t1 +add column col4_5 varchar(20) not null after col4, +add column col7 varchar(30) not null after col5, +add column col8 datetime not null, drop column to_be_deleted, +change column col2 fourth varchar(30) not null after col3, +modify column col6 int not null first; +--replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # +show table status; +select * from t1 order by col1; +insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); +--replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # +show table status; +select * from t1 order by col1; +delete from t1; +insert into t1 values (0,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); +SET SQL_MODE=''; +insert into t1 values (1,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); +select * from t1 order by col1; +alter table t1 drop column col4_5; +insert into t1 values (2,0,4,3,5,"PENDING","EXTRA",'2004-01-01 00:00:00'); +select * from t1 order by col1; +drop table t1; + + +# +# Check that invalidating dictionary cache works +# + +CREATE TABLE t1 ( + a INT NOT NULL, + b INT NOT NULL +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (9410,9412); + +ALTER TABLE t1 ADD COLUMN c int not null; +select * from t1 order by a; + +connection con2; +select * from t1 order by a; +alter table t1 drop c; + +connection con1; +select * from t1 order by a; +drop table t1; + +connection con2; +--error 1146 +select * from t1 order by a; + +CREATE TABLE t1 ( + a INT NOT NULL PRIMARY KEY, + b INT NOT NULL +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (0,1),(17,18); +select * from t1 order by a; +SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +alter table t1 modify column a int not null auto_increment; +SET SQL_MODE=''; +select * from t1 order by a; +INSERT INTO t1 VALUES (0,19),(20,21); +select * from t1 order by a; +drop table t1; + +CREATE TABLE t1 ( + a INT NOT NULL PRIMARY KEY, + b INT NOT NULL +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (0,1),(17,18); +select * from t1 order by a; +alter table t1 add c int not null unique auto_increment; +select c from t1 order by c; +INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); +select c from t1 order by c; +drop table t1; + +## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs +#create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) +#engine=ndb; +#insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); +#create index c on t1(c); +#connection server2; +#select * from t1 where c = 'two'; +#connection server1; +#alter table t1 drop index c; +#connection server2; +#select * from t1 where c = 'two'; +#connection server1; +#drop table t1; + +#--disable_warnings +#DROP TABLE IF EXISTS t2; +#--enable_warnings + +#create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam; +#let $1=12001; +#disable_query_log; +#while ($1) +#{ +# eval insert into t2 values($1); +# dec $1; +#} +#enable_query_log; +#alter table t2 engine=ndbcluster; +#alter table t2 add c int; +#--error 1297 +#delete from t2; +#to make sure we do a full table scan +#select count(*) from t2 where a+0 > 0; +#truncate table t2; +#select count(*) from t2; +#drop table t2; + +## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs +#connection server1; +#create table t3 (a int primary key) engine=ndbcluster; + +#connection server2; +#begin; +#insert into t3 values (1); + +#connection server1; +#alter table t3 rename t4; + +#connection server2; +## with rbr the below will not work as the "alter" event +## explicitly invalidates the dictionary cache. +### This should work as transaction is ongoing... +##delete from t3; +##insert into t3 values (1); +#commit; + +## This should fail as its a new transaction +#--error 1146 +#select * from t3; +#select * from t4; +#drop table t4; +#show tables; +#connection server1; + +create table t1 ( +ai bigint auto_increment, +c001 int(11) not null, +c002 int(11) not null, +c003 int(11) not null, +c004 int(11) not null, +c005 int(11) not null, +c006 int(11) not null, +c007 int(11) not null, +c008 int(11) not null, +c009 int(11) not null, +c010 int(11) not null, +c011 int(11) not null, +c012 int(11) not null, +c013 int(11) not null, +c014 int(11) not null, +c015 int(11) not null, +c016 int(11) not null, +c017 int(11) not null, +c018 int(11) not null, +c019 int(11) not null, +c020 int(11) not null, +c021 int(11) not null, +c022 int(11) not null, +c023 int(11) not null, +c024 int(11) not null, +c025 int(11) not null, +c026 int(11) not null, +c027 int(11) not null, +c028 int(11) not null, +c029 int(11) not null, +c030 int(11) not null, +c031 int(11) not null, +c032 int(11) not null, +c033 int(11) not null, +c034 int(11) not null, +c035 int(11) not null, +c036 int(11) not null, +c037 int(11) not null, +c038 int(11) not null, +c039 int(11) not null, +c040 int(11) not null, +c041 int(11) not null, +c042 int(11) not null, +c043 int(11) not null, +c044 int(11) not null, +c045 int(11) not null, +c046 int(11) not null, +c047 int(11) not null, +c048 int(11) not null, +c049 int(11) not null, +c050 int(11) not null, +c051 int(11) not null, +c052 int(11) not null, +c053 int(11) not null, +c054 int(11) not null, +c055 int(11) not null, +c056 int(11) not null, +c057 int(11) not null, +c058 int(11) not null, +c059 int(11) not null, +c060 int(11) not null, +c061 int(11) not null, +c062 int(11) not null, +c063 int(11) not null, +c064 int(11) not null, +c065 int(11) not null, +c066 int(11) not null, +c067 int(11) not null, +c068 int(11) not null, +c069 int(11) not null, +c070 int(11) not null, +c071 int(11) not null, +c072 int(11) not null, +c073 int(11) not null, +c074 int(11) not null, +c075 int(11) not null, +c076 int(11) not null, +c077 int(11) not null, +c078 int(11) not null, +c079 int(11) not null, +c080 int(11) not null, +c081 int(11) not null, +c082 int(11) not null, +c083 int(11) not null, +c084 int(11) not null, +c085 int(11) not null, +c086 int(11) not null, +c087 int(11) not null, +c088 int(11) not null, +c089 int(11) not null, +c090 int(11) not null, +c091 int(11) not null, +c092 int(11) not null, +c093 int(11) not null, +c094 int(11) not null, +c095 int(11) not null, +c096 int(11) not null, +c097 int(11) not null, +c098 int(11) not null, +c099 int(11) not null, +c100 int(11) not null, +c101 int(11) not null, +c102 int(11) not null, +c103 int(11) not null, +c104 int(11) not null, +c105 int(11) not null, +c106 int(11) not null, +c107 int(11) not null, +c108 int(11) not null, +c109 int(11) not null, +primary key (ai), +unique key tx1 (c002, c003, c004, c005)) engine=ndb; + +create index tx2 +on t1 (c010, c011, c012, c013); + +drop table t1; + +# End of 4.1 tests + +# On-line alter table + + +CREATE TABLE t1 ( + auto int(5) unsigned NOT NULL auto_increment, + string char(10), + vstring varchar(10), + bin binary(2), + vbin varbinary(7), + tiny tinyint(4) DEFAULT '0' NOT NULL , + short smallint(6) DEFAULT '1' NOT NULL , + medium mediumint(8) DEFAULT '0' NOT NULL, + long_int int(11) DEFAULT '0' NOT NULL, + longlong bigint(13) DEFAULT '0' NOT NULL, + real_float float(13,1) DEFAULT 0.0 NOT NULL, + real_double double(16,4), + real_decimal decimal(16,4), + utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, + ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, + umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, + ulong int(11) unsigned DEFAULT '0' NOT NULL, + ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, + bits bit(3), + options enum('zero','one','two','three','four') not null, + flags set('zero','one','two','three','four') not null, + date_field date, + year_field year, + time_field time, + date_time datetime, + time_stamp timestamp, + PRIMARY KEY (auto) +) engine=ndb; + +CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255)); + +--disable_warnings +--exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat +LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; +--enable_warnings + +# Ndb doesn't support renaming attributes on-line +set @t1_id = (select id from ndb_show_tables where name like '%t1%'); +truncate ndb_show_tables; + +alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; +--disable_warnings +--exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat +LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; +--enable_warnings + +select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; + +set @t1_id = (select id from ndb_show_tables where name like '%t1%'); +truncate ndb_show_tables; + +create index i1 on t1(medium); +alter table t1 add index i2(new_tiny); +drop index i1 on t1; + +--disable_warnings +--exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat +LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; +--exec rm $MYSQLTEST_VARDIR/master-data/test/tmp.dat || true +--enable_warnings + +select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; + +DROP TABLE t1, ndb_show_tables; + +# simple test that auto incr is not lost at rename or alter +create table t1 (a int primary key auto_increment, b int) engine=ndb; +insert into t1 (b) values (101),(102),(103); +select * from t1 where a = 3; +alter table t1 rename t2; +insert into t2 (b) values (201),(202),(203); +select * from t2 where a = 6; +alter table t2 add c int; +insert into t2 (b) values (301),(302),(303); +select * from t2 where a = 9; +alter table t2 rename t1; +insert into t1 (b) values (401),(402),(403); +select * from t1 where a = 12; +drop table t1; + +# some other ALTER combinations +# add/drop pk +create table t1 (a int not null, b varchar(10)) engine=ndb; +show index from t1; +alter table t1 add primary key (a); +show index from t1; +alter table t1 drop primary key; +show index from t1; +drop table t1; + +# alter .. alter +create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; +show create table t1; +alter table t1 alter b set default 1; +show create table t1; +drop table t1; + +# alter .. order by +create table t1 (a int not null, b int not null) engine=ndb; +insert into t1 values (1, 300), (2, 200), (3, 100); +select * from t1 order by a; +alter table t1 order by b; +select * from t1 order by b; +drop table t1; + +--echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_alter_table2.test b/mysql-test/suite/ndb/t/ndb_alter_table2.test new file mode 100644 index 00000000000..afe6e44f698 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_alter_table2.test @@ -0,0 +1,85 @@ +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +connect (con1,localhost,root,,test); +connect (con2,localhost,root,,test); +connect (con3,localhost,root,,test); +connect (con4,localhost,root,,test); +connect (con5,localhost,root,,test); +connect (con6,localhost,root,,test); + +CREATE TABLE t1 ( + a INT NOT NULL PRIMARY KEY, + b INT NOT NULL +) ENGINE=ndbcluster; + +connection con1; +BEGIN; +INSERT INTO t1 VALUES (9410,9412); +connection con2; +BEGIN; +--send +INSERT INTO t1 VALUES (9411,9412); +connection con3; +BEGIN; +--send +INSERT INTO t1 VALUES (9412,9412); +connection con4; +BEGIN; +--send +INSERT INTO t1 VALUES (9413,9412); +connection con5; +BEGIN; +--send +INSERT INTO t1 VALUES (9414,9412); +connection con6; +BEGIN; +--send +INSERT INTO t1 VALUES (9415,9412); +connection con1; +sleep 1; + +ROLLBACK; +connection con2; +reap; +ROLLBACK; +connection con3; +reap; +ROLLBACK; +connection con4; +reap; +ROLLBACK; +connection con5; +reap; +ROLLBACK; +connection con6; +reap; +ROLLBACK; + +connection server2; + +drop table t1; +CREATE TABLE t1 ( + a INT NOT NULL PRIMARY KEY, + b INT NOT NULL, + c INT NOT NULL +) ENGINE=ndbcluster; + +connection server1; + +--disable_result_log +--error 0,1412 +select * from t1; +--enable_result_log +select * from t1; +select * from t1; +select * from t1; +select * from t1; +select * from t1; + +drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_alter_table3.test b/mysql-test/suite/ndb/t/ndb_alter_table3.test new file mode 100644 index 00000000000..a5fe613adcf --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_alter_table3.test @@ -0,0 +1,49 @@ +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +connection server1; +create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) +engine=ndb; +insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); +create index c on t1(c); +connection server2; +show indexes from t1; +select * from t1 where c = 'two'; +connection server1; +alter table t1 drop index c; +connection server2; +show indexes from t1; +select * from t1 where c = 'two'; +connection server1; +drop table t1; + +connection server1; +create table t3 (a int primary key) engine=ndbcluster; + +connection server2; +begin; +insert into t3 values (1); + +connection server1; +alter table t3 rename t4; + +connection server2; +# with rbr the below will not work as the "alter" event +# explicitly invalidates the dictionary cache. +## This should work as transaction is ongoing... +#delete from t3; +#insert into t3 values (1); +commit; + +# This should fail as its a new transaction +--error 1146 +select * from t3; +select * from t4; +drop table t4; +show tables; +connection server1; diff --git a/mysql-test/suite/ndb/t/ndb_autodiscover.test b/mysql-test/suite/ndb/t/ndb_autodiscover.test new file mode 100644 index 00000000000..06d47693c10 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_autodiscover.test @@ -0,0 +1,548 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +--enable_warnings + +################################################ +# Test that a table that does not exist as a +# frm file on disk can be "discovered" from a +# connected NDB Cluster +# + +flush status; + +# +# Test discover + SELECT +# + +create table t1( + id int not null primary key, + name char(20) +) engine=ndb; + +insert into t1 values(1, "Autodiscover"); +flush tables; +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm +select * from t1; +show status like 'handler_discover%'; + +# +# Test discover + INSERT +# + +flush tables; +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm +insert into t1 values (2, "Auto 2"); +show status like 'handler_discover%'; +insert into t1 values (3, "Discover 3"); +show status like 'handler_discover%'; +flush tables; +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm +select * from t1 order by id; +show status like 'handler_discover%'; + +# +# Test discover + UPDATE +# + +flush tables; +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm +update t1 set name="Autodiscover" where id = 2; +show status like 'handler_discover%'; +select * from t1 order by id; +show status like 'handler_discover%'; + +# +# Test discover + DELETE +# + +flush tables; +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm +delete from t1 where id = 3; +select * from t1 order by id; +show status like 'handler_discover%'; + +drop table t1; + + + +###################################################### +# Test that a table that is outdated on disk +# can be "discovered" from a connected NDB Cluster +# + +flush status; + +create table t2( + id int not null primary key, + name char(22) +) engine=ndb; +insert into t2 values (1, "Discoverer"); +select * from t2; +show status like 'handler_discover%'; +flush tables; + +# Modify the frm file on disk +system echo "blaj" >> $MYSQLTEST_VARDIR/master-data/test/t2.frm ; +select * from t2; + +show status like 'handler_discover%'; + +drop table t2; + + +################################################## +# Test that a table that already exists in NDB +# is only discovered if CREATE TABLE IF NOT EXISTS +# is used +# + +flush status; + +create table t3( + id int not null primary key, + name char(255) +) engine=ndb; +insert into t3 values (1, "Explorer"); +select * from t3; +show status like 'handler_discover%'; +flush tables; + +# Remove the frm file from disk +--remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm + +--error 1050 +create table t3( + id int not null primary key, + name char(20), a int, b float, c char(24) +) engine=ndb; + +# The table shall not have been discovered since +# IF NOT EXISTS wasn't specified + +show status like 'handler_discover%'; + +# now it should be discovered +create table IF NOT EXISTS t3( + id int not null primary key, + id2 int not null, + name char(20) +) engine=ndb; + +# NOTE! the table called t3 have now been updated to +# use the same frm as in NDB, thus it's not certain that +# the table schema is the same as was stated in the +# CREATE TABLE statement above + +show status like 'handler_discover%'; + +SHOW CREATE TABLE t3; + +select * from t3; +show status like 'handler_discover%'; + +drop table t3; + +################################################## +# Test that a table that already exists in NDB +# is discovered when SHOW TABLES +# is used +# + +flush status; + +create table t7( + id int not null primary key, + name char(255) +) engine=ndb; +create table t6( + id int not null primary key, + name char(255) +) engine=MyISAM; +insert into t7 values (1, "Explorer"); +insert into t6 values (2, "MyISAM table"); +select * from t7; +show status like 'handler_discover%'; + +# Remove the frm file from disk +flush tables; +--remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm + +show tables from test; +show status like 'handler_discover%'; + +# Remove the frm file from disk again +flush tables; +--remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm + +--replace_column 6 # 7 # 8 # 9 # 12 # 13 # 15 # 18 # +show table status; +show status like 'handler_discover%'; + +drop table t6, t7; + + +####################################################### +# Test that a table that has been dropped from NDB +# but still exists on disk, get a consistent error message +# saying "No such table existed" +# + +flush status; + +create table t4( + id int not null primary key, + name char(27) +) engine=ndb; +insert into t4 values (1, "Automatic"); +select * from t4; + +# Remove the table from NDB +system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; + +# +# Test that correct error is returned +--error 1146 +select * from t4; +--error 1146 +select * from t4; + +show status like 'handler_discover%'; +--error 1051 +drop table t4; + +create table t4( + id int not null primary key, + name char(27) +) engine=ndb; +insert into t4 values (1, "Automatic"); +select * from t4; + +# Remove the table from NDB +system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; + +--error 1146 +select * from t4; + +drop table if exists t4; + +# Test that dropping a table that does not exists +# on disk or in NDB gives same result as above +--error 1051 +drop table t5; +drop table if exists t5; + + +####################################################### +# Test that a table that has been dropped from NDB +# but still exists on disk is deleted from disk +# when SHOW TABLES is called +# + +flush status; + +create table t4( + id int not null primary key, + id2 int, + name char(27) +) engine=ndb; +insert into t4 values (1, 76, "Automatic2"); +select * from t4; +flush tables; + +# Remove the table from NDB +system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; + +SHOW TABLES; + +--error 1146 +select * from t4; + +####################################################### +# Test SHOW TABLES ability to detect new and delete old +# tables. Test all at once using many tables +# + +flush status; + +# Create tables +create table t1(id int) engine=ndbcluster; +create table t2(id int, b char(255)) engine=myisam; +create table t3(id int, c char(255)) engine=ndbcluster; +create table t4(id int) engine=myisam; +create table t5(id int, d char(56)) engine=ndbcluster; +create table t6(id int) engine=ndbcluster; +create table t7(id int) engine=ndbcluster; +create table t8(id int, e char(34)) engine=myisam; +create table t9(id int) engine=myisam; + +# Populate tables +insert into t2 values (2, "myisam table 2"); +insert into t3 values (3, "ndb table 3"); +insert into t5 values (5, "ndb table 5"); +insert into t6 values (6); +insert into t8 values (8, "myisam table 8"); +insert into t9 values (9); + +# Remove t3, t5 from NDB +system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 >> $NDB_TOOLS_OUTPUT ; +system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 >> $NDB_TOOLS_OUTPUT ; +# Remove t6, t7 from disk +--remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm +--remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm + +SHOW TABLES; + +select * from t6; +select * from t7; + +show status like 'handler_discover%'; + +drop table t1, t2, t4, t6, t7, t8, t9; + +####################################################### +# Test SHOW TABLES LIKE ability to detect new and delete old +# tables. Test all at once using many tables. +# + +flush status; + +# Create tables +create table t1(id int) engine=ndbcluster; +create table t2(id int, b char(255)) engine=myisam; +create table t3(id int, c char(255)) engine=ndbcluster; +create table t4(id int) engine=myisam; +create table t5(id int, d char(56)) engine=ndbcluster; +create table t6(id int) engine=ndbcluster; +create table t7(id int) engine=ndbcluster; +create table t8(id int, e char(34)) engine=myisam; +create table t9(id int) engine=myisam; + +# Populate tables +insert into t2 values (2, "myisam table 2"); +insert into t3 values (3, "ndb table 3"); +insert into t5 values (5, "ndb table 5"); +insert into t6 values (6); +insert into t8 values (8, "myisam table 8"); +insert into t9 values (9); + +# Remove t3, t5 from NDB +system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 > /dev/null ; +system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 > /dev/null ; +# Remove t6, t7 from disk +--remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm +--remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm + + +SHOW TABLES LIKE 't6'; + +show status like 'handler_discover%'; + +# Check that t3 or t5 can't be created +# frm files for these tables is stilll on disk +--error 1050 +create table t3(a int); +--error 1050 +create table t5(a int); + +SHOW TABLES LIKE 't%'; + +show status like 'handler_discover%'; + +drop table t1, t2, t4, t6, t7, t8, t9; + + + +###################################################### +# Test that several tables can be discovered when +# one statement access several table at once. +# + +flush status; + +# Create tables +create table t1(id int) engine=ndbcluster; +create table t2(id int, b char(255)) engine=ndbcluster; +create table t3(id int, c char(255)) engine=ndbcluster; +create table t4(id int) engine=myisam; + +# Populate tables +insert into t1 values (1); +insert into t2 values (2, "table 2"); +insert into t3 values (3, "ndb table 3"); +insert into t4 values (4); + +# Remove t1, t2, t3 from disk +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm +--remove_file $MYSQLTEST_VARDIR/master-data/test/t2.frm +--remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm +flush tables; + +# Select from the table which only exists in NDB. +select * from t1, t2, t3, t4; + +# 3 table should have been discovered +show status like 'handler_discover%'; + +drop table t1, t2, t3, t4; + + +######################################################### +# Test that a table that has been changed in NDB +# since it's been opened will be refreshed and discovered +# again +# + +flush status; + +show status like 'handler_discover%'; + +create table t5( + id int not null primary key, + name char(200) +) engine=ndb; +insert into t5 values (1, "Magnus"); +select * from t5; + +ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; + +select * from t5; + +insert into t5 values + ("Adress for record 2", 2, "Carl-Gustav"), + ("Adress for record 3", 3, "Karl-Emil"); +update t5 set name="Bertil" where id = 2; +select * from t5 order by id; + +show status like 'handler_discover%'; + +drop table t5; + + +################################################################ +# Test that a table that has been changed with ALTER TABLE +# can be used from the same thread +# + +flush status; + +show status like 'handler_discover%'; + +create table t6( + id int not null primary key, + name char(20) +) engine=ndb; +insert into t6 values (1, "Magnus"); +select * from t6; + +ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; + +select * from t6; +insert into t6 values + ("Adress for record 2", 2, "Carl-Gustav"), + ("Adress for record 3", 3, "Karl-Emil"); +update t6 set name="Bertil" where id = 2; +select * from t6 order by id; + +show status like 'handler_discover%'; + +drop table t6; + +##################################################### +# Test that only tables in the current database shows +# up in SHOW TABLES +# + +show tables; + +create table t1 (a int,b longblob) engine=ndb; +show tables; +create database test2; +use test2; +show tables; +--error 1146 +select * from t1; +create table t2 (b int,c longblob) engine=ndb; +use test; +select * from t1; +show tables; +drop table t1; +use test2; +drop table t2; +drop database test2; +use test; + +######################################################### +# Bug#8035 +# mysqld would segfault on second select * before bug was fixed +# +--disable_warnings +drop database if exists test_only_ndb_tables; +--enable_warnings +create database test_only_ndb_tables; +use test_only_ndb_tables; +create table t1 (a int primary key) engine=ndb; +select * from t1; +--exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null +--error 1015 +select * from t1; +--exec $NDB_MGM --no-defaults -e "all start" > /dev/null +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null +use test; +drop database test_only_ndb_tables; + +##################################################### +# Test that it's not possible to create tables +# with same name as NDB internal tables +# This will also test that it's not possible to create +# a table with tha same name as a table that can't be +# discovered( for example a table created via NDBAPI) + +# Test disabled since it doesn't work on case insensitive systems +#--error 1050 +#CREATE TABLE sys.SYSTAB_0 (a int); +#--error 1105 +#select * from sys.SYSTAB_0; + +#CREATE TABLE IF NOT EXISTS sys.SYSTAB_0 (a int); +#show warnings; +#--error 1105 +#select * from sys.SYSTAB_0; + +#--error 1051 +#drop table sys.SYSTAB_0; +#drop table IF EXISTS sys.SYSTAB_0; + +###################################################### +# Note! This should always be the last step in this +# file, the table t9 will be used and dropped +# by ndb_autodiscover2 +# + +CREATE TABLE t9 ( + a int NOT NULL PRIMARY KEY, + b int +) engine=ndb; + +insert t9 values(1, 2), (2,3), (3, 4), (4, 5); + +#Don't drop the table, instead remove the frm file +--remove_file $MYSQLTEST_VARDIR/master-data/test/t9.frm + +# Now leave test case, when ndb_autodiscover2 will run, this +# MySQL Server will have been restarted because it has a +# ndb_autodiscover2-master.opt file. + +create table t10 ( + a int not null primary key, + b blob +) engine=ndb; + +insert into t10 values (1, 'kalle'); + +--exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test `$NDB_TOOLS_DIR/ndb_show_tables --no-defaults | grep BLOB | while read a b c d e f g; do echo $g; done` >> $NDB_TOOLS_OUTPUT 2>&1 || true + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_autodiscover2-master.opt b/mysql-test/suite/ndb/t/ndb_autodiscover2-master.opt new file mode 100644 index 00000000000..e0d075c3fbd --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_autodiscover2-master.opt @@ -0,0 +1 @@ +--skip-external-locking diff --git a/mysql-test/suite/ndb/t/ndb_autodiscover2.test b/mysql-test/suite/ndb/t/ndb_autodiscover2.test new file mode 100644 index 00000000000..ebe14696cd2 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_autodiscover2.test @@ -0,0 +1,21 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +# +# Simple test to show use of discover when the server has been restarted +# The previous step has simply removed the frm file +# from disk, but left the table in NDB +# +--sleep 3 +select * from t9 order by a; + +# handler_discover should be 1 +show status like 'handler_discover%'; + +drop table t9; + +--error 1296 +select * from t10; +drop table t10; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_autodiscover3.test b/mysql-test/suite/ndb/t/ndb_autodiscover3.test new file mode 100644 index 00000000000..d0b9d0983e9 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_autodiscover3.test @@ -0,0 +1,86 @@ +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/ndb_default_cluster.inc +-- source include/not_embedded.inc + +# see bug#21563 +-- source include/have_binlog_format_row.inc + +--disable_warnings +drop table if exists t1, t2; +--enable_warnings + +# Workaround for Bug#27644 +# ndb: connecting api node/mysqld may "steal" node_id from running mysqld +# - let ndb_waiter use a fixed node id so "steal" cannot happen +--let connect_str = "nodeid=6;$NDB_CONNECTSTRING" + +# +# Transaction ongoing while cluster is restarted +# +--connection server1 +create table t1 (a int key) engine=ndbcluster; + +begin; +insert into t1 values (1); + +--exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT +# Wait for mysqld to reconnect and exit from readonly mode +# Should preferrably be a "while (!"select ndb_readonly")" loop +sleep 2; +--error 1297 +insert into t1 values (2); +--error 1296 +commit; + +drop table t1; + +# +# Stale cache after restart -i +# +--connection server1 +create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; +insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); +select * from t2 order by a limit 3; + +--exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT +# to ensure mysqld has connected again, and recreated system tables +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT +sleep 2; +--connection server2 +--error ER_NO_SUCH_TABLE +select * from t2; +show tables like 't2'; +reset master; +create table t2 (a int key) engine=ndbcluster; +insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +select * from t2 order by a limit 3; + +# server 1 should have a stale cache, and in this case wrong frm, transaction must be retried +--connection server1 +select * from t2 order by a limit 3; +reset master; + +--exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT +# to ensure mysqld has connected again, and recreated system tables +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT +sleep 2; +--connection server1 +--error ER_NO_SUCH_TABLE +select * from t2; +show tables like 't2'; +reset master; +create table t2 (a int key) engine=ndbcluster; +insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +select * from t2 order by a limit 3; + +# server 2 should have a stale cache, but with right frm, transaction need not be retried +--connection server2 +select * from t2 order by a limit 3; +reset master; + +drop table t2; +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_backup_print.test b/mysql-test/suite/ndb/t/ndb_backup_print.test new file mode 100644 index 00000000000..1e516f03ae6 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_backup_print.test @@ -0,0 +1,66 @@ +-- source include/have_ndb.inc +-- source include/ndb_default_cluster.inc +-- source include/not_embedded.inc + +--disable_warnings +use test; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +--enable_warnings + +#NO.1 test output of backup +--exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' + +create table t1 + (pk int key + ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) + ,b1 TINYINT, b2 TINYINT UNSIGNED + ,c1 SMALLINT, c2 SMALLINT UNSIGNED + ,d1 INT, d2 INT UNSIGNED + ,e1 BIGINT, e2 BIGINT UNSIGNED + ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY + ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY + ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) + ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) + ) engine ndb; + +insert into t1 values + (1 + ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 + ,127, 255 + ,32767, 65535 + ,2147483647, 4294967295 + ,9223372036854775807, 18446744073709551615 + ,'1','12345678901234567890123456789012','123456789' + ,'1','12345678901234567890123456789012','123456789' + ,0x12,0x123456789abcdef0, 0x012345 + ,0x12,0x123456789abcdef0, 0x00123450 + ); + +insert into t1 values + (2 + ,0, 0, 0, 0, 0 + ,-128, 0 + ,-32768, 0 + ,-2147483648, 0 + ,-9223372036854775808, 0 + ,'','','' + ,'','','' + ,0x0,0x0,0x0 + ,0x0,0x0,0x0 + ); + +insert into t1 values + (3 + ,NULL,NULL,NULL,NULL,NULL + ,NULL,NULL + ,NULL,NULL + ,NULL,NULL + ,NULL,NULL + ,NULL,NULL,NULL + ,NULL,NULL,NULL + ,NULL,NULL,NULL + ,NULL,NULL,NULL + ); + +#NO.2 test output of backup after some simple SQL operations +--exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' diff --git a/mysql-test/suite/ndb/t/ndb_basic.test b/mysql-test/suite/ndb/t/ndb_basic.test new file mode 100644 index 00000000000..b9ccdf9fd0d --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_basic.test @@ -0,0 +1,843 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists mysqltest; +--enable_warnings + +# workaround for bug#16445 +# remove to reproduce bug and run tests from ndb start +# and with ndb_autodiscover disabled. Fails on Linux 50 % of the times +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL, + attr2 INT, + attr3 VARCHAR(10) +) ENGINE=ndbcluster; +drop table t1; + +# +# Basic test to show that the NDB +# table handler is working +# + +# +# Show status and variables +# +--replace_column 2 # +SHOW GLOBAL STATUS LIKE 'ndb%'; +--replace_column 2 # +SHOW GLOBAL VARIABLES LIKE 'ndb%'; + +# +# Create a normal table with primary key +# +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL, + attr2 INT, + attr3 VARCHAR(10) +) ENGINE=ndbcluster; + +SHOW INDEX FROM t1; +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); +SHOW INDEX FROM t1; +SELECT pk1 FROM t1 ORDER BY pk1; +SELECT * FROM t1 ORDER BY pk1; +SELECT t1.* FROM t1 ORDER BY pk1; + +# Update on record by primary key +UPDATE t1 SET attr1=1 WHERE pk1=9410; +SELECT * FROM t1 ORDER BY pk1; + +# Update primary key +UPDATE t1 SET pk1=2 WHERE attr1=1; +SELECT * FROM t1 ORDER BY pk1; +UPDATE t1 SET pk1=pk1 + 1; +SELECT * FROM t1 ORDER BY pk1; +UPDATE t1 SET pk1=4 WHERE pk1 = 3; +SELECT * FROM t1 ORDER BY pk1; + +# Delete the record +DELETE FROM t1; +SELECT * FROM t1; + +# Insert more records and update them all at once +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), +(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); +UPDATE t1 SET attr1 = 9999; +SELECT * FROM t1 ORDER BY pk1; + +UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000; +SELECT * FROM t1 ORDER BY pk1; + +UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999; +SELECT * FROM t1 ORDER BY pk1; + +# Delete one record by specifying pk +DELETE FROM t1 WHERE pk1 = 9410; +SELECT * FROM t1 ORDER BY pk1; + +# Delete all from table +DELETE FROM t1; +SELECT * FROM t1; + +# Insert three records with attr1=4 and two with attr1=5 +# Delete all with attr1=4 +INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); +DELETE FROM t1 WHERE attr1=4; +SELECT * FROM t1 order by pk1; +DELETE FROM t1; + +# Insert two records and delete one +INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); +DELETE FROM t1 WHERE pk1 = 9410; +SELECT * FROM t1; +DROP TABLE t1; + +# +# Create table without primary key +# a hidden primary key column is created by handler +# +CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; +INSERT INTO t1 values(3456, 7890); +SELECT * FROM t1; +UPDATE t1 SET id=2 WHERE id2=12; +SELECT * FROM t1; +UPDATE t1 SET id=1234 WHERE id2=7890; +SELECT * FROM t1; +DELETE FROM t1; + +INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); +SELECT * FROM t1 ORDER BY id; +DELETE FROM t1 WHERE id = 3456; +SELECT * FROM t1 ORDER BY id; + +DROP TABLE t1; + +# test create with the keyword "engine=NDBCLUSTER" +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL +) ENGINE=NDBCLUSTER; + +INSERT INTO t1 values(1, 9999); + +DROP TABLE t1; + +# test create with the keyword "engine=NDB" +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL +) ENGINE=NDB; + +INSERT INTO t1 values(1, 9999); + +DROP TABLE t1; + + +# +# A more extensive test with a lot more records +# + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + +CREATE TABLE t3 ( + a bigint unsigned NOT NULL, + b bigint unsigned not null, + c bigint unsigned, + PRIMARY KEY(a) +) engine=ndbcluster; + +CREATE TABLE t4 ( + a bigint unsigned NOT NULL, + b bigint unsigned not null, + c bigint unsigned NOT NULL, + d int unsigned, + PRIMARY KEY(a, b, c) +) engine=ndbcluster; + + +# +# insert more records into tables +# +let $1=1000; +disable_query_log; +while ($1) +{ + eval insert into t2 values($1, $1+9, 5); + eval insert into t3 values($1, $1+9, 5); + eval insert into t4 values($1, $1+9, 5, $1+26000); + dec $1; +} +enable_query_log; + + +# +# delete every other record in the tables +# +let $1=1000; +disable_query_log; +while ($1) +{ + eval delete from t2 where a=$1; + eval delete from t3 where a=$1; + eval delete from t4 where a=$1 and b=$1+9 and c=5; + dec $1; + dec $1; +} +enable_query_log; + + +select * from t2 where a = 7 order by b; +select * from t2 where a = 7 order by a; +select * from t2 where a = 7 order by 2; +select * from t2 where a = 7 order by c; + +select * from t2 where a = 7 and b = 16 order by b; +select * from t2 where a = 7 and b = 16 order by a; +select * from t2 where a = 7 and b = 17 order by a; +select * from t2 where a = 7 and b != 16 order by b; + +select * from t2 where a = 7 and b = 16 and c = 5 order by b; +select * from t2 where a = 7 and b = 16 and c = 5 order by a; +select * from t2 where a = 7 and b = 16 and c = 6 order by a; +select * from t2 where a = 7 and b != 16 and c = 5 order by b; + +select * from t3 where a = 7 order by b; +select * from t3 where a = 7 order by a; +select * from t3 where a = 7 order by 2; +select * from t3 where a = 7 order by c; + +select * from t3 where a = 7 and b = 16 order by b; +select * from t3 where a = 7 and b = 16 order by a; +select * from t3 where a = 7 and b = 17 order by a; +select * from t3 where a = 7 and b != 16 order by b; + +select * from t4 where a = 7 order by b; +select * from t4 where a = 7 order by a; +select * from t4 where a = 7 order by 2; +select * from t4 where a = 7 order by c; + +select * from t4 where a = 7 and b = 16 order by b; +select * from t4 where a = 7 and b = 16 order by a; +select * from t4 where a = 7 and b = 17 order by a; +select * from t4 where a = 7 and b != 16 order by b; + +# +# update records +# +let $1=1000; +disable_query_log; +while ($1) +{ + eval update t2 set c=$1 where a=$1; + eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; + eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; + dec $1; + dec $1; +} +enable_query_log; + +delete from t2 where a > 5; +select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; +select a, b FROM t2 outer_table where +a = (select a from t2 where b = outer_table.b ) order by a; + + +delete from t2; +delete from t3; +delete from t4; + +drop table t2; +drop table t3; +drop table t4; + +# +# Test delete and update from table with 3 keys +# + +CREATE TABLE t5 ( + a bigint unsigned NOT NULL, + b bigint unsigned not null, + c bigint unsigned NOT NULL, + d int unsigned, + PRIMARY KEY(a, b, c) +) engine=ndbcluster; + +insert into t5 values(10, 19, 5, 26010); + +delete from t5 where a=10 and b=19 and c=5; + +select * from t5; + +insert into t5 values(10, 19, 5, 26010); + +update t5 set d=21997 where a=10 and b=19 and c=5; + +select * from t5; + +delete from t5; + +drop table t5; + +# +# Test using table with a char(255) column first in table +# + +CREATE TABLE t6 ( + adress char(255), + a int NOT NULL PRIMARY KEY, + b int +) engine = NDB; + +insert into t6 values + ("Nice road 3456", 1, 23), + ("Street Road 78", 3, 92), + ("Road street 89C", 5, 71), + (NULL, 7, NULL); +select * from t6 order by a; +select a, b from t6 order by a; + +update t6 set adress="End of road 09" where a=3; +update t6 set b=181, adress="Street 76" where a=7; +select * from t6 order by a; +select * from t6 where a=1; +delete from t6 where a=1; +select * from t6 order by a; +delete from t6 where b=71; +select * from t6 order by a; + +drop table t6; + +# +# Test using table with a char(255) column first in table and a +# primary key consisting of two columns +# + +CREATE TABLE t7 ( + adress char(255), + a int NOT NULL, + b int, + c int NOT NULL, + PRIMARY KEY(a, c) +) engine = NDB; + +insert into t7 values + ("Highway 3456", 1, 23, 2), + ("Street Road 78", 3, 92, 3), + ("Main street 89C", 5, 71, 4), + (NULL, 8, NULL, 12); +select * from t7 order by a; +select a, b from t7 order by a; + +update t7 set adress="End of road 09" where a=3; +update t7 set adress="Gatuvägen 90C" where a=5 and c=4; +update t7 set adress="No adress" where adress is NULL; +select * from t7 order by a; +select * from t7 where a=1 and c=2; +delete from t7 where a=1; +delete from t7 where a=3 and c=3; +delete from t7 where a=5 and c=4; +select * from t7; +delete from t7 where b=23; +select * from t7; + +drop table t7; + +# +# Test multiple databases in one statement +# + +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL, + attr2 INT, + attr3 VARCHAR(10) +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); + +create database mysqltest; +use mysqltest; + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + +insert into t2 select pk1,attr1,attr2 from test.t1; +select * from t2 order by a; +select b from test.t1, t2 where c = test.t1.attr2; +select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; + +drop table test.t1, t2; +drop database mysqltest; + +# +# BUG#6031 - DROP DATABASE doesn't drop database on first try +# + +--disable_warnings +drop database if exists ndbtest1; +--enable_warnings + +create database ndbtest1; +use ndbtest1; +create table t1(id int) engine=ndbcluster; +drop database ndbtest1; +--error 1008 +drop database ndbtest1; + +# +# test support of char(0) +# + +use test; +create table t1 (a int primary key, b char(0)); +insert into t1 values (1,""); +insert into t1 values (2,NULL); +select * from t1 order by a; +select * from t1 order by b; +select * from t1 where b IS NULL; +select * from t1 where b IS NOT NULL; +drop table t1; + +# +# test the limit of no of attributes in one table +# +# also tests bug#17179, more than 31 attributes in +# a partitioned table +# +create table t1 ( +c1 int, +c2 int, +c3 int, +c4 int, +c5 int, +c6 int, +c7 int, +c8 int, +c9 int, +c10 int, +c11 int, +c12 int, +c13 int, +c14 int, +c15 int, +c16 int, +c17 int, +c18 int, +c19 int, +c20 int, +c21 int, +c22 int, +c23 int, +c24 int, +c25 int, +c26 int, +c27 int, +c28 int, +c29 int, +c30 int, +c31 int, +c32 int, +c33 int, +c34 int, +c35 int, +c36 int, +c37 int, +c38 int, +c39 int, +c40 int, +c41 int, +c42 int, +c43 int, +c44 int, +c45 int, +c46 int, +c47 int, +c48 int, +c49 int, +c50 int, +c51 int, +c52 int, +c53 int, +c54 int, +c55 int, +c56 int, +c57 int, +c58 int, +c59 int, +c60 int, +c61 int, +c62 int, +c63 int, +c64 int, +c65 int, +c66 int, +c67 int, +c68 int, +c69 int, +c70 int, +c71 int, +c72 int, +c73 int, +c74 int, +c75 int, +c76 int, +c77 int, +c78 int, +c79 int, +c80 int, +c81 int, +c82 int, +c83 int, +c84 int, +c85 int, +c86 int, +c87 int, +c88 int, +c89 int, +c90 int, +c91 int, +c92 int, +c93 int, +c94 int, +c95 int, +c96 int, +c97 int, +c98 int, +c99 int, +c100 int, +c101 int, +c102 int, +c103 int, +c104 int, +c105 int, +c106 int, +c107 int, +c108 int, +c109 int, +c110 int, +c111 int, +c112 int, +c113 int, +c114 int, +c115 int, +c116 int, +c117 int, +c118 int, +c119 int, +c120 int, +c121 int, +c122 int, +c123 int, +c124 int, +c125 int, +c126 int, +c127 int, +c128 int, +primary key using hash(c1)) engine=ndb partition by key(c1); +drop table t1; + +# +# test max size of attribute name and truncation +# + +create table t1 ( +a1234567890123456789012345678901234567890 int primary key, +a12345678901234567890123456789a1234567890 int, +index(a12345678901234567890123456789a1234567890) +) engine=ndb; +show tables; +insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); +--replace_column 9 # +explain select * from t1 where a12345678901234567890123456789a1234567890=2; +select * from t1 where a12345678901234567890123456789a1234567890=2; +drop table t1; + +# +# test fragment creation +# +# first a table with _many_ fragments per node group +# then a table with just one fragment per node group +# +create table t1 + (a bigint, b bigint, c bigint, d bigint, + primary key (a,b,c,d)) + engine=ndb + max_rows=800000000; +insert into t1 values + (1,2,3,4),(2,3,4,5),(3,4,5,6), + (3,2,3,4),(1,3,4,5),(2,4,5,6), + (1,2,3,5),(2,3,4,8),(3,4,5,9), + (3,2,3,5),(1,3,4,8),(2,4,5,9), + (1,2,3,6),(2,3,4,6),(3,4,5,7), + (3,2,3,6),(1,3,4,6),(2,4,5,7), + (1,2,3,7),(2,3,4,7),(3,4,5,8), + (3,2,3,7),(1,3,4,7),(2,4,5,8), + (1,3,3,4),(2,4,4,5),(3,5,5,6), + (3,3,3,4),(1,4,4,5),(2,5,5,6), + (1,3,3,5),(2,4,4,8),(3,5,5,9), + (3,3,3,5),(1,4,4,8),(2,5,5,9), + (1,3,3,6),(2,4,4,6),(3,5,5,7), + (3,3,3,6),(1,4,4,6),(2,5,5,7), + (1,3,3,7),(2,4,4,7),(3,5,5,8), + (3,3,3,7),(1,4,4,7),(2,5,5,8); +select count(*) from t1; +drop table t1; + +create table t1 + (a bigint, b bigint, c bigint, d bigint, + primary key (a)) + engine=ndb + max_rows=1; +drop table t1; + +# +# Test auto_increment +# + +connect (con1,localhost,root,,test); +connect (con2,localhost,root,,test); + +create table t1 + (counter int(64) NOT NULL auto_increment, + datavalue char(40) default 'XXXX', + primary key (counter) + ) ENGINE=ndbcluster; + +connection con1; +insert into t1 (datavalue) values ('newval'); +insert into t1 (datavalue) values ('newval'); +select * from t1 order by counter; +insert into t1 (datavalue) select datavalue from t1 where counter < 100; +insert into t1 (datavalue) select datavalue from t1 where counter < 100; +select * from t1 order by counter; +connection con2; +insert into t1 (datavalue) select datavalue from t1 where counter < 100; +insert into t1 (datavalue) select datavalue from t1 where counter < 100; +select * from t1 order by counter; + +drop table t1; + +# +# bug#27437 +connection con1; +create table t1 (a int primary key auto_increment) engine = ndb; +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +connection con2; +insert into t1(a) values (20),(28); +connection con1; +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +connection con2; +insert into t1() values (21), (22); +connection con1; + +drop table t1; + +# +# BUG#14514 Creating table with packed key fails silently +# + +CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; +select * from t1; +drop table t1; + +# +# Bug #17249 delete statement with join where clause fails +# when table do not have pk + # + +create table t1 (a int) engine=ndb; +create table t2 (a int) engine=ndb; +insert into t1 values (1); +insert into t2 values (1); +delete t1.* from t1, t2 where t1.a = t2.a; +select * from t1; +select * from t2; +drop table t1; +drop table t2; + +# +# Bug #17257 update fails for inner joins if tables +# do not have Primary Key +# + +CREATE TABLE t1 ( + i INT, + j INT, + x INT, + y INT, + z INT +) engine=ndb; + +CREATE TABLE t2 ( + i INT, + k INT, + x INT, + y INT, + z INT +) engine=ndb; + +CREATE TABLE t3 ( + j INT, + k INT, + x INT, + y INT, + z INT +) engine=ndb; + +INSERT INTO t1 VALUES ( 1, 2,13,14,15); +INSERT INTO t2 VALUES ( 1, 3,23,24,25); +INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); + +UPDATE t1 AS a +INNER JOIN t2 AS b + ON a.i = b.i +INNER JOIN t3 AS c + ON a.j = c.j AND b.k = c.k +SET a.x = b.x, + a.y = b.y, + a.z = ( + SELECT sum(z) + FROM t3 + WHERE y = 34 + ) +WHERE b.x = 23; +select * from t1; +drop table t1; +drop table t2; +drop table t3; + +# End of 4.1 tests + +# +# Test long table name +# +create table atablewithareallylongandirritatingname (a int); +insert into atablewithareallylongandirritatingname values (2); +select * from atablewithareallylongandirritatingname; +drop table atablewithareallylongandirritatingname; + +# +# Bug#15682 +# +create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; +insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); +insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); +select * from t1 order by f1; +select * from t1 order by f2; +select * from t1 order by f3; +drop table t1; +# Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror +# + +# As long there is no error code 1186 defined by NDB +# we should get a message "Illegal ndb error code: 1186" +--error 1 +--exec $MY_PERROR --ndb 1186 2>&1 + +# +# Bug #25746 - VARCHAR UTF8 PK issue +# - prior to bugfix 4209, illegal length parameter would be +# returned in SELECT * + +CREATE TABLE t1 ( +a VARBINARY(40) NOT NULL, +b VARCHAR (256) CHARACTER SET UTF8 NOT NULL, +c VARCHAR(256) CHARACTER SET UTF8 NOT NULL, +PRIMARY KEY (b,c)) ENGINE=ndbcluster; +INSERT INTO t1 VALUES +("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc"); +SELECT * FROM t1 ORDER BY a; +DROP TABLE t1; + +# delete +create table t1 (a int not null primary key, b int not null) engine=ndb; +create table t2 (a int not null primary key, b int not null) engine=ndb; +insert into t1 values (1,10), (2,20), (3,30); +insert into t2 values (1,10), (2,20), (3,30); +select * from t1 order by a; +delete from t1 where a > 0 order by a desc limit 1; +select * from t1 order by a; +delete from t1,t2 using t1,t2 where t1.a = t2.a; +select * from t2 order by a; +drop table t1,t2; + +# insert ignore +create table t1 (a int not null primary key, b int not null) engine=ndb; +insert into t1 values (1,10), (2,20), (3,30); +--error ER_DUP_ENTRY +insert into t1 set a=1, b=100; +insert ignore into t1 set a=1, b=100; +select * from t1 order by a; +insert into t1 set a=1, b=1000 on duplicate key update b=b+1; +select * from t1 order by a; +drop table t1; + +# update +create table t1 (a int not null primary key, b int not null) engine=ndb; +create table t2 (c int not null primary key, d int not null) engine=ndb; +insert into t1 values (1,10), (2,10), (3,30), (4, 30); +insert into t2 values (1,10), (2,10), (3,30), (4, 30); +--error ER_DUP_ENTRY +update t1 set a = 1 where a = 3; +select * from t1 order by a; +update t1 set b = 1 where a > 1 order by a desc limit 1; +select * from t1 order by a; +--error ER_DUP_ENTRY +update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; +select * from t1 order by a; +update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; +select * from t1 order by a; +drop table t1,t2; + +# End of 5.0 tests +--echo End of 5.0 tests + + +# +# Bug #18483 Cannot create table with FK constraint +# ndb does not support foreign key constraint, it is silently ignored +# in line with other storage engines +# +CREATE TABLE t1 (a VARCHAR(255) NOT NULL, + CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb; +CREATE TABLE t2(a VARCHAR(255) NOT NULL, + b VARCHAR(255) NOT NULL, + c VARCHAR(255) NOT NULL, + CONSTRAINT pk_b_c_id PRIMARY KEY (b,c), + CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb; +drop table t1, t2; + +# bug#24301 +create table t1 (a int not null primary key, b int) engine=ndb; +insert into t1 values(1,1),(2,2),(3,3); +create table t2 like t1; +insert into t2 select * from t1; +select * from t1 order by a; +select * from t2 order by a; +drop table t1, t2; + +# create table if not exists +--disable_warnings +create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; +create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; +--enable_warnings + +# create like +create table t2 like t1; + +# multi rename +rename table t1 to t10, t2 to t20; +drop table t10,t20; + +--echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_binlog_basic.test b/mysql-test/suite/ndb/t/ndb_binlog_basic.test new file mode 100644 index 00000000000..e4642dc3230 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_binlog_basic.test @@ -0,0 +1,72 @@ +-- source include/have_ndb.inc +-- source include/have_binlog_format_row.inc + +--disable_warnings +drop table if exists t1, t2; +drop database if exists mysqltest; +create database mysqltest; +use mysqltest; +drop database mysqltest; +use test; +--enable_warnings + +# +# basic insert, update, delete test, alter, rename, drop +# check that ndb_binlog_index gets the right info +# + +create table t1 (a int primary key) engine=ndb; +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +save_master_pos; +--replace_column 1 # +select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; + +delete from t1; +alter table t1 add (b int); +insert into t1 values (3,3),(4,4); +alter table t1 rename t2; + +# get all in one epoch +begin; +insert into t2 values (1,1),(2,2); +update t2 set b=1 where a=3; +delete from t2 where a=4; +commit; +drop table t2; + +# check that above is ok +# (save_master_pos waits for last gcp to complete, ensuring that we have +# the expected data in the binlog) +save_master_pos; +select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5; +select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5; +select inserts,updates,deletes from + mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0; + +# +# check that purge clears the ndb_binlog_index +# +flush logs; +--sleep 1 +purge master logs before now(); +select count(*) from mysql.ndb_binlog_index; + +# +# several tables in different databases +# check that same table name in different databases don't mix up +# +create table t1 (a int primary key, b int) engine=ndb; +create database mysqltest; +use mysqltest; +create table t1 (c int, d int primary key) engine=ndb; +use test; + +insert into mysqltest.t1 values (2,1),(2,2); +save_master_pos; +--replace_column 1 # +select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; + +drop table t1; +drop database mysqltest; +select inserts,updates,deletes from + mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_basic2.test b/mysql-test/suite/ndb/t/ndb_binlog_basic2.test new file mode 100644 index 00000000000..bcc6b503320 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_binlog_basic2.test @@ -0,0 +1,15 @@ +-- source include/have_ndb.inc +-- source include/have_log_bin.inc + +--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT +set session binlog_format=row; +--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT +set session binlog_format=statement; +--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT +set global binlog_format=row; +--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT +set global binlog_format=statement; +--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT +set session binlog_format=default; +--error ER_NDB_CANT_SWITCH_BINLOG_FORMAT +set global binlog_format=default; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test b/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test new file mode 100644 index 00000000000..487dfbf16e5 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test @@ -0,0 +1,191 @@ +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/have_binlog_format_row.inc + +--disable_warnings +connection server2; +drop database if exists mysqltest; +drop table if exists t1,t2,t3; +connection server1; +drop database if exists mysqltest; +drop table if exists t1,t2,t3; +--connection server1 +reset master; +--connection server2 +reset master; +--enable_warnings + +# +# basic test to see if ddl distribution works across +# multiple binlogs +# + +# create database +--connection server1 +create database mysqltest; + +# create table +--connection server1 +use mysqltest; +create table t1 (a int primary key) engine=ndb; + +--connection server2 +create table t2 (a int primary key) engine=ndb; +--source include/show_binlog_events2.inc + +--connection server1 +--source include/show_binlog_events2.inc + +# alter table +--connection server1 +reset master; +--connection server2 +reset master; + +--connection server2 +alter table t2 add column (b int); + +--connection server1 +--source include/show_binlog_events2.inc + +# alter database +--connection server1 +reset master; +--connection server2 +reset master; + +--connection server2 +ALTER DATABASE mysqltest CHARACTER SET latin1; + + +# having drop here instead of below sometimes triggers bug#18976 +## drop table and drop should come after data events +--connection server2 +drop table mysqltest.t1; + +--connection server1 +--source include/show_binlog_events2.inc +# to track down bug#18976 +--real_sleep 10 +--source include/show_binlog_events2.inc + +#--connection server2 +#drop table mysqltest.t1; + +# drop database and drop should come after data events +--connection server1 +reset master; +--connection server2 +reset master; + +--connection server1 +use test; +insert into t2 values (1,2); +drop database mysqltest; +create table t1 (a int primary key) engine=ndb; + +--connection server2 +--source include/show_binlog_events2.inc + +--connection server2 +drop table t2; + +# logfile groups and table spaces +--connection server1 +reset master; +--connection server2 +reset master; + +--connection server1 +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; + +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; + +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; + +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE = NDB; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile02.dat' +ENGINE = NDB; + +DROP TABLESPACE ts1 +ENGINE = NDB; + +DROP LOGFILE GROUP lg1 +ENGINE =NDB; + +# having drop here instead of below sometimes triggers bug#18976 +#drop table t1; + +--connection server2 +--source include/show_binlog_events2.inc +# to track down bug#18976 +--real_sleep 10 +--source include/show_binlog_events2.inc + +drop table t1; + +# +# Bug #17827 cluster: rename of several tables in one statement, +# gets multiply logged +# +--connection server1 +reset master; +show tables; +--connection server2 +reset master; +show tables; + +--connection server1 +create table t1 (a int key) engine=ndb; +create table t2 (a int key) engine=ndb; +create table t3 (a int key) engine=ndb; +rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; +--connection server2 +--source include/show_binlog_events2.inc + +drop table t1; +drop table t2; +drop table t3; + +# +# Bug #17838 binlog not setup on seconday master after rename +# +# +--connection server1 +reset master; +show tables; +--connection server2 +reset master; +show tables; + +--connection server1 +create table t1 (a int key) engine=ndb; +insert into t1 values(1); +rename table t1 to t2; +insert into t2 values(2); + +# now we should see data in table t1 _and_ t2 +# prior to bug fix, data was missing for t2 +--connection server2 +drop table t2; +--source include/show_binlog_events2.inc diff --git a/mysql-test/suite/ndb/t/ndb_binlog_discover.test b/mysql-test/suite/ndb/t/ndb_binlog_discover.test new file mode 100644 index 00000000000..999079ad29c --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_binlog_discover.test @@ -0,0 +1,36 @@ +-- source include/have_ndb.inc +-- source include/have_binlog_format_row.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# Bug #14516 Restart of cluster can cause NDB API replication failure +# +create table t1 (a int key) engine=ndb; +reset master; +--exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null +--exec $NDB_MGM --no-defaults -e "all start" > /dev/null +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null + +--disable_query_log +let $mysql_errno= 1; +while ($mysql_errno) +{ + # Table t1 is readonly until the mysqld has reconnected properly + --error 0,1036,1296 + insert into t1 values(1); + if ($mysql_errno) + { + --sleep 0.1 + } +} +--enable_query_log + +--source include/show_binlog_events2.inc +PURGE MASTER LOGS TO 'master-bin.000002'; + +--source include/show_binlog_events2.inc +drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt b/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt new file mode 100644 index 00000000000..e3947c0eeed --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_binlog_ignore_db-master.opt @@ -0,0 +1 @@ +--binlog-ignore-db=mysqltest diff --git a/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test b/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test new file mode 100644 index 00000000000..8f80e53f2e4 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_binlog_ignore_db.test @@ -0,0 +1,16 @@ +-- source include/have_ndb.inc +-- source include/have_binlog_format_row.inc +reset master; + +--disable_warnings +drop table if exists t1; +drop database if exists mysqltest; +--enable_warnings + +create database mysqltest; +use mysqltest; +create table t1 (a int primary key, b int) engine=ndb; +insert into t1 values (1, 1); +-- source include/show_binlog_events2.inc + +drop database mysqltest; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test b/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test new file mode 100644 index 00000000000..b2dbaa797b6 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_binlog_log_bin.test @@ -0,0 +1,50 @@ +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/have_binlog_format_row.inc + +--disable_warnings +connection server2; +drop table if exists t1,t2,t3; +reset master; +connection server1; +drop table if exists t1,t2,t3; +reset master; +--enable_warnings + +# basic SQL_LOG_BIN functionality +# see updates from one thread but not the other +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); +# do some stuff with SQL_LOG_BIN=0 +connection con2; +set SQL_LOG_BIN=0; +create database mysqltest; +use mysqltest; +create table t1 (a int key, b int) engine=ndb; +create table t2 (a int key, b int) engine=ndb; +insert into t1 values (1,1); +alter table t1 add c int; +# we should not see it in the local server +-- source include/show_binlog_events2.inc +reset master; +# we should not see it in another server +connection server2; +use mysqltest; +insert into t2 values (1,1); +-- source include/show_binlog_events2.inc +reset master; +# but if you do stuff in "default" client setting +connection con1; +use mysqltest; +drop table t1; +drop table t2; +create table t1 (d int key, e int) engine=ndb; +create table t2 (d int key, e int) engine=ndb; +insert into t1 values (1,1); +-- source include/show_binlog_events2.inc +# and in another server +connection server2; +use mysqltest; +insert into t2 values (1,1); +-- source include/show_binlog_events2.inc +drop database mysqltest; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_multi.test b/mysql-test/suite/ndb/t/ndb_binlog_multi.test new file mode 100644 index 00000000000..c227c7fec93 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_binlog_multi.test @@ -0,0 +1,83 @@ +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/have_binlog_format_row.inc + +--disable_warnings +connection server2; +drop table if exists t1,t2,t3; +connection server1; +drop table if exists t1,t2,t3; +--enable_warnings + +# Dummy table create/drop to avoid a race where table is created +# before event subscription is set up, causing test failure (BUG#20677). +connection server2; +CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; +connection server1; +DROP TABLE t3; + +# reset for test +connection server1; +reset master; +connection server2; +reset master; + +# +# basic test to see if one server sees the table from the other +# and sets up the replication correctly +# + +# create table on the other server +connection server2; +CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; + +# insert something on server2 +INSERT INTO t2 VALUES (1,1),(2,2); +# verify that we get the data in the binlog +--source include/show_binlog_events2.inc +select * from t2 order by a; +--replace_column 1 +SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM + mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; +let $the_epoch= `SELECT @the_epoch`; + +# see if we got something on server1 +connection server1; +SELECT * FROM t2 ORDER BY a; +# doing drop table will ensure that all the events have been received +DROP TABLE t2; +# verify thar we have table and data in binlog +--source include/show_binlog_events2.inc +--replace_result $the_epoch +eval SELECT inserts,updates,deletes,schemaops FROM + mysql.ndb_binlog_index WHERE epoch=$the_epoch; + +# reset for next test +connection server1; +reset master; +connection server2; +reset master; + +# single schema ops will not show +connection server2; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; +INSERT INTO t1 VALUES (1),(2); +--source include/show_binlog_events2.inc +--replace_column 1 +SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM + mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; +let $the_epoch2= `SELECT @the_epoch2`; + +--replace_result $the_epoch $the_epoch2 +eval SELECT inserts,updates,deletes,schemaops FROM + mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; + +# now see that we have the events on the other server +connection server2; +# doing drop table will ensure that all the events have been received +drop table t1; +# verify thar we have table and data in binlog +--source include/show_binlog_events2.inc +--replace_result $the_epoch $the_epoch2 +eval SELECT inserts,updates,deletes,schemaops FROM + mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; diff --git a/mysql-test/suite/ndb/t/ndb_bitfield.test b/mysql-test/suite/ndb/t/ndb_bitfield.test new file mode 100644 index 00000000000..de0ae23bfe6 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_bitfield.test @@ -0,0 +1,124 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +create table t1 ( + pk1 int not null primary key, + b bit(64) +) engine=ndbcluster; + +show create table t1; +insert into t1 values +(0,b'1111111111111111111111111111111111111111111111111111111111111111'), +(1,b'1000000000000000000000000000000000000000000000000000000000000000'), +(2,b'0000000000000000000000000000000000000000000000000000000000000001'), +(3,b'1010101010101010101010101010101010101010101010101010101010101010'), +(4,b'0101010101010101010101010101010101010101010101010101010101010101'); +select hex(b) from t1 order by pk1; +drop table t1; + +create table t1 ( + pk1 int not null primary key, + b bit(9) +) engine=ndbcluster; +insert into t1 values +(0,b'000000000'), +(1,b'000000001'), +(2,b'000000010'), +(3,b'000000011'), +(4,b'000000100'); +select hex(b) from t1 order by pk1; +update t1 set b = b + b'101010101'; +select hex(b) from t1 order by pk1; +drop table t1; + +create table t1 (a bit(7), b bit(9)) engine = ndbcluster; +insert into t1 values +(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), +(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), +(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), +(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), +(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), +(44, 307), (68, 454), (57, 135); +select a+0 from t1 order by a; +select b+0 from t1 order by b; +drop table t1; + +create table t1 ( + dummyKey INTEGER NOT NULL, + a001 TINYINT, + a010 TINYINT, + a012 TINYINT, + a015 TINYINT, + a016 TINYINT, + a017 TINYINT, + a019 TINYINT, + a029 TINYINT, + a030 TINYINT, + a031 TINYINT, + a032 TINYINT, + a042 TINYINT, + a043 TINYINT, + a044 TINYINT, + a3001 TINYINT, + a3002 TINYINT, + a3003 TINYINT, + a3004 TINYINT, + a3005 TINYINT, + a3021 TINYINT, + a3022 TINYINT, + a BIT(6), + b BIT(6), + c BIT(6), + d TINYINT, + e TINYINT, + f TINYINT, + g TINYINT, + h TINYINT, + i TINYINT, + j TINYINT, + k TINYINT, + l TINYINT, + m TINYINT, + n TINYINT, + o TINYINT, + a034 TINYINT, +PRIMARY KEY USING HASH (dummyKey) ) engine=ndb; +INSERT INTO `t1` VALUES +(1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1), +(2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1), +(3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1), +(4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1), +(5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1), +(6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1), +(7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1), +(8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); +--exec $MYSQL_DUMP --hex-blob --compact --order-by-primary --skip-extended-insert --no-create-info test t1 +drop table t1; + +--error 1005 +create table t1 ( + pk1 bit(9) not null primary key, + b int +) engine=ndbcluster; +show warnings; + +--error 1005 +create table t1 ( + pk1 int not null primary key, + b bit(9), + key(b) +) engine=ndbcluster; +show warnings; + +# bug#16125 +create table t1 ( + pk1 int primary key, + b bit(32) not null +) engine=ndbcluster; + +insert into t1 values (1,1); +drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_blob.test b/mysql-test/suite/ndb/t/ndb_blob.test new file mode 100644 index 00000000000..b9a8c7e20ee --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_blob.test @@ -0,0 +1,499 @@ +--source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1; +drop database if exists test2; +--enable_warnings + +# +# Minimal NDB blobs test. +# +# On NDB API level there is an extensive test program "testBlobs". +# A prerequisite for this handler test is that "testBlobs" succeeds. +# + +# -- general test starts -- + +# make test harder with autocommit off +set autocommit=0; + +create table t1 ( + a int not null primary key, + b text not null, + c int not null, + d longblob, + key (c) +) engine=ndbcluster; + +# -- values -- + +# x0 size 256 (current inline size) +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); + +# b1 length 2000+256 (blob part aligned) +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +# d1 length 3000 +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); + +# b2 length 20000 +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +# d2 length 30000 +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); + +select length(@x0),length(@b1),length(@d1) from dual; +select length(@x0),length(@b2),length(@d2) from dual; + +# -- pk ops -- + +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +--replace_column 9 # +explain select * from t1 where a = 1; + +# pk read +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=1; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=2; + +# pk update +update t1 set b=@b2,d=@d2 where a=1; +update t1 set b=@b1,d=@d1 where a=2; +commit; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=1; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=2; + +# pk update +update t1 set b=concat(b,b),d=concat(d,d) where a=1; +update t1 set b=concat(b,b),d=concat(d,d) where a=2; +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 where a=1; +select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) +from t1 where a=2; + +# pk update to null +update t1 set d=null where a=1; +commit; +select a from t1 where d is null; + +# bug#24028 - does not occur on MySQL level +# bug#17986 - not seen by us anymore but could show as warning here +delete from t1 where a=45567; +commit; + +# pk delete +delete from t1 where a=1; +delete from t1 where a=2; +commit; +select count(*) from t1; + +# -- replace ( bug-6018 ) -- + +# insert +replace t1 set a=1,b=@b1,c=111,d=@d1; +replace t1 set a=2,b=@b2,c=222,d=@d2; +commit; +--replace_column 9 # +explain select * from t1 where a = 1; + +# pk read +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=1; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=2; + +# update +replace t1 set a=1,b=@b2,c=111,d=@d2; +replace t1 set a=2,b=@b1,c=222,d=@d1; +commit; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where a=1; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a=2; + +# update +replace t1 set a=1,b=concat(@b2,@b2),c=111,d=concat(@d2,@d2); +replace t1 set a=2,b=concat(@b1,@b1),c=222,d=concat(@d1,@d1); +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 where a=1; +select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) +from t1 where a=2; + +# update to null +replace t1 set a=1,b='xyz',c=111,d=null; +commit; +select a,b from t1 where d is null; + +# pk delete +delete from t1 where a=1; +delete from t1 where a=2; +commit; +select count(*) from t1; + +# -- hash index ops -- + +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +--replace_column 9 # +explain select * from t1 where c = 111; + +# hash key read +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c=111; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where c=222; + +# hash key update +update t1 set b=@b2,d=@d2 where c=111; +update t1 set b=@b1,d=@d1 where c=222; +commit; +select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) +from t1 where c=111; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c=222; + +# hash key update to null +update t1 set d=null where c=111; +commit; +select a from t1 where d is null; + +# hash key delete +delete from t1 where c=111; +delete from t1 where c=222; +commit; +select count(*) from t1; + +# -- table scan ops, short values -- + +insert into t1 values(1,'b1',111,'dd1'); +insert into t1 values(2,'b2',222,'dd2'); +insert into t1 values(3,'b3',333,'dd3'); +insert into t1 values(4,'b4',444,'dd4'); +insert into t1 values(5,'b5',555,'dd5'); +insert into t1 values(6,'b6',666,'dd6'); +insert into t1 values(7,'b7',777,'dd7'); +insert into t1 values(8,'b8',888,'dd8'); +insert into t1 values(9,'b9',999,'dd9'); +commit; +--replace_column 9 # +explain select * from t1; + +# table scan read +select * from t1 order by a; + +# table scan update +update t1 set b=concat(a,'x',b),d=concat(a,'x',d); +commit; +select * from t1 order by a; + +# table scan delete +delete from t1; +commit; +select count(*) from t1; + +# -- table scan ops, long values -- + +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +--replace_column 9 # +explain select * from t1; + +# table scan read +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 order by a; + +# table scan update +update t1 set b=concat(b,b),d=concat(d,d); +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 order by a; + +# table scan delete +delete from t1; +commit; +select count(*) from t1; + +# -- range scan ops, short values -- + +insert into t1 values(1,'b1',111,'dd1'); +insert into t1 values(2,'b2',222,'dd2'); +insert into t1 values(3,'b3',333,'dd3'); +insert into t1 values(4,'b4',444,'dd4'); +insert into t1 values(5,'b5',555,'dd5'); +insert into t1 values(6,'b6',666,'dd6'); +insert into t1 values(7,'b7',777,'dd7'); +insert into t1 values(8,'b8',888,'dd8'); +insert into t1 values(9,'b9',999,'dd9'); +commit; +--replace_column 9 # +explain select * from t1 where c >= 100 order by a; + +# range scan read +select * from t1 where c >= 100 order by a; + +# range scan update +update t1 set b=concat(a,'x',b),d=concat(a,'x',d) +where c >= 100; +commit; +select * from t1 where c >= 100 order by a; + +# range scan delete +delete from t1 where c >= 100; +commit; +select count(*) from t1; + +# -- range scan ops, long values -- + +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +commit; +--replace_column 9 # +explain select * from t1 where c >= 100 order by a; + +# range scan read +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where c >= 100 order by a; + +# range scan update +update t1 set b=concat(b,b),d=concat(d,d); +commit; +select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) +from t1 where c >= 100 order by a; + +# range scan delete +delete from t1 where c >= 100; +commit; +select count(*) from t1; + +# -- rollback -- + +insert into t1 values(1,@b1,111,@d1); +insert into t1 values(2,@b2,222,@d2); +# 626 +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 0; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 1; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 where a = 2; +select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) +from t1 order by a; +rollback; +select count(*) from t1; + +# -- alter table and multi db -- + +insert into t1 values(1,'b1',111,'dd1'); +insert into t1 values(2,'b2',222,'dd2'); +insert into t1 values(3,'b3',333,'dd3'); +insert into t1 values(4,'b4',444,'dd4'); +insert into t1 values(5,'b5',555,'dd5'); +insert into t1 values(6,'b6',666,'dd6'); +insert into t1 values(7,'b7',777,'dd7'); +insert into t1 values(8,'b8',888,'dd8'); +insert into t1 values(9,'b9',999,'dd9'); +commit; + +select * from t1 order by a; +alter table t1 add x int; +select * from t1 order by a; +alter table t1 drop x; +select * from t1 order by a; + +create database test2; +use test2; + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + +insert into t2 values (1,1,1),(2,2,2); +select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; + +drop table t2; +use test; + +select * from t1 order by a; +alter table t1 add x int; +select * from t1 order by a; +alter table t1 drop x; +select * from t1 order by a; + +# -- end general test -- + +drop table t1; +drop database test2; + +# -- bug-5252 tinytext crashes + no-commit result + replace -- + +set autocommit=0; +create table t1 ( + a int not null primary key, + b tinytext +) engine=ndbcluster; + +insert into t1 values(1, 'x'); +update t1 set b = 'y'; +select * from t1; +delete from t1; +select * from t1; +commit; +replace t1 set a=2, b='y'; +select * from t1; +delete from t1; +select * from t1; +drop table t1; + +# -- bug-5013 insert empty string to text -- + +set autocommit=0; +create table t1 ( + a int not null primary key, + b text not null +) engine=ndbcluster; + +insert into t1 values(1, ''); +select * from t1; +commit; +drop table t1; + +# -- bug #5349 -- +set autocommit=1; +use test; +CREATE TABLE t1 ( + a int, + b text, + PRIMARY KEY (a) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +INSERT INTO t1 VALUES +(1,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); +INSERT INTO t1 VALUES +(2,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'); + +select * from t1 order by a; +alter table t1 engine=ndb; +select * from t1 order by a; + +# -- bug #5872 -- +set autocommit=1; +alter table t1 engine=myisam; +select * from t1 order by a; +drop table t1; + +# -- bug #7340 -- +create table t1 ( + id int(11) unsigned primary key NOT NULL auto_increment, + msg text NOT NULL +) engine=ndbcluster default charset=utf8; +insert into t1 (msg) values( +'Tries to validate (8 byte length + inline bytes) as UTF8 :( +Fast fix: removed validation for Text. It is not yet indexable +so bad data will not crash kernel.'); +select * from t1; +drop table t1; + +# -- bug #19201 +create table t1 ( + a int primary key not null auto_increment, + b text +) engine=ndbcluster; +--disable_query_log +set autocommit=1; +# more rows than batch size (64) +# for this bug no blob parts would be necessary +let $1 = 500; +while ($1) +{ + insert into t1 (b) values (repeat('x',4000)); + dec $1; +} +--enable_query_log +select count(*) from t1; +truncate t1; +select count(*) from t1; +drop table t1; + +# -- bug#19956 - var* key, complex key + +create table t1 ( + a varchar(40) not null, + b mediumint not null, + t text, + c varchar(2) not null, + d bigint not null, + primary key (a,b,c), + key (c,a), + unique key (d) +) engine=ndb; + +--disable_query_log +set @s1 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; +set @s2 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; +set @s3 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; +set @v1 = repeat(@s1,123); +set @v2 = repeat(@s2,234); +set @v3 = repeat(@s3,345); +set @v4 = NULL; +--enable_query_log + +insert into t1 (a,b,c,d,t) values ('a',1110,'a',1,@v1); +insert into t1 (a,b,c,d,t) values ('b',1110,'a',2,@v2); +insert into t1 (a,b,c,d,t) values ('a',1110,'b',3,@v3); +insert into t1 (a,b,c,d,t) values ('b',1110,'b',4,@v4); +select a,b,c,d,sha1(t) from t1 order by c,a; + +select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='a'; +select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='b'; + +update t1 set t=@v4 where a='b' and b=1110 and c='a'; +update t1 set t=@v2 where a='b' and b=1110 and c='b'; +select a,b,c,d,sha1(t) from t1 order by c,a; + +update t1 set t=@v2 where d=2; +update t1 set t=@v4 where d=4; +select a,b,c,d,sha1(t) from t1 order by c,a; + +update t1 set t=@v4 where a='b' and c='a'; +update t1 set t=@v2 where a='b' and c='b'; +select a,b,c,d,sha1(t) from t1 order by c,a; + +update t1 set t=@v2 where b+d=1112; +update t1 set t=@v4 where b+d=1114; +select a,b,c,d,sha1(t) from t1 order by c,a; + +delete from t1 where a='a' and b=1110 and c='a'; +delete from t1 where a='b' and c='a'; +delete from t1 where d=3; +delete from t1 where b+d=1114; +select count(*) from t1; + +drop table t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_blob_partition.test b/mysql-test/suite/ndb/t/ndb_blob_partition.test new file mode 100644 index 00000000000..35df57b96ba --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_blob_partition.test @@ -0,0 +1,97 @@ +--source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_query_log +set new=on; +--enable_query_log + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# Minimal NDB blobs test with range partitions. +# + +create table t1 ( + a mediumint not null, + b text not null, + c int not null, + d longblob, + primary key using hash (a,c), + unique key (c) +) + engine=ndb + partition by range (c) + partitions 3 + ( partition p1 values less than (200), + partition p2 values less than (300), + partition p3 values less than (400)); + +--disable_query_log +sleep 1; + +# length 61 +set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; +set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; +set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; + +set @v1 = repeat(@s0, 100); # 1d42dd9090cf78314a06665d4ea938c35cc760f4 +set @v2 = repeat(@s1, 200); # 10d3c783026b310218d10b7188da96a2401648c6 +set @v3 = repeat(@s2, 300); # a33549d9844092289a58ac348dd59f09fc28406a +set @v4 = repeat(@s0, 400); # daa61c6de36a0526f0d47dc29d6b9de7e6d2630c +set @v5 = repeat(@s1, 500); # 70fc9a7d08beebc522258bfb02000a30c77a8f1d +set @v6 = repeat(@s2, 600); # 090565c580809efed3d369481a4bbb168b20713e +set @v7 = repeat(@s0, 700); # 1e0070bec426871a46291de27b9bd6e4255ab4e5 +set @v8 = repeat(@s1, 800); # acbaba01bc2e682f015f40e79d9cbe475db3002e +set @v9 = repeat(@s2, 900); # 9ee30d99162574f79c66ae95cdf132dcf9cbc259 +--enable_query_log + +# -- insert -- +insert into t1 values (1, @v1, 101, @v2); +insert into t1 values (1, @v2, 102, @v3); +insert into t1 values (1, @v3, 103, @v4); +insert into t1 values (2, @v4, 201, @v5); +insert into t1 values (2, @v5, 202, @v6); +insert into t1 values (2, @v6, 203, @v7); +insert into t1 values (3, @v7, 301, @v8); +insert into t1 values (3, @v8, 302, @v9); +insert into t1 values (3, @v9, 303, @v1); +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- pk read -- +select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; +select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; +select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; + +# -- pk update -- +update t1 set b = @v3, d = @v4 where a = 1 and c = 102; +update t1 set b = @v6, d = @v7 where a = 2 and c = 202; +update t1 set b = @v9, d = @v1 where a = 3 and c = 302; +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- hash index update -- +update t1 set b = @v4, d = @v5 where c = 103; +update t1 set b = @v7, d = @v8 where c = 203; +update t1 set b = @v1, d = @v2 where c = 303; +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- full scan update -- +update t1 set b = @v5, d = @v6; +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- range scan update +update t1 set b = @v1, d = @v2 where 100 < c and c < 200; +update t1 set b = @v4, d = @v5 where 200 < c and c < 300; +update t1 set b = @v7, d = @v8 where 300 < c and c < 400; +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- delete -- +delete from t1 where a = 1 and c = 101; +delete from t1 where c = 102; +# delete from t1 where c < 300; # XXX coredump +delete from t1; +select a, sha1(b), c, sha1(d) from t1 order by a; + +# -- clean up -- +drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_cache.test b/mysql-test/suite/ndb/t/ndb_cache.test new file mode 100644 index 00000000000..9c299b61c24 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_cache.test @@ -0,0 +1,122 @@ +-- source include/have_query_cache.inc +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# Turn on and reset query cache +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; + +# Create test table in NDB +CREATE TABLE t1 ( pk int not null primary key, + a int, b int not null, c varchar(20)) ENGINE=ndbcluster; +insert into t1 value (1, 2, 3, 'First row'); + +# Perform one query which should be inerted in query cache +select * from t1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +# Perform the same query and make sure the query cache is hit +select * from t1; +show status like "Qcache_hits"; + +# Update the table and make sure the correct data is returned +update t1 set a=3 where pk=1; +select * from t1; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +# Insert a new record and make sure the correct data is returned +insert into t1 value (2, 7, 8, 'Second row'); +insert into t1 value (4, 5, 6, 'Fourth row'); +select * from t1 order by pk; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from t1 order by pk; +show status like "Qcache_hits"; + +# Perform a "new" query and make sure the query cache is not hit +select * from t1 where b=3; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; + +# Same query again... +select * from t1 where b=3; +show status like "Qcache_hits"; + +# Delete from the table +delete from t1 where c='Fourth row'; +show status like "Qcache_queries_in_cache"; +select * from t1 where b=3; +show status like "Qcache_hits"; + +# Start another connection and check that the query cache is hit +connect (con1,localhost,root,,); +connection con1; +use test; +select * from t1 order by pk; +select * from t1 where b=3; +show status like "Qcache_hits"; + +# Update the table and switch to other connection +update t1 set a=4 where b=3; +connect (con2,localhost,root,,); +connection con2; +use test; +show status like "Qcache_queries_in_cache"; +select * from t1 order by pk desc; +select * from t1 order by pk desc; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +select * from t1 order by pk desc; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +# Use transactions and make sure the query cache is not updated until +# transaction is commited +begin; +update t1 set a=5 where pk=1; +# Note!! the below test shows that table is invalidated +# before transaction is committed +# TODO Fix so that cache is not invalidated HERE! +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con2; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +commit; +# TODO Here query is invalidated once again, commit count in NDB has changed +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con2; +select * from t1 order by pk desc; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +drop table t1; + +show status like "Qcache_queries_in_cache"; + +SET GLOBAL query_cache_size=0; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_cache2.test b/mysql-test/suite/ndb/t/ndb_cache2.test new file mode 100644 index 00000000000..352b01ef73f --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_cache2.test @@ -0,0 +1,361 @@ +-- source include/have_query_cache.inc +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1, t2, t3, t4, t5; +--enable_warnings + + +# Turn on and reset query cache +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +# Turn on thread that will fetch commit count for open tables +set GLOBAL ndb_cache_check_time=100; +reset query cache; +flush status; + +# Create test tables in NDB +CREATE TABLE t1 ( + pk int not null primary key, + a1 int, + b1 int not null, + c1 varchar(20) +) ENGINE=ndb; +CREATE TABLE t2 ( + pk int not null primary key, + a2 int, + b2 int not null +) ENGINE=ndb; +CREATE TABLE t3 ( + pk int not null primary key, + a3 int, + b3 int not null, + c3 int not null, + d3 varchar(20) +) ENGINE=ndb; +CREATE TABLE t4 ( + a4 int, + b4 int not null, + c4 char(20) +) ENGINE=ndbcluster; +CREATE TABLE t5 ( + pk int not null primary key, + a5 int, + b5 int not null, + c5 varchar(255) +) ENGINE=ndbcluster; +insert into t1 value (1, 2, 3, 'First row'); +insert into t2 value (1, 2, 3); +insert into t3 value (1, 2, 3, 4, '3 - First row'); +insert into t4 value (2, 3, '4 - First row'); +insert into t5 value (1, 2, 3, '5 - First row'); + +# Perform one query which should be inserted in query cache +select * from t1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +# Perform the same query and make sure the query cache is hit +select * from t1; +show status like "Qcache_hits"; + +# Update the table and make sure the correct data is returned +update t1 set a1=3 where pk=1; +select * from t1; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +# Insert a new record and make sure the correct data is returned +insert into t1 value (2, 7, 8, 'Second row'); +insert into t1 value (4, 5, 6, 'Fourth row'); +select * from t1 order by pk desc; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from t1 order by pk desc; +show status like "Qcache_hits"; + +# Perform a "new" query and make sure the query cache is not hit +select * from t1 where b1=3; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; + +# Same query again... +select * from t1 where b1=3; +show status like "Qcache_hits"; + +# Delete from the table +delete from t1 where c1='Fourth row'; +show status like "Qcache_queries_in_cache"; +select * from t1 where b1=3; +show status like "Qcache_hits"; + +# Start another connection and check that the query cache is hit +connect (con1,localhost,root,,); +connection con1; +use test; +select * from t1 order by pk desc; +select * from t1 where b1=3; +show status like "Qcache_hits"; + +# Update the table and switch to other connection +update t1 set a1=4 where b1=3; +connect (con2,localhost,root,,); +connection con2; +use test; +show status like "Qcache_queries_in_cache"; +select * from t1 order by pk desc; +select * from t1 order by pk desc; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +select * from t1 order by pk desc; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +# Load all tables into cache +select * from t2; +select * from t3; +select * from t4; +select * from t5; +show status like "Qcache_queries_in_cache"; + +##################################################################### +# Start transaction and perform update +# Switch to other transaction and check that update does not show up +# Switch back and commit transaction +# Switch to other transaction and check that update shows up +##################################################################### +connection con1; +flush status; +begin; +update t1 set a1=5 where pk=1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con2; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +commit; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con2; +select * from t1 order by pk desc; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +##################################################################### +# Start transaction and perform update +# Switch to other transaction and check that update does not show up +# Switch back, perform selects and commit transaction +# Switch to other transaction and check that update shows up +##################################################################### +connection con1; +flush status; +begin; +update t1 set a1=6 where pk=1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con2; +select * from t1 order by pk desc; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +# The two queries below will not hit cache since transaction is ongoing +select * from t1 order by pk desc; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +commit; + +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con2; +select * from t1 order by pk desc; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +##################################################################### +# Start transaction and perform insert +# Switch to other transaction and check that insert does not show up +# Switch back, perform selects and commit transaction +# Switch to other transaction and check that update shows up +##################################################################### +connection con1; +flush status; +begin; +insert into t1 set pk=5, a1=6, b1=3, c1="New row"; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con2; +select * from t1 where pk=5; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +# The below four queries will not be cached, trans is ongoing +select * from t1 where pk=5; +select * from t1 where pk=5; +select * from t1 order by pk desc; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +commit; + +connection con2; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +connection con1; + +##################################################################### +# Start transaction and perform delete +# Switch to other transaction and check that delete does not show up +# Switch back, perform selects and commit transaction +# Switch to other transaction and check that update shows up +##################################################################### +connection con1; +flush status; +begin; +delete from t1 where pk=2; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con2; +select * from t1 where pk=2; +select * from t1 order by pk desc; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +# The below four queries will not be cached, trans is ongoing +select * from t1 where pk=2; +select * from t1 order by pk desc; +select * from t1 order by pk desc; +select * from t1 where pk=2; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +commit; + +connection con2; +select * from t1 order by pk desc; +select * from t1 where pk=2; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +connection con1; + +##################################################################### +# Start a transaction which updates all tables +# Switch to other transaction and check updates does not show up +# Switch back, perform selects and commit transaction +# Switch to other transaction and check that update shows up +##################################################################### +flush status; +begin; +update t1 set a1=9 where pk=1; +update t2 set a2=9 where pk=1; +update t3 set a3=9 where pk=1; +update t4 set a4=9 where a4=2; +update t5 set a5=9 where pk=1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con2; +select * from t1 order by pk desc; +select * from t2; +select * from t3; +select * from t4; +select * from t5; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +connection con1; +# The below five queries will not be cached, trans is ongoing +select * from t1 order by pk desc; +select * from t1 order by pk desc; +select * from t2; +select * from t3; +select * from t4; +select * from t5; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +commit; + +connection con2; +select * from t1 order by pk desc; +select * from t2; +select * from t3; +select * from t4; +select * from t5; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +connection con1; +select * from t1 order by pk desc; +select * from t2; +select * from t3; +select * from t4; +select * from t5; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from t1 order by pk desc; +select * from t2; +select * from t3; +select * from t4; +select * from t5; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +connection con2; +select * from t1 order by pk desc; +select * from t2; +select * from t3; +select * from t4; +select * from t5; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +drop table t1, t2, t3, t4, t5; + +# There should be no queries in cache, when tables have been dropped +show status like "Qcache_queries_in_cache"; + +SET GLOBAL query_cache_size=0; +SET GLOBAL ndb_cache_check_time=0; + + diff --git a/mysql-test/suite/ndb/t/ndb_cache_multi.test b/mysql-test/suite/ndb/t/ndb_cache_multi.test new file mode 100644 index 00000000000..404393c211e --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_cache_multi.test @@ -0,0 +1,72 @@ +-- source include/have_query_cache.inc +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1, t2; +--enable_warnings + + +# Turn on and reset query cache on server1 +connection server1; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; + +# Turn on and reset query cache on server2 +connection server2; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; + + + +# Create test tables in NDB and load them into cache +# on server1 +connection server1; +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +select * from t2; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + + +# Connect server2, load table in to cache, then update the table +connection server2; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from t1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +update t1 set a=3 where a=2; + +# Connect to server1 and check that cache is invalidated +# and correct data is returned +connection server1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from t1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + +drop table t1, t2; + + +# Turn off query cache on server1 +connection server1; +set GLOBAL query_cache_size=0; + +# Turn off query cache on server2 +connection server2; +set GLOBAL query_cache_size=0; diff --git a/mysql-test/suite/ndb/t/ndb_cache_multi2.test b/mysql-test/suite/ndb/t/ndb_cache_multi2.test new file mode 100644 index 00000000000..2afcf0c18f7 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_cache_multi2.test @@ -0,0 +1,126 @@ +-- source include/have_query_cache.inc +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1, t2; +--enable_warnings + + +# Turn on and reset query cache on server1 +connection server1; +echo == Connected to server1 ==; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=1; +reset query cache; +flush status; + +# Turn on and reset query cache on server2 +connection server2; +echo == Connected to server2 ==; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=1; +reset query cache; +flush status; + +# Create test tables in NDB and load them into cache +# on server1 +connection server1; +echo == Connected to server1 ==; +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +# Run the check query once to load it into qc on server1 +# See at the end of this test why we need to disable ps-protocol for +# this query (*) +--disable_ps_protocol +select a != 3 from t1; +--enable_ps_protocol +select * from t2; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; + + +# Connect server2, load table in to cache, then update the table +connection server2; +echo == Connected to server2 ==; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +select * from t1; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +update t1 set a=3 where a=2; + +# Connect to server1 and check that cache is invalidated +# and correct data is returned +connection server1; +echo == Connected to server1 ==; + +# Loop and wait for max 10 seconds until query cache thread +# has invalidated the cache and the column a in t1 is equal to 3 +let $retries=20; +while (`select a != 3 from t1`) +{ + dec $retries; + if (!$retries) + { + The query_cache thread failed to invalidate query_cache in 10 seconds; + } + sleep 0.5; +} + +# Select from t1 one last time for the result file +# Column a should be 3 +select * from t1; + +# There should now be three queries in the cache +show status like "Qcache_queries_in_cache"; + +drop table t1, t2; + +# Turn off and reset query cache on server1 and server2 +connection server1; +set GLOBAL query_cache_size=0; +set GLOBAL ndb_cache_check_time=0; +reset query cache; +flush status; +connection server2; +set GLOBAL query_cache_size=0; +set GLOBAL ndb_cache_check_time=0; +reset query cache; +flush status; + +# (*) Why we need to execute the query in non-ps mode. +# The principle of this test is: two mysqlds connected to one cluster, +# both using their query cache. Queries are cached in server1 +# ("select a!=3 from t1", "select * from t1"), +# table t1 is modified in server2, we want to see that this invalidates +# the query cache of server1. Invalidation with NDB works like this: +# when a query is found in the query cache, NDB is asked if the tables +# have changed. In this test, ha_ndbcluster calls NDB every millisecond +# to collect change information about tables. +# Due to this millisecond delay, there is need for a loop ("while...") +# in this test, which waits until a query1 ("select a!=3 from t1") is +# invalidated (which is equivalent to it returning +# up-to-date results), and then expects query2 ("select * from t1") +# to have been invalidated (see up-to-date results). +# But when enabling --ps-protocol in this test, the logic breaks, +# because query1 is still done via mysql_real_query() (see mysqltest.c: +# eval_expr() always uses mysql_real_query()). So, query1 returning +# up-to-date results is not a sign of it being invalidated in the cache, +# because it was NOT in the cache ("select a!=3 from t1" on line 39 +# was done with prep stmts, while `select a!=3 from t1` is not, +# thus the second does not see the first in the cache). Thus, we may run +# query2 when cache still has not been invalidated. +# The solution is to make the initial "select a!=3 from t1" run +# as a normal query, this repairs the broken logic. +# But note, "select * from t1" is still using prepared statements +# which was the goal of this test with --ps-protocol. diff --git a/mysql-test/suite/ndb/t/ndb_charset.test b/mysql-test/suite/ndb/t/ndb_charset.test new file mode 100644 index 00000000000..2d9f66564bc --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_charset.test @@ -0,0 +1,257 @@ +--source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# Minimal NDB charset test. +# + +# pk - binary + +create table t1 ( + a char(3) character set latin1 collate latin1_bin primary key +) engine=ndb; +# ok +insert into t1 values('aAa'); +insert into t1 values('aaa'); +insert into t1 values('AAA'); +# 3 +select * from t1 order by a; +# 1 +select * from t1 where a = 'aAa'; +# 1 +select * from t1 where a = 'aaa'; +# 0 +select * from t1 where a = 'AaA'; +# 1 +select * from t1 where a = 'AAA'; +drop table t1; + +# pk - case insensitive + +create table t1 ( + a char(3) character set latin1 collate latin1_swedish_ci primary key +) engine=ndb; +# ok +insert into t1 values('aAa'); +# fail +--error ER_DUP_ENTRY +insert into t1 values('aaa'); +--error ER_DUP_ENTRY +insert into t1 values('AAA'); +# 1 +select * from t1 order by a; +# 1 +select * from t1 where a = 'aAa'; +# 1 +select * from t1 where a = 'aaa'; +# 1 +select * from t1 where a = 'AaA'; +# 1 +select * from t1 where a = 'AAA'; +drop table t1; + +# pk - varchar + +create table t1 ( + a varchar(20) character set latin1 collate latin1_swedish_ci primary key +) engine=ndb; +# +insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); +-- error ER_DUP_ENTRY +insert into t1 values('b'); +-- error ER_DUP_ENTRY +insert into t1 values('a '); +# +select a,length(a) from t1 order by a; +select a,length(a) from t1 order by a desc; +select * from t1 where a = 'a'; +select * from t1 where a = 'a '; +select * from t1 where a = 'd'; +drop table t1; + +# unique hash index - binary + +create table t1 ( + p int primary key, + a char(3) character set latin1 collate latin1_bin not null, + unique key(a) +) engine=ndb; +# ok +insert into t1 values(1, 'aAa'); +insert into t1 values(2, 'aaa'); +insert into t1 values(3, 'AAA'); +# 3 +select * from t1 order by p; +# 1 +select * from t1 where a = 'aAa'; +# 1 +select * from t1 where a = 'aaa'; +# 0 +select * from t1 where a = 'AaA'; +# 1 +select * from t1 where a = 'AAA'; +drop table t1; + +# unique hash index - case insensitive + +create table t1 ( + p int primary key, + a char(3) character set latin1 collate latin1_swedish_ci not null, + unique key(a) +) engine=ndb; +# ok +insert into t1 values(1, 'aAa'); +# fail +--error ER_DUP_ENTRY +insert into t1 values(2, 'aaa'); +--error ER_DUP_ENTRY +insert into t1 values(3, 'AAA'); +# 1 +select * from t1 order by p; +# 1 +select * from t1 where a = 'aAa'; +# 1 +select * from t1 where a = 'aaa'; +# 1 +select * from t1 where a = 'AaA'; +# 1 +select * from t1 where a = 'AAA'; +drop table t1; + +# unique hash index - varchar + +create table t1 ( + p int primary key, + a varchar(20) character set latin1 collate latin1_swedish_ci not null, + unique key(a) +) engine=ndb; +# +insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); +-- error ER_DUP_ENTRY +insert into t1 values(99,'b'); +-- error ER_DUP_ENTRY +insert into t1 values(99,'a '); +# +select a,length(a) from t1 order by a; +select a,length(a) from t1 order by a desc; +select * from t1 where a = 'a'; +select * from t1 where a = 'a '; +select * from t1 where a = 'd'; +drop table t1; + +# ordered index - binary + +create table t1 ( + p int primary key, + a char(3) character set latin1 collate latin1_bin not null, + index(a) +) engine=ndb; +# ok +insert into t1 values(1, 'aAa'); +insert into t1 values(2, 'aaa'); +insert into t1 values(3, 'AAA'); +insert into t1 values(4, 'aAa'); +insert into t1 values(5, 'aaa'); +insert into t1 values(6, 'AAA'); +# 6 +select * from t1 order by p; +# plan too flaky +#--replace_column 9 # +#explain select * from t1 where a = 'zZz' order by p; +# 2 +select * from t1 where a = 'aAa' order by p; +# 2 +select * from t1 where a = 'aaa' order by p; +# 0 +select * from t1 where a = 'AaA' order by p; +# 2 +select * from t1 where a = 'AAA' order by p; +drop table t1; + +# ordered index - case insensitive + +create table t1 ( + p int primary key, + a char(3) character set latin1 collate latin1_swedish_ci not null, + index(a) +) engine=ndb; +# ok +insert into t1 values(1, 'aAa'); +insert into t1 values(2, 'aaa'); +insert into t1 values(3, 'AAA'); +insert into t1 values(4, 'aAa'); +insert into t1 values(5, 'aaa'); +insert into t1 values(6, 'AAA'); +# 6 +select * from t1 order by p; +# plan too flaky +#--replace_column 9 # +#explain select * from t1 where a = 'zZz' order by p; +# 6 +select * from t1 where a = 'aAa' order by p; +# 6 +select * from t1 where a = 'aaa' order by p; +# 6 +select * from t1 where a = 'AaA' order by p; +# 6 +select * from t1 where a = 'AAA' order by p; +drop table t1; + +# ordered index - varchar + +create table t1 ( + p int primary key, + a varchar(20) character set latin1 collate latin1_swedish_ci not null, + index(a, p) +) engine=ndb; +# +insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); +insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F '); +select p,a,length(a) from t1 order by a, p; +select * from t1 where a = 'a ' order by a desc, p desc; +select * from t1 where a >= 'D' order by a, p; +select * from t1 where a < 'D' order by a, p; +# +select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a; +drop table t1; + +# minimal multi-byte test +# removed by jonas as this requires a configure --with-extra-charsets +#create table t1 ( +# a char(5) character set ucs2, +# b varchar(7) character set utf8, +# primary key(a, b) +#) engine=ndb; +# +#insert into t1 values +# ('a','A '),('B ','b'),('c','C '),('D','d'),('e ','E'),('F','f '), +# ('A','b '),('b ','C'),('C','d '),('d','E'),('E ','f'), +# ('a','C '),('B ','d'),('c','E '),('D','f'); +#-- error ER_DUP_ENTRY +#insert into t1 values('d','f'); +# +#select a,b,length(a),length(b) from t1 order by a,b limit 3; +#select a,b,length(a),length(b) from t1 order by a desc, b desc limit 3; +#select a,b,length(a),length(b) from t1 where a='c' and b='c'; +#drop table t1; + +# bug#14007 +create table t1 ( + a char(10) primary key +) engine=ndbcluster default charset=latin1; + +insert into t1 values ('aaabb'); +select * from t1; +replace into t1 set a = 'AAABB'; +select * from t1; +replace into t1 set a = 'aAaBb'; +select * from t1; +replace into t1 set a = 'aaabb'; +select * from t1; +drop table t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test b/mysql-test/suite/ndb/t/ndb_condition_pushdown.test new file mode 100644 index 00000000000..ab56430ac1d --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_condition_pushdown.test @@ -0,0 +1,1756 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3,t4; +--enable_warnings + +# +# Test of condition pushdown to storage engine +# +CREATE TABLE t1 ( + auto int(5) unsigned NOT NULL auto_increment, + string char(10), + vstring varchar(10), + bin binary(2), + vbin varbinary(7), + tiny tinyint(4) DEFAULT '0' NOT NULL , + short smallint(6) DEFAULT '1' NOT NULL , + medium mediumint(8) DEFAULT '0' NOT NULL, + long_int int(11) DEFAULT '0' NOT NULL, + longlong bigint(13) DEFAULT '0' NOT NULL, + real_float float(13,1) DEFAULT 0.0 NOT NULL, + real_double double(16,4), + real_decimal decimal(16,4), + utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, + ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, + umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, + ulong int(11) unsigned DEFAULT '0' NOT NULL, + ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, + bits bit(3), + options enum('zero','one','two','three','four') not null, + flags set('zero','one','two','three','four') not null, + date_field date, + year_field year, + time_field time, + date_time datetime, + time_stamp timestamp, + PRIMARY KEY (auto) +) engine=ndb; + +insert into t1 values +(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, + b'001','one','one', + '1901-01-01','1901', +'01:01:01','1901-01-01 01:01:01',NULL), +(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2, + b'010','two','one,two', + '1902-02-02','1902', +'02:02:02','1902-02-02 02:02:02',NULL), +(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3, + b'011','three','one,two,three', + '1903-03-03','1903', +'03:03:03','1903-03-03 03:03:03',NULL), +(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4, + b'100','four','one,two,three,four', + '1904-04-04','1904', +'04:04:04','1904-04-04 04:04:04',NULL); + +CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster; + +insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f"); + +CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster; + +insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); + +CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster; + +insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); + +set @old_ecpd = @@session.engine_condition_pushdown; +set engine_condition_pushdown = off; + +# Test all types and compare operators +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +bits = b'001' and +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +bits != b'001' and +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +bits > b'001' and +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +bits >= b'001' and +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +bits < b'100' and +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; + +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 and +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +bits <= b'100' and +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; + +# Test LIKE/NOT LIKE +select auto from t1 where +string like "b%" and +vstring like "b%" and +bin like concat(0xBB, '%') and +vbin like concat(0xBB, '%') +order by auto; + +select auto from t1 where +string not like "b%" and +vstring not like "b%" and +bin not like concat(0xBB, '%') and +vbin not like concat(0xBB, '%') +order by auto; + +# BETWEEN +select auto from t1 where +(string between "aaaa" and "cccc") and +(vstring between "aaaa" and "cccc") and +(bin between 0xAAAA and 0xCCCC) and +(vbin between 0xAAAA and 0xCCCC) and +(tiny between -3 and -1) and +(short between -3 and -1) and +(medium between -3 and -1) and +(long_int between -3 and -1) and +(longlong between -3 and -1) and +(utiny between 1 and 3) and +(ushort between 1 and 3) and +(umedium between 1 and 3) and +(ulong between 1 and 3) and +(ulonglong between 1 and 3) and +(bits between b'001' and b'011') and +(options between 'one' and 'three') and +(flags between 'one' and 'one,two,three') and +(date_field between '1901-01-01' and '1903-03-03') and +(year_field between '1901' and '1903') and +(time_field between '01:01:01' and '03:03:03') and +(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; + +select auto from t1 where +("aaaa" between string and string) and +("aaaa" between vstring and vstring) and +(0xAAAA between bin and bin) and +(0xAAAA between vbin and vbin) and +(-1 between tiny and tiny) and +(-1 between short and short) and +(-1 between medium and medium) and +(-1 between long_int and long_int) and +(-1 between longlong and longlong) and +(1 between utiny and utiny) and +(1 between ushort and ushort) and +(1 between umedium and umedium) and +(1 between ulong and ulong) and +(1 between ulonglong and ulonglong) and +(b'001' between bits and bits) and +('one' between options and options) and +('one' between flags and flags) and +('1901-01-01' between date_field and date_field) and +('1901' between year_field and year_field) and +('01:01:01' between time_field and time_field) and +('1901-01-01 01:01:01' between date_time and date_time) +order by auto; + +# NOT BETWEEN +select auto from t1 where +(string not between "aaaa" and "cccc") and +(vstring not between "aaaa" and "cccc") and +(bin not between 0xAAAA and 0xCCCC) and +(vbin not between 0xAAAA and 0xCCCC) and +(tiny not between -3 and -1) and +(short not between -3 and -1) and +(medium not between -3 and -1) and +(long_int not between -3 and -1) and +(longlong not between -3 and -1) and +(utiny not between 1 and 3) and +(ushort not between 1 and 3) and +(umedium not between 1 and 3) and +(ulong not between 1 and 3) and +(ulonglong not between 1 and 3) and +(bits not between b'001' and b'011') and +(options not between 'one' and 'three') and +(flags not between 'one' and 'one,two,three') and +(date_field not between '1901-01-01' and '1903-03-03') and +(year_field not between '1901' and '1903') and +(time_field not between '01:01:01' and '03:03:03') and +(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; + +select auto from t1 where +("aaaa" not between string and string) and +("aaaa" not between vstring and vstring) and +(0xAAAA not between bin and bin) and +(0xAAAA not between vbin and vbin) and +(-1 not between tiny and tiny) and +(-1 not between short and short) and +(-1 not between medium and medium) and +(-1 not between long_int and long_int) and +(-1 not between longlong and longlong) and +(1 not between utiny and utiny) and +(1 not between ushort and ushort) and +(1 not between umedium and umedium) and +(1 not between ulong and ulong) and +(1 not between ulonglong and ulonglong) and +(b'001' not between bits and bits) and +('one' not between options and options) and +('one' not between flags and flags) and +('1901-01-01' not between date_field and date_field) and +('1901' not between year_field and year_field) and +('01:01:01' not between time_field and time_field) and +('1901-01-01 01:01:01' not between date_time and date_time) +order by auto; + +# IN +select auto from t1 where +string in("aaaa","cccc") and +vstring in("aaaa","cccc") and +bin in(0xAAAA,0xCCCC) and +vbin in(0xAAAA,0xCCCC) and +tiny in(-1,-3) and +short in(-1,-3) and +medium in(-1,-3) and +long_int in(-1,-3) and +longlong in(-1,-3) and +utiny in(1,3) and +ushort in(1,3) and +umedium in(1,3) and +ulong in(1,3) and +ulonglong in(1,3) and +bits in(b'001',b'011') and +options in('one','three') and +flags in('one','one,two,three') and +date_field in('1901-01-01','1903-03-03') and +year_field in('1901','1903') and +time_field in('01:01:01','03:03:03') and +date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; + +select auto from t1 where +"aaaa" in(string) and +"aaaa" in(vstring) and +0xAAAA in(bin) and +0xAAAA in(vbin) and +(-1 in(tiny)) and +(-1 in(short)) and +(-1 in(medium)) and +(-1 in(long_int)) and +(-1 in(longlong)) and +1 in(utiny) and +1 in(ushort) and +1 in(umedium) and +1 in(ulong) and +1 in(ulonglong) and +b'001' in(bits) and +'one' in(options) and +'one' in(flags) and +'1901-01-01' in(date_field) and +'1901' in(year_field) and +'01:01:01' in(time_field) and +'1901-01-01 01:01:01' in(date_time) +order by auto; + +# NOT IN +select auto from t1 where +string not in("aaaa","cccc") and +vstring not in("aaaa","cccc") and +bin not in(0xAAAA,0xCCCC) and +vbin not in(0xAAAA,0xCCCC) and +tiny not in(-1,-3) and +short not in(-1,-3) and +medium not in(-1,-3) and +long_int not in(-1,-3) and +longlong not in(-1,-3) and +utiny not in(1,3) and +ushort not in(1,3) and +umedium not in(1,3) and +ulong not in(1,3) and +ulonglong not in(1,3) and +bits not in(b'001',b'011') and +options not in('one','three') and +flags not in('one','one,two,three') and +date_field not in('1901-01-01','1903-03-03') and +year_field not in('1901','1903') and +time_field not in('01:01:01','03:03:03') and +date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; + +select auto from t1 where +"aaaa" not in(string) and +"aaaa" not in(vstring) and +0xAAAA not in(bin) and +0xAAAA not in(vbin) and +(-1 not in(tiny)) and +(-1 not in(short)) and +(-1 not in(medium)) and +(-1 not in(long_int)) and +(-1 not in(longlong)) and +1 not in(utiny) and +1 not in(ushort) and +1 not in(umedium) and +1 not in(ulong) and +1 not in(ulonglong) and +b'001' not in(bits) and +'one' not in(options) and +'one' not in(flags) and +'1901-01-01' not in(date_field) and +'1901' not in(year_field) and +'01:01:01' not in(time_field) and +'1901-01-01 01:01:01' not in(date_time) +order by auto; + +# Various tests +select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; +select * from t2 where attr3 is not null and attr1 > 2 order by pk1; +select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; +select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; +select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; +select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; + +set engine_condition_pushdown = on; + +# Test all types and compare operators +--replace_column 9 # +explain +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; + +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; + +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; + +# Test index scan with filter +create index medium_index on t1(medium); + +# Test all types and compare operators +--replace_column 9 # +explain +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; + +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; + +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; + +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; + +# Test LIKE/NOT LIKE +--replace_column 9 # +explain +select auto from t1 where +string like "b%" and +vstring like "b%" and +bin like concat(0xBB, '%') and +vbin like concat(0xBB, '%') +order by auto; + +select auto from t1 where +string like "b%" and +vstring like "b%" and +bin like concat(0xBB, '%') and +vbin like concat(0xBB, '%') +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +string not like "b%" and +vstring not like "b%" and +bin not like concat(0xBB, '%') and +vbin not like concat(0xBB, '%') +order by auto; + +select auto from t1 where +string not like "b%" and +vstring not like "b%" and +bin not like concat(0xBB, '%') and +vbin not like concat(0xBB, '%') +order by auto; + +# BETWEEN +--replace_column 9 # +explain +select auto from t1 where +(string between "aaaa" and "cccc") and +(vstring between "aaaa" and "cccc") and +(bin between 0xAAAA and 0xCCCC) and +(vbin between 0xAAAA and 0xCCCC) and +(tiny between -3 and -1) and +(short between -3 and -1) and +(medium between -3 and -1) and +(long_int between -3 and -1) and +(longlong between -3 and -1) and +(utiny between 1 and 3) and +(ushort between 1 and 3) and +(umedium between 1 and 3) and +(ulong between 1 and 3) and +(ulonglong between 1 and 3) and +/* (bits between b'001' and b'011') and */ +(options between 'one' and 'three') and +(flags between 'one' and 'one,two,three') and +(date_field between '1901-01-01' and '1903-03-03') and +(year_field between '1901' and '1903') and +(time_field between '01:01:01' and '03:03:03') and +(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; + +select auto from t1 where +(string between "aaaa" and "cccc") and +(vstring between "aaaa" and "cccc") and +(bin between 0xAAAA and 0xCCCC) and +(vbin between 0xAAAA and 0xCCCC) and +(tiny between -3 and -1) and +(short between -3 and -1) and +(medium between -3 and -1) and +(long_int between -3 and -1) and +(longlong between -3 and -1) and +(utiny between 1 and 3) and +(ushort between 1 and 3) and +(umedium between 1 and 3) and +(ulong between 1 and 3) and +(ulonglong between 1 and 3) and +/* (bits between b'001' and b'011') and */ +(options between 'one' and 'three') and +(flags between 'one' and 'one,two,three') and +(date_field between '1901-01-01' and '1903-03-03') and +(year_field between '1901' and '1903') and +(time_field between '01:01:01' and '03:03:03') and +(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +("aaaa" between string and string) and +("aaaa" between vstring and vstring) and +(0xAAAA between bin and bin) and +(0xAAAA between vbin and vbin) and +(-1 between tiny and tiny) and +(-1 between short and short) and +(-1 between medium and medium) and +(-1 between long_int and long_int) and +(-1 between longlong and longlong) and +(1 between utiny and utiny) and +(1 between ushort and ushort) and +(1 between umedium and umedium) and +(1 between ulong and ulong) and +(1 between ulonglong and ulonglong) and +/* (b'001' between bits and bits) and */ +('one' between options and options) and +('one' between flags and flags) and +('1901-01-01' between date_field and date_field) and +('1901' between year_field and year_field) and +('01:01:01' between time_field and time_field) and +('1901-01-01 01:01:01' between date_time and date_time) +order by auto; + +select auto from t1 where +("aaaa" between string and string) and +("aaaa" between vstring and vstring) and +(0xAAAA between bin and bin) and +(0xAAAA between vbin and vbin) and +(-1 between tiny and tiny) and +(-1 between short and short) and +(-1 between medium and medium) and +(-1 between long_int and long_int) and +(-1 between longlong and longlong) and +(1 between utiny and utiny) and +(1 between ushort and ushort) and +(1 between umedium and umedium) and +(1 between ulong and ulong) and +(1 between ulonglong and ulonglong) and +/* (b'001' between bits and bits) and */ +('one' between options and options) and +('one' between flags and flags) and +('1901-01-01' between date_field and date_field) and +('1901' between year_field and year_field) and +('01:01:01' between time_field and time_field) and +('1901-01-01 01:01:01' between date_time and date_time) +order by auto; + +# NOT BETWEEN +--replace_column 9 # +explain +select auto from t1 where +(string not between "aaaa" and "cccc") and +(vstring not between "aaaa" and "cccc") and +(bin not between 0xAAAA and 0xCCCC) and +(vbin not between 0xAAAA and 0xCCCC) and +(tiny not between -3 and -1) and +(short not between -3 and -1) and +(medium not between -3 and -1) and +(long_int not between -3 and -1) and +(longlong not between -3 and -1) and +(utiny not between 1 and 3) and +(ushort not between 1 and 3) and +(umedium not between 1 and 3) and +(ulong not between 1 and 3) and +(ulonglong not between 1 and 3) and +/* (bits not between b'001' and b'011') and */ +(options not between 'one' and 'three') and +(flags not between 'one' and 'one,two,three') and +(date_field not between '1901-01-01' and '1903-03-03') and +(year_field not between '1901' and '1903') and +(time_field not between '01:01:01' and '03:03:03') and +(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; + +select auto from t1 where +(string not between "aaaa" and "cccc") and +(vstring not between "aaaa" and "cccc") and +(bin not between 0xAAAA and 0xCCCC) and +(vbin not between 0xAAAA and 0xCCCC) and +(tiny not between -3 and -1) and +(short not between -3 and -1) and +(medium not between -3 and -1) and +(long_int not between -3 and -1) and +(longlong not between -3 and -1) and +(utiny not between 1 and 3) and +(ushort not between 1 and 3) and +(umedium not between 1 and 3) and +(ulong not between 1 and 3) and +(ulonglong not between 1 and 3) and +/* (bits not between b'001' and b'011') and */ +(options not between 'one' and 'three') and +(flags not between 'one' and 'one,two,three') and +(date_field not between '1901-01-01' and '1903-03-03') and +(year_field not between '1901' and '1903') and +(time_field not between '01:01:01' and '03:03:03') and +(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +("aaaa" not between string and string) and +("aaaa" not between vstring and vstring) and +(0xAAAA not between bin and bin) and +(0xAAAA not between vbin and vbin) and +(-1 not between tiny and tiny) and +(-1 not between short and short) and +(-1 not between medium and medium) and +(-1 not between long_int and long_int) and +(-1 not between longlong and longlong) and +(1 not between utiny and utiny) and +(1 not between ushort and ushort) and +(1 not between umedium and umedium) and +(1 not between ulong and ulong) and +(1 not between ulonglong and ulonglong) and +/* (b'001' not between bits and bits) and */ +('one' not between options and options) and +('one' not between flags and flags) and +('1901-01-01' not between date_field and date_field) and +('1901' not between year_field and year_field) and +('01:01:01' not between time_field and time_field) and +('1901-01-01 01:01:01' not between date_time and date_time) +order by auto; + +select auto from t1 where +("aaaa" not between string and string) and +("aaaa" not between vstring and vstring) and +(0xAAAA not between bin and bin) and +(0xAAAA not between vbin and vbin) and +(-1 not between tiny and tiny) and +(-1 not between short and short) and +(-1 not between medium and medium) and +(-1 not between long_int and long_int) and +(-1 not between longlong and longlong) and +(1 not between utiny and utiny) and +(1 not between ushort and ushort) and +(1 not between umedium and umedium) and +(1 not between ulong and ulong) and +(1 not between ulonglong and ulonglong) and +/* (b'001' not between bits and bits) and */ +('one' not between options and options) and +('one' not between flags and flags) and +('1901-01-01' not between date_field and date_field) and +('1901' not between year_field and year_field) and +('01:01:01' not between time_field and time_field) and +('1901-01-01 01:01:01' not between date_time and date_time) +order by auto; + +# IN +--replace_column 9 # +explain +select auto from t1 where +string in("aaaa","cccc") and +vstring in("aaaa","cccc") and +bin in(0xAAAA,0xCCCC) and +vbin in(0xAAAA,0xCCCC) and +tiny in(-1,-3) and +short in(-1,-3) and +medium in(-1,-3) and +long_int in(-1,-3) and +longlong in(-1,-3) and +utiny in(1,3) and +ushort in(1,3) and +umedium in(1,3) and +ulong in(1,3) and +ulonglong in(1,3) and +/* bits in(b'001',b'011') and */ +options in('one','three') and +flags in('one','one,two,three') and +date_field in('1901-01-01','1903-03-03') and +year_field in('1901','1903') and +time_field in('01:01:01','03:03:03') and +date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; + +select auto from t1 where +string in("aaaa","cccc") and +vstring in("aaaa","cccc") and +bin in(0xAAAA,0xCCCC) and +vbin in(0xAAAA,0xCCCC) and +tiny in(-1,-3) and +short in(-1,-3) and +medium in(-1,-3) and +long_int in(-1,-3) and +longlong in(-1,-3) and +utiny in(1,3) and +ushort in(1,3) and +umedium in(1,3) and +ulong in(1,3) and +ulonglong in(1,3) and +/* bits in(b'001',b'011') and */ +options in('one','three') and +flags in('one','one,two,three') and +date_field in('1901-01-01','1903-03-03') and +year_field in('1901','1903') and +time_field in('01:01:01','03:03:03') and +date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +"aaaa" in(string) and +"aaaa" in(vstring) and +0xAAAA in(bin) and +0xAAAA in(vbin) and +(-1 in(tiny)) and +(-1 in (short)) and +(-1 in(medium)) and +(-1 in(long_int)) and +(-1 in(longlong)) and +1 in(utiny) and +1 in(ushort) and +1 in(umedium) and +1 in(ulong) and +1 in(ulonglong) and +/* b'001' in(bits) and */ +'one' in(options) and +'one' in(flags) and +'1901-01-01' in(date_field) and +'1901' in(year_field) and +'01:01:01' in(time_field) and +'1901-01-01 01:01:01' in(date_time) +order by auto; + +select auto from t1 where +"aaaa" in(string) and +"aaaa" in(vstring) and +0xAAAA in(bin) and +0xAAAA in(vbin) and +(-1 in(tiny)) and +(-1 in (short)) and +(-1 in(medium)) and +(-1 in(long_int)) and +(-1 in(longlong)) and +1 in(utiny) and +1 in(ushort) and +1 in(umedium) and +1 in(ulong) and +1 in(ulonglong) and +/* b'001' in(bits) and */ +'one' in(options) and +'one' in(flags) and +'1901-01-01' in(date_field) and +'1901' in(year_field) and +'01:01:01' in(time_field) and +'1901-01-01 01:01:01' in(date_time) +order by auto; + +# NOT IN +--replace_column 9 # +explain +select auto from t1 where +string not in("aaaa","cccc") and +vstring not in("aaaa","cccc") and +bin not in(0xAAAA,0xCCCC) and +vbin not in(0xAAAA,0xCCCC) and +tiny not in(-1,-3) and +short not in(-1,-3) and +medium not in(-1,-3) and +long_int not in(-1,-3) and +longlong not in(-1,-3) and +utiny not in(1,3) and +ushort not in(1,3) and +umedium not in(1,3) and +ulong not in(1,3) and +ulonglong not in(1,3) and +/* bits not in(b'001',b'011') and */ +options not in('one','three') and +flags not in('one','one,two,three') and +date_field not in('1901-01-01','1903-03-03') and +year_field not in('1901','1903') and +time_field not in('01:01:01','03:03:03') and +date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; + +select auto from t1 where +string not in("aaaa","cccc") and +vstring not in("aaaa","cccc") and +bin not in(0xAAAA,0xCCCC) and +vbin not in(0xAAAA,0xCCCC) and +tiny not in(-1,-3) and +short not in(-1,-3) and +medium not in(-1,-3) and +long_int not in(-1,-3) and +longlong not in(-1,-3) and +utiny not in(1,3) and +ushort not in(1,3) and +umedium not in(1,3) and +ulong not in(1,3) and +ulonglong not in(1,3) and +/* bits not in(b'001',b'011') and */ +options not in('one','three') and +flags not in('one','one,two,three') and +date_field not in('1901-01-01','1903-03-03') and +year_field not in('1901','1903') and +time_field not in('01:01:01','03:03:03') and +date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; + +--replace_column 9 # +explain +select auto from t1 where +"aaaa" not in(string) and +"aaaa" not in(vstring) and +0xAAAA not in(bin) and +0xAAAA not in(vbin) and +(-1 not in(tiny)) and +(-1 not in(short)) and +(-1 not in(medium)) and +(-1 not in(long_int)) and +(-1 not in(longlong)) and +1 not in(utiny) and +1 not in(ushort) and +1 not in(umedium) and +1 not in(ulong) and +1 not in(ulonglong) and +/* b'001' not in(bits) and */ +'one' not in(options) and +'one' not in(flags) and +'1901-01-01' not in(date_field) and +'1901' not in(year_field) and +'01:01:01' not in(time_field) and +'1901-01-01 01:01:01' not in(date_time) +order by auto; + +select auto from t1 where +"aaaa" not in(string) and +"aaaa" not in(vstring) and +0xAAAA not in(bin) and +0xAAAA not in(vbin) and +(-1 not in(tiny)) and +(-1 not in(short)) and +(-1 not in(medium)) and +(-1 not in(long_int)) and +(-1 not in(longlong)) and +1 not in(utiny) and +1 not in(ushort) and +1 not in(umedium) and +1 not in(ulong) and +1 not in(ulonglong) and +/* b'001' not in(bits) and */ +'one' not in(options) and +'one' not in(flags) and +'1901-01-01' not in(date_field) and +'1901' not in(year_field) and +'01:01:01' not in(time_field) and +'1901-01-01 01:01:01' not in(date_time) +order by auto; + +# Update test +update t1 +set medium = 17 +where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01'; + +# Delete test +delete from t1 +where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = 17 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01'; + +select count(*) from t1; + +# Various tests +--replace_column 9 # +explain +select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; +select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; + +--replace_column 9 # +explain +select * from t2 where attr3 is not null and attr1 > 2 order by pk1; +select * from t2 where attr3 is not null and attr1 > 2 order by pk1; + +--replace_column 9 # +explain +select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; +select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; + +--replace_column 9 # +explain +select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; +select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; + +--replace_column 9 # +explain +select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; +select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; + +--replace_column 9 # +explain +select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; +select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; + +# Some tests that are currently not supported and should not push condition +--replace_column 9 # +explain +select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; +--replace_column 9 # +explain +select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; +--replace_column 9 # +explain +select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1; + +# bug#15722 +create table t5 (a int primary key auto_increment, b tinytext not null) +engine = ndb; +insert into t5 (b) values ('jonas'), ('jensing'), ('johan'); +set engine_condition_pushdown = off; +select * from t5 where b like '%jo%' order by a; +set engine_condition_pushdown = on; +--replace_column 9 # +explain select * from t5 where b like '%jo%'; +select * from t5 where b like '%jo%' order by a; + +# bug#21056 ndb pushdown equal/setValue error on datetime +set engine_condition_pushdown = off; +select auto from t1 where date_time like '1902-02-02 %' order by auto; +select auto from t1 where date_time not like '1902-02-02 %' order by auto; +set engine_condition_pushdown = on; +--replace_column 9 # +explain select auto from t1 where date_time like '1902-02-02 %'; +select auto from t1 where date_time like '1902-02-02 %' order by auto; +--replace_column 9 # +explain select auto from t1 where date_time not like '1902-02-02 %'; +select auto from t1 where date_time not like '1902-02-02 %' order by auto; + +# bug#17421 -1 +drop table t1; +create table t1 (a int, b varchar(3), primary key using hash(a)) +engine=ndb; +insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); +# in TUP the constants 'ab' 'abc' were expected in varchar format +# "like" returned error which became "false" +# scan filter negates "or" which exposes the bug +set engine_condition_pushdown = off; +select * from t1 where b like 'ab'; +select * from t1 where b like 'ab' or b like 'ab'; +select * from t1 where b like 'abc'; +select * from t1 where b like 'abc' or b like 'abc'; +set engine_condition_pushdown = on; +select * from t1 where b like 'ab'; +select * from t1 where b like 'ab' or b like 'ab'; +select * from t1 where b like 'abc'; +select * from t1 where b like 'abc' or b like 'abc'; + +# bug#17421 -2 +drop table t1; +create table t1 (a int, b char(3), primary key using hash(a)) +engine=ndb; +insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); +# test that incorrect MySQL behaviour is preserved +# 'ab ' LIKE 'ab' is true in MySQL +set engine_condition_pushdown = off; +select * from t1 where b like 'ab'; +select * from t1 where b like 'ab' or b like 'ab'; +select * from t1 where b like 'abc'; +select * from t1 where b like 'abc' or b like 'abc'; +set engine_condition_pushdown = on; +select * from t1 where b like 'ab'; +select * from t1 where b like 'ab' or b like 'ab'; +select * from t1 where b like 'abc'; +select * from t1 where b like 'abc' or b like 'abc'; + +# bug#20406 (maybe same as bug#17421 -1, not seen on 32-bit x86) +drop table t1; +create table t1 ( fname varchar(255), lname varchar(255) ) +engine=ndbcluster; +insert into t1 values ("Young","Foo"); + +set engine_condition_pushdown = 0; +SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); +set engine_condition_pushdown = 1; +SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); + +# make sure optimizer does not do some crazy shortcut +insert into t1 values ("aaa", "aaa"); +insert into t1 values ("bbb", "bbb"); +insert into t1 values ("ccc", "ccc"); +insert into t1 values ("ddd", "ddd"); + +set engine_condition_pushdown = 0; +SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); +set engine_condition_pushdown = 1; +SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); + +set engine_condition_pushdown = @old_ecpd; +DROP TABLE t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/ndb/t/ndb_config.test b/mysql-test/suite/ndb/t/ndb_config.test new file mode 100644 index 00000000000..f63c0087c1e --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_config.test @@ -0,0 +1,23 @@ +-- source include/have_ndb.inc +-- source include/ndb_default_cluster.inc +-- source include/not_embedded.inc + +--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host 2> /dev/null +--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null +--exec $NDB_TOOLS_DIR/ndb_config --no-defaults -r \\\n -f " " --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null +--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --type=ndbd --host=localhost 2> /dev/null +--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null + +# End of 4.1 tests + +--exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.jonas --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf1.cnf --query=type,nodeid,host,IndexMemory,DataMemory --mycnf 2> /dev/null + +--exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster0 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null +--exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster1 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null +--exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null +--exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null + + +--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=localhost --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null +--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=1.2.3.4 --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null +--exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=127.0.0.1 --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null diff --git a/mysql-test/suite/ndb/t/ndb_config2.test b/mysql-test/suite/ndb/t/ndb_config2.test new file mode 100644 index 00000000000..170f1b2e5e7 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_config2.test @@ -0,0 +1,7 @@ +-- source include/have_ndb.inc +-- source include/ndb_default_cluster.inc +-- source include/not_embedded.inc + +# Following doesn't work in all configurations (if shm is not defined) + +--exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null diff --git a/mysql-test/suite/ndb/t/ndb_cursor.test b/mysql-test/suite/ndb/t/ndb_cursor.test new file mode 100644 index 00000000000..406f8629cfe --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_cursor.test @@ -0,0 +1,47 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1; +drop table if exists t2; +--enable_warnings + +create table t1 ( + a int not null primary key, + b int not null +) engine=ndb; + +create table t2 ( + a int not null primary key, + b int not null +) engine=ndb; + +insert into t1 values (1,10), (2,20), (3,30), (4, 40); + +delimiter //; +create procedure test_cursor () +begin + declare done int default 0; + declare temp_a int; + declare temp_b int; + declare cur1 cursor for select a,b from t1; + declare continue handler for sqlstate '02000' set done = 1; + open cur1; + repeat + fetch cur1 into temp_a, temp_b; + if not done then + insert into t2 values (temp_a, temp_b); + end if; + until done end repeat; + close cur1; +end; +// +delimiter ;// + +select * from t2 order by a; +call test_cursor(); +select * from t2 order by a; +drop procedure test_cursor; +drop table t1,t2; + +--echo end of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_database.test b/mysql-test/suite/ndb/t/ndb_database.test new file mode 100644 index 00000000000..8bfdf40de88 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_database.test @@ -0,0 +1,24 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop database if exists mysqltest; +--enable_warnings + +# +# Check that all tables in a database are dropped when database is dropped +# + +create database mysqltest; +create table mysqltest.t1 (a int primary key, b int) engine=ndb; +use mysqltest; +show tables; + +drop database mysqltest; +create database mysqltest; +use mysqltest; +show tables; + +drop database mysqltest; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_dd_alter.test b/mysql-test/suite/ndb/t/ndb_dd_alter.test new file mode 100644 index 00000000000..7635a8944da --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_dd_alter.test @@ -0,0 +1,274 @@ +############################################################## +# Author: JBM +# Date: 2006-01-12 +# Purpose: To test using ndb memory and disk tables together. +############################################################## + +############################################################## +# Author: Nikolay +# Date: 2006-05-12 +# Purpose: To test using ndb memory and disk tables together. +# +# Select from disk into memory table +# Select from disk into memory table +# Create test that loads data, use mysql dump to dump data, drop table, +# create table and load from mysql dump. +# Use group by asc and dec; Use having; Use order by +# ALTER Tests (Meta data testing): +# ALTER from InnoDB to Cluster Disk Data +# ALTER from MyISAM to Cluster Disk Data +# ALTER from Cluster Disk Data to InnoDB +# ALTER from Cluster Disk Data to MyISAM +# ALTER DD Tables and add columns +# ALTER DD Tables and add Indexes +# ALTER DD Tables and drop columns +# +############################################################## +# Author: Jonathan +# Date 2006-08-28 +# Purpose: To take out some of the test that are already +# Covered by other tests. Per Jonas +# The new purpose of this test is testing "Alter" +# Statements. Therefore the name is changed to +# ndb_dd_alter.test +# Removed tests include: +# Select from disk into memory table +# Select from disk into memory table +# Create test that loads data, use mysql dump to dump data, drop table, +# create table and load from mysql dump. +# Use group by asc and dec; Use having; Use order by +############################################################## + +-- source include/have_ndb.inc +-- source include/have_innodb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +--enable_warnings + +############ Test Setup Section ############# +-- echo **** Test Setup Section **** +################## ALTER Tests (Meta data testing) #################### + + CREATE LOGFILE GROUP lg + ADD UNDOFILE './lg_group/undofile.dat' + INITIAL_SIZE 16M + UNDO_BUFFER_SIZE = 1M + ENGINE=NDB; + + CREATE TABLESPACE ts + ADD DATAFILE './table_space/datafile.dat' + USE LOGFILE GROUP lg + INITIAL_SIZE 12M + ENGINE NDB; + +#### Try to ALTER from InnoDB to Cluster Disk Data + +CREATE TABLE test.t1 ( + a1 smallint NOT NULL, + a2 int NOT NULL, + a3 bigint NOT NULL, + a4 char(10), + a5 decimal(5,1), + a6 time, + a7 date, + a8 datetime, + a9 VARCHAR(255), + a10 blob, + PRIMARY KEY(a1) +) ENGINE=InnoDB; + +let $1=20; +disable_query_log; +while ($1) +{ + eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); + dec $1; +} +enable_query_log; + +SHOW CREATE TABLE test.t1; +SELECT * FROM test.t1 ORDER BY a1; +ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; +SHOW CREATE TABLE test.t1; +# Check column storage +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' +SELECT * FROM test.t1 ORDER BY a1; +DROP TABLE test.t1; + +#### Try to ALTER from MyISAM to Cluster Disk Data + +CREATE TABLE test.t1 ( + a1 smallint NOT NULL, + a2 int NOT NULL, + a3 bigint NOT NULL, + a4 char(10), + a5 decimal(5,1), + a6 time, + a7 date, + a8 datetime, + a9 VARCHAR(255), + a10 blob, + PRIMARY KEY(a1) +) ENGINE=MyISAM; + +let $1=20; +disable_query_log; +while ($1) +{ + eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); + dec $1; +} +enable_query_log; + +SHOW CREATE TABLE test.t1; +SELECT * FROM test.t1 ORDER BY a1; +ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; +SHOW CREATE TABLE test.t1; +# Check column storage +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' +SELECT * FROM test.t1 ORDER BY a1; + +#### Try to ALTER from Cluster Disk Data to InnoDB + +ALTER TABLE test.t1 ENGINE=InnoDB; +SHOW CREATE TABLE test.t1; +SELECT * FROM test.t1 ORDER BY a1; +ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; +SHOW CREATE TABLE test.t1; +# Check column storage +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' + +#### Try to ALTER from Cluster Disk Data to MyISAM + +ALTER TABLE test.t1 ENGINE=MyISAM; +SHOW CREATE TABLE test.t1; +DROP TABLE test.t1; + +#### Try to ALTER DD Tables and add columns + +CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB; + +let $1=20; +disable_query_log; +while ($1) +{ + eval insert into test.t1 values($1); + dec $1; +} +enable_query_log; + +SELECT * FROM test.t1 ORDER BY a1; + +SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; + +ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE; + +SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; + +let $1=20; +disable_query_log; +while ($1) +{ + eval update test.t1 set a2 = $1+1.2345, a3 = $1+20000000.00 where a1 = $1; + dec $1; +} +enable_query_log; + +SELECT * FROM test.t1 ORDER BY a1; + +ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME; + +let $1=20; +disable_query_log; +while ($1) +{ + eval update test.t1 set a4 = 0, a5 = 1, a6 = $1+23456, a7 = '2006-1-1', + a8 = '07:04:00' where a1 = $1; + dec $1; +} +enable_query_log; + +SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1; + +ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB; +SHOW CREATE TABLE test.t1; +# Check column storage +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' + +disable_query_log; +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +enable_query_log; + +let $1=20; +disable_query_log; +while ($1) +{ + eval update test.t1 set a9 = '1971-5-28 16:55:03', a10 = 'abc', a11 = 'abcdefg', + a12 = 'LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', a13 = 'Text Field', + a14 = @d2 where a1 = $1; + dec $1; +} +enable_query_log; + +SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1; + +#### Try to ALTER DD Tables and add Indexes + +ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3); + +SHOW CREATE TABLE test.t1; + +# Check column storage +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' + +ALTER TABLE test.t1 DROP INDEX a2_i; + +SHOW CREATE TABLE test.t1; + +# Check column storage +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' + +TRUNCATE TABLE test.t1; + +SHOW CREATE TABLE test.t1; + +# Check column storage +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' + +#### Try to ALTER DD Tables and drop columns + + +ALTER TABLE test.t1 DROP a14; +ALTER TABLE test.t1 DROP a13; +ALTER TABLE test.t1 DROP a12; +ALTER TABLE test.t1 DROP a11; +ALTER TABLE test.t1 DROP a10; +ALTER TABLE test.t1 DROP a9; +ALTER TABLE test.t1 DROP a8; +ALTER TABLE test.t1 DROP a7; +ALTER TABLE test.t1 DROP a6; +ALTER TABLE test.t1 DROP PRIMARY KEY; + +SHOW CREATE TABLE test.t1; + +# Check column storage +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' + +DROP TABLE test.t1; + + ALTER TABLESPACE ts + DROP DATAFILE './table_space/datafile.dat' + ENGINE NDB; + DROP TABLESPACE ts ENGINE NDB; + DROP LOGFILE GROUP lg ENGINE=NDB; + +####################### End section 4 ######################### +#End 5.1 test case + diff --git a/mysql-test/suite/ndb/t/ndb_dd_backuprestore.test b/mysql-test/suite/ndb/t/ndb_dd_backuprestore.test new file mode 100644 index 00000000000..48db8ec3e0b --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_dd_backuprestore.test @@ -0,0 +1,349 @@ +######################################## +# Author: JBM +# Date: 2006-01-24 +# Purpose: Test CDD backup and restore +######################################## + +-- source include/have_ndb.inc +-- source include/ndb_default_cluster.inc +-- source include/not_embedded.inc + +--disable_query_log +set new=on; +--enable_query_log + +--disable_warnings +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +DROP TABLE IF EXISTS test.t4; +DROP TABLE IF EXISTS test.t5; +DROP TABLE IF EXISTS test.t6; +--enable_warnings + +############ Test 1 Simple DD backup and restore ############# +-- echo **** Test 1 Simple DD backup and restore **** + +CREATE LOGFILE GROUP log_group1 +ADD UNDOFILE './log_group1/undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; + +CREATE TABLESPACE table_space1 +ADD DATAFILE './table_space1/datafile.dat' +USE LOGFILE GROUP log_group1 +INITIAL_SIZE 12M +ENGINE NDB; + + +CREATE TABLE test.t1 +(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; + +let $j= 500; +--disable_query_log +while ($j) +{ + eval INSERT INTO test.t1 VALUES (NULL, "Sweden", $j, b'1'); + dec $j; +} +--enable_query_log +SELECT COUNT(*) FROM test.t1; +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; + +-- source include/ndb_backup.inc + +DROP TABLE test.t1; + +ALTER TABLESPACE table_space1 +DROP DATAFILE './table_space1/datafile.dat' +ENGINE = NDB; + +DROP TABLESPACE table_space1 +ENGINE = NDB; + +DROP LOGFILE GROUP log_group1 +ENGINE =NDB; + +-- source include/ndb_restore_master.inc + +SELECT COUNT(*) FROM test.t1; + +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; + +################# Mixed Cluster Test ############################ +-- echo **** Test 2 Mixed Cluster Test backup and restore **** + +CREATE TABLE test.t2 +(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; + +let $j= 500; +--disable_query_log +while ($j) +{ + eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas", $j, b'0'); + dec $j; +} +--enable_query_log + +CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; + +CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; + +let $j= 50; +--disable_query_log +while ($j) +{ + INSERT INTO test.t3 VALUES (NULL, repeat('a',1*1024)); + INSERT INTO test.t3 VALUES (NULL, repeat('b',16*1024)); + INSERT INTO test.t4 VALUES (NULL, repeat('a',1*1024)); + INSERT INTO test.t4 VALUES (NULL, repeat('b',16*1024)); + dec $j; +} +--enable_query_log + +SELECT COUNT(*) FROM test.t1; + +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; + +SELECT COUNT(*) FROM test.t2; + +SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; + +SELECT COUNT(*) FROM test.t3; + +SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; + +SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; + +SELECT COUNT(*) FROM test.t4; + +SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; + +SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; + +-- source include/ndb_backup.inc + +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +DROP TABLE test.t4; + +ALTER TABLESPACE table_space1 +DROP DATAFILE './table_space1/datafile.dat' +ENGINE = NDB; + +DROP TABLESPACE table_space1 +ENGINE = NDB; + +DROP LOGFILE GROUP log_group1 +ENGINE =NDB; + +-- source include/ndb_restore_master.inc + +SELECT COUNT(*) FROM test.t1; + +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; + +SELECT COUNT(*) FROM test.t2; + +SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; + +SELECT COUNT(*) FROM test.t3; + +SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; + +SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; + +SELECT COUNT(*) FROM test.t4; + +SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; + +SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; + +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +DROP TABLE test.t4; +###################### Adding partition ################################# +-- echo **** Test 3 Adding partition Test backup and restore **** + +CREATE TABLESPACE table_space2 +ADD DATAFILE './table_space2/datafile.dat' +USE LOGFILE GROUP log_group1 +INITIAL_SIZE 12M +ENGINE NDB; + +CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; + +CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; + +CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); + +CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); + +CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); + +CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); + +SHOW CREATE TABLE test.t1; + +SHOW CREATE TABLE test.t2; + +SHOW CREATE TABLE test.t3; + +SHOW CREATE TABLE test.t4; + +SHOW CREATE TABLE test.t5; + +SHOW CREATE TABLE test.t6; + +SELECT * FROM information_schema.partitions WHERE table_name= 't1'; + +SELECT * FROM information_schema.partitions WHERE table_name= 't2'; + +SELECT * FROM information_schema.partitions WHERE table_name= 't3'; + +SELECT * FROM information_schema.partitions WHERE table_name= 't4'; + +SELECT * FROM information_schema.partitions WHERE table_name= 't5'; + +SELECT * FROM information_schema.partitions WHERE table_name= 't6'; + + +let $j= 500; +--disable_query_log +while ($j) +{ + eval INSERT INTO test.t1 VALUES (NULL, "Sweden, Texas", $j, b'0'); + eval INSERT INTO test.t4 VALUES (NULL, "Sweden, Texas", $j, b'0'); + dec $j; + eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); + eval INSERT INTO test.t5 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); + dec $j; + eval INSERT INTO test.t3 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); + eval INSERT INTO test.t6 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); } --enable_query_log + +SELECT COUNT(*) FROM test.t1; + +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; + +SELECT COUNT(*) FROM test.t2; + +SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; + +SELECT COUNT(*) FROM test.t3; + +SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; + +SELECT COUNT(*) FROM test.t4; + +SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; + +SELECT COUNT(*) FROM test.t5; + +SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; + +SELECT COUNT(*) FROM test.t6; + +SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; + +-- source include/ndb_backup.inc + +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +DROP TABLE test.t4; +DROP TABLE test.t5; +DROP TABLE test.t6; + +ALTER TABLESPACE table_space1 +DROP DATAFILE './table_space1/datafile.dat' +ENGINE = NDB; + +ALTER TABLESPACE table_space2 +DROP DATAFILE './table_space2/datafile.dat' +ENGINE = NDB; + +DROP TABLESPACE table_space1 +ENGINE = NDB; + +DROP TABLESPACE table_space2 +ENGINE = NDB; + +DROP LOGFILE GROUP log_group1 +ENGINE =NDB; + +-- source include/ndb_restore_master.inc + + +SHOW CREATE TABLE test.t1; + +SHOW CREATE TABLE test.t2; + +SHOW CREATE TABLE test.t3; + +SHOW CREATE TABLE test.t4; + +SHOW CREATE TABLE test.t5; + +SHOW CREATE TABLE test.t6; + +SELECT * FROM information_schema.partitions WHERE table_name= 't1'; + +SELECT * FROM information_schema.partitions WHERE table_name= 't2'; + +SELECT * FROM information_schema.partitions WHERE table_name= 't3'; + +SELECT * FROM information_schema.partitions WHERE table_name= 't4'; + +SELECT * FROM information_schema.partitions WHERE table_name= 't5'; + +SELECT * FROM information_schema.partitions WHERE table_name= 't6'; + +SELECT COUNT(*) FROM test.t1; + +SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; + +SELECT COUNT(*) FROM test.t2; + +SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; + +SELECT COUNT(*) FROM test.t3; + +SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; + +SELECT COUNT(*) FROM test.t4; + +SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; + +SELECT COUNT(*) FROM test.t5; + +SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; + +SELECT COUNT(*) FROM test.t6; + +SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; + +# Cleanup + +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +DROP TABLE test.t4; +DROP TABLE test.t5; +DROP TABLE test.t6; + +ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; + +ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; + +DROP TABLESPACE table_space1 ENGINE = NDB; + +DROP TABLESPACE table_space2 ENGINE = NDB; + +DROP LOGFILE GROUP log_group1 ENGINE = NDB; + +#End 5.1 test case + + diff --git a/mysql-test/suite/ndb/t/ndb_dd_basic.test b/mysql-test/suite/ndb/t/ndb_dd_basic.test new file mode 100644 index 00000000000..3acf4669868 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_dd_basic.test @@ -0,0 +1,454 @@ +################################# +# Author: JO +# Org Date: ? +# Purpose: To test basic Cluster Disk Data +################################# +# Change Author: JBM +# Change Date: 2006-01-11 +# Change: Cleanup and test rename +################################# +# Change Author: Guangbao Ni +# Change Date: 2007-03-20 +# Change: Test insert data when no datafile in spacetable +################################# + +-- source include/have_ndb.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# some negative tests +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=MYISAM; + +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE = 4M +ENGINE=XYZ; + +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M; + +################################## +# Basic test of disk tables for NDB +# Start by creating a logfile group +################################## + +set storage_engine=ndb; +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M; + +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; + +################################################### +# Create a tablespace connected to the logfile group +################################################### + +set storage_engine=myisam; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; + +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; + +######################################## +# Create a table using this tablespace +######################################## + +CREATE TABLE t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; + +SHOW CREATE TABLE t1; + +INSERT INTO t1 VALUES (0, 0, 0); +SELECT * FROM t1; + +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), +(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), +(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), +(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), +(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), +(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), +(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), +(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), +(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), +(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), +(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), +(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), +(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), +(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), +(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), +(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), +(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), +(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), +(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), +(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), +(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), +(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), +(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), +(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), +(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), +(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), +(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), +(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), +(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), +(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), +(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), +(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), +(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), +(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), +(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), +(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), +(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), +(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), +(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), +(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), +(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), +(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), +(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), +(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), +(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), +(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), +(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), +(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), +(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), +(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), +(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), +(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), +(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), +(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), +(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), +(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), +(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), +(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), +(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), +(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), +(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), +(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), +(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), +(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), +(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), +(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), +(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), +(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), +(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), +(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), +(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), +(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), +(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), +(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), +(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), +(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), +(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), +(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), +(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), +(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), +(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), +(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), +(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), +(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), +(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), +(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), +(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), +(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), +(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), +(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), +(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), +(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); + +SELECT COUNT(*) FROM t1; + +#################################### +# Test error cases with size numbers +#################################### +--error ER_WRONG_SIZE_NUMBER +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'x.dat' +INITIAL_SIZE 10y +ENGINE = NDB; + +--error ER_WRONG_SIZE_NUMBER +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'x.dat' +INITIAL_SIZE 10MB +ENGINE = NDB; + +--error 1064 +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'x.dat' +INITIAL_SIZE 10 MB +ENGINE = NDB; + +--error 1064 +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'x.dat' +INITIAL_SIZE 10 M +ENGINE = NDB; + +--error ER_SIZE_OVERFLOW_ERROR +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'x.dat' +INITIAL_SIZE 1000000000000K +ENGINE = NDB; + +DROP TABLE t1; + +create tablespace ts2 +add datafile 'datafile2_1.dat' +use logfile group lg1 +initial_size 12M +engine ndb; + +CREATE TABLE City ( + ID int(11) NOT NULL AUTO_INCREMENT, + Name char(35) NOT NULL, + CountryCode char(3) NOT NULL, + District char(20) NOT NULL, + Population int(11) NOT NULL, + PRIMARY KEY (ID) +) ENGINE=ndbcluster +tablespace ts2 +storage disk; + +alter tablespace ts2 +drop datafile 'datafile2_1.dat' +engine ndb; + +#It will give error messages: NoDatafile in tablespace +--error ER_GET_ERRMSG +insert +into City (Name,CountryCode,District,Population) +values ('BeiJing','CN','Beijing',2000); + +--error ER_DROP_FILEGROUP_FAILED +drop tablespace ts2 +engine ndb; + +drop table City; + +drop tablespace ts2 +engine ndb; + +############################ +# Test update of mm/dd part +############################ + +CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; +INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); +BEGIN; +UPDATE t1 SET b = '2' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +UPDATE t1 SET c = '2' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +UPDATE t1 SET b = '3' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +COMMIT; +SELECT * FROM t1 ORDER BY 1; +BEGIN; +UPDATE t1 SET c = '3' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +UPDATE t1 SET b = '4' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +UPDATE t1 SET c = '4' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +COMMIT; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET b = '5' WHERE a = 1; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET b = '6' WHERE b = '5'; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET b = '7'WHERE c = '4'; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET c = '5' WHERE a = 1; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET c = '6' WHERE b = '7'; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET c = '7' WHERE c = '6'; +SELECT * FROM t1 ORDER BY 1; +DROP TABLE t1; + +##### + +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB; +INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3'); +BEGIN; +UPDATE t1 SET b = '2' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +UPDATE t1 SET c = '2' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +UPDATE t1 SET b = '3' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +COMMIT; +SELECT * FROM t1 ORDER BY 1; +BEGIN; +UPDATE t1 SET c = '3' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +UPDATE t1 SET b = '4' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +UPDATE t1 SET c = '4' WHERE a = 1; +SELECT b FROM t1 WHERE a = 1; +SELECT * FROM t1 WHERE a = 1; +COMMIT; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET b = '5' WHERE a = 1; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET b = '6' WHERE b = '5'; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET b = '7' WHERE c = '4'; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET c = '5' WHERE a = 1; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET c = '6' WHERE b = '7'; +SELECT * FROM t1 ORDER BY 1; +UPDATE t1 SET c = '7' WHERE c = '6'; +SELECT * FROM t1 ORDER BY 1; +DROP TABLE t1; + +######################## +# Test for blobs... +######################## + +CREATE TABLE t1 ( + a INT NOT NULL PRIMARY KEY, + b TEXT NOT NULL +) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; + +# b1 length 2000+256 (blob part aligned) +######################################### +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +# b2 length 20000 +########################################## +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); + +INSERT INTO t1 VALUES(1,@b1); +INSERT INTO t1 VALUES(2,@b2); +SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1; +SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2; +UPDATE t1 SET b=@b2 WHERE a=1; +UPDATE t1 SET b=@b1 WHERE a=2; +SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1; +SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2; +UPDATE t1 SET b=concat(b,b) WHERE a=1; +UPDATE t1 SET b=concat(b,b) WHERE a=2; +SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1; +SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2; +DELETE FROM t1 WHERE a=1; +DELETE FROM t1 WHERE a=2; +SELECT COUNT(*) FROM t1; +DROP TABLE t1; + +# bug#20612 INS-DEL bug (not pgman bug) +# found via disk data assert but is not pgman or disk data related + +CREATE TABLE t1 ( + a int NOT NULL, + b varchar(4000), -- must use 2 pages undo + PRIMARY KEY using hash (a) +) +TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; + +set autocommit = 0; +insert into t1 values(0,'x'); +insert into t1 values(1,'x'); +insert into t1 values(2,'x'); +insert into t1 values(3,'x'); +insert into t1 values(4,'x'); +insert into t1 values(5,'x'); +insert into t1 values(6,'x'); +insert into t1 values(7,'x'); +insert into t1 values(8,'x'); +delete from t1 where a = 0; +commit; + +delete from t1; +begin; +insert into t1 values (1, 'x'); +select * from t1; +rollback; + +set autocommit = 1; + + +drop table t1; +############################# +# Customer posted order by test case +# Org in ndb_dd_advance.test +############################# + +create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) +TABLESPACE ts1 STORAGE DISK engine=NDB; +insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); +insert into test.t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); +select * from test.t1 order by f1; +select f1,f2 from test.t1 order by f2; +select f2 from test.t1 order by f2; +select f1,f2 from test.t1 order by f1; +drop table test.t1; + +################### +# Test Cleanup +################### + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE = NDB; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile02.dat' +ENGINE = NDB; + +DROP TABLESPACE ts1 +ENGINE = NDB; + +DROP LOGFILE GROUP lg1 +ENGINE =NDB; + +#End 5.1 test case diff --git a/mysql-test/suite/ndb/t/ndb_dd_ddl.test b/mysql-test/suite/ndb/t/ndb_dd_ddl.test new file mode 100644 index 00000000000..aa692385b07 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_dd_ddl.test @@ -0,0 +1,363 @@ +######################################### +# Author: JBM +# Date: 2006-01-03 +# Purpose: Test the NDB engine reaction to duplicate +# Table spaces and log groups. Also to test +# Statement mixed case. +############################################ +# Change Author:JBM +# Change Date 2006-01-19 +# Change: Adding to test cases feedback from OB +# 1) The 'duplicate' tests. +# a) The test is using the default (test) database and is not +# attempting to create databases (only logs, table spaces and +# tables). Is this intentional? +# b) What about a duplication of table name when one exists on disk and +# you are trying to create it again in memory? +# +#2) 'CaSE SensiTiVE' tests +# a) Suggest you include a test case where the case difference is in +# the file name. I know this is not an issue for *nix systems but +# will be when we expand to Windows and Mac. Better put it in now. +############################################ +# +# Jonas 2006-03-10 +# Add verification that ndb currently is limited to 1 logfile group +# + + +-- source include/have_ndb.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP DATABASE IF EXISTS mysqltest; +CREATE DATABASE mysqltest; +--enable_warnings + +############## Duplcate Statement Testing ######### + +--echo **** Begin Duplicate Statement Testing **** + +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 1M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; + +# Verify that one currently can create only 1 logfile group +--error ER_CREATE_FILEGROUP_FAILED +CREATE LOGFILE GROUP lg2 +ADD UNDOFILE 'undofile2.dat' +INITIAL_SIZE 1M +UNDO_BUFFER_SIZE 1M +ENGINE NDB; +SHOW WARNINGS; + +--error ER_CREATE_FILEGROUP_FAILED +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 1M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; + +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE 1M ENGINE NDB; + +--error ER_ALTER_FILEGROUP_FAILED +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE 1M ENGINE=NDB; + +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 1M +ENGINE NDB; + +--error ER_CREATE_FILEGROUP_FAILED +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 1M +ENGINE NDB; + + +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile2.dat' +INITIAL_SIZE 1M +ENGINE=NDB; + +--error ER_ALTER_FILEGROUP_FAILED +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile2.dat' +INITIAL_SIZE 1M +ENGINE=NDB; + +CREATE TABLE mysqltest.t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; + +--error ER_TABLE_EXISTS_ERROR +CREATE TABLE mysqltest.t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; + +--error ER_TABLE_EXISTS_ERROR +CREATE TABLE mysqltest.t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +ENGINE=NDB; + + +DROP TABLE mysqltest.t1; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile2.dat' +ENGINE=NDB; + +--error ER_ALTER_FILEGROUP_FAILED +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile2.dat' +ENGINE=NDB; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; + +--error ER_ALTER_FILEGROUP_FAILED +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; + +DROP TABLESPACE ts1 +ENGINE=NDB; + +--error ER_DROP_FILEGROUP_FAILED +DROP TABLESPACE ts1 +ENGINE=NDB; + +DROP LOGFILE GROUP lg1 +ENGINE=NDB; + +--error ER_DROP_FILEGROUP_FAILED +DROP LOGFILE GROUP lg1 +ENGINE=NDB; + +DROP DATABASE IF EXISTS mysqltest; + +--echo **** End Duplicate Statement Testing **** +############# End Duplicate Statments ############ +--echo +############ Begin CaSe Testing ################## +--echo **** Begin Statment CaSe Testing **** + +creaTE LOgfilE GrOuP lg1 +adD undoFILE 'undofile.dat' +initiAL_siZE 1M +UnDo_BuFfEr_SiZe = 1M +ENGInE=NDb; + +altER LOgFiLE GrOUp lg1 +AdD UnDOfILe 'uNdOfiLe02.daT' +INItIAl_SIzE 1M ENgINE nDB; + +CrEAtE TABLEspaCE ts1 +ADD DATAfilE 'datafile.dat' +UsE LoGFiLE GRoUP lg1 +INITiaL_SizE 1M +ENGiNe NDb; + +AlTeR tAbLeSpAcE ts1 +AdD DaTaFiLe 'dAtAfiLe2.daT' +InItIaL_SiZe 1M +EnGiNe=NDB; + +CREATE TABLE t1 +(pk1 int not null primary key, b int not null, c int not null) +TABLEspace ts1 storAGE dISk +ENGine nDb; + +DROP TABLE t1; + +AlteR TAblespaCE ts1 +droP DATAfile 'dAtAfiLe2.daT' +ENGINE=NDB; + +ALter tablesPACE ts1 +dROp dAtAfIlE 'datafile.dat' +ENGine=Ndb; + +DrOp TaBleSpAcE ts1 +engINE=ndB; + +DrOp lOgFiLe GrOuP lg1 +EnGiNe=nDb; + +--echo **** End Statment CaSe Testing **** +############ End CaSe Testing ################## +--echo +############ Begin = and no = Testing ########## +--echo **** Begin = And No = Testing **** + +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE=1M +UNDO_BUFFER_SIZE=1M +ENGINE=NDB; + +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE=1M +ENGINE=NDB; + +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE=1M +ENGINE=NDB; + +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile2.dat' +INITIAL_SIZE=1M +ENGINE=NDB; + +CREATE TABLE t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; + +DROP TABLE t1; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile2.dat' +ENGINE=NDB; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; + +DROP TABLESPACE ts1 +ENGINE=NDB; + +DROP LOGFILE GROUP lg1 +ENGINE=NDB; + +--echo +--echo **** End of = **** +--echo + +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 1M +UNDO_BUFFER_SIZE 1M +ENGINE NDB; + +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE 1M +ENGINE NDB; + +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 1M +ENGINE NDB; + +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile2.dat' +INITIAL_SIZE 1M +ENGINE NDB; + +--error 1005 +CREATE TABLE t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE MEMORY +ENGINE NDB; + +CREATE TABLE t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE NDB; + + +CREATE INDEX b_i on t1(b); +CREATE INDEX bc_i on t1(b, c); + +DROP TABLE t1; + +# bug#20053 + +CREATE TABLESPACE ts2 +ADD DATAFILE 'datafile3.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 1M +ENGINE NDB; + +--error ER_ALTER_FILEGROUP_FAILED +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile3.dat' +ENGINE NDB; + +--error ER_ALTER_FILEGROUP_FAILED +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile2.dat' +ENGINE NDB; +# bug#20053 + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile2.dat' +ENGINE NDB; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE NDB; + +DROP TABLESPACE ts1 +ENGINE NDB; + +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile3.dat' +ENGINE NDB; + +DROP TABLESPACE ts2 +ENGINE NDB; + +DROP LOGFILE GROUP lg1 +ENGINE NDB; + +--echo **** End = And No = **** +############ End = And No = ################## + +### +# +# bug#16341 +create table t1 (a int primary key) engine = myisam; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--error ER_CREATE_FILEGROUP_FAILED +--eval create logfile group lg1 add undofile '$MYSQLTEST_VARDIR/master-data/test/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb; + +create logfile group lg1 +add undofile 'undofile.dat' +initial_size 1M +undo_buffer_size = 1M +engine=ndb; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--error ER_CREATE_FILEGROUP_FAILED +--eval create tablespace ts1 add datafile '$MYSQLTEST_VARDIR/master-data/test/t1.frm' use logfile group lg1 initial_size 1M engine ndb; + +--error ER_DROP_FILEGROUP_FAILED +drop tablespace ts1 +engine ndb; + +drop logfile group lg1 +engine ndb; + +drop table t1; + + + +# End 5.1 test diff --git a/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test b/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test new file mode 100644 index 00000000000..5975f44e087 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_dd_disk2memory.test @@ -0,0 +1,292 @@ +######################################## +# Author: JBM +# Date: 2006-01-12 +# Purpose: To test using ndb memory and +# disk tables together. +######################################## + +-- source include/have_ndb.inc + +--disable_warnings +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +--enable_warnings + +############ Test Setup Section ############# +-- echo **** Test Setup Section **** + +CREATE LOGFILE GROUP log_group1 +ADD UNDOFILE './log_group1/undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; + +CREATE TABLESPACE table_space1 +ADD DATAFILE './table_space1/datafile.dat' +USE LOGFILE GROUP log_group1 +INITIAL_SIZE 12M +ENGINE NDB; + + +CREATE TABLE test.t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE table_space1 STORAGE DISK +ENGINE=NDB; + +CREATE TABLE test.t2 +(pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL) +ENGINE=NDB; + +--echo +##################### Data load for first test #################### +--echo **** Data load for first test **** + +INSERT INTO test.t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), +(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), +(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), +(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), +(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), +(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), +(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); + + +INSERT INTO test.t2 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), +(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), +(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), +(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), +(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), +(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), +(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); + +--echo +##################### Test 1 Section Begins ############### +--echo *** Test 1 Section Begins *** +SELECT COUNT(*) FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); +SELECT * FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); +SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 WHERE b IN (4); +SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2 WHERE pk1 IN (75); +SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; +--echo +####################### Test 1 Section End ################ + +##################### Setup for test 2 #################### +--echo *** Setup for test 2 **** +DELETE FROM test.t1; +INSERT INTO test.t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45); +--echo +############################# Test Section 2 ############### +--echo **** Test Section 2 **** +SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; +SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2; +SELECT COUNT(*) FROM test.t1 RIGHT JOIN test.t2 ON b=b2; +SHOW CREATE TABLE test.t2; +SHOW CREATE TABLE test.t1; +ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK +ENGINE=NDB; +SHOW CREATE TABLE test.t2; +ALTER TABLE test.t1 STORAGE MEMORY ENGINE=NDBCLUSTER; +SHOW CREATE TABLE test.t1; +--echo +######################### End Test Section 2 ################# +DROP TABLE test.t1; +DROP TABLE test.t2; +##################### Setup for Test Section 3 ############### +--echo *** Setup for Test Section 3 *** +CREATE TABLE test.t1 ( + usr_id INT unsigned NOT NULL, + uniq_id INT unsigned NOT NULL AUTO_INCREMENT, + start_num INT unsigned NOT NULL DEFAULT 1, + increment INT unsigned NOT NULL DEFAULT 1, + PRIMARY KEY (uniq_id), + INDEX usr_uniq_idx (usr_id, uniq_id), + INDEX uniq_usr_idx (uniq_id, usr_id)) +TABLESPACE table_space1 STORAGE DISK +ENGINE=NDB; + + +CREATE TABLE test.t2 ( + id INT unsigned NOT NULL DEFAULT 0, + usr2_id INT unsigned NOT NULL DEFAULT 0, + max INT unsigned NOT NULL DEFAULT 0, + c_amount INT unsigned NOT NULL DEFAULT 0, + d_max INT unsigned NOT NULL DEFAULT 0, + d_num INT unsigned NOT NULL DEFAULT 0, + orig_time INT unsigned NOT NULL DEFAULT 0, + c_time INT unsigned NOT NULL DEFAULT 0, + active ENUM ("no","yes") NOT NULL, + PRIMARY KEY (id,usr2_id), + INDEX id_idx (id), + INDEX usr2_idx (usr2_id)) +ENGINE=NDB; + +INSERT INTO test.t1 VALUES (3,NULL,0,50),(3,NULL,0,200),(3,NULL,0,25),(3,NULL,0,84676),(3,NULL,0,235),(3,NULL,0,10),(3,NULL,0,3098),(3,NULL,0,2947),(3,NULL,0,8987),(3,NULL,0,8347654),(3,NULL,0,20398),(3,NULL,0,8976),(3,NULL,0,500),(3,NULL,0,198); + +--echo +###################### Test Section 3 ###################### +--echo **** Test Section 3 **** +SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, +test.t2.usr2_id,test.t2.c_amount,test.t2.max +FROM test.t1 +LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id +WHERE test.t1.uniq_id = 4 +ORDER BY test.t2.c_amount; + +INSERT INTO test.t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); +INSERT INTO test.t2 VALUES (4,3,3000,6000,0,0,746584,837484,'yes'); +INSERT INTO test.t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes'); + +SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, +test.t2.usr2_id,test.t2.c_amount,test.t2.max +FROM test.t1 +LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id +WHERE test.t1.uniq_id = 4 +ORDER BY test.t2.c_amount; +--echo +####################### End Section 3 ######################### +DROP TABLE test.t1; +DROP TABLE test.t2; + +########## Test that use to be in ndb_dd_advance.test ######### +########## ndb_dd_advance.test is now ndb_dd_alter.test ####### +#### Use group by asc and dec; Use having; Use order by. #### + +CREATE TABLE test.t1 ( + a1 smallint NOT NULL, + a2 int NOT NULL, + a3 bigint NOT NULL, + a4 char(10), + a5 decimal(5,1), + a6 time, + a7 date, + a8 datetime, + a9 VARCHAR(255), + a10 blob, + PRIMARY KEY(a1) +) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; + +CREATE TABLE test.t2 ( + b1 smallint NOT NULL, + b2 int NOT NULL, + b3 bigint NOT NULL, + b4 char(10), + b5 decimal(5,1), + b6 time, + b7 date, + b8 datetime, + b9 VARCHAR(255), + b10 blob, + PRIMARY KEY(b1) +) ENGINE=NDB; + +### ADD Some DATA to tables ###### + + +let $1=20; +disable_query_log; +while ($1) +{ + eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); + eval insert into test.t2 values($1+2, $1+3, $1+3000000000, "aaa$1", 35.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); + dec $1; +} + +ALTER TABLE test.t1 ADD INDEX (a2), ADD INDEX (a3), ADD INDEX (a8); +ALTER TABLE test.t2 ADD INDEX (b2), ADD INDEX (b3), ADD INDEX (b8); +SHOW CREATE TABLE test.t1; +SHOW CREATE TABLE test.t2; +SELECT * FROM test.t1 order by a1; +SELECT * FROM test.t2 order by b1; +SELECT COUNT(a1), a1, COUNT(a1)*a1 FROM test.t1 GROUP BY a1; +SELECT COUNT(a2), (a2+1), COUNT(a2)*(a2+0) FROM test.t1 GROUP BY a2; + +DROP TABLE test.t1; +DROP TABLE test.t2; + +CREATE TABLE test.t1 (a INT NOT NULL, +b CHAR(5), c TEXT, d INT NOT NULL PRIMARY KEY) TABLESPACE +table_space1 STORAGE DISK ENGINE=NDB; + +insert into test.t1 (a,b,c,d) values (1,'a','Jonas',1),(2,'b','Tomas',2), +(3,'c','Pekka',3),(4,'d','Martin',4),(5,'e','Stewart',5),(6,'f','Jeb',6), +(7,'g','Serge',7),(8,'h','Clavin',8); +select distinct a from test.t1 group by b,a having a > 4 order by a desc; +select distinct a,c from test.t1 group by b,c,a having a > 2 order by a desc; +select distinct a from test.t1 group by b,a having a > 1 order by a asc; +select distinct a,c from test.t1 group by b,c,a having a > 3 order by a asc; +drop table test.t1; + +create table test.t1 (a char(1), key(a)) TABLESPACE table_space1 +STORAGE DISK ENGINE=NDB; +insert into test.t1 values('1'),('1'),('1'),('2'),('2'),('3'),('3'); +select * from test.t1 where a >= '1' order by a; +select distinct a from test.t1 order by a desc; +select distinct a from test.t1 where a >= '1' order by a desc; +select distinct a from test.t1 where a >= '1' order by a asc; +drop table test.t1; + +CREATE TABLE test.t1 (email varchar(50), infoID BIGINT, dateentered DATETIME) +TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; +CREATE TABLE test.t2 (infoID BIGINT, shipcode varchar(10)) ENGINE=NDB; + +INSERT INTO test.t1 (email, infoID, dateentered) VALUES + ('test1@testdomain.com', 1, '2002-07-30 22:56:38'), + ('test1@testdomain.com', 1, '2002-07-27 22:58:16'), + ('test2@testdomain.com', 1, '2002-06-19 15:22:19'), + ('test2@testdomain.com', 2, '2002-06-18 14:23:47'), + ('test3@testdomain.com', 1, '2002-05-19 22:17:32'); + +INSERT INTO test.t2(infoID, shipcode) VALUES + (1, 'Z001'), + (2, 'R002'); + +SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2 +WHERE t1.infoID=t2.infoID order by email, shipcode; +SELECT DISTINCTROW email FROM test.t1 ORDER BY dateentered DESC; +SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2 +WHERE test.t1.infoID=test.t2.infoID ORDER BY dateentered DESC; + +DROP TABLE test.t1,test.t2; + +################# +# Test Cleanup +################# + +ALTER TABLESPACE table_space1 +DROP DATAFILE './table_space1/datafile.dat' +ENGINE = NDB; + +DROP TABLESPACE table_space1 +ENGINE = NDB; + +DROP LOGFILE GROUP log_group1 +ENGINE =NDB; + +#End 5.1 test case + diff --git a/mysql-test/suite/ndb/t/ndb_dd_dump.test b/mysql-test/suite/ndb/t/ndb_dd_dump.test new file mode 100644 index 00000000000..38ceafb7d80 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_dd_dump.test @@ -0,0 +1,288 @@ +-- source include/have_ndb.inc + +--disable_warnings +DROP TABLE IF EXISTS t1, t2, t3; +--enable_warnings + +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile_lg1_01.dat' +INITIAL_SIZE 2M +UNDO_BUFFER_SIZE = 1M +ENGINE NDB; + +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile_lg1_02.dat' +INITIAL_SIZE = 4M +ENGINE NDB; + +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile_ts1_01.dat' +USE LOGFILE GROUP lg1 +EXTENT_SIZE 1M +INITIAL_SIZE 2M +ENGINE NDB; + +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile_ts1_02.dat' +INITIAL_SIZE = 1M +ENGINE=NDB; + +CREATE TABLESPACE ts2 +ADD DATAFILE 'datafile_ts2_01.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 2M +ENGINE NDB; + +CREATE TABLESPACE ts3 +ADD DATAFILE 'datafile_ts3_01.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 4M +ENGINE NDB; + +######################################## +# Create a table using this tablespace +######################################## + +CREATE TABLE t1 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; + +CREATE TABLE t2 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts2 STORAGE DISK +ENGINE=NDB; + +CREATE TABLE t3 +(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) +TABLESPACE ts3 STORAGE DISK +ENGINE=NDB; + +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), +(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), +(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), +(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), +(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), +(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), +(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), +(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), +(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), +(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), +(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), +(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), +(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), +(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), +(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), +(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), +(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), +(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), +(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), +(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), +(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), +(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), +(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), +(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), +(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), +(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), +(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), +(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), +(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), +(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), +(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), +(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), +(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), +(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), +(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), +(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), +(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), +(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), +(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), +(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), +(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), +(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), +(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), +(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), +(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), +(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), +(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), +(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), +(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), +(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), +(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), +(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), +(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), +(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), +(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), +(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), +(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), +(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), +(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), +(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), +(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), +(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), +(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), +(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), +(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), +(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), +(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), +(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), +(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), +(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), +(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), +(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), +(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), +(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), +(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), +(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), +(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), +(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), +(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), +(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), +(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), +(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), +(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), +(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), +(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), +(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), +(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), +(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), +(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), +(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), +(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), +(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); + +INSERT INTO t2 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); + +INSERT INTO t3 VALUES +(1,1,1); + +--exec $MYSQL_DUMP --skip-comments --compact -Y test > $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql + +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile_ts1_01.dat' +ENGINE = NDB; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile_ts1_02.dat' +ENGINE = NDB; + +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile_ts2_01.dat' +ENGINE = NDB; + +ALTER TABLESPACE ts3 +DROP DATAFILE 'datafile_ts3_01.dat' +ENGINE = NDB; + +DROP TABLESPACE ts1 ENGINE = NDB; +DROP TABLESPACE ts2 ENGINE = NDB; +DROP TABLESPACE ts3 ENGINE = NDB; + +DROP LOGFILE GROUP lg1 ENGINE = NDB; + +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql + +SELECT DISTINCT + LOGFILE_GROUP_NAME, + FILE_NAME, + TOTAL_EXTENTS, + INITIAL_SIZE, + ENGINE +FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME; + +SELECT DISTINCT + TABLESPACE_NAME, + LOGFILE_GROUP_NAME, + FILE_NAME, + EXTENT_SIZE, + INITIAL_SIZE, + ENGINE +FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME; + +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; +SELECT COUNT(*) FROM t3; + +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; + +#### BUG 18856 test case comented out +##### Use "SELECT * INTO OUTFILE" to dump data and "LOAD DATA INFILE" to load ##### data back to the data file. + +#CREATE TABLE test.t ( +# a smallint NOT NULL, +# b int NOT NULL, +# c bigint NOT NULL, +# d char(10), +# e TEXT, +# f VARCHAR(255), +# PRIMARY KEY(a) +#) TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + +# ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f); +# SHOW CREATE TABLE test.t; + +# insert records into tables + +# let $1=100; +# disable_query_log; +# while ($1) +# { +# eval insert into test.t values($1, $1+1, $1+2, "aaa$1", "bbb$1", "ccccc$1"); +# dec $1; +# } +# enable_query_log; + +# SELECT * FROM test.t order by a; + +# SELECT * INTO OUTFILE 't_backup' FROM test.t; +# TRUNCATE test.t; + +#'TRUNCATE test.t' failed: 1205: Lock wait timeout exceeded; try restarting #transaction. TABLESPACE ts STORAGE DISK ENGINE=NDB; + +# SELECT count(*) FROM test.t; +# LOAD DATA INFILE 't_backup' INTO TABLE test.t; + +# SELECT * FROM test.t order by a; + +# DROP TABLE test.t; + + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile_ts1_01.dat' +ENGINE = NDB; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile_ts1_02.dat' +ENGINE = NDB; + +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile_ts2_01.dat' +ENGINE = NDB; + +ALTER TABLESPACE ts3 +DROP DATAFILE 'datafile_ts3_01.dat' +ENGINE = NDB; + +DROP TABLESPACE ts1 ENGINE = NDB; +DROP TABLESPACE ts2 ENGINE = NDB; +DROP TABLESPACE ts3 ENGINE = NDB; + +DROP LOGFILE GROUP lg1 ENGINE = NDB; + +#End 5.1 test case diff --git a/mysql-test/suite/ndb/t/ndb_dd_sql_features.test b/mysql-test/suite/ndb/t/ndb_dd_sql_features.test new file mode 100644 index 00000000000..f46cb217ab4 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_dd_sql_features.test @@ -0,0 +1,551 @@ +############################################################## +# Author: Nikolay +# Date: 2006-04-01 +# Purpose: Specific Blob and Varchar testing using disk tables. +############################################################## +# Create Stored procedures that use disk based tables. +# Create function that operate on disk based tables. +# Create triggers that operate on disk based tables. +# Create views that operate on disk based tables. +# Try to create FK constraints on disk based tables. +# Create and use disk based table that use auto inc. +# Create test that use transaction (commit, rollback) +# Create large disk base table, do random queries, check cache hits, +# do same query 10 times check cache hits. +# Create test that uses COUNT(), SUM(), MAX(), MIN(), +# NOW(), USER(), ... other built in # SQL functions +# Create test that uses locks. +# Create test using truncate. +############################################################## +# Author: Jonathan +# Date: 2006-08-28 +# Change: Remove all the create and drop LFG and TS except +# The first create and the last drop to make test +# run faster. +# In addition, renamed test to be to a name that +# gives a better idea of what the test is about +########################################################### +-- source include/have_ndb.inc + +--disable_warnings +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +--enable_warnings + +#### Copy data from table in one table space to table in ### +#### different table space. #### +--echo ***** +--echo **** Copy data from table in one table space to table +--echo **** in different table space +--echo ***** + + CREATE LOGFILE GROUP lg + ADD UNDOFILE './lg_group/undofile.dat' + INITIAL_SIZE 16M + UNDO_BUFFER_SIZE = 1M + ENGINE=NDB; + + CREATE TABLESPACE ts1 + ADD DATAFILE './table_space1/datafile.dat' + USE LOGFILE GROUP lg + INITIAL_SIZE 25M + ENGINE NDB; + + CREATE TABLESPACE ts2 + ADD DATAFILE './table_space2/datafile.dat' + USE LOGFILE GROUP lg + INITIAL_SIZE 20M + ENGINE NDB; + + CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) + TABLESPACE ts2 STORAGE DISK ENGINE=NDB; + + SHOW CREATE TABLE test.t1; + SHOW CREATE TABLE test.t2; + + INSERT INTO test.t1 VALUES (1,'111111','aaaaaaaa'); + INSERT INTO test.t1 VALUES (2,'222222','bbbbbbbb'); + SELECT * FROM test.t1 ORDER BY a1; + INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; + SELECT * FROM test.t2 ORDER BY a1; + + DROP TABLE test.t1, test.t2; + + # populate BLOB field with large data + +set @vc1 = repeat('a', 200); +set @vc2 = repeat('b', 500); +set @vc3 = repeat('c', 1000); +set @vc4 = repeat('d', 4000); + +# x0 size 256 +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); + +# b1 length 2000+256 +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +# d1 length 3000 +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); + +# b2 length 20000 +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +# d2 length 30000 +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); + +select length(@x0),length(@b1),length(@d1) from dual; +select length(@x0),length(@b2),length(@d2) from dual; + + CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) + TABLESPACE ts2 STORAGE DISK ENGINE=NDB; + + SHOW CREATE TABLE test.t1; + SHOW CREATE TABLE test.t2; + + INSERT INTO test.t1 VALUES (1,@vc1,@d1); + INSERT INTO test.t1 VALUES (2,@vc2,@b1); + INSERT INTO test.t1 VALUES (3,@vc3,@d2); + INSERT INTO test.t1 VALUES (4,@vc4,@b2); + + SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) + FROM test.t1 WHERE a1=1; + SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) + FROM test.t1 where a1=2; + + INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; + SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) + FROM test.t2 WHERE a1=1; + SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) + FROM test.t2 where a1=2; + + + DROP TABLE test.t1, test.t2; + +#### Insert, Update, Delete from NDB table with BLOB fields #### +--echo ***** +--echo **** Insert, Update, Delete from NDB table with BLOB fields +--echo ***** + +set @vc1 = repeat('a', 200); +set @vc2 = repeat('b', 500); +set @vc3 = repeat('c', 1000); +set @vc4 = repeat('d', 4000); +set @vc5 = repeat('d', 5000); + +set @bb1 = repeat('1', 2000); +set @bb2 = repeat('2', 5000); +set @bb3 = repeat('3', 10000); +set @bb4 = repeat('4', 40000); +set @bb5 = repeat('5', 50000); + +select length(@vc1),length(@vc2),length(@vc3),length(@vc4),length(@vc5) +from dual; +select length(@bb1),length(@bb2),length(@bb3),length(@bb4),length(@bb5) +from dual; + + CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +# CREATE TABLE test.t2 (a1 int NOT NULL, a2 VARCHAR(5000), a3 BLOB) +# TABLESPACE ts2 STORAGE DISK ENGINE=NDB; + + INSERT INTO test.t1 VALUES (1,@vc1,@bb1); + INSERT INTO test.t1 VALUES (2,@vc2,@bb2); + INSERT INTO test.t1 VALUES (3,@vc3,@bb3); + INSERT INTO test.t1 VALUES (4,@vc4,@bb4); + INSERT INTO test.t1 VALUES (5,@vc5,@bb5); + + UPDATE test.t1 SET a2=@vc5, a3=@bb5 WHERE a1=1; + SELECT a1,length(a2),substr(a2,4998,2),length(a3),substr(a3,49997,3) + FROM test.t1 WHERE a1=1; + + UPDATE test.t1 SET a2=@vc4, a3=@bb4 WHERE a1=2; + SELECT a1,length(a2),substr(a2,3998,2),length(a3),substr(a3,39997,3) + FROM test.t1 WHERE a1=2; + + UPDATE test.t1 SET a2=@vc2, a3=@bb2 WHERE a1=3; + SELECT a1,length(a2),substr(a2,498,2),length(a3),substr(a3,3997,3) + FROM test.t1 WHERE a1=3; + + UPDATE test.t1 SET a2=@vc3, a3=@bb3 WHERE a1=4; + SELECT a1,length(a2),substr(a2,998,2),length(a3),substr(a3,9997,3) + FROM test.t1 WHERE a1=4; + + UPDATE test.t1 SET a2=@vc1, a3=@bb1 WHERE a1=5; + SELECT a1,length(a2),substr(a2,198,2),length(a3),substr(a3,1997,3) + FROM test.t1 WHERE a1=5; + + DELETE FROM test.t1 where a1=5; + SELECT count(*) from test.t1; + DELETE FROM test.t1 where a1=4; + SELECT count(*) from test.t1; + DELETE FROM test.t1 where a1=3; + SELECT count(*) from test.t1; + DELETE FROM test.t1 where a1=2; + SELECT count(*) from test.t1; + DELETE FROM test.t1 where a1=1; + SELECT count(*) from test.t1; + + DROP TABLE test.t1; + +##### Create Stored procedures that use disk based tables ##### +--echo ***** +--echo **** Create Stored procedures that use disk based tables +--echo ***** + +delimiter //; + CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB// + CREATE PROCEDURE test.sp1() + BEGIN + INSERT INTO test.t1 values (1,'111111','aaaaaaaa'); + END// +delimiter ;// + + CALL test.sp1(); + SELECT * FROM test.t1; + +delimiter //; + CREATE PROCEDURE test.sp2(n INT, vc VARCHAR(256), blb BLOB) + BEGIN + UPDATE test.t1 SET a2=vc, a3=blb where a1=n; + END// +delimiter ;// + + CALL test.sp2(1,'222222','bbbbbbbb'); + SELECT * FROM test.t1; + + DELETE FROM test.t1; + DROP PROCEDURE test.sp1; + DROP PROCEDURE test.sp2; + DROP TABLE test.t1; + + +#### Create function that operate on disk based tables #### +--echo ***** +--echo ***** Create function that operate on disk based tables +--echo ***** + + CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + let $1=100; + disable_query_log; + while ($1) + { + eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1"); + dec $1; + } + enable_query_log; + + delimiter //; + CREATE FUNCTION test.fn1(n INT) RETURNS INT + BEGIN + DECLARE v INT; + SELECT a1 INTO v FROM test.t1 WHERE a1=n; + RETURN v; + END// + delimiter ;// + +delimiter //; + CREATE FUNCTION test.fn2(n INT, blb BLOB) RETURNS BLOB + BEGIN + DECLARE vv BLOB; + UPDATE test.t1 SET a3=blb where a1=n; + SELECT a3 INTO vv FROM test.t1 WHERE a1=n; + RETURN vv; + END// + delimiter ;// + + SELECT test.fn1(10) FROM DUAL; + SELECT test.fn2(50, 'new BLOB content') FROM DUAL; + + DELETE FROM test.t1; + DROP FUNCTION test.fn1; + DROP FUNCTION test.fn2; + DROP TABLE test.t1; + +#### Create triggers that operate on disk based tables #### +--echo ***** +--echo ***** Create triggers that operate on disk based tables +--echo ***** + + CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + + delimiter //; + CREATE TRIGGER test.trg1 BEFORE INSERT ON test.t1 FOR EACH ROW + BEGIN + if isnull(new.a2) then + set new.a2:= 'trg1 works on a2 field'; + end if; + if isnull(new.a3) then + set new.a3:= 'trg1 works on a3 field'; + end if; + end// + insert into test.t1 (a1) values (1)// + insert into test.t1 (a1,a2) values (2, 'ccccccc')// + select * from test.t1 order by a1// + delimiter ;// + + DELETE FROM test.t1; + DROP TRIGGER test.trg1; + DROP TABLE test.t1; + +#### Create, update views that operate on disk based tables #### +--echo ***** +--echo ***** Create, update views that operate on disk based tables +--echo ***** + + + CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + let $1=10; + disable_query_log; + while ($1) + { + eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1"); + dec $1; + } + enable_query_log; + CREATE VIEW test.v1 AS SELECT * FROM test.t1; + SELECT * FROM test.v1 order by a1; + CHECK TABLE test.v1, test.t1; + + UPDATE test.v1 SET a2='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' WHERE a1=5; + SELECT * FROM test.v1 order by a1; + + DROP VIEW test.v1; + DELETE FROM test.t1; + DROP TABLE test.t1; + +#### Create and use disk based table that use auto inc #### +--echo ***** +--echo ***** Create and use disk based table that use auto inc +--echo ***** + + CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + a2 VARCHAR(256), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + let $1=10; + disable_query_log; + while ($1) + { + eval insert into test.t1 values(NULL, "aaaaa$1", "bbbbb$1"); + dec $1; + } + enable_query_log; + SELECT * FROM test.t1 ORDER BY a1; + DELETE FROM test.t1; + DROP TABLE test.t1; + + +#### Create test that use transaction (commit, rollback) #### +--echo ***** +--echo ***** Create test that use transaction (commit, rollback) +--echo ***** + + SET AUTOCOMMIT=0; + CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + a2 VARCHAR(256), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + + INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); + COMMIT; + SELECT * FROM test.t1 ORDER BY a1; + INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); + ROLLBACK; + SELECT * FROM test.t1 ORDER BY a1; + + DELETE FROM test.t1; + DROP TABLE test.t1; + SET AUTOCOMMIT=1; + +# Now do the same thing with START TRANSACTION without using AUTOCOMMIT. + + CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + a2 VARCHAR(256), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + + START TRANSACTION; + INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); + COMMIT; + SELECT * FROM test.t1 ORDER BY a1; + + START TRANSACTION; + INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); + ROLLBACK; + SELECT * FROM test.t1 ORDER BY a1; + + DELETE FROM test.t1; + DROP TABLE test.t1; + +#### Create test that uses locks #### +--echo ***** +--echo ***** Create test that uses locks +--echo ***** + + connect (con1,localhost,root,,); + connect (con2,localhost,root,,); + +# connection con1; +--disable_warnings + drop table if exists test.t1; + CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + a2 VARCHAR(256), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; +--enable_warnings + + LOCK TABLES test.t1 write; + INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); + INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); + SELECT * FROM test.t1 ORDER BY a1; + + connection con2; + SELECT * FROM test.t1 ORDER BY a1; + INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); + + connection con1; + UNLOCK TABLES; + + connection con2; + INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); + SELECT * FROM test.t1 ORDER BY a1; + DELETE FROM test.t1; + DROP TABLE test.t1; + + #connection defualt; + +#### Create large disk base table, do random queries, check cache hits #### +--echo ***** +--echo ***** Create large disk base table, do random queries, check cache hits +--echo ***** + +set @vc1 = repeat('a', 200); +SELECT @vc1 FROM DUAL; +set @vc2 = repeat('b', 500); +set @vc3 = repeat('b', 998); + +# x0 size 256 +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); + +# b1 length 2000+256 (blob part aligned) +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +# d1 length 3000 +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); + +# b2 length 20000 +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +# d2 length 30000 +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); + +select length(@x0),length(@b1),length(@d1) from dual; +select length(@x0),length(@b2),length(@d2) from dual; + + CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(1000), a3 BLOB) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + + INSERT INTO test.t1 values(1,@vc1,@d1); + INSERT INTO test.t1 values(2,@vc2,@d2); + --replace_column 9 # + explain SELECT * from test.t1 WHERE a1 = 1; + + SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) + FROM test.t1 WHERE a1=1 ORDER BY a1; + SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) + FROM test.t1 where a1=2 ORDER BY a1; + + UPDATE test.t1 set a2=@vc2,a3=@d2 where a1=1; + UPDATE test.t1 set a2=@vc1,a3=@d1 where a1=2; + + SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) + FROM test.t1 where a1=1; + SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) + FROM test.t1 where a1=2; + + #SHOW VARIABLES LIKE 'have_query_cache'; + #SHOW STATUS LIKE 'Qcache%'; + + DELETE FROM test.t1; + DROP TABLE test.t1; + +#### Create test that uses COUNT(), SUM(), MAX(), #### +##### MIN(), NOW(), USER(), TRUNCATE #### +--echo ***** +--echo ***** Create test that uses COUNT(), SUM(), MAX(), MIN(), NOW(), +--echo ***** USER(), TRUNCATE +--echo ***** + + CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), + a3 BLOB, a4 DATE, a5 CHAR(250)) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB; + let $1=100; + disable_query_log; + while ($1) + { + eval insert into test.t1 values($1, "aaaaaaaaaaaaaaaa$1", + "bbbbbbbbbbbbbbbbbb$1", '2006-06-20' , USER()); + dec $1; + } + enable_query_log; + + SELECT COUNT(*) from test.t1; + SELECT SUM(a1) from test.t1; + SELECT MIN(a1) from test.t1; + SELECT MAX(a1) from test.t1; + SELECT a5 from test.t1 where a1=50; + + + SELECT * from test.t1 order by a1; + + DROP TABLE test.t1; + + ALTER TABLESPACE ts1 + DROP DATAFILE './table_space1/datafile.dat' + ENGINE=NDB; + DROP TABLESPACE ts1 ENGINE=NDB; + + ALTER TABLESPACE ts2 + DROP DATAFILE './table_space2/datafile.dat' + ENGINE=NDB; + DROP TABLESPACE ts2 ENGINE=NDB; + + DROP LOGFILE GROUP lg + ENGINE=NDB; + + +#End 5.1 test case + diff --git a/mysql-test/suite/ndb/t/ndb_gis.test b/mysql-test/suite/ndb/t/ndb_gis.test new file mode 100644 index 00000000000..e14f462c32d --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_gis.test @@ -0,0 +1,5 @@ +--source include/have_ndb.inc +SET storage_engine=ndbcluster; +--source include/gis_generic.inc +set engine_condition_pushdown = on; +--source include/gis_generic.inc diff --git a/mysql-test/suite/ndb/t/ndb_grant.later b/mysql-test/suite/ndb/t/ndb_grant.later new file mode 100644 index 00000000000..5431d94e1f8 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_grant.later @@ -0,0 +1,385 @@ +-- source include/have_ndb.inc +# Test of GRANT commands + +# Cleanup +--disable_warnings +drop table if exists t1; +--enable_warnings + +SET NAMES binary; + +# +# Alter mysql system tables to ndb +# make sure you alter all back in the end +# +use mysql; +alter table columns_priv engine=ndb; +alter table db engine=ndb; +alter table func engine=ndb; +alter table help_category engine=ndb; +alter table help_keyword engine=ndb; +alter table help_relation engine=ndb; +alter table help_topic engine=ndb; +alter table host engine=ndb; +alter table tables_priv engine=ndb; +alter table time_zone engine=ndb; +alter table time_zone_leap_second engine=ndb; +alter table time_zone_name engine=ndb; +alter table time_zone_transition engine=ndb; +alter table time_zone_transition_type engine=ndb; +alter table user engine=ndb; +use test; + +# +# Test that SSL options works properly +# +delete from mysql.user where user='mysqltest_1'; +delete from mysql.db where user='mysqltest_1'; +flush privileges; +begin; +grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; +commit; +show grants for mysqltest_1@localhost; +begin; +grant delete on mysqltest.* to mysqltest_1@localhost; +commit; +select * from mysql.user where user="mysqltest_1"; +show grants for mysqltest_1@localhost; +begin; +revoke delete on mysqltest.* from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +begin; +grant select on mysqltest.* to mysqltest_1@localhost require NONE; +commit; +show grants for mysqltest_1@localhost; +begin; +grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB"; +commit; +show grants for mysqltest_1@localhost; +begin; +revoke all privileges on mysqltest.* from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +delete from mysql.user where user='mysqltest_1'; +flush privileges; + +# +# Test that the new db privileges are stored/retrieved correctly +# + +begin; +grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +flush privileges; +show grants for mysqltest_1@localhost; +begin; +revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +begin; +grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; +commit; +flush privileges; +show grants for mysqltest_1@localhost; +begin; +revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +begin; +revoke all privileges on mysqltest.* from mysqltest_1@localhost; +commit; +delete from mysql.user where user='mysqltest_1'; +flush privileges; +begin; +grant usage on test.* to mysqltest_1@localhost with grant option; +commit; +show grants for mysqltest_1@localhost; +delete from mysql.user where user='mysqltest_1'; +delete from mysql.db where user='mysqltest_1'; +delete from mysql.tables_priv where user='mysqltest_1'; +delete from mysql.columns_priv where user='mysqltest_1'; +flush privileges; +--error 1141 +show grants for mysqltest_1@localhost; + +# +# Test what happens when you have same table and colum level grants +# + +create table t1 (a int); +begin; +GRANT select,update,insert on t1 to mysqltest_1@localhost; +GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; +begin; +REVOKE select (a), update on t1 from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +begin; +REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +begin; +GRANT select,references on t1 to mysqltest_1@localhost; +commit; +select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; +begin; +grant all on test.* to mysqltest_3@localhost with grant option; +revoke all on test.* from mysqltest_3@localhost; +commit; +show grants for mysqltest_3@localhost; +begin; +revoke grant option on test.* from mysqltest_3@localhost; +commit; +show grants for mysqltest_3@localhost; +begin; +grant all on test.t1 to mysqltest_2@localhost with grant option; +revoke all on test.t1 from mysqltest_2@localhost; +commit; +show grants for mysqltest_2@localhost; +begin; +revoke grant option on test.t1 from mysqltest_2@localhost; +commit; +show grants for mysqltest_2@localhost; +delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; +delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; +delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; +delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; +flush privileges; +drop table t1; + +# +# Test some error conditions +# +begin; +--error 1221 +GRANT FILE on mysqltest.* to mysqltest_1@localhost; +commit; +select 1; -- To test that the previous command didn't cause problems + +# +# Bug#6123: GRANT USAGE inserts useless Db row +# +create database mysqltest1; +begin; +grant usage on mysqltest1.* to test6123 identified by 'magic123'; +commit; +select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; +delete from mysql.user where user='test6123'; +drop database mysqltest1; + +# +# Test for 'drop user', 'revoke privileges, grant' +# + +create table t1 (a int); +begin; +grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; +commit; +show grants for drop_user2@localhost; +begin; +revoke all privileges, grant option from drop_user2@localhost; +commit; +drop user drop_user2@localhost; + +begin; +grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION; +grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION; +grant select(a) on test.t1 to drop_user@localhost; +commit; +show grants for drop_user@localhost; + +# +# Bug3086 +# +set sql_mode=ansi_quotes; +show grants for drop_user@localhost; +set sql_mode=default; + +set sql_quote_show_create=0; +show grants for drop_user@localhost; +set sql_mode="ansi_quotes"; +show grants for drop_user@localhost; +set sql_quote_show_create=1; +show grants for drop_user@localhost; +set sql_mode=""; +show grants for drop_user@localhost; + +revoke all privileges, grant option from drop_user@localhost; +show grants for drop_user@localhost; +drop user drop_user@localhost; +begin; +--error 1269 +revoke all privileges, grant option from drop_user@localhost; +commit; + +begin; +grant select(a) on test.t1 to drop_user1@localhost; +commit; +flush privileges; +begin; +grant select on test.t1 to drop_user2@localhost; +grant select on test.* to drop_user3@localhost; +grant select on *.* to drop_user4@localhost; +commit; +flush privileges; +# Drop user now implicitly revokes all privileges. +drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, +drop_user4@localhost; +begin; +--error 1269 +revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, +drop_user3@localhost, drop_user4@localhost; +commit; +flush privileges; +#--error 1268 +drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, +drop_user4@localhost; +drop table t1; +begin; +grant usage on *.* to mysqltest_1@localhost identified by "password"; +grant select, update, insert on test.* to mysqltest_1@localhost; +commit; +show grants for mysqltest_1@localhost; +drop user mysqltest_1@localhost; + +# +# Bug #3403 Wrong encodin in SHOW GRANTS output +# +SET NAMES koi8r; +CREATE DATABASE ÂÄ; +USE ÂÄ; +CREATE TABLE ÔÁ (ËÏÌ int); + +begin; +GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost; +commit; +SHOW GRANTS FOR ÀÚÅÒ@localhost; +begin; +REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost; +commit; + +begin; +GRANT SELECT ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; +commit; +SHOW GRANTS FOR ÀÚÅÒ@localhost; +begin; +REVOKE SELECT ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; +commit; + +begin; +GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; +commit; +SHOW GRANTS FOR ÀÚÅÒ@localhost; +begin; +REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; +commit; + +DROP DATABASE ÂÄ; +SET NAMES latin1; + +# +# Bug #5831: REVOKE ALL PRIVILEGES, GRANT OPTION does not revoke everything +# +USE test; +CREATE TABLE t1 (a int ); +CREATE TABLE t2 LIKE t1; +CREATE TABLE t3 LIKE t1; +CREATE TABLE t4 LIKE t1; +CREATE TABLE t5 LIKE t1; +CREATE TABLE t6 LIKE t1; +CREATE TABLE t7 LIKE t1; +CREATE TABLE t8 LIKE t1; +CREATE TABLE t9 LIKE t1; +CREATE TABLE t10 LIKE t1; +CREATE DATABASE testdb1; +CREATE DATABASE testdb2; +CREATE DATABASE testdb3; +CREATE DATABASE testdb4; +CREATE DATABASE testdb5; +CREATE DATABASE testdb6; +CREATE DATABASE testdb7; +CREATE DATABASE testdb8; +CREATE DATABASE testdb9; +CREATE DATABASE testdb10; +begin; +GRANT ALL ON testdb1.* TO testuser@localhost; +GRANT ALL ON testdb2.* TO testuser@localhost; +GRANT ALL ON testdb3.* TO testuser@localhost; +GRANT ALL ON testdb4.* TO testuser@localhost; +GRANT ALL ON testdb5.* TO testuser@localhost; +GRANT ALL ON testdb6.* TO testuser@localhost; +GRANT ALL ON testdb7.* TO testuser@localhost; +GRANT ALL ON testdb8.* TO testuser@localhost; +GRANT ALL ON testdb9.* TO testuser@localhost; +GRANT ALL ON testdb10.* TO testuser@localhost; +GRANT SELECT ON test.t1 TO testuser@localhost; +GRANT SELECT ON test.t2 TO testuser@localhost; +GRANT SELECT ON test.t3 TO testuser@localhost; +GRANT SELECT ON test.t4 TO testuser@localhost; +GRANT SELECT ON test.t5 TO testuser@localhost; +GRANT SELECT ON test.t6 TO testuser@localhost; +GRANT SELECT ON test.t7 TO testuser@localhost; +GRANT SELECT ON test.t8 TO testuser@localhost; +GRANT SELECT ON test.t9 TO testuser@localhost; +GRANT SELECT ON test.t10 TO testuser@localhost; +GRANT SELECT (a) ON test.t1 TO testuser@localhost; +GRANT SELECT (a) ON test.t2 TO testuser@localhost; +GRANT SELECT (a) ON test.t3 TO testuser@localhost; +GRANT SELECT (a) ON test.t4 TO testuser@localhost; +GRANT SELECT (a) ON test.t5 TO testuser@localhost; +GRANT SELECT (a) ON test.t6 TO testuser@localhost; +GRANT SELECT (a) ON test.t7 TO testuser@localhost; +GRANT SELECT (a) ON test.t8 TO testuser@localhost; +GRANT SELECT (a) ON test.t9 TO testuser@localhost; +GRANT SELECT (a) ON test.t10 TO testuser@localhost; +commit; +begin; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost; +commit; +SHOW GRANTS FOR testuser@localhost; +DROP USER testuser@localhost; +DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +DROP DATABASE testdb1; +DROP DATABASE testdb2; +DROP DATABASE testdb3; +DROP DATABASE testdb4; +DROP DATABASE testdb5; +DROP DATABASE testdb6; +DROP DATABASE testdb7; +DROP DATABASE testdb8; +DROP DATABASE testdb9; +DROP DATABASE testdb10; + +# +# just SHOW PRIVILEGES test +# +SHOW PRIVILEGES; + +# +# Alter mysql system tables back to myisam +# +use mysql; +alter table columns_priv engine=myisam; +alter table db engine=myisam; +alter table func engine=myisam; +alter table help_category engine=myisam; +alter table help_keyword engine=myisam; +alter table help_relation engine=myisam; +alter table help_topic engine=myisam; +alter table host engine=myisam; +alter table tables_priv engine=myisam; +alter table time_zone engine=myisam; +alter table time_zone_leap_second engine=myisam; +alter table time_zone_name engine=myisam; +alter table time_zone_transition engine=myisam; +alter table time_zone_transition_type engine=myisam; +alter table user engine=myisam; +use test; +flush privileges; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_index.test b/mysql-test/suite/ndb/t/ndb_index.test new file mode 100644 index 00000000000..272f30e3e6f --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_index.test @@ -0,0 +1,131 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +CREATE TABLE t1 ( + PORT varchar(16) NOT NULL, + ACCESSNODE varchar(16) NOT NULL, + POP varchar(48) NOT NULL, + ACCESSTYPE int unsigned NOT NULL, + CUSTOMER_ID varchar(20) collate latin1_bin NOT NULL, + PROVIDER varchar(16), + TEXPIRE int unsigned, + NUM_IP int unsigned, + LEASED_NUM_IP int unsigned, + LOCKED_IP int unsigned, + STATIC_DNS int unsigned, + SUSPENDED_SERVICE int unsigned, + SUSPENDED_REASON int unsigned, + BGP_COMMUNITY int unsigned, + INDEX CUSTOMER_ID_INDEX(CUSTOMER_ID), + INDEX FQPN_INDEX(POP,ACCESSNODE,PORT), + PRIMARY KEY(POP,ACCESSNODE,PORT,ACCESSTYPE) +) engine=ndbcluster; + +INSERT INTO t1 VALUES ('port67', 'node78', 'pop98', 1, 'kllopmn', 'pr_43', 121212, 1, 2, 3, 8, NULL, NULL, NULL); +INSERT INTO t1 VALUES ('port67', 'node78', 'pop99', 2, 'klkighh', 'pr_44', 121213, 3, 3, 6, 7, NULL, NULL, NULL); +INSERT INTO t1 VALUES ('port79', 'node79', 'pop79', 2, 'kpongfaa', 'pr_44', 981213, 2, 4, 10, 11, 2, 99, 1278); + + +# Test select using port +select port, accessnode, pop, accesstype from t1 where port='port67' order by accesstype; +select port, accessnode, pop, accesstype from t1 where port='foo'; + +# Test select using accessnode +select port, accessnode, pop, accesstype from t1 where accessnode='node78' order by accesstype; +select port, accessnode, pop, accesstype from t1 where accessnode='foo'; + +# Test select using pop +select port, accessnode, pop, accesstype from t1 where pop='pop98'; +select port, accessnode, pop, accesstype from t1 where pop='pop98'; +select port, accessnode, pop, accesstype from t1 where pop='pop98'; +select port, accessnode, pop, accesstype from t1 where pop='pop98' order by accesstype; +# The following two querys will not return any rows since +# the index used for access is case sensitive +# They are thus disabled for now +#select port, accessnode, pop, accesstype from t1 where pop='POP98'; +#select port, accessnode, pop, accesstype from t1 where pop='POP98' order by accesstype; +select port, accessnode, pop, accesstype from t1 where pop='foo'; + +# Test select using accesstype +select port, accessnode, pop, accesstype from t1 where accesstype=1; +select port, accessnode, pop, accesstype from t1 where accesstype=2 order by port; +select port, accessnode, pop, accesstype from t1 where accesstype=98 order by port; + +# Test select using customer_id +# NOTE! customer_id has a INDEX (ordered index in NDB), it's case sensitive! +select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; +select port, accessnode, pop, accesstype from t1 where customer_id='KLLOPMN'; +select port, accessnode, pop, accesstype from t1 where customer_id='kLLoPMn'; +select port, accessnode, pop, accesstype from t1 where customer_id='foo'; + +# Test select using provider +select port, accessnode, pop, accesstype from t1 where provider='pr_43'; +select port, accessnode, pop, accesstype from t1 where provider='foo'; + +# Test select using texpire +select port, accessnode from t1 where texpire=121212; +select port, accessnode from t1 where texpire=2323; + +# Test select using num_ip +select port, accessnode, pop, accesstype from t1 where num_ip=1; +select port, accessnode, pop, accesstype from t1 where num_ip=89; + +# Test select using leased_num_ip +select port, accessnode, pop, accesstype from t1 where leased_num_ip=2; +select port, accessnode, pop, accesstype from t1 where leased_num_ip=89; + +# Test select using locked_ip +select port, accessnode, pop, accesstype from t1 where locked_ip=3; +select port, accessnode, pop, accesstype from t1 where locked_ip=89; + +# Test select using static_dns +select port, accessnode, pop, accesstype from t1 where static_dns=8; +select port, accessnode, pop, accesstype from t1 where static_dns=89; + +# Test select using suspended_service +select port, accessnode, pop, accesstype from t1 where suspended_service=8; +select port, accessnode, pop, accesstype from t1 where suspended_service=89; + +# Test select using suspended_reason +select port, accessnode, pop, accesstype from t1 where suspended_reason=NULL; +select port, accessnode, pop, accesstype from t1 where suspended_reason=89; +select port, accessnode, pop, accesstype from t1 where suspended_reason=0; + +# Test select using bgp_community +select port, accessnode, pop, accesstype from t1 where bgp_community=NULL; +select port, accessnode, pop, accesstype from t1 where bgp_community=89; +select port, accessnode, pop, accesstype from t1 where bgp_community=0; + +# Test select using full primary key +select port, accessnode, pop, accesstype from t1 where port='port67' and accessnode='node78' and pop='pop98' and accesstype=1; +select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78' and pop='pop98'; +select port, accessnode, pop, accesstype from t1 where pop='pop98' and port='port67' and accesstype=1 and accessnode='node78'; +select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo' and accesstype=99; + +# Test select using partial primary key +select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accesstype=1; +select port, accessnode, pop, accesstype from t1 where accesstype=1 and accessnode='node78' and pop='pop98'; +select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78'; +select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo'; + +# Test select using CUSTOMER_ID_INDEX +select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; +select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=1; +select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=2; +select port, accessnode, pop, accesstype from t1 where accesstype=2 and customer_id='kllopmn'; + +# Test select using FQPN_INDEX +select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67'; +#select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' order by accesstype; +#select port, accessnode, pop, accesstype from t1 where accessnode='node78' and port='port67' and pop='pop98' order by accesstype; +#select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accessnode='node78' order by accesstype; +select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn'; +select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo'; + +drop table t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_index_ordered.test b/mysql-test/suite/ndb/t/ndb_index_ordered.test new file mode 100644 index 00000000000..782f17ca5b2 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_index_ordered.test @@ -0,0 +1,480 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1, test1, test2; +--enable_warnings + +# +# Simple test to show use of ordered indexes +# + +CREATE TABLE t1 ( + a int unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned, + KEY(b) +) engine=ndbcluster; + +insert t1 values(1, 2, 3), (2,3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); +select * from t1 order by b; +select * from t1 where b >= 4 order by b; +select * from t1 where b = 4 order by b; +select * from t1 where b > 4 order by b; +select * from t1 where b < 4 order by b; +select * from t1 where b <= 4 order by b; + +# Test of reset_bounds +select tt1.* from t1 as tt1, t1 as tt2 use index(b) where tt1.b = tt2.b order by tt1.b; +select a, b, c from t1 where a!=2 and c=6; +select a, b, c from t1 where a!=2 order by a; + +# +# Here we should add some "explain select" to verify that the ordered index is +# used for these queries. +# + +# +# Update using ordered index scan +# + +update t1 set c = 3 where b = 3; +select * from t1 order by a; +update t1 set c = 10 where b >= 6; +select * from t1 order by a; +update t1 set c = 11 where b < 5; +select * from t1 order by a; +update t1 set c = 12 where b > 0; +select * from t1 order by a; +update t1 set c = 13 where b <= 3; +select * from t1 order by a; +update t1 set b = b + 1 where b > 4 and b < 7; +select * from t1 order by a; +# Update primary key +update t1 set a = a + 10 where b > 1 and b < 7; +select * from t1 order by a; + +# +# Delete using ordered index scan +# + +drop table t1; + +CREATE TABLE t1 ( + a int unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned, + KEY(b) +) engine=ndbcluster; + +insert t1 values(1, 2, 13), (2,3, 13), (3, 4, 12), (4, 5, 12), (5,6, 12), (6,7, 12); + +delete from t1 where b = 3; +select * from t1 order by a; +delete from t1 where b >= 6; +select * from t1 order by a; +delete from t1 where b < 4; +select * from t1 order by a; +delete from t1 where b > 5; +select * from t1 order by a; +delete from t1 where b <= 4; +select * from t1 order by a; + +drop table t1; + + +# +#multi part key +# +CREATE TABLE t1 ( + a int unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned not null +) engine = ndb; + +create index a1 on t1 (b, c); + +insert into t1 values (1, 2, 13); +insert into t1 values (2,3, 13); +insert into t1 values (3, 4, 12); +insert into t1 values (4, 5, 12); +insert into t1 values (5,6, 12); +insert into t1 values (6,7, 12); +insert into t1 values (7, 2, 1); +insert into t1 values (8,3, 6); +insert into t1 values (9, 4, 12); +insert into t1 values (14, 5, 4); +insert into t1 values (15,5,5); +insert into t1 values (16,5, 6); +insert into t1 values (17,4,4); +insert into t1 values (18,1, 7); + + + +select * from t1 order by a; +select * from t1 where b<=5 order by a; +select * from t1 where b<=5 and c=0; +insert into t1 values (19,4, 0); +select * from t1 where b<=5 and c=0; +select * from t1 where b=4 and c<=5 order by a; +select * from t1 where b<=4 and c<=5 order by a; +select * from t1 where b<=5 and c=0 or b<=5 and c=2; + +select count(*) from t1 where b = 0; +select count(*) from t1 where b = 1; +drop table t1; + +# +# Indexing NULL values +# + +CREATE TABLE t1 ( + a int unsigned NOT NULL PRIMARY KEY, + b int unsigned, + c int unsigned, + KEY bc(b,c) +) engine = ndb; + +insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); +select * from t1 use index (bc) where b IS NULL order by a; + +select * from t1 use index (bc)order by a; +select * from t1 use index (bc) order by a; +select * from t1 use index (PRIMARY) where b IS NULL order by a; +select * from t1 use index (bc) where b IS NULL order by a; +select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; +select * from t1 use index (bc) where b IS NULL and c = 2 order by a; +select * from t1 use index (bc) where b < 4 order by a; +select * from t1 use index (bc) where b IS NOT NULL order by a; +drop table t1; + +# +# Order by again, including descending. +# + +create table t1 ( + a int unsigned primary key, + b int unsigned, + c char(10), + key bc (b, c) +) engine=ndb; + +insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); +insert into t1 select a*7,10*b,'f' from t1; +insert into t1 select a*13,10*b,'g' from t1; +insert into t1 select a*17,10*b,'h' from t1; +insert into t1 select a*19,10*b,'i' from t1; +insert into t1 select a*23,10*b,'j' from t1; +insert into t1 select a*29,10*b,'k' from t1; +# +select b, c from t1 where b <= 10 and c <'f' order by b, c; +select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; +# +select b, c from t1 where b=4000 and c<'k' order by b, c; +select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; +select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; +select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; +# +select min(b), max(b) from t1; +# +drop table t1; + +# +# Bug #6435 +CREATE TABLE test1 ( +SubscrID int(11) NOT NULL auto_increment, +UsrID int(11) NOT NULL default '0', +PRIMARY KEY (SubscrID), +KEY idx_usrid (UsrID) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; + +INSERT INTO test1 VALUES (2,224),(3,224),(1,224); + +CREATE TABLE test2 ( +SbclID int(11) NOT NULL auto_increment, +SbcrID int(11) NOT NULL default '0', +PRIMARY KEY (SbclID), +KEY idx_sbcrid (SbcrID) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; + +INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2); +select * from test1 order by 1; +select * from test2 order by 1; +SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON +l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2; +drop table test1; +drop table test2; + +# bug#7424 + bug#7725 + +create table t1 ( + pk int primary key, + dt datetime not null, + da date not null, + ye year not null, + ti time not null, + ts timestamp not null, + index(dt), + index(da), + index(ye), + index(ti), + index(ts) +) engine=ndb; + +insert into t1 (pk,dt,da,ye,ti,ts) values + (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), + (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), + (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), + (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), + (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), + (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), + (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), + (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), + (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); + +# datetime +select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; +select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; +select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; +select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; +select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; +select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; +select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; + +# date +select count(*)-9 from t1 use index (da) where da > '1900-01-01'; +select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; +select count(*)-5 from t1 use index (da) where da > '1955-12-31'; +select count(*)-5 from t1 use index (da) where da < '1970-03-03'; +select count(*)-6 from t1 use index (da) where da < '2001-01-01'; +select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; +select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; + +# year +select count(*)-9 from t1 use index (ye) where ye > '1900'; +select count(*)-6 from t1 use index (ye) where ye >= '1955'; +select count(*)-5 from t1 use index (ye) where ye > '1955'; +select count(*)-5 from t1 use index (ye) where ye < '1970'; +select count(*)-6 from t1 use index (ye) where ye < '2001'; +select count(*)-8 from t1 use index (ye) where ye <= '2001'; +select count(*)-9 from t1 use index (ye) where ye <= '2055'; + +# time +select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; +select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; +select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; +select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; +select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; +select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; +select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; +select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; + +# timestamp +select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; +select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; +select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; +select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; +select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; +select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; +select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; +select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; + +drop table t1; + +# decimal (not the new 5.0 thing) + +create table t1 ( + a int primary key, + s decimal(12), + t decimal(12, 5), + u decimal(12) unsigned, + v decimal(12, 5) unsigned, + key (s), + key (t), + key (u), + key (v) +) engine=ndb; +# +insert into t1 values + ( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042), + ( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003), + ( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488), + ( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013), + ( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002), + ( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018), + ( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001), + ( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374), + ( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000), + ( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008); +# +select count(*)- 5 from t1 use index (s) where s < -000000000007; +select count(*)- 7 from t1 use index (s) where s <= -000000000007; +select count(*)- 2 from t1 use index (s) where s = -000000000007; +select count(*)- 5 from t1 use index (s) where s >= -000000000007; +select count(*)- 3 from t1 use index (s) where s > -000000000007; +# +select count(*)- 4 from t1 use index (t) where t < -0000061.00003; +select count(*)- 5 from t1 use index (t) where t <= -0000061.00003; +select count(*)- 1 from t1 use index (t) where t = -0000061.00003; +select count(*)- 6 from t1 use index (t) where t >= -0000061.00003; +select count(*)- 5 from t1 use index (t) where t > -0000061.00003; +# +select count(*)- 2 from t1 use index (u) where u < 000000000061; +select count(*)- 4 from t1 use index (u) where u <= 000000000061; +select count(*)- 2 from t1 use index (u) where u = 000000000061; +select count(*)- 8 from t1 use index (u) where u >= 000000000061; +select count(*)- 6 from t1 use index (u) where u > 000000000061; +# +select count(*)- 5 from t1 use index (v) where v < 0000965.00042; +select count(*)- 6 from t1 use index (v) where v <= 0000965.00042; +select count(*)- 1 from t1 use index (v) where v = 0000965.00042; +select count(*)- 5 from t1 use index (v) where v >= 0000965.00042; +select count(*)- 4 from t1 use index (v) where v > 0000965.00042; + +drop table t1; + +# bug#7798 +create table t1(a int primary key, b int not null, index(b)); +insert into t1 values (1,1), (2,2); +connect (con1,localhost,root,,test); +connect (con2,localhost,root,,test); +connection con1; +set autocommit=0; +begin; +select count(*) from t1; +connection con2; +ALTER TABLE t1 ADD COLUMN c int; +connection con1; +select a from t1 where b = 2; +show tables; +drop table t1; + +# mysqld 5.0.13 crash, no bug# +create table t1 (a int, c varchar(10), + primary key using hash (a), index(c)) engine=ndb; +insert into t1 (a, c) values (1,'aaa'),(3,'bbb'); +select count(*) from t1 where c<'bbb'; +drop table t1; + +# -- index statistics -- + +set autocommit=1; +show session variables like 'ndb_index_stat_%'; + +set ndb_index_stat_enable = off; +show session variables like 'ndb_index_stat_%'; + +create table t1 (a int, b int, c varchar(10) not null, + primary key using hash (a), index(b,c)) engine=ndb; +insert into t1 values + (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), + (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), + (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); +select count(*) from t1 where b < 10; +select count(*) from t1 where b >= 10 and c >= 'bbb'; +select count(*) from t1 where b > 10; +select count(*) from t1 where b <= 20 and c < 'ccc'; +select count(*) from t1 where b = 20 and c = 'ccc'; +select count(*) from t1 where b > 20; +select count(*) from t1 where b = 30 and c > 'aaa'; +select count(*) from t1 where b <= 20; +select count(*) from t1 where b >= 20 and c > 'aaa'; +drop table t1; + +set ndb_index_stat_enable = on; +set ndb_index_stat_cache_entries = 0; +show session variables like 'ndb_index_stat_%'; + +create table t1 (a int, b int, c varchar(10) not null, + primary key using hash (a), index(b,c)) engine=ndb; +insert into t1 values + (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), + (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), + (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); +select count(*) from t1 where b < 10; +select count(*) from t1 where b >= 10 and c >= 'bbb'; +select count(*) from t1 where b > 10; +select count(*) from t1 where b <= 20 and c < 'ccc'; +select count(*) from t1 where b = 20 and c = 'ccc'; +select count(*) from t1 where b > 20; +select count(*) from t1 where b = 30 and c > 'aaa'; +select count(*) from t1 where b <= 20; +select count(*) from t1 where b >= 20 and c > 'aaa'; +drop table t1; + +set ndb_index_stat_enable = on; +set ndb_index_stat_cache_entries = 4; +set ndb_index_stat_update_freq = 2; +show session variables like 'ndb_index_stat_%'; + +create table t1 (a int, b int, c varchar(10) not null, + primary key using hash (a), index(b,c)) engine=ndb; +insert into t1 values + (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), + (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), + (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); +select count(*) from t1 where b < 10; +select count(*) from t1 where b >= 10 and c >= 'bbb'; +select count(*) from t1 where b > 10; +select count(*) from t1 where b <= 20 and c < 'ccc'; +select count(*) from t1 where b = 20 and c = 'ccc'; +select count(*) from t1 where b > 20; +select count(*) from t1 where b = 30 and c > 'aaa'; +select count(*) from t1 where b <= 20; +select count(*) from t1 where b >= 20 and c > 'aaa'; +drop table t1; + +set ndb_index_stat_enable = @@global.ndb_index_stat_enable; +set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries; +set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq; +show session variables like 'ndb_index_stat_%'; + +# End of 4.1 tests + +# bug#24039 + +create table t1 (a int primary key) engine = ndb; +insert into t1 values (1), (2), (3); +begin; +delete from t1 where a > 1; +rollback; +select * from t1 order by a; +begin; +delete from t1 where a > 1; +rollback; + +begin; +select * from t1 order by a; +delete from t1 where a > 2; +select * from t1 order by a; +delete from t1 where a > 1; +select * from t1 order by a; +delete from t1 where a > 0; +select * from t1 order by a; +rollback; +select * from t1 order by a; +delete from t1; +drop table t1; + +# bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index + +--error ER_CANT_CREATE_TABLE +create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, + CountryCode char(3) NOT NULL, + DishTitle varchar(64) NOT NULL, + calories smallint(5) unsigned DEFAULT NULL, + PRIMARY KEY (DishID), + INDEX i USING HASH (countrycode,calories) + ) ENGINE=ndbcluster; + +create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, + CountryCode char(3) NOT NULL, + DishTitle varchar(64) NOT NULL, + calories smallint(5) unsigned DEFAULT NULL, + PRIMARY KEY (DishID) + ) ENGINE=ndbcluster; + +--error ER_UNSUPPORTED_EXTENSION +create index i on nationaldish(countrycode,calories) using hash; + +drop table nationaldish; diff --git a/mysql-test/suite/ndb/t/ndb_index_unique.test b/mysql-test/suite/ndb/t/ndb_index_unique.test new file mode 100644 index 00000000000..78757c3bcf7 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_index_unique.test @@ -0,0 +1,361 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; +--enable_warnings + +# +# Simple test to show use of UNIQUE indexes +# + +CREATE TABLE t1 ( + a int NOT NULL PRIMARY KEY, + b int not null, + c int, + UNIQUE ib(b) +) engine=ndbcluster; + +insert t1 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); +select * from t1 order by b; +select * from t1 where b = 4 order by b; +insert into t1 values(7,8,3); +select * from t1 where b = 4 order by a; + +-- error ER_DUP_ENTRY +insert into t1 values(8, 2, 3); +select * from t1 order by a; +delete from t1 where a = 1; +insert into t1 values(8, 2, 3); +select * from t1 order by a; + +alter table t1 drop index ib; +insert into t1 values(1, 2, 3); +# Bug# #18129 +--error 1169 +create unique index ib on t1(b); + +drop table t1; + +# +# Indexing NULL values +# + +CREATE TABLE t1 ( + a int unsigned NOT NULL PRIMARY KEY, + b int unsigned, + c int unsigned, + UNIQUE bc(b,c) +) engine = ndb; + +insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); +select * from t1 use index (bc) where b IS NULL order by a; + +select * from t1 use index (bc)order by a; +select * from t1 use index (bc) order by a; +select * from t1 use index (PRIMARY) where b IS NULL order by a; +select * from t1 use index (bc) where b IS NULL order by a; +select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; +select * from t1 use index (bc) where b IS NULL and c = 2 order by a; +select * from t1 use index (bc) where b < 4 order by a; +select * from t1 use index (bc) where b IS NOT NULL order by a; +-- error ER_DUP_ENTRY +insert into t1 values(5,1,1); +drop table t1; + + +# +# Show use of UNIQUE USING HASH indexes +# + +CREATE TABLE t2 ( + a int unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned not null, + UNIQUE (b, c) USING HASH +) engine=ndbcluster; + +insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); +select * from t2 where a = 3; +select * from t2 where b = 4; +select * from t2 where c = 6; +insert into t2 values(7,8,3); +select * from t2 where b = 4 order by a; + +-- error ER_DUP_ENTRY +insert into t2 values(8, 2, 3); +select * from t2 order by a; +delete from t2 where a = 1; +insert into t2 values(8, 2, 3); +select * from t2 order by a; + +# Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld +create unique index bi using hash on t2(b); +-- error ER_DUP_ENTRY +insert into t2 values(9, 3, 1); +alter table t2 drop index bi; +insert into t2 values(9, 3, 1); +select * from t2 order by a; + +drop table t2; + +CREATE TABLE t2 ( + a int unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned, + UNIQUE (b, c) USING HASH +) engine=ndbcluster; + + +insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL); + +select * from t2 where c IS NULL order by a; +select * from t2 where b = 3 AND c IS NULL order by a; +select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a; +set @old_ecpd = @@session.engine_condition_pushdown; +set engine_condition_pushdown = true; +explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; +select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; +set engine_condition_pushdown = @old_ecpd; + +drop table t2; + +# +# Show use of PRIMARY KEY USING HASH indexes +# + +CREATE TABLE t3 ( + a int unsigned NOT NULL, + b int unsigned not null, + c int unsigned, + PRIMARY KEY (a, b) USING HASH +) engine=ndbcluster; + +insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); +select * from t3 where a = 3; +select * from t3 where b = 4; +select * from t3 where c = 6; +insert into t3 values(7,8,3); +select * from t3 where b = 4 order by a; + +drop table t3; + +# +# Indexes on NULL-able columns +# + +CREATE TABLE t1 ( + pk int NOT NULL PRIMARY KEY, + a int unsigned, + UNIQUE KEY (a) +) engine=ndbcluster; + +insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); + +select * from t1 order by pk; + +--error ER_DUP_ENTRY +insert into t1 values (5,0); +select * from t1 order by pk; +delete from t1 where a = 0; +insert into t1 values (5,0); +select * from t1 order by pk; + +CREATE TABLE t2 ( + pk int NOT NULL PRIMARY KEY, + a int unsigned, + b tinyint NOT NULL, + c VARCHAR(10), + UNIQUE KEY si(a, c) +) engine=ndbcluster; + +insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); + +select * from t2 order by pk; + +--error ER_DUP_ENTRY +insert into t2 values(2,3,19,'abc'); +select * from t2 order by pk; +delete from t2 where c IS NOT NULL; +insert into t2 values(2,3,19,'abc'); +select * from t2 order by pk; + +drop table t1, t2; + +# +# More complex tables +# + +CREATE TABLE t1 ( + cid smallint(5) unsigned NOT NULL default '0', + cv varchar(250) NOT NULL default '', + PRIMARY KEY (cid), + UNIQUE KEY cv (cv) +) engine=ndbcluster; +INSERT INTO t1 VALUES (8,'dummy'); +CREATE TABLE t2 ( + cid bigint(20) unsigned NOT NULL auto_increment, + cap varchar(255) NOT NULL default '', + PRIMARY KEY (cid), + UNIQUE KEY (cid, cap) +) engine=ndbcluster; +INSERT INTO t2 VALUES (NULL,'another dummy'); +CREATE TABLE t3 ( + gid bigint(20) unsigned NOT NULL auto_increment, + gn varchar(255) NOT NULL default '', + must tinyint(4) default NULL, + PRIMARY KEY (gid) +) engine=ndbcluster; +INSERT INTO t3 VALUES (1,'V1',NULL); +CREATE TABLE t4 ( + uid bigint(20) unsigned NOT NULL default '0', + gid bigint(20) unsigned NOT NULL, + rid bigint(20) unsigned NOT NULL, + cid bigint(20) unsigned NOT NULL, + UNIQUE KEY m (uid,gid,rid,cid) +) engine=ndbcluster; +INSERT INTO t4 VALUES (1,1,2,4); +INSERT INTO t4 VALUES (1,1,2,3); +INSERT INTO t4 VALUES (1,1,5,7); +INSERT INTO t4 VALUES (1,1,10,8); +CREATE TABLE t5 ( + rid bigint(20) unsigned NOT NULL auto_increment, + rl varchar(255) NOT NULL default '', + PRIMARY KEY (rid) +) engine=ndbcluster; +CREATE TABLE t6 ( + uid bigint(20) unsigned NOT NULL auto_increment, + un varchar(250) NOT NULL default '', + uc smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (uid), + UNIQUE KEY nc (un,uc) +) engine=ndbcluster; +INSERT INTO t6 VALUES (1,'test',8); +INSERT INTO t6 VALUES (2,'test2',9); +INSERT INTO t6 VALUES (3,'tre',3); +CREATE TABLE t7 ( + mid bigint(20) unsigned NOT NULL PRIMARY KEY, + uid bigint(20) unsigned NOT NULL default '0', + gid bigint(20) unsigned NOT NULL, + rid bigint(20) unsigned NOT NULL, + cid bigint(20) unsigned NOT NULL, + UNIQUE KEY m (uid,gid,rid,cid) +) engine=ndbcluster; +INSERT INTO t7 VALUES(1, 1, 1, 1, 1); +INSERT INTO t7 VALUES(2, 2, 1, 1, 1); +INSERT INTO t7 VALUES(3, 3, 1, 1, 1); +INSERT INTO t7 VALUES(4, 4, 1, 1, 1); +INSERT INTO t7 VALUES(5, 5, 1, 1, 1); +INSERT INTO t7 VALUES(6, 1, 1, 1, 6); +INSERT INTO t7 VALUES(7, 2, 1, 1, 7); +INSERT INTO t7 VALUES(8, 3, 1, 1, 8); +INSERT INTO t7 VALUES(9, 4, 1, 1, 9); +INSERT INTO t7 VALUES(10, 5, 1, 1, 10); + +select * from t1 where cv = 'dummy'; +select * from t1 where cv = 'test'; +select * from t2 where cap = 'another dummy'; +select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; +select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; +select * from t4 where uid = 1 order by cid; +select * from t4 where rid = 2 order by cid; +select * from t6 where un='test' and uc=8; +select * from t6 where un='test' and uc=7; +select * from t6 where un='test'; +select * from t7 where mid = 8; +select * from t7 where uid = 8; +select * from t7 where uid = 1 order by mid; +select * from t7 where uid = 4 order by mid; +select * from t7 where gid = 4; +select * from t7 where gid = 1 order by mid; +select * from t7 where cid = 4; +select * from t7 where cid = 8; + +# +# insert more records into t4 +# +let $1=100; +disable_query_log; +while ($1) +{ + eval insert into t4 values(1, $1, 5, 12); + eval insert into t4 values($1, 3, 9, 11); + dec $1; +} +enable_query_log; + +select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; +select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; +select * from t4 where uid = 1 order by gid,cid; +select * from t4 where uid = 1 order by gid,cid; +select * from t4 where rid = 2 order by cid; + + +drop table t1,t2,t3,t4,t5,t6,t7; + +# test null in indexes +CREATE TABLE t1 ( + a int unsigned NOT NULL PRIMARY KEY, + b int unsigned, + c int unsigned, + UNIQUE bc(b,c) ) engine = ndb; + +insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); +select * from t1 where b=1 and c=1; +select * from t1 where b is null and c is null; +select * from t1 where b is null and c = 2; +select * from t1 where b = 4 and c is null; +create table t8 as +select * from t1 where (b = 1 and c = 1) + or (b is null and c is null) + or (b is null and c = 2) + or (b = 4 and c is null); +select * from t8 order by a; +select * from t1 order by a; +drop table t1, t8; + +############################### +# Bug 8101 +# +# Unique index not specified in the same order as in table +# + +create table t1( + id integer not null auto_increment, + month integer not null, + year integer not null, + code varchar( 2) not null, + primary key ( id), + unique idx_t1( month, code, year) +) engine=ndb; + +INSERT INTO t1 (month, year, code) VALUES (4,2004,'12'); +INSERT INTO t1 (month, year, code) VALUES (5,2004,'12'); + +select * from t1 where code = '12' and month = 4 and year = 2004 ; + +drop table t1; + +# bug#15918 Unique Key Limit in NDB Engine + +create table t1 (a int primary key, b varchar(1000) not null, unique key (b)) +engine=ndb charset=utf8; + +insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200)); +--error ER_DUP_ENTRY +insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200)); +select a, sha1(b) from t1; + +# perl -e 'print pack("H2000","e288ab6474"x200)' | sha1sum + +drop table t1; + +# bug#21873 MySQLD Crash on ALTER...ADD..UNIQUE..USING HASH statement for NDB backed table + +create table t1(id int not null) engine = NDB; + +alter table t1 add constraint uk_test unique (id) using hash; + +drop table t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_insert.test b/mysql-test/suite/ndb/t/ndb_insert.test new file mode 100644 index 00000000000..5b74cc9202c --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_insert.test @@ -0,0 +1,779 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# +# Basic test of INSERT in NDB +# + +# +# Create a normal table with primary key +# +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + b INT NOT NULL, + c INT NOT NULL +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (0, 0, 0); +SELECT * FROM t1; + +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), +(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), +(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), +(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), +(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), +(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), +(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), +(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), +(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), +(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), +(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), +(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), +(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), +(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), +(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), +(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), +(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), +(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), +(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), +(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), +(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), +(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), +(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), +(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), +(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), +(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), +(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), +(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), +(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), +(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), +(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), +(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), +(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), +(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), +(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), +(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), +(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), +(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), +(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), +(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), +(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), +(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), +(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), +(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), +(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), +(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), +(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), +(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), +(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), +(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), +(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), +(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), +(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), +(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), +(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), +(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), +(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), +(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), +(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), +(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), +(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), +(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), +(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), +(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), +(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), +(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), +(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), +(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), +(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), +(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), +(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), +(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), +(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), +(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), +(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), +(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), +(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), +(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), +(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), +(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), +(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), +(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), +(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), +(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), +(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), +(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), +(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), +(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), +(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), +(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), +(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), +(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), +(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), +(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), +(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), +(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), +(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), +(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), +(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); + +SELECT COUNT(*) FROM t1; + +INSERT INTO t1 VALUES +(501,501,501),(502,502,502),(503,503,503),(504,504,504),(505,505,505), +(506,506,506),(507,507,507),(508,508,508),(509,509,509),(510,510,510), +(511,511,511),(512,512,512),(513,513,513),(514,514,514),(515,515,515), +(516,516,516),(517,517,517),(518,518,518),(519,519,519),(520,520,520), +(521,521,521),(522,522,522),(523,523,523),(524,524,524),(525,525,525), +(526,526,526),(527,527,527),(528,528,528),(529,529,529),(530,530,530), +(531,531,531),(532,532,532),(533,533,533),(534,534,534),(535,535,535), +(536,536,536),(537,537,537),(538,538,538),(539,539,539),(540,540,540), +(541,541,541),(542,542,542),(543,543,543),(544,544,544),(545,545,545), +(546,546,546),(547,547,547),(548,548,548),(549,549,549),(550,550,550), +(551,551,551),(552,552,552),(553,553,553),(554,554,554),(555,555,555), +(556,556,556),(557,557,557),(558,558,558),(559,559,559),(560,560,560), +(561,561,561),(562,562,562),(563,563,563),(564,564,564),(565,565,565), +(566,566,566),(567,567,567),(568,568,568),(569,569,569),(570,570,570), +(571,571,571),(572,572,572),(573,573,573),(574,574,574),(575,575,575), +(576,576,576),(577,577,577),(578,578,578),(579,579,579),(580,580,580), +(581,581,581),(582,582,582),(583,583,583),(584,584,584),(585,585,585), +(586,586,586),(587,587,587),(588,588,588),(589,589,589),(590,590,590), +(591,591,591),(592,592,592),(593,593,593),(594,594,594),(595,595,595), +(596,596,596),(597,597,597),(598,598,598),(599,599,599),(600,600,600), +(601,601,601),(602,602,602),(603,603,603),(604,604,604),(605,605,605), +(606,606,606),(607,607,607),(608,608,608),(609,609,609),(610,610,610), +(611,611,611),(612,612,612),(613,613,613),(614,614,614),(615,615,615), +(616,616,616),(617,617,617),(618,618,618),(619,619,619),(620,620,620), +(621,621,621),(622,622,622),(623,623,623),(624,624,624),(625,625,625), +(626,626,626),(627,627,627),(628,628,628),(629,629,629),(630,630,630), +(631,631,631),(632,632,632),(633,633,633),(634,634,634),(635,635,635), +(636,636,636),(637,637,637),(638,638,638),(639,639,639),(640,640,640), +(641,641,641),(642,642,642),(643,643,643),(644,644,644),(645,645,645), +(646,646,646),(647,647,647),(648,648,648),(649,649,649),(650,650,650), +(651,651,651),(652,652,652),(653,653,653),(654,654,654),(655,655,655), +(656,656,656),(657,657,657),(658,658,658),(659,659,659),(660,660,660), +(661,661,661),(662,662,662),(663,663,663),(664,664,664),(665,665,665), +(666,666,666),(667,667,667),(668,668,668),(669,669,669),(670,670,670), +(671,671,671),(672,672,672),(673,673,673),(674,674,674),(675,675,675), +(676,676,676),(677,677,677),(678,678,678),(679,679,679),(680,680,680), +(681,681,681),(682,682,682),(683,683,683),(684,684,684),(685,685,685), +(686,686,686),(687,687,687),(688,688,688),(689,689,689),(690,690,690), +(691,691,691),(692,692,692),(693,693,693),(694,694,694),(695,695,695), +(696,696,696),(697,697,697),(698,698,698),(699,699,699),(700,700,700), +(701,701,701),(702,702,702),(703,703,703),(704,704,704),(705,705,705), +(706,706,706),(707,707,707),(708,708,708),(709,709,709),(710,710,710), +(711,711,711),(712,712,712),(713,713,713),(714,714,714),(715,715,715), +(716,716,716),(717,717,717),(718,718,718),(719,719,719),(720,720,720), +(721,721,721),(722,722,722),(723,723,723),(724,724,724),(725,725,725), +(726,726,726),(727,727,727),(728,728,728),(729,729,729),(730,730,730), +(731,731,731),(732,732,732),(733,733,733),(734,734,734),(735,735,735), +(736,736,736),(737,737,737),(738,738,738),(739,739,739),(740,740,740), +(741,741,741),(742,742,742),(743,743,743),(744,744,744),(745,745,745), +(746,746,746),(747,747,747),(748,748,748),(749,749,749),(750,750,750), +(751,751,751),(752,752,752),(753,753,753),(754,754,754),(755,755,755), +(756,756,756),(757,757,757),(758,758,758),(759,759,759),(760,760,760), +(761,761,761),(762,762,762),(763,763,763),(764,764,764),(765,765,765), +(766,766,766),(767,767,767),(768,768,768),(769,769,769),(770,770,770), +(771,771,771),(772,772,772),(773,773,773),(774,774,774),(775,775,775), +(776,776,776),(777,777,777),(778,778,778),(779,779,779),(780,780,780), +(781,781,781),(782,782,782),(783,783,783),(784,784,784),(785,785,785), +(786,786,786),(787,787,787),(788,788,788),(789,789,789),(790,790,790), +(791,791,791),(792,792,792),(793,793,793),(794,794,794),(795,795,795), +(796,796,796),(797,797,797),(798,798,798),(799,799,799),(800,800,800), +(801,801,801),(802,802,802),(803,803,803),(804,804,804),(805,805,805), +(806,806,806),(807,807,807),(808,808,808),(809,809,809),(810,810,810), +(811,811,811),(812,812,812),(813,813,813),(814,814,814),(815,815,815), +(816,816,816),(817,817,817),(818,818,818),(819,819,819),(820,820,820), +(821,821,821),(822,822,822),(823,823,823),(824,824,824),(825,825,825), +(826,826,826),(827,827,827),(828,828,828),(829,829,829),(830,830,830), +(831,831,831),(832,832,832),(833,833,833),(834,834,834),(835,835,835), +(836,836,836),(837,837,837),(838,838,838),(839,839,839),(840,840,840), +(841,841,841),(842,842,842),(843,843,843),(844,844,844),(845,845,845), +(846,846,846),(847,847,847),(848,848,848),(849,849,849),(850,850,850), +(851,851,851),(852,852,852),(853,853,853),(854,854,854),(855,855,855), +(856,856,856),(857,857,857),(858,858,858),(859,859,859),(860,860,860), +(861,861,861),(862,862,862),(863,863,863),(864,864,864),(865,865,865), +(866,866,866),(867,867,867),(868,868,868),(869,869,869),(870,870,870), +(871,871,871),(872,872,872),(873,873,873),(874,874,874),(875,875,875), +(876,876,876),(877,877,877),(878,878,878),(879,879,879),(880,880,880), +(881,881,881),(882,882,882),(883,883,883),(884,884,884),(885,885,885), +(886,886,886),(887,887,887),(888,888,888),(889,889,889),(890,890,890), +(891,891,891),(892,892,892),(893,893,893),(894,894,894),(895,895,895), +(896,896,896),(897,897,897),(898,898,898),(899,899,899),(900,900,900), +(901,901,901),(902,902,902),(903,903,903),(904,904,904),(905,905,905), +(906,906,906),(907,907,907),(908,908,908),(909,909,909),(910,910,910), +(911,911,911),(912,912,912),(913,913,913),(914,914,914),(915,915,915), +(916,916,916),(917,917,917),(918,918,918),(919,919,919),(920,920,920), +(921,921,921),(922,922,922),(923,923,923),(924,924,924),(925,925,925), +(926,926,926),(927,927,927),(928,928,928),(929,929,929),(930,930,930), +(931,931,931),(932,932,932),(933,933,933),(934,934,934),(935,935,935), +(936,936,936),(937,937,937),(938,938,938),(939,939,939),(940,940,940), +(941,941,941),(942,942,942),(943,943,943),(944,944,944),(945,945,945), +(946,946,946),(947,947,947),(948,948,948),(949,949,949),(950,950,950), +(951,951,951),(952,952,952),(953,953,953),(954,954,954),(955,955,955), +(956,956,956),(957,957,957),(958,958,958),(959,959,959),(960,960,960), +(961,961,961),(962,962,962),(963,963,963),(964,964,964),(965,965,965), +(966,966,966),(967,967,967),(968,968,968),(969,969,969),(970,970,970), +(971,971,971),(972,972,972),(973,973,973),(974,974,974),(975,975,975), +(976,976,976),(977,977,977),(978,978,978),(979,979,979),(980,980,980), +(981,981,981),(982,982,982),(983,983,983),(984,984,984),(985,985,985), +(986,986,986),(987,987,987),(988,988,988),(989,989,989),(990,990,990), +(991,991,991),(992,992,992),(993,993,993),(994,994,994),(995,995,995), +(996,996,996),(997,997,997),(998,998,998),(999,999,999),(1000,1000,1000), +(1001,1001,1001),(1002,1002,1002),(1003,1003,1003),(1004,1004,1004),(1005,1005,1005), +(1006,1006,1006),(1007,1007,1007),(1008,1008,1008),(1009,1009,1009),(1010,1010,1010), +(1011,1011,1011),(1012,1012,1012),(1013,1013,1013),(1014,1014,1014),(1015,1015,1015), +(1016,1016,1016),(1017,1017,1017),(1018,1018,1018),(1019,1019,1019),(1020,1020,1020), +(1021,1021,1021),(1022,1022,1022),(1023,1023,1023),(1024,1024,1024),(1025,1025,1025), +(1026,1026,1026),(1027,1027,1027),(1028,1028,1028),(1029,1029,1029),(1030,1030,1030), +(1031,1031,1031),(1032,1032,1032),(1033,1033,1033),(1034,1034,1034),(1035,1035,1035), +(1036,1036,1036),(1037,1037,1037),(1038,1038,1038),(1039,1039,1039),(1040,1040,1040), +(1041,1041,1041),(1042,1042,1042),(1043,1043,1043),(1044,1044,1044),(1045,1045,1045), +(1046,1046,1046),(1047,1047,1047),(1048,1048,1048),(1049,1049,1049),(1050,1050,1050), +(1051,1051,1051),(1052,1052,1052),(1053,1053,1053),(1054,1054,1054),(1055,1055,1055), +(1056,1056,1056),(1057,1057,1057),(1058,1058,1058),(1059,1059,1059),(1060,1060,1060), +(1061,1061,1061),(1062,1062,1062),(1063,1063,1063),(1064,1064,1064),(1065,1065,1065), +(1066,1066,1066),(1067,1067,1067),(1068,1068,1068),(1069,1069,1069),(1070,1070,1070), +(1071,1071,1071),(1072,1072,1072),(1073,1073,1073),(1074,1074,1074),(1075,1075,1075), +(1076,1076,1076),(1077,1077,1077),(1078,1078,1078),(1079,1079,1079),(1080,1080,1080), +(1081,1081,1081),(1082,1082,1082),(1083,1083,1083),(1084,1084,1084),(1085,1085,1085), +(1086,1086,1086),(1087,1087,1087),(1088,1088,1088),(1089,1089,1089),(1090,1090,1090), +(1091,1091,1091),(1092,1092,1092),(1093,1093,1093),(1094,1094,1094),(1095,1095,1095), +(1096,1096,1096),(1097,1097,1097),(1098,1098,1098),(1099,1099,1099),(1100,1100,1100), +(1101,1101,1101),(1102,1102,1102),(1103,1103,1103),(1104,1104,1104),(1105,1105,1105), +(1106,1106,1106),(1107,1107,1107),(1108,1108,1108),(1109,1109,1109),(1110,1110,1110), +(1111,1111,1111),(1112,1112,1112),(1113,1113,1113),(1114,1114,1114),(1115,1115,1115), +(1116,1116,1116),(1117,1117,1117),(1118,1118,1118),(1119,1119,1119),(1120,1120,1120), +(1121,1121,1121),(1122,1122,1122),(1123,1123,1123),(1124,1124,1124),(1125,1125,1125), +(1126,1126,1126),(1127,1127,1127),(1128,1128,1128),(1129,1129,1129),(1130,1130,1130), +(1131,1131,1131),(1132,1132,1132),(1133,1133,1133),(1134,1134,1134),(1135,1135,1135), +(1136,1136,1136),(1137,1137,1137),(1138,1138,1138),(1139,1139,1139),(1140,1140,1140), +(1141,1141,1141),(1142,1142,1142),(1143,1143,1143),(1144,1144,1144),(1145,1145,1145), +(1146,1146,1146),(1147,1147,1147),(1148,1148,1148),(1149,1149,1149),(1150,1150,1150), +(1151,1151,1151),(1152,1152,1152),(1153,1153,1153),(1154,1154,1154),(1155,1155,1155), +(1156,1156,1156),(1157,1157,1157),(1158,1158,1158),(1159,1159,1159),(1160,1160,1160), +(1161,1161,1161),(1162,1162,1162),(1163,1163,1163),(1164,1164,1164),(1165,1165,1165), +(1166,1166,1166),(1167,1167,1167),(1168,1168,1168),(1169,1169,1169),(1170,1170,1170), +(1171,1171,1171),(1172,1172,1172),(1173,1173,1173),(1174,1174,1174),(1175,1175,1175), +(1176,1176,1176),(1177,1177,1177),(1178,1178,1178),(1179,1179,1179),(1180,1180,1180), +(1181,1181,1181),(1182,1182,1182),(1183,1183,1183),(1184,1184,1184),(1185,1185,1185), +(1186,1186,1186),(1187,1187,1187),(1188,1188,1188),(1189,1189,1189),(1190,1190,1190), +(1191,1191,1191),(1192,1192,1192),(1193,1193,1193),(1194,1194,1194),(1195,1195,1195), +(1196,1196,1196),(1197,1197,1197),(1198,1198,1198),(1199,1199,1199),(1200,1200,1200), +(1201,1201,1201),(1202,1202,1202),(1203,1203,1203),(1204,1204,1204),(1205,1205,1205), +(1206,1206,1206),(1207,1207,1207),(1208,1208,1208),(1209,1209,1209),(1210,1210,1210), +(1211,1211,1211),(1212,1212,1212),(1213,1213,1213),(1214,1214,1214),(1215,1215,1215), +(1216,1216,1216),(1217,1217,1217),(1218,1218,1218),(1219,1219,1219),(1220,1220,1220), +(1221,1221,1221),(1222,1222,1222),(1223,1223,1223),(1224,1224,1224),(1225,1225,1225), +(1226,1226,1226),(1227,1227,1227),(1228,1228,1228),(1229,1229,1229),(1230,1230,1230), +(1231,1231,1231),(1232,1232,1232),(1233,1233,1233),(1234,1234,1234),(1235,1235,1235), +(1236,1236,1236),(1237,1237,1237),(1238,1238,1238),(1239,1239,1239),(1240,1240,1240), +(1241,1241,1241),(1242,1242,1242),(1243,1243,1243),(1244,1244,1244),(1245,1245,1245), +(1246,1246,1246),(1247,1247,1247),(1248,1248,1248),(1249,1249,1249),(1250,1250,1250), +(1251,1251,1251),(1252,1252,1252),(1253,1253,1253),(1254,1254,1254),(1255,1255,1255), +(1256,1256,1256),(1257,1257,1257),(1258,1258,1258),(1259,1259,1259),(1260,1260,1260), +(1261,1261,1261),(1262,1262,1262),(1263,1263,1263),(1264,1264,1264),(1265,1265,1265), +(1266,1266,1266),(1267,1267,1267),(1268,1268,1268),(1269,1269,1269),(1270,1270,1270), +(1271,1271,1271),(1272,1272,1272),(1273,1273,1273),(1274,1274,1274),(1275,1275,1275), +(1276,1276,1276),(1277,1277,1277),(1278,1278,1278),(1279,1279,1279),(1280,1280,1280), +(1281,1281,1281),(1282,1282,1282),(1283,1283,1283),(1284,1284,1284),(1285,1285,1285), +(1286,1286,1286),(1287,1287,1287),(1288,1288,1288),(1289,1289,1289),(1290,1290,1290), +(1291,1291,1291),(1292,1292,1292),(1293,1293,1293),(1294,1294,1294),(1295,1295,1295), +(1296,1296,1296),(1297,1297,1297),(1298,1298,1298),(1299,1299,1299),(1300,1300,1300), +(1301,1301,1301),(1302,1302,1302),(1303,1303,1303),(1304,1304,1304),(1305,1305,1305), +(1306,1306,1306),(1307,1307,1307),(1308,1308,1308),(1309,1309,1309),(1310,1310,1310), +(1311,1311,1311),(1312,1312,1312),(1313,1313,1313),(1314,1314,1314),(1315,1315,1315), +(1316,1316,1316),(1317,1317,1317),(1318,1318,1318),(1319,1319,1319),(1320,1320,1320), +(1321,1321,1321),(1322,1322,1322),(1323,1323,1323),(1324,1324,1324),(1325,1325,1325), +(1326,1326,1326),(1327,1327,1327),(1328,1328,1328),(1329,1329,1329),(1330,1330,1330), +(1331,1331,1331),(1332,1332,1332),(1333,1333,1333),(1334,1334,1334),(1335,1335,1335), +(1336,1336,1336),(1337,1337,1337),(1338,1338,1338),(1339,1339,1339),(1340,1340,1340), +(1341,1341,1341),(1342,1342,1342),(1343,1343,1343),(1344,1344,1344),(1345,1345,1345), +(1346,1346,1346),(1347,1347,1347),(1348,1348,1348),(1349,1349,1349),(1350,1350,1350), +(1351,1351,1351),(1352,1352,1352),(1353,1353,1353),(1354,1354,1354),(1355,1355,1355), +(1356,1356,1356),(1357,1357,1357),(1358,1358,1358),(1359,1359,1359),(1360,1360,1360), +(1361,1361,1361),(1362,1362,1362),(1363,1363,1363),(1364,1364,1364),(1365,1365,1365), +(1366,1366,1366),(1367,1367,1367),(1368,1368,1368),(1369,1369,1369),(1370,1370,1370), +(1371,1371,1371),(1372,1372,1372),(1373,1373,1373),(1374,1374,1374),(1375,1375,1375), +(1376,1376,1376),(1377,1377,1377),(1378,1378,1378),(1379,1379,1379),(1380,1380,1380), +(1381,1381,1381),(1382,1382,1382),(1383,1383,1383),(1384,1384,1384),(1385,1385,1385), +(1386,1386,1386),(1387,1387,1387),(1388,1388,1388),(1389,1389,1389),(1390,1390,1390), +(1391,1391,1391),(1392,1392,1392),(1393,1393,1393),(1394,1394,1394),(1395,1395,1395), +(1396,1396,1396),(1397,1397,1397),(1398,1398,1398),(1399,1399,1399),(1400,1400,1400), +(1401,1401,1401),(1402,1402,1402),(1403,1403,1403),(1404,1404,1404),(1405,1405,1405), +(1406,1406,1406),(1407,1407,1407),(1408,1408,1408),(1409,1409,1409),(1410,1410,1410), +(1411,1411,1411),(1412,1412,1412),(1413,1413,1413),(1414,1414,1414),(1415,1415,1415), +(1416,1416,1416),(1417,1417,1417),(1418,1418,1418),(1419,1419,1419),(1420,1420,1420), +(1421,1421,1421),(1422,1422,1422),(1423,1423,1423),(1424,1424,1424),(1425,1425,1425), +(1426,1426,1426),(1427,1427,1427),(1428,1428,1428),(1429,1429,1429),(1430,1430,1430), +(1431,1431,1431),(1432,1432,1432),(1433,1433,1433),(1434,1434,1434),(1435,1435,1435), +(1436,1436,1436),(1437,1437,1437),(1438,1438,1438),(1439,1439,1439),(1440,1440,1440), +(1441,1441,1441),(1442,1442,1442),(1443,1443,1443),(1444,1444,1444),(1445,1445,1445), +(1446,1446,1446),(1447,1447,1447),(1448,1448,1448),(1449,1449,1449),(1450,1450,1450), +(1451,1451,1451),(1452,1452,1452),(1453,1453,1453),(1454,1454,1454),(1455,1455,1455), +(1456,1456,1456),(1457,1457,1457),(1458,1458,1458),(1459,1459,1459),(1460,1460,1460), +(1461,1461,1461),(1462,1462,1462),(1463,1463,1463),(1464,1464,1464),(1465,1465,1465), +(1466,1466,1466),(1467,1467,1467),(1468,1468,1468),(1469,1469,1469),(1470,1470,1470), +(1471,1471,1471),(1472,1472,1472),(1473,1473,1473),(1474,1474,1474),(1475,1475,1475), +(1476,1476,1476),(1477,1477,1477),(1478,1478,1478),(1479,1479,1479),(1480,1480,1480), +(1481,1481,1481),(1482,1482,1482),(1483,1483,1483),(1484,1484,1484),(1485,1485,1485), +(1486,1486,1486),(1487,1487,1487),(1488,1488,1488),(1489,1489,1489),(1490,1490,1490), +(1491,1491,1491),(1492,1492,1492),(1493,1493,1493),(1494,1494,1494),(1495,1495,1495), +(1496,1496,1496),(1497,1497,1497),(1498,1498,1498),(1499,1499,1499),(1500,1500,1500), +(1501,1501,1501),(1502,1502,1502),(1503,1503,1503),(1504,1504,1504),(1505,1505,1505), +(1506,1506,1506),(1507,1507,1507),(1508,1508,1508),(1509,1509,1509),(1510,1510,1510), +(1511,1511,1511),(1512,1512,1512),(1513,1513,1513),(1514,1514,1514),(1515,1515,1515), +(1516,1516,1516),(1517,1517,1517),(1518,1518,1518),(1519,1519,1519),(1520,1520,1520), +(1521,1521,1521),(1522,1522,1522),(1523,1523,1523),(1524,1524,1524),(1525,1525,1525), +(1526,1526,1526),(1527,1527,1527),(1528,1528,1528),(1529,1529,1529),(1530,1530,1530), +(1531,1531,1531),(1532,1532,1532),(1533,1533,1533),(1534,1534,1534),(1535,1535,1535), +(1536,1536,1536),(1537,1537,1537),(1538,1538,1538),(1539,1539,1539),(1540,1540,1540), +(1541,1541,1541),(1542,1542,1542),(1543,1543,1543),(1544,1544,1544),(1545,1545,1545), +(1546,1546,1546),(1547,1547,1547),(1548,1548,1548),(1549,1549,1549),(1550,1550,1550), +(1551,1551,1551),(1552,1552,1552),(1553,1553,1553),(1554,1554,1554),(1555,1555,1555), +(1556,1556,1556),(1557,1557,1557),(1558,1558,1558),(1559,1559,1559),(1560,1560,1560), +(1561,1561,1561),(1562,1562,1562),(1563,1563,1563),(1564,1564,1564),(1565,1565,1565), +(1566,1566,1566),(1567,1567,1567),(1568,1568,1568),(1569,1569,1569),(1570,1570,1570), +(1571,1571,1571),(1572,1572,1572),(1573,1573,1573),(1574,1574,1574),(1575,1575,1575), +(1576,1576,1576),(1577,1577,1577),(1578,1578,1578),(1579,1579,1579),(1580,1580,1580), +(1581,1581,1581),(1582,1582,1582),(1583,1583,1583),(1584,1584,1584),(1585,1585,1585), +(1586,1586,1586),(1587,1587,1587),(1588,1588,1588),(1589,1589,1589),(1590,1590,1590), +(1591,1591,1591),(1592,1592,1592),(1593,1593,1593),(1594,1594,1594),(1595,1595,1595), +(1596,1596,1596),(1597,1597,1597),(1598,1598,1598),(1599,1599,1599),(1600,1600,1600), +(1601,1601,1601),(1602,1602,1602),(1603,1603,1603),(1604,1604,1604),(1605,1605,1605), +(1606,1606,1606),(1607,1607,1607),(1608,1608,1608),(1609,1609,1609),(1610,1610,1610), +(1611,1611,1611),(1612,1612,1612),(1613,1613,1613),(1614,1614,1614),(1615,1615,1615), +(1616,1616,1616),(1617,1617,1617),(1618,1618,1618),(1619,1619,1619),(1620,1620,1620), +(1621,1621,1621),(1622,1622,1622),(1623,1623,1623),(1624,1624,1624),(1625,1625,1625), +(1626,1626,1626),(1627,1627,1627),(1628,1628,1628),(1629,1629,1629),(1630,1630,1630), +(1631,1631,1631),(1632,1632,1632),(1633,1633,1633),(1634,1634,1634),(1635,1635,1635), +(1636,1636,1636),(1637,1637,1637),(1638,1638,1638),(1639,1639,1639),(1640,1640,1640), +(1641,1641,1641),(1642,1642,1642),(1643,1643,1643),(1644,1644,1644),(1645,1645,1645), +(1646,1646,1646),(1647,1647,1647),(1648,1648,1648),(1649,1649,1649),(1650,1650,1650), +(1651,1651,1651),(1652,1652,1652),(1653,1653,1653),(1654,1654,1654),(1655,1655,1655), +(1656,1656,1656),(1657,1657,1657),(1658,1658,1658),(1659,1659,1659),(1660,1660,1660), +(1661,1661,1661),(1662,1662,1662),(1663,1663,1663),(1664,1664,1664),(1665,1665,1665), +(1666,1666,1666),(1667,1667,1667),(1668,1668,1668),(1669,1669,1669),(1670,1670,1670), +(1671,1671,1671),(1672,1672,1672),(1673,1673,1673),(1674,1674,1674),(1675,1675,1675), +(1676,1676,1676),(1677,1677,1677),(1678,1678,1678),(1679,1679,1679),(1680,1680,1680), +(1681,1681,1681),(1682,1682,1682),(1683,1683,1683),(1684,1684,1684),(1685,1685,1685), +(1686,1686,1686),(1687,1687,1687),(1688,1688,1688),(1689,1689,1689),(1690,1690,1690), +(1691,1691,1691),(1692,1692,1692),(1693,1693,1693),(1694,1694,1694),(1695,1695,1695), +(1696,1696,1696),(1697,1697,1697),(1698,1698,1698),(1699,1699,1699),(1700,1700,1700), +(1701,1701,1701),(1702,1702,1702),(1703,1703,1703),(1704,1704,1704),(1705,1705,1705), +(1706,1706,1706),(1707,1707,1707),(1708,1708,1708),(1709,1709,1709),(1710,1710,1710), +(1711,1711,1711),(1712,1712,1712),(1713,1713,1713),(1714,1714,1714),(1715,1715,1715), +(1716,1716,1716),(1717,1717,1717),(1718,1718,1718),(1719,1719,1719),(1720,1720,1720), +(1721,1721,1721),(1722,1722,1722),(1723,1723,1723),(1724,1724,1724),(1725,1725,1725), +(1726,1726,1726),(1727,1727,1727),(1728,1728,1728),(1729,1729,1729),(1730,1730,1730), +(1731,1731,1731),(1732,1732,1732),(1733,1733,1733),(1734,1734,1734),(1735,1735,1735), +(1736,1736,1736),(1737,1737,1737),(1738,1738,1738),(1739,1739,1739),(1740,1740,1740), +(1741,1741,1741),(1742,1742,1742),(1743,1743,1743),(1744,1744,1744),(1745,1745,1745), +(1746,1746,1746),(1747,1747,1747),(1748,1748,1748),(1749,1749,1749),(1750,1750,1750), +(1751,1751,1751),(1752,1752,1752),(1753,1753,1753),(1754,1754,1754),(1755,1755,1755), +(1756,1756,1756),(1757,1757,1757),(1758,1758,1758),(1759,1759,1759),(1760,1760,1760), +(1761,1761,1761),(1762,1762,1762),(1763,1763,1763),(1764,1764,1764),(1765,1765,1765), +(1766,1766,1766),(1767,1767,1767),(1768,1768,1768),(1769,1769,1769),(1770,1770,1770), +(1771,1771,1771),(1772,1772,1772),(1773,1773,1773),(1774,1774,1774),(1775,1775,1775), +(1776,1776,1776),(1777,1777,1777),(1778,1778,1778),(1779,1779,1779),(1780,1780,1780), +(1781,1781,1781),(1782,1782,1782),(1783,1783,1783),(1784,1784,1784),(1785,1785,1785), +(1786,1786,1786),(1787,1787,1787),(1788,1788,1788),(1789,1789,1789),(1790,1790,1790), +(1791,1791,1791),(1792,1792,1792),(1793,1793,1793),(1794,1794,1794),(1795,1795,1795), +(1796,1796,1796),(1797,1797,1797),(1798,1798,1798),(1799,1799,1799),(1800,1800,1800), +(1801,1801,1801),(1802,1802,1802),(1803,1803,1803),(1804,1804,1804),(1805,1805,1805), +(1806,1806,1806),(1807,1807,1807),(1808,1808,1808),(1809,1809,1809),(1810,1810,1810), +(1811,1811,1811),(1812,1812,1812),(1813,1813,1813),(1814,1814,1814),(1815,1815,1815), +(1816,1816,1816),(1817,1817,1817),(1818,1818,1818),(1819,1819,1819),(1820,1820,1820), +(1821,1821,1821),(1822,1822,1822),(1823,1823,1823),(1824,1824,1824),(1825,1825,1825), +(1826,1826,1826),(1827,1827,1827),(1828,1828,1828),(1829,1829,1829),(1830,1830,1830), +(1831,1831,1831),(1832,1832,1832),(1833,1833,1833),(1834,1834,1834),(1835,1835,1835), +(1836,1836,1836),(1837,1837,1837),(1838,1838,1838),(1839,1839,1839),(1840,1840,1840), +(1841,1841,1841),(1842,1842,1842),(1843,1843,1843),(1844,1844,1844),(1845,1845,1845), +(1846,1846,1846),(1847,1847,1847),(1848,1848,1848),(1849,1849,1849),(1850,1850,1850), +(1851,1851,1851),(1852,1852,1852),(1853,1853,1853),(1854,1854,1854),(1855,1855,1855), +(1856,1856,1856),(1857,1857,1857),(1858,1858,1858),(1859,1859,1859),(1860,1860,1860), +(1861,1861,1861),(1862,1862,1862),(1863,1863,1863),(1864,1864,1864),(1865,1865,1865), +(1866,1866,1866),(1867,1867,1867),(1868,1868,1868),(1869,1869,1869),(1870,1870,1870), +(1871,1871,1871),(1872,1872,1872),(1873,1873,1873),(1874,1874,1874),(1875,1875,1875), +(1876,1876,1876),(1877,1877,1877),(1878,1878,1878),(1879,1879,1879),(1880,1880,1880), +(1881,1881,1881),(1882,1882,1882),(1883,1883,1883),(1884,1884,1884),(1885,1885,1885), +(1886,1886,1886),(1887,1887,1887),(1888,1888,1888),(1889,1889,1889),(1890,1890,1890), +(1891,1891,1891),(1892,1892,1892),(1893,1893,1893),(1894,1894,1894),(1895,1895,1895), +(1896,1896,1896),(1897,1897,1897),(1898,1898,1898),(1899,1899,1899),(1900,1900,1900), +(1901,1901,1901),(1902,1902,1902),(1903,1903,1903),(1904,1904,1904),(1905,1905,1905), +(1906,1906,1906),(1907,1907,1907),(1908,1908,1908),(1909,1909,1909),(1910,1910,1910), +(1911,1911,1911),(1912,1912,1912),(1913,1913,1913),(1914,1914,1914),(1915,1915,1915), +(1916,1916,1916),(1917,1917,1917),(1918,1918,1918),(1919,1919,1919),(1920,1920,1920), +(1921,1921,1921),(1922,1922,1922),(1923,1923,1923),(1924,1924,1924),(1925,1925,1925), +(1926,1926,1926),(1927,1927,1927),(1928,1928,1928),(1929,1929,1929),(1930,1930,1930), +(1931,1931,1931),(1932,1932,1932),(1933,1933,1933),(1934,1934,1934),(1935,1935,1935), +(1936,1936,1936),(1937,1937,1937),(1938,1938,1938),(1939,1939,1939),(1940,1940,1940), +(1941,1941,1941),(1942,1942,1942),(1943,1943,1943),(1944,1944,1944),(1945,1945,1945), +(1946,1946,1946),(1947,1947,1947),(1948,1948,1948),(1949,1949,1949),(1950,1950,1950), +(1951,1951,1951),(1952,1952,1952),(1953,1953,1953),(1954,1954,1954),(1955,1955,1955), +(1956,1956,1956),(1957,1957,1957),(1958,1958,1958),(1959,1959,1959),(1960,1960,1960), +(1961,1961,1961),(1962,1962,1962),(1963,1963,1963),(1964,1964,1964),(1965,1965,1965), +(1966,1966,1966),(1967,1967,1967),(1968,1968,1968),(1969,1969,1969),(1970,1970,1970), +(1971,1971,1971),(1972,1972,1972),(1973,1973,1973),(1974,1974,1974),(1975,1975,1975), +(1976,1976,1976),(1977,1977,1977),(1978,1978,1978),(1979,1979,1979),(1980,1980,1980), +(1981,1981,1981),(1982,1982,1982),(1983,1983,1983),(1984,1984,1984),(1985,1985,1985), +(1986,1986,1986),(1987,1987,1987),(1988,1988,1988),(1989,1989,1989),(1990,1990,1990), +(1991,1991,1991),(1992,1992,1992),(1993,1993,1993),(1994,1994,1994),(1995,1995,1995), +(1996,1996,1996),(1997,1997,1997),(1998,1998,1998),(1999,1999,1999); + +SELECT COUNT(*) FROM t1; + + +# +# Insert duplicate rows +# +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES (1,1,1); + +--error 1022 +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); + +select count(*) from t1; + + +# +# Test that select count(*) can see inserts made in the same transaction +# +begin; +SELECT COUNT(*) FROM t1; +INSERT INTO t1 VALUES +(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005); +SELECT COUNT(*) FROM t1; +rollback; + +# +# Insert duplicate rows, inside transaction +# try to commit +# +begin; + +--error 1022 +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); + +--error 1296 +commit; + +select * from t1 where pk1=1; +select * from t1 where pk1=10; +select count(*) from t1 where pk1 <= 10 order by pk1; +select count(*) from t1; + + +# +# Insert duplicate rows, inside transaction +# rollback +# +begin; + +--error 1022 +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); + +rollback; + +select * from t1 where pk1=1; +select * from t1 where pk1=10; +select count(*) from t1 where pk1 <= 10 order by pk1; +select count(*) from t1; + + +# +# Insert duplicate rows, inside transaction +# then try to select, finally rollback +# +begin; + +--error 1022 +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); +--error 1296 +SELECT * FROM t1 WHERE pk1=10; + +rollback; + +select * from t1 where pk1=1; +select * from t1 where pk1=10; +select count(*) from t1 where pk1 <= 10 order by pk1; +select count(*) from t1; + + +# +# Insert duplicate rows, inside transaction +# then try to select, finally commit +# +begin; + +--error 1022 +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); + +--error 1296 +SELECT * FROM t1 WHERE pk1=10; + +--error 1296 +SELECT * FROM t1 WHERE pk1=10; + +--error 1296 +commit; + +select * from t1 where pk1=1; +select * from t1 where pk1=10; +select count(*) from t1 where pk1 <= 10 order by pk1; +select count(*) from t1; + + +# +# Insert duplicate rows, inside transaction +# then try to do another insert +# +begin; + +--error 1022 +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); + +--error 1296 +INSERT INTO t1 values (4000, 40, 44); + +rollback; + +select * from t1 where pk1=1; +select * from t1 where pk1=10; +select count(*) from t1 where pk1 <= 10 order by pk1; +select count(*) from t1; + +# +# Insert duplicate rows using "insert .. select" + +# +--error 1022 +insert into t1 select * from t1 where b < 10 order by pk1; + +DELETE FROM t1 WHERE pk1=2; + +begin; +INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); +select * from t1 where pk1 < 3 order by pk1; +rollback; + +INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); +select * from t1 where pk1 < 3 order by pk1; + +REPLACE INTO t1 values(1, 78, 3); +select * from t1 where pk1=1; + +INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79; +select * from t1 where pk1 < 4 order by pk1; + +INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c; +select * from t1 where pk1 < 4 order by pk1; + +DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6; +INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b; +select * from t1 where pk1 = b and b != c order by pk1; + +# Test handling of duplicate unique +DELETE FROM t1; +CREATE UNIQUE INDEX bi ON t1(b); +INSERT INTO t1 VALUES +(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), +(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); +INSERT INTO t1 VALUES(0,1,0),(21,21,21) ON DUPLICATE KEY UPDATE pk1=b+10,b=b+10; +select * from t1 order by pk1; + +DROP TABLE t1; + +# +# Bug #6331: problem with 'insert ignore' +# + +CREATE TABLE t1(a INT) ENGINE=ndb; +INSERT IGNORE INTO t1 VALUES (1); +INSERT IGNORE INTO t1 VALUES (1); +INSERT IGNORE INTO t1 SELECT a FROM t1; +INSERT IGNORE INTO t1 SELECT a FROM t1; +INSERT IGNORE INTO t1 SELECT a FROM t1; +INSERT IGNORE INTO t1 VALUES (1); +INSERT IGNORE INTO t1 VALUES (1); +SELECT * FROM t1 ORDER BY a; +DELETE FROM t1; +CREATE UNIQUE INDEX ai ON t1(a); +INSERT IGNORE INTO t1 VALUES (1); +INSERT IGNORE INTO t1 VALUES (1); +INSERT IGNORE INTO t1 VALUES (NULL),(2); +SELECT * FROM t1 ORDER BY a; +DROP TABLE t1; + +# Ignore and NULL values +CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb; +INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3); +INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4); +SELECT * FROM t1 ORDER BY pk; +DROP TABLE t1; + +# +# Bug #27980 INSERT IGNORE wrongly ignores NULLs in unique index +# + +create table t1(a int primary key, b int, unique key(b)) engine=ndb; +insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); +select * from t1 order by a; +drop table t1; + +# Bug#26342 auto_increment_increment AND auto_increment_offset REALLY REALLY anger NDB cluster + +CREATE TABLE t1 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER; + +CREATE TABLE t2 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=MYISAM; + +SET @@session.auto_increment_increment=10; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +TRUNCATE t1; +TRUNCATE t2; +SET @@session.auto_increment_offset=5; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); +SELECT * FROM t1 ORDER BY pk; +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +TRUNCATE t1; +TRUNCATE t2; +SET @@session.auto_increment_increment=2; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +DROP TABLE t1, t2; + +CREATE TABLE t1 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; + +CREATE TABLE t2 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=MYISAM AUTO_INCREMENT = 7; + +SET @@session.auto_increment_offset=1; +SET @@session.auto_increment_increment=1; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +DROP TABLE t1, t2; + +CREATE TABLE t1 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3; + +CREATE TABLE t2 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=MYISAM AUTO_INCREMENT = 3; + +SET @@session.auto_increment_offset=5; +SET @@session.auto_increment_increment=10; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +DROP TABLE t1, t2; + +CREATE TABLE t1 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; + +CREATE TABLE t2 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=MYISAM AUTO_INCREMENT = 7; + +SET @@session.auto_increment_offset=5; +SET @@session.auto_increment_increment=10; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +DROP TABLE t1, t2; + +CREATE TABLE t1 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5; + +CREATE TABLE t2 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=MYISAM AUTO_INCREMENT = 5; + +SET @@session.auto_increment_offset=5; +SET @@session.auto_increment_increment=10; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +DROP TABLE t1, t2; + +CREATE TABLE t1 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100; + +CREATE TABLE t2 ( + pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=MYISAM AUTO_INCREMENT = 100; + +SET @@session.auto_increment_offset=5; +SET @@session.auto_increment_increment=10; +INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); +INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); +SELECT * FROM t1 ORDER BY pk; +SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; +DROP TABLE t1, t2; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_limit.test b/mysql-test/suite/ndb/t/ndb_limit.test new file mode 100644 index 00000000000..01613606d66 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_limit.test @@ -0,0 +1,85 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t2; +--enable_warnings + + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + + +# +# insert records into table +# +let $1=1000; +disable_query_log; +while ($1) +{ + eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1); + dec $1; +} +enable_query_log; + +select count(*) from t2; + +delete from t2 limit 1; +select count(*) from t2; + +delete from t2 limit 100; +select count(*) from t2; + +delete from t2 limit 1000; +select count(*) from t2; + +update t2 set c=12345678 limit 100; +select count(*) from t2 where c=12345678; +select count(*) from t2 where c=12345678 limit 1000; + +select * from t2 limit 0; + +drop table t2; + +CREATE TABLE `t2` ( + `views` int(11) NOT NULL default '0', + `clicks` int(11) NOT NULL default '0', + `day` date NOT NULL default '0000-00-00', + `hour` tinyint(4) NOT NULL default '0', + `bannerid` smallint(6) NOT NULL default '0', + `zoneid` smallint(6) NOT NULL default '0', + `source` varchar(50) NOT NULL default '', + PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`), + KEY `bannerid_day` (`bannerid`,`day`), + KEY `zoneid` (`zoneid`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; + +INSERT INTO `t2` VALUES +( 1,0,'2004-09-17', 5,100,100,''), +( 1,0,'2004-09-18', 7,100,100,''), +( 17,0,'2004-09-27',20,132,100,''), +( 4,0,'2004-09-16',23,132,100,''), +( 86,0,'2004-09-18', 7,196,196,''), +( 11,0,'2004-09-16',16,132,100,''), +(140,0,'2004-09-18', 0,100,164,''), +( 2,0,'2004-09-17', 7,132,100,''), +(846,0,'2004-09-27',11,132,164,''), +( 1,0,'2004-09-18', 8,132,100,''), +( 22,0,'2004-09-27', 9,164,132,''), +(711,0,'2004-09-27', 9,100,164,''), +( 11,0,'2004-09-18', 0,196,132,''), +( 41,0,'2004-09-27',15,196,132,''), +( 57,0,'2004-09-18', 2,164,196,''); + +SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') +as date_formatted FROM t2 GROUP BY day ORDER BY day DESC; + +SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') +as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2; + +drop table t2; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_load.test b/mysql-test/suite/ndb/t/ndb_load.test new file mode 100644 index 00000000000..af2df70b74e --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_load.test @@ -0,0 +1,24 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# +# Basic test for different types of loading data +# + +# should give duplicate key +CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; +--error 1022 +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ; +DROP TABLE t1; + +# now without a primary key we should be ok +CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ; +SELECT * FROM t1 ORDER BY word; +DROP TABLE t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_loaddatalocal.test b/mysql-test/suite/ndb/t/ndb_loaddatalocal.test new file mode 100644 index 00000000000..3eae3891f43 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_loaddatalocal.test @@ -0,0 +1,70 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +create table t1(a int) engine=myisam; +let $1=10000; +disable_query_log; +set SQL_LOG_BIN=0; +while ($1) +{ + insert into t1 values(1); + dec $1; +} +set SQL_LOG_BIN=1; +enable_query_log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; +#This will generate a 20KB file, now test LOAD DATA LOCAL +drop table t1; + +create table t1(a int) engine=ndb; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; +select count(*) from t1; +--remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile +drop table t1; + +create table t1(a int) engine=myisam; +insert into t1 values (1), (2), (2), (3); +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; +drop table t1; + +create table t1(a int primary key) engine=ndb; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; +--remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile +select * from t1 order by a; +drop table t1; + +create table t1(a int) engine=myisam; +insert into t1 values (1), (1), (2), (3); +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; +drop table t1; + +create table t1(a int primary key) engine=ndb; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; +--remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile +select * from t1 order by a; +drop table t1; + +create table t1(a int) engine=myisam; +insert into t1 values (1), (2), (3), (3); +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; +drop table t1; + +create table t1(a int primary key) engine=ndb; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; +--remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile +select * from t1 order by a; +drop table t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_lock.test b/mysql-test/suite/ndb/t/ndb_lock.test new file mode 100644 index 00000000000..b6cd1ca7eb4 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_lock.test @@ -0,0 +1,269 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +--enable_warnings + +# +# Transaction lock test to show that the NDB +# table handler is working properly with +# transaction locks +# + +# +# Testing of scan isolation +# +connection con1; +create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; +insert into t1 values (1,'one'), (2,'two'); +select * from t1 order by x; + +connection con2; +select * from t1 order by x; + +connection con1; +start transaction; +insert into t1 values (3,'three'); +select * from t1 order by x; + +connection con2; +start transaction; +select * from t1 order by x; + +connection con1; +commit; + +connection con2; +select * from t1 order by x; +commit; + +drop table t1; + +### +# Bug#6020 +create table t1 (pk integer not null primary key, u int not null, o int not null, + unique(u), key(o)) engine = ndb; +insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); + +lock tables t1 write; +delete from t1 where pk = 1; +unlock tables; +select * from t1 order by pk; +insert into t1 values (1,1,1); + +lock tables t1 write; +delete from t1 where u = 1; +unlock tables; +select * from t1 order by pk; +insert into t1 values (1,1,1); + +lock tables t1 write; +delete from t1 where o = 1; +unlock tables; +select * from t1 order by pk; +insert into t1 values (1,1,1); + +drop table t1; + +# Lock for update + +create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb; + +insert into t1 values (1,'one',1); + +# PK access +connection con1; +begin; +select * from t1 where x = 1 for update; + +connection con2; +begin; +--error 1205 +select * from t1 where x = 1 for update; +rollback; + +connection con1; +rollback; +insert into t1 values (2,'two',2),(3,"three",3); +begin; +select * from t1 where x = 1 for update; + +connection con2; +--error 1205 +select * from t1 where x = 1 for update; +select * from t1 where x = 2 for update; +rollback; + +connection con1; +commit; + +# table scan +# +# Note that there are two distinct execution paths in which we unlock +# non-matching rows inspected during table scan - one that is used in +# case of filesort and one that used in rest of cases. Below we cover +# the latter (Bug #20390 "SELECT FOR UPDATE does not release locks of +# untouched rows in full table scans"). +connection con1; +begin; +# We can't use "order by x" here as it will cause filesort +--replace_column 1 # 2 # 3 # +select * from t1 where y = 'one' or y = 'three' for update; + +connection con2; +begin; +# Have to check with pk access here since scans take locks on +# all rows and then release them in chunks +select * from t1 where x = 2 for update; +--error 1205 +select * from t1 where x = 1 for update; +rollback; + +connection con1; +commit; + +# And now the test for case with filesort +begin; +select * from t1 where y = 'one' or y = 'three' order by x for update; +connection con2; +begin; +select * from t1 where x = 2 for update; +--error 1205 +select * from t1 where x = 1 for update; +rollback; + +connection con1; +commit; + +# index scan +connection con1; +begin; +select * from t1 where z > 1 and z < 3 for update; + +connection con2; +begin; +# Have to check with pk access here since scans take locks on +# all rows and then release them in chunks +select * from t1 where x = 1 for update; +--error 1105,1205 +select * from t1 where x = 2 for update; +rollback; + +connection con1; +commit; + +# share locking + +# PK access +connection con1; +begin; +select * from t1 where x = 1 lock in share mode; + +connection con2; +begin; +select * from t1 where x = 1 lock in share mode; +select * from t1 where x = 2 for update; +--error 1205 +select * from t1 where x = 1 for update; +rollback; + +connection con1; +commit; + +# table scan +connection con1; +begin; +# We can't use "order by x" here as it will cause filesort +--replace_column 1 # 2 # 3 # +select * from t1 where y = 'one' or y = 'three' lock in share mode; + +connection con2; +begin; +select * from t1 where y = 'one' lock in share mode; +# Have to check with pk access here since scans take locks on +# all rows and then release them in chunks +select * from t1 where x = 2 for update; +--error 1205 +select * from t1 where x = 1 for update; +rollback; + +connection con1; +commit; + +# And the same test for case with filesort +connection con1; +begin; +select * from t1 where y = 'one' or y = 'three' order by x lock in share mode; + +connection con2; +begin; +select * from t1 where y = 'one' lock in share mode; +select * from t1 where x = 2 for update; +--error 1205 +select * from t1 where x = 1 for update; +rollback; + +connection con1; +commit; + +# index scan +connection con1; +begin; +select * from t1 where z > 1 and z < 3 lock in share mode; + +connection con2; +begin; +select * from t1 where z = 1 lock in share mode; +# Have to check with pk access here since scans take locks on +# all rows and then release them in chunks +select * from t1 where x = 1 for update; +--error 1205 +select * from t1 where x = 2 for update; +rollback; + +connection con1; +commit; + +drop table t1; + +# End of 4.1 tests + +# +# Bug #17812 Previous lock table for write causes "stray" lock +# although table is recreated +# +# this creating, locking, and dropping causes a subsequent hang +# on the delete below waiting for table t2 the locking in the +# "other" connection is relevant, as without it there is no problem +# +connection con1; +create table t3 (id2 int) engine=ndb; + +connection con2; +lock tables t3 write; +unlock tables; + +connection con1; +drop table t3; + +connection con1; +create table t2 (id int, j int) engine=ndb; +insert into t2 values (2, 2); +create table t3 (id int) engine=ndb; + +connection con2; +lock tables t3 read; + +connection con1; +# here we get a hang before bugfix although we shouldn't +delete t2 from t2, t3 where t2.id = t3.id; + +connection con2; +unlock tables; + +connection con1; +drop table t2, t3; diff --git a/mysql-test/suite/ndb/t/ndb_minmax.test b/mysql-test/suite/ndb/t/ndb_minmax.test new file mode 100644 index 00000000000..a3ac677cd2a --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_minmax.test @@ -0,0 +1,65 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1, t2; +--enable_warnings + +CREATE TABLE t1 ( + a int PRIMARY KEY +) engine = ndb; + +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +INSERT INTO t1 VALUES (6); + +select MAX(a) from t1; +select MAX(a) from t1; +select MAX(a) from t1; +select MAX(a) from t1; +select MIN(a) from t1; +select MIN(a) from t1; +select MIN(a) from t1; +select * from t1 order by a; +select MIN(a) from t1; +select MAX(a) from t1; +select MAX(a) from t1; +select * from t1 order by a; +drop table t1; + + +CREATE TABLE t2 ( + a int PRIMARY KEY, + b int not null, + c int not null, + KEY(b), + UNIQUE(c) +) engine = ndb; + +INSERT INTO t2 VALUES (1, 5, 1); +INSERT INTO t2 VALUES (2, 2, 7); +INSERT INTO t2 VALUES (3, 3, 3); +INSERT INTO t2 VALUES (4, 4, 4); +INSERT INTO t2 VALUES (5, 5, 5); +INSERT INTO t2 VALUES (6, 6, 6); +INSERT INTO t2 VALUES (7, 2, 10); +INSERT INTO t2 VALUES (8, 10, 2); + + +select MAX(a) from t2; +select MAX(b) from t2; +select MAX(c) from t2; +select MIN(a) from t2; +select MIN(b) from t2; +select MIN(c) from t2; +select * from t2 order by a; +select MIN(b) from t2; +select MAX(a) from t2; +select MAX(c) from t2; +select * from t2 order by a; +drop table t2; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_multi.test b/mysql-test/suite/ndb/t/ndb_multi.test new file mode 100644 index 00000000000..3482db1d1b2 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_multi.test @@ -0,0 +1,126 @@ +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +connection server2; +drop table if exists t1, t2, t3, t4; +connection server1; +drop table if exists t1, t2, t3, t4; +--enable_warnings + +flush status; + +# Create test tables on server1 +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +select * from t2; +show status like 'handler_discover%'; + +# Check dropping and recreating table on same server +connect (con1,localhost,root,,test); +connect (con2,localhost,root,,test); +connection con1; +select * from t1; +connection con2; +drop table t1; +create table t1 (a int) engine=ndbcluster; +insert into t1 value (2); +connection con1; +select * from t1; + +# Check dropping and recreating table on different server +connection server2; +show status like 'handler_discover%'; +drop table t1; +create table t1 (a int) engine=ndbcluster; +insert into t1 value (2); +connection server1; +select * from t1; +select * from t1; + +# Connect to server2 and use the tables from there +connection server2; +flush status; +select * from t1; +update t1 set a=3 where a=2; +show status like 'handler_discover%'; + +# Create a new table on server2 +create table t3 (a int not null primary key, b varchar(22), +c int, last_col text) engine=ndb; +insert into t3 values(1, 'Hi!', 89, 'Longtext column'); +create table t4 (pk int primary key, b int) engine=ndb; + +# Check that the tables are accessible from server1 +connection server1; +select * from t1; +select * from t3; +show tables like 't4'; +show tables; + +drop table t1, t2, t3, t4; +# bug#21378 +connection server1; +create table t1(c1 int key)ENGINE=MyISAM; +insert into t1 values(1),(3),(5); +select * from t1 order by c1; + +connection server2; +show tables; +create table t1(c1 int key)ENGINE=MyISAM; +insert into t1 values(100),(344),(533); +select * from t1 order by c1; + +connection server1; +alter table t1 engine=ndb; + +connection server2; +show tables; +select * from t1 order by c1; +drop table t1; + +connection server1; +select * from t1 order by c1; +drop table t1; +# End of 4.1 tests + +# Check distributed drop of database in 5.1 +create database db; +use db; +create table t1(x int) engine=ndb; + +connection server2; +use db; +show tables; + +connection server1; +drop database db; + +connection server2; +--error 1049 +show tables; + +connection server1; + +# bug#21495 +create database db; +use db; +create table t1(x int) engine=ndb; + +connection server2; +use db; +create table t2(x int) engine=myisam; +show tables; + +connection server1; +drop database db; + +connection server2; +show tables; +drop database db; + +connection server1; diff --git a/mysql-test/suite/ndb/t/ndb_multi_row.test b/mysql-test/suite/ndb/t/ndb_multi_row.test new file mode 100644 index 00000000000..632a9fda89a --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_multi_row.test @@ -0,0 +1,76 @@ +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/not_embedded.inc +-- source include/have_binlog_format_row.inc + + +--disable_warnings +connection server2; +drop table if exists t1, t2, t3, t4; +connection server1; +drop table if exists t1, t2, t3, t4; +--enable_warnings + +flush status; + +# Create test tables on server1 +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +select * from t2; +show status like 'handler_discover%'; + +# Check dropping and recreating table on same server +connect (con1,localhost,root,,test); +connect (con2,localhost,root,,test); +connection con1; +select * from t1; +connection con2; +drop table t1; +create table t1 (a int) engine=ndbcluster; +insert into t1 value (2); +connection con1; +select * from t1; + +# Check dropping and recreating table on different server +connection server2; +show status like 'handler_discover%'; +drop table t1; +create table t1 (a int) engine=ndbcluster; +insert into t1 value (2); +connection server1; +## Currently a retry is required remotely +#--error 1412 +#select * from t1; +#show warnings; +#flush table t1; +# Table definition change should be propagated automatically +select * from t1; + +# Connect to server2 and use the tables from there +connection server2; +flush status; +select * from t1; +update t1 set a=3 where a=2; +show status like 'handler_discover%'; + +# Create a new table on server2 +create table t3 (a int not null primary key, b varchar(22), +c int, last_col text) engine=ndb; +insert into t3 values(1, 'Hi!', 89, 'Longtext column'); +create table t4 (pk int primary key, b int) engine=ndb; + +# Check that the tables are accessible from server1 +connection server1; +select * from t1; +select * from t3; +show tables like 't4'; +show tables; + +drop table t1, t2, t3, t4; +connection server2; +drop table if exists t1, t3, t4; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_partition_error.test b/mysql-test/suite/ndb/t/ndb_partition_error.test new file mode 100644 index 00000000000..9db2a6a6f6d --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_partition_error.test @@ -0,0 +1,74 @@ +-- source include/have_ndb.inc +#--disable_abort_on_error +# +# Simple test for the partition storage engine +# Focuses on range partitioning tests +# +#-- source include/have_partition.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +--disable_query_log +set new=on; +--enable_query_log +# +# Partition by range, generate node group error +# +--error 1005 +CREATE TABLE t1 ( +a int not null, +b int not null, +c int not null, +primary key(a,b), +index (a)) +engine = ndb +partition by range (a) +partitions 3 +(partition x1 values less than (5) nodegroup 12, + partition x2 values less than (10) nodegroup 13, + partition x3 values less than (20) nodegroup 14); +show warnings; + +# +# Partition by range, create normal valid table +# +CREATE TABLE t1 ( +a int not null, +b int not null, +c int not null, +primary key(a)) +engine = ndb +partition by range (a) +partitions 3 +(partition x1 values less than (5), + partition x2 values less than (10), + partition x3 values less than (20)); + +drop table t1; + +# +# Bug #17763 mysqld cores with list partitioning if update to missing partition +# +CREATE TABLE t1 (id INT) ENGINE=NDB + PARTITION BY LIST(id) + (PARTITION p0 VALUES IN (2, 4), + PARTITION p1 VALUES IN (42, 142)); +INSERT INTO t1 VALUES (2); +--error ER_NO_PARTITION_FOR_GIVEN_VALUE +UPDATE t1 SET id=5 WHERE id=2; +DROP TABLE t1; + +# +# NULL for LIST partition +# +create table t1 (a int,b int, c int) +engine = ndb +partition by list(a) +partitions 2 +(partition x123 values in (11, 12), + partition x234 values in (5, 1)); +--error ER_NO_PARTITION_FOR_GIVEN_VALUE +insert into t1 values (NULL,1,1); +drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt b/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt new file mode 100644 index 00000000000..955f7692c8b --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_partition_error2-master.opt @@ -0,0 +1 @@ +--ndbcluster diff --git a/mysql-test/suite/ndb/t/ndb_partition_error2.test b/mysql-test/suite/ndb/t/ndb_partition_error2.test new file mode 100644 index 00000000000..afedd0e3c5c --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_partition_error2.test @@ -0,0 +1,14 @@ +disable_query_log; +--require r/true.require +select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; +enable_query_log; + +--disable_warnings +drop table if exists t1; +--enable_warnings +# +# Bug #27359 Partitions: memory allocation error message +# +--error ER_PARTITION_NOT_DEFINED_ERROR +create table t1 (s1 int) engine=ndbcluster; + diff --git a/mysql-test/suite/ndb/t/ndb_partition_key.test b/mysql-test/suite/ndb/t/ndb_partition_key.test new file mode 100644 index 00000000000..78e2c9d15c2 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_partition_key.test @@ -0,0 +1,229 @@ +-- source include/have_ndb.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# +# Basic syntax test +# + +# Support for partition key verified +CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c)) + ENGINE = NDB + PARTITION BY KEY (a,b); + +insert into t1 values (1,1,1,1); +select * from t1; +update t1 set d = 2 where a = 1 and b = 1 and c = 1; +select * from t1; +delete from t1; +select * from t1; + +drop table t1; + +# only support for partition key on primary key +--error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF +CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b)) + ENGINE = NDB + PARTITION BY KEY (c); + +CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b)) + ENGINE = NDB + PARTITION BY KEY (a); + +insert into t1 values + (1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3), + (1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3); + +select * from t1 order by b; + +DROP TABLE t1; + +# +# Test partition and char support +# + +CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT, + PRIMARY KEY (a,b,c) USING HASH) + ENGINE=NDB + DEFAULT CHARSET=latin1 + PARTITION BY KEY (b); + +insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1); + +# should show only one attribute with DISTRIBUTION KEY +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | sed 's/Version: [0-9]*//' | sed 's/\(Length of frm data: \)[0-9]*/\1#/' + +# +# Test that explicit partition info is not shown in show create table +# result should not contain (PARTITION P0 ... etc) since this is what shows up in +# mysqldump, and we don't want that info there +# +show create table t1; + +DROP TABLE t1; + +# +# Bug #13155: Problem in Create Table using SHOW CREATE TABLE syntax +# +CREATE TABLE t1 (a int not null primary key) +PARTITION BY KEY(a) +(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); + +drop table t1; + +CREATE TABLE t1 (a int not null primary key); +ALTER TABLE t1 +PARTITION BY KEY(a) +(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); + +drop table t1; + +# +# Bug #17754 Improper handling of removal of partitioning in ALTER TABLE +# Also added a number of general test cases in the same area +# +create table t1 (a int) +engine=ndb +partition by key(a) +(partition p0, partition p1); +show create table t1; + +alter table t1 engine=heap; +show create table t1; + +alter table t1 engine=ndb; +show create table t1; + +alter table t1 engine=heap remove partitioning; +show create table t1; + +alter table t1 engine=ndb +partition by key(a) +(partition p0, partition p1 engine = ndb); +show create table t1; + +alter table t1 +partition by key (a) +(partition p0 engine=ndb, partition p1 engine=ndb); +show create table t1; + +alter table t1 remove partitioning; +show create table t1; + +--error ER_MIX_HANDLER_ERROR +alter table t1 +partition by key(a) +(partition p0 engine=ndb, partition p1); + +alter table t1 +engine=ndb +partition by key(a) +(partition p0 engine=ndb, partition p1 engine = ndb); +show create table t1; + +drop table t1; + +# +# BUG 16810 Out of memory when coalesce partition +# +CREATE TABLE t1 ( + c1 MEDIUMINT NOT NULL AUTO_INCREMENT, + c2 TEXT NOT NULL, + c3 INT NOT NULL, + c4 BIT NOT NULL, + c5 FLOAT, + c6 VARCHAR(255), + c7 TIMESTAMP, + PRIMARY KEY(c1,c3)) + ENGINE=NDB + PARTITION BY KEY(c3) PARTITIONS 5; + +let $j= 11; +--disable_query_log +while ($j) +{ + eval INSERT INTO t1 VALUES (NULL, "Tested Remotely from Texas, USA", $j, +b'0', + $j.00,"By JBM $j","2006-01-26"); + dec $j; +} +--enable_query_log +ALTER TABLE t1 COALESCE PARTITION 4; + +DROP TABLE t1; + +# +# Bug 16822: OPTIMIZE TABLE hangs test +# +CREATE TABLE t1 (a int primary key) +ENGINE=NDB +PARTITION BY KEY(a); +--error 1031 +ALTER TABLE t1 OPTIMIZE PARTITION p0; +--error 1031 +ALTER TABLE t1 CHECK PARTITION p0; +--error 1031 +ALTER TABLE t1 REPAIR PARTITION p0; +--error 1031 +ALTER TABLE t1 ANALYZE PARTITION p0; +--error 1031 +ALTER TABLE t1 REBUILD PARTITION p0; +DROP TABLE t1; + +# +# BUG 16806: ALTER TABLE fails +# +CREATE TABLE t1 ( + c1 MEDIUMINT NOT NULL AUTO_INCREMENT, + c2 TEXT NOT NULL, + c3 INT NOT NULL, + PRIMARY KEY(c1,c3)) + ENGINE=NDB + PARTITION BY KEY(c3) PARTITIONS 5; + +ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; +DROP TABLE t1; + +CREATE TABLE t1 ( + c1 MEDIUMINT NOT NULL AUTO_INCREMENT, + c2 TEXT NOT NULL, + c3 INT NOT NULL, + PRIMARY KEY(c1,c3)) + ENGINE=NDB + PARTITION BY KEY(c3) + (PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); + +ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; +SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE +table_name = "t1"; +DROP TABLE t1; + +# bug#25587 + +CREATE TABLE t1 ( +a tinyint unsigned NOT NULL, +b bigint(20) unsigned NOT NULL, +c char(12), +PRIMARY KEY (a,b) +) ENGINE ndb DEFAULT CHARSET=latin1 PARTITION BY KEY (a); + +insert into t1 values(1,1,'1'), (2,2,'2'), (3,3,'3'), (4,4,'4'), (5,5,'5'); +select * from t1 where a = 1; +select * from t1 where a = 2; +select * from t1 where a = 3; +select * from t1 where a = 4; +select * from t1 where a = 5; +delete from t1 where a = 1; +select * from t1 order by 1; +delete from t1 where a = 2; +select * from t1 order by 1; +delete from t1 where a = 3; +select * from t1 order by 1; +delete from t1 where a = 4; +select * from t1 order by 1; +delete from t1 where a = 5; +select * from t1 order by 1; + +drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_partition_list.test b/mysql-test/suite/ndb/t/ndb_partition_list.test new file mode 100644 index 00000000000..ccfcdbc84f4 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_partition_list.test @@ -0,0 +1,68 @@ +--source include/have_ndb.inc +# +# Simple test for the partition storage engine +# Focuses on range partitioning tests +# +#-- source include/have_partition.inc + +--disable_query_log +set new=on; +--enable_query_log + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# Partition by list, basic +# + +CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL, + f_char1 CHAR(10), + f_char2 CHAR(10), f_charbig VARCHAR(1000), +PRIMARY KEY (f_int1,f_int2)) +ENGINE = NDB +PARTITION BY LIST(MOD(f_int1 + f_int2,4)) +(PARTITION part_3 VALUES IN (-3), + PARTITION part_2 VALUES IN (-2), + PARTITION part_1 VALUES IN (-1), + PARTITION part0 VALUES IN (0), + PARTITION part1 VALUES IN (1), + PARTITION part2 VALUES IN (2), + PARTITION part3 VALUES IN (3,4,5)); + +INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; +INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; + +SELECT * FROM t1 ORDER BY f_int1; + +DROP TABLE t1; + +# +# Partition by list, no pk +# + +CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10), + f_char2 CHAR(10), f_charbig VARCHAR(1000)) +ENGINE = NDB +PARTITION BY LIST(f_int1) +(PARTITION part_1 VALUES IN (-1), + PARTITION part0 VALUES IN (0,1), + PARTITION part1 VALUES IN (2)); + +INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; +INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; +INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; +--error ER_NO_PARTITION_FOR_GIVEN_VALUE +INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; + +SELECT * FROM t1 ORDER BY f_int1; + +DROP TABLE t1; + diff --git a/mysql-test/suite/ndb/t/ndb_partition_range.test b/mysql-test/suite/ndb/t/ndb_partition_range.test new file mode 100644 index 00000000000..7952ba502d2 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_partition_range.test @@ -0,0 +1,264 @@ +-- source include/have_ndb.inc +#--disable_abort_on_error +# +# Simple test for the partition storage engine +# Focuses on range partitioning tests +# +#-- source include/have_partition.inc + +--disable_query_log +set new=on; +--enable_query_log + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# Partition by range, basic +# +CREATE TABLE t1 ( +a int not null, +b int not null, +c int not null, +primary key(a,b), +index (a)) +engine = ndb +partition by range (a) +partitions 3 +(partition x1 values less than (5), + partition x2 values less than (10), + partition x3 values less than (20)); + +# Simple insert and verify test +INSERT into t1 values (1, 1, 1); +INSERT into t1 values (6, 1, 1); +INSERT into t1 values (10, 1, 1); +INSERT into t1 values (15, 1, 1); + +--replace_column 16 # 19 # 20 # +select * from information_schema.partitions where table_name= 't1'; + +select * from t1 order by a; + +select * from t1 where a=1 order by a; +select * from t1 where a=15 and b=1 order by a; +select * from t1 where a=21 and b=1 order by a; +select * from t1 where a=21 order by a; +select * from t1 where a in (1,6,10,21) order by a; +select * from t1 where b=1 and a in (1,6,10,21) order by a; + +drop table t1; + +# +# Partition by range, basic +# +CREATE TABLE t1 ( +a int not null, +b int not null, +c int not null, +primary key(b), +unique (a)) +engine = ndb +partition by range (b) +partitions 3 +(partition x1 values less than (5), + partition x2 values less than (10), + partition x3 values less than (20)); + +# Simple insert and verify test +INSERT into t1 values (1, 1, 1); +INSERT into t1 values (2, 6, 1); +INSERT into t1 values (3, 10, 1); +INSERT into t1 values (4, 15, 1); + +select * from t1 order by a; +UPDATE t1 set a = 5 WHERE b = 15; +select * from t1 order by a; +UPDATE t1 set a = 6 WHERE a = 5; +select * from t1 order by a; + +select * from t1 where b=1 order by b; +select * from t1 where b=15 and a=1 order by b; +select * from t1 where b=21 and a=1 order by b; +select * from t1 where b=21 order by b; +select * from t1 where b in (1,6,10,21) order by b; +select * from t1 where a in (1,2,5,6) order by b; +select * from t1 where a=1 and b in (1,6,10,21) order by b; + +DELETE from t1 WHERE b = 6; +DELETE from t1 WHERE a = 6; + +# +# Test that explicit partition info _is_ shown in show create table +# result _should_ contain (PARTITION x1 ... etc) +# +show create table t1; + +drop table t1; + +# +# Bug #17499, #17687 +# Alter partitioned NDB table causes mysqld to core +# + +CREATE TABLE t1 + (id MEDIUMINT NOT NULL, + b1 BIT(8), + vc VARCHAR(255), + bc CHAR(255), + d DECIMAL(10,4) DEFAULT 0, + f FLOAT DEFAULT 0, + total BIGINT UNSIGNED, + y YEAR, + t DATE) ENGINE=NDB + PARTITION BY RANGE (YEAR(t)) + (PARTITION p0 VALUES LESS THAN (1901), + PARTITION p1 VALUES LESS THAN (1946), + PARTITION p2 VALUES LESS THAN (1966), + PARTITION p3 VALUES LESS THAN (1986), + PARTITION p4 VALUES LESS THAN (2005), + PARTITION p5 VALUES LESS THAN MAXVALUE); + +INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +SELECT * FROM t1; +ALTER TABLE t1 ENGINE=MYISAM; +SELECT * FROM t1; +DROP TABLE t1; + +CREATE LOGFILE GROUP lg1 + ADD UNDOFILE 'undofile.dat' + INITIAL_SIZE 16M + UNDO_BUFFER_SIZE=1M + ENGINE=NDB; + +CREATE TABLESPACE ts1 + ADD DATAFILE 'datafile.dat' + USE LOGFILE GROUP lg1 + INITIAL_SIZE 12M + ENGINE NDB; + +CREATE TABLE test.t1 ( + a1 INT, + a2 TEXT NOT NULL, + a3 BIT NOT NULL, + a4 DECIMAL(8,3), + a5 INT NOT NULL, + a6 INT, + PRIMARY KEY(a1)) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB + PARTITION BY LIST (a1) + (PARTITION p0 VALUES IN (1,2,3,4,5), + PARTITION p1 VALUES IN (6,7,8,9, 10), + PARTITION p2 VALUES IN (11, 12, 13, 14, 15)); + +# Alter table directly without any statements inbetween +ALTER TABLE test.t1 DROP COLUMN a6; +ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255); + +let $j= 15; +--disable_query_log +while ($j) +{ +eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA", +b'1',$j.00,$j+1,"By NIK $j"); +dec $j; +} +--enable_query_log +SELECT COUNT(*) FROM test.t1; + +ALTER TABLE test.t1 DROP COLUMN a4; +SELECT COUNT(*) FROM test.t1; + +DROP TABLE t1; + +CREATE TABLE test.t1 ( + a1 INT, + a2 TEXT NOT NULL, + a3 BIT NOT NULL, + a4 DECIMAL(8,3), + a5 INT NOT NULL, + a6 VARCHAR(255), + PRIMARY KEY(a1)) + TABLESPACE ts1 STORAGE DISK ENGINE=NDB + PARTITION BY HASH(a1) + PARTITIONS 4; + +let $j= 15; +--disable_query_log +while ($j) +{ +eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA", +b'1',$j.00,$j+1,"By NIK $j"); +dec $j; +} +--enable_query_log +SELECT COUNT(*) FROM test.t1; + +ALTER TABLE test.t1 DROP COLUMN a4; +SELECT COUNT(*) FROM test.t1; + +DROP TABLE t1; + +ALTER TABLESPACE ts1 + DROP DATAFILE 'datafile.dat' + ENGINE=NDB; +DROP TABLESPACE ts1 ENGINE=NDB; +DROP LOGFILE GROUP lg1 ENGINE=NDB; + + +# +# Bug #17701 ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test +# + +CREATE TABLE t1 + (id MEDIUMINT NOT NULL, + b1 BIT(8), + vc VARCHAR(255), + bc CHAR(255), + d DECIMAL(10,4) DEFAULT 0, + f FLOAT DEFAULT 0, + total BIGINT UNSIGNED, + y YEAR, + t DATE) ENGINE=NDB + PARTITION BY LIST(id) + (PARTITION p0 VALUES IN (2, 4), + PARTITION p1 VALUES IN (42, 142)); + +INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +SELECT * FROM t1; +ALTER TABLE t1 ADD PARTITION + (PARTITION p2 VALUES IN (412)); +SELECT * FROM t1; +DROP TABLE t1; + +# +# Bug #17806 Update on NDB table with list partition causes mysqld to core +# Bug #16385 Partitions: crash when updating a range partitioned NDB table +# +CREATE TABLE t1 ( +a int not null, +b int not null, +c int not null) +partition by list(a) +partitions 2 +(partition x123 values in (1,5,6), + partition x234 values in (4,7,8)); +INSERT into t1 VALUES (5,1,1); +select * from t1; +UPDATE t1 SET a=8 WHERE a=5 AND b=1; +select * from t1; +drop table t1; + +CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb +PARTITION BY RANGE(f1) +( PARTITION part1 VALUES LESS THAN (2), +PARTITION part2 VALUES LESS THAN (1000)); +INSERT INTO t1 VALUES(1, '---1---'); +INSERT INTO t1 VALUES(2, '---2---'); +select * from t1 order by f1; +UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2; +select * from t1 order by f1; +UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1; +select * from t1 order by f1; +drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_read_multi_range.test b/mysql-test/suite/ndb/t/ndb_read_multi_range.test new file mode 100644 index 00000000000..b490eeb68a3 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_read_multi_range.test @@ -0,0 +1,319 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1, t2, r1; +--enable_warnings + +# +# Basic test to see that batching is working +# + +create table t1 ( + a int primary key, + b int not null, + c int not null, + index(b), unique index using hash(c) +) engine = ndb; +insert into t1 values + (1,2,1),(2,3,2),(3,4,3),(4,5,4), + (5,2,12),(6,3,11),(7,4,10),(8,5,9), + (9,2,8),(10,3,7),(11,4,6),(12,5,5); + +# batch on primary key +create table r1 as select * from t1 where a in (2,8,12); +select * from r1 order by a; +drop table r1; + +# batch on ordered index +create table r1 as select * from t1 where b in (1,2,5); +select * from r1 order by a; +drop table r1; + +# batch on unique hash index +create table r1 as select * from t1 where c in (2,8,12); +select * from r1 order by a; +drop table r1; + +# batch mixed +create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1); +select * from r1 order by a; +drop table r1; + +# batch on primary key, missing values +create table r1 as select * from t1 where a in (33,8,12); +select * from r1 order by a; +drop table r1; +create table r1 as select * from t1 where a in (2,33,8,12,34); +select * from r1 order by a; +drop table r1; + +# batch on ordered index, missing values +create table r1 as select * from t1 where b in (1,33,5); +select * from r1 order by a; +drop table r1; +select * from t1 where b in (1,33,5) order by a; +create table r1 as select * from t1 where b in (45,1,33,5,44); +select * from r1 order by a; +drop table r1; +select * from t1 where b in (45,22) order by a; + +# batch on unique hash index, missing values +create table r1 as select * from t1 where c in (2,8,33); +select * from r1 order by a; +drop table r1; +create table r1 as select * from t1 where c in (13,2,8,33,12); +select * from r1 order by a; +drop table r1; + +select * from t1 where a in (33,8,12) order by a; +select * from t1 where a in (33,34,35) order by a; +select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a; +select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a; +select * from t1 where c in (13,2,8,33,12) order by c,a; +drop table t1; + +# +# Somewhat more complicated +# + +create table t1 ( + a int not null, + b int not null, + c int not null, + d int not null, + e int not null, + primary key (a,b,c,d), index (d) +) engine = ndb; + +insert into t1 values + (1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1), + (5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1), + (9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1), + (1,2,1,2,1), + (1,2,1,3,1), + (1,2,1,4,1), + (1,2,1,5,1); + +# batch on primary key +create table r1 as select * from t1 + where a=1 and b=2 and c=1 and d in (1,4,3,2); +select * from r1 order by a,b,c,d; +drop table r1; + +# batched update ordered index, one value for all +update t1 set e = 100 + where d in (12,6,7); +select * from t1 where d in (12,6,7) order by a,b,c,d; +select * from t1 where d not in (12,6,7) and e = 100; + +# batched update primary key, one value for all +update t1 + set e = 101 + where a=1 and + b=2 and + c=1 and + d in (1,4,3,2); +select * + from t1 + where a=1 and b=2 and c=1 and d in (1,4,3,2) + order by a,b,c,d; +select * + from t1 + where not (a=1 and b=2 and c=1 and d in (1,4,3,2)) + and e=101; + + +# batched update ordered index, different values +update t1 + set e = + (case d + when 12 then 112 + when 6 then 106 + when 7 then 107 + end) + where d in (12,6,7); +select * from t1 where d in (12,6,7) order by a,b,c,d; + +# batched update primary key, different values +update t1 + set e = + (case d + when 1 then 111 + when 4 then 444 + when 3 then 333 + when 2 then 222 + end) + where a=1 and + b=2 and + c=1 and + d in (1,4,3,2); +select * + from t1 + where a=1 and b=2 and c=1 and d in (1,4,3,2) + order by a,b,c,d; + +# batched delete +delete from t1 where d in (12,6,7); +select * from t1 where d in (12,6,7); + +drop table t1; + +# null handling +create table t1 ( + a int not null primary key, + b int, + c int, + d int, + unique index (b), + index(c) +) engine = ndb; + +insert into t1 values + (1,null,1,1), + (2,2,2,2), + (3,null,null,3), + (4,4,null,4), + (5,null,5,null), + (6,6,6,null), + (7,null,null,null), + (8,8,null,null), + (9,null,9,9), + (10,10,10,10), + (11,null,null,11), + (12,12,null,12), + (13,null,13,null), + (14,14,14,null), + (15,null,null,null), + (16,16,null,null); + +create table t2 as select * from t1 where a in (5,6,7,8,9,10); +select * from t2 order by a; +drop table t2; + +create table t2 as select * from t1 where b in (5,6,7,8,9,10); +select * from t2 order by a; +drop table t2; + +create table t2 as select * from t1 where c in (5,6,7,8,9,10); +select * from t2 order by a; +drop table t2; + +drop table t1; + +# bug17729 + +CREATE TABLE t1 ( + a int(11) NOT NULL, + b int(11) NOT NULL, + c datetime default NULL, + PRIMARY KEY (a), + KEY idx_bc (b,c) +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES +(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), +(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), +(406994,67,'2006-02-27 11:26:46'), (256,67,NULL), +(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), +(406988,67,'2006-02-23 17:07:22'), (255,67,NULL), +(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), +(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), +(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), +(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), +(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), +(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), +(223456,67,NULL),(4101,67,NULL),(1133,67,NULL), +(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), +(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), +(154503,67,'2005-10-28 11:52:38'); + +create table t11 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; +create table t12 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; +create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; +create table t22 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; + +select * from t11 order by 1,2,3; +select * from t12 order by 1,2,3; +select * from t21 order by 1,2,3; +select * from t22 order by 1,2,3; + +# join tests +select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null order by t12.a; + +update t22 set c = '2005-12-08 15:58:27' where a = 255; +select * from t22 order by 1,2,3; +select t21.* from t21,t22 where t21.a = t22.a and +t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; + +delete from t22 where a > 245651; +update t22 set b = a + 1; +select * from t22 order by 1,2,3; +select t21.c, count(*) +from t21 +inner join t22 using (a) +where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652) +group by t21.c +order by t21.c; + +DROP TABLE t1, t11, t12, t21, t22; + +# bug#19956 +CREATE TABLE t1 (id varchar(255) NOT NULL, + tag int(11) NOT NULL, + doc text NOT NULL, + type varchar(150) NOT NULL, + modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (id) + ) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP); +SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); +SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); + +DROP TABLE t1; + +#bug#25522 +CREATE TABLE t1 ( + var1 int(2) NOT NULL, + var2 int(2) NOT NULL, + PRIMARY KEY (var1) + ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; + + +CREATE TABLE t2 ( + var1 int(2) NOT NULL, + var2 int(2) NOT NULL, + PRIMARY KEY (var1) + ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; + + +DELIMITER |; +CREATE TRIGGER testtrigger + AFTER UPDATE ON t1 FOR EACH ROW BEGIN + REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| +DELIMITER ;| + +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); + +UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); + +DROP TRIGGER testtrigger; + +DROP TABLE t1, t2; + +#bug#25821 +create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; + +insert into t1 values (1,1), (10,10); + +select * from t1 use index (ab) where a in(1,10) order by a; + +create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster +partition by key(a); + +insert into t2 values (1,1), (10,10); + +select * from t2 where a in (1,10) order by a; + +drop table t1, t2; diff --git a/mysql-test/suite/ndb/t/ndb_rename.test b/mysql-test/suite/ndb/t/ndb_rename.test new file mode 100644 index 00000000000..7f9fd0e6984 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_rename.test @@ -0,0 +1,36 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +drop database if exists mysqltest; +--enable_warnings + +# +# Table rename tests +# + +# +# Create a normal table with primary key +# +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL, + attr2 INT, + attr3 VARCHAR(10), + INDEX i1(attr1) +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (0,0,0,"zero"),(1,1,1,"one"),(2,2,2,"two"); +SELECT * FROM t1 WHERE attr1 = 1; +alter table t1 rename t2; +SELECT * FROM t2 WHERE attr1 = 1; + +create database ndbtest; +alter table t2 rename ndbtest.t2; +SELECT * FROM ndbtest.t2 WHERE attr1 = 1; + +drop table ndbtest.t2; +drop database ndbtest; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_replace.test b/mysql-test/suite/ndb/t/ndb_replace.test new file mode 100644 index 00000000000..aa2072b98dd --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_replace.test @@ -0,0 +1,104 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +# +# Test of REPLACE with NDB +# + +--disable_warnings +drop table if exists t1,t2; +--enable_warnings + +CREATE TABLE t1 ( + gesuchnr int(11) DEFAULT '0' NOT NULL, + benutzer_id int(11) DEFAULT '0' NOT NULL, + PRIMARY KEY (gesuchnr,benutzer_id) +) engine=ndbcluster; + +replace into t1 (gesuchnr,benutzer_id) values (2,1); +replace into t1 (gesuchnr,benutzer_id) values (1,1); +replace into t1 (gesuchnr,benutzer_id) values (1,1); +insert into t1 (gesuchnr, benutzer_id) value (3,2); +replace into t1 (gesuchnr,benutzer_id) values (1,1); +replace into t1 (gesuchnr,benutzer_id) values (1,1); +--error ER_DUP_ENTRY +insert into t1 (gesuchnr,benutzer_id) values (1,1); +replace into t1 (gesuchnr,benutzer_id) values (1,1); +select * from t1 order by gesuchnr; +drop table t1; + +# End of 4.1 tests + +# bug#17431 +CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT, + j INT, + k INT, + UNIQUE INDEX(j) + ) ENGINE = ndb; +INSERT INTO t1 VALUES (1,1,23),(2,2,24); +REPLACE INTO t1 (j,k) VALUES (1,42); +REPLACE INTO t1 (i,j) VALUES (17,2); +SELECT * from t1 ORDER BY i; +DROP TABLE t1; + +# bug#19906 +CREATE TABLE t2 (a INT(11) NOT NULL, + b INT(11) NOT NULL, + c INT(11) NOT NULL, + x TEXT, + y TEXT, + z TEXT, + id INT(10) unsigned NOT NULL AUTO_INCREMENT, + i INT(11) DEFAULT NULL, + PRIMARY KEY (id), + UNIQUE KEY a (a,b,c) +) ENGINE=ndbcluster; + +REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3); + +SELECT * FROM t2 ORDER BY id; + +REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1); +REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2); + +SELECT * FROM t2 ORDER BY id; + +DROP TABLE t2; + +# +# Bug #20728 "REPLACE does not work correctly for NDB table with PK and +# unique index" +# +--disable_warnings +drop table if exists t1; +--enable_warnings +create table t1 (pk int primary key, apk int unique, data int) engine=ndbcluster; +# Test for plain replace which updates pk +insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); +replace into t1 (pk, apk) values (4, 1), (5, 2); +select * from t1 order by pk; +delete from t1; +# Another test for plain replace which doesn't touch pk +insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); +replace into t1 (pk, apk) values (1, 4), (2, 5); +select * from t1 order by pk; +delete from t1; +# Test for load data replace which updates pk +insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6); +load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); +select * from t1 order by pk; +delete from t1; +# Now test for load data replace which doesn't touch pk +insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5); +load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); +select * from t1 order by pk; +delete from t1; +# Finally test for both types of replace ... select +insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); +replace into t1 (pk, apk) select 4, 1; +replace into t1 (pk, apk) select 2, 4; +select * from t1 order by pk; +# Clean-up +drop table t1; + +--echo End of 5.0 tests. diff --git a/mysql-test/suite/ndb/t/ndb_restore.test b/mysql-test/suite/ndb/t/ndb_restore.test new file mode 100644 index 00000000000..7f0cafdfd77 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_restore.test @@ -0,0 +1,403 @@ +-- source include/have_ndb.inc +-- source include/ndb_default_cluster.inc +-- source include/not_embedded.inc + +--disable_warnings +use test; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; +--enable_warnings + +# Bug #27775 - mediumint auto inc not restored correctly +# - check mediumint +CREATE TABLE `t1_c` ( + `capgoaledatta` mediumint(5) unsigned NOT NULL auto_increment, + `goaledatta` char(2) NOT NULL default '', + `maturegarbagefa` varchar(32) NOT NULL default '', + PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(400,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3000,'20','threetrees.qt'); +# +# Bug #27758 Restoring NDB backups makes table usable in SQL nodes +# - space in key made table unusable after restore +# +# Bug #27775 - mediumint auto inc not restored correctly +# - check smallint +CREATE TABLE `t2_c` ( + `capgotod` smallint(5) unsigned NOT NULL auto_increment, + `gotod` smallint(5) unsigned NOT NULL default '0', + `goaledatta` char(2) default NULL, + `maturegarbagefa` varchar(32) default NULL, + `descrpooppo` varchar(64) default NULL, + `svcutonsa` varchar(64) NOT NULL default '', + PRIMARY KEY (`capgotod`), + KEY `i quadaddsvr` (`gotod`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'),(5,0,'',NULL,NULL,''); + +# Added ROW_FORMAT=FIXED to use below to see that setting is preserved +# by restore +CREATE TABLE `t3_c` ( + `CapGoaledatta` smallint(5) unsigned NOT NULL default '0', + `capgotod` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`capgotod`,`CapGoaledatta`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED; +INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); + +# Bug #27775 - mediumint auto inc not restored correctly +# - check bigint +CREATE TABLE `t4_c` ( + `capfa` bigint(20) unsigned NOT NULL auto_increment, + `realm` varchar(32) NOT NULL default '', + `authpwchap` varchar(32) default NULL, + `fa` varchar(32) NOT NULL default '', + `payyingatta` tinyint(4) NOT NULL default '0', + `status` char(1) default NULL, + PRIMARY KEY (`fa`,`realm`), + KEY `capfa` (`capfa`), + KEY `i_quadentity` (`fa`,`realm`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(2200,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32000,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(290000000,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); + +CREATE TABLE `t5_c` ( + `capfa` bigint(20) unsigned NOT NULL default '0', + `gotod` smallint(5) unsigned NOT NULL default '0', + `orderutonsa` varchar(64) NOT NULL default '', + PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); + +CREATE TABLE `t6_c` ( + `capfa_parent` bigint(20) unsigned NOT NULL default '0', + `capfa_child` bigint(20) unsigned NOT NULL default '0', + `relatta` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); + +# Bug #27775 - mediumint auto inc not restored correctly +# - check tinyint +CREATE TABLE `t7_c` ( + `dardpo` char(15) NOT NULL default '', + `dardtestard` tinyint(3) unsigned NOT NULL auto_increment, + `FastFA` char(5) NOT NULL default '', + `FastCode` char(6) NOT NULL default '', + `Fastca` char(1) NOT NULL default '', + `Fastmag` char(1) NOT NULL default '', + `Beareratta` char(2) NOT NULL default '', + PRIMARY KEY (`dardpo`,`dardtestard`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); + +CREATE TABLE `t8_c` ( + `kattjame` varchar(32) NOT NULL default '', + `realm` varchar(32) NOT NULL default '', + `realm_entered` varchar(32) NOT NULL default '', + `maturegarbagefa` varchar(32) NOT NULL default '', + `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', + `kattjame_entered` varchar(32) NOT NULL default '', + `hunderaaarbagefa` varchar(32) NOT NULL default '', + `gest` varchar(16) default NULL, + `hassetino` varchar(16) NOT NULL default '', + `aaaproxysessfa` varchar(255) default NULL, + `autologonallowed` char(1) default NULL, + `squardporoot` varchar(15) NOT NULL default '', + `naspo` varchar(15) default NULL, + `beareratta` char(2) default NULL, + `fastCode` varchar(6) default NULL, + `fastFA` varchar(5) default NULL, + `fastca` char(1) default NULL, + `fastmag` char(1) default NULL, + `lastupdate` datetime default NULL, + `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', + `accthassetitime` int(10) unsigned default NULL, + `acctoutputoctets` bigint(20) unsigned default NULL, + `acctinputoctets` bigint(20) unsigned default NULL, + PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), + KEY `squardporoot` (`squardporoot`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); + +CREATE TABLE `t9_c` ( + `kattjame` varchar(32) NOT NULL default '', + `kattjame_entered` varchar(32) NOT NULL default '', + `realm` varchar(32) NOT NULL default '', + `realm_entered` varchar(32) NOT NULL default '', + `maturegarbagefa` varchar(32) NOT NULL default '', + `hunderaaarbagefa` varchar(32) NOT NULL default '', + `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', + `gest` varchar(16) default NULL, + `hassetino` varchar(16) NOT NULL default '', + `squardporoot` varchar(15) NOT NULL default '', + `naspo` varchar(15) default NULL, + `beareratta` char(2) default NULL, + `fastCode` varchar(6) default NULL, + `fastFA` varchar(5) default NULL, + `fastca` char(1) default NULL, + `fastmag` char(1) default NULL, + `lastupdate` datetime default NULL, + `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', + `accthassetitime` int(10) unsigned default NULL, + `actcoutpuocttets` bigint(20) unsigned default NULL, + `actinputocctets` bigint(20) unsigned default NULL, + `terminateraste` tinyint(3) unsigned default NULL, + PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); + +# Bug #20820 +# auto inc table not handled correctly when restored from cluster backup +# - before fix ndb_restore would not set auto inc value correct, +# seen by select below +CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO t10_c VALUES (1),(2),(3); +# Bug #27775 - mediumint auto inc not restored correctly +# - check int +insert into t10_c values (10000),(2000),(3000); + +create table t1 engine=myisam as select * from t1_c; +create table t2 engine=myisam as select * from t2_c; +create table t3 engine=myisam as select * from t3_c; +create table t4 engine=myisam as select * from t4_c; +create table t5 engine=myisam as select * from t5_c; +create table t6 engine=myisam as select * from t6_c; +create table t7 engine=myisam as select * from t7_c; +create table t8 engine=myisam as select * from t8_c; +create table t9 engine=myisam as select * from t9_c; +create table t10 engine=myisam as select * from t10_c; + +# check that force varpart is preserved by ndb_restore +# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0 +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart + +--source include/ndb_backup.inc +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +# check that force varpart is preserved by ndb_restore +# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0 +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart + +# random output order?? +#show tables; + +select count(*) from t1; +select count(*) from t1_c; +select count(*) + from (select * from t1 union + select * from t1_c) a; + +select count(*) from t2; +select count(*) from t2_c; +select count(*) + from (select * from t2 union + select * from t2_c) a; + +select count(*) from t3; +select count(*) from t3_c; +select count(*) + from (select * from t3 union + select * from t3_c) a; + +select count(*) from t4; +select count(*) from t4_c; +select count(*) + from (select * from t4 union + select * from t4_c) a; + +select count(*) from t5; +select count(*) from t5_c; +select count(*) + from (select * from t5 union + select * from t5_c) a; + +select count(*) from t6; +select count(*) from t6_c; +select count(*) + from (select * from t6 union + select * from t6_c) a; + +select count(*) from t7; +select count(*) from t7_c; +select count(*) + from (select * from t7 union + select * from t7_c) a; + +select count(*) from t8; +select count(*) from t8_c; +select count(*) + from (select * from t8 union + select * from t8_c) a; + +select count(*) from t9; +select count(*) from t9_c; +select count(*) + from (select * from t9 union + select * from t9_c) a; + +# Bug #20820 cont'd +select * from t10_c order by a; +# Bug #27775 cont'd +# - auto inc info should be correct +--replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X +show table status like 't1_c'; +--replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X +show table status like 't2_c'; +--replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X +show table status like 't4_c'; +--replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X +show table status like 't7_c'; +--replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X +show table status like 't10_c'; + +# +# Try Partitioned tables as well +# +ALTER TABLE t7_c +PARTITION BY LINEAR KEY (`dardtestard`); + +--source include/ndb_backup.inc +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT + +select count(*) from t1; +select count(*) from t1_c; +select count(*) + from (select * from t1 union + select * from t1_c) a; + +select count(*) from t2; +select count(*) from t2_c; +select count(*) + from (select * from t2 union + select * from t2_c) a; + +select count(*) from t3; +select count(*) from t3_c; +select count(*) + from (select * from t3 union + select * from t3_c) a; + +select count(*) from t4; +select count(*) from t4_c; +select count(*) + from (select * from t4 union + select * from t4_c) a; + +select count(*) from t5; +select count(*) from t5_c; +select count(*) + from (select * from t5 union + select * from t5_c) a; + +select count(*) from t6; +select count(*) from t6_c; +select count(*) + from (select * from t6 union + select * from t6_c) a; + +select count(*) from t7; +select count(*) from t7_c; +select count(*) + from (select * from t7 union + select * from t7_c) a; + +select count(*) from t8; +select count(*) from t8_c; +select count(*) + from (select * from t8 union + select * from t8_c) a; + +select count(*) from t9; +select count(*) from t9_c; +select count(*) + from (select * from t9 union + select * from t9_c) a; + +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT + +select count(*) from t1; +select count(*) from t1_c; +select count(*) + from (select * from t1 union + select * from t1_c) a; + +select count(*) from t2; +select count(*) from t2_c; +select count(*) + from (select * from t2 union + select * from t2_c) a; + +select count(*) from t3; +select count(*) from t3_c; +select count(*) + from (select * from t3 union + select * from t3_c) a; + +select count(*) from t4; +select count(*) from t4_c; +select count(*) + from (select * from t4 union + select * from t4_c) a; + +select count(*) from t5; +select count(*) from t5_c; +select count(*) + from (select * from t5 union + select * from t5_c) a; + +select count(*) from t6; +select count(*) from t6_c; +select count(*) + from (select * from t6 union + select * from t6_c) a; + +select count(*) from t7; +select count(*) from t7_c; +select count(*) + from (select * from t7 union + select * from t7_c) a; + +select count(*) from t8; +select count(*) from t8_c; +select count(*) + from (select * from t8 union + select * from t8_c) a; + +select count(*) from t9; +select count(*) from t9_c; +select count(*) + from (select * from t9 union + select * from t9_c) a; + +# +# Drop all table except t2_c +# This to make sure that error returned from ndb_restore above is +# guaranteed to be from t2_c, this since order of tables in backup +# is none deterministic +# +drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; +--source include/ndb_backup.inc +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true + +# +# Cleanup +# + +--disable_warnings +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +drop table if exists t2_c; +--enable_warnings + +# +# Test BUG#10287 +# + +--exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,/" + +# End of 5.0 tests (4.1 test intermixed to save test time) diff --git a/mysql-test/suite/ndb/t/ndb_restore_compat.test b/mysql-test/suite/ndb/t/ndb_restore_compat.test new file mode 100644 index 00000000000..2622aec1d50 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_restore_compat.test @@ -0,0 +1,61 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc +-- source include/have_case_sensitive_file_system.inc + +# This test currently requires case sensitive file system as the tables +# are originally stored with uppercase + +# +# Bug #18594 ndb_restore log boken in 5.1 +# + +--disable_warnings +DROP DATABASE IF EXISTS BANK; +--enable_warnings +CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT +USE BANK; +SHOW TABLES; +SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; +SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; +SELECT COUNT(*) FROM TRANSACTION; +SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; +SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; + +# Check that force varpart is set by ndb_restore +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart + +# +# verify restore of 5.0 backup +# here we must use the already created tables as restoring the old +# table definitions will not work +# +TRUNCATE GL; +TRUNCATE ACCOUNT; +TRUNCATE TRANSACTION; +TRUNCATE SYSTEM_VALUES; +TRUNCATE ACCOUNT_TYPE; + +# Check that force varpart is not changed by truncate +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart + +# Restore data +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT + +# Check data +SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; +SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; +SELECT COUNT(*) FROM TRANSACTION; +SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; +SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; +DROP DATABASE BANK; diff --git a/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt b/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt new file mode 100644 index 00000000000..075c6392dde --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_restore_partition-master.opt @@ -0,0 +1 @@ +--new diff --git a/mysql-test/suite/ndb/t/ndb_restore_partition.test b/mysql-test/suite/ndb/t/ndb_restore_partition.test new file mode 100644 index 00000000000..f11324492c2 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_restore_partition.test @@ -0,0 +1,375 @@ +-- source include/have_ndb.inc +-- source include/ndb_default_cluster.inc +-- source include/not_embedded.inc + +--disable_warnings +use test; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; +--enable_warnings + +CREATE TABLE `t1_c` ( + `capgoaledatta` smallint(5) unsigned NOT NULL auto_increment, + `goaledatta` char(2) NOT NULL default '', + `maturegarbagefa` varchar(32) NOT NULL default '', + PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt'); + +CREATE TABLE `t2_c` ( + `capgotod` smallint(5) unsigned NOT NULL auto_increment, + `gotod` smallint(5) unsigned NOT NULL default '0', + `goaledatta` char(2) default NULL, + `maturegarbagefa` varchar(32) default NULL, + `descrpooppo` varchar(64) default NULL, + `svcutonsa` varchar(64) NOT NULL default '', + PRIMARY KEY (`capgotod`), + KEY `i_quadaddsvr` (`gotod`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'); + +CREATE TABLE `t3_c` ( + `CapGoaledatta` smallint(5) unsigned NOT NULL default '0', + `capgotod` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`capgotod`,`CapGoaledatta`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); + +CREATE TABLE `t4_c` ( + `capfa` bigint(20) unsigned NOT NULL auto_increment, + `realm` varchar(32) NOT NULL default '', + `authpwchap` varchar(32) default NULL, + `fa` varchar(32) NOT NULL default '', + `payyingatta` tinyint(4) NOT NULL default '0', + `status` char(1) default NULL, + PRIMARY KEY (`fa`,`realm`), + KEY `capfa` (`capfa`), + KEY `i_quadentity` (`fa`,`realm`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); + +CREATE TABLE `t5_c` ( + `capfa` bigint(20) unsigned NOT NULL default '0', + `gotod` smallint(5) unsigned NOT NULL default '0', + `orderutonsa` varchar(64) NOT NULL default '', + PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); + +CREATE TABLE `t6_c` ( + `capfa_parent` bigint(20) unsigned NOT NULL default '0', + `capfa_child` bigint(20) unsigned NOT NULL default '0', + `relatta` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); + +CREATE TABLE `t7_c` ( + `dardpo` char(15) NOT NULL default '', + `dardtestard` tinyint(3) unsigned NOT NULL default '0', + `FastFA` char(5) NOT NULL default '', + `FastCode` char(6) NOT NULL default '', + `Fastca` char(1) NOT NULL default '', + `Fastmag` char(1) NOT NULL default '', + `Beareratta` char(2) NOT NULL default '', + PRIMARY KEY (`dardpo`,`dardtestard`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); + +CREATE TABLE `t8_c` ( + `kattjame` varchar(32) NOT NULL default '', + `realm` varchar(32) NOT NULL default '', + `realm_entered` varchar(32) NOT NULL default '', + `maturegarbagefa` varchar(32) NOT NULL default '', + `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', + `kattjame_entered` varchar(32) NOT NULL default '', + `hunderaaarbagefa` varchar(32) NOT NULL default '', + `gest` varchar(16) default NULL, + `hassetino` varchar(16) NOT NULL default '', + `aaaproxysessfa` varchar(255) default NULL, + `autologonallowed` char(1) default NULL, + `squardporoot` varchar(15) NOT NULL default '', + `naspo` varchar(15) default NULL, + `beareratta` char(2) default NULL, + `fastCode` varchar(6) default NULL, + `fastFA` varchar(5) default NULL, + `fastca` char(1) default NULL, + `fastmag` char(1) default NULL, + `lastupdate` datetime default NULL, + `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', + `accthassetitime` int(10) unsigned default NULL, + `acctoutputoctets` bigint(20) unsigned default NULL, + `acctinputoctets` bigint(20) unsigned default NULL, + PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), + KEY `squardporoot` (`squardporoot`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); + +CREATE TABLE `t9_c` ( + `kattjame` varchar(32) NOT NULL default '', + `kattjame_entered` varchar(32) NOT NULL default '', + `realm` varchar(32) NOT NULL default '', + `realm_entered` varchar(32) NOT NULL default '', + `maturegarbagefa` varchar(32) NOT NULL default '', + `hunderaaarbagefa` varchar(32) NOT NULL default '', + `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', + `gest` varchar(16) default NULL, + `hassetino` varchar(16) NOT NULL default '', + `squardporoot` varchar(15) NOT NULL default '', + `naspo` varchar(15) default NULL, + `beareratta` char(2) default NULL, + `fastCode` varchar(6) default NULL, + `fastFA` varchar(5) default NULL, + `fastca` char(1) default NULL, + `fastmag` char(1) default NULL, + `lastupdate` datetime default NULL, + `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', + `accthassetitime` int(10) unsigned default NULL, + `actcoutpuocttets` bigint(20) unsigned default NULL, + `actinputocctets` bigint(20) unsigned default NULL, + `terminateraste` tinyint(3) unsigned default NULL, + PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); + +create table t1 engine=myisam as select * from t1_c; +create table t2 engine=myisam as select * from t2_c; +create table t3 engine=myisam as select * from t3_c; +create table t4 engine=myisam as select * from t4_c; +create table t5 engine=myisam as select * from t5_c; +create table t6 engine=myisam as select * from t6_c; +create table t7 engine=myisam as select * from t7_c; +create table t8 engine=myisam as select * from t8_c; +create table t9 engine=myisam as select * from t9_c; + + +--source include/ndb_backup.inc +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT + +# random output order?? +#show tables; + +select count(*) from t1; +select count(*) from t1_c; +select count(*) + from (select * from t1 union + select * from t1_c) a; + +select count(*) from t2; +select count(*) from t2_c; +select count(*) + from (select * from t2 union + select * from t2_c) a; + +select count(*) from t3; +select count(*) from t3_c; +select count(*) + from (select * from t3 union + select * from t3_c) a; + +select count(*) from t4; +select count(*) from t4_c; +select count(*) + from (select * from t4 union + select * from t4_c) a; + +select count(*) from t5; +select count(*) from t5_c; +select count(*) + from (select * from t5 union + select * from t5_c) a; + +select count(*) from t6; +select count(*) from t6_c; +select count(*) + from (select * from t6 union + select * from t6_c) a; + +select count(*) from t7; +select count(*) from t7_c; +select count(*) + from (select * from t7 union + select * from t7_c) a; + +select count(*) from t8; +select count(*) from t8_c; +select count(*) + from (select * from t8 union + select * from t8_c) a; + +select count(*) from t9; +select count(*) from t9_c; +select count(*) + from (select * from t9 union + select * from t9_c) a; + +# +# Try Partitioned tables as well +# +ALTER TABLE t1_c +PARTITION BY RANGE (`capgoaledatta`) +(PARTITION p0 VALUES LESS THAN MAXVALUE); + +ALTER TABLE t2_c +PARTITION BY LIST(`capgotod`) +(PARTITION p0 VALUES IN (0,1,2,3,4,5,6)); + +ALTER TABLE t3_c +PARTITION BY HASH (`CapGoaledatta`); + +ALTER TABLE t5_c +PARTITION BY HASH (`capfa`) +PARTITIONS 4; + +ALTER TABLE t6_c +PARTITION BY LINEAR HASH (`relatta`) +PARTITIONS 4; + +ALTER TABLE t7_c +PARTITION BY LINEAR KEY (`dardtestard`); + +--source include/ndb_backup.inc +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT + +select count(*) from t1; +select count(*) from t1_c; +select count(*) + from (select * from t1 union + select * from t1_c) a; + +select count(*) from t2; +select count(*) from t2_c; +select count(*) + from (select * from t2 union + select * from t2_c) a; + +select count(*) from t3; +select count(*) from t3_c; +select count(*) + from (select * from t3 union + select * from t3_c) a; + +select count(*) from t4; +select count(*) from t4_c; +select count(*) + from (select * from t4 union + select * from t4_c) a; + +select count(*) from t5; +select count(*) from t5_c; +select count(*) + from (select * from t5 union + select * from t5_c) a; + +select count(*) from t6; +select count(*) from t6_c; +select count(*) + from (select * from t6 union + select * from t6_c) a; + +select count(*) from t7; +select count(*) from t7_c; +select count(*) + from (select * from t7 union + select * from t7_c) a; + +select count(*) from t8; +select count(*) from t8_c; +select count(*) + from (select * from t8 union + select * from t8_c) a; + +select count(*) from t9; +select count(*) from t9_c; +select count(*) + from (select * from t9 union + select * from t9_c) a; + +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT + +select count(*) from t1; +select count(*) from t1_c; +select count(*) + from (select * from t1 union + select * from t1_c) a; + +select count(*) from t2; +select count(*) from t2_c; +select count(*) + from (select * from t2 union + select * from t2_c) a; + +select count(*) from t3; +select count(*) from t3_c; +select count(*) + from (select * from t3 union + select * from t3_c) a; + +select count(*) from t4; +select count(*) from t4_c; +select count(*) + from (select * from t4 union + select * from t4_c) a; + +select count(*) from t5; +select count(*) from t5_c; +select count(*) + from (select * from t5 union + select * from t5_c) a; + +select count(*) from t6; +select count(*) from t6_c; +select count(*) + from (select * from t6 union + select * from t6_c) a; + +select count(*) from t7; +select count(*) from t7_c; +select count(*) + from (select * from t7 union + select * from t7_c) a; + +select count(*) from t8; +select count(*) from t8_c; +select count(*) + from (select * from t8 union + select * from t8_c) a; + +select count(*) from t9; +select count(*) from t9_c; +select count(*) + from (select * from t9 union + select * from t9_c) a; + +# +# Drop all table except t2_c +# This to make sure that error returned from ndb_restore above is +# guaranteed to be from t2_c, this since order of tables in backup +# is none deterministic +# +drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; +--source include/ndb_backup.inc +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true + +# +# Cleanup +# + +--disable_warnings +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +drop table if exists t2_c; +--enable_warnings + +# +# Test BUG#10287 +# + +--exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,/" + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_restore_print.test b/mysql-test/suite/ndb/t/ndb_restore_print.test new file mode 100644 index 00000000000..6dbbfdf5933 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_restore_print.test @@ -0,0 +1,189 @@ +-- source include/have_ndb.inc +-- source include/ndb_default_cluster.inc +-- source include/not_embedded.inc + +--disable_warnings +use test; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +--enable_warnings + +# basic datatypes +create table t1 + (pk int key + ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) + ,b1 TINYINT, b2 TINYINT UNSIGNED + ,c1 SMALLINT, c2 SMALLINT UNSIGNED + ,d1 INT, d2 INT UNSIGNED + ,e1 BIGINT, e2 BIGINT UNSIGNED + ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY + ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY + ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) + ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) + ) engine myisam; + +# max values +insert into t1 values + (1 + ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 + ,127, 255 + ,32767, 65535 + ,2147483647, 4294967295 + ,9223372036854775807, 18446744073709551615 + ,'1','12345678901234567890123456789012','123456789' + ,'1','12345678901234567890123456789012','123456789' + ,0x12,0x123456789abcdef0, 0x012345 + ,0x12,0x123456789abcdef0, 0x00123450 + ); + +# min values +insert into t1 values + (2 + ,0, 0, 0, 0, 0 + ,-128, 0 + ,-32768, 0 + ,-2147483648, 0 + ,-9223372036854775808, 0 + ,'','','' + ,'','','' + ,0x0,0x0,0x0 + ,0x0,0x0,0x0 + ); + +# null values +insert into t1 values + (3 + ,NULL,NULL,NULL,NULL,NULL + ,NULL,NULL + ,NULL,NULL + ,NULL,NULL + ,NULL,NULL + ,NULL,NULL,NULL + ,NULL,NULL,NULL + ,NULL,NULL,NULL + ,NULL,NULL,NULL + ); + +--vertical_results +select pk + ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) + ,b1, b2 + ,c1 , c2 + ,d1 , d2 + ,e1 , e2 + ,f1 , f2, f3 + ,g1 , g2, g3 + ,hex(h1), hex(h2), hex(h3) + ,hex(i1), hex(i2), hex(i3) + from t1 order by pk; + +alter table t1 engine ndb; + +select pk + ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) + ,b1, b2 + ,c1 , c2 + ,d1 , d2 + ,e1 , e2 + ,f1 , f2, f3 + ,g1 , g2, g3 + ,hex(h1), hex(h2), hex(h3) + ,hex(i1), hex(i2), hex(i3) + from t1 order by pk; +--horizontal_results + +--source include/ndb_backup.inc + +--let ndb_restore_filter=test t1 +--let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";" +--source include/ndb_backup_print.inc + +--let ndb_restore_filter=test t1 +--let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by="," --fields-optionally-enclosed-by="'" +--source include/ndb_backup_print.inc + + +drop table t1; + +# some binary char tests with trailing spaces +create table t1 + (pk int key + ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY + ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY + ,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255) + ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) + ) engine ndb; + +insert into t1 values + (1 + ,'1','12345678901234567890123456789012','123456789 ' + ,'1 ','12345678901234567890123456789012 ','123456789 ' + ,0x20,0x123456789abcdef020, 0x012345000020 + ,0x1200000020,0x123456789abcdef000000020, 0x00123450000020 + ); + +create table t2 (pk int key, a int) engine ndb; +create table t3 (pk int key, a int) engine ndb; +create table t4 (pk int key, a int) engine ndb; + +insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15); +insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25); +insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); + +--source include/ndb_backup.inc +--let ndb_restore_opts=--verbose=0 --print_data --hex --fields-enclosed-by="'" --fields-optionally-enclosed-by="X" +--let ndb_restore_filter=test t1 +--source include/ndb_backup_print.inc + +--exec rm -f $MYSQLTEST_VARDIR/tmp/t1.txt +--exec rm -f $MYSQLTEST_VARDIR/tmp/t2.txt +--exec rm -f $MYSQLTEST_VARDIR/tmp/t3.txt +--exec rm -f $MYSQLTEST_VARDIR/tmp/t4.txt + +--let ndb_restore_opts=--verbose=0 --print_data --hex --tab $MYSQLTEST_VARDIR/tmp --append +--let ndb_restore_filter=test +--source include/ndb_backup_print.inc + +--let $message= t1 +--source include/show_msg.inc +--exec sort $MYSQLTEST_VARDIR/tmp/t1.txt +--let $message= t2 +--source include/show_msg.inc +--exec sort $MYSQLTEST_VARDIR/tmp/t2.txt +--let $message= t3 +--source include/show_msg.inc +--exec sort $MYSQLTEST_VARDIR/tmp/t3.txt +--let $message= t4 +--source include/show_msg.inc +--exec sort $MYSQLTEST_VARDIR/tmp/t4.txt + +--exec rm -f $MYSQLTEST_VARDIR/tmp/t1.txt +--exec rm -f $MYSQLTEST_VARDIR/tmp/t2.txt +--exec rm -f $MYSQLTEST_VARDIR/tmp/t3.txt +--exec rm -f $MYSQLTEST_VARDIR/tmp/t4.txt + +# now test some other datatypes +drop table t1; +create table t1 + (pk int key + ,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED + ) engine ndb; + +# max values +insert into t1 values(1, 8388607, 16777215); +# min values +insert into t1 values(2, -8388608, 0); +# small values +insert into t1 values(3, -1, 1); + +# backup and print +--source include/ndb_backup.inc + +--let ndb_restore_filter=test t1 +--let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";" +--source include/ndb_backup_print.inc + +# clean up +drop table t1; +drop table t2; +drop table t3; +drop table t4; diff --git a/mysql-test/suite/ndb/t/ndb_row_format.test b/mysql-test/suite/ndb/t/ndb_row_format.test new file mode 100644 index 00000000000..b1582cbe339 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_row_format.test @@ -0,0 +1,86 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists mysqltest; +--enable_warnings + +# +# some negative tests +# + +# cannot have ROW_FORMAT=FIXED and var attrs mixed +--error 1005 +CREATE TABLE t1 + ( a INT KEY, + b VARCHAR(10) ) + ROW_FORMAT=FIXED + ENGINE=NDB; + +# warnings give more detail on the error +SHOW WARNINGS; + + +# +# Check force var part for different ROW_FORMAT +# + +# default => ForceVarPart: 1 +CREATE TABLE t1 + ( a INT KEY, + b INT ) + ENGINE=NDB; +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart +DROP TABLE t1; + +# explicit DEFAULT => ForceVarPart: 1 +CREATE TABLE t1 + ( a INT KEY, + b INT ) + ROW_FORMAT=DEFAULT + ENGINE=NDB; +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart +DROP TABLE t1; + +# FIXED => ForceVarPart: 0 +CREATE TABLE t1 + ( a INT KEY, + b INT ) + ROW_FORMAT=FIXED + ENGINE=NDB; +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart +DROP TABLE t1; + +# DYNAMIC => ForceVarPart: 1 +CREATE TABLE t1 + ( a INT KEY, + b INT ) + ROW_FORMAT=DYNAMIC + ENGINE=NDB; +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart +DROP TABLE t1; + +# test of bug +create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; +insert into t1(b) values ('0123456789'); +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +select count(*) from t1; +begin; +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +rollback; +select count(*),b from t1 group by b; +drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_single_user.test b/mysql-test/suite/ndb/t/ndb_single_user.test new file mode 100644 index 00000000000..3c6656be9f9 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_single_user.test @@ -0,0 +1,174 @@ +-- source include/have_ndb.inc +-- source include/have_multi_ndb.inc +-- source include/ndb_default_cluster.inc +-- source include/not_embedded.inc + +--disable_warnings +use test; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +--enable_warnings + +# operations allowed while cluster is in single user mode + +--connection server1 +--let $node_id= `SHOW STATUS LIKE 'Ndb_cluster_node_id'` +--disable_query_log +--eval set @node_id= SUBSTRING('$node_id', 20)+0 +--enable_query_log +--let $node_id= `SELECT @node_id` +--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" --single-user >> $NDB_TOOLS_OUTPUT + +# verify that we are indeed in single user mode +# and test that some operations give correct errors +--connection server2 +--error 1005 +create table t1 (a int key, b int unique, c int) engine ndb; +# Bug #27712 Single user mode. Creating logfile group and tablespace is allowed +# - before bug fix these would succeed +--error 1516 +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +show warnings; + +# test some sql on first mysqld +--connection server1 +create table t1 (a int key, b int unique, c int) engine ndb; +# Check that we can create logfile group +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +--connection server2 +--error ER_CREATE_FILEGROUP_FAILED +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; +show warnings; +--error ER_DROP_FILEGROUP_FAILED +DROP LOGFILE GROUP lg1 +ENGINE =NDB; +show warnings; +--connection server1 +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; +--connection server2 +--error ER_ALTER_FILEGROUP_FAILED +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE NDB; +show warnings; +--connection server1 +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE NDB; +--connection server2 +--error ER_DROP_FILEGROUP_FAILED +DROP TABLESPACE ts1 +ENGINE NDB; +show warnings; +--connection server1 +DROP TABLESPACE ts1 +ENGINE NDB; +DROP LOGFILE GROUP lg1 +ENGINE =NDB; +insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0); +create table t2 as select * from t1; +# read with pk +select * from t1 where a = 1; +# read with unique index +select * from t1 where b = 4; +# read with ordered index +select * from t1 where a > 4 order by a; +# update with pk +update t1 set b=102 where a = 2; +# update with unique index +update t1 set b=103 where b = 3; +# update with full table scan +update t1 set b=b+100; +# update with ordered insex scan +update t1 set b=b+100 where a > 7; +# delete with full table scan +delete from t1; +insert into t1 select * from t2; +# Bug #27710 Creating unique index fails during single user mode +# - prior to bugfix this would fail +create unique index new_index on t1 (b,c); + +# test some sql on other mysqld +--connection server2 +--error 1051 +drop table t1; +--error 1296 +create index new_index_fail on t1 (c); +--error 1296 +insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0); +--error 1296 +select * from t1 where a = 1; +--error 1296 +select * from t1 where b = 4; +--error 1296 +update t1 set b=102 where a = 2; +--error 1296 +update t1 set b=103 where b = 3; +--error 1296 +update t1 set b=b+100; +--error 1296 +update t1 set b=b+100 where a > 7; + +--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT + +# +# we should be able to run transaction while in single user mode +# +--connection server1 +BEGIN; +update t1 set b=b+100 where a=1; + +--connection server2 +BEGIN; +update t1 set b=b+100 where a=2; + +# enter single user mode +--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" --single-user >> $NDB_TOOLS_OUTPUT + +--connection server1 +update t1 set b=b+100 where a=3; +COMMIT; + +# while on other mysqld it should be aborted +--connection server2 +--error 1296 +update t1 set b=b+100 where a=4; +--error 1296 +COMMIT; + +# Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb +# tables for other mysqld nodes +--connection server2 +create table t2 (a int) engine myisam; +alter table t2 add column (b int); + +# exit single user mode +--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT + +# cleanup +--connection server2 +drop table t2; +--connection server1 +drop table t1; + +# End of 5.0 tests + diff --git a/mysql-test/suite/ndb/t/ndb_sp.test b/mysql-test/suite/ndb/t/ndb_sp.test new file mode 100644 index 00000000000..b833869cad0 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_sp.test @@ -0,0 +1,42 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +create table t1 ( + a int not null primary key, + b int not null +) engine=ndb; +insert into t1 values (1,10), (2,20), (3,100), (4, 100); + +delimiter //; +create procedure test_proc1 (in var_in int) +begin + select * from t1 where a = var_in; +end; +create procedure test_proc2 (out var_out int) +begin + select b from t1 where a = 1 into var_out; +end; +create procedure test_proc3 (inout var_inout int) +begin + select b from t1 where a = var_inout into var_inout; +end; +// +delimiter ;// +call test_proc1(1); +call test_proc2(@test_var); +select @test_var; +set @test_var = 1; +call test_proc3(@test_var); +select @test_var; +alter procedure test_proc1 comment 'new comment'; +show create procedure test_proc1; +drop procedure test_proc1; +drop procedure test_proc2; +drop procedure test_proc3; +drop table t1; + +--echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_subquery.test b/mysql-test/suite/ndb/t/ndb_subquery.test new file mode 100644 index 00000000000..6282c31c922 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_subquery.test @@ -0,0 +1,79 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1, t2, t3, t4; +--enable_warnings + +########## +# bug#5367 +create table t1 (p int not null primary key, u int not null, o int not null, +unique (u), key(o)) engine=ndb; + +create table t2 (p int not null primary key, u int not null, o int not null, +unique (u), key(o)) engine=ndb; + +create table t3 (a int not null primary key, b int not null) engine=ndb; +create table t4 (c int not null primary key, d int not null) engine=ndb; + +insert into t1 values (1,1,1),(2,2,2),(3,3,3); +insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5); +insert into t3 values (1,10), (2,10), (3,30), (4, 30); +insert into t4 values (1,10), (2,10), (3,30), (4, 30); + +# Use pk +--replace_column 9 # +explain select * from t2 where p NOT IN (select p from t1); +select * from t2 where p NOT IN (select p from t1) order by p; + +# Use unique index +--replace_column 9 # +explain select * from t2 where p NOT IN (select u from t1); +select * from t2 where p NOT IN (select u from t1) order by p; + +# Use ordered index +--replace_column 9 # +explain select * from t2 where p NOT IN (select o from t1); +select * from t2 where p NOT IN (select o from t1) order by p; + +# Use scan +--replace_column 9 # +explain select * from t2 where p NOT IN (select p+0 from t1); +select * from t2 where p NOT IN (select p+0 from t1) order by p; + +drop table t1; +drop table t2; +# bug#5367 +########## + +# End of 4.1 tests + +# +# bug#11205 +# +create table t1 (p int not null primary key, u int not null) engine=ndb; +insert into t1 values (1,1),(2,2),(3,3); + +create table t2 as +select t1.* +from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8 +where t1.u = t2.u + and t2.u = t3.u + and t3.u = t4.u + and t4.u = t5.u + and t5.u = t6.u + and t6.u = t7.u + and t7.u = t8.u; + +select * from t2 order by 1; + +select * from t3 where a = any (select c from t4 where c = 1) order by a; +select * from t3 where a in (select c from t4 where c = 1) order by a; +select * from t3 where a <> some (select c from t4 where c = 1) order by a; +select * from t3 where a > all (select c from t4 where c = 1) order by a; +select * from t3 where row(1,10) = (select c,d from t4 where c = 1) order by a; +select * from t3 where exists (select * from t4 where c = 1) order by a; + +drop table if exists t1, t2, t3, t4; + +--echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_temporary.test b/mysql-test/suite/ndb/t/ndb_temporary.test new file mode 100644 index 00000000000..7f6902bf745 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_temporary.test @@ -0,0 +1,38 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# +# creating a temporary table with engine=ndb should give an error +# +--error ER_ILLEGAL_HA_CREATE_OPTION +create temporary table t1 (a int key) engine=ndb; + + +# +# alter temporary table to engine=ndb should give an error +# +create temporary table t1 (a int key) engine=myisam; +--error ER_ILLEGAL_HA_CREATE_OPTION +alter table t1 engine=ndb; +drop table t1; + + +# +# if default storage engine=ndb, temporary tables +# without explicit engine= should be created as myisam +# +SET SESSION storage_engine=NDBCLUSTER; +create table t1 (a int key); + +# verify that we have a ndb table +select engine from information_schema.tables where table_name = 't1'; +drop table t1; + +# verify that we have a myisam table +create temporary table t1 (a int key); +show create table t1; +drop table t1; diff --git a/mysql-test/suite/ndb/t/ndb_transaction.test b/mysql-test/suite/ndb/t/ndb_transaction.test new file mode 100644 index 00000000000..d3ebadb1a78 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_transaction.test @@ -0,0 +1,298 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +drop database if exists mysqltest; +--enable_warnings + +# +# Transactionc test to show that the NDB +# table handler is working properly with +# transactions +# + +# +# Create a normal table with primary key +# +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL +) ENGINE=ndbcluster; + +# insert +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +select count(*) from t1; +select * from t1 where pk1 = 1; +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; +rollback; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; + +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +commit; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; + +# update +begin; +update t1 set attr1 = attr1 * 2; +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +rollback; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; + +begin; +update t1 set attr1 = attr1 * 2; +commit; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; + +# delete +begin; +delete from t1 where attr1 = 2; +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; +rollback; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; + +begin; +delete from t1 where attr1 = 2; +commit; + +select count(*) from t1; +select * from t1 where pk1 = 1; +select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; + +DROP TABLE t1; + +# +# Create table without primary key +# a hidden primary key column is created by handler +# +CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; + +# insert +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +select sum(id) from t1; +select * from t1 where id = 1; +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; +rollback; + +select sum(id) from t1; +select * from t1 where id = 1; +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; + +begin; +insert into t1 values(1,1); +insert into t1 values(2,2); +commit; + +select sum(id) from t1; +select * from t1 where id = 1; +select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; + +# update +begin; +update t1 set id = id * 2; +select sum(id) from t1; +select * from t1 where id = 2; +select * from t1, t1 as t1x where t1x.id = t1.id - 2; +rollback; + +select sum(id) from t1; +select * from t1 where id = 2; +select * from t1, t1 as t1x where t1x.id = t1.id - 2; + +begin; +update t1 set id = id * 2; +commit; + +select sum(id) from t1; +select * from t1 where id = 2; +select * from t1, t1 as t1x where t1x.id = t1.id - 2; + +# delete + +DROP TABLE t1; + +# +# A more extensive test with a lot more records +# + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + +CREATE TABLE t3 ( + a bigint unsigned NOT NULL, + b bigint unsigned not null, + c bigint unsigned, + PRIMARY KEY(a) +) engine=ndbcluster; + +CREATE TABLE t4 ( + a bigint unsigned NOT NULL, + b bigint unsigned not null, + c bigint unsigned NOT NULL, + d int unsigned, + PRIMARY KEY(a, b, c) +) engine=ndbcluster; + + +# +# insert records into tables and rollback +# +let $1=100; +disable_query_log; +begin; +while ($1) +{ + eval insert into t2 values($1, $1+9, 5); + eval insert into t3 values($1, $1+9, 5); + eval insert into t4 values($1, $1+9, 5, $1+26000); + dec $1; +} +rollback; +enable_query_log; + +select count(*) from t2; +select count(*) from t3; +select count(*) from t4; + +# +# insert records into tables and commit; +# +let $1=100; +disable_query_log; +begin; +while ($1) +{ + eval insert into t2 values($1, $1+9, 5); + eval insert into t3 values($1, $1+9, 5); + eval insert into t4 values($1, $1+9, 5, $1+26000); + dec $1; +} +commit; +enable_query_log; + +select count(*) from t2; +select count(*) from t3; +select count(*) from t4; + +# +# delete every other record in the tables +# +let $1=100; +disable_query_log; +while ($1) +{ + eval delete from t2 where a=$1; + eval delete from t3 where a=$1; + eval delete from t4 where a=$1 and b=$1+9 and c=5; + dec $1; + dec $1; +} +enable_query_log; + +# +# update records and rollback +# +begin; +let $1=100; +disable_query_log; +while ($1) +{ + eval update t2 set c=$1 where a=$1; + eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; + eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; + dec $1; + dec $1; +} +rollback; +enable_query_log; + +# +# update records and commit +# +begin; +let $1=100; +disable_query_log; +while ($1) +{ + eval update t2 set c=$1 where a=$1; + eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; + eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; + dec $1; + dec $1; +} +rollback; +enable_query_log; + +drop table t2; +drop table t3; +drop table t4; + +# +# Test multiple databases in one transaction +# + +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + attr1 INT NOT NULL +) ENGINE=ndbcluster; + +create database mysqltest; +use mysqltest; + +CREATE TABLE t2 ( + a bigint unsigned NOT NULL PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + +begin; +insert into test.t1 values(1,1); +insert into t2 values(1,1,1); +insert into test.t1 values(2,2); +insert into t2 values(2,2,2); +select count(*) from test.t1; +select count(*) from t2; +select * from test.t1 where pk1 = 1; +select * from t2 where a = 1; +select test.t1.attr1 +from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; +select t2.a +from t2, t2 as t2x where t2.a = t2x.a + 1; +select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; +rollback; + +select count(*) from test.t1; +select count(*) from t2; + +drop table test.t1, t2; +drop database mysqltest; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_trigger.test b/mysql-test/suite/ndb/t/ndb_trigger.test new file mode 100644 index 00000000000..586fdc0ac97 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_trigger.test @@ -0,0 +1,221 @@ +# Tests which involve triggers and NDB storage engine +--source include/have_ndb.inc +--source include/not_embedded.inc + +# +# Test for bug#18437 "Wrong values inserted with a before update +# trigger on NDB table". SQL-layer didn't properly inform handler +# about fields which were read and set in triggers. In some cases +# this resulted in incorrect (garbage) values of OLD variables and +# lost changes to NEW variables. +# You can find similar tests for ON INSERT triggers in federated.test +# since this engine so far is the only engine in MySQL which cares +# about field mark-up during handler::write_row() operation. +# + +--disable_warnings +drop table if exists t1, t2, t3, t4, t5; +--enable_warnings + +create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; +create table t2 (op char(1), a int not null, b decimal (63,30)); +create table t3 select 1 as i; +create table t4 (a int not null primary key, b int) engine=ndb; +create table t5 (a int not null primary key, b int) engine=ndb; + +delimiter //; +create trigger t1_bu before update on t1 for each row +begin + insert into t2 values ("u", old.a, old.b); + set new.b = old.b + 10; +end;// +create trigger t1_bd before delete on t1 for each row +begin + insert into t2 values ("d", old.a, old.b); +end;// +create trigger t4_au after update on t4 + for each row begin + update t5 set b = b+1; + end; +// +create trigger t4_ad after delete on t4 + for each row begin + update t5 set b = b+1; + end; +// +delimiter ;// + +insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (3, 3, 3.05), (4, 4, 4.05); +insert into t4 values (1,1), (2,2), (3,3), (4, 4); +insert into t5 values (1,0); + +# Check that usual update works as it should +update t1 set a=5 where a != 3; +select * from t1 order by id; +select * from t2 order by op, a, b; +delete from t2; +# Check that everything works for multi-update +update t1, t3 set a=6 where a = 5; +select * from t1 order by id; +select * from t2 order by op, a, b; +delete from t2; +# Check for delete +delete from t1 where a != 3; +select * from t1 order by id; +select * from t2 order by op, a, b; +delete from t2; +# Check for multi-delete +insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (4, 4, 4.05); +delete t1 from t1, t3 where a != 3; +select * from t1 order by id; +select * from t2 order by op, a, b; +delete from t2; +# Check for insert ... on duplicate key update +insert into t1 values (4, 4, 4.05); +insert into t1 (id, a) values (4, 1), (3, 1) on duplicate key update a= a + 1; +select * from t1 order by id; +select * from t2 order by op, a, b; +delete from t2; +# Check for insert ... select ... on duplicate key update +delete from t3; +insert into t3 values (4), (3); +insert into t1 (id, a) (select i, 1 from t3) on duplicate key update a= a + 1; +select * from t1 order by id; +select * from t2 order by op, a, b; +delete from t2; +# Check for replace +replace into t1 (id, a) values (4, 1), (3, 1); +select * from t1 order by id; +select * from t2 order by op, a, b; +delete from t1; +delete from t2; +# Check for replace ... select ... +insert into t1 values (3, 1, 1.05), (4, 1, 2.05); +replace into t1 (id, a) (select i, 2 from t3); +select * from t1 order by id; +select * from t2 order by op, a, b; +delete from t1; +delete from t2; +# Check for load data replace +insert into t1 values (3, 1, 1.05), (5, 2, 2.05); +load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a); +select * from t1 order by id; +select * from t2 order by op, a, b; +update t4 set b = 10 where a = 1; +select * from t5 order by a; +update t5 set b = 0; +delete from t4 where a = 1; +select * from t5 order by a; +drop trigger t4_au; +drop trigger t4_ad; + +drop table t1, t2, t3, t4, t5; +# Test for bug#26242 +# Verify that AFTER UPDATE/DELETE triggers are executed +# after the change has actually taken place + +CREATE TABLE t1 ( + id INT NOT NULL PRIMARY KEY, + xy INT +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (1, 0); + +DELIMITER //; +CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // +DELIMITER ;// + +CREATE TABLE t2 ( + id INT NOT NULL PRIMARY KEY, + xy INT +) ENGINE=ndbcluster; + +INSERT INTO t2 VALUES (2, 0); + +CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; + +INSERT INTO t3 VALUES (1); + +CREATE TABLE t4 LIKE t1; + +DELIMITER //; +CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // +DELIMITER ;// + +CREATE TABLE t5 LIKE t2; + +UPDATE t1 SET xy = 3 WHERE id = 1; +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; + +UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; + +INSERT INTO t4 SELECT * FROM t1; +INSERT INTO t5 SELECT * FROM t2; +UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; +SELECT xy FROM t4 where id = 1; +SELECT xy FROM t5 where id = 1; + +UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; +SELECT xy FROM t4 where id = 1; +SELECT xy FROM t5 where id = 1; + +INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; + +DROP TRIGGER t1_update; +DROP TRIGGER t4_update; + +DELIMITER //; +CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // +DELIMITER ;// + +DELIMITER //; +CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // +DELIMITER ;// + +INSERT INTO t1 VALUES (5, 0),(6,0); +INSERT INTO t2 VALUES (5, 1),(6,1); +INSERT INTO t3 VALUES (5); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; + +INSERT INTO t1 VALUES (5,0); +UPDATE t2 SET xy = 1 WHERE id = 6; +TRUNCATE t4; +INSERT INTO t4 SELECT * FROM t1; +TRUNCATE t5; +INSERT INTO t5 SELECT * FROM t2; +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +SELECT * FROM t4 order by id; +SELECT * FROM t5 order by id; +DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +SELECT * FROM t4 order by id; +SELECT * FROM t5 order by id; + +INSERT INTO t1 VALUES (5, 0); +REPLACE INTO t2 VALUES (6,1); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +REPLACE INTO t1 VALUES (5, 1); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; + +DROP TRIGGER t1_delete; +DROP TRIGGER t4_delete; +DROP TABLE t1, t2, t3, t4, t5; + +--echo End of 5.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_truncate.test b/mysql-test/suite/ndb/t/ndb_truncate.test new file mode 100644 index 00000000000..a1ef4be0d48 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_truncate.test @@ -0,0 +1,41 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +CREATE TABLE t1 ( + a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, + b int unsigned not null, + c int unsigned +) engine=ndbcluster; + + +# +# insert records into table +# +let $1=500; +disable_query_log; +while ($1) +{ + eval insert into t1 values(NULL, $1+9, 5*$1), (NULL, $1+10, 7),(NULL, $1+10, 7*$1), (NULL, $1+10, 10+$1), (NULL, $1+10, 70*$1), (NULL, $1+10, 7), (NULL, $1+10, 9), (NULL, $1+299, 899), (NULL, $1+10, 12), (NULL, $1+10, 14*$1); + dec $1; +} +enable_query_log; + +select count(*) from t1; + +select * from t1 order by a limit 2; + +truncate table t1; + +select count(*) from t1; + +insert into t1 values(NULL,1,1),(NULL,2,2); + +select * from t1 order by a; + +drop table t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_types.test b/mysql-test/suite/ndb/t/ndb_types.test new file mode 100644 index 00000000000..ab18817132e --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_types.test @@ -0,0 +1,85 @@ +--source include/have_ndb.inc +--source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# +# Test creation of different column types in NDB +# +CREATE TABLE t1 ( + auto int(5) unsigned NOT NULL auto_increment, + string char(10) default "hello", + vstring varchar(10) default "hello", + bin binary(2), + vbin varbinary(7), + tiny tinyint(4) DEFAULT '0' NOT NULL , + short smallint(6) DEFAULT '1' NOT NULL , + medium mediumint(8) DEFAULT '0' NOT NULL, + long_int int(11) DEFAULT '0' NOT NULL, + longlong bigint(13) DEFAULT '0' NOT NULL, + real_float float(13,1) DEFAULT 0.0 NOT NULL, + real_double double(16,4), + real_decimal decimal(16,4), + utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, + ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, + umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, + ulong int(11) unsigned DEFAULT '0' NOT NULL, + ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, + bits bit(3), + options enum('one','two','tree') not null, + flags set('one','two','tree') not null, + date_field date, + year_field year, + time_field time, + date_time datetime, + time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (auto), + KEY (utiny), + KEY (tiny), + KEY (short), + KEY any_name (medium), + KEY (longlong), + KEY (real_float), + KEY (ushort), + KEY (umedium), + KEY (ulong), + KEY (ulonglong,ulong), + KEY (options,flags) +); + +set @now = now(); +--sleep 1.5 +insert into t1 +(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, + real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong, + bits,options,flags,date_field,year_field,time_field,date_time) +values +("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, + b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); + +select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, + real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, + bits,options,flags,date_field,year_field,time_field,date_time +from t1; +select time_stamp>@now from t1; + +set @now = now(); +--sleep 1.5 +update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB, +tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2, +real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2, +ulonglong=2, bits=b'010', +options='one',flags='one', date_field='1902-02-02',year_field='1902', +time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1; + +select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, + real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, + bits,options,flags,date_field,year_field,time_field,date_time +from t1; +select time_stamp>@now from t1; + +drop table t1; + +--echo End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_update.test b/mysql-test/suite/ndb/t/ndb_update.test new file mode 100644 index 00000000000..73a0ebc69cb --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_update.test @@ -0,0 +1,41 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# +# Basic test of INSERT in NDB +# + +# +# Create a normal table with primary key +# +CREATE TABLE t1 ( + pk1 INT NOT NULL PRIMARY KEY, + b INT NOT NULL, + c INT NOT NULL UNIQUE +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2); +UPDATE t1 set b = c; +select * from t1 order by pk1; +UPDATE t1 set pk1 = 4 where pk1 = 1; +select * from t1 order by pk1; +--error ER_DUP_ENTRY +UPDATE t1 set pk1 = 4 where pk1 = 2; +UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2; +select * from t1 order by pk1; +--error ER_DUP_ENTRY +UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4; +UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4; +select * from t1 order by pk1; +UPDATE t1 set pk1 = pk1 + 10; +select * from t1 order by pk1; + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/ndb_view.test b/mysql-test/suite/ndb/t/ndb_view.test new file mode 100644 index 00000000000..3b8fc330b40 --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_view.test @@ -0,0 +1,29 @@ +-- source include/have_ndb.inc +-- source include/not_embedded.inc + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3; +DROP VIEW IF EXISTS v1,v2,v3; +--enable_warnings + +# +# simple operations via view +# + +create table t1 (a int, b int, c int, d int) engine=ndb; +insert into t1 values (1,2,3,4),(5,6,7,8); + +create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1; +select * from v1 order by a,b,c; + +update v1 set a=a+100 where b=1; +select * from v1 order by a,b,c; + +drop view v1; + +create view v1 as select t1.c as a from t1; +insert into v1 values (200); +select * from t1 order by a,b,c,d; + +drop view v1; +drop table t1; diff --git a/mysql-test/suite/ndb/t/ndbapi.test b/mysql-test/suite/ndb/t/ndbapi.test new file mode 100644 index 00000000000..3424513f8af --- /dev/null +++ b/mysql-test/suite/ndb/t/ndbapi.test @@ -0,0 +1,44 @@ +-- source include/have_ndb.inc +-- source include/have_ndbapi_examples.inc + +--disable_warnings +DROP TABLE IF EXISTS t0; +drop database if exists mysqltest; +--enable_warnings + +--exec echo Running ndbapi_simple +--exec $NDB_EXAMPLES_DIR/ndbapi_simple/ndbapi_simple $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT + +--exec echo Running ndbapi_simple_index +--exec $NDB_EXAMPLES_DIR/ndbapi_simple_index/ndbapi_simple_index $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT + +--exec echo Running ndbapi_scan +--exec $NDB_EXAMPLES_DIR/ndbapi_scan/ndbapi_scan $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT + +--exec echo Running ndbapi_retries +--exec $NDB_EXAMPLES_DIR/ndbapi_retries/ndbapi_retries $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT + +--exec echo Running ndbapi_async +--exec $NDB_EXAMPLES_DIR/ndbapi_async/ndbapi_async $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT + +--exec echo Running ndbapi_async1 +--exec $NDB_EXAMPLES_DIR/ndbapi_async1/ndbapi_async1 $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT + +use TEST_DB; +create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text, + primary key(c0, c2)) engine ndb charset latin1; +#--exec echo Running ndbapi_event +#--exec $NDB_EXAMPLES_DIR/ndbapi_event/ndbapi_event "localhost:$NDBCLUSTER_PORT" 1 >> $NDB_EXAMPLES_OUTPUT +insert into t0 values (1, 2, 'a', 'b', null); +insert into t0 values (3, 4, 'c', 'd', null); +update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; -- use pk +update t0 set c3 = 'f'; -- use scan +update t0 set c3 = 'F'; -- use scan update to 'same' +update t0 set c2 = 'g' where c0 = 1; -- update pk part +update t0 set c2 = 'G' where c0 = 1; -- update pk part to 'same' +update t0 set c0 = 5, c2 = 'H' where c0 = 3; -- update full PK +delete from t0; +drop table t0; + +--exec echo Running mgmapi_logevent +--exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "localhost:$NDBCLUSTER_PORT" 1 >> $NDB_EXAMPLES_OUTPUT diff --git a/mysql-test/suite/ndb/t/partition_03ndb.test b/mysql-test/suite/ndb/t/partition_03ndb.test new file mode 100644 index 00000000000..3190ab9dfc7 --- /dev/null +++ b/mysql-test/suite/ndb/t/partition_03ndb.test @@ -0,0 +1,26 @@ +############################################### +# # +# Partition tests NDB tables # +# # +############################################### + +# +# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! +# NON STORAGE SPECIFIC TESTCASES SHOULD BE ADDED IN +# THE SOURCED FIELS ONLY. +# + +# Storage engine to be tested +let $engine= 'NDB' ; +-- source include/have_ndb.inc +eval SET SESSION storage_engine=$engine; + + +# Other storage engine <> storage engine to be tested +let $engine_other= 'MEMORY'; +# number of rows for the INSERT/UPDATE/DELETE/SELECT experiments +# on partioned tables +# Attention: In the moment the result files fit to @max_row = 200 only +SET @max_row = 200; + +-- source include/partition_1.inc diff --git a/mysql-test/suite/ndb/t/ps_7ndb.test b/mysql-test/suite/ndb/t/ps_7ndb.test new file mode 100644 index 00000000000..e3f65ec2c4e --- /dev/null +++ b/mysql-test/suite/ndb/t/ps_7ndb.test @@ -0,0 +1,25 @@ +############################################### +# # +# Prepared Statements test on NDB tables # +# # +############################################### + +# +# NOTE: PLEASE SEE ps_1general.test (bottom) +# BEFORE ADDING NEW TEST CASES HERE !!! + +use test; + +-- source include/have_ndb.inc +let $type= 'NDB' ; +-- source include/ps_create.inc +-- source include/ps_renew.inc + +-- source include/ps_query.inc +-- source include/ps_modify.inc +-- source include/ps_modify1.inc +-- source include/ps_conv.inc + +drop table t1, t9; + +# End of 4.1 tests diff --git a/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test b/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test new file mode 100644 index 00000000000..9e2090fddef --- /dev/null +++ b/mysql-test/suite/ndb/t/strict_autoinc_5ndb.test @@ -0,0 +1,10 @@ +-- source include/have_ndb.inc + +# +# Bug#20573 Strict mode auto-increment +# + +let $type= 'NDB' ; +--source include/strict_autoinc.inc + +# end of test diff --git a/mysql-test/suite/rpl/r/rpl000001.a.result b/mysql-test/suite/rpl/r/rpl000001.a.result new file mode 100644 index 00000000000..c52b83d729a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000001.a.result @@ -0,0 +1,3 @@ +n +1 +2 diff --git a/mysql-test/suite/rpl/r/rpl000001.b.result b/mysql-test/suite/rpl/r/rpl000001.b.result new file mode 100644 index 00000000000..5108cfdaf26 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000001.b.result @@ -0,0 +1,2 @@ +sum(length(word)) +71 diff --git a/mysql-test/suite/rpl/r/rpl000010.result b/mysql-test/suite/rpl/r/rpl000010.result new file mode 100644 index 00000000000..65191ea411f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000010.result @@ -0,0 +1,14 @@ +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; +create table t1 (n int not null auto_increment primary key); +insert into t1 values(NULL); +insert into t1 values(2); +select n from t1; +n +1 +2 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl000011.result b/mysql-test/suite/rpl/r/rpl000011.result new file mode 100644 index 00000000000..dd0fa2fbe74 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000011.result @@ -0,0 +1,16 @@ +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; +create table t1 (n int); +insert into t1 values(1); +stop slave; +start slave; +insert into t1 values(2); +select * from t1; +n +1 +2 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl000013.result b/mysql-test/suite/rpl/r/rpl000013.result new file mode 100644 index 00000000000..37838bb88e0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000013.result @@ -0,0 +1,28 @@ +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; +create table t2(n int); +create temporary table t1 (n int); +insert into t1 values(1),(2),(3); +insert into t2 select * from t1; +create temporary table t1 (n int); +insert into t1 values (4),(5); +insert into t2 select * from t1 as t10; +insert into t2 values(6); +select * from t2; +n +1 +2 +3 +4 +5 +6 +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 +drop table if exists t1,t2; +Warnings: +Note 1051 Unknown table 't1' diff --git a/mysql-test/suite/rpl/r/rpl000017.result b/mysql-test/suite/rpl/r/rpl000017.result new file mode 100644 index 00000000000..1c611357e64 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl000017.result @@ -0,0 +1,18 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab'; +grant replication slave on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab'; +start slave; +drop table if exists t1; +create table t1(n int); +insert into t1 values(24); +select * from t1; +n +24 +drop table t1; +delete from mysql.user where user="replicate"; diff --git a/mysql-test/suite/rpl/r/rpl_000015.result b/mysql-test/suite/rpl/r/rpl_000015.result new file mode 100644 index 00000000000..8d23136420f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_000015.result @@ -0,0 +1,34 @@ +reset master; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 106 +reset slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +change master to master_host='127.0.0.1'; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No +change master to master_host='127.0.0.1',master_user='root', +master_password='',master_port=MASTER_PORT; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No +drop table if exists t1; +create table t1 (n int, PRIMARY KEY(n)); +insert into t1 values (10),(45),(90); +SELECT * FROM t1 ORDER BY n; +n +10 +45 +90 +SELECT * FROM t1 ORDER BY n; +n +10 +45 +90 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_EE_err.result b/mysql-test/suite/rpl/r/rpl_EE_err.result new file mode 100644 index 00000000000..16fa931e303 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_EE_err.result @@ -0,0 +1,11 @@ +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; +create table t1 (a int) engine=myisam; +flush tables; +drop table if exists t1; +Warnings: +Error 2 Can't find file: 't1' (errno: 2) diff --git a/mysql-test/suite/rpl/r/rpl_LD_INFILE.result b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result new file mode 100644 index 00000000000..70013f95d85 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_LD_INFILE.result @@ -0,0 +1,117 @@ +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; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a)); +LOAD DATA INFILE '../std_data_ln/words2.dat' INTO TABLE test.t1; +DELETE FROM test.t1 WHERE a = 'abashed'; +DELETE FROM test.t1; +LOAD DATA INFILE '../std_data_ln/words2.dat' INTO TABLE test.t1; +SELECT * FROM test.t1 ORDER BY a DESC; +a +aberration +aberrant +Abernathy +Aberdeen +Abelson +Abelian +Abel +abed +Abe +abducts +abductors +abductor +abductions +abduction +abducted +abduct +abdominal +abdomens +abdomen +Abby +abbreviations +abbreviation +abbreviating +abbreviates +abbreviated +abbreviate +Abbott +abbots +abbot +abbeys +abbey +abbe +Abba +abating +abates +abater +abatements +abatement +abated +abate +abasing +abashing +abashes +abashed +abash +abases +abasements +abasement +abased +abase +SELECT * FROM test.t1 ORDER BY a DESC; +a +aberration +aberrant +Abernathy +Aberdeen +Abelson +Abelian +Abel +abed +Abe +abducts +abductors +abductor +abductions +abduction +abducted +abduct +abdominal +abdomens +abdomen +Abby +abbreviations +abbreviation +abbreviating +abbreviates +abbreviated +abbreviate +Abbott +abbots +abbot +abbeys +abbey +abbe +Abba +abating +abates +abater +abatements +abatement +abated +abate +abasing +abashing +abashes +abashed +abash +abases +abasements +abasement +abased +abase +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_alter.result b/mysql-test/suite/rpl/r/rpl_alter.result new file mode 100644 index 00000000000..6ef5ce3462a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_alter.result @@ -0,0 +1,21 @@ +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; +drop database if exists mysqltest; +create database mysqltest; +create table mysqltest.t1 ( n int); +alter table mysqltest.t1 add m int; +insert into mysqltest.t1 values (1,2); +create table mysqltest.t2 (n int); +insert into mysqltest.t2 values (45); +rename table mysqltest.t2 to mysqltest.t3, mysqltest.t1 to mysqltest.t2; +select * from mysqltest.t2; +n m +1 2 +select * from mysqltest.t3; +n +45 +drop database mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_alter_db.result b/mysql-test/suite/rpl/r/rpl_alter_db.result new file mode 100644 index 00000000000..6edbe5d427f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_alter_db.result @@ -0,0 +1,8 @@ +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; +use mysql; +alter database collate latin1_bin; diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result new file mode 100644 index 00000000000..083f3a4e901 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -0,0 +1,229 @@ +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; +create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3; +insert into t1 values (NULL,1),(NULL,2),(NULL,3); +select * from t1; +a b +12 1 +22 2 +32 3 +select * from t1; +a b +12 1 +22 2 +32 3 +drop table t1; +create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam; +insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); +delete from t1 where b=4; +insert into t1 values (NULL,5),(NULL,6); +select * from t1; +a b +1 1 +2 2 +3 3 +22 5 +32 6 +select * from t1; +a b +1 1 +2 2 +3 3 +22 5 +32 6 +drop table t1; +set @@session.auto_increment_increment=100, @@session.auto_increment_offset=10; +show variables like "%auto_inc%"; +Variable_name Value +auto_increment_increment 100 +auto_increment_offset 10 +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values (NULL),(5),(NULL); +insert into t1 values (250),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +insert into t1 values (1000); +set @@insert_id=400; +insert into t1 values(NULL),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +drop table t1; +create table t1 (a int not null auto_increment, primary key (a)) engine=innodb; +insert into t1 values (NULL),(5),(NULL); +insert into t1 values (250),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +insert into t1 values (1000); +set @@insert_id=400; +insert into t1 values(NULL),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +drop table t1; +set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values (NULL),(5),(NULL),(NULL); +insert into t1 values (500),(NULL),(502),(NULL),(NULL); +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +set @@insert_id=600; +insert into t1 values(600),(NULL),(NULL); +ERROR 23000: Duplicate entry '600' for key 'PRIMARY' +set @@insert_id=600; +insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +600 +610 +611 +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +600 +610 +611 +drop table t1; +set @@session.auto_increment_increment=10, @@session.auto_increment_offset=1; +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values(2),(12),(22),(32),(42); +insert into t1 values (NULL),(NULL); +insert into t1 values (3),(NULL),(NULL); +select * from t1; +a +1 +3 +11 +21 +31 +select * from t1; +a +1 +2 +3 +11 +12 +21 +22 +31 +32 +42 +drop table t1; +create table t1 (a tinyint not null auto_increment primary key) engine=myisam; +insert into t1 values(103); +set auto_increment_increment=11; +set auto_increment_offset=4; +insert into t1 values(null); +insert into t1 values(null); +insert into t1 values(null); +ERROR 23000: Duplicate entry '125' for key 'PRIMARY' +select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t1 order by a; +a mod(a-@@auto_increment_offset,@@auto_increment_increment) +103 0 +114 0 +125 0 +create table t2 (a tinyint unsigned not null auto_increment primary key) engine=myisam; +set auto_increment_increment=10; +set auto_increment_offset=1; +set insert_id=1000; +insert into t2 values(null); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t2 order by a; +a mod(a-@@auto_increment_offset,@@auto_increment_increment) +251 0 +create table t3 like t1; +set auto_increment_increment=1000; +set auto_increment_offset=700; +insert into t3 values(null); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +select * from t3 order by a; +a +127 +select * from t1 order by a; +a +103 +114 +125 +select * from t2 order by a; +a +251 +select * from t3 order by a; +a +127 +drop table t1,t2,t3; diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result b/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result new file mode 100644 index 00000000000..25eda6ee454 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_auto_increment_11932.result @@ -0,0 +1,47 @@ +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; +drop database if exists test1; +create database test1; +use test1; +CREATE TABLE `t1` ( +`id` int(10) unsigned NOT NULL auto_increment, +`fname` varchar(100) default NULL, +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; +INSERT INTO `t1` VALUES (1, 'blablabla'); +CREATE TABLE `t2` ( +`id` int(10) NOT NULL auto_increment, +`comment` varchar(255) NOT NULL default '', +PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=3 ; +INSERT INTO `t2` VALUES (1, 'testtest 1'); +INSERT INTO `t2` VALUES (2, 'test 2'); +CREATE PROCEDURE simpleproc3 () +NOT DETERMINISTIC +BEGIN +INSERT INTO t1 (fname) (SELECT t2.comment FROM t2 WHERE t2.id = '1'); +INSERT INTO t1 (fname) VALUES('test'); +END +$ +CALL simpleproc3(); +select * from t2; +id comment +1 testtest 1 +2 test 2 +TRUNCATE TABLE `t1`; +CALL simpleproc3(); +select * from t1; +id fname +1 testtest 1 +2 test +use test1; +select * from t1; +id fname +1 testtest 1 +2 test +drop database test1; +drop database test1; diff --git a/mysql-test/suite/rpl/r/rpl_bit.result b/mysql-test/suite/rpl/r/rpl_bit.result new file mode 100644 index 00000000000..924de8a65f8 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_bit.result @@ -0,0 +1,138 @@ +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; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 ( +dummyKey INTEGER NOT NULL, +f01 TINYINT, +f10 TINYINT, +f12 TINYINT, +f15 TINYINT, +f16 TINYINT, +f7 TINYINT, +f9 TINYINT, +f29 TINYINT, +f0 TINYINT, +fA1 TINYINT, +C32 TINYINT, +A42 TINYINT, +CA3 TINYINT, +A044 TINYINT, +f001 TINYINT, +A3002 TINYINT, +fC003 TINYINT, +CA300 TINYINT, +A305 TINYINT, +CA321 TINYINT, +r001 TINYINT, +bit1 BIT(6), +bit2 BIT(6), +bit3 BIT(6), +State1 TINYINT, +State2 TINYINT, +State3 TINYINT, +State4 TINYINT, +SubState TINYINT, +gState TINYINT, +oSupp TINYINT, +tSupp TINYINT, +sSuppD TINYINT, +mSuppf TINYINT, +GSuppDf TINYINT, +VNotSupp TINYINT, +x034 TINYINT, +PRIMARY KEY USING HASH (dummyKey) ); +LOCK TABLES test.t1 WRITE; +INSERT INTO test.t1 VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'111110',b'110101',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'100100',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'101010',b'010101',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'101010',b'111111',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +UNLOCK TABLES; +SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1; +oSupp sSuppD GSuppDf VNotSupp x034 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +SELECT hex(bit1) FROM test.t1 ORDER BY bit1; +hex(bit1) +0 +0 +0 +0 +0 +2A +3F +3F +SELECT hex(bit2) from test.t1 ORDER BY bit2; +hex(bit2) +0 +1 +1 +1 +1 +2A +3E +3F +SELECT hex(bit3) from test.t1 ORDER BY bit3; +hex(bit3) +0 +1 +1 +1 +1 +15 +24 +35 +SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1; +oSupp sSuppD GSuppDf VNotSupp x034 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +5 5 3 2 1 +SELECT hex(bit1) FROM test.t1 ORDER BY bit1; +hex(bit1) +0 +0 +0 +0 +0 +2A +3F +3F +SELECT hex(bit2) from test.t1 ORDER BY bit2; +hex(bit2) +0 +1 +1 +1 +1 +2A +3E +3F +SELECT hex(bit3) from test.t1 ORDER BY bit3; +hex(bit3) +0 +1 +1 +1 +1 +15 +24 +35 +DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_bit_npk.result b/mysql-test/suite/rpl/r/rpl_bit_npk.result new file mode 100644 index 00000000000..9599660f18f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_bit_npk.result @@ -0,0 +1,169 @@ +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; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 ( +dummyKey INTEGER NOT NULL, +f01 TINYINT, +f10 TINYINT, +f12 TINYINT, +f15 TINYINT, +f16 TINYINT, +f7 TINYINT, +f9 TINYINT, +f29 TINYINT, +f0 TINYINT, +fA1 TINYINT, +C32 TINYINT, +A42 TINYINT, +CA3 TINYINT, +A044 TINYINT, +f001 TINYINT, +A3002 TINYINT, +fC003 TINYINT, +CA300 TINYINT, +A305 TINYINT, +CA321 TINYINT, +r001 TINYINT, +bit1 BIT(6), +bit2 BIT(6), +bit3 BIT(6), +State1 TINYINT, +State2 TINYINT, +State3 TINYINT, +State4 TINYINT, +SubState TINYINT, +gState TINYINT, +oSupp TINYINT, +tSupp TINYINT, +sSuppD TINYINT, +mSuppf TINYINT, +GSuppDf TINYINT, +VNotSupp TINYINT, +x034 TINYINT); +LOCK TABLES test.t1 WRITE; +INSERT INTO test.t1 VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'111110',b'110101',4,5,5,5,5,5,5,5,5,5,3,NULL,1); +INSERT INTO test.t1 VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'100100',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'101010',b'010101',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'101010',b'111111',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'0',1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +INSERT INTO test.t1 VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1); +UNLOCK TABLES; +UPDATE test.t1 set x034 = 50 where bit3 = b'000000'; +UPDATE test.t1 set VNotSupp = 33 where bit1 = b'0'; +SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 +FROM test.t1 +ORDER BY oSupp, sSuppD, GSuppDf, VNotSupp, x034; +oSupp sSuppD GSuppDf VNotSupp x034 +5 5 3 NULL 1 +5 5 3 2 1 +5 5 3 2 50 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +SELECT hex(bit1) from test.t1 ORDER BY bit1; +hex(bit1) +0 +0 +0 +0 +0 +2A +3F +3F +SELECT hex(bit2) from test.t1 ORDER BY bit2; +hex(bit2) +0 +1 +1 +1 +1 +2A +3E +3F +SELECT hex(bit3) from test.t1 ORDER BY bit3; +hex(bit3) +0 +1 +1 +1 +1 +15 +24 +35 +SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 +FROM test.t1 +ORDER BY oSupp, sSuppD, GSuppDf, VNotSupp, x034; +oSupp sSuppD GSuppDf VNotSupp x034 +5 5 3 NULL 1 +5 5 3 2 1 +5 5 3 2 50 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +5 5 3 33 1 +SELECT hex(bit1) from test.t1 ORDER BY bit1; +hex(bit1) +0 +0 +0 +0 +0 +2A +3F +3F +SELECT hex(bit2) from test.t1 ORDER BY bit2; +hex(bit2) +0 +1 +1 +1 +1 +2A +3E +3F +SELECT hex(bit3) from test.t1 ORDER BY bit3; +hex(bit3) +0 +1 +1 +1 +1 +15 +24 +35 +CREATE TABLE test.t2 (a INT, b BIT(1)); +INSERT INTO test.t2 VALUES (1, b'0'); +INSERT INTO test.t2 VALUES (1, b'1'); +UPDATE test.t2 SET a = 2 WHERE b = b'1'; +CREATE TABLE test.t3 (a INT, b INT); +INSERT INTO test.t3 VALUES (1, NULL); +INSERT INTO test.t3 VALUES (1, 0); +UPDATE test.t3 SET a = 2 WHERE b = 0; +SELECT a, hex(b) FROM test.t2 ORDER BY a,b; +a hex(b) +1 0 +2 1 +SELECT * FROM test.t3 ORDER BY a,b; +a b +1 NULL +2 0 +SELECT a, hex(b) FROM test.t2 ORDER BY a,b; +a hex(b) +1 0 +2 1 +SELECT * FROM test.t3 ORDER BY a,b; +a b +1 NULL +2 0 +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result new file mode 100644 index 00000000000..680328bcea5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_change_master.result @@ -0,0 +1,26 @@ +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; +create table t1(n int); +select * from t1; +n +stop slave sql_thread; +insert into t1 values(1); +insert into t1 values(2); +stop slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No +change master to master_user='root'; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No +start slave; +select * from t1; +n +1 +2 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_charset_sjis.result b/mysql-test/suite/rpl/r/rpl_charset_sjis.result new file mode 100644 index 00000000000..770ad0588d1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_charset_sjis.result @@ -0,0 +1,26 @@ +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; +drop table if exists t1; +drop procedure if exists p1; +create table t1 (a varchar(255) character set sjis); +create procedure p1 (in a varchar(255) character set sjis) insert into t1 values (a); +SET NAMES binary; +CALL p1 ('–\\'); +select "--- on master ---"; +--- on master --- +--- on master --- +select hex(a) from t1 ; +hex(a) +965C +select "--- on slave ---"; +--- on slave --- +--- on slave --- +select hex(a) from t1; +hex(a) +965C +drop table t1; +drop procedure p1; diff --git a/mysql-test/suite/rpl/r/rpl_commit_after_flush.result b/mysql-test/suite/rpl/r/rpl_commit_after_flush.result new file mode 100644 index 00000000000..eaddda63b6a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_commit_after_flush.result @@ -0,0 +1,13 @@ +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; +CREATE TABLE t1 (a INT) ENGINE=innodb; +begin; +insert into t1 values(1); +flush tables with read lock; +commit; +unlock tables; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_create_database.result b/mysql-test/suite/rpl/r/rpl_create_database.result new file mode 100644 index 00000000000..0cfd44bc58c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_create_database.result @@ -0,0 +1,70 @@ +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; +DROP DATABASE IF EXISTS mysqltest_prometheus; +DROP DATABASE IF EXISTS mysqltest_sisyfos; +DROP DATABASE IF EXISTS mysqltest_bob; +DROP DATABASE IF EXISTS mysqltest_bob; +CREATE DATABASE mysqltest_prometheus; +CREATE DATABASE mysqltest_sisyfos; +CREATE DATABASE mysqltest_bob; +USE mysqltest_sisyfos; +CREATE TABLE t1 (b int); +INSERT INTO t1 VALUES(1); +USE mysqltest_bob; +CREATE TABLE t2 (b int); +INSERT INTO t2 VALUES(2); +ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1; +USE mysqltest_sisyfos; +ALTER DATABASE mysqltest_bob CHARACTER SET latin1; +SHOW DATABASES; +Database +information_schema +mysql +mysqltest_bob +mysqltest_prometheus +mysqltest_sisyfos +test +SHOW DATABASES; +Database +information_schema +mysql +mysqltest_prometheus +mysqltest_sisyfos +test +DROP DATABASE IF EXISTS mysqltest_sisyfos; +USE mysqltest_prometheus; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1); +CREATE DATABASE mysqltest_sisyfos; +USE mysqltest_sisyfos; +CREATE TABLE t2 (a INT); +SHOW DATABASES; +Database +information_schema +mysql +mysqltest_bob +mysqltest_prometheus +mysqltest_sisyfos +test +SHOW DATABASES; +Database +information_schema +mysql +mysqltest_prometheus +mysqltest_sisyfos +test +USE mysqltest_prometheus; +SHOW TABLES; +Tables_in_mysqltest_prometheus +t1 +USE mysqltest_sisyfos; +SHOW TABLES; +Tables_in_mysqltest_sisyfos +t2 +DROP DATABASE IF EXISTS mysqltest_prometheus; +DROP DATABASE IF EXISTS mysqltest_sisyfos; +DROP DATABASE IF EXISTS mysqltest_bob; diff --git a/mysql-test/suite/rpl/r/rpl_critical_errors.result b/mysql-test/suite/rpl/r/rpl_critical_errors.result new file mode 100644 index 00000000000..bcc53565084 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_critical_errors.result @@ -0,0 +1 @@ +Turn on parsing to run this test diff --git a/mysql-test/suite/rpl/r/rpl_critical_errors.result.txt b/mysql-test/suite/rpl/r/rpl_critical_errors.result.txt new file mode 100644 index 00000000000..0df2e1ef369 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_critical_errors.result.txt @@ -0,0 +1,56 @@ +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; +CREATE TABLE t1 (data LONGBLOB) ENGINE=MYISAM; +CREATE TABLE t2 (data LONGBLOB) ENGINE=MYISAM; +INSERT INTO t1 (data) VALUES (repeat('a',1024*1024)); +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t2 SELECT * FROM t1; +KILL QUERY 2; +SELECT COUNT(*) FROM t2; +COUNT(*) +0 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1317 +Last_Error # +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # diff --git a/mysql-test/suite/rpl/r/rpl_ddl.result b/mysql-test/suite/rpl/r/rpl_ddl.result new file mode 100644 index 00000000000..d41462de621 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ddl.result @@ -0,0 +1,1616 @@ +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; + +-------- switch to master ------- +SET AUTOCOMMIT = 1; +DROP DATABASE IF EXISTS mysqltest1; +DROP DATABASE IF EXISTS mysqltest2; +DROP DATABASE IF EXISTS mysqltest3; +CREATE DATABASE mysqltest1; +CREATE DATABASE mysqltest2; +CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=InnoDB; +INSERT INTO mysqltest1.t1 SET f1= 0; +CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE=InnoDB; +CREATE INDEX my_idx6 ON mysqltest1.t6(f1); +CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE=InnoDB; +INSERT INTO mysqltest1.t7 SET f1= 0; +CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE=InnoDB; +CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE=InnoDB; +CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) ENGINE=MEMORY; +SET AUTOCOMMIT = 0; +use mysqltest1; + +-------- switch to slave -------- +SET AUTOCOMMIT = 1; +use mysqltest1; + +-------- switch to master ------- + +######## SELECT 1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 0 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +SELECT 1; +1 +1 +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## SELECT COUNT(*) FROM t1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 0 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +SELECT COUNT(*) FROM t1; +COUNT(*) +2 +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## COMMIT ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 0 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +COMMIT; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## ROLLBACK ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 1 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## SET AUTOCOMMIT=1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 1 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +SET AUTOCOMMIT=1; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SET AUTOCOMMIT=0; + +######## START TRANSACTION ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 2 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to master ------- +START TRANSACTION; +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## BEGIN ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 3 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to master ------- +BEGIN; +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## DROP TABLE mysqltest1.t2 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 4 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to master ------- +DROP TABLE mysqltest1.t2; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TABLES LIKE 't2'; +Tables_in_mysqltest1 (t2) + +-------- switch to slave -------- +SHOW TABLES LIKE 't2'; +Tables_in_mysqltest1 (t2) + +-------- switch to master ------- + +######## DROP TEMPORARY TABLE mysqltest1.t23 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 5 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +DROP TEMPORARY TABLE mysqltest1.t23; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- +SHOW TABLES LIKE 't23'; +Tables_in_mysqltest1 (t23) + +-------- switch to slave -------- +SHOW TABLES LIKE 't23'; +Tables_in_mysqltest1 (t23) + +-------- switch to master ------- + +######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 5 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +RENAME TABLE mysqltest1.t3 to mysqltest1.t20; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TABLES LIKE 't20'; +Tables_in_mysqltest1 (t20) +t20 + +-------- switch to slave -------- +SHOW TABLES LIKE 't20'; +Tables_in_mysqltest1 (t20) +t20 + +-------- switch to master ------- + +######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 6 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to master ------- +ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT; +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +describe mysqltest1.t4; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 bigint(20) YES NULL + +-------- switch to slave -------- +describe mysqltest1.t4; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 bigint(20) YES NULL + +-------- switch to master ------- + +######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= InnoDB ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 7 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to master ------- +CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= InnoDB; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 8 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## TRUNCATE TABLE mysqltest1.t7 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 8 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +TRUNCATE TABLE mysqltest1.t7; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT * FROM mysqltest1.t7; +f1 + +-------- switch to slave -------- +SELECT * FROM mysqltest1.t7; +f1 + +-------- switch to master ------- + +######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 9 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to master ------- +LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +UNLOCK TABLES; + +######## UNLOCK TABLES ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 10 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +UNLOCK TABLES; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- +LOCK TABLES mysqltest1.t1 READ; + +######## UNLOCK TABLES ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 10 + 1; +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +UNLOCK TABLES; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- +LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; + +######## UNLOCK TABLES ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 10 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +UNLOCK TABLES; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## DROP INDEX my_idx6 ON mysqltest1.t6 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 11 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to master ------- +DROP INDEX my_idx6 ON mysqltest1.t6; +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW INDEX FROM mysqltest1.t6; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment + +-------- switch to slave -------- +SHOW INDEX FROM mysqltest1.t6; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment + +-------- switch to master ------- + +######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 12 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to master ------- +CREATE INDEX my_idx5 ON mysqltest1.t5(f1); +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW INDEX FROM mysqltest1.t5; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE + +-------- switch to slave -------- +SHOW INDEX FROM mysqltest1.t5; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t5 1 my_idx5 1 f1 A NULL NULL NULL YES BTREE + +-------- switch to master ------- + +######## DROP DATABASE mysqltest2 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 13 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to master ------- +DROP DATABASE mysqltest2; +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW DATABASES LIKE "mysqltest2"; +Database (mysqltest2) + +-------- switch to slave -------- +SHOW DATABASES LIKE "mysqltest2"; +Database (mysqltest2) + +-------- switch to master ------- + +######## CREATE DATABASE mysqltest3 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 14 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to master ------- +CREATE DATABASE mysqltest3; +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW DATABASES LIKE "mysqltest3"; +Database (mysqltest3) +mysqltest3 + +-------- switch to slave -------- +SHOW DATABASES LIKE "mysqltest3"; +Database (mysqltest3) +mysqltest3 + +-------- switch to master ------- + +######## CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1" ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 15 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to master ------- +CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1"; +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment + +-------- switch to slave -------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment + +-------- switch to master ------- + +######## ALTER PROCEDURE p1 COMMENT "I have been altered" ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 16 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to master ------- +ALTER PROCEDURE p1 COMMENT "I have been altered"; +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment I have been altered + +-------- switch to slave -------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment I have been altered + +-------- switch to master ------- + +######## DROP PROCEDURE p1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 17 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to master ------- +DROP PROCEDURE p1; +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW PROCEDURE STATUS LIKE 'p1'; + +-------- switch to slave -------- +SHOW PROCEDURE STATUS LIKE 'p1'; + +-------- switch to master ------- + +######## CREATE OR REPLACE VIEW v1 as select * from t1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 18 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to master ------- +CREATE OR REPLACE VIEW v1 as select * from t1; +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to slave -------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to master ------- + +######## ALTER VIEW v1 AS select f1 from t1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 19 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to master ------- +ALTER VIEW v1 AS select f1 from t1; +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to slave -------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to master ------- + +######## DROP VIEW IF EXISTS v1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 20 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to master ------- +DROP VIEW IF EXISTS v1; +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW CREATE VIEW v1; +ERROR 42S02: Table 'mysqltest1.v1' doesn't exist + +-------- switch to slave -------- +SHOW CREATE VIEW v1; +ERROR 42S02: Table 'mysqltest1.v1' doesn't exist + +-------- switch to master ------- + +######## CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 21 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to master ------- +CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost + +-------- switch to slave -------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost + +-------- switch to master ------- + +######## DROP TRIGGER trg1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 22 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to master ------- +DROP TRIGGER trg1; +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer + +-------- switch to slave -------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer + +-------- switch to master ------- + +######## CREATE USER user1@localhost ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 23 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to master ------- +CREATE USER user1@localhost; +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT user FROM mysql.user WHERE user = 'user1'; +user +user1 + +-------- switch to slave -------- +SELECT user FROM mysql.user WHERE user = 'user1'; +user +user1 + +-------- switch to master ------- + +######## RENAME USER user1@localhost TO rename1@localhost ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 24 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to master ------- +RENAME USER user1@localhost TO rename1@localhost; +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user +rename1 + +-------- switch to slave -------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user +rename1 + +-------- switch to master ------- + +######## DROP USER rename1@localhost ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 25 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to master ------- +DROP USER rename1@localhost; +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user + +-------- switch to slave -------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user +use test; + +-------- switch to master ------- +DROP DATABASE mysqltest1; +DROP DATABASE mysqltest3; diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result new file mode 100644 index 00000000000..914e1497094 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result @@ -0,0 +1,199 @@ +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; +CREATE TABLE t1 (a INT NOT NULL, KEY(a)) ENGINE=innodb; +CREATE TABLE t2 (a INT NOT NULL, KEY(a)) ENGINE=innodb; +CREATE TABLE t3 (a INT UNIQUE) ENGINE=innodb; +CREATE TABLE t4 (a INT) ENGINE=innodb; +show variables like 'slave_transaction_retries'; +Variable_name Value +slave_transaction_retries 10 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + KEY `a` (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) NOT NULL, + KEY `a` (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +show variables like 'slave_transaction_retries'; +Variable_name Value +slave_transaction_retries 2 +stop slave; +begin; +insert into t2 values (0); +insert into t1 values(1); +commit; +begin; +select * from t1 for update; +a +start slave; +select * from t2 for update /* dl */; +a +commit; +select * from t1; +a +1 +select * from t2 /* must be 1 */; +a +0 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +stop slave; +delete from t3; +change master to master_log_pos=548; +begin; +select * from t2 for update; +a +0 +start slave; +select count(*) from t3 /* must be zero */; +count(*) +0 +commit; +select * from t1; +a +1 +1 +select * from t2; +a +0 +0 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +set @my_max_relay_log_size= @@global.max_relay_log_size; +set global max_relay_log_size=0; +stop slave; +delete from t3; +change master to master_log_pos=548; +begin; +select * from t2 for update; +a +0 +0 +start slave; +select count(*) from t3 /* must be zero */; +count(*) +0 +commit; +select * from t1; +a +1 +1 +1 +select * from t2; +a +0 +0 +0 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +drop table t1,t2,t3,t4; +set global max_relay_log_size= @my_max_relay_log_size; +End of 5.1 tests diff --git a/mysql-test/suite/rpl/r/rpl_delete_no_where.result b/mysql-test/suite/rpl/r/rpl_delete_no_where.result new file mode 100644 index 00000000000..78edf4bf3fa --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_delete_no_where.result @@ -0,0 +1,15 @@ +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; +create table t1 (a int, b int) engine=myisam; +insert into t1 values(1,1); +select * from t1; +a b +1 1 +delete from t1; +select * from t1; +a b +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result new file mode 100644 index 00000000000..f7f1ce66656 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -0,0 +1,91 @@ +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; +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; +flush privileges; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; +grant select on *.* to rpl_do_grant@localhost; +grant drop on test.* to rpl_do_grant@localhost; +show grants for rpl_do_grant@localhost; +Grants for rpl_do_grant@localhost +GRANT SELECT ON *.* TO 'rpl_do_grant'@'localhost' +GRANT DROP ON `test`.* TO 'rpl_do_grant'@'localhost' +set password for rpl_do_grant@localhost=password("does it work?"); +select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant'; +password<>_binary'' +1 +update mysql.user set password='' where user='rpl_do_grant'; +flush privileges; +select password<>'' from mysql.user where user='rpl_do_grant'; +password<>'' +0 +set sql_mode='ANSI_QUOTES'; +set password for rpl_do_grant@localhost=password('does it work?'); +set sql_mode=''; +select password<>'' from mysql.user where user='rpl_do_grant'; +password<>'' +1 +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; +flush privileges; +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; +flush privileges; +show grants for rpl_do_grant@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost' +show grants for rpl_do_grant@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost' +create user rpl_do_grant@localhost; +show grants for rpl_do_grant@localhost; +Grants for rpl_do_grant@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost' +show grants for rpl_do_grant2@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' +show grants for rpl_do_grant@localhost; +Grants for rpl_do_grant@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost' +show grants for rpl_do_grant2@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' +rename user rpl_do_grant@localhost to rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +revoke all privileges, grant option from rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +show grants for rpl_do_grant2@localhost; +Grants for rpl_do_grant2@localhost +GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +drop user rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' +show grants for rpl_do_grant2@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' diff --git a/mysql-test/suite/rpl/r/rpl_drop.result b/mysql-test/suite/rpl/r/rpl_drop.result new file mode 100644 index 00000000000..b83594c9bb1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_drop.result @@ -0,0 +1,10 @@ +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; +drop table if exists t1, t2; +create table t1 (a int); +drop table t1, t2; +ERROR 42S02: Unknown table 't2' diff --git a/mysql-test/suite/rpl/r/rpl_drop_db.result b/mysql-test/suite/rpl/r/rpl_drop_db.result new file mode 100644 index 00000000000..c0efdf5290d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_drop_db.result @@ -0,0 +1,38 @@ +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; +drop database if exists mysqltest1; +create database mysqltest1; +create table mysqltest1.t1 (n int); +insert into mysqltest1.t1 values (1); +select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; +create table mysqltest1.t2 (n int); +create table mysqltest1.t3 (n int); +drop database mysqltest1; +ERROR HY000: Error dropping database (can't rmdir './mysqltest1/', errno: 17) +use mysqltest1; +show tables; +Tables_in_mysqltest1 +drop database mysqltest1; +ERROR HY000: Error dropping database (can't rmdir './mysqltest1/', errno: 17) +use mysqltest1; +show tables; +Tables_in_mysqltest1 +use test; +create table t1 (n int); +insert into t1 values (1234); +use mysqltest1; +show tables; +Tables_in_mysqltest1 +use test; +select * from t1; +n +1234 +stop slave; +drop database mysqltest1; +drop database mysqltest1; +use test; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_drop_temp.result b/mysql-test/suite/rpl/r/rpl_drop_temp.result new file mode 100644 index 00000000000..40d578dd13e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_drop_temp.result @@ -0,0 +1,13 @@ +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; +create database if not exists mysqltest; +create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; +create temporary table mysqltest.t2 (n int)ENGINE=MyISAM; +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 +drop database mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result new file mode 100644 index 00000000000..257baa81b74 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result @@ -0,0 +1,22 @@ +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; +reset master; +change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; +start slave; +create table t1 (n int); +create table t4 (n int); +create table t5 (n int); +create table t6 (n int); +show tables; +Tables_in_test +t1 +t4 +t5 +t6 +stop slave; +reset slave; +drop table t1,t4,t5,t6; diff --git a/mysql-test/suite/rpl/r/rpl_empty_master_crash.result b/mysql-test/suite/rpl/r/rpl_empty_master_crash.result new file mode 100644 index 00000000000..d57600d7396 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_empty_master_crash.result @@ -0,0 +1,12 @@ +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; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +load table t1 from master; +ERROR 08S01: Error connecting to master: Master is not configured +load table t1 from master; +ERROR HY000: Error from master: 'Table 'test.t1' doesn't exist' diff --git a/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result b/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result new file mode 100644 index 00000000000..f211d5d9a2f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_err_ignoredtable.result @@ -0,0 +1,42 @@ +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; +create table t1 (a int primary key); +create table t4 (a int primary key); +insert into t1 values (1),(1); +Got one of the listed errors +insert into t4 values (1),(2); +show tables like 't1'; +Tables_in_test (t1) +show tables like 't4'; +Tables_in_test (t4) +t4 +SELECT * FROM test.t4 ORDER BY a; +a +1 +2 +drop table t1; +select get_lock('crash_lock%20C', 10); +get_lock('crash_lock%20C', 10) +1 +create table t2 (a int primary key); +insert into t2 values(1); +create table t3 (id int); +insert into t3 values(connection_id()); +update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); +select (@id := id) - id from t3; +(@id := id) - id +0 +kill @id; +drop table t2,t3; +insert into t4 values (3),(4); +SELECT * FROM test.t4 ORDER BY a; +a +1 +2 +3 +4 +DROP TABLE test.t4; diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result new file mode 100644 index 00000000000..0d7e7bb28a7 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -0,0 +1,165 @@ +set global event_scheduler=1; +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 binlog_format=row; +DROP EVENT IF EXISTS test.justonce; +drop table if exists t1,t2; +CREATE TABLE `t1` ( +`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, +`c` VARCHAR(50) NOT NULL, +`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +INSERT INTO t1 (c) VALUES ('manually'); +CREATE EVENT test.justonce ON SCHEDULE AT NOW() + INTERVAL 2 SECOND DO INSERT INTO t1 +(c) VALUES ('from justonce'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; +db name status originator +test justonce ENABLED 1 +"in the master" +SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; +id c ts +1 manually TIMESTAMP +2 from justonce TIMESTAMP +affected rows: 2 +"in the slave" +SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; +id c ts +1 manually TIMESTAMP +2 from justonce TIMESTAMP +affected rows: 2 +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; +db name status originator +DROP EVENT IF EXISTS test.slave_once; +CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO +INSERT INTO t1(c) VALUES ('from slave_once'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once'; +db name status originator +test slave_once ENABLED 2 +DROP EVENT IF EXISTS test.slave_once; +DROP EVENT IF EXISTS test.justonce; +CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO +INSERT INTO t1(c) VALUES ('from er'); +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er ENABLED 1 INSERT INTO t1(c) VALUES ('from er') +"in the slave" +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er SLAVESIDE_DISABLED 1 INSERT INTO t1(c) VALUES ('from er') +"in the master" +ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO INSERT into t1(c) VALUES ('from alter er'); +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er ENABLED 1 INSERT into t1(c) VALUES ('from alter er') +"in the slave" +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er SLAVESIDE_DISABLED 1 INSERT into t1(c) VALUES ('from alter er') +"in the master" +DROP EVENT test.er; +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; +db name status originator +"in the slave" +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; +db name status originator +CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND +DO INSERT INTO t1(c) VALUES ('from slave_terminate'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; +db name status originator +test slave_terminate ENABLED 2 +DROP EVENT test.slave_terminate; +CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND +DISABLE ON SLAVE DO INSERT INTO t1(c) VALUES ('from slave_terminate'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; +db name status originator +test slave_terminate SLAVESIDE_DISABLED 2 +DROP EVENT test.slave_terminate; +"in the master" +DROP TABLE t1; +set binlog_format=statement; +DROP EVENT IF EXISTS test.justonce; +drop table if exists t1,t2; +CREATE TABLE `t1` ( +`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, +`c` VARCHAR(50) NOT NULL, +`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +INSERT INTO t1 (c) VALUES ('manually'); +CREATE EVENT test.justonce ON SCHEDULE AT NOW() + INTERVAL 2 SECOND DO INSERT INTO t1 +(c) VALUES ('from justonce'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; +db name status originator +test justonce ENABLED 1 +"in the master" +SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; +id c ts +1 manually TIMESTAMP +2 from justonce TIMESTAMP +affected rows: 2 +"in the slave" +SELECT * FROM t1 WHERE c = 'from justonce' OR c = 'manually' ORDER BY id; +id c ts +1 manually TIMESTAMP +2 from justonce TIMESTAMP +affected rows: 2 +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'justonce'; +db name status originator +DROP EVENT IF EXISTS test.slave_once; +CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO +INSERT INTO t1(c) VALUES ('from slave_once'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once'; +db name status originator +test slave_once ENABLED 2 +DROP EVENT IF EXISTS test.slave_once; +DROP EVENT IF EXISTS test.justonce; +CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO +INSERT INTO t1(c) VALUES ('from er'); +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er ENABLED 1 INSERT INTO t1(c) VALUES ('from er') +"in the slave" +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er SLAVESIDE_DISABLED 1 INSERT INTO t1(c) VALUES ('from er') +"in the master" +ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO INSERT into t1(c) VALUES ('from alter er'); +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er ENABLED 1 INSERT into t1(c) VALUES ('from alter er') +"in the slave" +SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er'; +db name status originator body +test er SLAVESIDE_DISABLED 1 INSERT into t1(c) VALUES ('from alter er') +"in the master" +DROP EVENT test.er; +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; +db name status originator +"in the slave" +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test'; +db name status originator +CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND +DO INSERT INTO t1(c) VALUES ('from slave_terminate'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; +db name status originator +test slave_terminate ENABLED 2 +DROP EVENT test.slave_terminate; +CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND +DISABLE ON SLAVE DO INSERT INTO t1(c) VALUES ('from slave_terminate'); +SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate'; +db name status originator +test slave_terminate SLAVESIDE_DISABLED 2 +DROP EVENT test.slave_terminate; +"in the master" +DROP TABLE t1; +CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR +DO BEGIN +select * from t1; +END;| +ALTER EVENT event1 RENAME TO event2; +DROP EVENT event2; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result new file mode 100644 index 00000000000..a237edc8063 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result @@ -0,0 +1,749 @@ +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; +**** Diff Table Def Start **** +*** On Slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(4) DEFAULT 'TEST') +ENGINE='InnoDB'; +*** Create t1 on Master *** +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); +SELECT * FROM t1 ORDER BY a; +a b c +1 2 TEXAS +2 1 AUSTIN +3 4 QA +*** Select from slave *** +SELECT * FROM t1 ORDER BY a; +a b c d e +1 2 TEXAS 2 TEST +2 1 AUSTIN 2 TEST +3 4 QA 2 TEST +*** Drop t1 *** +DROP TABLE t1; +*** Create t3 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t3 on Master *** +CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t3 *** +DROP TABLE t3; +*** Create t4 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t4 on Master *** +CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), +(30000.22,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t4 *** +DROP TABLE t4; +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT, e DOUBLE, +f DECIMAL(8,2))ENGINE='InnoDB'; +*** Create t5 on Master *** +CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT, e BLOB, +f FLOAT) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), +(2,'JOE',300.01,0,'b2b2',1.0000009); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t5 *** +DROP TABLE t5; +*** Create t6 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT)ENGINE='InnoDB'; +*** Create t6 on Master *** +CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), +(2,'JOE',300.01,0); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; +*** Drop t6 *** +DROP TABLE t6; +DROP TABLE t6; +START SLAVE; +**** Diff Table Def End **** +**** Extra Colums Start **** +*** Create t7 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e CHAR(20) DEFAULT 'Extra Column Testing') +ENGINE='InnoDB'; +*** Create t7 on Master *** +CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t7 ORDER BY a; +a b c +1 b1b1 Kyle +2 b1b1 JOE +3 b1b1 QA +*** Select from slave *** +SELECT * FROM t7 ORDER BY a; +a b c d e +1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing +2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing +3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing +*** Drop t7 *** +DROP TABLE t7; +*** Create t8 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e INT)ENGINE='InnoDB'; +*** Create t8 on Master *** +CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +*** Drop t8 *** +DROP TABLE t8; +*** Create t10 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='InnoDB'; +*** Create t10 on Master *** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t10 *** +DROP TABLE t10; +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +*** Create t11 on Master *** +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t11 *** +DROP TABLE t11; +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB'; +*** Create t12 on Master *** +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t12 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave *** +SELECT * FROM t12 ORDER BY a; +a b f c e +1 b1b1b1b1b1b1b1b1 Kyle test 1 +2 b1b1b1b1b1b1b1b1 JOE test 1 +3 b1b1b1b1b1b1b1b1 QA test 1 +*** Drop t12 *** +DROP TABLE t12; +**** Extra Colums End **** +*** BUG 22177 Start *** +*** Create t13 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), +d INT DEFAULT '1', +e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t13 on Master *** +CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t13 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t13 ORDER BY a; +a b c d e +1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Drop t13 *** +DROP TABLE t13; +*** 22117 END *** +*** Alter Master Table Testing Start *** +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t14 ORDER BY c1; +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 +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c4; +*** Select from Master *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 +1 Replication Testing Extra Col Kyle +2 This Test Should work JOE +3 If is does not, I will open a bug QA +*** Select from Slave *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 c6 c7 +1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP +2 This Test Should work JOE 1 CURRENT_TIMESTAMP +3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP +*** Drop t14 *** +DROP TABLE t14; +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +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 t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t15 ORDER BY c1; +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 +*** Add column on master that is a Extra on Slave *** +ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; +******************************************** +*** Expect slave to fail with Error 1060 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1060 +Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Try to insert in master **** +INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL +5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 +*** Try to select from slave **** +SELECT * FROM t15 ORDER BY c1; +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 +*** DROP TABLE t15 *** +DROP TABLE t15; +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='InnoDB'; +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +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 t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t16 ORDER BY c1; +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 +*** Add Partition on master *** +ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; +INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ +*** Show table on Slave **** +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + `c6` int(11) DEFAULT '1', + `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ +*** DROP TABLE t16 *** +DROP TABLE t16; +*** Alter Master End *** +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='InnoDB'; +*** Create t17 on Master *** +CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +** DROP table t17 *** +DROP TABLE t17; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result new file mode 100644 index 00000000000..95f99ba1014 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result @@ -0,0 +1,749 @@ +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; +**** Diff Table Def Start **** +*** On Slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(4) DEFAULT 'TEST') +ENGINE='MyISAM'; +*** Create t1 on Master *** +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); +SELECT * FROM t1 ORDER BY a; +a b c +1 2 TEXAS +2 1 AUSTIN +3 4 QA +*** Select from slave *** +SELECT * FROM t1 ORDER BY a; +a b c d e +1 2 TEXAS 2 TEST +2 1 AUSTIN 2 TEST +3 4 QA 2 TEST +*** Drop t1 *** +DROP TABLE t1; +*** Create t3 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t3 on Master *** +CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t3 *** +DROP TABLE t3; +*** Create t4 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t4 on Master *** +CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), +(30000.22,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t4 *** +DROP TABLE t4; +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT, e DOUBLE, +f DECIMAL(8,2))ENGINE='MyISAM'; +*** Create t5 on Master *** +CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT, e BLOB, +f FLOAT) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), +(2,'JOE',300.01,0,'b2b2',1.0000009); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t5 *** +DROP TABLE t5; +*** Create t6 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT)ENGINE='MyISAM'; +*** Create t6 on Master *** +CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), +(2,'JOE',300.01,0); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; +*** Drop t6 *** +DROP TABLE t6; +DROP TABLE t6; +START SLAVE; +**** Diff Table Def End **** +**** Extra Colums Start **** +*** Create t7 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e CHAR(20) DEFAULT 'Extra Column Testing') +ENGINE='MyISAM'; +*** Create t7 on Master *** +CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t7 ORDER BY a; +a b c +1 b1b1 Kyle +2 b1b1 JOE +3 b1b1 QA +*** Select from slave *** +SELECT * FROM t7 ORDER BY a; +a b c d e +1 b1b1 Kyle 0000-00-00 00:00:00 Extra Column Testing +2 b1b1 JOE 0000-00-00 00:00:00 Extra Column Testing +3 b1b1 QA 0000-00-00 00:00:00 Extra Column Testing +*** Drop t7 *** +DROP TABLE t7; +*** Create t8 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e INT)ENGINE='MyISAM'; +*** Create t8 on Master *** +CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +*** Drop t8 *** +DROP TABLE t8; +*** Create t10 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='MyISAM'; +*** Create t10 on Master *** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t10 *** +DROP TABLE t10; +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +*** Create t11 on Master *** +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t11 *** +DROP TABLE t11; +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM'; +*** Create t12 on Master *** +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t12 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave *** +SELECT * FROM t12 ORDER BY a; +a b f c e +1 b1b1b1b1b1b1b1b1 Kyle test 1 +2 b1b1b1b1b1b1b1b1 JOE test 1 +3 b1b1b1b1b1b1b1b1 QA test 1 +*** Drop t12 *** +DROP TABLE t12; +**** Extra Colums End **** +*** BUG 22177 Start *** +*** Create t13 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), +d INT DEFAULT '1', +e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t13 on Master *** +CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t13 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t13 ORDER BY a; +a b c d e +1 b1b1b1b1b1b1b1b1 Kyle 1 CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE 1 CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA 1 CURRENT_TIMESTAMP +*** Drop t13 *** +DROP TABLE t13; +*** 22117 END *** +*** Alter Master Table Testing Start *** +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t14 ORDER BY c1; +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 +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c4; +*** Select from Master *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 +1 Replication Testing Extra Col Kyle +2 This Test Should work JOE +3 If is does not, I will open a bug QA +*** Select from Slave *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 c6 c7 +1 Replication Testing Extra Col Kyle 1 CURRENT_TIMESTAMP +2 This Test Should work JOE 1 CURRENT_TIMESTAMP +3 If is does not, I will open a bug QA 1 CURRENT_TIMESTAMP +*** Drop t14 *** +DROP TABLE t14; +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +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 t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t15 ORDER BY c1; +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 +*** Add column on master that is a Extra on Slave *** +ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; +******************************************** +*** Expect slave to fail with Error 1060 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1060 +Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Try to insert in master **** +INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL +5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 +*** Try to select from slave **** +SELECT * FROM t15 ORDER BY c1; +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 +*** DROP TABLE t15 *** +DROP TABLE t15; +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='MyISAM'; +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +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 t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t16 ORDER BY c1; +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 +*** Add Partition on master *** +ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; +INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ +*** Show table on Slave **** +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + `c6` int(11) DEFAULT '1', + `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`c1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ +*** DROP TABLE t16 *** +DROP TABLE t16; +*** Alter Master End *** +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='MyISAM'; +*** Create t17 on Master *** +CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +** DROP table t17 *** +DROP TABLE t17; diff --git a/mysql-test/suite/rpl/r/rpl_failed_optimize.result b/mysql-test/suite/rpl/r/rpl_failed_optimize.result new file mode 100644 index 00000000000..7e397550331 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_failed_optimize.result @@ -0,0 +1,24 @@ +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; +CREATE TABLE t1 ( a int ) ENGINE=InnoDB; +BEGIN; +INSERT INTO t1 VALUES (1); +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize error Lock wait timeout exceeded; try restarting transaction +test.t1 optimize status Operation failed +Warnings: +Error 1205 Lock wait timeout exceeded; try restarting transaction +OPTIMIZE TABLE non_existing; +Table Op Msg_type Msg_text +test.non_existing optimize Error Table 'test.non_existing' doesn't exist +test.non_existing optimize error Corrupt +select * from t1; +a +1 +commit; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result new file mode 100644 index 00000000000..1e90796b2ea --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result @@ -0,0 +1,54 @@ +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; +stop slave; +change master to master_host='127.0.0.1',master_user='root', +master_password='',master_port=MASTER_PORT; +start slave; +stop slave; +change master to master_host='127.0.0.1',master_user='root', +master_password='',master_port=SLAVE_PORT; +start slave; + +let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%' ; + +--source include/wait_slave_status.inc +flush logs; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port SLAVE_PORT +Connect_Retry 60 +Master_Log_File slave-bin.000001 +Read_Master_Log_Pos 216 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File slave-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 216 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No diff --git a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result new file mode 100644 index 00000000000..2239c32eea3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result @@ -0,0 +1,42 @@ +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; +CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=INNODB; +CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=INNODB; +SET FOREIGN_KEY_CHECKS=0; +INSERT INTO t1 VALUES (10); +INSERT INTO t1 VALUES (NULL),(NULL),(NULL); +INSERT INTO t2 VALUES (5,0); +INSERT INTO t2 VALUES (NULL,LAST_INSERT_ID()); +SET FOREIGN_KEY_CHECKS=1; +SELECT * FROM t1 ORDER BY a; +a +10 +11 +12 +13 +SELECT * FROM t2 ORDER BY b; +b c +5 0 +6 11 +SELECT * FROM t1 ORDER BY a; +a +10 +11 +12 +13 +SELECT * FROM t2 ORDER BY b; +b c +5 0 +6 11 +SET TIMESTAMP=1000000000; +CREATE TABLE t3 ( a INT UNIQUE ); +SET FOREIGN_KEY_CHECKS=0; +INSERT INTO t3 VALUES (1),(1); +Got one of the listed errors +SET FOREIGN_KEY_CHECKS=0; +DROP TABLE IF EXISTS t1,t2,t3; +SET FOREIGN_KEY_CHECKS=1; diff --git a/mysql-test/suite/rpl/r/rpl_free_items.result b/mysql-test/suite/rpl/r/rpl_free_items.result new file mode 100644 index 00000000000..91c1e2aa6e5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_free_items.result @@ -0,0 +1,10 @@ +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; +create table t1 (a int); +create table t2 (a int); +drop table t1; +drop table t2; diff --git a/mysql-test/suite/rpl/r/rpl_get_lock.result b/mysql-test/suite/rpl/r/rpl_get_lock.result new file mode 100644 index 00000000000..235640acad0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_get_lock.result @@ -0,0 +1,35 @@ +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; +create table t1(n int); +insert into t1 values(get_lock("lock",2)); +select get_lock("lock",2); +get_lock("lock",2) +1 +select release_lock("lock"); +release_lock("lock") +1 +select get_lock("lock",3); +get_lock("lock",3) +1 +select * from t1; +n +1 +select is_free_lock("lock"), is_used_lock("lock") = connection_id(); +is_free_lock("lock") is_used_lock("lock") = connection_id() +0 1 +explain extended select is_free_lock("lock"), is_used_lock("lock"); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select is_free_lock(_latin1'lock') AS `is_free_lock("lock")`,is_used_lock(_latin1'lock') AS `is_used_lock("lock")` +select is_free_lock("lock2"); +is_free_lock("lock2") +1 +select is_free_lock(NULL); +is_free_lock(NULL) +NULL +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_grant.result b/mysql-test/suite/rpl/r/rpl_ignore_grant.result new file mode 100644 index 00000000000..5169cc8e888 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ignore_grant.result @@ -0,0 +1,37 @@ +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; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; +grant select on *.* to rpl_ignore_grant@localhost; +grant drop on test.* to rpl_ignore_grant@localhost; +show grants for rpl_ignore_grant@localhost; +Grants for rpl_ignore_grant@localhost +GRANT SELECT ON *.* TO 'rpl_ignore_grant'@'localhost' +GRANT DROP ON `test`.* TO 'rpl_ignore_grant'@'localhost' +show grants for rpl_ignore_grant@localhost; +ERROR 42000: There is no such grant defined for user 'rpl_ignore_grant' on host 'localhost' +select count(*) from mysql.user where user=_binary'rpl_ignore_grant'; +count(*) +0 +select count(*) from mysql.db where user=_binary'rpl_ignore_grant'; +count(*) +0 +grant select on *.* to rpl_ignore_grant@localhost; +set password for rpl_ignore_grant@localhost=password("does it work?"); +select password<>_binary'' from mysql.user where user=_binary'rpl_ignore_grant'; +password<>_binary'' +0 +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_revoke.result b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result new file mode 100644 index 00000000000..b1ccd2f0442 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ignore_revoke.result @@ -0,0 +1,30 @@ +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; +grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; +revoke select on *.* from 'user_foo'@'%'; +select select_priv from mysql.user where user='user_foo' /* master:must be N */; +select_priv +N +grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; +revoke select on *.* from 'user_foo'@'%'; +select select_priv from mysql.user where user='user_foo' /* slave:must be N */; +select_priv +N +grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; +select select_priv from mysql.user where user='user_foo' /* slave:must be Y */; +select_priv +Y +revoke select on *.* from 'user_foo'; +select select_priv from mysql.user where user='user_foo' /* master:must be N */; +select_priv +N +select select_priv from mysql.user where user='user_foo' /* slave:must get Y */; +select_priv +Y +revoke select on *.* FROM 'user_foo'; +delete from mysql.user where user="user_foo"; +delete from mysql.user where user="user_foo"; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result new file mode 100644 index 00000000000..e7200b31212 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -0,0 +1,140 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +**** Test case for BUG#16487 **** +**** Master **** +CREATE TABLE test.t4 (a int); +CREATE TABLE test.t1 (a int); +UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5; +**** Slave **** +SELECT * FROM t4; +a +DROP TABLE t1; +DROP TABLE t4; +**** Test case for BUG#25482 **** +**** Adding GRANTS on master **** +create table test.t1(a int); +create table test.t4(a int); +GRANT SELECT ON test.t1 TO mysqltest1@localhost; +GRANT INSERT ON test.t4 TO mysqltest2@localhost; +GRANT select, update, insert, references on t1 +to mysqltest2@localhost; +GRANT SELECT ON test.* TO mysqltest3@localhost; +GRANT INSERT ON test.t4 TO mysqltest3@localhost; +GRANT select(a), update(a), insert(a), references(a) on t4 +to mysqltest3@localhost; +create database mysqltest2; +create table mysqltest2.t2 (id int); +GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; +insert into mysql.user (user, host) values ("mysqltest5", "somehost"); +Warnings: +Warning 1364 Field 'ssl_cipher' doesn't have a default value +Warning 1364 Field 'x509_issuer' doesn't have a default value +Warning 1364 Field 'x509_subject' doesn't have a default value +GRANT SELECT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON test.* TO mysqltest6@localhost; +GRANT INSERT ON test.t1 TO mysqltest6@localhost; +show grants for mysqltest1@localhost; +Grants for mysqltest1@localhost +GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' +GRANT SELECT ON `test`.`t1` TO 'mysqltest1'@'localhost' +show grants for mysqltest2@localhost; +Grants for mysqltest2@localhost +GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' +GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO 'mysqltest2'@'localhost' +GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +show grants for mysqltest6@localhost; +Grants for mysqltest6@localhost +GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.`t1` TO 'mysqltest6'@'localhost' +flush privileges; +show grants for mysqltest5@somehost; +Grants for mysqltest5@somehost +GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +**** Checking grants on slave **** +show grants for mysqltest2@localhost; +Grants for mysqltest2@localhost +GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' +GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +show grants for mysqltest5@somehost; +Grants for mysqltest5@somehost +GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +show grants for mysqltest6@localhost; +Grants for mysqltest6@localhost +GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' +show grants for mysqltest1@localhost; +ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' +**** Revoking grants on master **** +REVOKE SELECT ON test.t1 FROM mysqltest1@localhost; +REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost; +REVOKE select(a) on t4 +from mysqltest3@localhost; +show grants for mysqltest1@localhost; +Grants for mysqltest1@localhost +GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +**** Checking grants on slave **** +show grants for mysqltest1@localhost; +ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +drop table t1, t4, mysqltest2.t2; +drop database mysqltest2; +delete from mysql.user where user like "mysqltest%"; +delete from mysql.db where user like "mysqltest%"; +delete from mysql.columns_priv where user like "mysqltest%"; +delete from mysql.tables_priv where user like "mysqltest%"; +delete from mysql.tables_priv where user like "mysqltest%"; +DROP TABLE IF EXISTS t5; +CREATE TABLE t5 ( +word varchar(50) collate utf8_unicode_ci NOT NULL default '' +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +SET @@session.character_set_client=33,@@session.collation_connection=192; +CREATE TEMPORARY TABLE tmptbl504451f4258$1 (id INT NOT NULL) ENGINE=MEMORY; +INSERT INTO t5 (word) VALUES ('TEST’'); +SELECT HEX(word) FROM t5; +HEX(word) +54455354E28099 +SELECT HEX(word) FROM t5; +HEX(word) +54455354E28099 +SELECT * FROM tmptbl504451f4258$1; +ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist +DROP TABLE t5; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table_update.result b/mysql-test/suite/rpl/r/rpl_ignore_table_update.result new file mode 100644 index 00000000000..a88a3c690ed --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ignore_table_update.result @@ -0,0 +1,23 @@ +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; +use test; +drop table if exists mysqltest_foo; +drop table if exists mysqltest_bar; +create table mysqltest_foo (n int); +insert into mysqltest_foo values(4); +use test; +create table mysqltest_foo (n int); +insert into mysqltest_foo values(5); +create table mysqltest_bar (m int); +insert into mysqltest_bar values(15); +create table t1 (k int); +insert into t1 values(55); +select mysqltest_foo.n,mysqltest_bar.m,t1.k from mysqltest_foo,mysqltest_bar,t1; +n m k +4 15 55 +drop table mysqltest_foo,mysqltest_bar,t1; +drop table mysqltest_foo,mysqltest_bar,t1; diff --git a/mysql-test/suite/rpl/r/rpl_incident.result b/mysql-test/suite/rpl/r/rpl_incident.result new file mode 100644 index 00000000000..1a0da45f3e1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_incident.result @@ -0,0 +1,106 @@ +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; +**** On Master **** +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT * FROM t1; +a +1 +2 +3 +REPLACE INTO t1 VALUES (4); +SELECT * FROM t1; +a +1 +2 +3 +4 +**** On Slave **** +SELECT * FROM t1; +a +1 +2 +3 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1586 +Last_Error The incident LOST_EVENTS occured on the master. Message: +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; +SELECT * FROM t1; +a +1 +2 +3 +4 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000002 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_init_slave.result b/mysql-test/suite/rpl/r/rpl_init_slave.result new file mode 100644 index 00000000000..740c918976c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_init_slave.result @@ -0,0 +1,27 @@ +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; +show variables like 'init_slave'; +Variable_name Value +init_slave set global max_connections=500 +show variables like 'max_connections'; +Variable_name Value +max_connections 500 +reset master; +show variables like 'init_slave'; +Variable_name Value +init_slave +show variables like 'max_connections'; +Variable_name Value +max_connections 151 +set @my_global_init_connect= @@global.init_connect; +set global init_connect="set @c=1"; +show variables like 'init_connect'; +Variable_name Value +init_connect set @c=1 +stop slave; +set global init_connect= @my_global_init_connect; +set global max_connections= default; diff --git a/mysql-test/suite/rpl/r/rpl_innodb.result b/mysql-test/suite/rpl/r/rpl_innodb.result new file mode 100644 index 00000000000..765de8af458 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_innodb.result @@ -0,0 +1,37 @@ +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; +CREATE TABLE t4 ( +id INT(5) unsigned NOT NULL auto_increment, +name varchar(15) NOT NULL default '', +number varchar(35) NOT NULL default 'default', +PRIMARY KEY (id), +UNIQUE KEY unique_rec (name,number) +) ENGINE=InnoDB; +LOAD DATA +INFILE '../std_data_ln/loaddata_pair.dat' +REPLACE INTO TABLE t4 +(name,number); +SELECT * FROM t4; +id name number +1 XXX 12345 +2 XXY 12345 +SELECT * FROM t4; +id name number +1 XXX 12345 +2 XXY 12345 +LOAD DATA +INFILE '../std_data_ln/loaddata_pair.dat' +REPLACE INTO TABLE t4 +(name,number); +SELECT * FROM t4; +id name number +3 XXX 12345 +4 XXY 12345 +SELECT * FROM t4; +id name number +3 XXX 12345 +4 XXY 12345 diff --git a/mysql-test/suite/rpl/r/rpl_insert.result b/mysql-test/suite/rpl/r/rpl_insert.result new file mode 100644 index 00000000000..b6a97926f73 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_insert.result @@ -0,0 +1,23 @@ +# +# Bug#20821: INSERT DELAYED fails to write some rows to binlog +# +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; +CREATE SCHEMA IF NOT EXISTS mysqlslap; +USE mysqlslap; +CREATE TABLE t1 (id INT, name VARCHAR(64)); +SELECT COUNT(*) FROM mysqlslap.t1; +COUNT(*) +5000 +SELECT COUNT(*) FROM mysqlslap.t1; +COUNT(*) +5000 +# +# Cleanup +# +USE test; +DROP SCHEMA mysqlslap; diff --git a/mysql-test/suite/rpl/r/rpl_insert_id.result b/mysql-test/suite/rpl/r/rpl_insert_id.result new file mode 100644 index 00000000000..b0c1b6cfd73 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_insert_id.result @@ -0,0 +1,538 @@ +# +# Setup +# +use test; +drop table if exists t1, t2, t3; +# +# See if queries that use both auto_increment and LAST_INSERT_ID() +# are replicated well +# +# We also check how the foreign_key_check variable is replicated +# +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; +create table t1(a int auto_increment, key(a)); +create table t2(b int auto_increment, c int, key(b)); +insert into t1 values (1),(2),(3); +insert into t1 values (null); +insert into t2 values (null,last_insert_id()); +select * from t1 ORDER BY a; +a +1 +2 +3 +4 +select * from t2 ORDER BY b; +b c +1 4 +drop table t1; +drop table t2; +create table t1(a int auto_increment, key(a)) engine=innodb; +create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=innodb; +SET FOREIGN_KEY_CHECKS=0; +insert into t1 values (10); +insert into t1 values (null),(null),(null); +insert into t2 values (5,0); +insert into t2 values (null,last_insert_id()); +SET FOREIGN_KEY_CHECKS=1; +select * from t1; +a +10 +11 +12 +13 +select * from t2; +b c +5 0 +6 11 +# +# check if INSERT SELECT in auto_increment is well replicated (bug #490) +# +drop table t2; +drop table t1; +create table t1(a int auto_increment, key(a)); +create table t2(b int auto_increment, c int, key(b)); +insert into t1 values (10); +insert into t1 values (null),(null),(null); +insert into t2 values (5,0); +insert into t2 (c) select * from t1 ORDER BY a; +select * from t2 ORDER BY b; +b c +5 0 +6 10 +7 11 +8 12 +9 13 +select * from t1 ORDER BY a; +a +10 +11 +12 +13 +select * from t2 ORDER BY b; +b c +5 0 +6 10 +7 11 +8 12 +9 13 +drop table t1; +drop table t2; +# +# Bug#8412: Error codes reported in binary log for CHARACTER SET, +# FOREIGN_KEY_CHECKS +# +SET TIMESTAMP=1000000000; +CREATE TABLE t1 ( a INT UNIQUE ); +SET FOREIGN_KEY_CHECKS=0; +INSERT INTO t1 VALUES (1),(1); +Got one of the listed errors +drop table t1; +# +# Bug#14553: NULL in WHERE resets LAST_INSERT_ID +# +create table t1(a int auto_increment, key(a)); +create table t2(a int); +insert into t1 (a) values (null); +insert into t2 (a) select a from t1 where a is null; +insert into t2 (a) select a from t1 where a is null; +select * from t2; +a +1 +select * from t2; +a +1 +drop table t1; +drop table t2; +# +# End of 4.1 tests +# +# +# BUG#15728: LAST_INSERT_ID function inside a stored function returns 0 +# +# The solution is not to reset last_insert_id on enter to sub-statement. +# +drop function if exists bug15728; +drop function if exists bug15728_insert; +drop table if exists t1, t2; +create table t1 ( +id int not null auto_increment, +last_id int, +primary key (id) +); +create function bug15728() returns int(11) +return last_insert_id(); +insert into t1 (last_id) values (0); +insert into t1 (last_id) values (last_insert_id()); +insert into t1 (last_id) values (bug15728()); +create table t2 ( +id int not null auto_increment, +last_id int, +primary key (id) +); +create function bug15728_insert() returns int(11) modifies sql data +begin +insert into t2 (last_id) values (bug15728()); +return bug15728(); +end| +create trigger t1_bi before insert on t1 for each row +begin +declare res int; +select bug15728_insert() into res; +set NEW.last_id = res; +end| +insert into t1 (last_id) values (0); +drop trigger t1_bi; +select last_insert_id(); +last_insert_id() +4 +select bug15728_insert(); +bug15728_insert() +2 +select last_insert_id(); +last_insert_id() +4 +insert into t1 (last_id) values (bug15728()); +select last_insert_id(); +last_insert_id() +5 +drop procedure if exists foo; +create procedure foo() +begin +declare res int; +insert into t2 (last_id) values (bug15728()); +insert into t1 (last_id) values (bug15728()); +end| +call foo(); +select * from t1; +id last_id +1 0 +2 1 +3 2 +4 1 +5 4 +6 3 +select * from t2; +id last_id +1 3 +2 4 +3 5 +select * from t1; +id last_id +1 0 +2 1 +3 2 +4 1 +5 4 +6 3 +select * from t2; +id last_id +1 3 +2 4 +3 5 +drop function bug15728; +drop function bug15728_insert; +drop table t1,t2; +drop procedure foo; +create table t1 (n int primary key auto_increment not null, +b int, unique(b)); +set sql_log_bin=0; +insert into t1 values(null,100); +replace into t1 values(null,50),(null,100),(null,150); +select * from t1 order by n; +n b +2 50 +3 100 +4 150 +truncate table t1; +set sql_log_bin=1; +insert into t1 values(null,100); +select * from t1 order by n; +n b +1 100 +insert into t1 values(null,200),(null,300); +delete from t1 where b <> 100; +select * from t1 order by n; +n b +1 100 +replace into t1 values(null,100),(null,350); +select * from t1 order by n; +n b +2 100 +3 350 +select * from t1 order by n; +n b +2 100 +3 350 +insert into t1 values (NULL,400),(3,500),(NULL,600) on duplicate key UPDATE n=1000; +select * from t1 order by n; +n b +2 100 +4 400 +1000 350 +1001 600 +select * from t1 order by n; +n b +2 100 +4 400 +1000 350 +1001 600 +drop table t1; +create table t1 (n int primary key auto_increment not null, +b int, unique(b)); +insert into t1 values(null,100); +select * from t1 order by n; +n b +1 100 +insert into t1 values(null,200),(null,300); +delete from t1 where b <> 100; +select * from t1 order by n; +n b +1 100 +insert into t1 values(null,100),(null,350) on duplicate key update n=2; +select * from t1 order by n; +n b +2 100 +3 350 +select * from t1 order by n; +n b +2 100 +3 350 +drop table t1; +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, +UNIQUE(b)); +INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; +SELECT * FROM t1; +a b +1 10 +2 2 +SELECT * FROM t1; +a b +1 10 +2 2 +drop table t1; +CREATE TABLE t1 ( +id bigint(20) unsigned NOT NULL auto_increment, +field_1 int(10) unsigned NOT NULL, +field_2 varchar(255) NOT NULL, +field_3 varchar(255) NOT NULL, +PRIMARY KEY (id), +UNIQUE KEY field_1 (field_1, field_2) +); +CREATE TABLE t2 ( +field_a int(10) unsigned NOT NULL, +field_b varchar(255) NOT NULL, +field_c varchar(255) NOT NULL +); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (1, 'a', '1a'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (2, 'b', '2b'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e'); +INSERT INTO t1 (field_1, field_2, field_3) +SELECT t2.field_a, t2.field_b, t2.field_c +FROM t2 +ON DUPLICATE KEY UPDATE +t1.field_3 = t2.field_c; +INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f'); +INSERT INTO t1 (field_1, field_2, field_3) +SELECT t2.field_a, t2.field_b, t2.field_c +FROM t2 +ON DUPLICATE KEY UPDATE +t1.field_3 = t2.field_c; +SELECT * FROM t1; +id field_1 field_2 field_3 +1 1 a 1a +2 2 b 2b +3 3 c 3c +4 4 d 4d +5 5 e 5e +6 6 f 6f +SELECT * FROM t1; +id field_1 field_2 field_3 +1 1 a 1a +2 2 b 2b +3 3 c 3c +4 4 d 4d +5 5 e 5e +6 6 f 6f +drop table t1, t2; +DROP PROCEDURE IF EXISTS p1; +DROP TABLE IF EXISTS t1, t2; +SELECT LAST_INSERT_ID(0); +LAST_INSERT_ID(0) +0 +CREATE TABLE t1 ( +id INT NOT NULL DEFAULT 0, +last_id INT, +PRIMARY KEY (id) +); +CREATE TABLE t2 ( +id INT NOT NULL AUTO_INCREMENT, +last_id INT, +PRIMARY KEY (id) +); +CREATE PROCEDURE p1() +BEGIN +INSERT INTO t2 (last_id) VALUES (LAST_INSERT_ID()); +INSERT INTO t1 (last_id) VALUES (LAST_INSERT_ID()); +END| +CALL p1(); +SELECT * FROM t1; +id last_id +0 1 +SELECT * FROM t2; +id last_id +1 0 +SELECT * FROM t1; +id last_id +0 1 +SELECT * FROM t2; +id last_id +1 0 +DROP PROCEDURE p1; +DROP TABLE t1, t2; +DROP PROCEDURE IF EXISTS p1; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +DROP FUNCTION IF EXISTS f3; +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 ( +i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +j INT DEFAULT 0 +); +CREATE TABLE t2 (i INT); +CREATE PROCEDURE p1() +BEGIN +INSERT INTO t1 (i) VALUES (NULL); +INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); +INSERT INTO t1 (i) VALUES (NULL), (NULL); +INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); +END | +CREATE FUNCTION f1() RETURNS INT MODIFIES SQL DATA +BEGIN +INSERT INTO t1 (i) VALUES (NULL); +INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); +INSERT INTO t1 (i) VALUES (NULL), (NULL); +INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); +RETURN 0; +END | +CREATE FUNCTION f2() RETURNS INT NOT DETERMINISTIC +RETURN LAST_INSERT_ID() | +CREATE FUNCTION f3() RETURNS INT MODIFIES SQL DATA +BEGIN +INSERT INTO t2 (i) VALUES (LAST_INSERT_ID()); +RETURN 0; +END | +INSERT INTO t1 VALUES (NULL, -1); +CALL p1(); +SELECT f1(); +f1() +0 +INSERT INTO t1 VALUES (NULL, f2()), (NULL, LAST_INSERT_ID()), +(NULL, LAST_INSERT_ID()), (NULL, f2()), (NULL, f2()); +INSERT INTO t1 VALUES (NULL, f2()); +INSERT INTO t1 VALUES (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID(5)), +(NULL, @@LAST_INSERT_ID); +INSERT INTO t1 VALUES (NULL, 0), (NULL, LAST_INSERT_ID()); +UPDATE t1 SET j= -1 WHERE i IS NULL; +INSERT INTO t1 (i) VALUES (NULL); +INSERT INTO t1 (i) VALUES (NULL); +SELECT f3(); +f3() +0 +SELECT * FROM t1; +i j +1 -1 +2 0 +3 0 +4 0 +5 0 +6 0 +7 0 +8 3 +9 3 +10 3 +11 3 +12 3 +13 8 +14 13 +15 5 +16 13 +17 -1 +18 14 +19 0 +20 0 +SELECT * FROM t2; +i +2 +3 +5 +6 +19 +SELECT * FROM t1; +i j +1 -1 +2 0 +3 0 +4 0 +5 0 +6 0 +7 0 +8 3 +9 3 +10 3 +11 3 +12 3 +13 8 +14 13 +15 5 +16 13 +17 -1 +18 14 +19 0 +20 0 +SELECT * FROM t2; +i +2 +3 +5 +6 +19 +DROP PROCEDURE p1; +DROP FUNCTION f1; +DROP FUNCTION f2; +DROP FUNCTION f3; +DROP TABLE t1, t2; +# +# End of 5.0 tests +# +create table t2 ( +id int not null auto_increment, +last_id int, +primary key (id) +); +truncate table t2; +create table t1 (id tinyint primary key); +create function insid() returns int +begin +insert into t2 (last_id) values (0); +return 0; +end| +set sql_log_bin=0; +insert into t2 (id) values(1),(2),(3); +delete from t2; +set sql_log_bin=1; +select insid(); +insid() +0 +set sql_log_bin=0; +insert into t2 (id) values(5),(6),(7); +delete from t2 where id>=5; +set sql_log_bin=1; +insert into t1 select insid(); +select * from t1; +id +0 +select * from t2; +id last_id +4 0 +8 0 +select * from t1; +id +0 +select * from t2; +id last_id +4 0 +8 0 +drop table t1; +drop function insid; +truncate table t2; +create table t1 (n int primary key auto_increment not null, +b int, unique(b)); +create procedure foo() +begin +insert into t1 values(null,10); +insert ignore into t1 values(null,10); +insert ignore into t1 values(null,10); +insert into t2 values(null,3); +end| +call foo(); +select * from t1; +n b +1 10 +select * from t2; +id last_id +1 3 +select * from t1; +n b +1 10 +select * from t2; +id last_id +1 3 +drop table t1, t2; +drop procedure foo; diff --git a/mysql-test/suite/rpl/r/rpl_insert_id_pk.result b/mysql-test/suite/rpl/r/rpl_insert_id_pk.result new file mode 100644 index 00000000000..79815355332 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_insert_id_pk.result @@ -0,0 +1,76 @@ +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; +create table t1(a int auto_increment, primary key(a)); +create table t2(b int auto_increment, c int, primary key(b)); +insert into t1 values (1),(2),(3); +insert into t1 values (null); +insert into t2 values (null,last_insert_id()); +select * from t1 ORDER BY a; +a +1 +2 +3 +4 +select * from t2 ORDER BY b; +b c +1 4 +drop table t1; +drop table t2; +create table t1(a int auto_increment, key(a)) engine=innodb; +create table t2(b int auto_increment, c int, key(b), foreign key(b) references t1(a)) engine=innodb; +SET FOREIGN_KEY_CHECKS=0; +insert into t1 values (10); +insert into t1 values (null),(null),(null); +insert into t2 values (5,0); +insert into t2 values (null,last_insert_id()); +SET FOREIGN_KEY_CHECKS=1; +select * from t1; +a +10 +11 +12 +13 +select * from t2; +b c +5 0 +6 11 +drop table t2; +drop table t1; +create table t1(a int auto_increment, primary key(a)); +create table t2(b int auto_increment, c int, primary key(b)); +insert into t1 values (10); +insert into t1 values (null),(null),(null); +insert into t2 values (5,0); +insert into t2 (c) select * from t1 ORDER BY a; +select * from t2 ORDER BY b; +b c +5 0 +6 10 +7 11 +8 12 +9 13 +select * from t1 ORDER BY a; +a +10 +11 +12 +13 +select * from t2 ORDER BY b; +b c +5 0 +6 10 +7 11 +8 12 +9 13 +drop table t1; +drop table t2; +SET TIMESTAMP=1000000000; +CREATE TABLE t1 ( a INT UNIQUE ); +SET FOREIGN_KEY_CHECKS=0; +INSERT INTO t1 VALUES (1),(1); +Got one of the listed errors +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_insert_ignore.result b/mysql-test/suite/rpl/r/rpl_insert_ignore.result new file mode 100644 index 00000000000..da24c86627c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_insert_ignore.result @@ -0,0 +1,70 @@ +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; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned, +unique (b) +) ENGINE=innodb; +CREATE TABLE t2 ( +a int unsigned, # to force INSERT SELECT to have a certain order +b int unsigned +) ENGINE=innodb; +INSERT INTO t1 VALUES (NULL, 1); +INSERT INTO t1 VALUES (NULL, 2); +INSERT INTO t1 VALUES (NULL, 3); +INSERT INTO t1 VALUES (NULL, 4); +INSERT INTO t2 VALUES (1, 1); +INSERT INTO t2 VALUES (2, 2); +INSERT INTO t2 VALUES (3, 5); +INSERT INTO t2 VALUES (4, 3); +INSERT INTO t2 VALUES (5, 4); +INSERT INTO t2 VALUES (6, 6); +INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +drop table t1; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned, +unique (b) +) ENGINE=myisam; +INSERT INTO t1 VALUES (1, 1); +INSERT INTO t1 VALUES (2, 2); +INSERT INTO t1 VALUES (3, 3); +INSERT INTO t1 VALUES (4, 4); +INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_insert_select.result b/mysql-test/suite/rpl/r/rpl_insert_select.result new file mode 100644 index 00000000000..1aff39e0026 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_insert_select.result @@ -0,0 +1,17 @@ +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; +create table t1 (n int not null primary key); +insert into t1 values (1); +create table t2 (n int); +insert into t2 values (1); +insert ignore into t1 select * from t2; +insert into t1 values (2); +select * from t1; +n +1 +2 +drop table t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result new file mode 100644 index 00000000000..318bc3d63e7 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result @@ -0,0 +1,135 @@ +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; +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, +UNIQUE(b)); +INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; +SELECT * FROM t1; +a b +1 10 +2 2 +show slave status;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1105 +Last_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10' +Skip_Counter 0 +Exec_Master_Log_Pos 246 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SELECT * FROM t1; +a b +stop slave; +reset slave; +reset master; +drop table t1; +start slave; +CREATE TABLE t1 ( +id bigint(20) unsigned NOT NULL auto_increment, +field_1 int(10) unsigned NOT NULL, +field_2 varchar(255) NOT NULL, +field_3 varchar(255) NOT NULL, +PRIMARY KEY (id), +UNIQUE KEY field_1 (field_1, field_2) +); +CREATE TABLE t2 ( +field_a int(10) unsigned NOT NULL, +field_b varchar(255) NOT NULL, +field_c varchar(255) NOT NULL +); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (1, 'a', '1a'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (2, 'b', '2b'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e'); +INSERT INTO t1 (field_1, field_2, field_3) +SELECT t2.field_a, t2.field_b, t2.field_c +FROM t2 +ON DUPLICATE KEY UPDATE +t1.field_3 = t2.field_c; +INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f'); +INSERT INTO t1 (field_1, field_2, field_3) +SELECT t2.field_a, t2.field_b, t2.field_c +FROM t2 +ON DUPLICATE KEY UPDATE +t1.field_3 = t2.field_c; +SELECT * FROM t1; +id field_1 field_2 field_3 +1 1 a 1a +2 2 b 2b +3 3 c 3c +4 4 d 4d +5 5 e 5e +6 6 f 6f +show slave status;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1105 +Last_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3) +SELECT t2.field_a, t2.field_b, t2.field_c +FROM t2 +ON DUPLICATE KEY UPDATE +t1.field_3 = t2.field_c' +Skip_Counter 0 +Exec_Master_Log_Pos 1278 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SELECT * FROM t1; +id field_1 field_2 field_3 +drop table t1, t2; +drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_load_from_master.result b/mysql-test/suite/rpl/r/rpl_load_from_master.result new file mode 100644 index 00000000000..08b45ec1db0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_load_from_master.result @@ -0,0 +1,139 @@ +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; +drop database if exists mysqltest; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +drop database if exists mysqltest; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +create database mysqltest2; +create database mysqltest; +create database mysqltest2; +create table mysqltest2.foo (n int)ENGINE=MyISAM; +insert into mysqltest2.foo values(4); +create table mysqltest2.foo (n int)ENGINE=MyISAM; +insert into mysqltest2.foo values(5); +create table mysqltest.bar (m int)ENGINE=MyISAM; +insert into mysqltest.bar values(15); +select mysqltest2.foo.n,mysqltest.bar.m from mysqltest2.foo,mysqltest.bar; +n m +4 15 +drop database mysqltest; +drop database if exists mysqltest2; +drop database mysqltest; +ERROR HY000: Can't drop database 'mysqltest'; database doesn't exist +drop database mysqltest2; +set sql_log_bin = 0; +create database mysqltest2; +create database mysqltest; +show databases; +Database +information_schema +mysql +mysqltest +mysqltest2 +test +create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; +create table mysqltest2.t2(n int, s text)ENGINE=MyISAM; +insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three'); +insert into mysqltest2.t2 values (11, 'eleven'), (12, 'twelve'), (13, 'thirteen'); +create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; +create table mysqltest.t2(n int, s text)ENGINE=MyISAM; +insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three test'); +insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'), +(13, 'thirteen test'); +set sql_log_bin = 1; +show databases; +Database +information_schema +mysql +test +create database mysqltest2; +create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; +insert into mysqltest2.t1 values (1, 'original foo.t1'); +create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM; +insert into mysqltest2.t3 values (1, 'original foo.t3'); +create database mysqltest3; +create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM; +insert into mysqltest3.t1 values (1, 'original foo2.t1'); +create database mysqltest; +create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; +insert into mysqltest.t1 values (1, 'original bar.t1'); +create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM; +insert into mysqltest.t3 values (1, 'original bar.t3'); +load data from master; +show databases; +Database +information_schema +mysql +mysqltest +mysqltest2 +mysqltest3 +test +use mysqltest2; +show tables; +Tables_in_mysqltest2 +t1 +t3 +select * from t1; +n s +1 original foo.t1 +use mysqltest3; +show tables; +Tables_in_mysqltest3 +t1 +select * from t1; +n s +1 original foo2.t1 +use mysqltest; +show tables; +Tables_in_mysqltest +t1 +t2 +t3 +select * from mysqltest.t1; +n s +1 one test +2 two test +3 three test +select * from mysqltest.t2; +n s +11 eleven test +12 twelve test +13 thirteen test +select * from mysqltest.t3; +n s +1 original bar.t3 +insert into mysqltest.t1 values (4, 'four test'); +select * from mysqltest.t1; +n s +1 one test +2 two test +3 three test +4 four test +stop slave; +reset slave; +load data from master; +start slave; +insert into mysqltest.t1 values (5, 'five bar'); +select * from mysqltest.t1; +n s +1 one test +2 two test +3 three test +4 four test +5 five bar +load table mysqltest.t1 from master; +ERROR 42S01: Table 't1' already exists +drop table mysqltest.t1; +load table mysqltest.t1 from master; +load table bar.t1 from master; +ERROR HY000: Error from master: 'Table 'bar.t1' doesn't exist' +drop database mysqltest; +drop database mysqltest2; +drop database mysqltest2; +drop database mysqltest3; diff --git a/mysql-test/suite/rpl/r/rpl_load_table_from_master.result b/mysql-test/suite/rpl/r/rpl_load_table_from_master.result new file mode 100644 index 00000000000..c24f857d829 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_load_table_from_master.result @@ -0,0 +1,51 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +"******************** Test Requirment 1 *************" +SET SQL_LOG_BIN=0,timestamp=200006; +CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM; +INSERT INTO t1 ( a) VALUE ('F'); +select unix_timestamp(t) from t1; +unix_timestamp(t) +200006 +load table t1 from master; +select unix_timestamp(t) from t1; +unix_timestamp(t) +200006 +set SQL_LOG_BIN=1,timestamp=default; +drop table t1; +set SQL_LOG_BIN=0; +"******************** Test Requirment 2 *************" +CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; +INSERT INTO t1 VALUES (1); +load table t1 from master; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +drop table t1; +set SQL_LOG_BIN=0; +create table t1 (word char(20) not null, index(word))ENGINE=MyISAM; +load data infile '../std_data_ln/words.dat' into table t1; +create table t2 (word char(20) not null)ENGINE=MyISAM; +load data infile '../std_data_ln/words.dat' into table t2; +create table t3 (word char(20) not null primary key)ENGINE=MyISAM; +load table t1 from master; +load table t2 from master; +load table t3 from master; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +select count(*) from t2; +count(*) +70 +select count(*) from t3; +count(*) +0 +set SQL_LOG_BIN=1; +drop table if exists t1,t2,t3; +create table t1(n int); +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result new file mode 100644 index 00000000000..680796a4be6 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result @@ -0,0 +1,92 @@ +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; +reset master; +select last_insert_id(); +last_insert_id() +0 +create table t1(a int not null auto_increment, b int, primary key(a) ); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +select last_insert_id(); +last_insert_id() +1 +create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60)); +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; +create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60)); +insert into t3 select * from t2; +select * from t1; +a b +1 10 +2 15 +select * from t3; +day id category name +2003-02-22 2461 b a a a @ %  ' " a +2003-03-22 2161 c asdf +2003-03-22 2416 a bbbbb +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +slave-bin.000001 1280 +drop table t1; +drop table t2; +drop table t3; +create table t1(a int, b int, unique(b)); +insert into t1 values(1,10); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +set global sql_slave_skip_counter=1; +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1797 # # master-bin.000001 Yes Yes # 0 0 1797 # None 0 No # No +set sql_log_bin=0; +delete from t1; +set sql_log_bin=1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +stop slave; +change master to master_user='test'; +change master to master_user='root'; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1832 # # master-bin.000001 No No # 0 0 1832 # None 0 No # No +set global sql_slave_skip_counter=1; +start slave; +set sql_log_bin=0; +delete from t1; +set sql_log_bin=1; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +stop slave; +reset slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No +reset master; +create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), +unique(day)) engine=MyISAM; +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields +terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by +'\n##\n' starting by '>' ignore 1 lines; +ERROR 23000: Duplicate entry '2003-03-22' for key 'day' +select * from t2; +day id category name +2003-02-22 2461 b a a a @ %  ' " a +2003-03-22 2161 c asdf +start slave; +select * from t2; +day id category name +2003-02-22 2461 b a a a @ %  ' " a +2003-03-22 2161 c asdf +alter table t2 drop key day; +delete from t2; +load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields +terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by +'\n##\n' starting by '>' ignore 1 lines; +ERROR 23000: Duplicate entry '2003-03-22' for key 'day' +drop table t2; +drop table t2; +drop table t1; +CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; +LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1; +ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY' +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_charset.result b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result new file mode 100644 index 00000000000..929d06e74cf --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata_charset.result @@ -0,0 +1,37 @@ +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; +create table t1 (a varchar(10) character set utf8); +load data infile '../std_data_ln/loaddata6.dat' into table t1; +set @@character_set_database=koi8r; +load data infile '../std_data_ln/loaddata6.dat' into table t1; +set @@character_set_database=DEFAULT; +load data infile '../std_data_ln/loaddata6.dat' into table t1; +load data infile '../std_data_ln/loaddata6.dat' into table t1; +load data infile '../std_data_ln/loaddata6.dat' into table t1; +set @@character_set_database=koi8r; +load data infile '../std_data_ln/loaddata6.dat' into table t1; +set @@character_set_database=DEFAULT; +load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8r; +select hex(a) from t1; +hex(a) +C3BF +D0AA +C3BF +C3BF +C3BF +D0AA +D0AA +select hex(a) from t1; +hex(a) +C3BF +D0AA +C3BF +C3BF +C3BF +D0AA +D0AA +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_m.result b/mysql-test/suite/rpl/r/rpl_loaddata_m.result new file mode 100644 index 00000000000..9dbae6d38c4 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata_m.result @@ -0,0 +1,38 @@ +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; +drop database if exists mysqltest; +USE test; +CREATE TABLE t1(a INT, b INT, UNIQUE(b)); +LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE test.t1; +SELECT COUNT(*) FROM test.t1; +COUNT(*) +2 +CREATE DATABASE mysqltest; +USE mysqltest; +CREATE TABLE t1(a INT, b INT, UNIQUE(b)); +LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE mysqltest.t1; +SELECT COUNT(*) FROM mysqltest.t1; +COUNT(*) +2 +SHOW DATABASES; +Database +information_schema +mysql +mysqltest +test +USE test; +SHOW TABLES; +Tables_in_test +USE mysqltest; +SHOW TABLES; +Tables_in_mysqltest +t1 +SELECT COUNT(*) FROM mysqltest.t1; +COUNT(*) +2 +DROP DATABASE mysqltest; +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_s.result b/mysql-test/suite/rpl/r/rpl_loaddata_s.result new file mode 100644 index 00000000000..4fc33eee20d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata_s.result @@ -0,0 +1,15 @@ +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; +reset master; +create table test.t1(a int, b int, unique(b)); +load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1; +select count(*) from test.t1; +count(*) +2 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +drop table test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_simple.result b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result new file mode 100644 index 00000000000..196093211b6 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata_simple.result @@ -0,0 +1,153 @@ +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; +CREATE TABLE t1 (word CHAR(20) NOT NULL); +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; +SELECT * FROM t1 ORDER BY word; +word +Aarhus +Aarhus +Aaron +Aaron +Ababa +Ababa +aback +aback +abaft +abaft +abandon +abandon +abandoned +abandoned +abandoning +abandoning +abandonment +abandonment +abandons +abandons +abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration +SELECT * FROM t1 ORDER BY word; +word +Aarhus +Aarhus +Aaron +Aaron +Ababa +Ababa +aback +aback +abaft +abaft +abandon +abandon +abandoned +abandoned +abandoning +abandoning +abandonment +abandonment +abandons +abandons +abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_loaddatalocal.result b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result new file mode 100644 index 00000000000..bb1b0610aa8 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddatalocal.result @@ -0,0 +1,31 @@ +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; +create table t1(a int); +select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; +truncate table t1; +load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; +select a,count(*) from t1 group by a; +a count(*) +1 10000 +drop table t1; +create table t1(a int); +insert into t1 values (1), (2), (2), (3); +select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; +drop table t1; +create table t1(a int primary key); +load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_loadfile.result b/mysql-test/suite/rpl/r/rpl_loadfile.result new file mode 100644 index 00000000000..7487693a9f7 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loadfile.result @@ -0,0 +1,227 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES(1,'test'); +UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=1; +create procedure test.p1() +begin +INSERT INTO test.t1 VALUES(2,'test'); +UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=2; +end| +CALL test.p1(); +SELECT * FROM test.t1 ORDER BY blob_column; +a blob_column +1 abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration + +2 abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration + +SELECT * FROM test.t1 ORDER BY blob_column; +a blob_column +1 abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration + +2 abase +abased +abasement +abasements +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +Abba +abbe +abbey +abbeys +abbot +abbots +Abbott +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +Abby +abdomen +abdomens +abdominal +abduct +abducted +abduction +abductions +abductor +abductors +abducts +Abe +abed +Abel +Abelian +Abelson +Aberdeen +Abernathy +aberrant +aberration + +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_locale.result b/mysql-test/suite/rpl/r/rpl_locale.result new file mode 100644 index 00000000000..b7396084663 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_locale.result @@ -0,0 +1,20 @@ +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; +create table t1 (s1 char(10)); +set lc_time_names= 'de_DE'; +insert into t1 values (date_format('2001-01-01','%W')); +set lc_time_names= 'en_US'; +insert into t1 values (date_format('2001-01-01','%W')); +select * from t1; +s1 +Montag +Monday +select * from t1; +s1 +Montag +Monday +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result new file mode 100644 index 00000000000..7543814578a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -0,0 +1,99 @@ +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; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 106 +stop slave; +change master to master_log_pos=75; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 75 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running No +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 75 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave; +stop slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 75 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running No +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 75 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 106 +create table if not exists t1 (n int); +drop table if exists t1; +create table t1 (n int); +insert into t1 values (1),(2),(3); +change master to master_log_pos=106; +start slave; +select * from t1 ORDER BY n; +n +1 +2 +3 +drop table t1; +End of 5.0 tests diff --git a/mysql-test/suite/rpl/r/rpl_many_optimize.result b/mysql-test/suite/rpl/r/rpl_many_optimize.result new file mode 100644 index 00000000000..b2148892591 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_many_optimize.result @@ -0,0 +1,9 @@ +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; +create table t1 (a int not null auto_increment primary key, b int, key(b)); +INSERT INTO t1 (a) VALUES (1),(2); +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_master_pos_wait.result b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result new file mode 100644 index 00000000000..951e944fddc --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_master_pos_wait.result @@ -0,0 +1,18 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +select master_pos_wait('master-bin.999999',0,2); +master_pos_wait('master-bin.999999',0,2) +-1 +explain extended select master_pos_wait('master-bin.999999',0,2); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select master_pos_wait(_latin1'master-bin.999999',0,2) AS `master_pos_wait('master-bin.999999',0,2)` +select master_pos_wait('master-bin.999999',0); +stop slave sql_thread; +master_pos_wait('master-bin.999999',0) +NULL diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result new file mode 100644 index 00000000000..526414cec9c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result @@ -0,0 +1,46 @@ +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; +create table t1(id int, i int, r1 int, r2 int, p varchar(100)); +insert into t1 values(1, connection_id(), 0, 0, ""); +insert into t1 values(2, 0, rand()*1000, rand()*1000, ""); +set sql_log_bin=0; +insert into t1 values(6, 0, rand(), rand(), ""); +delete from t1 where id=6; +set sql_log_bin=1; +insert into t1 values(3, 0, 0, 0, password('does_this_work?')); +insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?')); +select * into outfile 'rpl_misc_functions.outfile' from t1; +create table t2 like t1; +load data local infile 'MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2; +select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); +id i r1 r2 p id i r1 r2 p +drop table t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (col_a double default NULL); +CREATE PROCEDURE test_replication_sp1() +BEGIN +INSERT INTO t1 VALUES (rand()), (rand()); +INSERT INTO t1 VALUES (rand()); +END| +CREATE PROCEDURE test_replication_sp2() +BEGIN +CALL test_replication_sp1(); +CALL test_replication_sp1(); +END| +CREATE FUNCTION test_replication_sf() RETURNS DOUBLE DETERMINISTIC +BEGIN +RETURN (rand() + rand()); +END| +CALL test_replication_sp1(); +CALL test_replication_sp2(); +INSERT INTO t1 VALUES (test_replication_sf()); +INSERT INTO t1 VALUES (test_replication_sf()); +INSERT INTO t1 VALUES (test_replication_sf()); +DROP PROCEDURE IF EXISTS test_replication_sp1; +DROP PROCEDURE IF EXISTS test_replication_sp2; +DROP FUNCTION IF EXISTS test_replication_sf; +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result new file mode 100644 index 00000000000..38972a4f571 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result @@ -0,0 +1,46 @@ +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; +create table t1 (n int auto_increment primary key); +set insert_id = 2000; +insert into t1 values (NULL),(NULL),(NULL); +select * from t1; +n +2000 +2001 +2002 +show slave hosts; +Server_id Host Port Rpl_recovery_rank Master_id +2 127.0.0.1 9999 2 1 +drop table t1; +stop slave; +create table t2(id int auto_increment primary key, created datetime); +set timestamp=12345; +insert into t2 set created=now(); +select * from t2; +id created +1 1970-01-01 06:25:45 +create table t3 like t2; +create temporary table t4 like t2; +create table t5 select * from t4; +start slave; +select * from t2; +id created +1 1970-01-01 06:25:45 +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `created` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create table t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `id` int(11) NOT NULL DEFAULT '0', + `created` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t2,t3,t5; diff --git a/mysql-test/suite/rpl/r/rpl_multi_delete.result b/mysql-test/suite/rpl/r/rpl_multi_delete.result new file mode 100644 index 00000000000..4831502eb88 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_delete.result @@ -0,0 +1,22 @@ +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; +create table t1 (a int primary key); +create table t2 (a int); +insert into t1 values (1); +insert into t2 values (1); +delete t1.* from t1, t2 where t1.a = t2.a; +select * from t1; +a +select * from t2; +a +1 +select * from t1; +a +select * from t2; +a +1 +drop table t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_multi_delete2.result b/mysql-test/suite/rpl/r/rpl_multi_delete2.result new file mode 100644 index 00000000000..87abe60b268 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_delete2.result @@ -0,0 +1,44 @@ +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 sql_log_bin=0; +create database mysqltest_from; +set sql_log_bin=1; +create database mysqltest_to; +use mysqltest_from; +drop table if exists a; +CREATE TABLE a (i INT); +INSERT INTO a VALUES(1); +DELETE alias FROM a alias WHERE alias.i=1; +SELECT * FROM a; +i +insert into a values(2),(3); +delete a alias FROM a alias where alias.i=2; +select * from a; +i +3 +use mysqltest_to; +select * from a; +i +3 +create table t1 (a int primary key); +create table t2 (a int); +insert into t1 values (1); +insert into t2 values (1); +delete t1.* from t1, t2 where t1.a = t2.a; +select * from t1; +a +select * from t2; +a +1 +select * from t1; +ERROR 42S02: Table 'mysqltest_to.t1' doesn't exist +select * from t2; +ERROR 42S02: Table 'mysqltest_to.t2' doesn't exist +set sql_log_bin=0; +drop database mysqltest_from; +set sql_log_bin=1; +drop database mysqltest_to; diff --git a/mysql-test/suite/rpl/r/rpl_multi_engine.result b/mysql-test/suite/rpl/r/rpl_multi_engine.result new file mode 100644 index 00000000000..7cb7d873415 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_engine.result @@ -0,0 +1,366 @@ +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; +create database if not exists mysqltest1; +use mysqltest1; +drop table if exists t1; +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc +VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT +0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); +use mysqltest1; +alter table t1 engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +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,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +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,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=memory; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +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,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=memory; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +alter table t1 engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +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,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +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,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=memory; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +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,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table t1 engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +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,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +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,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +alter table t1 engine=memory; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +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,"2005-11-14"); +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 00:00:00 +UPDATE t1 SET b1 = 0, t="2005-09-09" WHERE b1 = 1; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +42 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-09-09 00:00:00 +DELETE FROM mysqltest1.t1 WHERE id = 42; +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +DROP TABLE t1; +DROP DATABASE mysqltest1; diff --git a/mysql-test/suite/rpl/r/rpl_multi_update.result b/mysql-test/suite/rpl/r/rpl_multi_update.result new file mode 100644 index 00000000000..524278be042 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_update.result @@ -0,0 +1,27 @@ +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; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +CREATE TABLE t2 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (NULL, 0); +INSERT INTO t1 SELECT NULL, 0 FROM t1; +INSERT INTO t2 VALUES (NULL, 0), (NULL,1); +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +UPDATE t1, t2 SET t1.b = t2.b WHERE t1.a = t2.a; +drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_multi_update2.result b/mysql-test/suite/rpl/r/rpl_multi_update2.result new file mode 100644 index 00000000000..5bb262764fa --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_update2.result @@ -0,0 +1,55 @@ +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; +drop table if exists t1,t2; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +CREATE TABLE t2 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (NULL, 0); +INSERT INTO t1 SELECT NULL, 0 FROM t1; +INSERT INTO t2 VALUES (NULL, 0), (NULL,1); +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a; +SELECT * FROM t1 ORDER BY a; +a b +1 4 +2 5 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +SELECT * FROM t1 ORDER BY a; +a b +1 4 +2 5 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +drop table t1,t2; +reset master; +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES (0); +UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b; +select * from t1; +a +3 +select * from t1; +a +3 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_multi_update3.result b/mysql-test/suite/rpl/r/rpl_multi_update3.result new file mode 100644 index 00000000000..dba7f770ba2 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_update3.result @@ -0,0 +1,197 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; + +-------- Test for BUG#9361 -------- +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +CREATE TABLE t2 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (NULL, 0); +INSERT INTO t1 SELECT NULL, 0 FROM t1; +INSERT INTO t2 VALUES (NULL, 0), (NULL,1); +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +UPDATE t2, (SELECT a FROM t1 ORDER BY a) AS t SET t2.b = t.a+5 ; +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 6 +2 6 +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 6 +2 6 +drop table t1,t2; + +-------- Test 1 for BUG#9361 -------- +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1 ( +a1 char(30), +a2 int, +a3 int, +a4 char(30), +a5 char(30) +); +CREATE TABLE t2 ( +b1 int, +b2 char(30) +); +INSERT INTO t1 VALUES ('Yes', 1, NULL, 'foo', 'bar'); +INSERT INTO t2 VALUES (1, 'baz'); +UPDATE t1 a, t2 +SET a.a1 = 'No' +WHERE a.a2 = +(SELECT b1 +FROM t2 +WHERE b2 = 'baz') +AND a.a3 IS NULL +AND a.a4 = 'foo' +AND a.a5 = 'bar'; +SELECT * FROM t1; +a1 a2 a3 a4 a5 +No 1 NULL foo bar +SELECT * FROM t2; +b1 b2 +1 baz +DROP TABLE t1, t2; + +-------- Test 2 for BUG#9361 -------- +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +CREATE TABLE t1 ( +i INT, +j INT, +x INT, +y INT, +z INT +); +CREATE TABLE t2 ( +i INT, +k INT, +x INT, +y INT, +z INT +); +CREATE TABLE t3 ( +j INT, +k INT, +x INT, +y INT, +z INT +); +INSERT INTO t1 VALUES ( 1, 2,13,14,15); +INSERT INTO t2 VALUES ( 1, 3,23,24,25); +INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); +UPDATE t1 AS a +INNER JOIN t2 AS b +ON a.i = b.i +INNER JOIN t3 AS c +ON a.j = c.j AND b.k = c.k +SET a.x = b.x, +a.y = b.y, +a.z = ( +SELECT sum(z) +FROM t3 +WHERE y = 34 +) +WHERE b.x = 23; +SELECT * FROM t1; +i j x y z +1 2 23 24 71 +DROP TABLE t1, t2, t3; +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +DROP TABLE IF EXISTS t2; +Warnings: +Note 1051 Unknown table 't2' +CREATE TABLE t1 ( +idp int(11) NOT NULL default '0', +idpro int(11) default NULL, +price decimal(19,4) default NULL, +PRIMARY KEY (idp) +); +CREATE TABLE t2 ( +idpro int(11) NOT NULL default '0', +price decimal(19,4) default NULL, +nbprice int(11) default NULL, +PRIMARY KEY (idpro) +); +INSERT INTO t1 VALUES +(1,1,'3.0000'), +(2,2,'1.0000'), +(3,1,'1.0000'), +(4,1,'4.0000'), +(5,3,'2.0000'), +(6,2,'4.0000'); +INSERT INTO t2 VALUES +(1,'0.0000',0), +(2,'0.0000',0), +(3,'0.0000',0); +update +t2 +join +( select idpro, min(price) as min_price, count(*) as nbr_price +from t1 +where idpro>0 and price>0 +group by idpro +) as table_price +on t2.idpro = table_price.idpro +set t2.price = table_price.min_price, +t2.nbprice = table_price.nbr_price; +select "-- MASTER AFTER JOIN --" as ""; + +-- MASTER AFTER JOIN -- +select * from t1; +idp idpro price +1 1 3.0000 +2 2 1.0000 +3 1 1.0000 +4 1 4.0000 +5 3 2.0000 +6 2 4.0000 +select * from t2; +idpro price nbprice +1 1.0000 3 +2 1.0000 2 +3 2.0000 1 +select "-- SLAVE AFTER JOIN --" as ""; + +-- SLAVE AFTER JOIN -- +select * from t1; +idp idpro price +1 1 3.0000 +2 2 1.0000 +3 1 1.0000 +4 1 4.0000 +5 3 2.0000 +6 2 4.0000 +select * from t2; +idpro price nbprice +1 1.0000 3 +2 1.0000 2 +3 2.0000 1 +DROP TABLE t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_multi_update4.result b/mysql-test/suite/rpl/r/rpl_multi_update4.result new file mode 100644 index 00000000000..f6dde65a35d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_multi_update4.result @@ -0,0 +1,25 @@ +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; +drop database if exists d1; +drop database if exists d2; +drop database if exists d2; +create database d1; +create table d1.t0 (id int); +create database d2; +use d2; +create table t1 (id int); +create table t2 (id int); +insert into t1 values (1), (2), (3), (4), (5); +insert into t2 select id + 3 from t1; +update t1 join t2 using (id) set t1.id = 0; +insert into d1.t0 values (0); +use d1; +select * from t0 where id=0; +id +0 +drop database d1; +drop database d2; diff --git a/mysql-test/suite/rpl/r/rpl_optimize.result b/mysql-test/suite/rpl/r/rpl_optimize.result new file mode 100644 index 00000000000..79891169fbc --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_optimize.result @@ -0,0 +1,27 @@ +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; +create table t1 (a int not null auto_increment primary key, b int, key(b)); +INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +update t1 set b=(a/2*rand()); +delete from t1 order by b limit 10000; +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result new file mode 100644 index 00000000000..981c234d380 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_packet.result @@ -0,0 +1,32 @@ +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; +drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; +create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; +select @@net_buffer_length, @@max_allowed_packet; +@@net_buffer_length @@max_allowed_packet +1024 1024 +create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM; +INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023'); +select count(*) from `DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________`.`t1` /* must be 1 */; +count(*) +1 +SHOW STATUS LIKE 'Slave_running'; +Variable_name Value +Slave_running ON +select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; +VARIABLE_NAME VARIABLE_VALUE +SLAVE_RUNNING ON +drop database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; +SET @@global.max_allowed_packet=4096; +SET @@global.net_buffer_length=4096; +STOP SLAVE; +START SLAVE; +CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM; +INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); +SHOW STATUS LIKE 'Slave_running'; +Variable_name Value +Slave_running OFF diff --git a/mysql-test/suite/rpl/r/rpl_ps.result b/mysql-test/suite/rpl/r/rpl_ps.result new file mode 100644 index 00000000000..73c36af4862 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ps.result @@ -0,0 +1,30 @@ +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; +drop table if exists t1; +create table t1(n char(30)); +prepare stmt1 from 'insert into t1 values (?)'; +set @var1= "from-master-1"; +execute stmt1 using @var1; +set @var1= "from-master-2-'',"; +execute stmt1 using @var1; +SELECT * FROM t1 ORDER BY n; +n +from-master-1 +from-master-2-'', +set @var2= 'insert into t1 values (concat("from-var-", ?))'; +prepare stmt2 from @var2; +set @var1='from-master-3'; +execute stmt2 using @var1; +SELECT * FROM t1 ORDER BY n; +n +from-master-1 +from-master-2-'', +from-var-from-master-3 +drop table t1; +stop slave; +reset master; +reset slave; diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result new file mode 100644 index 00000000000..47adb70bcf5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result @@ -0,0 +1,67 @@ +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 BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT; +@@GLOBAL.BINLOG_FORMAT @@SESSION.BINLOG_FORMAT +MIXED MIXED +**** On Master **** +CREATE TABLE t1 (a INT, b LONG); +INSERT INTO t1 VALUES (1,1), (2,2); +INSERT INTO t1 VALUES (3,UUID()), (4,UUID()); +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) +master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +**** On Slave **** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 454 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 454 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9 +slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) +slave-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl/r/rpl_read_only.result b/mysql-test/suite/rpl/r/rpl_read_only.result new file mode 100644 index 00000000000..6b1404b4f68 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_read_only.result @@ -0,0 +1,116 @@ +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; +create user test; +create table t1(a int) engine=InnoDB; +create table t2(a int) engine=MyISAM; +insert into t1 values(1001); +insert into t2 values(2001); +set global read_only=1; +select @@read_only; +@@read_only +1 +select * from t1; +a +1001 +select * from t2; +a +2001 +select @@read_only; +@@read_only +0 +select * from t1; +a +1001 +select * from t2; +a +2001 +set global read_only=0; +BEGIN; +insert into t1 values(1002); +insert into t2 values(2002); +BEGIN; +insert into t1 values(1003); +insert into t2 values(2003); +set global read_only=1; +COMMIT; +COMMIT; +ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement +set global read_only=0; +insert into t1 values(1004); +insert into t2 values(2004); +select * from t1; +a +1001 +1002 +1004 +select * from t2; +a +2001 +2002 +2003 +2004 +select * from t1; +a +1001 +1002 +1004 +select * from t2; +a +2001 +2002 +2003 +2004 +set global read_only=1; +select @@read_only; +@@read_only +1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 values(1005); +insert into t2 values(2005); +select * from t1; +a +1001 +1002 +1004 +1005 +select * from t2; +a +2001 +2002 +2003 +2004 +2005 +select * from t1; +a +1001 +1002 +1004 +1005 +select * from t2; +a +2001 +2002 +2003 +2004 +2005 +insert into t1 values(1006); +ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement +insert into t2 values(2006); +ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement +drop user test; +drop table t1; +drop table t2; +set global read_only=0; diff --git a/mysql-test/suite/rpl/r/rpl_redirect.result b/mysql-test/suite/rpl/r/rpl_redirect.result new file mode 100644 index 00000000000..64866df1c15 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_redirect.result @@ -0,0 +1,41 @@ +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; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +SHOW SLAVE HOSTS; +Server_id Host Port Rpl_recovery_rank Master_id +2 127.0.0.1 SLAVE_PORT 2 1 +create table t1 ( n int); +insert into t1 values (1),(2),(3),(4); +insert into t1 values(5); +SELECT * FROM t1 ORDER BY n; +n +1 +2 +3 +4 +5 +SELECT * FROM t1 ORDER BY n; +n +1 +2 +3 +4 +SELECT * FROM t1 ORDER BY n; +n +1 +2 +3 +4 +SELECT * FROM t1 ORDER BY n; +n +1 +2 +3 +4 +5 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result b/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result new file mode 100644 index 00000000000..54aac2eca35 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_relay_space_innodb.result @@ -0,0 +1,25 @@ +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; +SHOW VARIABLES LIKE 'relay_log_space_limit'; +Variable_name Value +relay_log_space_limit 0 +CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=InnoDB; +INSERT INTO t1 SET name='Andy', age=31; +INSERT INTO t1 SET name='Jacob', age=2; +INSERT INTO t1 SET name='Caleb', age=1; +ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result b/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result new file mode 100644 index 00000000000..e8d2d63e46e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_relay_space_myisam.result @@ -0,0 +1,25 @@ +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; +SHOW VARIABLES LIKE 'relay_log_space_limit'; +Variable_name Value +relay_log_space_limit 0 +CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=MyISAM; +INSERT INTO t1 SET name='Andy', age=31; +INSERT INTO t1 SET name='Jacob', age=2; +INSERT INTO t1 SET name='Caleb', age=1; +ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY; +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +SELECT * FROM t1 ORDER BY id; +name age id +Andy 31 00000001 +Jacob 2 00000002 +Caleb 1 00000003 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_relayrotate.result b/mysql-test/suite/rpl/r/rpl_relayrotate.result new file mode 100644 index 00000000000..20f19973d83 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_relayrotate.result @@ -0,0 +1,16 @@ +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; +stop slave; +create table t1 (a int) engine=innodb; +reset slave; +start slave; +stop slave; +start slave; +select max(a) from t1; +max(a) +8000 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_relayspace.result b/mysql-test/suite/rpl/r/rpl_relayspace.result new file mode 100644 index 00000000000..1f2a739d3e3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_relayspace.result @@ -0,0 +1,19 @@ +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; +stop slave; +create table t1 (a int); +drop table t1; +create table t1 (a int); +drop table t1; +reset slave; +start slave io_thread; +stop slave io_thread; +reset slave; +start slave; +select master_pos_wait('master-bin.001',200,6)=-1; +master_pos_wait('master-bin.001',200,6)=-1 +0 diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result new file mode 100644 index 00000000000..fa4f7e224d1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result @@ -0,0 +1,77 @@ +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; +drop table if exists t11; +drop table if exists t11; +create table t2 (n int); +insert into t2 values(4); +create table t2 (s char(20)); +load data infile '../std_data_ln/words.dat' into table t2; +insert into t2 values('five'); +create table t1 (m int); +insert into t1 values(15),(16),(17); +update t1 set m=20 where m=16; +delete from t1 where m=17; +create table t11 select * from t1; +select * from t1 ORDER BY m; +m +15 +20 +select * from t2; +n +4 +select * from t11; +ERROR 42S02: Table 'test.t11' doesn't exist +drop table if exists t1,t2,t11; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 # # # master-bin.000001 Yes Yes test.t1 # 0 0 # # None 0 No # No +create table t1 (ts timestamp); +set one_shot time_zone='met'; +insert into t1 values('2005-08-12 00:00:00'); +set one_shot time_zone='met'; +select * from t1; +ts +2005-08-12 00:00:00 +set one_shot time_zone='met'; +select * from t1; +ts +2005-08-12 00:00:00 +drop table t1; +*** master *** +create table t1 (a int, b int); +create trigger trg1 before insert on t1 for each row set new.b=2; +create table t2 (a int, b int); +create trigger trg2 before insert on t2 for each row set new.b=2; +show tables; +Tables_in_test +t1 +t2 +show triggers; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 set new.b=2 BEFORE NULL root@localhost +trg2 INSERT t2 set new.b=2 BEFORE NULL root@localhost +*** slave *** +show tables; +Tables_in_test +t1 +show triggers; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 set new.b=2 BEFORE NULL root@localhost +*** master *** +drop trigger trg1; +drop trigger trg2; +show triggers; +Trigger Event Table Statement Timing Created sql_mode Definer +*** slave *** +show tables; +Tables_in_test +t1 +show triggers; +Trigger Event Table Statement Timing Created sql_mode Definer +*** master *** +drop table t1; +drop table t2; diff --git a/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result b/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result new file mode 100644 index 00000000000..0135804c02d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result @@ -0,0 +1,23 @@ +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; +drop database if exists mysqltest1; +drop database if exists mysqltest2; +create database mysqltest1; +create database mysqltest2; +use mysqltest1; +create table t1 (a int); +insert into t1 values(1); +select * from mysqltest1.t1; +ERROR 42S02: Table 'mysqltest1.t1' doesn't exist +use mysqltest2; +create table t1 (a int); +insert into t1 values(1); +select * from mysqltest2.t1; +a +1 +drop database mysqltest1; +drop database mysqltest2; diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result new file mode 100644 index 00000000000..1b843bffdca --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result @@ -0,0 +1,94 @@ +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; +drop database if exists mysqltest1; +create database mysqltest1; +use mysqltest1; +create table t1 (a int); +insert into t1 values(9); +select * from mysqltest1.t1; +a +9 +show databases like 'mysqltest1'; +Database (mysqltest1) +mysqltest1 +select * from test.t1; +a +9 +drop table t1; +drop database mysqltest1; +drop database if exists rewrite; +create database rewrite; +use test; +create table t1 (a date, b date, c date not null, d date); +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ','; +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'c' at row 1 +Warning 1265 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'a' at row 2 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'd' at row 2 +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; +select * from rewrite.t1; +a b c d +0000-00-00 NULL 0000-00-00 0000-00-00 +0000-00-00 0000-00-00 0000-00-00 0000-00-00 +2003-03-03 2003-03-03 2003-03-03 NULL +2003-03-03 2003-03-03 2003-03-03 NULL +truncate table t1; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +Warnings: +Warning 1265 Data truncated for column 'c' at row 1 +Warning 1265 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'd' at row 2 +select * from rewrite.t1; +a b c d +NULL NULL 0000-00-00 0000-00-00 +NULL 0000-00-00 0000-00-00 0000-00-00 +NULL 2003-03-03 2003-03-03 NULL +drop table t1; +create table t1 (a text, b text); +load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; +Warnings: +Warning 1261 Row 3 doesn't contain data for all columns +select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1; +concat('|',a,'|') concat('|',b,'|') +|Field A| |Field B| +|Field 1| |Field 2' +Field 3,'Field 4| +|Field 5' ,'Field 6| NULL +|Field 6| | 'Field 7'| +drop table t1; +create table t1 (a int, b char(10)); +load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; +Warnings: +Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3 +Warning 1262 Row 3 was truncated; it contained more data than there were input columns +Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 5 +Warning 1262 Row 5 was truncated; it contained more data than there were input columns +select * from rewrite.t1; +a b +1 row 1 +2 row 2 +0 1234567890 +3 row 3 +0 1234567890 +truncate table t1; +load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; +Warnings: +Warning 1366 Incorrect integer value: ' +' for column 'a' at row 4 +Warning 1261 Row 4 doesn't contain data for all columns +select * from rewrite.t1; +a b +1 row 1 +2 row 2 +3 row 3 +0 +drop database rewrite; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result new file mode 100644 index 00000000000..f82a1a69060 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result @@ -0,0 +1,97 @@ +drop table if exists t1, t2, t3, t4; +drop table if exists t1, t2, t3, t4; +start slave; +Got one of the listed errors +start slave; +ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; +ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log +reset slave; +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; +reset master; +start slave; +create temporary table temp_table (a char(80) not null); +insert into temp_table values ("testing temporary tables"); +create table t1 (s text); +insert into t1 values('Could not break slave'),('Tried hard'); +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 556 # # master-bin.000001 Yes Yes # 0 0 556 # None 0 No # No +select * from t1; +s +Could not break slave +Tried hard +flush logs; +create table t2(m int not null auto_increment primary key); +insert into t2 values (34),(67),(123); +flush logs; +show binary logs; +Log_name File_size +master-bin.000001 600 +master-bin.000002 371 +master-bin.000003 106 +create table t3 select * from temp_table; +select * from t3; +a +testing temporary tables +drop table temp_table, t3; +insert into t2 values(1234); +set insert_id=1234; +insert into t2 values(NULL); +set global sql_slave_skip_counter=1; +start slave; +purge master logs to 'master-bin.000002'; +show master logs; +Log_name File_size +master-bin.000002 371 +master-bin.000003 415 +purge binary logs to 'master-bin.000002'; +show binary logs; +Log_name File_size +master-bin.000002 371 +master-bin.000003 415 +select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND) +from information_schema.tables +where TABLE_SCHEMA="test" and TABLE_NAME="t2"; +purge master logs before (@time_for_purge); +show binary logs; +Log_name File_size +master-bin.000003 415 +insert into t2 values (65); +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 504 # # master-bin.000003 Yes Yes # 0 0 504 # None 0 No # No +select * from t2; +m +34 +65 +67 +123 +1234 +create temporary table temp_table (a char(80) not null); +insert into temp_table values ("testing temporary tables part 2"); +create table t3 (n int); +select count(*) from t3 where n >= 4; +count(*) +100 +create table t4 select * from temp_table; +show binary logs; +Log_name File_size +master-bin.000003 4193 +master-bin.000004 4198 +master-bin.000005 2040 +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000005 2040 +select * from t4; +a +testing temporary tables part 2 +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2040 # # master-bin.000005 Yes Yes # 0 0 2040 # None 0 No # No +lock tables t3 read; +select count(*) from t3 where n >= 4; +count(*) +100 +unlock tables; +drop table if exists t1,t2,t3,t4; diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result new file mode 100644 index 00000000000..fad60af664f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_001.result @@ -0,0 +1,55 @@ +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; +CREATE TABLE t1 (word CHAR(20) NOT NULL); +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; +LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/std_data/words.dat' INTO TABLE t1; +SELECT * FROM t1 ORDER BY word LIMIT 10; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aaron +Aaron +Aaron +Aaron +Ababa +Ababa +STOP SLAVE; +SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); +START SLAVE; +SET PASSWORD FOR root@"localhost" = PASSWORD(''); +CREATE TABLE t3(n INT); +INSERT INTO t3 VALUES(1),(2); +SELECT * FROM t3 ORDER BY n; +n +1 +2 +SELECT SUM(LENGTH(word)) FROM t1; +SUM(LENGTH(word)) +1022 +DROP TABLE t1,t3; +CREATE TABLE t1 (n INT) ENGINE=MYISAM; +RESET MASTER; +STOP SLAVE; +RESET SLAVE; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +LOCK TABLES t1 READ; +START SLAVE; +UNLOCK TABLES; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +DROP TABLE t1; +CREATE TABLE t1 (n INT); +INSERT INTO t1 VALUES(3456); +SELECT n FROM t1; +n +3456 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_4_bytes.result b/mysql-test/suite/rpl/r/rpl_row_4_bytes.result new file mode 100644 index 00000000000..e2431364ed3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_4_bytes.result @@ -0,0 +1,27 @@ +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; +drop database if exists mysqltest1; +create database mysqltest1; +use mysqltest1; +CREATE TABLE t1 (a char(3)); +CREATE TABLE t2 (a char(3)); +insert into t1 values("ANN"); +insert into t1 values("GUI"); +insert into t2 values("LIL"); +insert into t2 values("ABE"); +insert into t2 values("ANG"); +use mysqltest1; +select * from t1 order by a; +a +ANN +GUI +select * from t2 order by a; +a +ABE +ANG +LIL +DROP DATABASE mysqltest1; diff --git a/mysql-test/suite/rpl/r/rpl_row_NOW.result b/mysql-test/suite/rpl/r/rpl_row_NOW.result new file mode 100644 index 00000000000..23f95878608 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_NOW.result @@ -0,0 +1,29 @@ +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; +create database if not exists mysqltest1; +DROP TABLE IF EXISTS mysqltest1.t1; +CREATE TABLE mysqltest1.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, +a TIMESTAMP DEFAULT '2005-05-05 01:01:01', +b TIMESTAMP DEFAULT '2005-05-05 01:01:01', +PRIMARY KEY(n)); +CREATE FUNCTION mysqltest1.f1() RETURNS TIMESTAMP +BEGIN +DECLARE v1 INT DEFAULT 300; +WHILE v1 > 0 DO +SET v1 = v1 - 1; +END WHILE; +RETURN NOW(); +END| +INSERT INTO mysqltest1.t1 VALUES(NULL,NOW(),mysqltest1.f1()); +CREATE TRIGGER mysqltest1.trig1 BEFORE INSERT ON mysqltest1.t1 +FOR EACH ROW BEGIN +SET new.b = mysqltest1.f1(); +END| +INSERT INTO mysqltest1.t1 SET n = NULL, a = now(); +DROP TABLE IF EXISTS mysqltest1.t1; +DROP FUNCTION mysqltest1.f1; +DROP DATABASE mysqltest1; diff --git a/mysql-test/suite/rpl/r/rpl_row_USER.result b/mysql-test/suite/rpl/r/rpl_row_USER.result new file mode 100644 index 00000000000..98755fb4653 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_USER.result @@ -0,0 +1,38 @@ +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; +DROP DATABASE IF EXISTS mysqltest1; +CREATE DATABASE mysqltest1; +CREATE USER tester IDENTIFIED BY 'test'; +GRANT ALL ON mysqltest1.* TO 'tester'@'%' IDENTIFIED BY 'test'; +GRANT ALL ON mysqltest1.* TO ''@'localhost%'; +FLUSH PRIVILEGES; +CREATE TABLE mysqltest1.t1 (a INT, users VARCHAR(255), PRIMARY KEY(a)); +INSERT INTO mysqltest1.t1 VALUES(1,USER()); +INSERT INTO mysqltest1.t1 VALUES(2,CURRENT_USER()); +create procedure mysqltest1.p1() +begin +INSERT INTO mysqltest1.t1 VALUES(3,USER()); +INSERT INTO mysqltest1.t1 VALUES(4,CURRENT_USER()); +end| +CALL mysqltest1.p1(); +SELECT * FROM mysqltest1.t1 ORDER BY a; +a users +1 tester@localhost +2 @localhost% +3 tester@localhost +4 @localhost% +SELECT * FROM mysqltest1.t1 ORDER BY a; +a users +1 tester@localhost +2 @localhost% +3 tester@localhost +4 @localhost% +DROP DATABASE mysqltest1; +REVOKE ALL ON mysqltest1.* FROM 'tester'@'%'; +REVOKE ALL ON mysqltest1.* FROM ''@'localhost%'; +DROP USER tester@'%'; +DROP USER ''@'localhost%'; diff --git a/mysql-test/suite/rpl/r/rpl_row_UUID.result b/mysql-test/suite/rpl/r/rpl_row_UUID.result new file mode 100644 index 00000000000..f56dc145901 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_UUID.result @@ -0,0 +1,40 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=myisam; +INSERT INTO test.t1 VALUES(1,UUID(),UUID()); +create procedure test.p1() +begin +INSERT INTO test.t1 VALUES(2,UUID(),UUID()); +INSERT INTO test.t1 VALUES(3,UUID(),UUID()); +end| +CALL test.p1(); +create function test.fn1(x int) +returns int +begin +insert into t1 values (4+x,UUID(),UUID()); +insert into t1 values (5+x,UUID(),UUID()); +return 0; +end| +select fn1(0); +fn1(0) +0 +create table t2 (a int); +insert into t2 values(fn1(2)); +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL DEFAULT '0', + `blob_column` longblob, + `vchar_column` varchar(100) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP PROCEDURE test.p1; +DROP FUNCTION test.fn1; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-master.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result new file mode 100644 index 00000000000..1025b965589 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result @@ -0,0 +1,220 @@ +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; +CREATE DATABASE test_ignore; +**** On Master **** +SHOW DATABASES; +Database +information_schema +mysql +test +test_ignore +USE test; +CREATE TABLE t1 (a INT, b INT); +SHOW TABLES; +Tables_in_test +t1 +INSERT INTO t1 VALUES (1,1), (2,2); +USE test_ignore; +CREATE TABLE t2 (a INT, b INT); +SHOW TABLES; +Tables_in_test_ignore +t2 +INSERT INTO t2 VALUES (3,3), (4,4); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +**** On Slave **** +SHOW DATABASES; +Database +information_schema +mysql +test +USE test; +SHOW TABLES; +Tables_in_test +t1 +USE test_ignore; +ERROR 42000: Unknown database 'test_ignore' +DROP DATABASE test_ignore; +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; +CREATE TABLE t1 (a INT); +DELETE FROM t1; +INSERT INTO t1 VALUES (1),(2); +DELETE FROM t1 WHERE a = 0; +UPDATE t1 SET a=99 WHERE a = 0; +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a INT) +master-bin.000001 192 Table_map 1 231 table_id: # (test.t1) +master-bin.000001 231 Write_rows 1 270 table_id: # flags: STMT_END_F +DROP TABLE t1; +================ Test for BUG#17620 ================ +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; +**** On Slave **** +SET GLOBAL QUERY_CACHE_SIZE=0; +**** On Master **** +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +**** On Slave **** +SET GLOBAL QUERY_CACHE_SIZE=16*1024*1024; +**** On Master **** +INSERT INTO t1 VALUES (4),(5),(6); +**** On Slave **** +SELECT * FROM t1; +a +1 +2 +3 +4 +5 +6 +**** On Master **** +INSERT INTO t1 VALUES (7),(8),(9); +**** On Slave **** +SELECT * FROM t1; +a +1 +2 +3 +4 +5 +6 +7 +8 +9 +SET GLOBAL QUERY_CACHE_SIZE=0; +================ Test for BUG#22550 ================ +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; +CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; +INSERT INTO t1 VALUES(1,2); +SELECT HEX(a),b FROM t1; +HEX(a) b +1 2 +SELECT HEX(a),b FROM t1; +HEX(a) b +1 2 +UPDATE t1 SET a=0 WHERE b=2; +SELECT HEX(a),b FROM t1; +HEX(a) b +0 2 +SELECT HEX(a),b FROM t1; +HEX(a) b +0 2 +DROP TABLE IF EXISTS t1; +================ Test for BUG#22583 ================ +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; +**** On Master **** +CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM; +CREATE TABLE t1_innodb (k INT, a BIT(1), b BIT(9)) ENGINE=INNODB; +CREATE TABLE t2_myisam (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=MYISAM; +CREATE TABLE t2_innodb (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=INNODB; +**** On Slave **** +ALTER TABLE t1_myisam ENGINE=INNODB; +ALTER TABLE t1_innodb ENGINE=MYISAM; +ALTER TABLE t2_myisam ENGINE=INNODB; +ALTER TABLE t2_innodb ENGINE=MYISAM; +**** On Master **** +INSERT INTO t1_myisam VALUES(1, b'0', 257); +INSERT INTO t1_myisam VALUES(2, b'1', 256); +INSERT INTO t1_innodb VALUES(1, b'0', 257); +INSERT INTO t1_innodb VALUES(2, b'1', 256); +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +k HEX(a) HEX(b) +1 0 101 +2 1 100 +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +k HEX(a) HEX(b) +1 0 101 +2 1 100 +INSERT INTO t2_myisam VALUES(1, b'0', 9); +INSERT INTO t2_myisam VALUES(2, b'1', 8); +INSERT INTO t2_innodb VALUES(1, b'0', 9); +INSERT INTO t2_innodb VALUES(2, b'1', 8); +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +k HEX(a) HEX(b) +1 0 9 +2 1 8 +SELECT k, HEX(a),HEX(b) FROM t2_innodb; +k HEX(a) HEX(b) +1 0 9 +2 1 8 +**** On Slave **** +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +k HEX(a) HEX(b) +1 0 101 +2 1 100 +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +k HEX(a) HEX(b) +1 0 101 +2 1 100 +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +k HEX(a) HEX(b) +1 0 9 +2 1 8 +SELECT k, HEX(a),HEX(b) FROM t2_innodb; +k HEX(a) HEX(b) +1 0 9 +2 1 8 +**** On Master **** +UPDATE t1_myisam SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +k HEX(a) HEX(b) +1 0 101 +2 0 100 +UPDATE t1_innodb SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +k HEX(a) HEX(b) +1 0 101 +2 0 100 +UPDATE t2_myisam SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +k HEX(a) HEX(b) +1 0 9 +2 0 8 +UPDATE t2_innodb SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t2_innodb; +k HEX(a) HEX(b) +1 0 9 +2 0 8 +**** On Slave **** +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +k HEX(a) HEX(b) +1 0 101 +2 0 100 +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +k HEX(a) HEX(b) +1 0 101 +2 0 100 +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +k HEX(a) HEX(b) +1 0 9 +2 0 8 +SELECT k, HEX(a),HEX(b) FROM t2_innodb; +k HEX(a) HEX(b) +1 0 9 +2 0 8 +**** On Master **** +DROP TABLE IF EXISTS t1_myisam, t1_innodb, t2_myisam, t2_innodb; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result new file mode 100644 index 00000000000..a6877b27b95 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result @@ -0,0 +1,418 @@ +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; +CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'MYISAM' ; +SELECT * FROM t1; +C1 C2 +SELECT * FROM t1; +C1 C2 +INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); +INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A'); +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A A +A B +A C +X X +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A A +A B +A C +X X +X Y +X Z +DELETE FROM t1 WHERE C1 = C2; +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A C +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A C +X Y +X Z +UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A I +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A I +X Y +X Z +UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N'; +SELECT * FROM t1 ORDER BY c1,c2; +C1 C2 +A B +A I +X Y +X Z +SELECT * FROM t1 ORDER BY c1,c2; +C1 C2 +A B +A I +X Y +X Z +CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'MYISAM' ; +INSERT INTO t2 +VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), +(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81); +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 2 +2 A 4 +3 A 9 +4 A 15 +5 A 25 +6 A 35 +7 A 50 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +2 A 4 +3 A 9 +5 A 25 +8 A 64 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 2 +2 A 4 +3 A 9 +4 A 15 +5 A 25 +6 A 35 +7 A 50 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +2 A 4 +3 A 9 +5 A 25 +8 A 64 +9 A 81 +UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1; +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999; +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +DELETE FROM t2 WHERE c1 % 4 = 0; +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +5 A 25 +6 A 36 +7 A 49 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +5 A 25 +6 A 36 +7 A 49 +9 A 81 +UPDATE t2 SET c12='X'; +CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'MYISAM' ; +INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1); +INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2); +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A A 3 B 2 +A B 1 B 1 +A C 1 B 2 +X X 3 B 1 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A A 3 B 2 +A B 1 B 1 +A C 1 B 2 +X X 3 B 1 +X Y 2 B 1 +X Z 2 B 2 +DELETE FROM t3 WHERE C1 = C2; +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A C 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A C 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A I 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A I 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'MYISAM' ; +INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); +INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +X X 3 +A C 4 +X Z 5 +A A 6 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +X X 3 +A C 4 +X Z 5 +A A 6 +DELETE FROM t6 WHERE C1 = C2; +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A C 4 +X Z 5 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A C 4 +X Z 5 +UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A I 4 +X Z 5 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A I 4 +X Z 5 +CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'MYISAM' ; +INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); +INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); +UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1; +SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; +C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 +X Q 2 1 R 1 X Y 2 S 1 +X Q 2 1 R 1 X Z 2 S 2 +X Q 2 2 R 4 X Y 2 S 1 +X Q 2 2 R 4 X Z 2 S 2 +X Q 2 3 R 9 X Y 2 S 1 +X Q 2 3 R 9 X Z 2 S 2 +X Q 2 5 R 25 X Y 2 S 1 +X Q 2 5 R 25 X Z 2 S 2 +X Q 2 6 R 36 X Y 2 S 1 +X Q 2 6 R 36 X Z 2 S 2 +X Q 2 7 R 49 X Y 2 S 1 +X Q 2 7 R 49 X Z 2 S 2 +X Q 2 9 R 81 X Y 2 S 1 +X Q 2 9 R 81 X Z 2 S 2 +X Q 3 1 R 1 X Y 2 S 1 +X Q 3 1 R 1 X Z 2 S 2 +X Q 3 2 R 4 X Y 2 S 1 +X Q 3 2 R 4 X Z 2 S 2 +X Q 3 3 R 9 X Y 2 S 1 +X Q 3 3 R 9 X Z 2 S 2 +X Q 3 5 R 25 X Y 2 S 1 +X Q 3 5 R 25 X Z 2 S 2 +X Q 3 6 R 36 X Y 2 S 1 +X Q 3 6 R 36 X Z 2 S 2 +X Q 3 7 R 49 X Y 2 S 1 +X Q 3 7 R 49 X Z 2 S 2 +X Q 3 9 R 81 X Y 2 S 1 +X Q 3 9 R 81 X Z 2 S 2 +X Q 5 1 R 1 X Y 2 S 1 +X Q 5 1 R 1 X Z 2 S 2 +X Q 5 2 R 4 X Y 2 S 1 +X Q 5 2 R 4 X Z 2 S 2 +X Q 5 3 R 9 X Y 2 S 1 +X Q 5 3 R 9 X Z 2 S 2 +X Q 5 5 R 25 X Y 2 S 1 +X Q 5 5 R 25 X Z 2 S 2 +X Q 5 6 R 36 X Y 2 S 1 +X Q 5 6 R 36 X Z 2 S 2 +X Q 5 7 R 49 X Y 2 S 1 +X Q 5 7 R 49 X Z 2 S 2 +X Q 5 9 R 81 X Y 2 S 1 +X Q 5 9 R 81 X Z 2 S 2 +SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; +C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 +X Q 2 1 R 1 X Y 2 S 1 +X Q 2 1 R 1 X Z 2 S 2 +X Q 2 2 R 4 X Y 2 S 1 +X Q 2 2 R 4 X Z 2 S 2 +X Q 2 3 R 9 X Y 2 S 1 +X Q 2 3 R 9 X Z 2 S 2 +X Q 2 5 R 25 X Y 2 S 1 +X Q 2 5 R 25 X Z 2 S 2 +X Q 2 6 R 36 X Y 2 S 1 +X Q 2 6 R 36 X Z 2 S 2 +X Q 2 7 R 49 X Y 2 S 1 +X Q 2 7 R 49 X Z 2 S 2 +X Q 2 9 R 81 X Y 2 S 1 +X Q 2 9 R 81 X Z 2 S 2 +X Q 3 1 R 1 X Y 2 S 1 +X Q 3 1 R 1 X Z 2 S 2 +X Q 3 2 R 4 X Y 2 S 1 +X Q 3 2 R 4 X Z 2 S 2 +X Q 3 3 R 9 X Y 2 S 1 +X Q 3 3 R 9 X Z 2 S 2 +X Q 3 5 R 25 X Y 2 S 1 +X Q 3 5 R 25 X Z 2 S 2 +X Q 3 6 R 36 X Y 2 S 1 +X Q 3 6 R 36 X Z 2 S 2 +X Q 3 7 R 49 X Y 2 S 1 +X Q 3 7 R 49 X Z 2 S 2 +X Q 3 9 R 81 X Y 2 S 1 +X Q 3 9 R 81 X Z 2 S 2 +X Q 5 1 R 1 X Y 2 S 1 +X Q 5 1 R 1 X Z 2 S 2 +X Q 5 2 R 4 X Y 2 S 1 +X Q 5 2 R 4 X Z 2 S 2 +X Q 5 3 R 9 X Y 2 S 1 +X Q 5 3 R 9 X Z 2 S 2 +X Q 5 5 R 25 X Y 2 S 1 +X Q 5 5 R 25 X Z 2 S 2 +X Q 5 6 R 36 X Y 2 S 1 +X Q 5 6 R 36 X Z 2 S 2 +X Q 5 7 R 49 X Y 2 S 1 +X Q 5 7 R 49 X Z 2 S 2 +X Q 5 9 R 81 X Y 2 S 1 +X Q 5 9 R 81 X Z 2 S 2 +CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'MYISAM' ; +INSERT INTO t4 SET C1 = 1; +SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; +C1 HEX(B1) HEX(B2) +1 NULL 0 +SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; +C1 HEX(B1) HEX(B2) +1 NULL 0 +CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'MYISAM' ; +--- on slave: original values --- +INSERT INTO t7 VALUES (1,3), (2,6), (3,9); +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 3 +2 6 +3 9 +--- on master: new values inserted --- +INSERT INTO t7 VALUES (1,2), (2,4), (3,6); +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 2 +2 4 +3 6 +--- on slave: old values should be overwritten by replicated values --- +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 2 +2 4 +3 6 +--- on master --- +CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'MYISAM' ; +INSERT INTO t8 VALUES (99,99,99); +INSERT INTO t8 VALUES (99,22,33); +ERROR 23000: Duplicate entry '99' for key 'PRIMARY' +INSERT INTO t8 VALUES (11,99,33); +ERROR 23000: Duplicate entry '99' for key 'b' +INSERT INTO t8 VALUES (11,22,99); +ERROR 23000: Duplicate entry '99' for key 'c' +SELECT * FROM t8 ORDER BY a; +a b c +99 99 99 +--- on slave --- +SELECT * FROM t8 ORDER BY a; +a b c +99 99 99 +INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); +SELECT * FROM t8 ORDER BY a; +a b c +1 2 3 +2 4 6 +3 6 9 +99 99 99 +--- on master --- +INSERT INTO t8 VALUES (2,4,8); +--- on slave --- +SELECT * FROM t8 ORDER BY a; +a b c +1 2 3 +2 4 8 +3 6 9 +99 99 99 +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result new file mode 100644 index 00000000000..4c6ec627db5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result @@ -0,0 +1,418 @@ +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; +CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'INNODB' ; +SELECT * FROM t1; +C1 C2 +SELECT * FROM t1; +C1 C2 +INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); +INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A'); +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A A +A B +A C +X X +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A A +A B +A C +X X +X Y +X Z +DELETE FROM t1 WHERE C1 = C2; +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A C +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A C +X Y +X Z +UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A I +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A I +X Y +X Z +UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N'; +SELECT * FROM t1 ORDER BY c1,c2; +C1 C2 +A B +A I +X Y +X Z +SELECT * FROM t1 ORDER BY c1,c2; +C1 C2 +A B +A I +X Y +X Z +CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'INNODB' ; +INSERT INTO t2 +VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), +(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81); +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 2 +2 A 4 +3 A 9 +4 A 15 +5 A 25 +6 A 35 +7 A 50 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +2 A 4 +3 A 9 +5 A 25 +8 A 64 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 2 +2 A 4 +3 A 9 +4 A 15 +5 A 25 +6 A 35 +7 A 50 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +2 A 4 +3 A 9 +5 A 25 +8 A 64 +9 A 81 +UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1; +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999; +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +DELETE FROM t2 WHERE c1 % 4 = 0; +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +5 A 25 +6 A 36 +7 A 49 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +5 A 25 +6 A 36 +7 A 49 +9 A 81 +UPDATE t2 SET c12='X'; +CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'INNODB' ; +INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1); +INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2); +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A A 3 B 2 +A B 1 B 1 +A C 1 B 2 +X X 3 B 1 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A A 3 B 2 +A B 1 B 1 +A C 1 B 2 +X X 3 B 1 +X Y 2 B 1 +X Z 2 B 2 +DELETE FROM t3 WHERE C1 = C2; +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A C 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A C 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A I 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A I 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'INNODB' ; +INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); +INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +X X 3 +A C 4 +X Z 5 +A A 6 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +X X 3 +A C 4 +X Z 5 +A A 6 +DELETE FROM t6 WHERE C1 = C2; +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A C 4 +X Z 5 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A C 4 +X Z 5 +UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A I 4 +X Z 5 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A I 4 +X Z 5 +CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'INNODB' ; +INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); +INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); +UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1; +SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; +C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 +X Q 2 1 R 1 X Y 2 S 1 +X Q 2 1 R 1 X Z 2 S 2 +X Q 2 2 R 4 X Y 2 S 1 +X Q 2 2 R 4 X Z 2 S 2 +X Q 2 3 R 9 X Y 2 S 1 +X Q 2 3 R 9 X Z 2 S 2 +X Q 2 5 R 25 X Y 2 S 1 +X Q 2 5 R 25 X Z 2 S 2 +X Q 2 6 R 36 X Y 2 S 1 +X Q 2 6 R 36 X Z 2 S 2 +X Q 2 7 R 49 X Y 2 S 1 +X Q 2 7 R 49 X Z 2 S 2 +X Q 2 9 R 81 X Y 2 S 1 +X Q 2 9 R 81 X Z 2 S 2 +X Q 3 1 R 1 X Y 2 S 1 +X Q 3 1 R 1 X Z 2 S 2 +X Q 3 2 R 4 X Y 2 S 1 +X Q 3 2 R 4 X Z 2 S 2 +X Q 3 3 R 9 X Y 2 S 1 +X Q 3 3 R 9 X Z 2 S 2 +X Q 3 5 R 25 X Y 2 S 1 +X Q 3 5 R 25 X Z 2 S 2 +X Q 3 6 R 36 X Y 2 S 1 +X Q 3 6 R 36 X Z 2 S 2 +X Q 3 7 R 49 X Y 2 S 1 +X Q 3 7 R 49 X Z 2 S 2 +X Q 3 9 R 81 X Y 2 S 1 +X Q 3 9 R 81 X Z 2 S 2 +X Q 5 1 R 1 X Y 2 S 1 +X Q 5 1 R 1 X Z 2 S 2 +X Q 5 2 R 4 X Y 2 S 1 +X Q 5 2 R 4 X Z 2 S 2 +X Q 5 3 R 9 X Y 2 S 1 +X Q 5 3 R 9 X Z 2 S 2 +X Q 5 5 R 25 X Y 2 S 1 +X Q 5 5 R 25 X Z 2 S 2 +X Q 5 6 R 36 X Y 2 S 1 +X Q 5 6 R 36 X Z 2 S 2 +X Q 5 7 R 49 X Y 2 S 1 +X Q 5 7 R 49 X Z 2 S 2 +X Q 5 9 R 81 X Y 2 S 1 +X Q 5 9 R 81 X Z 2 S 2 +SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; +C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 +X Q 2 1 R 1 X Y 2 S 1 +X Q 2 1 R 1 X Z 2 S 2 +X Q 2 2 R 4 X Y 2 S 1 +X Q 2 2 R 4 X Z 2 S 2 +X Q 2 3 R 9 X Y 2 S 1 +X Q 2 3 R 9 X Z 2 S 2 +X Q 2 5 R 25 X Y 2 S 1 +X Q 2 5 R 25 X Z 2 S 2 +X Q 2 6 R 36 X Y 2 S 1 +X Q 2 6 R 36 X Z 2 S 2 +X Q 2 7 R 49 X Y 2 S 1 +X Q 2 7 R 49 X Z 2 S 2 +X Q 2 9 R 81 X Y 2 S 1 +X Q 2 9 R 81 X Z 2 S 2 +X Q 3 1 R 1 X Y 2 S 1 +X Q 3 1 R 1 X Z 2 S 2 +X Q 3 2 R 4 X Y 2 S 1 +X Q 3 2 R 4 X Z 2 S 2 +X Q 3 3 R 9 X Y 2 S 1 +X Q 3 3 R 9 X Z 2 S 2 +X Q 3 5 R 25 X Y 2 S 1 +X Q 3 5 R 25 X Z 2 S 2 +X Q 3 6 R 36 X Y 2 S 1 +X Q 3 6 R 36 X Z 2 S 2 +X Q 3 7 R 49 X Y 2 S 1 +X Q 3 7 R 49 X Z 2 S 2 +X Q 3 9 R 81 X Y 2 S 1 +X Q 3 9 R 81 X Z 2 S 2 +X Q 5 1 R 1 X Y 2 S 1 +X Q 5 1 R 1 X Z 2 S 2 +X Q 5 2 R 4 X Y 2 S 1 +X Q 5 2 R 4 X Z 2 S 2 +X Q 5 3 R 9 X Y 2 S 1 +X Q 5 3 R 9 X Z 2 S 2 +X Q 5 5 R 25 X Y 2 S 1 +X Q 5 5 R 25 X Z 2 S 2 +X Q 5 6 R 36 X Y 2 S 1 +X Q 5 6 R 36 X Z 2 S 2 +X Q 5 7 R 49 X Y 2 S 1 +X Q 5 7 R 49 X Z 2 S 2 +X Q 5 9 R 81 X Y 2 S 1 +X Q 5 9 R 81 X Z 2 S 2 +CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'INNODB' ; +INSERT INTO t4 SET C1 = 1; +SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; +C1 HEX(B1) HEX(B2) +1 NULL 0 +SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; +C1 HEX(B1) HEX(B2) +1 NULL 0 +CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'INNODB' ; +--- on slave: original values --- +INSERT INTO t7 VALUES (1,3), (2,6), (3,9); +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 3 +2 6 +3 9 +--- on master: new values inserted --- +INSERT INTO t7 VALUES (1,2), (2,4), (3,6); +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 2 +2 4 +3 6 +--- on slave: old values should be overwritten by replicated values --- +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 2 +2 4 +3 6 +--- on master --- +CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'INNODB' ; +INSERT INTO t8 VALUES (99,99,99); +INSERT INTO t8 VALUES (99,22,33); +ERROR 23000: Duplicate entry '99' for key 'PRIMARY' +INSERT INTO t8 VALUES (11,99,33); +ERROR 23000: Duplicate entry '99' for key 'b' +INSERT INTO t8 VALUES (11,22,99); +ERROR 23000: Duplicate entry '99' for key 'c' +SELECT * FROM t8 ORDER BY a; +a b c +99 99 99 +--- on slave --- +SELECT * FROM t8 ORDER BY a; +a b c +99 99 99 +INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); +SELECT * FROM t8 ORDER BY a; +a b c +1 2 3 +2 4 6 +3 6 9 +99 99 99 +--- on master --- +INSERT INTO t8 VALUES (2,4,8); +--- on slave --- +SELECT * FROM t8 ORDER BY a; +a b c +1 2 3 +2 4 8 +3 6 9 +99 99 99 +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result new file mode 100644 index 00000000000..dedd5d044e0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result @@ -0,0 +1,655 @@ +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; +DROP TABLE IF EXISTS t1; +SET @@BINLOG_FORMAT = ROW; +SELECT @@BINLOG_FORMAT; +@@BINLOG_FORMAT +ROW +**** Partition RANGE testing **** +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY RANGE (YEAR(t)) +(PARTITION p0 VALUES LESS THAN (1901), +PARTITION p1 VALUES LESS THAN (1946), +PARTITION p2 VALUES LESS THAN (1966), +PARTITION p3 VALUES LESS THAN (1986), +PARTITION p4 VALUES LESS THAN (2005), +PARTITION p5 VALUES LESS THAN MAXVALUE); +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +--- On slave -- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +ALTER TABLE t1 MODIFY vc TEXT; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `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 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `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 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +DROP TABLE IF EXISTS t1; +**** Partition LIST testing **** +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY LIST(id) +(PARTITION p0 VALUES IN (2, 4), +PARTITION p1 VALUES IN (42, 142), +PARTITION p2 VALUES IN (412)); +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +ALTER TABLE t1 MODIFY vc TEXT; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `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 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `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 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +DROP TABLE IF EXISTS t1; +**** Partition HASH testing **** +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY HASH( YEAR(t) ) +PARTITIONS 4; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +ALTER TABLE t1 MODIFY vc TEXT; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `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 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `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 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +DROP TABLE IF EXISTS t1; +**** Partition by KEY **** +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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)) +PARTITION BY KEY() +PARTITIONS 4; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +ALTER TABLE t1 MODIFY vc TEXT; +--- On master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- On slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result b/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result new file mode 100644 index 00000000000..055efffbd6a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_blob_innodb.result @@ -0,0 +1,156 @@ +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; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +***** Table Create Section **** + +CREATE TABLE test.t1 (c1 int not null auto_increment, +data LONGBLOB, PRIMARY KEY(c1))ENGINE=#; + +**** Data Insert Section test.t1 ***** + +INSERT INTO test.t1 VALUES (NULL, NULL); +INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024)); +INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024)); + +**** Data Insert Validation Master Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +NULL +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; +LENGTH(data) +16384 + +**** Data Insert Validation Slave Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +NULL +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; +LENGTH(data) +16384 + +**** Data Update Section test.t1 **** + +UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1; +UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; + +**** Data Update Validation Master Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +18432 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +17408 + +**** Data Update Validation Slave Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +18432 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +17408 + +**** End Test Section test.t1 **** + +**** Create Table test.t2 **** + +CREATE TABLE test.t2 ( +c1 INT NOT NULL PRIMARY KEY, +c2 TEXT, +c3 INT, +c4 LONGBLOB, +KEY(c3))ENGINE=#; + +*** Setup Values For test.t2 *** +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); + +**** Data Insert Section test.t2 ***** + +INSERT INTO test.t2 VALUES(1,@b1,111,@d1); +INSERT INTO test.t2 VALUES(2,@b2,222,@d2); + +**** Data Insert Validation Master Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 2256 b1 3000 dd1 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 20000 b2 30000 dd2 + +**** Data Insert Validation Slave Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 2256 b1 3000 dd1 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 20000 b2 30000 dd2 + +**** Data Update Section test.t2 **** + +UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1; +UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2; + +**** Data Update Validation Master Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 20000 b2 30000 dd2 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 2256 b1 3000 dd1 + +**** Data Update Validation Slave Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 20000 b2 30000 dd2 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 2256 b1 3000 dd1 + +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result b/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result new file mode 100644 index 00000000000..055efffbd6a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_blob_myisam.result @@ -0,0 +1,156 @@ +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; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +***** Table Create Section **** + +CREATE TABLE test.t1 (c1 int not null auto_increment, +data LONGBLOB, PRIMARY KEY(c1))ENGINE=#; + +**** Data Insert Section test.t1 ***** + +INSERT INTO test.t1 VALUES (NULL, NULL); +INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024)); +INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024)); + +**** Data Insert Validation Master Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +NULL +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; +LENGTH(data) +16384 + +**** Data Insert Validation Slave Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +NULL +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; +LENGTH(data) +16384 + +**** Data Update Section test.t1 **** + +UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1; +UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; + +**** Data Update Validation Master Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +18432 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +17408 + +**** Data Update Validation Slave Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +18432 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +17408 + +**** End Test Section test.t1 **** + +**** Create Table test.t2 **** + +CREATE TABLE test.t2 ( +c1 INT NOT NULL PRIMARY KEY, +c2 TEXT, +c3 INT, +c4 LONGBLOB, +KEY(c3))ENGINE=#; + +*** Setup Values For test.t2 *** +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); + +**** Data Insert Section test.t2 ***** + +INSERT INTO test.t2 VALUES(1,@b1,111,@d1); +INSERT INTO test.t2 VALUES(2,@b2,222,@d2); + +**** Data Insert Validation Master Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 2256 b1 3000 dd1 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 20000 b2 30000 dd2 + +**** Data Insert Validation Slave Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 2256 b1 3000 dd1 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 20000 b2 30000 dd2 + +**** Data Update Section test.t2 **** + +UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1; +UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2; + +**** Data Update Validation Master Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 20000 b2 30000 dd2 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 2256 b1 3000 dd1 + +**** Data Update Validation Slave Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 20000 b2 30000 dd2 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 2256 b1 3000 dd1 + +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_charset.result b/mysql-test/suite/rpl/r/rpl_row_charset.result new file mode 100644 index 00000000000..e51f3e57d1f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_charset.result @@ -0,0 +1,201 @@ +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 timestamp=1000000000; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +create database mysqltest2 character set latin2; +set @@character_set_server=latin5; +create database mysqltest3; + +--- --master-- +show create database mysqltest2; +Database Create Database +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ + +--- --slave-- +show create database mysqltest2; +Database Create Database +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ +set @@collation_server=armscii8_bin; +drop database mysqltest3; +create database mysqltest3; + +--- --master-- +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ + +--- --slave-- +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ +use mysqltest2; +create table t1 (a int auto_increment primary key, b varchar(100)); +set character_set_client=cp850, collation_connection=latin2_croatian_ci; +insert into t1 (b) values(@@character_set_server); +insert into t1 (b) values(@@collation_server); +insert into t1 (b) values(@@character_set_client); +insert into t1 (b) values(@@character_set_connection); +insert into t1 (b) values(@@collation_connection); + +--- --master-- +select * from t1 order by a; +a b +1 armscii8 +2 armscii8_bin +3 cp850 +4 latin2 +5 latin2_croatian_ci + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 armscii8 +2 armscii8_bin +3 cp850 +4 latin2 +5 latin2_croatian_ci +select "--- --muller--" as ""; + +--- --muller-- +set character_set_client=latin1, collation_connection=latin1_german1_ci; +truncate table t1; +insert into t1 (b) values(@@collation_connection); +insert into t1 (b) values(LEAST("Müller","Muffler")); +set collation_connection=latin1_german2_ci; +insert into t1 (b) values(@@collation_connection); +insert into t1 (b) values(LEAST("Müller","Muffler")); + +--- --master-- +select * from t1 order by a; +a b +1 latin1_german1_ci +2 Muffler +3 latin1_german2_ci +4 Müller + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 latin1_german1_ci +2 Muffler +3 latin1_german2_ci +4 Müller +select "--- --INSERT--" as ""; + +--- --INSERT-- +set @a= _cp850 'Müller' collate cp850_general_ci; +truncate table t1; +insert into t1 (b) values(collation(@a)); + +--- --master-- +select * from t1 order by a; +a b +1 cp850_general_ci + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 cp850_general_ci +drop database mysqltest2; +drop database mysqltest3; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest2 +master-bin.000001 # Query # # drop database if exists mysqltest3 +master-bin.000001 # Query # # create database mysqltest2 character set latin2 +master-bin.000001 # Query # # create database mysqltest3 +master-bin.000001 # Query # # drop database mysqltest3 +master-bin.000001 # Query # # create database mysqltest3 +master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # drop database mysqltest2 +master-bin.000001 # Query # # drop database mysqltest3 +select "--- --global--" as ""; + +--- --global-- +set global character_set_server=latin2; +set global character_set_server=latin1; +set global character_set_server=latin2; +set global character_set_server=latin1; +select "--- --oneshot--" as ""; + +--- --oneshot-- +set one_shot @@character_set_server=latin5; +set @@max_join_size=1000; +select @@character_set_server; +@@character_set_server +latin5 +select @@character_set_server; +@@character_set_server +latin1 +set @@character_set_server=latin5; +select @@character_set_server; +@@character_set_server +latin5 +select @@character_set_server; +@@character_set_server +latin5 +set one_shot max_join_size=10; +ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server +set character_set_client=9999999; +ERROR 42000: Unknown character set: '9999999' +set collation_server=9999998; +ERROR HY000: Unknown collation: '9999998' +select "--- --3943--" as ""; + +--- --3943-- +use test; +CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); +SET CHARACTER_SET_CLIENT=koi8r, +CHARACTER_SET_CONNECTION=cp1251, +CHARACTER_SET_RESULTS=koi8r; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); +select hex(c1), hex(c2) from t1; +hex(c1) hex(c2) +CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +select hex(c1), hex(c2) from t1; +hex(c1) hex(c2) +CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +drop table t1; +select "--- --6676--" as ""; + +--- --6676-- +create table `t1` ( +`pk` varchar(10) not null default '', +primary key (`pk`) +) engine=myisam default charset=latin1; +set @p=_latin1 'test'; +update t1 set pk='test' where pk=@p; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result new file mode 100644 index 00000000000..e76ce5b962d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -0,0 +1,403 @@ +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; +CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t2 (a INT, b INT) ENGINE=Merge; +CREATE TABLE t3 (a INT, b INT) CHARSET=utf8; +CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8; +SHOW BINLOG EVENTS FROM 216; +Log_name # +Pos 216 +Event_type Query +Server_id # +End_log_pos 309 +Info use `test`; CREATE TABLE t1 (a INT, b INT) +Log_name # +Pos 309 +Event_type Query +Server_id # +End_log_pos 415 +Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge +Log_name # +Pos 415 +Event_type Query +Server_id # +End_log_pos 521 +Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8 +Log_name # +Pos 521 +Event_type Query +Server_id # +End_log_pos 640 +Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8 +**** On Master **** +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +SHOW CREATE TABLE t3; +Table t3 +Create Table CREATE TABLE `t3` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +**** On Slave **** +SHOW CREATE TABLE t1; +Table t1 +Create Table CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table t2 +Create Table CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +SHOW CREATE TABLE t3; +Table t3 +Create Table CREATE TABLE `t3` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +CREATE TABLE t5 (b INT, c INT) SELECT * FROM t3; +CREATE TEMPORARY TABLE tt3 (a INT, b INT); +INSERT INTO tt3 VALUES (1,2), (2,4), (3,6), (4,2), (5,10), (6,12); +CREATE TABLE t6 (b INT, c INT) SELECT * FROM tt3; +**** On Master **** +SHOW CREATE TABLE t5; +Table t5 +Create Table CREATE TABLE `t5` ( + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t5 ORDER BY a,b,c; +c a b +SHOW CREATE TABLE t6; +Table t6 +Create Table CREATE TABLE `t6` ( + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t6 ORDER BY a,b,c; +c a b +NULL 1 2 +NULL 2 4 +NULL 3 6 +NULL 4 2 +NULL 5 10 +NULL 6 12 +**** On Slave **** +SHOW CREATE TABLE t5; +Table t5 +Create Table CREATE TABLE `t5` ( + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +SELECT * FROM t5 ORDER BY a,b,c; +c a b +SHOW CREATE TABLE t6; +Table t6 +Create Table CREATE TABLE `t6` ( + `c` int(11) DEFAULT NULL, + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +SELECT * FROM t6 ORDER BY a,b,c; +c a b +NULL 1 2 +NULL 2 4 +NULL 3 6 +NULL 4 2 +NULL 5 10 +NULL 6 12 +CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; +ERROR 23000: Duplicate entry '2' for key 'b' +SHOW BINLOG EVENTS FROM 1098; +Log_name Pos Event_type Server_id End_log_pos Info +CREATE TABLE t7 (a INT, b INT UNIQUE); +INSERT INTO t7 SELECT a,b FROM tt3; +ERROR 23000: Duplicate entry '2' for key 'b' +SELECT * FROM t7 ORDER BY a,b; +a b +1 2 +2 4 +3 6 +SHOW BINLOG EVENTS FROM 1098; +Log_name Pos Event_type Server_id End_log_pos Info +# 1098 Query # 1198 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) +# 1198 Table_map # 1238 table_id: # (test.t7) +# 1238 Write_rows # 1294 table_id: # flags: STMT_END_F +SELECT * FROM t7 ORDER BY a,b; +a b +1 2 +2 4 +3 6 +CREATE TEMPORARY TABLE tt4 (a INT, b INT); +INSERT INTO tt4 VALUES (4,8), (5,10), (6,12); +BEGIN; +INSERT INTO t7 SELECT a,b FROM tt4; +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +SHOW BINLOG EVENTS FROM 1294; +Log_name Pos Event_type Server_id End_log_pos Info +# 1294 Table_map # 1334 table_id: # (test.t7) +# 1334 Write_rows # 1390 table_id: # flags: STMT_END_F +SELECT * FROM t7 ORDER BY a,b; +a b +1 2 +2 4 +3 6 +4 8 +5 10 +6 12 +SELECT * FROM t7 ORDER BY a,b; +a b +1 2 +2 4 +3 6 +4 8 +5 10 +6 12 +CREATE TABLE t8 LIKE t4; +CREATE TABLE t9 LIKE tt4; +CREATE TEMPORARY TABLE tt5 LIKE t4; +CREATE TEMPORARY TABLE tt6 LIKE tt4; +CREATE TEMPORARY TABLE tt7 SELECT 1; +**** On Master **** +SHOW CREATE TABLE t8; +Table t8 +Create Table CREATE TABLE `t8` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() +SHOW CREATE TABLE t9; +Table t9 +Create Table CREATE TABLE `t9` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW BINLOG EVENTS FROM 1390; +Log_name Pos Event_type Server_id End_log_pos Info +# 1390 Query # 1476 use `test`; CREATE TABLE t8 LIKE t4 +# 1476 Query # 1615 use `test`; CREATE TABLE `t9` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) +**** On Slave **** +SHOW CREATE TABLE t8; +Table t8 +Create Table CREATE TABLE `t8` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() +SHOW CREATE TABLE t9; +Table t9 +Create Table CREATE TABLE `t9` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; +STOP SLAVE; +SET GLOBAL storage_engine=@storage_engine; +START SLAVE; +================ BUG#22864 ================ +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +SET AUTOCOMMIT=0; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +CREATE TABLE t2 ENGINE=INNODB SELECT * FROM t1; +ROLLBACK; +CREATE TABLE t3 ENGINE=INNODB SELECT * FROM t1; +INSERT INTO t3 VALUES (4),(5),(6); +ROLLBACK; +CREATE TABLE t4 ENGINE=INNODB SELECT * FROM t1; +INSERT INTO t1 VALUES (4),(5),(6); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +SHOW TABLES; +Tables_in_test +t1 +t2 +t3 +t4 +SELECT TABLE_NAME,ENGINE +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_NAME LIKE 't_' +ORDER BY TABLE_NAME; +TABLE_NAME ENGINE +t1 MyISAM +t2 InnoDB +t3 InnoDB +t4 InnoDB +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +6 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t3 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t4 ORDER BY a; +a +1 +2 +3 +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +# 4 Format_desc # 106 Server ver: #, Binlog ver: # +# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) +# 192 Table_map # 231 table_id: # (test.t1) +# 231 Write_rows # 275 table_id: # flags: STMT_END_F +# 275 Query # 343 use `test`; BEGIN +# 343 Query # 125 use `test`; CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB +# 468 Table_map # 164 table_id: # (test.t2) +# 507 Write_rows # 208 table_id: # flags: STMT_END_F +# 551 Xid # 578 COMMIT /* XID */ +# 578 Query # 646 use `test`; BEGIN +# 646 Query # 125 use `test`; CREATE TABLE `t3` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB +# 771 Table_map # 164 table_id: # (test.t3) +# 810 Write_rows # 208 table_id: # flags: STMT_END_F +# 854 Xid # 881 COMMIT /* XID */ +# 881 Query # 949 use `test`; BEGIN +# 949 Query # 125 use `test`; CREATE TABLE `t4` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB +# 1074 Table_map # 164 table_id: # (test.t4) +# 1113 Write_rows # 208 table_id: # flags: STMT_END_F +# 1157 Xid # 1184 COMMIT /* XID */ +# 1184 Table_map # 1223 table_id: # (test.t1) +# 1223 Write_rows # 1267 table_id: # flags: STMT_END_F +SHOW TABLES; +Tables_in_test +t1 +t2 +t3 +t4 +SELECT TABLE_NAME,ENGINE +FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_NAME LIKE 't_' +ORDER BY TABLE_NAME; +TABLE_NAME ENGINE +t1 MyISAM +t2 InnoDB +t3 InnoDB +t4 InnoDB +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +6 +SELECT * FROM t2 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t3 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t4 ORDER BY a; +a +1 +2 +3 +DROP TABLE IF EXISTS t1,t2,t3,t4; +SET AUTOCOMMIT=1; +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +CREATE TABLE t2 (a INT) ENGINE=INNODB; +BEGIN; +INSERT INTO t2 SELECT a*a FROM t1; +CREATE TEMPORARY TABLE tt1 +SELECT a+1 AS a +FROM t1 +WHERE a MOD 2 = 1; +INSERT INTO t2 SELECT a+2 FROM tt1; +COMMIT; +SELECT * FROM t2 ORDER BY a; +a +1 +4 +4 +6 +9 +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +# 4 Format_desc # 106 Server ver: #, Binlog ver: # +# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) +# 192 Table_map # 231 table_id: # (test.t1) +# 231 Write_rows # 275 table_id: # flags: STMT_END_F +# 275 Query # 375 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB +# 375 Query # 443 use `test`; BEGIN +# 443 Table_map # 39 table_id: # (test.t2) +# 482 Write_rows # 83 table_id: # flags: STMT_END_F +# 526 Table_map # 122 table_id: # (test.t2) +# 565 Write_rows # 161 table_id: # flags: STMT_END_F +# 604 Xid # 631 COMMIT /* XID */ +SELECT * FROM t2 ORDER BY a; +a +1 +4 +4 +6 +9 +TRUNCATE TABLE t2; +BEGIN; +INSERT INTO t2 SELECT a*a FROM t1; +CREATE TEMPORARY TABLE tt2 +SELECT a+1 AS a +FROM t1 +WHERE a MOD 2 = 1; +INSERT INTO t2 SELECT a+2 FROM tt2; +ROLLBACK; +SELECT * FROM t2 ORDER BY a; +a +SHOW BINLOG EVENTS FROM 631; +Log_name Pos Event_type Server_id End_log_pos Info +# 631 Query # 80 use `test`; TRUNCATE TABLE t2 +# 711 Xid # 738 COMMIT /* XID */ +SELECT * FROM t2 ORDER BY a; +a +DROP TABLE t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result new file mode 100644 index 00000000000..800a39bd567 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result @@ -0,0 +1,32 @@ +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; +create table t1(a int not null primary key) engine=myisam; +insert delayed into t1 values (1); +insert delayed into t1 values (2); +insert delayed into t1 values (3); +flush tables; +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1(a int not null primary key) engine=myisam +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; flush tables +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_drop.result b/mysql-test/suite/rpl/r/rpl_row_drop.result new file mode 100644 index 00000000000..89654ebf165 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_drop.result @@ -0,0 +1,56 @@ +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; +**** On Master **** +CREATE TABLE t1 (a int); +CREATE TABLE t2 (a int); +CREATE TEMPORARY TABLE t2 (a int, b int); +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Slave **** +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Master **** +DROP TABLE t2; +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Slave **** +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Master **** +CREATE TEMPORARY TABLE t2 (a int, b int); +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Slave **** +SHOW TABLES; +Tables_in_test +t1 +t2 +**** On Master **** +DROP TABLE t1,t2; +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a int) +master-bin.000001 192 Query 1 278 use `test`; CREATE TABLE t2 (a int) +master-bin.000001 278 Query 1 382 use `test`; DROP TABLE `t1` /* generated by server */ +SHOW TABLES; +Tables_in_test +t2 +**** On Slave **** +SHOW TABLES; +Tables_in_test +t2 diff --git a/mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result b/mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result new file mode 100644 index 00000000000..b696baa57db --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_err_ignoredtable.result @@ -0,0 +1,44 @@ +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; +create table t1 (a int primary key); +insert into t1 values (1),(1); +ERROR 23000: Duplicate entry '1' for key 1 +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 269 # # master-bin.000001 Yes Yes 0 0 269 # None 0 No # +show tables like 't1'; +Tables_in_test (t1) +t1 +drop table t1; +select get_lock('crash_lock%20C', 10); +get_lock('crash_lock%20C', 10) +1 +create table t2 (a int primary key); +insert into t2 values(1); +create table t3 (id int); +insert into t3 values(connection_id()); + update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); +select (@id := id) - id from t3; +(@id := id) - id +0 +kill @id; +drop table t2,t3; +show binlog events from 102; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Update_rows 1 # # +master-bin.000001 # Query 1 # # diff --git a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result new file mode 100644 index 00000000000..942a6b83bf6 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result @@ -0,0 +1,33 @@ +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; +create table t1 (a int); +insert into t1 values (10); +create table t2 (a int); +create table t3 (a int) engine=merge union(t1); +create table t4 (a int); +insert into t4 select * from t3; +rename table t1 to t5, t2 to t1; +flush no_write_to_binlog tables; +SHOW BINLOG EVENTS FROM 619 ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 +select * from t3; +a +flush tables; +SHOW BINLOG EVENTS FROM 619 ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 # Query 1 # use `test`; flush tables +select * from t3; +a +stop slave; +drop table t1; +flush tables with read lock; +start slave; +stop slave; +ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +drop table t3, t4, t5; diff --git a/mysql-test/suite/rpl/r/rpl_row_func001.result b/mysql-test/suite/rpl/r/rpl_row_func001.result new file mode 100644 index 00000000000..b20f3f724d0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_func001.result @@ -0,0 +1,30 @@ +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; +DROP FUNCTION test.f1; +DROP TABLE IF EXISTS test.t1; +create table test.t1 (a int, PRIMARY KEY(a)); +create function test.f1(i int) returns int +begin +insert into test.t1 values(i); +return 0; +end// +select test.f1(1); +test.f1(1) +0 +select test.f1(2); +test.f1(2) +0 +select * from test.t1; +a +1 +2 +select * from test.t1; +a +1 +2 +DROP FUNCTION test.f1; +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_func002.result b/mysql-test/suite/rpl/r/rpl_row_func002.result new file mode 100644 index 00000000000..03f5b3115c3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_func002.result @@ -0,0 +1,26 @@ +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; +DROP FUNCTION test.f1; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a)); +CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a)); +create function test.f1() RETURNS TIMESTAMP +BEGIN +UPDATE test.t1 SET t = CURRENT_TIMESTAMP; +RETURN CURRENT_TIMESTAMP; +END// +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +SET TIMESTAMP=2; +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +SET TIMESTAMP=1; +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +SET TIMESTAMP=333300000; +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +DROP FUNCTION test.f1; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_func003.result b/mysql-test/suite/rpl/r/rpl_row_func003.result new file mode 100644 index 00000000000..a5fd46a2ce3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_func003.result @@ -0,0 +1,29 @@ +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; +DROP FUNCTION IF EXISTS test.f1; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=INNODB; +create function test.f1() RETURNS CHAR(16) +BEGIN +DECLARE tmp CHAR(16); +DECLARE var_name FLOAT; +SET var_name = RAND(); +IF var_name > .6 +THEN SET tmp = 'Texas'; +ELSE SET tmp = 'MySQL'; +END IF; +RETURN tmp; +END| +INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); +INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); +SET AUTOCOMMIT=0; +START TRANSACTION; +INSERT INTO test.t1 VALUES (null,test.f1()); +ROLLBACK; +SET AUTOCOMMIT=1; +DROP FUNCTION test.f1; +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result new file mode 100644 index 00000000000..4412a1fa75c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result @@ -0,0 +1,55 @@ +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; +create table t1 (a int not null primary key); +insert into t1 values (1); +create table t2 (a int); +insert into t2 values (1); +update t1, t2 set t1.a = 0 where t1.a = t2.a; +show tables; +Tables_in_test +t1 +select * from t1; +a +0 +drop table t1; +insert into t1 values (1); +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table test.t2 +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1146 +Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` +Skip_Counter 0 +Exec_Master_Log_Pos 524 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result new file mode 100644 index 00000000000..2044672f49d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_insert_delayed.result @@ -0,0 +1,48 @@ +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 @old_global_binlog_format = @@global.binlog_format; +set @@global.binlog_format = row; +CREATE SCHEMA IF NOT EXISTS mysqlslap; +USE mysqlslap; +select @@global.binlog_format; +@@global.binlog_format +ROW +CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); +FLUSH TABLE t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +use mysqlslap; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +truncate table t1; +insert delayed into t1 values(10, "my name"); +insert delayed into t1 values(10, "is Bond"), (20, "James Bond"); +flush table t1; +select * from t1; +id name +10 my name +20 James Bond +select * from t1; +id name +10 my name +20 James Bond +delete from t1 where id!=10; +insert delayed into t1 values(20, "is Bond"), (10, "James Bond"); +flush table t1; +select * from t1; +id name +10 my name +20 is Bond +select * from t1; +id name +10 my name +20 is Bond +USE test; +DROP SCHEMA mysqlslap; +set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/suite/rpl/r/rpl_row_loaddata_m.result b/mysql-test/suite/rpl/r/rpl_row_loaddata_m.result new file mode 100644 index 00000000000..149efddaf8d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_loaddata_m.result @@ -0,0 +1,20 @@ +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; +drop database if exists mysqltest; +stop slave; +create database mysqltest; +use mysqltest; +create table t1(a int, b int, unique(b)); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +show binlog events from 102; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +drop database mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result new file mode 100644 index 00000000000..9de0d3d0ebb --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -0,0 +1,116 @@ +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; +stop slave; +reset master; +reset slave; +reset master; +create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; +insert into t1 values (NULL); +drop table t1; +create table t1 (word char(20) not null)ENGINE=MyISAM; +load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; +select count(*) from t1; +count(*) +69 +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +show binlog events from 106 limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +show binlog events from 106 limit 2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +show binlog events from 106 limit 2,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +flush logs; +create table t3 (a int)ENGINE=MyISAM; +start slave; + +let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; + +--source include/wait_slave_status.inc +flush logs; +stop slave; +create table t2 (n int)ENGINE=MyISAM; +insert into t2 values (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Rotate # # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002'; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM +master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM +master-bin.000002 # Table_map 1 # table_id: # (test.t2) +master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +show binary logs; +Log_name File_size +master-bin.000001 1260 +master-bin.000002 377 +start slave; +show binary logs; +Log_name File_size +slave-bin.000001 1358 +slave-bin.000002 278 +show binlog events in 'slave-bin.000001' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM +slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 +show binlog events in 'slave-bin.000002' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM +slave-bin.000002 # Table_map 1 # table_id: # (test.t2) +slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 377 # # master-bin.000002 Yes Yes # 0 0 377 # None 0 No # No +show binlog events in 'slave-bin.000005' from 4; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +create table t1(a int auto_increment primary key, b int); +insert into t1 values (NULL, 1); +reset master; +set insert_id=5; +insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +select * from t1; +a b +1 1 +5 1 +6 1 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result new file mode 100644 index 00000000000..4d8175142b2 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -0,0 +1,124 @@ +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; +stop slave; +reset master; +reset slave; +reset master; +create table t1(n int not null auto_increment primary key)ENGINE=InnoDB; +insert into t1 values (NULL); +drop table t1; +create table t1 (word char(20) not null)ENGINE=InnoDB; +load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; +select count(*) from t1; +count(*) +69 +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Xid 1 # COMMIT /* XID */ +show binlog events from 106 limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +show binlog events from 106 limit 2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +show binlog events from 106 limit 2,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +flush logs; +create table t3 (a int)ENGINE=InnoDB; +start slave; + +let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; + +--source include/wait_slave_status.inc +flush logs; +stop slave; +create table t2 (n int)ENGINE=InnoDB; +insert into t2 values (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Rotate # # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002'; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB +master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB +master-bin.000002 # Table_map 1 # table_id: # (test.t2) +master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000002 # Xid 1 # COMMIT /* XID */ +show binary logs; +Log_name File_size +master-bin.000001 1314 +master-bin.000002 404 +start slave; +show binary logs; +Log_name File_size +slave-bin.000001 1412 +slave-bin.000002 305 +show binlog events in 'slave-bin.000001' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Xid 1 # COMMIT /* XID */ +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Xid 1 # COMMIT /* XID */ +slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB +slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 +show binlog events in 'slave-bin.000002' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB +slave-bin.000002 # Table_map 1 # table_id: # (test.t2) +slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000002 # Xid 1 # COMMIT /* XID */ +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 404 # # master-bin.000002 Yes Yes # 0 0 404 # None 0 No # No +show binlog events in 'slave-bin.000005' from 4; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +create table t1(a int auto_increment primary key, b int); +insert into t1 values (NULL, 1); +reset master; +set insert_id=5; +insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +select * from t1; +a b +1 1 +5 1 +6 1 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result new file mode 100644 index 00000000000..cb1692568fc --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result @@ -0,0 +1,281 @@ +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +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; +stop slave; +# +# Generate a big enough master's binlog to cause relay log rotations +# +create table t1 (a int); +drop table t1; +reset slave; +# +# Test 1 +# +set @my_max_binlog_size= @@global.max_binlog_size; +set global max_binlog_size=8192; +set global max_relay_log_size=8192-1; +select @@global.max_relay_log_size; +@@global.max_relay_log_size +4096 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 58668 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 58668 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 2 +# +stop slave; +reset slave; +set global max_relay_log_size=(5*4096); +select @@global.max_relay_log_size; +@@global.max_relay_log_size 20480 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 58668 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 58668 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 3: max_relay_log_size = 0 +# +stop slave; +reset slave; +set global max_relay_log_size=0; +select @@global.max_relay_log_size; +@@global.max_relay_log_size 0 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 58668 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 58668 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions +# +stop slave; +reset slave; +flush logs; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File +Read_Master_Log_Pos 4 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File +Slave_IO_Running No +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 0 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 5 +# +reset slave; +start slave; +flush logs; +create table t1 (a int); +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 58754 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 58754 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated +# +flush logs; +drop table t1; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 58830 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 58830 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +flush logs; +show master status; +File master-bin.000002 +Position 106 +Binlog_Do_DB +Binlog_Ignore_DB +set global max_binlog_size= @my_max_binlog_size; +# +# End of 4.1 tests +# diff --git a/mysql-test/suite/rpl/r/rpl_row_multi_query.result b/mysql-test/suite/rpl/r/rpl_row_multi_query.result new file mode 100644 index 00000000000..8cb1aec522b --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_multi_query.result @@ -0,0 +1,37 @@ +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; +drop database if exists mysqltest; +create database mysqltest; +create table mysqltest.t1 ( n int); +insert into mysqltest.t1 values(1)/ +insert into mysqltest.t1 values(2); +insert into mysqltest.t1 values(3); +insert into mysqltest.t1 values(4); +insert into mysqltest.t1 values(5)/ +select * from mysqltest.t1; +n +1 +2 +3 +4 +5 +show binlog events from 102; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Query 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +master-bin.000001 # Table_map 1 # # +master-bin.000001 # Write_rows 1 # # +drop database mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result new file mode 100644 index 00000000000..e2df1459ac0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -0,0 +1,352 @@ +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; + +---Setup Section -- +set timestamp=1000000000; +DROP TABLE IF EXISTS t1,t2,t3; +CREATE TABLE t1(word VARCHAR(20)); +CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY); +CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT); + +---Test1 check table load -- +SELECT COUNT(*) from t1; +COUNT(*) +351 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 +SELECT COUNT(*) from t1; +COUNT(*) +351 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 +insert into t1 values ("Alas"); +flush logs; + +--- Test 1 Dump binlog to file -- + +--- Test 1 delete tables, clean master and slave -- +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +stop slave; +reset master; +reset slave; +start slave; + +--- Test 1 Load from Dump binlog file -- + +--- Test 1 Check Load Results -- +SELECT COUNT(*) from t1; +COUNT(*) +352 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 +SELECT COUNT(*) from t1; +COUNT(*) +352 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 + +--- Test 2 position test -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- Test 3 First Remote test -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +DROP TABLE IF EXISTS t1,t2,t3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t1(word VARCHAR(20))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- Test 4 Second Remote test -- +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +stop slave; +reset master; +reset slave; +start slave; +SELECT COUNT(*) from t1; +COUNT(*) +352 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 +SELECT COUNT(*) from t1; +COUNT(*) +352 +SELECT COUNT(*) from t2; +COUNT(*) +500 +SELECT COUNT(*) from t3; +COUNT(*) +500 +SELECT * FROM t1 ORDER BY word LIMIT 5; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aarhus +SELECT * FROM t2 ORDER BY id LIMIT 5; +id +1 +2 +3 +4 +5 +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +c1 c3 c4 c5 +1 2006-02-22 00:00:00 Tested in Texas 2.2 +2 2006-02-22 00:00:00 Tested in Texas 4.4 +3 2006-02-22 00:00:00 Tested in Texas 6.6 +4 2006-02-22 00:00:00 Tested in Texas 8.8 +5 2006-02-22 00:00:00 Tested in Texas 11 + +--- Test 5 LOAD DATA -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- Test 6 reading stdin -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +DROP TABLE IF EXISTS t1,t2,t3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t1(word VARCHAR(20))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)/*!*/; +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- Test 7 reading stdin w/position -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- Test 8 switch internal charset -- +stop slave; +reset master; +reset slave; +start slave; +create table t4 (f text character set utf8); +create table t5 (f text character set cp932); +flush logs; +rename table t4 to t04, t5 to t05; +select HEX(f) from t04; +HEX(f) +E382BD +select HEX(f) from t4; +HEX(f) +E382BD +select HEX(f) from t05; +HEX(f) +835C +select HEX(f) from t5; +HEX(f) +835C +select HEX(f) from t04; +HEX(f) +E382BD +select HEX(f) from t4; +HEX(f) +E382BD +select HEX(f) from t05; +HEX(f) +835C +select HEX(f) from t5; +HEX(f) +835C + +--- Test cleanup -- +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT NOT NULL KEY, b INT); +INSERT INTO t1 VALUES(1,1); +SELECT * FROM t1; +a b +1 1 +FLUSH LOGS; +DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; diff --git a/mysql-test/suite/rpl/r/rpl_row_mystery22.result b/mysql-test/suite/rpl/r/rpl_row_mystery22.result new file mode 100644 index 00000000000..bcf65e4ede3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_mystery22.result @@ -0,0 +1,30 @@ +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; +create table t1(n int auto_increment primary key, s char(10)); +insert into t1 values (2,'old'); +insert into t1 values(NULL,'new'); +insert into t1 values(NULL,'new'); +select * from t1 order by n; +n s +1 new +2 new +delete from t1 where n = 2; +start slave; +stop slave; +create table t2(n int); +drop table t2; +insert into t1 values(NULL,'new'); +set sql_log_bin=0; +insert into t1 values(NULL,'new'); +set sql_log_bin=1; +delete from t1 where n=4; +start slave; +select * from t1 order by n; +n s +1 new +3 new +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result new file mode 100644 index 00000000000..c9ae5ced7bc --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result @@ -0,0 +1,32 @@ +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; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No +stop slave; +change master to master_user='test'; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # No +reset slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No +stop slave; +reset slave; +start slave; +create temporary table t1 (a int); +stop slave; +reset slave; +start slave; +show status like 'slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 diff --git a/mysql-test/suite/rpl/r/rpl_row_sp001.result b/mysql-test/suite/rpl/r/rpl_row_sp001.result new file mode 100644 index 00000000000..8c26c061376 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp001.result @@ -0,0 +1,85 @@ +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; + + +--------------------------------------------- +create table test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); +create procedure test.p1() +begin +INSERT INTO test.t1 (f,d) VALUES (RAND(),NOW()); +end// + + +------------------------------------------- +CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t CHAR(4), PRIMARY KEY(a)); +CREATE PROCEDURE test.p2(n int) +begin +CASE n +WHEN 1 THEN +UPDATE test.t2 set t ='Tex'; +WHEN 2 THEN +UPDATE test.t2 set t ='SQL'; +ELSE +UPDATE test.t2 set t ='NONE'; +END CASE; +end// +INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'); +SELECT * FROM t2 ORDER BY a; +a t +1 NEW +2 NEW +3 NEW +4 NEW +SELECT * FROM t2 ORDER BY a; +a t +1 NEW +2 NEW +3 NEW +4 NEW +call test.p2(1); +SELECT * FROM t2 ORDER BY a; +a t +1 Tex +2 Tex +3 Tex +4 Tex +SELECT * FROM t2 ORDER BY a; +a t +1 Tex +2 Tex +3 Tex +4 Tex +call test.p2(2); +SELECT * FROM t2 ORDER BY a; +a t +1 SQL +2 SQL +3 SQL +4 SQL +SELECT * FROM t2 ORDER BY a; +a t +1 SQL +2 SQL +3 SQL +4 SQL +call test.p2(3); +SELECT * FROM t2 ORDER BY a; +a t +1 NONE +2 NONE +3 NONE +4 NONE +SELECT * FROM t2 ORDER BY a; +a t +1 NONE +2 NONE +3 NONE +4 NONE +DROP PROCEDURE test.p1; +DROP PROCEDURE test.p2; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result b/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result new file mode 100644 index 00000000000..a42c9af988c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result @@ -0,0 +1,239 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +DROP TABLE IF EXISTS test.t3; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (a INT AUTO_INCREMENT KEY, t CHAR(6)) ENGINE=INNODB; +CREATE TABLE test.t2 (a INT AUTO_INCREMENT KEY, f INT, FOREIGN KEY(a) REFERENCES test.t1(a) ON DELETE CASCADE) ENGINE=INNODB; +create procedure test.p1(IN i CHAR(6)) +begin +INSERT INTO test.t1 (t) VALUES (i); +INSERT INTO test.t2 VALUES (NULL,LAST_INSERT_ID()); +end| +create procedure test.p2(IN i INT) +begin +DELETE FROM test.t1 where a < i; +end| + +< -- test 1 call p1 -- > +------------------------ +SET FOREIGN_KEY_CHECKS=1; +call test.p1('texas'); +call test.p1('Live'); +call test.p1('next'); +call test.p1('to'); +call test.p1('OK'); +call test.p1('MySQL'); + +< -- test 1 select master after p1 -- > +--------------------------------------- +SELECT * FROM test.t1; +a t +1 texas +2 Live +3 next +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 + +< -- test 1 select slave after p1 -- > +-------------------------------------- +SELECT * FROM test.t1; +a t +1 texas +2 Live +3 next +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 + +< -- test 1 call p2 & select master -- > +---------------------------------------- +call test.p2(4); +SELECT * FROM test.t1; +a t +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +4 4 +5 5 +6 6 + +< -- test 1 select slave after p2 -- > +-------------------------------------- +SELECT * FROM test.t1; +a t +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +4 4 +5 5 +6 6 + +< -- End test 1 Begin test 2 -- > +--------------------------------- +SET FOREIGN_KEY_CHECKS=0; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (a INT, t CHAR(6), PRIMARY KEY(a)) ENGINE=INNODB; +CREATE TABLE test.t2 (a INT, f INT, FOREIGN KEY(a) REFERENCES test.t1(a) ON UPDATE CASCADE, PRIMARY KEY(a)) ENGINE=INNODB; +CREATE PROCEDURE test.p1(IN nm INT, IN ch CHAR(6)) +BEGIN +INSERT INTO test.t1 (a,t) VALUES (nm, ch); +INSERT INTO test.t2 VALUES (nm, LAST_INSERT_ID()); +END| +CREATE PROCEDURE test.p2(IN i INT) +BEGIN +UPDATE test.t1 SET a = i*10 WHERE a = i; +END| +SET FOREIGN_KEY_CHECKS=1; +CALL test.p1(1,'texas'); +CALL test.p1(2,'Live'); +CALL test.p1(3,'next'); +CALL test.p1(4,'to'); +CALL test.p1(5,'OK'); +CALL test.p1(6,'MySQL'); + +< -- test 2 select Master after p1 -- > +--------------------------------------- +SELECT * FROM test.t1; +a t +1 texas +2 Live +3 next +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +1 6 +2 6 +3 6 +4 6 +5 6 +6 6 + +< -- test 2 select Slave after p1 -- > +-------------------------------------- +SELECT * FROM test.t1; +a t +1 texas +2 Live +3 next +4 to +5 OK +6 MySQL +SELECT * FROM test.t2; +a f +1 6 +2 6 +3 6 +4 6 +5 6 +6 6 + +< -- test 2 call p2 & select Master -- > +---------------------------------------- +CALL test.p2(2); +CALL test.p2(4); +CALL test.p2(6); +SELECT * FROM test.t1; +a t +1 texas +3 next +5 OK +20 Live +40 to +60 MySQL +SELECT * FROM test.t2; +a f +1 6 +3 6 +5 6 +20 6 +40 6 +60 6 + +< -- test 1 select Slave after p2 -- > +-------------------------------------- +SELECT * FROM test.t1; +a t +1 texas +3 next +5 OK +20 Live +40 to +60 MySQL +SELECT * FROM test.t2; +a f +1 6 +3 6 +5 6 +20 6 +40 6 +60 6 + +< -- End test 2 Begin test 3 -- > +--------------------------------- +CREATE TABLE test.t3 (a INT AUTO_INCREMENT KEY, t CHAR(6))ENGINE=INNODB; +CREATE PROCEDURE test.p3(IN n INT) +begin +CASE n +WHEN 2 THEN +DELETE from test.t3; +ELSE +INSERT INTO test.t3 VALUES (NULL,'NONE'); +END CASE; +end| +SET AUTOCOMMIT=0; +START TRANSACTION; +ROLLBACK; +select * from test.t3; +a t +select * from test.t3; +a t +START TRANSACTION; +COMMIT; +select * from test.t3; +a t +98 NONE +select * from test.t3; +a t +98 NONE +SET AUTOCOMMIT=1; +SET FOREIGN_KEY_CHECKS=0; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp003.result b/mysql-test/suite/rpl/r/rpl_row_sp003.result new file mode 100644 index 00000000000..df3e2a7ceed --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp003.result @@ -0,0 +1,49 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=INNODB; +CREATE PROCEDURE test.p1() +BEGIN +INSERT INTO test.t1 VALUES (4); +SELECT get_lock("test", 100); +UPDATE test.t1 set a=a+4 WHERE a=4; +END| +CREATE PROCEDURE test.p2() +BEGIN +UPDATE test.t1 SET a=a+1; +END| +SELECT get_lock("test", 200); +get_lock("test", 200) +1 +CALL test.p1(); +CALL test.p2(); +SELECT release_lock("test"); +release_lock("test") +1 +SELECT * FROM test.t1; +a +5 +SELECT * FROM test.t1; +a +5 +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=INNODB; +CALL test.p2(); +CALL test.p1(); +get_lock("test", 100) +0 +SELECT * FROM test.t1; +a +8 +SELECT * FROM test.t1; +a +8 +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp005.result b/mysql-test/suite/rpl/r/rpl_row_sp005.result new file mode 100644 index 00000000000..01e1970e0df --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp005.result @@ -0,0 +1,100 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t3; +CREATE TABLE IF NOT EXISTS test.t1(id INT, data CHAR(16),PRIMARY KEY(id)); +CREATE TABLE IF NOT EXISTS test.t2(id2 INT,PRIMARY KEY(id2)); +CREATE TABLE IF NOT EXISTS test.t3(id3 INT,PRIMARY KEY(id3), c CHAR(16)); +CREATE PROCEDURE test.p1() +BEGIN +DECLARE done INT DEFAULT 0; +DECLARE spa CHAR(16); +DECLARE spb,spc INT; +DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1 ORDER BY id; +DECLARE cur2 CURSOR FOR SELECT id2 FROM test.t2 ORDER BY id2; +DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; +OPEN cur1; +OPEN cur2; +REPEAT +FETCH cur1 INTO spb, spa; +FETCH cur2 INTO spc; +IF NOT done THEN +IF spb < spc THEN +INSERT INTO test.t3 VALUES (spb,spa); +ELSE +INSERT INTO test.t3 VALUES (spc,spa); +END IF; +END IF; +UNTIL done END REPEAT; +CLOSE cur1; +CLOSE cur2; +END| +CREATE PROCEDURE test.p2() +BEGIN +INSERT INTO test.t1 VALUES (4,'MySQL'),(20,'ROCKS'),(11,'Texas'),(10,'kyle'); +INSERT INTO test.t2 VALUES (4),(2),(1),(3); +UPDATE test.t1 SET id=id+4 WHERE id=4; +END| + +< ---- Master selects-- > +------------------------- +CALL test.p2(); +SELECT * FROM test.t1 ORDER BY id; +id data +8 MySQL +10 kyle +11 Texas +20 ROCKS +SELECT * FROM test.t2 ORDER BY id2; +id2 +1 +2 +3 +4 + +< ---- Slave selects-- > +------------------------ +SELECT * FROM test.t1 ORDER BY id; +id data +8 MySQL +10 kyle +11 Texas +20 ROCKS +SELECT * FROM test.t2 ORDER BY id2; +id2 +1 +2 +3 +4 + +< ---- Master selects-- > +------------------------- +CALL test.p1(); +SELECT * FROM test.t3 ORDER BY id3; +id3 c +1 MySQL +2 kyle +3 Texas +4 ROCKS + +< ---- Slave selects-- > +------------------------ +SELECT * FROM test.t3 ORDER BY id3; +id3 c +1 MySQL +2 kyle +3 Texas +4 ROCKS +ALTER PROCEDURE test.p1 MODIFIES SQL DATA; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result new file mode 100644 index 00000000000..8339e77d3a0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result @@ -0,0 +1,46 @@ +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; +create database if not exists mysqltest1; +DROP PROCEDURE IF EXISTS mysqltest1.p1; +DROP PROCEDURE IF EXISTS mysqltest1.p2; +DROP TABLE IF EXISTS mysqltest1.t2; +DROP TABLE IF EXISTS mysqltest1.t1; +CREATE TABLE IF NOT EXISTS mysqltest1.t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=InnoDB; +CREATE TABLE IF NOT EXISTS mysqltest1.t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=InnoDB; +CREATE PROCEDURE mysqltest1.p1() +BEGIN +DECLARE done INT DEFAULT 0; +DECLARE spa CHAR(16); +DECLARE spb INT; +DECLARE cur1 CURSOR FOR SELECT name, +(YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5) +------------------------- +CALL test.p1(12); +Warnings: +Note 1051 Unknown table 't1' +SELECT * FROM test.t1; +num +12 + +< ---- Slave selects-- > +------------------------ +SELECT * FROM test.t1; +num +12 + +< ---- Master selects-- > +------------------------- +CALL test.p1(13); +SELECT * FROM test.t1; +num +13 + +< ---- Slave selects-- > +------------------------ +SELECT * FROM test.t1; +num +13 +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp008.result b/mysql-test/suite/rpl/r/rpl_row_sp008.result new file mode 100644 index 00000000000..23197964a24 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp008.result @@ -0,0 +1,34 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (a INT,PRIMARY KEY(a)); +CREATE TABLE test.t2 (a INT,PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES(1),(2); +CREATE PROCEDURE test.p1() +BEGIN +SELECT SQL_CALC_FOUND_ROWS * FROM test.t1 LIMIT 1; +INSERT INTO test.t2 VALUES(FOUND_ROWS()); +END| + +< ---- Master selects-- > +------------------------- +CALL test.p1(); +a +1 +SELECT * FROM test.t2; +a +2 + +< ---- Slave selects-- > +------------------------ +SELECT * FROM test.t2; +a +2 +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp009.result b/mysql-test/suite/rpl/r/rpl_row_sp009.result new file mode 100644 index 00000000000..35ce0d7b420 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp009.result @@ -0,0 +1,77 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (a INT, PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES (1),(2),(3),(4); +CREATE TABLE test.t2 (a INT, PRIMARY KEY(a)); +CREATE PROCEDURE test.p1 (arg1 CHAR(1)) +BEGIN +DECLARE b, c INT; +IF arg1 = 'a' THEN +BEGIN +DECLARE cur1 CURSOR FOR SELECT A FROM test.t1 WHERE a % 2; +DECLARE continue handler for not found set b = 1; +SET b = 0; +OPEN cur1; +c1_repeat: REPEAT +FETCH cur1 INTO c; +IF (b = 1) THEN +LEAVE c1_repeat; +END IF; +INSERT INTO test.t2 VALUES (c); +UNTIL b = 1 +END REPEAT; +CLOSE cur1; +END; +END IF; +IF arg1 = 'b' THEN +BEGIN +DECLARE cur2 CURSOR FOR SELECT a FROM test.t1 WHERE NOT a % 2; +DECLARE continue handler for not found set b = 1; +SET b = 0; +OPEN cur2; +c2_repeat: REPEAT +FETCH cur2 INTO c; +IF (b = 1) THEN +LEAVE c2_repeat; +END IF; +INSERT INTO test.t2 VALUES (c); +UNTIL b = 1 +END REPEAT; +CLOSE cur2; +END; +END IF; +END| +CALL test.p1('a'); +SELECT * FROM test.t2 ORDER BY a; +a +1 +3 +SELECT * FROM test.t2 ORDER BY a; +a +1 +3 +truncate test.t2; +call test.p1('b'); +select * from test.t2 ORDER BY a; +a +2 +4 +SELECT * FROM test.t2 ORDER BY a; +a +2 +4 +truncate test.t2; +SELECT * FROM test.t2 ORDER BY a; +a +SELECT * FROM test.t2 ORDER BY a; +a +DROP PROCEDURE test.p1; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp010.result b/mysql-test/suite/rpl/r/rpl_row_sp010.result new file mode 100644 index 00000000000..02567465428 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp010.result @@ -0,0 +1,56 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p4; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE PROCEDURE test.p1() +BEGIN +INSERT INTO test.t1 VALUES(2); +END| +CREATE PROCEDURE test.p2() +BEGIN +DROP TEMPORARY TABLE IF EXISTS test.t1; +CREATE TEMPORARY TABLE test.t1 (a int, PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES(1); +CALL test.p1(); +END| +CALL test.p2(); +SELECT * FROM test.t1 ORDER BY a; +a +1 +2 +show tables; +Tables_in_test +CREATE PROCEDURE test.p3() +BEGIN +INSERT INTO test.t2 VALUES(7); +END| +CREATE PROCEDURE test.p4() +BEGIN +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t2 (a int, PRIMARY KEY(a)); +INSERT INTO test.t2 VALUES(6); +CALL test.p3(); +END| +CALL test.p4(); +SELECT * FROM test.t2 ORDER BY a; +a +6 +7 +SELECT * FROM test.t2 ORDER BY a; +a +6 +7 +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p4; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp011.result b/mysql-test/suite/rpl/r/rpl_row_sp011.result new file mode 100644 index 00000000000..e35c9f21adb --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp011.result @@ -0,0 +1,69 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p4; +DROP PROCEDURE IF EXISTS test.p5; +DROP PROCEDURE IF EXISTS test.p6; +DROP PROCEDURE IF EXISTS test.p7; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (a int, PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES (1); +CREATE PROCEDURE test.p1() +BEGIN +ALTER TABLE test.t1 ADD COLUMN b CHAR(4) AFTER a; +UPDATE test.t1 SET b = 'rbr' WHERE a = 1; +CALL test.p2(); +END| +CREATE PROCEDURE test.p2() +BEGIN +ALTER TABLE test.t1 ADD COLUMN f FLOAT AFTER b; +UPDATE test.t1 SET f = RAND() WHERE a = 1; +CALL test.p3(); +END| +CREATE PROCEDURE test.p3() +BEGIN +ALTER TABLE test.t1 RENAME test.t2; +CALL test.p4(); +END| +CREATE PROCEDURE test.p4() +BEGIN +ALTER TABLE test.t2 ADD INDEX (f); +ALTER TABLE test.t2 CHANGE a a INT UNSIGNED NOT NULL AUTO_INCREMENT; +INSERT INTO test.t2 VALUES (NULL,'TEST',RAND()); +CALL test.p5(); +END| +CREATE PROCEDURE test.p5() +BEGIN +ALTER TABLE test.t2 ORDER BY f; +INSERT INTO test.t2 VALUES (NULL,'STM',RAND()); +CALL test.p6(); +END| +CREATE PROCEDURE test.p6() +BEGIN +ALTER TABLE test.t2 ADD COLUMN b2 CHAR(4) FIRST; +ALTER TABLE test.t2 ADD COLUMN to_drop BIT(8) AFTER b2; +INSERT INTO test.t2 VALUES ('new',1,NULL,'STM',RAND()); +CALL test.p7(); +END| +CREATE PROCEDURE test.p7() +BEGIN +ALTER TABLE test.t2 DROP COLUMN to_drop; +INSERT INTO test.t2 VALUES ('gone',NULL,'STM',RAND()); +END| +CALL test.p1(); +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p4; +DROP PROCEDURE IF EXISTS test.p5; +DROP PROCEDURE IF EXISTS test.p6; +DROP PROCEDURE IF EXISTS test.p7; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp012.result b/mysql-test/suite/rpl/r/rpl_row_sp012.result new file mode 100644 index 00000000000..b9c818bad9a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_sp012.result @@ -0,0 +1,59 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +grant usage on *.* to user1@localhost; +flush privileges; +SELECT CURRENT_USER(); +CURRENT_USER() +root@localhost +SELECT USER(); +USER() +root@localhost +CREATE PROCEDURE test.p1 () SQL SECURITY INVOKER SELECT CURRENT_USER(), USER(); +CREATE PROCEDURE test.p2 () SQL SECURITY DEFINER CALL test.p1(); +CREATE PROCEDURE test.p3 () SQL SECURITY INVOKER CALL test.p1(); +GRANT EXECUTE ON PROCEDURE p1 TO user1@localhost; +GRANT EXECUTE ON PROCEDURE p2 TO user1@localhost; +GRANT EXECUTE ON PROCEDURE p3 TO user1@localhost; + +<******** Master user1 p3 & p2 calls *******> +---------------------------------------------- +SELECT CURRENT_USER(); +CURRENT_USER() +user1@localhost +SELECT USER(); +USER() +user1@localhost +CALL test.p3(); +CURRENT_USER() USER() +user1@localhost user1@localhost +CALL test.p2(); +CURRENT_USER() USER() +root@localhost user1@localhost + +<******** Slave user1 p3 & p2 calls *******> +--------------------------------------------- +SELECT CURRENT_USER(); +CURRENT_USER() +user1@localhost +SELECT USER(); +USER() +user1@localhost +CALL test.p3(); +CURRENT_USER() USER() +user1@localhost user1@localhost +CALL test.p2(); +CURRENT_USER() USER() +root@localhost user1@localhost +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP USER user1@localhost; diff --git a/mysql-test/suite/rpl/r/rpl_row_stop_middle.result b/mysql-test/suite/rpl/r/rpl_row_stop_middle.result new file mode 100644 index 00000000000..46ca5748174 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_stop_middle.result @@ -0,0 +1,26 @@ +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; +create table t1 (a int not null auto_increment primary key, b int, key(b)); +stop slave; +INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +start slave; +stop slave; +drop table t1; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result b/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result new file mode 100644 index 00000000000..0fd4ff86893 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_stop_middle_update.result @@ -0,0 +1,16 @@ +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; +create table t1 (words varchar(20)) engine=myisam; +load data infile '../std_data_ln/words.dat' into table t1 (words); +select count(*) from t1; +count(*) +70 +select count(*) from t1; +count(*) +70 +drop table t1; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result new file mode 100644 index 00000000000..4eca19ff098 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result @@ -0,0 +1,389 @@ +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; +STOP SLAVE; +SET @my_sql_mode= @@global.sql_mode; +SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; +START SLAVE; +CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM'; +CREATE TABLE t4 (a INT) ENGINE='MyISAM'; +CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='MyISAM'; +CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='MyISAM'; +CREATE TABLE t7 (a INT NOT NULL) ENGINE='MyISAM'; +CREATE TABLE t8 (a INT NOT NULL) ENGINE='MyISAM'; +CREATE TABLE t9 (a INT) ENGINE='MyISAM'; +ALTER TABLE t1_int ADD x INT DEFAULT 42; +ALTER TABLE t1_bit +ADD x BIT(3) DEFAULT b'011', +ADD y BIT(5) DEFAULT b'10101', +ADD z BIT(2) DEFAULT b'10'; +ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; +ALTER TABLE t1_nodef ADD x INT NOT NULL; +ALTER TABLE t2 DROP b; +ALTER TABLE t4 MODIFY a FLOAT; +ALTER TABLE t5 MODIFY b FLOAT; +ALTER TABLE t6 MODIFY c FLOAT; +ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT, +ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT; +ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0, +ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0, +ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0, +ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0; +INSERT INTO t1_int VALUES (2, 4, 4711); +INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); +INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); +**** On Master **** +INSERT INTO t1_int VALUES (1,2); +INSERT INTO t1_int VALUES (2,5); +INSERT INTO t1_bit VALUES (1,2); +INSERT INTO t1_bit VALUES (2,5); +INSERT INTO t1_char VALUES (1,2); +INSERT INTO t1_char VALUES (2,5); +SELECT * FROM t1_int ORDER BY a; +a b +1 2 +2 5 +SELECT * FROM t1_bit ORDER BY a; +a b +1 2 +2 5 +SELECT * FROM t1_char ORDER BY a; +a b +1 2 +2 5 +**** On Slave **** +SELECT a,b,x FROM t1_int ORDER BY a; +a b x +1 2 42 +2 5 4711 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 5 5 1C 1 +SELECT a,b,x FROM t1_char ORDER BY a; +a b x +1 2 Just a test +2 5 Foo is a bar +**** On Master **** +UPDATE t1_int SET b=2*b WHERE a=2; +UPDATE t1_char SET b=2*b WHERE a=2; +UPDATE t1_bit SET b=2*b WHERE a=2; +SELECT * FROM t1_int ORDER BY a; +a b +1 2 +2 10 +SELECT * FROM t1_bit ORDER BY a; +a b +1 2 +2 10 +SELECT * FROM t1_char ORDER BY a; +a b +1 2 +2 10 +**** On Slave **** +SELECT a,b,x FROM t1_int ORDER BY a; +a b x +1 2 42 +2 10 4711 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 10 5 1C 1 +SELECT a,b,x FROM t1_char ORDER BY a; +a b x +1 2 Just a test +2 10 Foo is a bar +INSERT INTO t9 VALUES (2); +INSERT INTO t1_nodef VALUES (1,2); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1105 +Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (2); +INSERT INTO t2 VALUES (2,4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (4); +INSERT INTO t4 VALUES (4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (5); +INSERT INTO t5 VALUES (5,10,25); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (6); +INSERT INTO t6 VALUES (6,12,36); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (6); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +INSERT INTO t7 VALUES (1),(2),(3); +INSERT INTO t8 VALUES (1),(2),(3); +SELECT * FROM t7 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t8 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t7 ORDER BY a; +a e1 e2 e3 e4 e5 e6 e7 e8 +1 NULL NULL NULL NULL NULL NULL NULL NULL +2 NULL NULL NULL NULL NULL NULL NULL NULL +3 NULL NULL NULL NULL NULL NULL NULL NULL +SELECT * FROM t8 ORDER BY a; +a e1 e2 e3 e4 e5 e6 e7 e8 +1 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 +**** On Master **** +TRUNCATE t1_nodef; +SET SQL_LOG_BIN=0; +INSERT INTO t1_nodef VALUES (1,2); +INSERT INTO t1_nodef VALUES (2,4); +SET SQL_LOG_BIN=1; +**** On Slave **** +INSERT INTO t1_nodef VALUES (1,2,3); +INSERT INTO t1_nodef VALUES (2,4,6); +**** On Master **** +UPDATE t1_nodef SET b=2*b WHERE a=1; +SELECT * FROM t1_nodef ORDER BY a; +a b +1 4 +2 4 +**** On Slave **** +SELECT * FROM t1_nodef ORDER BY a; +a b x +1 4 3 +2 4 6 +**** On Master **** +DELETE FROM t1_nodef WHERE a=2; +SELECT * FROM t1_nodef ORDER BY a; +a b +1 4 +**** On Slave **** +SELECT * FROM t1_nodef ORDER BY a; +a b x +1 4 3 +**** Cleanup **** +DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; +DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; +SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result new file mode 100644 index 00000000000..687108e17e5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result @@ -0,0 +1,389 @@ +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; +STOP SLAVE; +SET @my_sql_mode= @@global.sql_mode; +SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; +START SLAVE; +CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='InnoDB'; +CREATE TABLE t4 (a INT) ENGINE='InnoDB'; +CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='InnoDB'; +CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='InnoDB'; +CREATE TABLE t7 (a INT NOT NULL) ENGINE='InnoDB'; +CREATE TABLE t8 (a INT NOT NULL) ENGINE='InnoDB'; +CREATE TABLE t9 (a INT) ENGINE='InnoDB'; +ALTER TABLE t1_int ADD x INT DEFAULT 42; +ALTER TABLE t1_bit +ADD x BIT(3) DEFAULT b'011', +ADD y BIT(5) DEFAULT b'10101', +ADD z BIT(2) DEFAULT b'10'; +ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; +ALTER TABLE t1_nodef ADD x INT NOT NULL; +ALTER TABLE t2 DROP b; +ALTER TABLE t4 MODIFY a FLOAT; +ALTER TABLE t5 MODIFY b FLOAT; +ALTER TABLE t6 MODIFY c FLOAT; +ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT, +ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT; +ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0, +ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0, +ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0, +ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0; +INSERT INTO t1_int VALUES (2, 4, 4711); +INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); +INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); +**** On Master **** +INSERT INTO t1_int VALUES (1,2); +INSERT INTO t1_int VALUES (2,5); +INSERT INTO t1_bit VALUES (1,2); +INSERT INTO t1_bit VALUES (2,5); +INSERT INTO t1_char VALUES (1,2); +INSERT INTO t1_char VALUES (2,5); +SELECT * FROM t1_int ORDER BY a; +a b +1 2 +2 5 +SELECT * FROM t1_bit ORDER BY a; +a b +1 2 +2 5 +SELECT * FROM t1_char ORDER BY a; +a b +1 2 +2 5 +**** On Slave **** +SELECT a,b,x FROM t1_int ORDER BY a; +a b x +1 2 42 +2 5 4711 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 5 5 1C 1 +SELECT a,b,x FROM t1_char ORDER BY a; +a b x +1 2 Just a test +2 5 Foo is a bar +**** On Master **** +UPDATE t1_int SET b=2*b WHERE a=2; +UPDATE t1_char SET b=2*b WHERE a=2; +UPDATE t1_bit SET b=2*b WHERE a=2; +SELECT * FROM t1_int ORDER BY a; +a b +1 2 +2 10 +SELECT * FROM t1_bit ORDER BY a; +a b +1 2 +2 10 +SELECT * FROM t1_char ORDER BY a; +a b +1 2 +2 10 +**** On Slave **** +SELECT a,b,x FROM t1_int ORDER BY a; +a b x +1 2 42 +2 10 4711 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 10 5 1C 1 +SELECT a,b,x FROM t1_char ORDER BY a; +a b x +1 2 Just a test +2 10 Foo is a bar +INSERT INTO t9 VALUES (2); +INSERT INTO t1_nodef VALUES (1,2); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1105 +Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (2); +INSERT INTO t2 VALUES (2,4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (4); +INSERT INTO t4 VALUES (4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (5); +INSERT INTO t5 VALUES (5,10,25); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (6); +INSERT INTO t6 VALUES (6,12,36); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (6); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +INSERT INTO t7 VALUES (1),(2),(3); +INSERT INTO t8 VALUES (1),(2),(3); +SELECT * FROM t7 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t8 ORDER BY a; +a +1 +2 +3 +SELECT * FROM t7 ORDER BY a; +a e1 e2 e3 e4 e5 e6 e7 e8 +1 NULL NULL NULL NULL NULL NULL NULL NULL +2 NULL NULL NULL NULL NULL NULL NULL NULL +3 NULL NULL NULL NULL NULL NULL NULL NULL +SELECT * FROM t8 ORDER BY a; +a e1 e2 e3 e4 e5 e6 e7 e8 +1 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 +**** On Master **** +TRUNCATE t1_nodef; +SET SQL_LOG_BIN=0; +INSERT INTO t1_nodef VALUES (1,2); +INSERT INTO t1_nodef VALUES (2,4); +SET SQL_LOG_BIN=1; +**** On Slave **** +INSERT INTO t1_nodef VALUES (1,2,3); +INSERT INTO t1_nodef VALUES (2,4,6); +**** On Master **** +UPDATE t1_nodef SET b=2*b WHERE a=1; +SELECT * FROM t1_nodef ORDER BY a; +a b +1 4 +2 4 +**** On Slave **** +SELECT * FROM t1_nodef ORDER BY a; +a b x +1 4 3 +2 4 6 +**** On Master **** +DELETE FROM t1_nodef WHERE a=2; +SELECT * FROM t1_nodef ORDER BY a; +a b +1 4 +**** On Slave **** +SELECT * FROM t1_nodef ORDER BY a; +a b x +1 4 3 +**** Cleanup **** +DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; +DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9; +SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result new file mode 100644 index 00000000000..5876a0e1b65 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_7ndb.result @@ -0,0 +1,288 @@ +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; +STOP SLAVE; +SET @my_sql_mode= @@global.sql_mode; +SET GLOBAL SQL_MODE='STRICT_ALL_TABLES'; +START SLAVE; +CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='NDB'; +CREATE TABLE t4 (a INT) ENGINE='NDB'; +CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='NDB'; +CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='NDB'; +CREATE TABLE t9 (a INT) ENGINE='NDB'; +ALTER TABLE t1_int ADD x INT DEFAULT 42; +ALTER TABLE t1_bit +ADD x BIT(3) DEFAULT b'011', +ADD y BIT(5) DEFAULT b'10101', +ADD z BIT(2) DEFAULT b'10'; +ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test'; +ALTER TABLE t1_nodef ADD x INT NOT NULL; +ALTER TABLE t2 DROP b; +ALTER TABLE t4 MODIFY a FLOAT; +ALTER TABLE t5 MODIFY b FLOAT; +ALTER TABLE t6 MODIFY c FLOAT; +INSERT INTO t1_int VALUES (2, 4, 4711); +INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); +INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); +**** On Master **** +INSERT INTO t1_int VALUES (1,2); +INSERT INTO t1_int VALUES (2,5); +INSERT INTO t1_bit VALUES (1,2); +INSERT INTO t1_bit VALUES (2,5); +INSERT INTO t1_char VALUES (1,2); +INSERT INTO t1_char VALUES (2,5); +SELECT * FROM t1_int; +a b +1 2 +2 5 +SELECT * FROM t1_bit; +a b +1 2 +2 5 +SELECT * FROM t1_char; +a b +1 2 +2 5 +**** On Slave **** +SELECT a,b,x FROM t1_int; +a b x +1 2 42 +2 5 42 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 5 3 15 2 +SELECT a,b,x FROM t1_char; +a b x +1 2 Just a test +2 5 Just a test +**** On Master **** +UPDATE t1_int SET b=2*b WHERE a=2; +UPDATE t1_char SET b=2*b WHERE a=2; +UPDATE t1_bit SET b=2*b WHERE a=2; +SELECT * FROM t1_int; +a b +1 2 +2 10 +SELECT * FROM t1_bit; +a b +1 2 +2 10 +SELECT * FROM t1_char; +a b +1 2 +2 10 +**** On Slave **** +SELECT a,b,x FROM t1_int; +a b x +1 2 42 +2 10 42 +SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit; +a b HEX(x) HEX(y) HEX(z) +1 2 3 15 2 +2 10 3 15 2 +SELECT a,b,x FROM t1_char; +a b x +1 2 Just a test +2 10 Just a test +INSERT INTO t9 VALUES (2); +INSERT INTO t1_nodef VALUES (1,2); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1364 +Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (2); +INSERT INTO t2 VALUES (2,4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1514 +Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (4); +INSERT INTO t4 VALUES (4); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1514 +Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (5); +INSERT INTO t5 VALUES (5,10,25); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1514 +Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +INSERT INTO t9 VALUES (6); +INSERT INTO t6 VALUES (6,12,36); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1514 +Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef; +DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9; +SET @@global.sql_mode= @my_sql_mode; diff --git a/mysql-test/suite/rpl/r/rpl_row_trig001.result b/mysql-test/suite/rpl/r/rpl_row_trig001.result new file mode 100644 index 00000000000..6665dc6d555 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_trig001.result @@ -0,0 +1,30 @@ +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; +CREATE TABLE test.t1 (n MEDIUMINT NOT NULL, d DATETIME, PRIMARY KEY(n)); +CREATE TABLE test.t2 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); +CREATE TABLE test.t3 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d DATETIME, PRIMARY KEY(n)); +INSERT INTO test.t1 VALUES (1,NOW()); +CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t1 SET d=NOW() where n = 1;// +CREATE PROCEDURE test.p3() +BEGIN +INSERT INTO test.t3 (d) VALUES (NOW()); +END// +CREATE TRIGGER test.t3_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW CALL test.p3()// +CREATE PROCEDURE test.p2() +BEGIN +INSERT INTO test.t2 (f,d) VALUES (RAND(),NOW()); +END// + + +----------------------------------- +DROP PROCEDURE test.p2; +DROP PROCEDURE test.p3; +DROP TRIGGER test.t2_ai; +DROP TRIGGER test.t3_bi_t2; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; diff --git a/mysql-test/suite/rpl/r/rpl_row_trig002.result b/mysql-test/suite/rpl/r/rpl_row_trig002.result new file mode 100644 index 00000000000..794104db750 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_trig002.result @@ -0,0 +1,69 @@ +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; +DROP TRIGGER test.t2_ai; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +CREATE TABLE test.t2 (value CHAR(30),domain_id INT, mailaccount_id INT, program CHAR(30),keey CHAR(30),PRIMARY KEY(domain_id)); +CREATE TABLE test.t3 (value CHAR(30),domain_id INT, mailaccount_id INT, program CHAR(30),keey CHAR(30),PRIMARY KEY(domain_id)); +CREATE TABLE test.t1 (id INT,domain CHAR(30),PRIMARY KEY(id)); +CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t3 ms, test.t1 d SET ms.value='No' WHERE ms.domain_id = (SELECT max(id) FROM test.t1 WHERE domain='example.com') AND ms.mailaccount_id IS NULL AND ms.program='spamfilter' AND ms.keey='scan_incoming'| +INSERT INTO test.t1 VALUES (1, 'example.com'),(2, 'mysql.com'),(3, 'earthmotherwear.com'), (4, 'yahoo.com'),(5, 'example.com'); +SELECT * FROM test.t1 ORDER BY id; +id domain +1 example.com +2 mysql.com +3 earthmotherwear.com +4 yahoo.com +5 example.com +SELECT * FROM test.t1 ORDER BY id; +id domain +1 example.com +2 mysql.com +3 earthmotherwear.com +4 yahoo.com +5 example.com +INSERT INTO test.t3 VALUES ('Yes', 5, NULL, 'spamfilter','scan_incoming'); +INSERT INTO test.t3 VALUES ('Yes', 1, NULL, 'spamfilter','scan_incoming'); +INSERT INTO test.t2 VALUES ('Yes', 1, NULL, 'spamfilter','scan_incoming'); +select * from test.t2; +value domain_id mailaccount_id program keey +Yes 1 NULL spamfilter scan_incoming +select * from test.t3; +value domain_id mailaccount_id program keey +No 5 NULL spamfilter scan_incoming +Yes 1 NULL spamfilter scan_incoming +select * from test.t2; +value domain_id mailaccount_id program keey +Yes 1 NULL spamfilter scan_incoming +select * from test.t3; +value domain_id mailaccount_id program keey +No 5 NULL spamfilter scan_incoming +Yes 1 NULL spamfilter scan_incoming +DELETE FROM test.t1 WHERE id = 1; +SELECT * FROM test.t1 ORDER BY id; +id domain +2 mysql.com +3 earthmotherwear.com +4 yahoo.com +5 example.com +SELECT * FROM test.t1 ORDER BY id; +id domain +2 mysql.com +3 earthmotherwear.com +4 yahoo.com +5 example.com +SELECT * FROM test.t1 ORDER BY id; +id domain +2 mysql.com +3 earthmotherwear.com +4 yahoo.com +5 example.com +DROP TRIGGER test.t2_ai; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; diff --git a/mysql-test/suite/rpl/r/rpl_row_trig003.result b/mysql-test/suite/rpl/r/rpl_row_trig003.result new file mode 100644 index 00000000000..43c2ecde2b4 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_trig003.result @@ -0,0 +1,83 @@ +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; +DROP TRIGGER test.t1_bi; +DROP TRIGGER test.t2_ai; +DROP TRIGGER test.t1_bu; +DROP TRIGGER test.t2_au; +DROP TRIGGER test.t1_bd; +DROP TRIGGER test.t2_ad; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +CREATE TABLE test.t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); +CREATE TABLE test.t2 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); +CREATE TABLE test.t3 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); +CREATE TRIGGER test.t1_bi BEFORE INSERT ON test.t1 FOR EACH ROW UPDATE test.t3 SET b1=1 and y=YEAR(NOW())| +CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW BEGIN +INSERT INTO test.t3 VALUES(NULL,0,'MySQL Replication team rocks!', 'Dark beer in prague is #1',12345.34,12.51,0,1965,NOW()); +UPDATE test.t3 SET f = ROUND(f); +END| +CREATE TRIGGER test.t1_bu BEFORE UPDATE on test.t1 FOR EACH ROW BEGIN +UPDATE test.t3 SET y = '2000'; +INSERT INTO test.t3 VALUES(NULL,1,'Testing MySQL databases before update ', 'Insert should work',621.43, 0105.21,0,1974,NOW()); +END| +CREATE TRIGGER test.t2_au AFTER UPDATE on test.t2 FOR EACH ROW BEGIN +DECLARE done INT DEFAULT 0; +DECLARE a DECIMAL(10,4); +DECLARE b FLOAT; +DECLARE num MEDIUMINT; +DECLARE cur1 CURSOR FOR SELECT t2.id, t2.d, t2.f FROM test.t2; +DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; +OPEN cur1; +REPEAT +FETCH cur1 INTO num, a, b; +IF NOT done THEN +UPDATE test.t3 SET total =(a*b) WHERE ID = num; +END IF; +UNTIL done END REPEAT; +CLOSE cur1; +END| +CREATE TRIGGER test.t1_bd BEFORE DELETE on test.t1 FOR EACH ROW BEGIN +DECLARE done INT DEFAULT 0; +DECLARE a BIT(8); +DECLARE b VARCHAR(255); +DECLARE c CHAR(255); +DECLARE d DECIMAL(10,4); +DECLARE e FLOAT; +DECLARE f BIGINT UNSIGNED; +DECLARE g YEAR; +DECLARE h TIMESTAMP; +DECLARE cur1 CURSOR FOR SELECT t1.b1, t1.vc, t1.bc, t1.d, t1.f, t1.total, t1.y, t1.t FROM test.t1; +DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; +OPEN cur1; +REPEAT +FETCH cur1 INTO a, b, c, d, e, f, g, h; +IF NOT done THEN +INSERT INTO test.t3 VALUES(NULL, a, b, c, d, e, f, g, h); +END IF; +UNTIL done END REPEAT; +CLOSE cur1; +END| +CREATE TRIGGER test.t2_ad AFTER DELETE ON test.t2 FOR EACH ROW +DELETE FROM test.t1| +INSERT INTO test.t1 VALUES(NULL,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,NOW()); +INSERT INTO test.t2 VALUES(NULL,0,'Testing MySQL databases is a cool ', 'MySQL Customers ROCK!',654321.4321,1.24521,0,YEAR(NOW()),NOW()); +UPDATE test.t1 SET b1 = 0 WHERE b1 = 1; +INSERT INTO test.t2 VALUES(NULL,1,'This is an after update test.', 'If this works, total will not be zero on the master or slave',1.4321,5.221,0,YEAR(NOW()),NOW()); +UPDATE test.t2 SET b1 = 0 WHERE b1 = 1; +INSERT INTO test.t1 VALUES(NULL,1,'add some more test data test.', 'and hope for the best', 3.321,5.221,0,YEAR(NOW()),NOW()); +DELETE FROM test.t1 WHERE id = 1; +DELETE FROM test.t2 WHERE id = 1; +DROP TRIGGER test.t1_bi; +DROP TRIGGER test.t2_ai; +DROP TRIGGER test.t1_bu; +DROP TRIGGER test.t2_au; +DROP TRIGGER test.t1_bd; +DROP TRIGGER test.t2_ad; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/suite/rpl/r/rpl_row_trig004.result b/mysql-test/suite/rpl/r/rpl_row_trig004.result new file mode 100644 index 00000000000..d0d0657f875 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_trig004.result @@ -0,0 +1,30 @@ +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; +DROP TRIGGER test.t1_bi_t2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=INNODB; +CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=INNODB; +CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)// +INSERT INTO test.t2 VALUES (1, 0.0); +INSERT INTO test.t2 VALUES (1, 0.0); +Got one of the listed errors +select * from test.t1; +n d +1 1.234 +select * from test.t2; +n f +1 0 +select * from test.t1; +n d +1 1.234 +select * from test.t2; +n f +1 0 +DROP TRIGGER test.t1_bi_t2; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result new file mode 100644 index 00000000000..d71cc479f7a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_until.result @@ -0,0 +1,190 @@ +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; +stop slave; +create table t1(n int not null auto_increment primary key); +insert into t1 values (1),(2),(3),(4); +drop table t1; +create table t2(n int not null auto_increment primary key); +insert into t2 values (1),(2); +insert into t2 values (3),(4); +drop table t2; +start slave until master_log_file='master-bin.000001', master_log_pos=311; +select * from t1; +n +1 +2 +3 +4 +SHOW SLAVE STATUS;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 744 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 315 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 311 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; +select * from t1; +n +1 +2 +3 +4 +SHOW SLAVE STATUS;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 744 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 315 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-no-such-bin.000001 +Until_Log_Pos 291 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; +select * from t2; +n +1 +2 +SHOW SLAVE STATUS;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 744 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 590 +Relay_Log_Space # +Until_Condition Relay +Until_Log_File slave-relay-bin.000004 +Until_Log_Pos 728 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave; +stop slave; +start slave until master_log_file='master-bin.000001', master_log_pos=740; +SHOW SLAVE STATUS;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 744 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 744 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 740 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until master_log_file='master-bin', master_log_pos=561; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until master_log_file='master-bin.000001'; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until relay_log_file='slave-relay-bin.000002'; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave sql_thread; +start slave until master_log_file='master-bin.000001', master_log_pos=740; +Warnings: +Note 1254 Slave is already running diff --git a/mysql-test/suite/rpl/r/rpl_row_view01.result b/mysql-test/suite/rpl/r/rpl_row_view01.result new file mode 100644 index 00000000000..a4b8d0a05e3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_view01.result @@ -0,0 +1,101 @@ +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; +create database if not exists mysqltest1; +DROP VIEW IF EXISTS mysqltest1.v1; +DROP VIEW IF EXISTS mysqltest1.v2; +DROP VIEW IF EXISTS mysqltest1.v3; +DROP VIEW IF EXISTS mysqltest1.v4; +DROP TABLE IF EXISTS mysqltest1.t3; +DROP TABLE IF EXISTS mysqltest1.t1; +DROP TABLE IF EXISTS mysqltest1.t2; +DROP TABLE IF EXISTS mysqltest1.t4; +CREATE TABLE mysqltest1.t1 (a INT, c CHAR(6),PRIMARY KEY(a)); +CREATE TABLE mysqltest1.t2 (a INT, c CHAR(6),PRIMARY KEY(a)); +CREATE TABLE mysqltest1.t3 (a INT, c CHAR(6), c2 CHAR(6), PRIMARY KEY(a)); +CREATE TABLE mysqltest1.t4 (a INT, qty INT, price INT,PRIMARY KEY(a)); +CREATE TABLE mysqltest1.t5 (qty INT, price INT, total INT, PRIMARY KEY(qty)); +INSERT INTO mysqltest1.t1 VALUES (1,'Thank'),(2,'it'),(3,'Friday'); +INSERT INTO mysqltest1.t2 VALUES (1,'GOD'),(2,'is'),(3,'TGIF'); +INSERT INTO mysqltest1.t4 VALUES(1, 3, 50),(2, 18, 3),(4, 4, 4); +CREATE VIEW mysqltest1.v2 AS SELECT qty, price, qty*price AS value FROM mysqltest1.t4 ORDER BY qty; +CREATE VIEW mysqltest1.v1 AS SELECT t1.a, t1.c, t2.c as c2 FROM mysqltest1.t1 as t1, mysqltest1.t2 AS t2 WHERE mysqltest1.t1.a = mysqltest1.t2.a ORDER BY a; +CREATE VIEW mysqltest1.v3 AS SELECT * FROM mysqltest1.t1; +CREATE VIEW mysqltest1.v4 AS SELECT * FROM mysqltest1.v3 WHERE a > 1 WITH LOCAL CHECK OPTION; +SELECT * FROM mysqltest1.v2; +qty price value +3 50 150 +4 4 16 +18 3 54 +SELECT * FROM mysqltest1.v1; +a c c2 +1 Thank GOD +2 it is +3 Friday TGIF +SELECT * FROM mysqltest1.v2; +qty price value +3 50 150 +4 4 16 +18 3 54 +SELECT * FROM mysqltest1.v1; +a c c2 +1 Thank GOD +2 it is +3 Friday TGIF +INSERT INTO mysqltest1.t5 SELECT * FROM mysqltest1.v2; +INSERT INTO mysqltest1.t3 SELECT * FROM mysqltest1.v1; +SELECT * FROM mysqltest1.t5 ORDER BY qty; +qty price total +3 50 150 +4 4 16 +18 3 54 +SELECT * FROM mysqltest1.t3 ORDER BY a; +a c c2 +1 Thank GOD +2 it is +3 Friday TGIF +SELECT * FROM mysqltest1.t5 ORDER BY qty; +qty price total +3 50 150 +4 4 16 +18 3 54 +SELECT * FROM mysqltest1.t3 ORDER BY a; +a c c2 +1 Thank GOD +2 it is +3 Friday TGIF +INSERT INTO mysqltest1.v4 VALUES (4,'TEST'); +SELECT * FROM mysqltest1.t1 ORDER BY a; +a c +1 Thank +2 it +3 Friday +4 TEST +SELECT * FROM mysqltest1.v4 ORDER BY a; +a c +2 it +3 Friday +4 TEST +SELECT * FROM mysqltest1.t1 ORDER BY a; +a c +1 Thank +2 it +3 Friday +4 TEST +SELECT * FROM mysqltest1.v4 ORDER BY a; +a c +2 it +3 Friday +4 TEST +DROP VIEW IF EXISTS mysqltest1.v1; +DROP VIEW IF EXISTS mysqltest1.v2; +DROP VIEW IF EXISTS mysqltest1.v3; +DROP VIEW IF EXISTS mysqltest1.v4; +DROP TABLE IF EXISTS mysqltest1.t3; +DROP TABLE IF EXISTS mysqltest1.t1; +DROP TABLE IF EXISTS mysqltest1.t2; +DROP TABLE IF EXISTS mysqltest1.t4; +DROP DATABASE mysqltest1; diff --git a/mysql-test/suite/rpl/r/rpl_server_id1.result b/mysql-test/suite/rpl/r/rpl_server_id1.result new file mode 100644 index 00000000000..8f82ca8ea12 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_server_id1.result @@ -0,0 +1,19 @@ +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; +create table t1 (n int); +reset master; +stop slave; +change master to master_port=SLAVE_PORT; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 106 None 0 No NULL No +start slave; +insert into t1 values (1); +show status like "slave_running"; +Variable_name Value +Slave_running OFF +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_server_id2.result b/mysql-test/suite/rpl/r/rpl_server_id2.result new file mode 100644 index 00000000000..a5c7fc07714 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_server_id2.result @@ -0,0 +1,21 @@ +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; +create table t1 (n int); +reset master; +stop slave; +change master to master_port=SLAVE_PORT; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 106 None 0 No NULL No +start slave; +insert into t1 values (1); +select * from t1; +n +1 +1 +stop slave; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_session_var.result b/mysql-test/suite/rpl/r/rpl_session_var.result new file mode 100644 index 00000000000..b5b4b815ade --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_session_var.result @@ -0,0 +1,43 @@ +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; +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1(a varchar(100),b int); +set @@session.sql_mode=pipes_as_concat; +insert into t1 values('My'||'SQL', 1); +set @@session.sql_mode=default; +insert into t1 values('1'||'2', 2); +select * from t1 where b<3 order by a; +a b +1 2 +MySQL 1 +select * from t1 where b<3 order by a; +a b +1 2 +MySQL 1 +set @@session.sql_mode=ignore_space; +insert into t1 values(password ('MySQL'), 3); +set @@session.sql_mode=ansi_quotes; +create table "t2" ("a" int); +drop table t1, t2; +set @@session.sql_mode=default; +create table t1(a int auto_increment primary key); +create table t2(b int, a int); +set @@session.sql_auto_is_null=1; +insert into t1 values(null); +insert into t2 select 1,a from t1 where a is null; +set @@session.sql_auto_is_null=0; +insert into t1 values(null); +insert into t2 select 2,a from t1 where a is null; +select * from t2 order by b; +b a +1 1 +select * from t2 order by b; +b a +1 1 +drop table t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_set_charset.result b/mysql-test/suite/rpl/r/rpl_set_charset.result new file mode 100644 index 00000000000..480d926fbba --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_set_charset.result @@ -0,0 +1,48 @@ +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; +drop database if exists mysqltest1; +create database mysqltest1 /*!40100 character set latin2 */; +use mysqltest1; +drop table if exists t1; +create table t1 (a varchar(255) character set latin2, b varchar(4)); +SET CHARACTER SET cp1250_latin2; +INSERT INTO t1 VALUES ('ŠŒŽ','80'); +INSERT INTO t1 VALUES ('šœžŸ','90'); +INSERT INTO t1 VALUES ('£¥ª¯','A0'); +INSERT INTO t1 VALUES ('³¹º¼¾¿','B0'); +INSERT INTO t1 VALUES ('ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ','C0'); +INSERT INTO t1 VALUES ('ÐÑÒÓÔÕÖרÙÚÛÜÝÞß','D0'); +INSERT INTO t1 VALUES ('àáâãäåæçèéêëìíîï','E0'); +INSERT INTO t1 VALUES ('ðñòóôõö÷øùúûüýþÿ','F0'); +select "--- on master ---"; +--- on master --- +--- on master --- +select hex(a),b from t1 order by b; +hex(a) b +A9A6ABAEAC 80 +B9B6BBBEBC 90 +A3A1AAAF A0 +B3B1BAA5B5BF B0 +C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF C0 +D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF D0 +E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF E0 +F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF F0 +use mysqltest1; +select "--- on slave ---"; +--- on slave --- +--- on slave --- +select hex(a),b from t1 order by b; +hex(a) b +A9A6ABAEAC 80 +B9B6BBBEBC 90 +A3A1AAAF A0 +B3B1BAA5B5BF B0 +C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF C0 +D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF D0 +E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF E0 +F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF F0 +drop database mysqltest1; diff --git a/mysql-test/suite/rpl/r/rpl_sf.result b/mysql-test/suite/rpl/r/rpl_sf.result new file mode 100644 index 00000000000..46defc6908a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sf.result @@ -0,0 +1,23 @@ +set global log_bin_trust_function_creators=0; +set binlog_format=STATEMENT; +create function fn16456() +returns int +begin +return unix_timestamp(); +end| +ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +set global log_bin_trust_function_creators=1; +create function fn16456() +returns int +begin +return unix_timestamp(); +end| +set global log_bin_trust_function_creators=0; +set binlog_format=ROW; +select fn16456(); +fn16456() +timestamp +set binlog_format=STATEMENT; +select fn16456(); +ERROR HY000: Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events +drop function fn16456; diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result new file mode 100644 index 00000000000..248ce5b52c3 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_skip_error.result @@ -0,0 +1,16 @@ +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; +create table t1 (n int not null primary key); +insert into t1 values (1); +insert into t1 values (1); +insert into t1 values (2),(3); +select * from t1 ORDER BY n; +n +1 +2 +3 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_slave_status.result b/mysql-test/suite/rpl/r/rpl_slave_status.result new file mode 100644 index 00000000000..29ec7b77b45 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_slave_status.result @@ -0,0 +1,58 @@ +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; +grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; +stop slave; +change master to master_user='rpl',master_password='rpl'; +start slave; +drop table if exists t1; +create table t1 (n int); +insert into t1 values (1); +select * from t1; +n +1 +delete from mysql.user where user='rpl'; +flush privileges; +stop slave; +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User rpl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running No +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master NULL +Master_SSL_Verify_Server_Cert No +drop table t1; +delete from mysql.user where user='rpl'; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result new file mode 100644 index 00000000000..208c46c5fab --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -0,0 +1,536 @@ +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; +drop database if exists mysqltest1; +create database mysqltest1; +use mysqltest1; +create table t1 (a varchar(100)); +use mysqltest1; +create procedure foo() +begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end| +select * from mysql.proc where name='foo' and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 foo PROCEDURE foo SQL CONTAINS_SQL NO DEFINER begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end root@localhost # # +select * from mysql.proc where name='foo' and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 foo PROCEDURE foo SQL CONTAINS_SQL NO DEFINER begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end root@localhost # # +set timestamp=1000000000; +call foo(); +select * from t1; +a +8 +1000000000 +select * from t1; +a +8 +1000000000 +delete from t1; +create procedure foo2() +select * from mysqltest1.t1; +call foo2(); +a +alter procedure foo2 contains sql; +drop table t1; +create table t1 (a int); +create table t2 like t1; +create procedure foo3() +deterministic +insert into t1 values (15); +grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1; +grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1; +grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; +SELECT 1; +1 +1 +create procedure foo4() +deterministic +begin +insert into t2 values(3); +insert into t1 values (5); +end| +call foo4(); +Got one of the listed errors +call foo3(); +show warnings; +Level Code Message +call foo4(); +Got one of the listed errors +alter procedure foo4 sql security invoker; +call foo4(); +show warnings; +Level Code Message +select * from t1; +a +15 +5 +select * from t2; +a +3 +3 +3 +select * from t1; +a +15 +5 +select * from t2; +a +3 +3 +3 +delete from t2; +alter table t2 add unique (a); +drop procedure foo4; +create procedure foo4() +deterministic +begin +insert into t2 values(20),(20); +end| +call foo4(); +ERROR 23000: Duplicate entry '20' for key 'a' +show warnings; +Level Code Message +Error 1062 Duplicate entry '20' for key 'a' +select * from t2; +a +20 +select * from t2; +a +20 +select * from mysql.proc where name="foo4" and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 foo4 PROCEDURE foo4 SQL CONTAINS_SQL YES DEFINER begin +insert into t2 values(20),(20); +end root@localhost # # +drop procedure foo4; +select * from mysql.proc where name="foo4" and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +select * from mysql.proc where name="foo4" and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +drop procedure foo; +drop procedure foo2; +drop procedure foo3; +create function fn1(x int) +returns int +begin +insert into t1 values (x); +return x+2; +end| +ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +create function fn1(x int) +returns int +deterministic +begin +insert into t1 values (x); +return x+2; +end| +delete t1,t2 from t1,t2; +select fn1(20); +fn1(20) +22 +insert into t2 values(fn1(21)); +select * from t1; +a +21 +20 +select * from t2; +a +23 +select * from t1; +a +21 +20 +select * from t2; +a +23 +drop function fn1; +create function fn1() +returns int +no sql +begin +return unix_timestamp(); +end| +alter function fn1 contains sql; +ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +delete from t1; +set timestamp=1000000000; +insert into t1 values(fn1()); +create function fn2() +returns int +no sql +begin +return unix_timestamp(); +end| +ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) +set global log_bin_trust_routine_creators=1; +Warnings: +Warning 1543 The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead +set global log_bin_trust_function_creators=0; +set global log_bin_trust_function_creators=1; +set global log_bin_trust_function_creators=1; +create function fn2() +returns int +no sql +begin +return unix_timestamp(); +end| +create function fn3() +returns int +not deterministic +reads sql data +begin +return 0; +end| +select fn3(); +fn3() +0 +select * from mysql.proc where db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 fn1 FUNCTION fn1 SQL NO_SQL NO DEFINER int(11) begin +return unix_timestamp(); +end root@localhost # # +mysqltest1 fn2 FUNCTION fn2 SQL NO_SQL NO DEFINER int(11) begin +return unix_timestamp(); +end zedjzlcsjhd@localhost # # +mysqltest1 fn3 FUNCTION fn3 SQL READS_SQL_DATA NO DEFINER int(11) begin +return 0; +end root@localhost # # +select * from t1; +a +1000000000 +use mysqltest1; +select * from t1; +a +1000000000 +select * from mysql.proc where db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 fn1 FUNCTION fn1 SQL NO_SQL NO DEFINER int(11) begin +return unix_timestamp(); +end root@localhost # # +mysqltest1 fn2 FUNCTION fn2 SQL NO_SQL NO DEFINER int(11) begin +return unix_timestamp(); +end zedjzlcsjhd@localhost # # +mysqltest1 fn3 FUNCTION fn3 SQL READS_SQL_DATA NO DEFINER int(11) begin +return 0; +end root@localhost # # +delete from t2; +alter table t2 add unique (a); +drop function fn1; +create function fn1(x int) +returns int +begin +insert into t2 values(x),(x); +return 10; +end| +do fn1(100); +Warnings: +Error 1062 Duplicate entry '100' for key 'a' +select fn1(20); +ERROR 23000: Duplicate entry '20' for key 'a' +select * from t2; +a +20 +100 +select * from t2; +a +20 +100 +create trigger trg before insert on t1 for each row set new.a= 10; +ERROR 42000: TRIGGER command denied to user 'zedjzlcsjhd'@'localhost' for table 't1' +delete from t1; +create trigger trg before insert on t1 for each row set new.a= 10; +insert into t1 values (1); +select * from t1; +a +10 +select * from t1; +a +10 +delete from t1; +drop trigger trg; +insert into t1 values (1); +select * from t1; +a +1 +select * from t1; +a +1 +create procedure foo() +not deterministic +reads sql data +select * from t1; +call foo(); +a +1 +drop procedure foo; +drop function fn1; +drop database mysqltest1; +drop user "zedjzlcsjhd"@127.0.0.1; +use test; +use test; +drop function if exists f1; +create function f1() returns int reads sql data +begin +declare var integer; +declare c cursor for select a from v1; +open c; +fetch c into var; +close c; +return var; +end| +create view v1 as select 1 as a; +create table t1 (a int); +insert into t1 (a) values (f1()); +select * from t1; +a +1 +drop view v1; +drop function f1; +select * from t1; +a +1 +DROP PROCEDURE IF EXISTS p1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(col VARCHAR(10)); +CREATE PROCEDURE p1(arg VARCHAR(10)) +INSERT INTO t1 VALUES(arg); +CALL p1('test'); +SELECT * FROM t1; +col +test +SELECT * FROM t1; +col +test +DROP PROCEDURE p1; + +---> Test for BUG#20438 + +---> Preparing environment... +---> connection: master +DROP PROCEDURE IF EXISTS p1; +DROP FUNCTION IF EXISTS f1; + +---> Synchronizing slave with master... + +---> connection: master + +---> Creating procedure... +/*!50003 CREATE PROCEDURE p1() SET @a = 1 */; +/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */; + +---> Checking on master... +SHOW CREATE PROCEDURE p1; +Procedure sql_mode Create Procedure +p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +SET @a = 1 +SHOW CREATE FUNCTION f1; +Function sql_mode Create Function +f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) +RETURN 0 + +---> Synchronizing slave with master... +---> connection: master + +---> Checking on slave... +SHOW CREATE PROCEDURE p1; +Procedure sql_mode Create Procedure +p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +SET @a = 1 +SHOW CREATE FUNCTION f1; +Function sql_mode Create Function +f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) +RETURN 0 + +---> connection: master + +---> Cleaning up... +DROP PROCEDURE p1; +DROP FUNCTION f1; +drop table t1; +drop database if exists mysqltest; +drop database if exists mysqltest2; +create database mysqltest; +create database mysqltest2; +use mysqltest2; +create table t ( t integer ); +create procedure mysqltest.test() begin end; +insert into t values ( 1 ); +create procedure `\\`.test() begin end; +ERROR 42000: Unknown database '\\' +create function f1 () returns int +begin +insert into t values (1); +return 0; +end| +use mysqltest; +set @a:= mysqltest2.f1(); +show binlog events in 'master-bin.000001' from 106; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # drop database if exists mysqltest1 +master-bin.000001 # Query 1 # create database mysqltest1 +master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a varchar(100)) +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() +begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values ( NAME_CONST('b',8)) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (unix_timestamp()) +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2() +select * from mysqltest1.t1 +master-bin.000001 # Query 1 # use `mysqltest1`; alter procedure foo2 contains sql +master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1 +master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int) +master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 like t1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo3() +deterministic +insert into t1 values (15) +master-bin.000001 # Query 1 # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` procedure foo4() +deterministic +begin +insert into t2 values(3); +insert into t1 values (5); +end +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (15) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query 1 # use `mysqltest1`; alter procedure foo4 sql security invoker +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (5) +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t2 +master-bin.000001 # Query 1 # use `mysqltest1`; alter table t2 add unique (a) +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo4 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4() +deterministic +begin +insert into t2 values(20),(20); +end +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(20),(20) +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo4 +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo2 +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo3 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1(x int) +returns int +deterministic +begin +insert into t1 values (x); +return x+2; +end +master-bin.000001 # Query 1 # use `mysqltest1`; delete t1,t2 from t1,t2 +master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(fn1(21)) +master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1() +returns int +no sql +begin +return unix_timestamp(); +end +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(fn1()) +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` function fn2() +returns int +no sql +begin +return unix_timestamp(); +end +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn3() +returns int +not deterministic +reads sql data +begin +return 0; +end +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t2 +master-bin.000001 # Query 1 # use `mysqltest1`; alter table t2 add unique (a) +master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1(x int) +returns int +begin +insert into t2 values(x),(x); +return 10; +end +master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(100) +master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20) +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10 +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1) +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; drop trigger trg +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1) +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() +not deterministic +reads sql data +select * from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo +master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 +master-bin.000001 # Query 1 # drop database mysqltest1 +master-bin.000001 # Query 1 # drop user "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` function f1() returns int reads sql data +begin +declare var integer; +declare c cursor for select a from v1; +open c; +fetch c into var; +close c; +return var; +end +master-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 as a +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t1 (a) values (f1()) +master-bin.000001 # Query 1 # use `test`; drop view v1 +master-bin.000001 # Query 1 # use `test`; drop function f1 +master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1 +master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(col VARCHAR(10)) +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1(arg VARCHAR(10)) +INSERT INTO t1 VALUES(arg) +master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test')) +master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1 +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1() SET @a = 1 +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION f1() RETURNS INT RETURN 0 +master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1 +master-bin.000001 # Query 1 # use `test`; DROP FUNCTION f1 +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # drop database if exists mysqltest +master-bin.000001 # Query 1 # drop database if exists mysqltest2 +master-bin.000001 # Query 1 # create database mysqltest +master-bin.000001 # Query 1 # create database mysqltest2 +master-bin.000001 # Query 1 # use `mysqltest2`; create table t ( t integer ) +master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` procedure mysqltest.test() begin end +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t values ( 1 ) +master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` function f1 () returns int +begin +insert into t values (1); +return 0; +end +master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`() +set global log_bin_trust_function_creators=0; +set global log_bin_trust_function_creators=0; +drop database mysqltest; +drop database mysqltest2; +End of 5.0 tests +End of 5.1 tests diff --git a/mysql-test/suite/rpl/r/rpl_sp004.result b/mysql-test/suite/rpl/r/rpl_sp004.result new file mode 100644 index 00000000000..1c0ed3cc50a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sp004.result @@ -0,0 +1,93 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t3; +CREATE PROCEDURE test.p1() +BEGIN +CREATE TABLE IF NOT EXISTS test.t1(a INT,PRIMARY KEY(a)); +CREATE TABLE IF NOT EXISTS test.t2(a INT,PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES (4),(2),(1),(3); +UPDATE test.t1 SET a=a+4 WHERE a=4; +INSERT INTO test.t2 (a) SELECT t1.a FROM test.t1; +UPDATE test.t1 SET a=a+4 WHERE a=8; +CREATE TABLE IF NOT EXISTS test.t3(n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); +END| +CREATE PROCEDURE test.p2() +BEGIN +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +INSERT INTO test.t3 VALUES(NULL,11111111.233333,NOW()); +END| +CALL test.p1(); +SELECT * FROM test.t1 ORDER BY a; +a +1 +2 +3 +12 +SELECT * FROM test.t2 ORDER BY a; +a +1 +2 +3 +8 +SELECT * FROM test.t1 ORDER BY a; +a +1 +2 +3 +12 +SELECT * FROM test.t2 ORDER BY a; +a +1 +2 +3 +8 +CALL test.p2(); +USE test; +SHOW TABLES; +Tables_in_test +t3 +USE test; +SHOW TABLES; +Tables_in_test +t3 +CALL test.p1(); +Warnings: +Note 1050 Table 't3' already exists +SELECT * FROM test.t1 ORDER BY a; +a +1 +2 +3 +12 +SELECT * FROM test.t2 ORDER BY a; +a +1 +2 +3 +8 +SELECT * FROM test.t1 ORDER BY a; +a +1 +2 +3 +12 +SELECT * FROM test.t2 ORDER BY a; +a +1 +2 +3 +8 +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; diff --git a/mysql-test/suite/rpl/r/rpl_sp_effects.result b/mysql-test/suite/rpl/r/rpl_sp_effects.result new file mode 100644 index 00000000000..c2c44b06972 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sp_effects.result @@ -0,0 +1,238 @@ +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; +drop procedure if exists p1; +drop procedure if exists p2; +drop function if exists f1; +drop table if exists t1,t2; +drop view if exists v1; +create table t1 (a int); +SET GLOBAL log_bin_trust_function_creators = 1; +create procedure p1() +begin +declare spv int default 0; +while spv < 5 do +insert into t1 values(spv+1); +set spv=spv+1; +end while; +end// +call p1(); +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +5 +create procedure p2() +begin +declare a int default 4; +create table t2 as select a; +end// +call p2(); +SELECT * FROM t2 ORDER BY a; +a +4 +SELECT * FROM t2 ORDER BY a; +a +4 +drop procedure p1; +drop procedure p2; +drop table t2; +create function f1(x int) returns int +begin +insert into t1 values(x); +return x+1; +end// +create procedure p1(a int, b int) +begin +declare v int default f1(5); +if (f1(6)) then +select 'yes'; +end if; +set v = f1(7); +while f1(8) < 1 do +select 'this cant be'; +end while; +end// +call p1(f1(1), f1(2)); +yes +yes +SELECT * FROM t1 ORDER BY a; +a +1 +1 +2 +2 +3 +4 +5 +5 +6 +7 +8 +create table t2(a int); +insert into t2 values (10),(11); +SELECT a,f1(a) FROM t2 ORDER BY a; +a f1(a) +10 11 +11 12 +insert into t2 select f1(3); +SELECT 'master:',a FROM t1 ORDER BY a; +master: a +master: 1 +master: 1 +master: 2 +master: 2 +master: 3 +master: 3 +master: 4 +master: 5 +master: 5 +master: 6 +master: 7 +master: 8 +master: 10 +master: 11 +SELECT 'slave:',a FROM t1 ORDER BY a; +slave: a +slave: 1 +slave: 1 +slave: 2 +slave: 2 +slave: 3 +slave: 3 +slave: 4 +slave: 5 +slave: 5 +slave: 6 +slave: 7 +slave: 8 +slave: 10 +slave: 11 +drop procedure p1; +delete from t1; +delete from t2; +delete from t1; +insert into t2 values(1),(2); +create view v1 as select f1(a) as f from t2; +select * from v1 order by f; +f +2 +3 +SELECT 'master:',a FROM t1 ORDER BY a; +master: a +master: 1 +master: 2 +SELECT 'slave:',a FROM t1 ORDER BY a; +slave: a +slave: 1 +slave: 2 +drop view v1; +delete from t1; +prepare s1 from 'select f1(?)'; +set @xx=123; +execute s1 using @xx; +f1(?) +124 +SELECT 'master:',a FROM t1 ORDER BY a; +master: a +master: 123 +SELECT 'slave:',a FROM t1 ORDER BY a; +slave: a +slave: 123 +delete from t1; +create procedure p1(spv int) +begin +declare c cursor for select f1(spv) from t2; +while (spv > 2) do +open c; +fetch c into spv; +close c; +set spv= spv - 10; +end while; +end// +call p1(15); +SELECT 'master:',a FROM t1 ORDER BY a; +master: a +master: 6 +master: 6 +master: 15 +master: 15 +SELECT 'slave:',a FROM t1 ORDER BY a; +slave: a +slave: 6 +slave: 6 +slave: 15 +slave: 15 +drop procedure p1; +drop function f1; +drop table t1,t2; +create table t1 (a int); +create procedure p1() +begin +insert into t1 values(@x); +set @x=@x+1; +insert into t1 values(@x); +if (f2()) then +insert into t1 values(1243); +end if; +end// +create function f2() returns int +begin +insert into t1 values(@z); +set @z=@z+1; +insert into t1 values(@z); +return 0; +end// +create function f1() returns int +begin +insert into t1 values(@y); +call p1(); +return 0; +end// +set @x=10; +set @y=20; +set @z=100; +select f1(); +f1() +0 +set @x=30; +call p1(); +SELECT 'master', a FROM t1 ORDER BY a; +master a +master 10 +master 11 +master 20 +master 30 +master 31 +master 100 +master 101 +master 101 +master 102 +SELECT 'slave', a FROM t1 ORDER BY a; +slave a +slave 10 +slave 11 +slave 20 +slave 30 +slave 31 +slave 100 +slave 101 +slave 101 +slave 102 +drop table t1; +drop function f1; +drop function f2; +drop procedure p1; +SET GLOBAL log_bin_trust_function_creators = 0; diff --git a/mysql-test/suite/rpl/r/rpl_sporadic_master.result b/mysql-test/suite/rpl/r/rpl_sporadic_master.result new file mode 100644 index 00000000000..14fb673a081 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sporadic_master.result @@ -0,0 +1,26 @@ +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; +create table t2(n int); +create table t1(n int not null auto_increment primary key); +insert into t1 values (NULL),(NULL); +truncate table t1; +insert into t1 values (4),(NULL); +stop slave; +start slave; +insert into t1 values (NULL),(NULL); +flush logs; +truncate table t1; +insert into t1 values (10),(NULL),(NULL),(NULL),(NULL),(NULL); +select * from t1 ORDER BY n; +n +10 +11 +12 +13 +14 +15 +drop table t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_ssl.result b/mysql-test/suite/rpl/r/rpl_ssl.result new file mode 100644 index 00000000000..64d52d63f78 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ssl.result @@ -0,0 +1,99 @@ +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; +grant replication slave on *.* to replssl@localhost require ssl; +create table t1 (t int auto_increment, KEY(t)); +stop slave; +change master to +master_user='replssl', +master_password='', +master_ssl=1, +master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', +master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', +master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem'; +start slave; +insert into t1 values(1); +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User replssl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +STOP SLAVE; +select * from t1; +t +1 +insert into t1 values (NULL); +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User replssl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +drop user replssl@localhost; +drop table t1; +End of 5.0 tests diff --git a/mysql-test/suite/rpl/r/rpl_ssl1.result b/mysql-test/suite/rpl/r/rpl_ssl1.result new file mode 100644 index 00000000000..6bc4b53849f --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_ssl1.result @@ -0,0 +1,146 @@ +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; +grant replication slave on *.* to replssl@localhost require ssl; +create table t1 (t int); +stop slave; +change master to master_user='replssl',master_password=''; +start slave; +insert into t1 values (1); +select * from t1; +t +stop slave; +change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem'; +start slave; +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User replssl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +stop slave; +change master to master_user='root',master_password='', master_ssl=0; +start slave; +drop user replssl@localhost; +drop table t1; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +stop slave; +change master to +master_host="localhost", +master_ssl=1 , +master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', +master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', +master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem', +master_ssl_verify_server_cert=1; +start slave; +create table t1 (t int); +insert into t1 values (1); +on slave +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host localhost +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert Yes +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result new file mode 100644 index 00000000000..1fcb586d1fb --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result @@ -0,0 +1,12 @@ +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; +stop slave; +create table t1(n int); +start slave; +stop slave io_thread; +start slave io_thread; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result new file mode 100644 index 00000000000..3b4cd05f640 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result @@ -0,0 +1,82 @@ +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; +create table t1 (word char(20) not null); +load data infile '../std_data_ln/words.dat' into table t1; +load data local infile 'MYSQL_TEST_DIR/std_data/words.dat' into table t1; +select * from t1 limit 10; +word +Aarhus +Aaron +Ababa +aback +abaft +abandon +abandoned +abandoning +abandonment +abandons +stop slave; +set password for root@"localhost" = password('foo'); +start slave; +set password for root@"localhost" = password(''); +create table t3(n int); +insert into t3 values(1),(2); +select * from t3; +n +1 +2 +select sum(length(word)) from t1; +sum(length(word)) +1022 +drop table t1,t3; +create table t1 (n int) engine=myisam; +reset master; +stop slave; +reset slave; +lock tables t1 read; +start slave; +unlock tables; +create table t2(id int); +insert into t2 values(connection_id()); +create temporary table t3(n int); +insert into t3 select get_lock('crash_lock%20C', 1) from t2; +update t1 set n = n + get_lock('crash_lock%20C', 2); +select (@id := id) - id from t2; +(@id := id) - id +0 +kill @id; +drop table t2; +Got one of the listed errors +set global sql_slave_skip_counter=1; +start slave; +select count(*) from t1; +count(*) +5000 +drop table t1; +create table t1 (n int); +insert into t1 values(3456); +insert into mysql.user (Host, User, Password) +VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); +Warnings: +Warning 1364 Field 'ssl_cipher' doesn't have a default value +Warning 1364 Field 'x509_issuer' doesn't have a default value +Warning 1364 Field 'x509_subject' doesn't have a default value +select select_priv,user from mysql.user where user = _binary'blafasel2'; +select_priv user +N blafasel2 +update mysql.user set Select_priv = "Y" where User= _binary"blafasel2"; +select select_priv,user from mysql.user where user = _binary'blafasel2'; +select_priv user +Y blafasel2 +select n from t1; +n +3456 +select select_priv,user from mysql.user where user = _binary'blafasel2'; +select_priv user +Y blafasel2 +drop table t1; +delete from mysql.user where user="blafasel2"; diff --git a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result new file mode 100644 index 00000000000..13aa45d8ced --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result @@ -0,0 +1,13 @@ +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; +create table t1 (a int, unique(a)) engine=myisam; +set sql_log_bin=0; +insert into t1 values(2); +set sql_log_bin=1; +insert into t1 values(1),(2); +ERROR 23000: Duplicate entry '2' for key 'a' +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_charset.result b/mysql-test/suite/rpl/r/rpl_stm_charset.result new file mode 100644 index 00000000000..fd9c40843d5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_charset.result @@ -0,0 +1,270 @@ +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 timestamp=1000000000; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +create database mysqltest2 character set latin2; +set @@character_set_server=latin5; +create database mysqltest3; + +--- --master-- +show create database mysqltest2; +Database Create Database +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ + +--- --slave-- +show create database mysqltest2; +Database Create Database +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ +set @@collation_server=armscii8_bin; +drop database mysqltest3; +create database mysqltest3; + +--- --master-- +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ + +--- --slave-- +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ +use mysqltest2; +create table t1 (a int auto_increment primary key, b varchar(100)); +set character_set_client=cp850, collation_connection=latin2_croatian_ci; +insert into t1 (b) values(@@character_set_server); +insert into t1 (b) values(@@collation_server); +insert into t1 (b) values(@@character_set_client); +insert into t1 (b) values(@@character_set_connection); +insert into t1 (b) values(@@collation_connection); + +--- --master-- +select * from t1 order by a; +a b +1 armscii8 +2 armscii8_bin +3 cp850 +4 latin2 +5 latin2_croatian_ci + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 armscii8 +2 armscii8_bin +3 cp850 +4 latin2 +5 latin2_croatian_ci +set character_set_client=latin1, collation_connection=latin1_german1_ci; +truncate table t1; +insert into t1 (b) values(@@collation_connection); +insert into t1 (b) values(LEAST("Müller","Muffler")); +set collation_connection=latin1_german2_ci; +insert into t1 (b) values(@@collation_connection); +insert into t1 (b) values(LEAST("Müller","Muffler")); + +--- --master-- +select * from t1 order by a; +a b +1 latin1_german1_ci +2 Muffler +3 latin1_german2_ci +4 Müller + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 latin1_german1_ci +2 Muffler +3 latin1_german2_ci +4 Müller +set @a= _cp850 'Müller' collate cp850_general_ci; +truncate table t1; +insert into t1 (b) values(collation(@a)); + +--- --master-- +select * from t1 order by a; +a b +1 cp850_general_ci + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 cp850_general_ci +drop database mysqltest2; +drop database mysqltest3; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest2 +master-bin.000001 # Query # # drop database if exists mysqltest3 +master-bin.000001 # Query # # create database mysqltest2 character set latin2 +master-bin.000001 # Query # # create database mysqltest3 +master-bin.000001 # Query # # drop database mysqltest3 +master-bin.000001 # Query # # create database mysqltest3 +master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) +master-bin.000001 # Intvar # # INSERT_ID=1 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@character_set_server) +master-bin.000001 # Intvar # # INSERT_ID=2 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_server) +master-bin.000001 # Intvar # # INSERT_ID=3 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@character_set_client) +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@character_set_connection) +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 +master-bin.000001 # Intvar # # INSERT_ID=1 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 # Intvar # # INSERT_ID=2 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) +master-bin.000001 # Intvar # # INSERT_ID=3 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) +master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 +master-bin.000001 # Intvar # # INSERT_ID=1 +master-bin.000001 # User var # # @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci +master-bin.000001 # Query # # use `mysqltest2`; insert into t1 (b) values(collation(@a)) +master-bin.000001 # Query # # drop database mysqltest2 +master-bin.000001 # Query # # drop database mysqltest3 +set global character_set_server=latin2; +set global character_set_server=latin1; +set global character_set_server=latin2; +set global character_set_server=latin1; +set one_shot @@character_set_server=latin5; +set @@max_join_size=1000; +select @@character_set_server; +@@character_set_server +latin5 +select @@character_set_server; +@@character_set_server +latin1 +set @@character_set_server=latin5; +select @@character_set_server; +@@character_set_server +latin5 +select @@character_set_server; +@@character_set_server +latin5 +set one_shot max_join_size=10; +ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server +set character_set_client=9999999; +ERROR 42000: Unknown character set: '9999999' +set collation_server=9999998; +ERROR HY000: Unknown collation: '9999998' +use test; +CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); +SET CHARACTER_SET_CLIENT=koi8r, +CHARACTER_SET_CONNECTION=cp1251, +CHARACTER_SET_RESULTS=koi8r; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); +select hex(c1), hex(c2) from t1; +hex(c1) hex(c2) +CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +select hex(c1), hex(c2) from t1; +hex(c1) hex(c2) +CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +flush logs; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +drop database if exists mysqltest2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +drop database if exists mysqltest3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create database mysqltest2 character set latin2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/; +create database mysqltest3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64/*!*/; +drop database mysqltest3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create database mysqltest3/*!*/; +use mysqltest2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create table t1 (a int auto_increment primary key, b varchar(100))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C cp850 *//*!*/; +SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64/*!*/; +insert into t1 (b) values(@@character_set_server)/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@collation_server)/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@character_set_client)/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@character_set_connection)/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@collation_connection)/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64/*!*/; +truncate table t1/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@collation_connection)/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64/*!*/; +insert into t1 (b) values(@@collation_connection)/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +truncate table t1/*!*/; +SET INSERT_ID=1/*!*/; +SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(collation(@a))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +drop database mysqltest2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +drop database mysqltest3/*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/; +CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C koi8r *//*!*/; +SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30/*!*/; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ')/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +drop table t1; +create table `t1` ( +`pk` varchar(10) not null default '', +primary key (`pk`) +) engine=myisam default charset=latin1; +set @p=_latin1 'test'; +update t1 set pk='test' where pk=@p; +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result new file mode 100644 index 00000000000..1c6b5615b6e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result @@ -0,0 +1,33 @@ +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; +create table t1 (a int); +insert into t1 values (10); +create table t2 (a int); +create table t3 (a int) engine=merge union(t1); +create table t4 (a int); +insert into t4 select * from t3; +rename table t1 to t5, t2 to t1; +flush no_write_to_binlog tables; +SHOW BINLOG EVENTS FROM 656 ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 +select * from t3; +a +flush tables; +SHOW BINLOG EVENTS FROM 656 ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 # Query 1 # use `test`; flush tables +select * from t3; +a +stop slave; +drop table t1; +flush tables with read lock; +start slave; +stop slave; +ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +drop table t3, t4, t5; diff --git a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result new file mode 100644 index 00000000000..1c003856eb9 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result @@ -0,0 +1,88 @@ +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 @old_global_binlog_format = @@global.binlog_format; +set @@global.binlog_format = statement; +CREATE SCHEMA IF NOT EXISTS mysqlslap; +USE mysqlslap; +select @@global.binlog_format; +@@global.binlog_format +STATEMENT +CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); +FLUSH TABLE t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +use mysqlslap; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +truncate table t1; +insert delayed into t1 values(10, "my name"); +insert delayed into t1 values(10, "is Bond"), (20, "James Bond"); +ERROR 23000: Duplicate entry '10' for key 'PRIMARY' +flush table t1; +select * from t1; +id name +10 my name +select * from t1; +id name +10 my name +delete from t1 where id!=10; +insert delayed into t1 values(20, "is Bond"), (10, "James Bond"); +ERROR 23000: Duplicate entry '10' for key 'PRIMARY' +flush table t1; +select * from t1; +id name +10 my name +20 is Bond +select * from t1; +id name +10 my name +20 is Bond +USE test; +DROP SCHEMA mysqlslap; +set @@global.binlog_format = mixed; +CREATE SCHEMA IF NOT EXISTS mysqlslap; +USE mysqlslap; +select @@global.binlog_format; +@@global.binlog_format +MIXED +CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64)); +FLUSH TABLE t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +use mysqlslap; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +truncate table t1; +insert delayed into t1 values(10, "my name"); +insert delayed into t1 values(10, "is Bond"), (20, "James Bond"); +flush table t1; +select * from t1; +id name +10 my name +20 James Bond +select * from t1; +id name +10 my name +20 James Bond +delete from t1 where id!=10; +insert delayed into t1 values(20, "is Bond"), (10, "James Bond"); +flush table t1; +select * from t1; +id name +10 my name +20 is Bond +select * from t1; +id name +10 my name +20 is Bond +USE test; +DROP SCHEMA mysqlslap; +set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result new file mode 100644 index 00000000000..3ee2d990159 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -0,0 +1,115 @@ +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; +stop slave; +reset master; +reset slave; +reset master; +create table t1(n int not null auto_increment primary key)ENGINE=MyISAM; +insert into t1 values (NULL); +drop table t1; +create table t1 (word char(20) not null)ENGINE=MyISAM; +load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; +select count(*) from t1; +count(*) +69 +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Intvar 1 # INSERT_ID=1 +master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581 +master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1 +show binlog events from 106 limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +show binlog events from 106 limit 2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Intvar 1 # INSERT_ID=1 +show binlog events from 106 limit 2,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) +flush logs; +create table t3 (a int)ENGINE=MyISAM; +start slave; + +let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; + +--source include/wait_slave_status.inc +flush logs; +stop slave; +create table t2 (n int)ENGINE=MyISAM; +insert into t2 values (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Intvar # # INSERT_ID=1 +master-bin.000001 # Query # # use `test`; insert into t1 values (NULL) +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +master-bin.000001 # Begin_load_query # # ;file_id=1;block_len=581 +master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1 +master-bin.000001 # Rotate # # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002'; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM +master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM +master-bin.000002 # Query 1 # use `test`; insert into t2 values (1) +show binary logs; +Log_name File_size +master-bin.000001 1347 +master-bin.000002 392 +start slave; +show binary logs; +Log_name File_size +slave-bin.000001 1447 +slave-bin.000002 293 +show binlog events in 'slave-bin.000001' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +slave-bin.000001 # Intvar 1 # INSERT_ID=1 +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL) +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +slave-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581 +slave-bin.000001 # Execute_load_query 1 # use `test`; load data INFILE '../tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1 +slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM +slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 +show binlog events in 'slave-bin.000002' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM +slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1) +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 392 # # master-bin.000002 Yes Yes # 0 0 392 # None 0 No # No +show binlog events in 'slave-bin.000005' from 4; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +create table t1(a int auto_increment primary key, b int); +insert into t1 values (NULL, 1); +reset master; +set insert_id=5; +insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Intvar # # LAST_INSERT_ID=1 +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `test`; insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()) +select * from t1; +a b +1 1 +5 1 +6 1 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result new file mode 100644 index 00000000000..c2e57be6ad4 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result @@ -0,0 +1,279 @@ +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; +stop slave; +# +# Generate a big enough master's binlog to cause relay log rotations +# +create table t1 (a int); +drop table t1; +reset slave; +# +# Test 1 +# +set @my_max_binlog_size= @@global.max_binlog_size; +set global max_binlog_size=8192; +set global max_relay_log_size=8192-1; +select @@global.max_relay_log_size; +@@global.max_relay_log_size +4096 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 72960 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 72960 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 2 +# +stop slave; +reset slave; +set global max_relay_log_size=(5*4096); +select @@global.max_relay_log_size; +@@global.max_relay_log_size 20480 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 72960 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 72960 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 3: max_relay_log_size = 0 +# +stop slave; +reset slave; +set global max_relay_log_size=0; +select @@global.max_relay_log_size; +@@global.max_relay_log_size 0 +start slave; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 72960 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 72960 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions +# +stop slave; +reset slave; +flush logs; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File +Read_Master_Log_Pos 4 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File +Slave_IO_Running No +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 0 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 5 +# +reset slave; +start slave; +flush logs; +create table t1 (a int); +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 73046 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 73046 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +# +# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated +# +flush logs; +drop table t1; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 73122 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 73122 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +flush logs; +show master status; +File master-bin.000002 +Position 106 +Binlog_Do_DB +Binlog_Ignore_DB +set global max_binlog_size= @my_max_binlog_size; +# +# End of 4.1 tests +# diff --git a/mysql-test/suite/rpl/r/rpl_stm_multi_query.result b/mysql-test/suite/rpl/r/rpl_stm_multi_query.result new file mode 100644 index 00000000000..625c686f383 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_multi_query.result @@ -0,0 +1,32 @@ +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; +drop database if exists mysqltest; +create database mysqltest; +create table mysqltest.t1 ( n int); +insert into mysqltest.t1 values(1)/ +insert into mysqltest.t1 values(2); +insert into mysqltest.t1 values(3); +insert into mysqltest.t1 values(4); +insert into mysqltest.t1 values(5)/ +select * from mysqltest.t1; +n +1 +2 +3 +4 +5 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest +master-bin.000001 # Query # # create database mysqltest +master-bin.000001 # Query # # use `test`; create table mysqltest.t1 ( n int) +master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(1) +master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(2) +master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(3) +master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(4) +master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(5) +drop database mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_stm_mystery22.result b/mysql-test/suite/rpl/r/rpl_stm_mystery22.result new file mode 100644 index 00000000000..ea34b308ec2 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_mystery22.result @@ -0,0 +1,31 @@ +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; +create table t1(n int auto_increment primary key, s char(10)); +insert into t1 values (2,'old'); +insert into t1 values(NULL,'new'); +insert into t1 values(NULL,'new'); +select * from t1 order by n; +n s +1 new +2 old +delete from t1 where n = 2; +start slave; +stop slave; +create table t2(n int); +drop table t2; +insert into t1 values(NULL,'new'); +set sql_log_bin=0; +insert into t1 values(NULL,'new'); +set sql_log_bin=1; +delete from t1 where n=4; +start slave; +select * from t1 order by n; +n s +1 new +2 new +3 new +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_no_op.result b/mysql-test/suite/rpl/r/rpl_stm_no_op.result new file mode 100644 index 00000000000..5a253d61fcb --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_no_op.result @@ -0,0 +1,52 @@ +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; +create database mysqltest; +drop database if exists mysqltest; +Warnings: +Note 1008 Can't drop database 'mysqltest'; database doesn't exist +show tables from mysqltest; +ERROR 42000: Unknown database 'mysqltest' +create table t1 (a int); +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +select * from t1; +ERROR 42S02: Table 'test.t1' doesn't exist +create table t1 (a int, b int); +insert into t1 values(1,1); +delete from t1; +select * from t1; +a b +insert into t1 values(1,1); +insert into t1 values(2,1); +update t1 set a=2; +select * from t1; +a b +2 1 +2 1 +create table t2 (a int, b int); +delete from t1; +insert into t1 values(1,1); +insert into t2 values(1,1); +update t1 set a=2; +UPDATE t1, t2 SET t1.a = t2.a; +select * from t1; +a b +1 1 +select * from t2; +a b +1 1 +delete from t1; +delete from t2; +insert into t1 values(1,1); +insert into t2 values(1,1); +DELETE t1.*, t2.* from t1, t2; +select * from t1; +a b +select * from t2; +a b +drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result new file mode 100644 index 00000000000..e134629d597 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result @@ -0,0 +1,32 @@ +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; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No +stop slave; +change master to master_user='test'; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No # 0 0 106 # None 0 No # No +reset slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No +start slave; +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes # 0 0 106 # None 0 No # No +stop slave; +reset slave; +start slave; +create temporary table t1 (a int); +stop slave; +reset slave; +start slave; +show status like 'slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 1 diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result new file mode 100644 index 00000000000..ffe6216a42b --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_until.result @@ -0,0 +1,190 @@ +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; +stop slave; +create table t1(n int not null auto_increment primary key); +insert into t1 values (1),(2),(3),(4); +drop table t1; +create table t2(n int not null auto_increment primary key); +insert into t2 values (1),(2); +insert into t2 values (3),(4); +drop table t2; +start slave until master_log_file='master-bin.000001', master_log_pos=323; +select * from t1; +n +1 +2 +3 +4 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 784 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 327 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 323 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; +select * from t1; +n +1 +2 +3 +4 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 784 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 327 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-no-such-bin.000001 +Until_Log_Pos 291 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; +select * from t2; +n +1 +2 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 784 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running # +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 616 +Relay_Log_Space # +Until_Condition Relay +Until_Log_File slave-relay-bin.000004 +Until_Log_Pos 746 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave; +stop slave; +start slave until master_log_file='master-bin.000001', master_log_pos=776; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 784 +Relay_Log_File slave-relay-bin.000004 +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 784 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 776 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +start slave until master_log_file='master-bin', master_log_pos=561; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until master_log_file='master-bin.000001'; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until relay_log_file='slave-relay-bin.000002'; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL +start slave sql_thread; +start slave until master_log_file='master-bin.000001', master_log_pos=776; +Warnings: +Note 1254 Slave is already running diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result new file mode 100644 index 00000000000..7c796bd5449 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result @@ -0,0 +1,1017 @@ +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; +drop database if exists mysqltest1; +create database mysqltest1; +use mysqltest1; +set @my_binlog_format= @@global.binlog_format; +set session binlog_format=mixed; +show session variables like "binlog_format%"; +Variable_name Value +binlog_format MIXED +set session binlog_format=statement; +show session variables like "binlog_format%"; +Variable_name Value +binlog_format STATEMENT +set session binlog_format=row; +show session variables like "binlog_format%"; +Variable_name Value +binlog_format ROW +set global binlog_format=DEFAULT; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format MIXED +set global binlog_format=MIXED; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format MIXED +set global binlog_format=STATEMENT; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format STATEMENT +set global binlog_format=ROW; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format ROW +show session variables like "binlog_format%"; +Variable_name Value +binlog_format ROW +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +ROW ROW +CREATE TABLE t1 (a varchar(100)); +prepare stmt1 from 'insert into t1 select concat(UUID(),?)'; +set @string="emergency_1_"; +insert into t1 values("work_2_"); +execute stmt1 using @string; +deallocate prepare stmt1; +prepare stmt1 from 'insert into t1 select ?'; +insert into t1 values(concat(UUID(),"work_3_")); +execute stmt1 using @string; +deallocate prepare stmt1; +insert into t1 values(concat("for_4_",UUID())); +insert into t1 select "yesterday_5_"; +create temporary table tmp(a char(100)); +insert into tmp values("see_6_"); +set binlog_format=statement; +ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables +insert into t1 select * from tmp; +drop temporary table tmp; +set binlog_format=statement; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format ROW +show session variables like "binlog_format%"; +Variable_name Value +binlog_format STATEMENT +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +ROW STATEMENT +set global binlog_format=statement; +show global variables like "binlog_format%"; +Variable_name Value +binlog_format STATEMENT +show session variables like "binlog_format%"; +Variable_name Value +binlog_format STATEMENT +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +STATEMENT STATEMENT +prepare stmt1 from 'insert into t1 select ?'; +set @string="emergency_7_"; +insert into t1 values("work_8_"); +execute stmt1 using @string; +deallocate prepare stmt1; +prepare stmt1 from 'insert into t1 select ?'; +insert into t1 values("work_9_"); +execute stmt1 using @string; +deallocate prepare stmt1; +insert into t1 values("for_10_"); +insert into t1 select "yesterday_11_"; +set binlog_format=statement; +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +STATEMENT STATEMENT +set global binlog_format=statement; +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +STATEMENT STATEMENT +prepare stmt1 from 'insert into t1 select ?'; +set @string="emergency_12_"; +insert into t1 values("work_13_"); +execute stmt1 using @string; +deallocate prepare stmt1; +prepare stmt1 from 'insert into t1 select ?'; +insert into t1 values("work_14_"); +execute stmt1 using @string; +deallocate prepare stmt1; +insert into t1 values("for_15_"); +insert into t1 select "yesterday_16_"; +set global binlog_format=mixed; +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +MIXED STATEMENT +set binlog_format=default; +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format @@session.binlog_format +MIXED MIXED +prepare stmt1 from 'insert into t1 select concat(UUID(),?)'; +set @string="emergency_17_"; +insert into t1 values("work_18_"); +execute stmt1 using @string; +deallocate prepare stmt1; +prepare stmt1 from 'insert into t1 select ?'; +insert into t1 values(concat(UUID(),"work_19_")); +execute stmt1 using @string; +deallocate prepare stmt1; +insert into t1 values(concat("for_20_",UUID())); +insert into t1 select "yesterday_21_"; +prepare stmt1 from 'insert into t1 select ?'; +insert into t1 values(concat(UUID(),"work_22_")); +execute stmt1 using @string; +deallocate prepare stmt1; +insert into t1 values(concat("for_23_",UUID())); +insert into t1 select "yesterday_24_"; +create table t2 select rpad(UUID(),100,' '); +create table t3 select 1 union select UUID(); +create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3); +create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); +insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); +create procedure foo() +begin +insert into t1 values("work_25_"); +insert into t1 values(concat("for_26_",UUID())); +insert into t1 select "yesterday_27_"; +end| +create procedure foo2() +begin +insert into t1 values(concat("emergency_28_",UUID())); +insert into t1 values("work_29_"); +insert into t1 values(concat("for_30_",UUID())); +set session binlog_format=row; # accepted for stored procs +insert into t1 values("more work_31_"); +set session binlog_format=mixed; +end| +create function foo3() returns bigint unsigned +begin +set session binlog_format=row; # rejected for stored funcs +insert into t1 values("alarm"); +return 100; +end| +create procedure foo4(x varchar(100)) +begin +insert into t1 values(concat("work_250_",x)); +insert into t1 select "yesterday_270_"; +end| +call foo(); +call foo2(); +call foo4("hello"); +call foo4(UUID()); +call foo4("world"); +select foo3(); +ERROR HY000: Cannot change the binary logging format inside a stored function or trigger +select * from t1 where a="alarm"; +a +drop function foo3; +create function foo3() returns bigint unsigned +begin +insert into t1 values("foo3_32_"); +call foo(); +return 100; +end| +insert into t2 select foo3(); +prepare stmt1 from 'insert into t2 select foo3()'; +execute stmt1; +execute stmt1; +deallocate prepare stmt1; +create function foo4() returns bigint unsigned +begin +insert into t2 select foo3(); +return 100; +end| +select foo4(); +foo4() +100 +prepare stmt1 from 'select foo4()'; +execute stmt1; +foo4() +100 +execute stmt1; +foo4() +100 +deallocate prepare stmt1; +create function foo5() returns bigint unsigned +begin +insert into t2 select UUID(); +return 100; +end| +select foo5(); +foo5() +100 +prepare stmt1 from 'select foo5()'; +execute stmt1; +foo5() +100 +execute stmt1; +foo5() +100 +deallocate prepare stmt1; +create function foo6(x varchar(100)) returns bigint unsigned +begin +insert into t2 select x; +return 100; +end| +select foo6("foo6_1_"); +foo6("foo6_1_") +100 +select foo6(concat("foo6_2_",UUID())); +foo6(concat("foo6_2_",UUID())) +100 +prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))'; +execute stmt1; +foo6(concat("foo6_3_",UUID())) +100 +execute stmt1; +foo6(concat("foo6_3_",UUID())) +100 +deallocate prepare stmt1; +create view v1 as select uuid(); +create table t11 (data varchar(255)); +insert into t11 select * from v1; +insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11'); +prepare stmt1 from "insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')"; +execute stmt1; +execute stmt1; +deallocate prepare stmt1; +create trigger t11_bi before insert on t11 for each row +begin +set NEW.data = concat(NEW.data,UUID()); +end| +insert into t11 values("try_560_"); +insert delayed into t2 values("delay_1_"); +insert delayed into t2 values(concat("delay_2_",UUID())); +insert delayed into t2 values("delay_6_"); +insert delayed into t2 values(rand()); +set @a=2.345; +insert delayed into t2 values(@a); +create table t20 select * from t1; +create table t21 select * from t2; +create table t22 select * from t3; +drop table t1,t2,t3; +create table t1 (a int primary key auto_increment, b varchar(100)); +create table t2 (a int primary key auto_increment, b varchar(100)); +create table t3 (b varchar(100)); +create function f (x varchar(100)) returns int deterministic +begin +insert into t1 values(null,x); +insert into t2 values(null,x); +return 1; +end| +select f("try_41_"); +f("try_41_") +1 +use mysqltest1; +insert into t2 values(2,null),(3,null),(4,null); +delete from t2 where a>=2; +select f("try_42_"); +f("try_42_") +1 +insert into t2 values(3,null),(4,null); +delete from t2 where a>=3; +prepare stmt1 from 'select f(?)'; +set @string="try_43_"; +insert into t1 values(null,"try_44_"); +execute stmt1 using @string; +f(?) +1 +deallocate prepare stmt1; +create table t12 select * from t1; +drop table t1; +create table t1 (a int, b varchar(100), key(a)); +select f("try_45_"); +f("try_45_") +1 +create table t13 select * from t1; +drop table t1; +create table t1 (a int primary key auto_increment, b varchar(100)); +drop function f; +create table t14 (unique (a)) select * from t2; +truncate table t2; +create function f1 (x varchar(100)) returns int deterministic +begin +insert into t1 values(null,x); +return 1; +end| +create function f2 (x varchar(100)) returns int deterministic +begin +insert into t2 values(null,x); +return 1; +end| +select f1("try_46_"),f2("try_47_"); +f1("try_46_") f2("try_47_") +1 1 +insert into t2 values(2,null),(3,null),(4,null); +delete from t2 where a>=2; +select f1("try_48_"),f2("try_49_"); +f1("try_48_") f2("try_49_") +1 1 +insert into t3 values(concat("try_50_",f1("try_51_"),f2("try_52_"))); +drop function f2; +create function f2 (x varchar(100)) returns int deterministic +begin +declare y int; +insert into t1 values(null,x); +set y = (select count(*) from t2); +return y; +end| +select f1("try_53_"),f2("try_54_"); +f1("try_53_") f2("try_54_") +1 3 +drop function f2; +create trigger t1_bi before insert on t1 for each row +begin +insert into t2 values(null,"try_55_"); +end| +insert into t1 values(null,"try_56_"); +alter table t1 modify a int, drop primary key; +insert into t1 values(null,"try_57_"); +CREATE TEMPORARY TABLE t15 SELECT UUID(); +create table t16 like t15; +INSERT INTO t16 SELECT * FROM t15; +insert into t16 values("try_65_"); +drop table t15; +insert into t16 values("try_66_"); +select count(*) from t1; +count(*) +7 +select count(*) from t2; +count(*) +5 +select count(*) from t3; +count(*) +1 +select count(*) from t4; +count(*) +29 +select count(*) from t5; +count(*) +58 +select count(*) from t11; +count(*) +8 +select count(*) from t20; +count(*) +66 +select count(*) from t21; +count(*) +19 +select count(*) from t22; +count(*) +2 +select count(*) from t12; +count(*) +4 +select count(*) from t13; +count(*) +1 +select count(*) from t14; +count(*) +4 +select count(*) from t16; +count(*) +3 +DROP TABLE IF EXISTS t11; +SET SESSION BINLOG_FORMAT=STATEMENT; +CREATE TABLE t11 (song VARCHAR(255)); +LOCK TABLES t11 WRITE; +SET SESSION BINLOG_FORMAT=ROW; +INSERT INTO t11 VALUES('Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict'); +SET SESSION BINLOG_FORMAT=STATEMENT; +INSERT INTO t11 VALUES('Careful With That Axe, Eugene'); +UNLOCK TABLES; +SELECT * FROM t11; +song Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict +song Careful With That Axe, Eugene +USE mysqltest1; +SELECT * FROM t11; +song Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict +song Careful With That Axe, Eugene +DROP TABLE IF EXISTS t12; +SET SESSION BINLOG_FORMAT=MIXED; +CREATE TABLE t12 (data LONG); +LOCK TABLES t12 WRITE; +INSERT INTO t12 VALUES(UUID()); +UNLOCK TABLES; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest1 +master-bin.000001 # Query # # create database mysqltest1 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_8_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_10_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_11_" +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_13_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_14_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_15_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_16_" +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_18_") +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_21_" +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( + `rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` ( + `1` varbinary(36) NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t4` ( + `a` varchar(100) DEFAULT NULL +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t4) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t5) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() +begin +insert into t1 values("work_25_"); +insert into t1 values(concat("for_26_",UUID())); +insert into t1 select "yesterday_27_"; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2() +begin +insert into t1 values(concat("emergency_28_",UUID())); +insert into t1 values("work_29_"); +insert into t1 values(concat("for_30_",UUID())); +set session binlog_format=row; # accepted for stored procs +insert into t1 values("more work_31_"); +set session binlog_format=mixed; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned +begin +set session binlog_format=row; # rejected for stored funcs +insert into t1 values("alarm"); +return 100; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100)) +begin +insert into t1 values(concat("work_250_",x)); +insert into t1 select "yesterday_270_"; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello'))) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world'))) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" +master-bin.000001 # Query # # use `mysqltest1`; drop function foo3 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned +begin +insert into t1 values("foo3_32_"); +call foo(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned +begin +insert into t2 select foo3(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned +begin +insert into t2 select UUID(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned +begin +insert into t2 select x; +return 100; +end +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_') +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid() +master-bin.000001 # Query # # use `mysqltest1`; create table t11 (data varchar(255)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row +begin +set NEW.data = concat(NEW.data,UUID()); +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t20 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t21 select * from t2 +master-bin.000001 # Query # # use `mysqltest1`; create table t22 select * from t3 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1,t2,t3 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; create table t3 (b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic +begin +insert into t1 values(null,x); +insert into t2 values(null,x); +return 1; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Intvar # # INSERT_ID=3 +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_44_") +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t12 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a)) +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_') +master-bin.000001 # Query # # use `mysqltest1`; create table t13 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; drop function f +master-bin.000001 # Query # # use `mysqltest1`; create table t14 (unique (a)) select * from t2 +master-bin.000001 # Query # # use `mysqltest1`; truncate table t2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic +begin +insert into t1 values(null,x); +return 1; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic +begin +insert into t2 values(null,x); +return 1; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; drop function f2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic +begin +declare y int; +insert into t1 values(null,x); +set y = (select count(*) from t2); +return y; +end +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_') +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_') +master-bin.000001 # Query # # use `mysqltest1`; drop function f2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row +begin +insert into t2 values(null,"try_55_"); +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; alter table t1 modify a int, drop primary key +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_57_") +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t16` ( + `UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t16 values("try_66_") +master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t11 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene') +master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest1 +master-bin.000001 # Query # # create database mysqltest1 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_8_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_10_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_11_" +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_13_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_14_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_15_") +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_16_" +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_18_") +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_21_" +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( + `rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` ( + `1` varbinary(36) NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t4` ( + `a` varchar(100) DEFAULT NULL +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t4) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t5) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() +begin +insert into t1 values("work_25_"); +insert into t1 values(concat("for_26_",UUID())); +insert into t1 select "yesterday_27_"; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2() +begin +insert into t1 values(concat("emergency_28_",UUID())); +insert into t1 values("work_29_"); +insert into t1 values(concat("for_30_",UUID())); +set session binlog_format=row; # accepted for stored procs +insert into t1 values("more work_31_"); +set session binlog_format=mixed; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned +begin +set session binlog_format=row; # rejected for stored funcs +insert into t1 values("alarm"); +return 100; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100)) +begin +insert into t1 values(concat("work_250_",x)); +insert into t1 select "yesterday_270_"; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello'))) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world'))) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" +master-bin.000001 # Query # # use `mysqltest1`; drop function foo3 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned +begin +insert into t1 values("foo3_32_"); +call foo(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned +begin +insert into t2 select foo3(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned +begin +insert into t2 select UUID(); +return 100; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned +begin +insert into t2 select x; +return 100; +end +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_') +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid() +master-bin.000001 # Query # # use `mysqltest1`; create table t11 (data varchar(255)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row +begin +set NEW.data = concat(NEW.data,UUID()); +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t20 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t21 select * from t2 +master-bin.000001 # Query # # use `mysqltest1`; create table t22 select * from t3 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1,t2,t3 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; create table t3 (b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic +begin +insert into t1 values(null,x); +insert into t2 values(null,x); +return 1; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Intvar # # INSERT_ID=3 +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_44_") +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; create table t12 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a)) +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_') +master-bin.000001 # Query # # use `mysqltest1`; create table t13 select * from t1 +master-bin.000001 # Query # # use `mysqltest1`; drop table t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; drop function f +master-bin.000001 # Query # # use `mysqltest1`; create table t14 (unique (a)) select * from t2 +master-bin.000001 # Query # # use `mysqltest1`; truncate table t2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic +begin +insert into t1 values(null,x); +return 1; +end +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic +begin +insert into t2 values(null,x); +return 1; +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; drop function f2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic +begin +declare y int; +insert into t1 values(null,x); +set y = (select count(*) from t2); +return y; +end +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_') +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_') +master-bin.000001 # Query # # use `mysqltest1`; drop function f2 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row +begin +insert into t2 values(null,"try_55_"); +end +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; alter table t1 modify a int, drop primary key +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_57_") +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t16` ( + `UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '' +) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; insert into t16 values("try_66_") +master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t11 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255)) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene') +master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12 +master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +drop database mysqltest1; +set global binlog_format =@my_binlog_format; diff --git a/mysql-test/suite/rpl/r/rpl_temp_table.result b/mysql-test/suite/rpl/r/rpl_temp_table.result new file mode 100644 index 00000000000..e4ca31d8908 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_temp_table.result @@ -0,0 +1,48 @@ +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; +create table t2 (n int, PRIMARY KEY(n)); +create temporary table t1 (n int); +create temporary table t3 (n int not null); +insert into t1 values(1),(2),(3),(100),(25),(26),(200),(300); +insert into t2 select * from t1; +alter table t3 add primary key(n); +flush logs; +insert into t3 values (1010); +insert into t2 select * from t3; +drop table if exists t3; +insert into t2 values (1012); +create temporary table t1 (n int); +insert into t1 values (4),(5); +insert into t2 select * from t1; +insert into t2 values(61); +select * from t2; +n +1 +2 +3 +4 +5 +25 +26 +61 +100 +200 +300 +1010 +1012 +select count(*) from t2; +count(*) +13 +select sum(n) from t2; +sum(n) +2749 +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 +drop table if exists t1,t2; +Warnings: +Note 1051 Unknown table 't1' diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result new file mode 100644 index 00000000000..7e7d0cebe1d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_temporary.result @@ -0,0 +1,106 @@ +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; +reset master; +SET @save_select_limit=@@session.sql_select_limit; +SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100; +ERROR 42000: Access denied; you need the SUPER privilege for this operation +SELECT @@session.sql_select_limit = @save_select_limit; +@@session.sql_select_limit = @save_select_limit +1 +SET @@session.sql_select_limit=10, @@session.sql_log_bin=0; +ERROR 42000: Access denied; you need the SUPER privilege for this operation +SELECT @@session.sql_select_limit = @save_select_limit; +@@session.sql_select_limit = @save_select_limit +1 +SET @@session.pseudo_thread_id=100; +SET @@session.pseudo_thread_id=connection_id(); +SET @@session.sql_log_bin=0; +SET @@session.sql_log_bin=1; +drop table if exists t1,t2; +create table t1(f int); +create table t2(f int); +insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +create temporary table t3(f int); +insert into t3 select * from t1 where f<6; +create temporary table t3(f int); +insert into t2 select count(*) from t3; +insert into t3 select * from t1 where f>=4; +drop temporary table t3; +insert into t2 select count(*) from t3; +drop temporary table t3; +select * from t2 ORDER BY f; +f +5 +7 +drop table t1, t2; +use test; +SET TIMESTAMP=1040323920; +create table t1(f int); +SET TIMESTAMP=1040323931; +create table t2(f int); +SET TIMESTAMP=1040323938; +insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +SET TIMESTAMP=1040323945; +SET @@session.pseudo_thread_id=1; +create temporary table t3(f int); +SET TIMESTAMP=1040323952; +SET @@session.pseudo_thread_id=1; +insert into t3 select * from t1 where f<6; +SET TIMESTAMP=1040324145; +SET @@session.pseudo_thread_id=2; +create temporary table t3(f int); +SET TIMESTAMP=1040324186; +SET @@session.pseudo_thread_id=1; +insert into t2 select count(*) from t3; +SET TIMESTAMP=1040324200; +SET @@session.pseudo_thread_id=2; +insert into t3 select * from t1 where f>=4; +SET TIMESTAMP=1040324211; +SET @@session.pseudo_thread_id=1; +drop temporary table t3; +SET TIMESTAMP=1040324219; +SET @@session.pseudo_thread_id=2; +insert into t2 select count(*) from t3; +SET TIMESTAMP=1040324224; +SET @@session.pseudo_thread_id=2; +drop temporary table t3; +select * from t2 ORDER BY f; +f +5 +7 +drop table t1,t2; +create temporary table t3 (f int); +create temporary table t4 (f int); +create table t5 (f int); +select id from information_schema.processlist where command='Binlog Dump' into @id; +kill @id; +insert into t5 select * from t4; +select * from t5 /* must be 1 after reconnection */; +f +drop temporary table t4; +drop table t5; +set @@session.pseudo_thread_id=100; +create temporary table t101 (id int); +create temporary table t102 (id int); +set @@session.pseudo_thread_id=200; +create temporary table t201 (id int); +create temporary table `t``201` (id int); +create temporary table `#sql_not_user_table202` (id int); +set @@session.pseudo_thread_id=300; +create temporary table t301 (id int); +create temporary table t302 (id int); +create temporary table `#sql_not_user_table303` (id int); +create table t1(f int); +insert into t1 values (1); +select * from t1 /* must be 1 */; +f +1 +drop table t1; +select * from t1; +a +1 +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_timezone.result b/mysql-test/suite/rpl/r/rpl_timezone.result new file mode 100644 index 00000000000..47ef16b9d49 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_timezone.result @@ -0,0 +1,107 @@ +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 @my_time_zone= @@global.time_zone; +set timestamp=100000000; +create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n)); +create table t2 (t char(32), n int not null auto_increment, PRIMARY KEY(n)); +select @@time_zone; +@@time_zone +Japan +select @@time_zone; +@@time_zone +Europe/Moscow +insert into t1 values ('20050101000000', NULL), ('20050611093902',NULL); +insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); +SELECT * FROM t1 ORDER BY n; +t n +2005-01-01 00:00:00 1 +2005-06-11 09:39:02 2 +2004-01-01 00:00:00 3 +2004-06-11 09:39:02 4 +SELECT * FROM t1 ORDER BY n; +t n +2005-01-01 06:00:00 1 +2005-06-11 14:39:02 2 +2004-01-01 06:00:00 3 +2004-06-11 14:39:02 4 +delete from t1; +set time_zone='Europe/Moscow'; +insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); +SELECT * FROM t1 ORDER BY n; +t n +2004-01-01 00:00:00 5 +2004-06-11 09:39:02 6 +set time_zone='Europe/Moscow'; +SELECT * FROM t1 ORDER BY n; +t n +2004-01-01 00:00:00 5 +2004-06-11 09:39:02 6 +delete from t1; +set time_zone='UTC'; +load data infile '../std_data_ln/rpl_timezone2.dat' into table t1; +Warnings: +Warning 1265 Data truncated for column 't' at row 1 +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1265 Data truncated for column 't' at row 2 +Warning 1261 Row 2 doesn't contain data for all columns +SELECT * FROM t1 ORDER BY n; +t n +0000-00-00 00:00:00 7 +0000-00-00 00:00:00 8 +set time_zone='UTC'; +SELECT * FROM t1 ORDER BY n; +t n +0000-00-00 00:00:00 7 +0000-00-00 00:00:00 8 +set time_zone='Europe/Moscow'; +set time_zone='Europe/Moscow'; +delete from t1; +insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); +set time_zone='MET'; +insert into t2 (select * from t1); +SELECT * FROM t1 ORDER BY n; +t n +2003-12-31 22:00:00 9 +2004-06-11 07:39:02 10 +SELECT * FROM t2 ORDER BY n; +t n +2003-12-31 22:00:00 9 +2004-06-11 07:39:02 10 +delete from t2; +set timestamp=1000072000; +insert into t2 values (current_timestamp,NULL), (current_date,NULL), (current_time,NULL); +SELECT * FROM t2 ORDER BY n; +t n +2001-09-09 23:46:40 11 +2001-09-09 12 +23:46:40 13 +delete from t2; +insert into t2 values (from_unixtime(1000000000),NULL), +(unix_timestamp('2001-09-09 03:46:40'),NULL); +SELECT * FROM t2 ORDER BY n; +t n +2001-09-09 03:46:40 14 +1000000000 15 +SELECT * FROM t2 ORDER BY n; +t n +2001-09-09 03:46:40 14 +1000000000 15 +set global time_zone='MET'; +delete from t2; +set time_zone='UTC'; +insert into t2 values(convert_tz('2004-01-01 00:00:00','MET',@@time_zone),NULL); +insert into t2 values(convert_tz('2005-01-01 00:00:00','MET','Japan'),NULL); +SELECT * FROM t2 ORDER BY n; +t n +2003-12-31 23:00:00 16 +2005-01-01 08:00:00 17 +SELECT * FROM t2 ORDER BY n; +t n +2003-12-31 23:00:00 16 +2005-01-01 08:00:00 17 +drop table t1, t2; +set global time_zone= @my_time_zone; diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result new file mode 100644 index 00000000000..815a87eede5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_trigger.result @@ -0,0 +1,973 @@ +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; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null); +create table t2 (a int auto_increment, primary key (a), b int); +create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null); +create trigger t1 before insert on t1 for each row +begin +insert into t3 values (NULL, "t1", new.a, new.b, rand()); +end| +create trigger t2 after insert on t2 for each row +begin +insert into t3 values (NULL, "t2", new.a, new.b, rand()); +end| +insert into t3 values(100,"log",0,0,0); +SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186; +insert into t1 values(1,1,rand()),(NULL,2,rand()); +insert into t2 (b) values(last_insert_id()); +insert into t2 values(3,0),(NULL,0); +insert into t2 values(NULL,0),(500,0); +select a,b, truncate(rand_value,4) from t1; +a b truncate(rand_value,4) +1 1 0.4320 +2 2 0.3055 +select * from t2; +a b +1 2 +3 0 +4 0 +5 0 +500 0 +select a,name, old_a, old_b, truncate(rand_value,4) from t3; +a name old_a old_b truncate(rand_value,4) +100 log 0 0 0.0000 +101 t1 1 1 0.3203 +102 t1 0 2 0.5666 +103 t2 1 2 0.9164 +104 t2 3 0 0.8826 +105 t2 4 0 0.6635 +106 t2 5 0 0.6699 +107 t2 500 0 0.3593 + +--- On slave -- +select a,b, truncate(rand_value,4) from t1; +a b truncate(rand_value,4) +1 1 0.4320 +2 2 0.3055 +select * from t2; +a b +1 2 +3 0 +4 0 +5 0 +500 0 +select a,name, old_a, old_b, truncate(rand_value,4) from t3; +a name old_a old_b truncate(rand_value,4) +100 log 0 0 0.0000 +101 t1 1 1 0.3203 +102 t1 0 2 0.5666 +103 t2 1 2 0.9164 +104 t2 3 0 0.8826 +105 t2 4 0 0.6635 +106 t2 5 0 0.6699 +107 t2 500 0 0.3593 +drop table t1,t2,t3; +select get_lock("bug12480",2); +get_lock("bug12480",2) +1 +create table t1 (a datetime,b datetime, c datetime); +drop function if exists bug12480; +create function bug12480() returns datetime +begin +set @a=get_lock("bug12480",2); +return now(); +end| +create trigger t1_first before insert on t1 +for each row begin +set @a=get_lock("bug12480",2); +set new.b= now(); +set new.c= bug12480(); +end +| +insert into t1 set a = now(); +select a=b && a=c from t1; +a=b && a=c +1 +SELECT routine_name, definer +FROM information_schema.routines; +routine_name definer +bug12480 root@localhost +SELECT trigger_name, definer +FROM information_schema.triggers; +trigger_name definer +t1_first root@localhost + +--- On slave -- +SELECT routine_name, definer +FROM information_schema.routines; +routine_name definer +bug12480 root@localhost +SELECT trigger_name, definer +FROM information_schema.triggers; +trigger_name definer +t1_first root@localhost +select a=b && a=c from t1; +a=b && a=c +1 +test +1 +truncate table t1; +drop trigger t1_first; +insert into t1 values ("2003-03-03","2003-03-03","2003-03-03"),(bug12480(),bug12480(),bug12480()),(now(),now(),now()); +select a=b && a=c from t1; +a=b && a=c +1 +1 +1 +drop function bug12480; +drop table t1; +create table t1 (i int); +create table t2 (i int); +create trigger tr1 before insert on t1 for each row +begin +insert into t2 values (1); +end| +create database other; +use other; +insert into test.t1 values (1); +use test; +drop table t1,t2; +drop database other; +test case for BUG#13227 +------------------- +10 +------------------- +drop table if exists t110; +drop table if exists t210,t310; +create table t110 (f1 int) /* 2 replicate */; +insert into t110 values (-5); +insert into t110 values (-4); +insert into t110 values (-3); +insert into t110 values (-2); +insert into t110 values (-1); +select * from t110; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg110 before update on t110 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t210 where f1=NEW.f1; +INSERT INTO t310 values (r); +end| +create table t210 (f1 int, f2 int) /* slave local */; +create table t310 (f3 int) /* slave local */; +insert into t210 values (5, 5*100); +insert into t210 values (4, 4*100); +insert into t210 values (3, 3*100); +insert into t210 values (2, 2*100); +insert into t210 values (1, 1*100); +select * from t210; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t110 SET f1=5 where f1=-5; +SELECT * from t110 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t310 /* must be f3 5*100 */; +f3 +500 +UPDATE t110 SET f1=5 where f1=-5; +UPDATE t110 SET f1=4 where f1=-4; +UPDATE t110 SET f1=3 where f1=-3; +UPDATE t110 SET f1=2 where f1=-2; +UPDATE t110 SET f1=1 where f1=-1; +SELECT * from t110 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t310 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg110; +drop table t210,t310; +drop table t110; +------------------- +9 +------------------- +drop table if exists t19; +drop table if exists t29,t39; +create table t19 (f1 int) /* 2 replicate */; +insert into t19 values (-5); +insert into t19 values (-4); +insert into t19 values (-3); +insert into t19 values (-2); +insert into t19 values (-1); +select * from t19; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg19 before update on t19 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t29 where f1=NEW.f1; +INSERT INTO t39 values (r); +end| +create table t29 (f1 int, f2 int) /* slave local */; +create table t39 (f3 int) /* slave local */; +insert into t29 values (5, 5*100); +insert into t29 values (4, 4*100); +insert into t29 values (3, 3*100); +insert into t29 values (2, 2*100); +insert into t29 values (1, 1*100); +select * from t29; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t19 SET f1=5 where f1=-5; +SELECT * from t19 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t39 /* must be f3 5*100 */; +f3 +500 +UPDATE t19 SET f1=5 where f1=-5; +UPDATE t19 SET f1=4 where f1=-4; +UPDATE t19 SET f1=3 where f1=-3; +UPDATE t19 SET f1=2 where f1=-2; +UPDATE t19 SET f1=1 where f1=-1; +SELECT * from t19 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t39 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg19; +drop table t29,t39; +drop table t19; +------------------- +8 +------------------- +drop table if exists t18; +drop table if exists t28,t38; +create table t18 (f1 int) /* 2 replicate */; +insert into t18 values (-5); +insert into t18 values (-4); +insert into t18 values (-3); +insert into t18 values (-2); +insert into t18 values (-1); +select * from t18; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg18 before update on t18 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t28 where f1=NEW.f1; +INSERT INTO t38 values (r); +end| +create table t28 (f1 int, f2 int) /* slave local */; +create table t38 (f3 int) /* slave local */; +insert into t28 values (5, 5*100); +insert into t28 values (4, 4*100); +insert into t28 values (3, 3*100); +insert into t28 values (2, 2*100); +insert into t28 values (1, 1*100); +select * from t28; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t18 SET f1=5 where f1=-5; +SELECT * from t18 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t38 /* must be f3 5*100 */; +f3 +500 +UPDATE t18 SET f1=5 where f1=-5; +UPDATE t18 SET f1=4 where f1=-4; +UPDATE t18 SET f1=3 where f1=-3; +UPDATE t18 SET f1=2 where f1=-2; +UPDATE t18 SET f1=1 where f1=-1; +SELECT * from t18 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t38 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg18; +drop table t28,t38; +drop table t18; +------------------- +7 +------------------- +drop table if exists t17; +drop table if exists t27,t37; +create table t17 (f1 int) /* 2 replicate */; +insert into t17 values (-5); +insert into t17 values (-4); +insert into t17 values (-3); +insert into t17 values (-2); +insert into t17 values (-1); +select * from t17; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg17 before update on t17 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t27 where f1=NEW.f1; +INSERT INTO t37 values (r); +end| +create table t27 (f1 int, f2 int) /* slave local */; +create table t37 (f3 int) /* slave local */; +insert into t27 values (5, 5*100); +insert into t27 values (4, 4*100); +insert into t27 values (3, 3*100); +insert into t27 values (2, 2*100); +insert into t27 values (1, 1*100); +select * from t27; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t17 SET f1=5 where f1=-5; +SELECT * from t17 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t37 /* must be f3 5*100 */; +f3 +500 +UPDATE t17 SET f1=5 where f1=-5; +UPDATE t17 SET f1=4 where f1=-4; +UPDATE t17 SET f1=3 where f1=-3; +UPDATE t17 SET f1=2 where f1=-2; +UPDATE t17 SET f1=1 where f1=-1; +SELECT * from t17 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t37 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg17; +drop table t27,t37; +drop table t17; +------------------- +6 +------------------- +drop table if exists t16; +drop table if exists t26,t36; +create table t16 (f1 int) /* 2 replicate */; +insert into t16 values (-5); +insert into t16 values (-4); +insert into t16 values (-3); +insert into t16 values (-2); +insert into t16 values (-1); +select * from t16; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg16 before update on t16 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t26 where f1=NEW.f1; +INSERT INTO t36 values (r); +end| +create table t26 (f1 int, f2 int) /* slave local */; +create table t36 (f3 int) /* slave local */; +insert into t26 values (5, 5*100); +insert into t26 values (4, 4*100); +insert into t26 values (3, 3*100); +insert into t26 values (2, 2*100); +insert into t26 values (1, 1*100); +select * from t26; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t16 SET f1=5 where f1=-5; +SELECT * from t16 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t36 /* must be f3 5*100 */; +f3 +500 +UPDATE t16 SET f1=5 where f1=-5; +UPDATE t16 SET f1=4 where f1=-4; +UPDATE t16 SET f1=3 where f1=-3; +UPDATE t16 SET f1=2 where f1=-2; +UPDATE t16 SET f1=1 where f1=-1; +SELECT * from t16 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t36 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg16; +drop table t26,t36; +drop table t16; +------------------- +5 +------------------- +drop table if exists t15; +drop table if exists t25,t35; +create table t15 (f1 int) /* 2 replicate */; +insert into t15 values (-5); +insert into t15 values (-4); +insert into t15 values (-3); +insert into t15 values (-2); +insert into t15 values (-1); +select * from t15; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg15 before update on t15 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t25 where f1=NEW.f1; +INSERT INTO t35 values (r); +end| +create table t25 (f1 int, f2 int) /* slave local */; +create table t35 (f3 int) /* slave local */; +insert into t25 values (5, 5*100); +insert into t25 values (4, 4*100); +insert into t25 values (3, 3*100); +insert into t25 values (2, 2*100); +insert into t25 values (1, 1*100); +select * from t25; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t15 SET f1=5 where f1=-5; +SELECT * from t15 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t35 /* must be f3 5*100 */; +f3 +500 +UPDATE t15 SET f1=5 where f1=-5; +UPDATE t15 SET f1=4 where f1=-4; +UPDATE t15 SET f1=3 where f1=-3; +UPDATE t15 SET f1=2 where f1=-2; +UPDATE t15 SET f1=1 where f1=-1; +SELECT * from t15 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t35 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg15; +drop table t25,t35; +drop table t15; +------------------- +4 +------------------- +drop table if exists t14; +drop table if exists t24,t34; +create table t14 (f1 int) /* 2 replicate */; +insert into t14 values (-5); +insert into t14 values (-4); +insert into t14 values (-3); +insert into t14 values (-2); +insert into t14 values (-1); +select * from t14; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg14 before update on t14 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t24 where f1=NEW.f1; +INSERT INTO t34 values (r); +end| +create table t24 (f1 int, f2 int) /* slave local */; +create table t34 (f3 int) /* slave local */; +insert into t24 values (5, 5*100); +insert into t24 values (4, 4*100); +insert into t24 values (3, 3*100); +insert into t24 values (2, 2*100); +insert into t24 values (1, 1*100); +select * from t24; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t14 SET f1=5 where f1=-5; +SELECT * from t14 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t34 /* must be f3 5*100 */; +f3 +500 +UPDATE t14 SET f1=5 where f1=-5; +UPDATE t14 SET f1=4 where f1=-4; +UPDATE t14 SET f1=3 where f1=-3; +UPDATE t14 SET f1=2 where f1=-2; +UPDATE t14 SET f1=1 where f1=-1; +SELECT * from t14 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t34 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg14; +drop table t24,t34; +drop table t14; +------------------- +3 +------------------- +drop table if exists t13; +drop table if exists t23,t33; +create table t13 (f1 int) /* 2 replicate */; +insert into t13 values (-5); +insert into t13 values (-4); +insert into t13 values (-3); +insert into t13 values (-2); +insert into t13 values (-1); +select * from t13; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg13 before update on t13 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t23 where f1=NEW.f1; +INSERT INTO t33 values (r); +end| +create table t23 (f1 int, f2 int) /* slave local */; +create table t33 (f3 int) /* slave local */; +insert into t23 values (5, 5*100); +insert into t23 values (4, 4*100); +insert into t23 values (3, 3*100); +insert into t23 values (2, 2*100); +insert into t23 values (1, 1*100); +select * from t23; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t13 SET f1=5 where f1=-5; +SELECT * from t13 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t33 /* must be f3 5*100 */; +f3 +500 +UPDATE t13 SET f1=5 where f1=-5; +UPDATE t13 SET f1=4 where f1=-4; +UPDATE t13 SET f1=3 where f1=-3; +UPDATE t13 SET f1=2 where f1=-2; +UPDATE t13 SET f1=1 where f1=-1; +SELECT * from t13 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t33 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg13; +drop table t23,t33; +drop table t13; +------------------- +2 +------------------- +drop table if exists t12; +drop table if exists t22,t32; +create table t12 (f1 int) /* 2 replicate */; +insert into t12 values (-5); +insert into t12 values (-4); +insert into t12 values (-3); +insert into t12 values (-2); +insert into t12 values (-1); +select * from t12; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg12 before update on t12 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t22 where f1=NEW.f1; +INSERT INTO t32 values (r); +end| +create table t22 (f1 int, f2 int) /* slave local */; +create table t32 (f3 int) /* slave local */; +insert into t22 values (5, 5*100); +insert into t22 values (4, 4*100); +insert into t22 values (3, 3*100); +insert into t22 values (2, 2*100); +insert into t22 values (1, 1*100); +select * from t22; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t12 SET f1=5 where f1=-5; +SELECT * from t12 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t32 /* must be f3 5*100 */; +f3 +500 +UPDATE t12 SET f1=5 where f1=-5; +UPDATE t12 SET f1=4 where f1=-4; +UPDATE t12 SET f1=3 where f1=-3; +UPDATE t12 SET f1=2 where f1=-2; +UPDATE t12 SET f1=1 where f1=-1; +SELECT * from t12 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t32 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg12; +drop table t22,t32; +drop table t12; +------------------- +1 +------------------- +drop table if exists t11; +drop table if exists t21,t31; +create table t11 (f1 int) /* 2 replicate */; +insert into t11 values (-5); +insert into t11 values (-4); +insert into t11 values (-3); +insert into t11 values (-2); +insert into t11 values (-1); +select * from t11; +f1 +-5 +-4 +-3 +-2 +-1 +create trigger trg11 before update on t11 /* slave local */ +for each row +begin +DECLARE r integer; +SELECT f2 INTO r FROM t21 where f1=NEW.f1; +INSERT INTO t31 values (r); +end| +create table t21 (f1 int, f2 int) /* slave local */; +create table t31 (f3 int) /* slave local */; +insert into t21 values (5, 5*100); +insert into t21 values (4, 4*100); +insert into t21 values (3, 3*100); +insert into t21 values (2, 2*100); +insert into t21 values (1, 1*100); +select * from t21; +f1 f2 +5 500 +4 400 +3 300 +2 200 +1 100 +UPDATE t11 SET f1=5 where f1=-5; +SELECT * from t11 /* must be f1 5, 1 - 5 2 - 5 ... -1 */; +f1 +5 +-4 +-3 +-2 +-1 +SELECT * from t31 /* must be f3 5*100 */; +f3 +500 +UPDATE t11 SET f1=5 where f1=-5; +UPDATE t11 SET f1=4 where f1=-4; +UPDATE t11 SET f1=3 where f1=-3; +UPDATE t11 SET f1=2 where f1=-2; +UPDATE t11 SET f1=1 where f1=-1; +SELECT * from t11 /* must be f1 5 ... 1 */; +f1 +5 +4 +3 +2 +1 +SELECT * from t31 /* must be f3 5 * 100 ... 100 */; +f3 +500 +400 +300 +200 +100 +drop trigger trg11; +drop table t21,t31; +drop table t11; +STOP SLAVE; +FLUSH LOGS; +RESET SLAVE; +START SLAVE; +SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0; +MASTER_POS_WAIT('master-bin.000001', 513) >= 0 +1 +SHOW TABLES LIKE 't_'; +Tables_in_test (t_) +t1 +t2 +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 INSERT INTO t2 VALUES(CURRENT_USER()) AFTER NULL +SELECT * FROM t1; +c +1 +SELECT * FROM t2; +s +@ +INSERT INTO t1 VALUES(2); +SELECT * FROM t1; +c +1 +2 +SELECT * FROM t2; +s +@ +root@localhost +DROP TRIGGER trg1; +Warnings: +Warning 1454 No definer attribute for trigger 'test'.'trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger. +DROP TABLE t1; +DROP TABLE t2; +STOP SLAVE; +RESET SLAVE; +SHOW TABLES LIKE 't_'; +Tables_in_test (t_) +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer +RESET MASTER; +START SLAVE; + +---> Test for BUG#20438 + +---> Preparing environment... +---> connection: master +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; + +---> Synchronizing slave with master... + +---> connection: master + +---> Creating objects... +CREATE TABLE t1(c INT); +CREATE TABLE t2(c INT); +/*!50003 CREATE TRIGGER t1_bi BEFORE INSERT ON t1 +FOR EACH ROW +INSERT INTO t2 VALUES(NEW.c * 10) */; + +---> Inserting value... +INSERT INTO t1 VALUES(1); + +---> Checking on master... +SELECT * FROM t1; +c +1 +SELECT * FROM t2; +c +10 + +---> Synchronizing slave with master... +---> connection: master + +---> Checking on slave... +SELECT * FROM t1; +c +1 +SELECT * FROM t2; +c +10 + +---> connection: master + +---> Cleaning up... +DROP TABLE t1; +DROP TABLE t2; +drop table if exists t1; +create table t1(a int, b varchar(50)); +drop trigger not_a_trigger; +ERROR HY000: Trigger does not exist +drop trigger if exists not_a_trigger; +Warnings: +Note 1360 Trigger does not exist +create trigger t1_bi before insert on t1 +for each row set NEW.b := "In trigger t1_bi"; +insert into t1 values (1, "a"); +drop trigger if exists t1_bi; +insert into t1 values (2, "b"); +drop trigger if exists t1_bi; +Warnings: +Note 1360 Trigger does not exist +insert into t1 values (3, "c"); +select * from t1; +a b +1 In trigger t1_bi +2 b +3 c +select * from t1; +a b +1 In trigger t1_bi +2 b +3 c +drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_trunc_temp.result b/mysql-test/suite/rpl/r/rpl_trunc_temp.result new file mode 100644 index 00000000000..44624a38875 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_trunc_temp.result @@ -0,0 +1,22 @@ +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; +create temporary table t1 (n int); +insert into t1 values(1); +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 1 +delete from t1; +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 1 +truncate t1; +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 1 +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 diff --git a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result new file mode 100644 index 00000000000..c7ef28ba56b --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result @@ -0,0 +1,196 @@ +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; +**** On Master **** +SET SESSION BINLOG_FORMAT=STATEMENT; +SET GLOBAL BINLOG_FORMAT=STATEMENT; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=STATEMENT; +SET GLOBAL BINLOG_FORMAT=STATEMENT; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Query # # use `test`; DELETE FROM t1 +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Query # # use `test`; DELETE FROM t1 +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +3 3 +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; DROP TABLE t1 diff --git a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result new file mode 100644 index 00000000000..7ce48c2e983 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result @@ -0,0 +1,208 @@ +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; +**** On Master **** +SET SESSION BINLOG_FORMAT=STATEMENT; +SET GLOBAL BINLOG_FORMAT=STATEMENT; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=STATEMENT; +SET GLOBAL BINLOG_FORMAT=STATEMENT; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DELETE FROM t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DELETE FROM t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 +**** On Master **** +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1; +a b +**** On Slave **** +SELECT * FROM t1; +a b +3 3 +**** On Master **** +DROP TABLE t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; DROP TABLE t1 diff --git a/mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result b/mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result new file mode 100644 index 00000000000..ca323e193fa --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_truncate_7ndb_2.result @@ -0,0 +1,91 @@ +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; +**** On Master **** +CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1 ORDER BY a,b; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1 ORDER BY a,b; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1 ORDER BY a,b; +a b +**** On Slave **** +SELECT * FROM t1 ORDER BY a,b; +a b +**** On Master **** +DROP TABLE t1; +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 219 Query 1 283 BEGIN +master-bin.000001 283 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 323 Table_map 1 93 table_id: # (mysql.apply_status) +master-bin.000001 376 Write_rows 1 135 table_id: # +master-bin.000001 418 Write_rows 1 182 table_id: # flags: STMT_END_F +master-bin.000001 465 Query 1 530 COMMIT +master-bin.000001 530 Query 1 610 use `test`; TRUNCATE TABLE t1 +master-bin.000001 610 Query 1 686 use `test`; DROP TABLE t1 +**** On Master **** +CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1 ORDER BY a,b; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1 ORDER BY a,b; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1 ORDER BY a,b; +a b +**** On Slave **** +SELECT * FROM t1 ORDER BY a,b; +a b +3 3 +**** On Master **** +DROP TABLE t1; +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 219 Query 1 283 BEGIN +master-bin.000001 283 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 323 Table_map 1 93 table_id: # (mysql.apply_status) +master-bin.000001 376 Write_rows 1 135 table_id: # +master-bin.000001 418 Write_rows 1 182 table_id: # flags: STMT_END_F +master-bin.000001 465 Query 1 530 COMMIT +master-bin.000001 530 Query 1 610 use `test`; TRUNCATE TABLE t1 +master-bin.000001 610 Query 1 686 use `test`; DROP TABLE t1 +master-bin.000001 686 Query 1 803 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 803 Query 1 867 BEGIN +master-bin.000001 867 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 907 Table_map 1 93 table_id: # (mysql.apply_status) +master-bin.000001 960 Write_rows 1 135 table_id: # +master-bin.000001 1002 Write_rows 1 182 table_id: # flags: STMT_END_F +master-bin.000001 1049 Query 1 1114 COMMIT +master-bin.000001 1114 Query 1 1178 BEGIN +master-bin.000001 1178 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 1218 Table_map 1 93 table_id: # (mysql.apply_status) +master-bin.000001 1271 Write_rows 1 135 table_id: # +master-bin.000001 1313 Delete_rows 1 174 table_id: # flags: STMT_END_F +master-bin.000001 1352 Query 1 1417 COMMIT +master-bin.000001 1417 Query 1 1493 use `test`; DROP TABLE t1 diff --git a/mysql-test/suite/rpl/r/rpl_udf.result b/mysql-test/suite/rpl/r/rpl_udf.result new file mode 100644 index 00000000000..6587632bca0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_udf.result @@ -0,0 +1,310 @@ +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 binlog_format=row; +drop table if exists t1; +"*** Test 1) Test UDFs via loadable libraries *** +"Running on the master" +CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB"; +affected rows: 0 +CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; +affected rows: 0 +CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; +ERROR HY000: Can't find symbol 'myfunc_nonexist' in library +SELECT * FROM mysql.func; +name ret dl type +myfunc_double 1 UDF_LIB function +myfunc_int 2 UDF_LIB function +affected rows: 2 +"Running on the slave" +SELECT * FROM mysql.func; +name ret dl type +myfunc_double 1 UDF_LIB function +myfunc_int 2 UDF_LIB function +affected rows: 2 +"Running on the master" +CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; +affected rows: 0 +INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00)); +affected rows: 1 +SELECT * FROM t1 ORDER BY sum; +sum price +1 48.5 +10 48.75 +100 48.6 +200 49 +affected rows: 4 +"Running on the slave" +SELECT * FROM t1 ORDER BY sum; +sum price +1 48.5 +10 48.75 +100 48.6 +200 49 +affected rows: 4 +SELECT myfunc_int(25); +myfunc_int(25) +25 +affected rows: 1 +SELECT myfunc_double(75.00); +myfunc_double(75.00) +50.00 +affected rows: 1 +"Running on the master" +DROP FUNCTION myfunc_double; +affected rows: 0 +DROP FUNCTION myfunc_int; +affected rows: 0 +SELECT * FROM mysql.func; +name ret dl type +affected rows: 0 +"Running on the slave" +SELECT * FROM mysql.func; +name ret dl type +affected rows: 0 +"Running on the master" +DROP TABLE t1; +affected rows: 0 +"*** Test 2) Test UDFs with SQL body *** +"Running on the master" +CREATE FUNCTION myfuncsql_int(i INT) RETURNS INTEGER DETERMINISTIC RETURN i; +affected rows: 0 +CREATE FUNCTION myfuncsql_double(d DOUBLE) RETURNS INTEGER DETERMINISTIC RETURN d * 2.00; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 +test myfuncsql_int FUNCTION i INT RETURN i +affected rows: 2 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 +test myfuncsql_int FUNCTION i INT RETURN i +affected rows: 2 +"Running on the master" +CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; +affected rows: 0 +INSERT INTO t1 VALUES(myfuncsql_int(100), myfuncsql_double(50.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(10), myfuncsql_double(5.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(200), myfuncsql_double(25.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(1), myfuncsql_double(500.00)); +affected rows: 1 +SELECT * FROM t1 ORDER BY sum; +sum price +1 1000 +10 10 +100 100 +200 50 +affected rows: 4 +"Running on the slave" +SELECT * FROM t1 ORDER BY sum; +sum price +1 1000 +10 10 +100 100 +200 50 +affected rows: 4 +"Running on the master" +ALTER FUNCTION myfuncsql_int COMMENT "This was altered."; +affected rows: 0 +ALTER FUNCTION myfuncsql_double COMMENT "This was altered."; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. +test myfuncsql_int FUNCTION i INT RETURN i This was altered. +affected rows: 2 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. +test myfuncsql_int FUNCTION i INT RETURN i This was altered. +affected rows: 2 +SELECT myfuncsql_int(25); +myfuncsql_int(25) +25 +affected rows: 1 +SELECT myfuncsql_double(75.00); +myfuncsql_double(75.00) +150 +affected rows: 1 +"Running on the master" +DROP FUNCTION myfuncsql_double; +affected rows: 0 +DROP FUNCTION myfuncsql_int; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +affected rows: 0 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +affected rows: 0 +"Running on the master" +DROP TABLE t1; +affected rows: 0 +set binlog_format=statement; +drop table if exists t1; +"*** Test 1) Test UDFs via loadable libraries *** +"Running on the master" +CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB"; +affected rows: 0 +CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; +affected rows: 0 +CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB"; +ERROR HY000: Can't find symbol 'myfunc_nonexist' in library +SELECT * FROM mysql.func; +name ret dl type +myfunc_int 2 UDF_LIB function +myfunc_double 1 UDF_LIB function +affected rows: 2 +"Running on the slave" +SELECT * FROM mysql.func; +name ret dl type +myfunc_int 2 UDF_LIB function +myfunc_double 1 UDF_LIB function +affected rows: 2 +"Running on the master" +CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; +affected rows: 0 +INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00)); +affected rows: 1 +SELECT * FROM t1 ORDER BY sum; +sum price +1 48.5 +10 48.75 +100 48.6 +200 49 +affected rows: 4 +"Running on the slave" +SELECT * FROM t1 ORDER BY sum; +sum price +1 48.5 +10 48.75 +100 48.6 +200 49 +affected rows: 4 +SELECT myfunc_int(25); +myfunc_int(25) +25 +affected rows: 1 +SELECT myfunc_double(75.00); +myfunc_double(75.00) +50.00 +affected rows: 1 +"Running on the master" +DROP FUNCTION myfunc_double; +affected rows: 0 +DROP FUNCTION myfunc_int; +affected rows: 0 +SELECT * FROM mysql.func; +name ret dl type +affected rows: 0 +"Running on the slave" +SELECT * FROM mysql.func; +name ret dl type +affected rows: 0 +"Running on the master" +DROP TABLE t1; +affected rows: 0 +"*** Test 2) Test UDFs with SQL body *** +"Running on the master" +CREATE FUNCTION myfuncsql_int(i INT) RETURNS INTEGER DETERMINISTIC RETURN i; +affected rows: 0 +CREATE FUNCTION myfuncsql_double(d DOUBLE) RETURNS INTEGER DETERMINISTIC RETURN d * 2.00; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 +test myfuncsql_int FUNCTION i INT RETURN i +affected rows: 2 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 +test myfuncsql_int FUNCTION i INT RETURN i +affected rows: 2 +"Running on the master" +CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM; +affected rows: 0 +INSERT INTO t1 VALUES(myfuncsql_int(100), myfuncsql_double(50.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(10), myfuncsql_double(5.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(200), myfuncsql_double(25.00)); +affected rows: 1 +INSERT INTO t1 VALUES(myfuncsql_int(1), myfuncsql_double(500.00)); +affected rows: 1 +SELECT * FROM t1 ORDER BY sum; +sum price +1 1000 +10 10 +100 100 +200 50 +affected rows: 4 +"Running on the slave" +SELECT * FROM t1 ORDER BY sum; +sum price +1 1000 +10 10 +100 100 +200 50 +affected rows: 4 +"Running on the master" +ALTER FUNCTION myfuncsql_int COMMENT "This was altered."; +affected rows: 0 +ALTER FUNCTION myfuncsql_double COMMENT "This was altered."; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. +test myfuncsql_int FUNCTION i INT RETURN i This was altered. +affected rows: 2 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +test myfuncsql_double FUNCTION d DOUBLE RETURN d * 2.00 This was altered. +test myfuncsql_int FUNCTION i INT RETURN i This was altered. +affected rows: 2 +SELECT myfuncsql_int(25); +myfuncsql_int(25) +25 +affected rows: 1 +SELECT myfuncsql_double(75.00); +myfuncsql_double(75.00) +150 +affected rows: 1 +"Running on the master" +DROP FUNCTION myfuncsql_double; +affected rows: 0 +DROP FUNCTION myfuncsql_int; +affected rows: 0 +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +affected rows: 0 +"Running on the slave" +SELECT db, name, type, param_list, body, comment FROM mysql.proc WHERE db = 'test' AND name LIKE 'myfuncsql%'; +db name type param_list body comment +affected rows: 0 +"Running on the master" +DROP TABLE t1; +affected rows: 0 diff --git a/mysql-test/suite/rpl/r/rpl_user_variables.result b/mysql-test/suite/rpl/r/rpl_user_variables.result new file mode 100644 index 00000000000..d3363df3b58 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_user_variables.result @@ -0,0 +1,266 @@ +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; +reset master; +create table t1(n char(30)); +set @i1:=12345678901234, @i2:=-12345678901234, @i3:=0, @i4:=-1; +set @s1:='This is a test', @r1:=12.5, @r2:=-12.5; +set @n1:=null; +set @s2:='', @s3:='abc\'def', @s4:= 'abc\\def', @s5:= 'abc''def'; +insert into t1 values (@i1), (@i2), (@i3), (@i4); +insert into t1 values (@r1), (@r2); +insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5); +insert into t1 values (@n1); +insert into t1 values (@n2); +insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1); +insert into t1 values (@a+(@b:=@a+1)); +set @q:='abc'; +insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')); +set @a:=5; +insert into t1 values (@a),(@a); +select * from t1 where n = ''; +n +insert into t1 values (@a),(@a),(@a*5); +SELECT * FROM t1 ORDER BY n; +n +NULL +NULL +NULL +NULL +NULL + +-1 +-12.5 +-12345678901234 +0 +0 +1 +12.5 +12345678901234 +2 +5 +5 +5 +abc +abc'def +abc'def +abcn1 +abcn1n2 +abc\def +This is a test +SELECT * FROM t1 ORDER BY n; +n +NULL +NULL +NULL +NULL +NULL + +-1 +-12.5 +-12345678901234 +0 +0 +1 +12.5 +12345678901234 +2 +5 +5 +5 +abc +abc'def +abc'def +abcn1 +abcn1n2 +abc\def +This is a test +insert into t1 select * FROM (select @var1 union select @var2) AS t2; +drop table t1; +End of 4.1 tests. +DROP TABLE IF EXISTS t20; +DROP TABLE IF EXISTS t21; +DROP PROCEDURE IF EXISTS test.insert; +CREATE TABLE t20 (a VARCHAR(20)); +CREATE TABLE t21 (a VARCHAR(20)); +CREATE PROCEDURE test.insert() +BEGIN +IF (@VAR) +THEN +INSERT INTO test.t20 VALUES ('SP_TRUE'); +ELSE +INSERT INTO test.t20 VALUES ('SP_FALSE'); +END IF; +END| +CREATE TRIGGER test.insert_bi BEFORE INSERT +ON test.t20 FOR EACH ROW +BEGIN +IF (@VAR) +THEN +INSERT INTO test.t21 VALUES ('TRIG_TRUE'); +ELSE +INSERT INTO test.t21 VALUES ('TRIG_FALSE'); +END IF; +END| +SET @VAR=0; +CALL test.insert(); +SET @VAR=1; +CALL test.insert(); +On master: Check the tables for correct data +SELECT * FROM t20; +a +SP_FALSE +SP_TRUE +SELECT * FROM t21; +a +TRIG_FALSE +TRIG_TRUE +On slave: Check the tables for correct data and it matches master +SELECT * FROM t20; +a +SP_FALSE +SP_TRUE +SELECT * FROM t21; +a +TRIG_FALSE +TRIG_TRUE +DROP TABLE t20; +DROP TABLE t21; +DROP PROCEDURE test.insert; +DROP TABLE IF EXISTS t1; +DROP FUNCTION IF EXISTS test.square; +CREATE TABLE t1 (i INT); +CREATE FUNCTION test.square() RETURNS INTEGER DETERMINISTIC RETURN +(@var * @var); +SET @var = 1; +INSERT INTO t1 VALUES (square()); +SET @var = 2; +INSERT INTO t1 VALUES (square()); +SET @var = 3; +INSERT INTO t1 VALUES (square()); +SET @var = 4; +INSERT INTO t1 VALUES (square()); +SET @var = 5; +INSERT INTO t1 VALUES (square()); +On master: Retrieve the values from the table +SELECT * FROM t1; +i +1 +4 +9 +16 +25 +On slave: Retrieve the values from the table and verify they are the same as on master +SELECT * FROM t1; +i +1 +4 +9 +16 +25 +DROP TABLE t1; +DROP FUNCTION test.square; +DROP TABLE IF EXISTS t1; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +CREATE TABLE t1(a int); +CREATE FUNCTION f1() returns int deterministic BEGIN +return @a; +END | +CREATE FUNCTION f2() returns int deterministic BEGIN +IF (@b > 0) then +SET @c = (@a + @b); +else +SET @c = (@a - 1); +END if; +return @c; +END | +SET @a=500; +INSERT INTO t1 values(f1()); +SET @b = 125; +SET @c = 1; +INSERT INTO t1 values(f2()); +On master: Retrieve the values from the table +SELECT * from t1; +a +500 +625 +On slave: Check the tables for correct data and it matches master +SELECT * from t1; +a +500 +625 +DROP TABLE t1; +DROP FUNCTION f1; +DROP FUNCTION f2; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1 (i int); +CREATE TABLE t2 (k int); +CREATE trigger t1_bi before INSERT on t1 for each row BEGIN +INSERT INTO t2 values (@a); +SET @a:=42; +INSERT INTO t2 values (@a); +END | +SET @a:=100; +INSERT INTO t1 values (5); +On master: Check to see that data was inserted correctly in both tables +SELECT * from t1; +i +5 +SELECT * from t2; +k +100 +42 +On slave: Check the tables for correct data and it matches master +SELECT * from t1; +i +5 +SELECT * from t2; +k +100 +42 +drop table t1, t2; +create table t1(a int, b int); +prepare s1 from 'insert into t1 values (@x:=@x+1, ?)'; +set @x=1; +execute s1 using @x; +select * from t1; +a b +2 1 +select * from t1; +a b +2 1 +drop table t1; +End of 5.0 tests. +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +CREATE TABLE t1 (i INT); +CREATE FUNCTION f1() RETURNS INT RETURN @a; +CREATE +FUNCTION f2() RETURNS INT BEGIN +INSERT INTO t1 VALUES (10 + @a); +RETURN 0; +END| +SET @a:=123; +SELECT f1(), f2(); +f1() f2() +123 0 +On master: Check to see that data was inserted correctly +INSERT INTO t1 VALUES(f1()); +SELECT * FROM t1; +i +133 +123 +On slave: Check the table for correct data and it matches master +SELECT * FROM t1; +i +133 +123 +DROP FUNCTION f1; +DROP FUNCTION f2; +DROP TABLE t1; +stop slave; diff --git a/mysql-test/suite/rpl/r/rpl_variables.result b/mysql-test/suite/rpl/r/rpl_variables.result new file mode 100644 index 00000000000..605a48859a0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_variables.result @@ -0,0 +1,19 @@ +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 @my_slave_net_timeout =@@global.slave_net_timeout; +set global slave_net_timeout=100; +set global sql_slave_skip_counter=100; +show variables like 'slave_compressed_protocol'; +Variable_name Value +slave_compressed_protocol OFF +show variables like 'slave_load_tmpdir'; +Variable_name Value +slave_load_tmpdir SLAVE_LOAD_TMPDIR +show variables like 'slave_skip_errors'; +Variable_name Value +slave_skip_errors 3,100,137,643,1752 +set global slave_net_timeout=default; diff --git a/mysql-test/suite/rpl/r/rpl_view.result b/mysql-test/suite/rpl/r/rpl_view.result new file mode 100644 index 00000000000..0d862a2a912 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_view.result @@ -0,0 +1,104 @@ +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; +drop table if exists t1,v1; +drop view if exists t1,v1; +reset master; +create table t1 (a int); +insert into t1 values (1); +create view v1 as select a from t1; +insert into v1 values (2); +select * from v1 order by a; +a +1 +2 +select * from v1 order by a; +a +1 +2 +update v1 set a=3 where a=1; +select * from v1 order by a; +a +2 +3 +select * from v1 order by a; +a +2 +3 +delete from v1 where a=2; +select * from v1 order by a; +a +3 +select * from v1 order by a; +a +3 +alter view v1 as select a as b from t1; +select * from v1 order by 1; +b +3 +drop view v1; +select * from v1 order by a; +ERROR 42S02: Table 'test.v1' doesn't exist +drop table t1; + +---> Test for BUG#20438 + +---> Preparing environment... +---> connection: master +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; + +---> Synchronizing slave with master... + +---> connection: master + +---> Creating objects... +CREATE TABLE t1(c INT); +/*!50003 CREATE VIEW v1 AS SELECT * FROM t1 */; + +---> Inserting value... +INSERT INTO t1 VALUES(1); + +---> Checking on master... +SELECT * FROM t1; +c +1 + +---> Synchronizing slave with master... +---> connection: master + +---> Checking on slave... +SELECT * FROM t1; +c +1 + +---> connection: master + +---> Cleaning up... +DROP VIEW v1; +DROP TABLE t1; +create table t1(a int, b int); +insert into t1 values (1, 1), (1, 2), (1, 3); +create view v1(a, b) as select a, sum(b) from t1 group by a; +explain v1; +Field Type Null Key Default Extra +a int(11) YES NULL +b decimal(32,0) YES NULL +show create table v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,sum(`t1`.`b`) AS `b` from `t1` group by `t1`.`a` +select * from v1; +a b +1 6 +drop table t1; +drop view v1; +CREATE TABLE t1(a INT); +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE VIEW v1 AS SELECT * FROM t1; +ERROR 42S01: Table 'v1' already exists +DROP VIEW v1; +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def new file mode 100644 index 00000000000..180a700acaf --- /dev/null +++ b/mysql-test/suite/rpl/t/disabled.def @@ -0,0 +1,15 @@ +############################################################################## +# +# List the test cases that are to be disabled temporarily. +# +# Separate the test case name and the comment with ':'. +# +# : BUG# +# +# Do not use any TAB characters for whitespace. +# +############################################################################## + +rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master +rpl_innodb_mixed_ddl : Bug #29363 rpl.rpl_innodb_mixed_* test failures +rpl_innodb_mixed_dml : Bug #29363 rpl.rpl_innodb_mixed_* test failures diff --git a/mysql-test/suite/rpl/t/rpl000010-slave.opt b/mysql-test/suite/rpl/t/rpl000010-slave.opt new file mode 100644 index 00000000000..0dbfb311e33 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl000010-slave.opt @@ -0,0 +1 @@ +--disconnect-slave-event-count=2 diff --git a/mysql-test/suite/rpl/t/rpl000010.test b/mysql-test/suite/rpl/t/rpl000010.test new file mode 100644 index 00000000000..261b9148774 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl000010.test @@ -0,0 +1,19 @@ +# This tests the offset off by 22 mystery bug +# Must run slave with --disconnect-slave-event-count=1 --master-connect-retry=1 + +source include/master-slave.inc; + +create table t1 (n int not null auto_increment primary key); +insert into t1 values(NULL); +insert into t1 values(2); +save_master_pos; +connection slave; +sync_with_master; +select n from t1; +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl000011.test b/mysql-test/suite/rpl/t/rpl000011.test new file mode 100644 index 00000000000..32f6227f7c5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl000011.test @@ -0,0 +1,17 @@ +source include/master-slave.inc; + +create table t1 (n int); +insert into t1 values(1); +sync_slave_with_master; +stop slave; +start slave; +connection master; +insert into t1 values(2); +#let slave catch up +sync_slave_with_master; +select * from t1; +connection master; +drop table t1; +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl000013.test b/mysql-test/suite/rpl/t/rpl000013.test new file mode 100644 index 00000000000..69a102e84ce --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl000013.test @@ -0,0 +1,53 @@ +# This test is to verify that DROP TEMPORARY TABLE +# is automatically binlogged and sent to slave +# when a temp table is dropped by disconnection +# of a master's conection. +# So it does not apply to row-based, where we neither need +# nor do this automatic binlogging. And if we run this test +# in row-based, it hangs waiting for an offset which is never +# reached (the "sync_with_master 1"), logically. + +--source include/have_binlog_format_mixed_or_statement.inc +source include/master-slave.inc; +save_master_pos; +connection slave; +sync_with_master; +connection master; + +create table t2(n int); +create temporary table t1 (n int); +insert into t1 values(1),(2),(3); +insert into t2 select * from t1; +connection master1; +create temporary table t1 (n int); +insert into t1 values (4),(5); +insert into t2 select * from t1 as t10; +save_master_pos; +disconnect master; +connection slave; +#add 1 to catch drop table +sync_with_master 1; +connection master1; +insert into t2 values(6); +save_master_pos; +disconnect master1; +connection slave; +# same trick to go one more event +sync_with_master 1; +select * from t2; +show status like 'Slave_open_temp_tables'; +# +# Clean up +# +connect (master2,localhost,root,,); +connection master2; + +# We will get a warning for t1 as this is a temporary table that doesn't +# exist in this connection. + +drop table if exists t1,t2; +save_master_pos; +connection slave; +sync_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl000017-slave.opt b/mysql-test/suite/rpl/t/rpl000017-slave.opt new file mode 100644 index 00000000000..58a964c90d0 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl000017-slave.opt @@ -0,0 +1 @@ +--skip-slave-start diff --git a/mysql-test/suite/rpl/t/rpl000017-slave.sh b/mysql-test/suite/rpl/t/rpl000017-slave.sh new file mode 100755 index 00000000000..17188aba0db --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl000017-slave.sh @@ -0,0 +1,12 @@ +rm -f $MYSQLTEST_VARDIR/log/*relay* +rm -f $MYSQLTEST_VARDIR/slave-data/relay-log.info +cat > $MYSQLTEST_VARDIR/slave-data/master.info <_binary'' from mysql.user where user=_binary'rpl_do_grant'; + +# +# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES +# +connection master; +update mysql.user set password='' where user='rpl_do_grant'; +flush privileges; +select password<>'' from mysql.user where user='rpl_do_grant'; +set sql_mode='ANSI_QUOTES'; +set password for rpl_do_grant@localhost=password('does it work?'); +set sql_mode=''; +save_master_pos; +connection slave; +sync_with_master; +select password<>'' from mysql.user where user='rpl_do_grant'; + + +# clear what we have done, to not influence other tests. +connection master; +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; +flush privileges; +sync_slave_with_master; +# The mysql database is not replicated, so we have to do the deletes +# manually on the slave as well. +delete from mysql.user where user=_binary'rpl_do_grant'; +delete from mysql.db where user=_binary'rpl_do_grant'; +flush privileges; + +# End of 4.1 tests + +connection master; +--error 1141 +show grants for rpl_do_grant@localhost; +connection slave; +--error 1141 +show grants for rpl_do_grant@localhost; + +connection master; +create user rpl_do_grant@localhost; +show grants for rpl_do_grant@localhost; +--error 1141 +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +show grants for rpl_do_grant@localhost; +--error 1141 +show grants for rpl_do_grant2@localhost; + +connection master; +rename user rpl_do_grant@localhost to rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +show grants for rpl_do_grant2@localhost; + +connection master; +grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +show grants for rpl_do_grant2@localhost; + +connection master; +revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +show grants for rpl_do_grant2@localhost; + +connection master; +revoke all privileges, grant option from rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +show grants for rpl_do_grant2@localhost; + +connection master; +drop user rpl_do_grant2@localhost; +--error 1141 +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +--error 1141 +show grants for rpl_do_grant2@localhost; diff --git a/mysql-test/suite/rpl/t/rpl_drop.test b/mysql-test/suite/rpl/t/rpl_drop.test new file mode 100644 index 00000000000..b38007a755f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_drop.test @@ -0,0 +1,16 @@ +# Testcase for BUG#4552 (DROP on two tables, one of which does not +# exist, must be binlogged with a non-zero error code) +source include/master-slave.inc; +--disable_warnings +drop table if exists t1, t2; +--enable_warnings +create table t1 (a int); +--error 1051 +drop table t1, t2; +save_master_pos; +connection slave; +sync_with_master; + +# End of 4.1 tests + + diff --git a/mysql-test/suite/rpl/t/rpl_drop_db.test b/mysql-test/suite/rpl/t/rpl_drop_db.test new file mode 100644 index 00000000000..7f4a7843c4a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_drop_db.test @@ -0,0 +1,61 @@ +# test case for BUG#4680 -- if there are extra files in the db directory +# dropping the db on the master causes replication problems + +-- source include/master-slave.inc +connection master; + +--disable_warnings +drop database if exists mysqltest1; +--enable_warnings +create database mysqltest1; +create table mysqltest1.t1 (n int); +insert into mysqltest1.t1 values (1); +select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; +create table mysqltest1.t2 (n int); +create table mysqltest1.t3 (n int); +--replace_result \\ / +--error 1010 +drop database mysqltest1; +use mysqltest1; +show tables; + +# test the branch of the code that deals with the query buffer overflow + +--disable_query_log +let $1=50; +while ($1) +{ + eval create table mysqltest1.mysqltest_long_table_name$1 (n int); + dec $1; +} +--enable_query_log + +--replace_result \\ / +--error 1010 +drop database mysqltest1; +use mysqltest1; +show tables; +use test; +create table t1 (n int); +insert into t1 values (1234); +sync_slave_with_master; + +connection slave; +use mysqltest1; +show tables; +use test; +select * from t1; + +#cleanup +connection slave; +stop slave; +drop database mysqltest1; + +connection master; +# Remove the "extra" file created above +--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest1/f1.txt +drop database mysqltest1; + +use test; +drop table t1; + diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp-slave.opt b/mysql-test/suite/rpl/t/rpl_drop_temp-slave.opt new file mode 100644 index 00000000000..2f9244c65ff --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_drop_temp-slave.opt @@ -0,0 +1,2 @@ +--replicate-ignore-table=mysqltest.t2 + diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp.test b/mysql-test/suite/rpl/t/rpl_drop_temp.test new file mode 100644 index 00000000000..305c78d3f06 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test @@ -0,0 +1,27 @@ +############################################## +# Change Author: JBM +# Change Date: 2006-02-07 +# Change: Added ENGINE=MyISAM +# Purpose: According to TU in 16552 This is how +# to work around NDB's issue with temp tables +############################################## +source include/master-slave.inc; +--disable_warnings +create database if not exists mysqltest; +--enable_warnings + +create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; +create temporary table mysqltest.t2 (n int)ENGINE=MyISAM; +sync_slave_with_master; +connection master; +disconnect master; +connection slave; +--real_sleep 3 # time for DROP to be written +show status like 'Slave_open_temp_tables'; + +# Cleanup +connection default; +drop database mysqltest; +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_dual_pos_advance-master.opt b/mysql-test/suite/rpl/t/rpl_dual_pos_advance-master.opt new file mode 100644 index 00000000000..cef79bc8585 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_dual_pos_advance-master.opt @@ -0,0 +1 @@ +--force-restart diff --git a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test new file mode 100644 index 00000000000..27c920a3186 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test @@ -0,0 +1,114 @@ +# This test checks that in a dual-head setup +# A->B->A, where A has --log-slave-updates (why would it? +# assume that there is a C as slave of A), +# then the Exec_master_log_pos of SHOW SLAVE STATUS does +# not stay too low on B(BUG#13023 due to events ignored because +# of their server id). +# It also will test BUG#13861. + +source include/master-slave.inc; + + +# set up "dual head" + +connection slave; +reset master; + +connection master; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval change master to master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root"; + +start slave; + +# now we test it + +connection slave; + +create table t1 (n int); + +save_master_pos; +connection master; +sync_with_master; + +# Now test BUG#13861. This will be enabled when Guilhem fixes this +# bug. + +# stop slave + +# create table t2 (n int); # create one ignored event + +# save_master_pos; +# connection slave; +# sync_with_master; + +# connection slave; + +# show tables; + +# save_master_pos; + +# create table t3 (n int); + +# connection master; + +# bug is that START SLAVE UNTIL may stop too late, we test that by +# asking it to stop before creation of t3. + +# start slave until master_log_file="slave-bin.000001",master_log_pos=195; + +# wait until it's started (the position below is the start of "CREATE +# TABLE t2") (otherwise wait_for_slave_to_stop may return at once) + +# select master_pos_wait("slave-bin.000001",137); + +# --source include/wait_for_slave_to_stop.inc + +# then BUG#13861 causes t3 to show up below (because stopped too +# late). + +# show tables; + +# start slave; + +# BUG#13023 is that Exec_master_log_pos may stay too low "forever": + +connection master; + +create table t4 (n int); # create 3 ignored events +create table t5 (n int); +create table t6 (n int); + +save_master_pos; +connection slave; +sync_with_master; + +connection slave; + +save_master_pos; + +connection master; + +# then BUG#13023 caused hang below ("master" looks behind, while it's +# not in terms of updates done). + +sync_with_master; + +show tables; + +# cleanup + +stop slave; +reset slave; +drop table t1,t4,t5,t6; # add t2 and t3 later + +save_master_pos; +connection slave; +sync_with_master; + +# End of 4.1 tests + +# Cleanup +# The A->B->A replication causes the master to start writing relay logs +# in var/run, remove them +remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.000001; +remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.index; diff --git a/mysql-test/suite/rpl/t/rpl_empty_master_crash-master.opt b/mysql-test/suite/rpl/t/rpl_empty_master_crash-master.opt new file mode 100644 index 00000000000..cef79bc8585 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_empty_master_crash-master.opt @@ -0,0 +1 @@ +--force-restart diff --git a/mysql-test/suite/rpl/t/rpl_empty_master_crash.test b/mysql-test/suite/rpl/t/rpl_empty_master_crash.test new file mode 100644 index 00000000000..707d1eca8c2 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_empty_master_crash.test @@ -0,0 +1,15 @@ +source include/master-slave.inc; + +--replace_column 1 # 8 # 9 # 16 # 23 # 33 # +show slave status; + +# +# Load table should not succeed on the master as this is not a slave +# +--error 1218 +load table t1 from master; +connection slave; +--error 1188 +load table t1 from master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_err_ignoredtable-slave.opt b/mysql-test/suite/rpl/t/rpl_err_ignoredtable-slave.opt new file mode 100644 index 00000000000..cb49119bfcb --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_err_ignoredtable-slave.opt @@ -0,0 +1 @@ +--replicate-ignore-table=test.t1 --replicate-ignore-table=test.t2 --replicate-ignore-table=test.t3 diff --git a/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test b/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test new file mode 100644 index 00000000000..4e06a6a7096 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test @@ -0,0 +1,66 @@ +# Test for +# Bug #797: If a query is ignored on slave (replicate-ignore-table) the slave +# still checks that it has the same error as on the master. +########################################################################## +# 2006-02-07 JBM Added error code 1022 for NDB Engine + ORDER BY +########################################################################## + +-- source include/master-slave.inc + +connection master; +create table t1 (a int primary key); +create table t4 (a int primary key); +# generate an error that goes to the binlog +--error 1022, ER_DUP_ENTRY +insert into t1 values (1),(1); +insert into t4 values (1),(2); +save_master_pos; +connection slave; +# as the t1 table is ignored on the slave, the slave should be able to sync +sync_with_master; +# check that the table has been ignored, because otherwise the test is nonsense +show tables like 't1'; +show tables like 't4'; +SELECT * FROM test.t4 ORDER BY a; +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; + +# Now test that even critical errors (connection killed) +# are ignored if rules allow it. +# The "kill" idea was copied from rpl000001.test. + +connection master1; +select get_lock('crash_lock%20C', 10); + +connection master; +create table t2 (a int primary key); +insert into t2 values(1); +create table t3 (id int); +insert into t3 values(connection_id()); +send update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); + +connection master1; +real_sleep 2; +select (@id := id) - id from t3; +kill @id; +drop table t2,t3; +insert into t4 values (3),(4); +connection master; +--error 0,1053,2013 +reap; +connection master1; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t4 ORDER BY a; + +connection master1; +DROP TABLE test.t4; +save_master_pos; +connection slave; +sync_with_master; +# End of 4.1 tests +# Adding comment for force manual merge 5.0 -> wl1012. delete me if needed diff --git a/mysql-test/suite/rpl/t/rpl_events.test b/mysql-test/suite/rpl/t/rpl_events.test new file mode 100644 index 00000000000..62ffead7dcb --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_events.test @@ -0,0 +1,47 @@ +################################################################## +# Author: Giuseppe # +# Date: 2006-12-20 # +# Purpose: To test that event effects are replicated # +# in both row based and statement based format # +################################################################## + +set global event_scheduler=1; + +--source include/not_embedded.inc +--source include/master-slave.inc + +let $engine_type= MyISAM; + +set binlog_format=row; + +# Embedded server doesn't support binlogging +--source include/rpl_events.inc + +set binlog_format=statement; + +# Embedded server doesn't support binlogging +--source include/rpl_events.inc + +# +# Bug #28953 Using events in a replication let the slave crash. +# + +connection master; + +DELIMITER |; +CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR +DO BEGIN + select * from t1; +END;| +DELIMITER ;| + +ALTER EVENT event1 RENAME TO event2; + +sync_slave_with_master; + +connection master; + +DROP EVENT event2; + +sync_slave_with_master; + diff --git a/mysql-test/suite/rpl/t/rpl_extraCol_innodb-master.opt b/mysql-test/suite/rpl/t/rpl_extraCol_innodb-master.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extraCol_innodb-master.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_extraCol_innodb-slave.opt b/mysql-test/suite/rpl/t/rpl_extraCol_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extraCol_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test b/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test new file mode 100644 index 00000000000..e9685baf01b --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extraCol_innodb.test @@ -0,0 +1,13 @@ +########################################### +# Author: Jeb +# Date: 2006-09-08 +# Purpose: Wapper for rpl_extraSlave_Col.test +# Using innodb +########################################### +-- source include/have_binlog_format_row.inc +-- source include/have_innodb.inc +-- source include/master-slave.inc +let $engine_type = 'InnoDB'; +-- source extra/rpl_tests/rpl_extraSlave_Col.test + + diff --git a/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test b/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test new file mode 100644 index 00000000000..d56df394ccf --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_extraCol_myisam.test @@ -0,0 +1,12 @@ +########################################### +# Author: Jeb +# Date: 2006-09-07 +# Purpose: Wapper for rpl_extraSlave_Col.test +# Using MyISAM +########################################### +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc +let $engine_type = 'MyISAM'; +-- source extra/rpl_tests/rpl_extraSlave_Col.test + + diff --git a/mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt b/mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt new file mode 100644 index 00000000000..3f82baff598 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt @@ -0,0 +1 @@ +--loose-innodb-lock-wait-timeout=1 diff --git a/mysql-test/suite/rpl/t/rpl_failed_optimize.test b/mysql-test/suite/rpl/t/rpl_failed_optimize.test new file mode 100644 index 00000000000..81e8342b5c0 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_failed_optimize.test @@ -0,0 +1,11 @@ +####################################### +# Wrapper for rpl_failed_optimize.test# +####################################### +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=InnoDB; +-- source extra/rpl_tests/rpl_failed_optimize.test diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt new file mode 100644 index 00000000000..a4d1d403dc9 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.opt @@ -0,0 +1 @@ +-O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/master-data/relay-log diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh new file mode 100755 index 00000000000..a321dd690cd --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop-master.sh @@ -0,0 +1,5 @@ +rm -f $MYSQLTEST_VARDIR/slave-data/*-bin.* +rm -f $MYSQLTEST_VARDIR/slave-data/master.info +rm -f $MYSQLTEST_VARDIR/slave-data/*.index + + diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt new file mode 100644 index 00000000000..95839c831c9 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.opt @@ -0,0 +1 @@ +-O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/slave-data/relay-log diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh new file mode 100755 index 00000000000..e46ea6d400b --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop-slave.sh @@ -0,0 +1,4 @@ +rm -f $MYSQLTEST_VARDIR/master-data/master.info +rm -f $MYSQLTEST_VARDIR/master-data/*-bin.* +rm -f $MYSQLTEST_VARDIR/master-data/*.index + diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test new file mode 100644 index 00000000000..471c45a1aa3 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test @@ -0,0 +1,50 @@ +# Testing if "flush logs" command bouncing resulting in logs created in a loop +# in case of bi-directional replication +-- source include/master-slave.inc + +# +# Start replication master -> slave +# +# We have to sync with master, to ensure slave had time to start properly +# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log. +sync_slave_with_master; +connection slave; +--disable_warnings +stop slave; +--enable_warnings +--replace_result $MASTER_MYPORT MASTER_PORT +eval change master to master_host='127.0.0.1',master_user='root', + master_password='',master_port=$MASTER_MYPORT; +start slave; + +# +# Start replication slave -> master +# +connection master; +--disable_warnings +stop slave; +--enable_warnings +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval change master to master_host='127.0.0.1',master_user='root', + master_password='',master_port=$SLAVE_MYPORT; +start slave; + +# +# Wait for start of slave IO and SQL threads +# +let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%'; +--source include/wait_slave_status.inc + +# +# Flush logs of slave +# +flush logs; +sleep 5; + +# +# Show status of slave +# +--replace_result $SLAVE_MYPORT SLAVE_PORT +--replace_column 1 # 8 # 9 # 16 # 23 # 33 # +--vertical_results +SHOW SLAVE STATUS; diff --git a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb-slave.opt b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test new file mode 100644 index 00000000000..d085bff2012 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test @@ -0,0 +1,11 @@ +################################### +# Wrapper for rpl_foreign_key.test# +################################### +# Change Author: JBM +# Change Date: 2006-01-17 +# Change: FK not supported, skip test when NDB is forced +#################################### +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=INNODB; +-- source extra/rpl_tests/rpl_foreign_key.test diff --git a/mysql-test/suite/rpl/t/rpl_free_items-slave.opt b/mysql-test/suite/rpl/t/rpl_free_items-slave.opt new file mode 100644 index 00000000000..b828d03fafb --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_free_items-slave.opt @@ -0,0 +1 @@ +--replicate-wild-ignore-table=test.% diff --git a/mysql-test/suite/rpl/t/rpl_free_items.test b/mysql-test/suite/rpl/t/rpl_free_items.test new file mode 100644 index 00000000000..043e84160b8 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_free_items.test @@ -0,0 +1,22 @@ +source include/master-slave.inc; +create table t1 (a int); +create table t2 (a int); +disable_query_log; +SET @query="INSERT INTO t2 SELECT * FROM t1 WHERE a REGEXP \"0\""; +let $1 = 2000; +while ($1) +{ + eval SET @query=concat(@query, " OR a REGEXP '$1'"); + dec $1; +} +let $1=`select @query`; +eval $1; +enable_query_log; +# I have seen the slave crash either now or at shutdown +sync_slave_with_master; +connection master; +drop table t1; +drop table t2; +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_get_lock.test b/mysql-test/suite/rpl/t/rpl_get_lock.test new file mode 100644 index 00000000000..945bd98c993 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_get_lock.test @@ -0,0 +1,43 @@ +source include/master-slave.inc; + +create table t1(n int); +insert into t1 values(get_lock("lock",2)); +dirty_close master; +connection master1; +select get_lock("lock",2); + +select release_lock("lock"); +#ignore +disable_query_log; +let $1=2000; +while ($1) +{ + do get_lock("lock",2); + do release_lock("lock"); + dec $1; +} +enable_query_log; +save_master_pos; +connection slave; +sync_with_master; +select get_lock("lock",3); +select * from t1; +# There is no point in testing REPLICATIION of the IS_*_LOCK +# functions; slave does not run with the same concurrency context as +# master (generally in slave we can't know that on master this lock +# was already held by another connection and so that the the +# get_lock() we're replicating timed out on master hence returned 0, +# or that the is_free_lock() we're playing returned 0 etc. +# But here all we do is test these functions outside of replication. +select is_free_lock("lock"), is_used_lock("lock") = connection_id(); +explain extended select is_free_lock("lock"), is_used_lock("lock"); +# Check lock functions +select is_free_lock("lock2"); +select is_free_lock(NULL); +connection master1; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_ignore_grant-slave.opt b/mysql-test/suite/rpl/t/rpl_ignore_grant-slave.opt new file mode 100644 index 00000000000..e931bfbd37e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ignore_grant-slave.opt @@ -0,0 +1 @@ +--replicate-wild-ignore-table=mysql.% diff --git a/mysql-test/suite/rpl/t/rpl_ignore_grant.test b/mysql-test/suite/rpl/t/rpl_ignore_grant.test new file mode 100644 index 00000000000..2e6e2ce9a31 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ignore_grant.test @@ -0,0 +1,59 @@ +# Test that GRANT is not replicated to the slave +# when --replicate-wild-ignore-table=mysql.% +# In BUG#980, this test would _randomly_ fail. + +source include/master-slave.inc; + +# do not be influenced by other tests. +connection master; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; +save_master_pos; +connection slave; +sync_with_master; +# as these DELETE were not replicated, we need to do them manually on the +# slave. +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; + +# test non-replication of GRANT +connection master; +grant select on *.* to rpl_ignore_grant@localhost; +grant drop on test.* to rpl_ignore_grant@localhost; +show grants for rpl_ignore_grant@localhost; +save_master_pos; +connection slave; +sync_with_master; +--error 1141 #("no such grant for user") +show grants for rpl_ignore_grant@localhost; +# check it another way +select count(*) from mysql.user where user=_binary'rpl_ignore_grant'; +select count(*) from mysql.db where user=_binary'rpl_ignore_grant'; + +# test non-replication of SET PASSWORD +# first force creation of the user on slave (because as the user does not exist +# on slave, the SET PASSWORD may be replicated but silently do nothing; this is +# not what we want; we want it to be not-replicated). +grant select on *.* to rpl_ignore_grant@localhost; +connection master; +set password for rpl_ignore_grant@localhost=password("does it work?"); +save_master_pos; +connection slave; +sync_with_master; +select password<>_binary'' from mysql.user where user=_binary'rpl_ignore_grant'; + +# clear what we have done, to not influence other tests. +connection master; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; +save_master_pos; +connection slave; +sync_with_master; +delete from mysql.user where user=_binary'rpl_ignore_grant'; +delete from mysql.db where user=_binary'rpl_ignore_grant'; +flush privileges; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_ignore_revoke-slave.opt b/mysql-test/suite/rpl/t/rpl_ignore_revoke-slave.opt new file mode 100644 index 00000000000..e931bfbd37e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ignore_revoke-slave.opt @@ -0,0 +1 @@ +--replicate-wild-ignore-table=mysql.% diff --git a/mysql-test/suite/rpl/t/rpl_ignore_revoke.test b/mysql-test/suite/rpl/t/rpl_ignore_revoke.test new file mode 100644 index 00000000000..00171605a92 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ignore_revoke.test @@ -0,0 +1,51 @@ +# test verifies that REVOKE must not be replicated when +# slave server starts with --replicate-wild-ignore-table=mysql.% +# the option is set in rpl_ignore_revoke-slave.opt +# The first part of BUG#9483 for GRANT is checked by +# existed specific rpl_ignore_grant test case (BUG#980) + + +source include/master-slave.inc; + +### CLEAN-UP: create an account and manually duplicate it on the slave + +connection master; +grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; +revoke select on *.* from 'user_foo'@'%'; +select select_priv from mysql.user where user='user_foo' /* master:must be N */; + +sync_slave_with_master; +#connection slave; +grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; +revoke select on *.* from 'user_foo'@'%'; +select select_priv from mysql.user where user='user_foo' /* slave:must be N */; + + +### TEST + +#connection slave; +grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; +select select_priv from mysql.user where user='user_foo' /* slave:must be Y */; + +connection master; +revoke select on *.* from 'user_foo'; +select select_priv from mysql.user where user='user_foo' /* master:must be N */; + +sync_slave_with_master; +#connection slave; +select select_priv from mysql.user where user='user_foo' /* slave:must get Y */; + +### CLEAN-UP + +connection slave; +--disable_abort_on_error +revoke select on *.* FROM 'user_foo'; +--enable_abort_on_error + +connection master; +delete from mysql.user where user="user_foo"; +sync_slave_with_master; + +# Since changes to mysql.* are ignored, the revoke need to +# be done on slave as well +delete from mysql.user where user="user_foo"; diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table-slave.opt b/mysql-test/suite/rpl/t/rpl_ignore_table-slave.opt new file mode 100644 index 00000000000..3aabbb2e0f5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ignore_table-slave.opt @@ -0,0 +1 @@ +--replicate-ignore-table=test.t1 --replicate-ignore-table=test.t2 --replicate-ignore-table=test.t3 --replicate-wild-ignore-table=%.tmptbl% diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table.test b/mysql-test/suite/rpl/t/rpl_ignore_table.test new file mode 100644 index 00000000000..fd4ae64165a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test @@ -0,0 +1,164 @@ +source include/master-slave.inc; + +# +# BUG#16487 +# +# Requirement: +# Multi-updates on ignored tables should not fail even if the slave does +# not have the ignored tables. +# +# Note table t1, t2, and t3 are ignored in the option file to this test. +# + +--echo **** Test case for BUG#16487 **** +--echo **** Master **** +connection master; +CREATE TABLE test.t4 (a int); +CREATE TABLE test.t1 (a int); + +# Expect: The row must *not* by updated on slave, since t1 is ignored +UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5; + +--echo **** Slave **** +sync_slave_with_master; +SELECT * FROM t4; + +# Cleanup +connection master; +DROP TABLE t1; +DROP TABLE t4; + +sync_slave_with_master; + + +# +# Bug#25482 GRANT statements are not replicated if +# you use "replicate-ignore-table" +# + +--echo **** Test case for BUG#25482 **** +--echo **** Adding GRANTS on master **** + +connection master; +create table test.t1(a int); +create table test.t4(a int); + +# Simple user that should not replicate +GRANT SELECT ON test.t1 TO mysqltest1@localhost; + +# Partial replicate +GRANT INSERT ON test.t4 TO mysqltest2@localhost; +GRANT select, update, insert, references on t1 + to mysqltest2@localhost; + +# Partial replicate 2 +GRANT SELECT ON test.* TO mysqltest3@localhost; +GRANT INSERT ON test.t4 TO mysqltest3@localhost; +GRANT select(a), update(a), insert(a), references(a) on t4 + to mysqltest3@localhost; + +# Create another database and table +create database mysqltest2; +create table mysqltest2.t2 (id int); +# Create a grant that should replicate +GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; + +# Create a grant manually +insert into mysql.user (user, host) values ("mysqltest5", "somehost"); + +# Partial replicate 3 with *.* +GRANT SELECT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON test.* TO mysqltest6@localhost; +GRANT INSERT ON test.t1 TO mysqltest6@localhost; + +show grants for mysqltest1@localhost; +show grants for mysqltest2@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; +show grants for mysqltest6@localhost; + +flush privileges; +show grants for mysqltest5@somehost; + + +sync_slave_with_master; + +--echo **** Checking grants on slave **** + +# Check that grants are replicated to slave +show grants for mysqltest2@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; +show grants for mysqltest5@somehost; +show grants for mysqltest6@localhost; + +# mysqltest1 should not be on slave +--error 1141 +show grants for mysqltest1@localhost; + +--echo **** Revoking grants on master **** +connection master; +REVOKE SELECT ON test.t1 FROM mysqltest1@localhost; +REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost; +REVOKE select(a) on t4 + from mysqltest3@localhost; + +show grants for mysqltest1@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; + +sync_slave_with_master; + +--echo **** Checking grants on slave **** + +# mysqltest1 should not be on slave +--error 1141 +show grants for mysqltest1@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; + +# Cleanup +connection master; +drop table t1, t4, mysqltest2.t2; +drop database mysqltest2; +delete from mysql.user where user like "mysqltest%"; +delete from mysql.db where user like "mysqltest%"; +# +# BUG 27606 causes failure to replicate this statement +# move it to slave instead +#delete from mysql.tables_priv where user like "mysqltest%"; +delete from mysql.columns_priv where user like "mysqltest%"; +sync_slave_with_master; + +#BUG27606 +delete from mysql.tables_priv where user like "mysqltest%"; + +connection master; + +#BUG27606 +delete from mysql.tables_priv where user like "mysqltest%"; + +# +# bug#22877 replication character sets get out of sync +# using replicate-wild-ignore-table +# +connection master; +--disable_warnings +DROP TABLE IF EXISTS t5; +--enable_warnings +CREATE TABLE t5 ( + word varchar(50) collate utf8_unicode_ci NOT NULL default '' +) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +SET @@session.character_set_client=33,@@session.collation_connection=192; +CREATE TEMPORARY TABLE tmptbl504451f4258$1 (id INT NOT NULL) ENGINE=MEMORY; +INSERT INTO t5 (word) VALUES ('TEST’'); +SELECT HEX(word) FROM t5; +sync_slave_with_master; +connection slave; +SELECT HEX(word) FROM t5; +--error 1146 +SELECT * FROM tmptbl504451f4258$1; +connection master; +DROP TABLE t5; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table_update-slave.opt b/mysql-test/suite/rpl/t/rpl_ignore_table_update-slave.opt new file mode 100644 index 00000000000..177f89e0910 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ignore_table_update-slave.opt @@ -0,0 +1 @@ +--replicate-ignore-table=test.mysqltest_foo diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table_update.test b/mysql-test/suite/rpl/t/rpl_ignore_table_update.test new file mode 100644 index 00000000000..fe030f90411 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ignore_table_update.test @@ -0,0 +1,38 @@ +# This one assumes we are ignoring updates on table mysqltest_foo, but doing +# the ones on all other tables + +source include/master-slave.inc; +connection slave; + +# +# For this test we must be in the test database +# +use test; + +--disable_warnings +drop table if exists mysqltest_foo; +drop table if exists mysqltest_bar; +--enable_warnings + +create table mysqltest_foo (n int); +insert into mysqltest_foo values(4); +connection master; +use test; +create table mysqltest_foo (n int); +insert into mysqltest_foo values(5); +create table mysqltest_bar (m int); +insert into mysqltest_bar values(15); +create table t1 (k int); +insert into t1 values(55); +save_master_pos; +connection slave; +sync_with_master; +select mysqltest_foo.n,mysqltest_bar.m,t1.k from mysqltest_foo,mysqltest_bar,t1; +connection master; +drop table mysqltest_foo,mysqltest_bar,t1; +save_master_pos; +connection slave; +sync_with_master; +drop table mysqltest_foo,mysqltest_bar,t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_incident-master.opt b/mysql-test/suite/rpl/t/rpl_incident-master.opt new file mode 100644 index 00000000000..912801debc4 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_incident-master.opt @@ -0,0 +1 @@ +--loose-debug=+d,incident_database_resync_on_replace diff --git a/mysql-test/suite/rpl/t/rpl_incident.test b/mysql-test/suite/rpl/t/rpl_incident.test new file mode 100644 index 00000000000..507cd0e0798 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_incident.test @@ -0,0 +1,42 @@ +--source include/master-slave.inc +--source include/have_debug.inc + +--echo **** On Master **** +CREATE TABLE t1 (a INT); + +INSERT INTO t1 VALUES (1),(2),(3); +SELECT * FROM t1; + +# This will generate an incident log event and store it in the binary +# log before the replace statement. +REPLACE INTO t1 VALUES (4); +--save_master_pos +SELECT * FROM t1; + +connection slave; +--wait_for_slave_to_stop + +# The 4 should not be inserted into the table, since the incident log +# event should have stop the slave. +--echo **** On Slave **** +SELECT * FROM t1; + +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS + +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; +--sync_with_master + +# Now, we should have inserted the row into the table and the slave +# should be running. We should also have rotated to a new binary log. + +SELECT * FROM t1; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS + +connection master; +DROP TABLE t1; +--sync_slave_with_master diff --git a/mysql-test/suite/rpl/t/rpl_init_slave-slave.opt b/mysql-test/suite/rpl/t/rpl_init_slave-slave.opt new file mode 100644 index 00000000000..337e8a60d97 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_init_slave-slave.opt @@ -0,0 +1 @@ +--init-slave="set global max_connections=500" diff --git a/mysql-test/suite/rpl/t/rpl_init_slave.test b/mysql-test/suite/rpl/t/rpl_init_slave.test new file mode 100644 index 00000000000..139b4902e12 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_init_slave.test @@ -0,0 +1,34 @@ +source include/master-slave.inc; + +# +# Test of init_slave variable +# + +save_master_pos; +connection slave; +sleep 1; +show variables like 'init_slave'; +show variables like 'max_connections'; +sync_with_master; +reset master; +connection master; +show variables like 'init_slave'; +show variables like 'max_connections'; +save_master_pos; +connection slave; +sync_with_master; +# Save variable value +set @my_global_init_connect= @@global.init_connect; +set global init_connect="set @c=1"; +show variables like 'init_connect'; +connection master; +save_master_pos; +connection slave; +sync_with_master; +stop slave; + +# Restore changed global variable +set global init_connect= @my_global_init_connect; +set global max_connections= default; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_innodb.test b/mysql-test/suite/rpl/t/rpl_innodb.test new file mode 100644 index 00000000000..b88276e2107 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_innodb.test @@ -0,0 +1,48 @@ +# File for specialities regarding replication from or to InnoDB +# tables. + +source include/master-slave.inc; +source include/have_innodb.inc; + +# +# Bug#11401: Load data infile 'REPLACE INTO' fails on slave. +# +connection master; +CREATE TABLE t4 ( + id INT(5) unsigned NOT NULL auto_increment, + name varchar(15) NOT NULL default '', + number varchar(35) NOT NULL default 'default', + PRIMARY KEY (id), + UNIQUE KEY unique_rec (name,number) +) ENGINE=InnoDB; + +--disable_warnings +LOAD DATA + INFILE '../std_data_ln/loaddata_pair.dat' + REPLACE INTO TABLE t4 + (name,number); +--enable_warnings +SELECT * FROM t4; + +sync_slave_with_master; +SELECT * FROM t4; + +connection master; +--disable_warnings +LOAD DATA + INFILE '../std_data_ln/loaddata_pair.dat' + REPLACE INTO TABLE t4 + (name,number); +--enable_warnings +SELECT * FROM t4; + +sync_slave_with_master; +SELECT * FROM t4; + +connection master; +--disable_query_log +DROP TABLE t4; +--enable_query_log +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_insert.test b/mysql-test/suite/rpl/t/rpl_insert.test new file mode 100644 index 00000000000..0d471a0e0a9 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_insert.test @@ -0,0 +1,44 @@ +--echo # +--echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog +--echo # + +--source include/master-slave.inc +--source include/not_embedded.inc +--source include/not_windows.inc + +--disable_warnings +CREATE SCHEMA IF NOT EXISTS mysqlslap; +USE mysqlslap; +--enable_warnings + +CREATE TABLE t1 (id INT, name VARCHAR(64)); + +let $query = "INSERT DELAYED INTO t1 VALUES (1, 'Dr. No'), (2, 'From Russia With Love'), (3, 'Goldfinger'), (4, 'Thunderball'), (5, 'You Only Live Twice')"; +--exec $MYSQL_SLAP --silent --concurrency=5 --iterations=200 --query=$query --delimiter=";" + +# Wait until all the 5000 inserts has been inserted into the table +--disable_query_log +let $counter= 300; # Max 30 seconds wait +while (`select count(*)!=5000 from mysqlslap.t1`) +{ + sleep 0.1; + dec $counter; + if (!$counter) + { + Number of records in t1 didnt reach 5000; + } +} +--enable_query_log + +SELECT COUNT(*) FROM mysqlslap.t1; +sync_slave_with_master; +SELECT COUNT(*) FROM mysqlslap.t1; + +--echo # +--echo # Cleanup +--echo # + +connection master; +USE test; +DROP SCHEMA mysqlslap; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_insert_id-slave.opt b/mysql-test/suite/rpl/t/rpl_insert_id-slave.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_insert_id-slave.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_insert_id.test b/mysql-test/suite/rpl/t/rpl_insert_id.test new file mode 100644 index 00000000000..bfd66431d3c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_insert_id.test @@ -0,0 +1,11 @@ +################################# +# Wrapper for rpl_insert_id.test# +################################# +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=innodb; +-- source extra/rpl_tests/rpl_insert_id.test diff --git a/mysql-test/suite/rpl/t/rpl_insert_id_pk-slave.opt b/mysql-test/suite/rpl/t/rpl_insert_id_pk-slave.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_insert_id_pk-slave.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_insert_id_pk.test b/mysql-test/suite/rpl/t/rpl_insert_id_pk.test new file mode 100644 index 00000000000..01f30b78ac5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_insert_id_pk.test @@ -0,0 +1,11 @@ +################################# +# Wrapper for rpl_insert_id.test# +################################# +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=innodb; +-- source extra/rpl_tests/rpl_insert_id_pk.test diff --git a/mysql-test/suite/rpl/t/rpl_insert_ignore-slave.opt b/mysql-test/suite/rpl/t/rpl_insert_ignore-slave.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_insert_ignore-slave.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_insert_ignore.test b/mysql-test/suite/rpl/t/rpl_insert_ignore.test new file mode 100644 index 00000000000..dc8994b82f3 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_insert_ignore.test @@ -0,0 +1,8 @@ +##################################### +# Wrapper for rpl_insert_ignore.test# +##################################### +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=innodb; +let $engine_type2=myisam; +-- source extra/rpl_tests/rpl_insert_ignore.test diff --git a/mysql-test/suite/rpl/t/rpl_insert_select.test b/mysql-test/suite/rpl/t/rpl_insert_select.test new file mode 100644 index 00000000000..677be526982 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_insert_select.test @@ -0,0 +1,19 @@ +# Testcase for BUG#10456 - INSERT INTO ... SELECT violating a primary key +# breaks replication + +-- source include/master-slave.inc +connection master; + +create table t1 (n int not null primary key); +insert into t1 values (1); +create table t2 (n int); +insert into t2 values (1); +insert ignore into t1 select * from t2; +insert into t1 values (2); +sync_slave_with_master; +connection slave; +select * from t1; + +connection master; +drop table t1,t2; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt b/mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt new file mode 100644 index 00000000000..d4ba386a1a0 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection-master.opt @@ -0,0 +1 @@ +--loose-debug=d,pretend_version_50034_in_binlog diff --git a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test new file mode 100644 index 00000000000..b300603f454 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test @@ -0,0 +1,93 @@ +# Test to see if slave can detect certain known bugs present +# on the master, and appropriately decides to stop +# (assuming the bug is fixed in the slave, slave cannot of course +# imitate the bug, so it has to stop). + +source include/have_debug.inc; +source include/master-slave.inc; + +# Currently only statement-based-specific bugs are here +-- source include/have_binlog_format_mixed_or_statement.inc + +# +# This is to test that slave properly detects if +# master may suffer from: +# BUG#24432 "INSERT... ON DUPLICATE KEY UPDATE skips auto_increment values" +# (i.e. on master, INSERT ON DUPLICATE KEY UPDATE is used and manipulates +# an auto_increment column, and is binlogged statement-based). +# + +# testcase with INSERT VALUES +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, +UNIQUE(b)); +sync_slave_with_master; +connection master; +INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; +SELECT * FROM t1; +connection slave; +--source include/wait_for_slave_sql_to_stop.inc +# show the error message +--replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 # +--query_vertical show slave status; +# show that it was not replicated +SELECT * FROM t1; + +# restart replication for the next testcase +stop slave; +reset slave; +connection master; +reset master; +drop table t1; +connection slave; +start slave; + +# testcase with INSERT SELECT +connection master; +CREATE TABLE t1 ( + id bigint(20) unsigned NOT NULL auto_increment, + field_1 int(10) unsigned NOT NULL, + field_2 varchar(255) NOT NULL, + field_3 varchar(255) NOT NULL, + PRIMARY KEY (id), + UNIQUE KEY field_1 (field_1, field_2) +); +CREATE TABLE t2 ( + field_a int(10) unsigned NOT NULL, + field_b varchar(255) NOT NULL, + field_c varchar(255) NOT NULL +); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (1, 'a', '1a'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (2, 'b', '2b'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d'); +INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e'); +sync_slave_with_master; +connection master; +# Updating table t1 based on values from table t2 +INSERT INTO t1 (field_1, field_2, field_3) +SELECT t2.field_a, t2.field_b, t2.field_c +FROM t2 +ON DUPLICATE KEY UPDATE +t1.field_3 = t2.field_c; +# Inserting new record into t2 +INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f'); +# Updating t1 again +INSERT INTO t1 (field_1, field_2, field_3) +SELECT t2.field_a, t2.field_b, t2.field_c +FROM t2 +ON DUPLICATE KEY UPDATE +t1.field_3 = t2.field_c; +SELECT * FROM t1; +connection slave; +--source include/wait_for_slave_sql_to_stop.inc +# show the error message +--replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 # +--query_vertical show slave status; +# show that it was not replicated +SELECT * FROM t1; +connection master; +drop table t1, t2; +connection slave; +drop table t1, t2; + +# End of 5.0 tests diff --git a/mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt b/mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt new file mode 100644 index 00000000000..c015c02ba78 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_load_from_master-slave.opt @@ -0,0 +1 @@ +--replicate-wild-do-table=mysqltest.% diff --git a/mysql-test/suite/rpl/t/rpl_load_from_master.test b/mysql-test/suite/rpl/t/rpl_load_from_master.test new file mode 100644 index 00000000000..9bab7d5696e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_load_from_master.test @@ -0,0 +1,180 @@ +# This one assumes we are ignoring updates on tables in database mysqltest2, +# but doing the ones in database mysqltest +################################################################# +# Change Author: JBM +# Change Date: 2006-02-02 +# Change: Added ENGINE=MyISAM +# Reason: LOAD from master is only supported by MyISAM +################################################################# + +source include/master-slave.inc; +--disable_warnings +drop database if exists mysqltest; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +connection slave; +drop database if exists mysqltest; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +connection master; +create database mysqltest2; +create database mysqltest; +--enable_warnings + +save_master_pos; +connection slave; +sync_with_master; +create database mysqltest2; +create table mysqltest2.foo (n int)ENGINE=MyISAM; +insert into mysqltest2.foo values(4); +connection master; +create table mysqltest2.foo (n int)ENGINE=MyISAM; +insert into mysqltest2.foo values(5); +create table mysqltest.bar (m int)ENGINE=MyISAM; +insert into mysqltest.bar values(15); +save_master_pos; +connection slave; +sync_with_master; +select mysqltest2.foo.n,mysqltest.bar.m from mysqltest2.foo,mysqltest.bar; +connection master; +drop database mysqltest; +drop database if exists mysqltest2; +save_master_pos; +connection slave; +sync_with_master; +--error 1008 +drop database mysqltest; +drop database mysqltest2; + +# Now let's test load data from master + +# First create some databases and tables on the master + +connection master; +set sql_log_bin = 0; +create database mysqltest2; +create database mysqltest; +show databases; +create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; +create table mysqltest2.t2(n int, s text)ENGINE=MyISAM; +insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three'); +insert into mysqltest2.t2 values (11, 'eleven'), (12, 'twelve'), (13, 'thirteen'); + +create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; +create table mysqltest.t2(n int, s text)ENGINE=MyISAM; +insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three test'); +insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'), + (13, 'thirteen test'); +set sql_log_bin = 1; +save_master_pos; +connection slave; +sync_with_master; + +# This should show that the slave is empty at this point +show databases; +# Create mysqltest2 and mysqltest3 on slave; we expect that LOAD DATA FROM +# MASTER will neither touch database mysqltest nor mysqltest3 +create database mysqltest2; +create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; +insert into mysqltest2.t1 values (1, 'original foo.t1'); +create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM; +insert into mysqltest2.t3 values (1, 'original foo.t3'); +create database mysqltest3; +create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM; +insert into mysqltest3.t1 values (1, 'original foo2.t1'); + +# Create mysqltest, and mysqltest.t1, to check that it gets replaced, +# and mysqltest.t3 to check that it is not touched (there is no +# mysqltest.t3 on master) +create database mysqltest; +create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; +insert into mysqltest.t1 values (1, 'original bar.t1'); +create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM; +insert into mysqltest.t3 values (1, 'original bar.t3'); + +load data from master; + +# Now let's check if we have the right tables and the right data in them +show databases; +use mysqltest2; + +# LOAD DATA FROM MASTER uses only replicate_*_db rules to decide which +# databases have to be copied. So it thinks "mysqltest" has to be +# copied. Before 4.0.16 it would first drop "mysqltest", then create +# "mysqltest". This "drop" is a bug; in that case t3 would disappear. So +# here the effect of this bug (BUG#1248) would be to leave an empty +# "mysqltest" on the slave. + +show tables; # should be t1 & t3 +select * from t1; # should be slave's original +use mysqltest3; +show tables; # should be t1 +select * from t1; # should be slave's original +use mysqltest; +show tables; # should contain master's copied t1&t2, slave's original t3 +select * from mysqltest.t1; +select * from mysqltest.t2; +select * from mysqltest.t3; + +# Now let's see if replication works +connection master; +insert into mysqltest.t1 values (4, 'four test'); +save_master_pos; +connection slave; +sync_with_master; +select * from mysqltest.t1; + +# Check that LOAD DATA FROM MASTER is able to create master.info +# if needed (if RESET SLAVE was used before), before writing to it (BUG#2922). + +stop slave; +reset slave; +load data from master; +start slave; +# see if replication coordinates were restored fine +connection master; +insert into mysqltest.t1 values (5, 'five bar'); +save_master_pos; +connection slave; +sync_with_master; +select * from mysqltest.t1; + +# Check that LOAD DATA FROM MASTER reports the error if it can't drop a +# table to be overwritten. +# DISABLED FOR NOW AS chmod IS NOT PORTABLE ON NON-UNIX +# insert into mysqltest.t1 values(10, 'should be there'); +# flush tables; +# system chmod 500 $MYSQLTEST_VARDIR/slave-data/mysqltest/; +# --error 6 +# load data from master; # should fail (errno 13) +# system chmod 700 $MYSQLTEST_VARDIR/slave-data/mysqltest/; +# select * from mysqltest.t1; # should contain the row (10, ...) + + +# Check that LOAD TABLE FROM MASTER fails if the table exists on slave +--error 1050 +load table mysqltest.t1 from master; +drop table mysqltest.t1; +load table mysqltest.t1 from master; + +# Check what happens when requestion not existing table +# +--error 1188 +load table bar.t1 from master; + +# as LOAD DATA FROM MASTER failed it did not restart slave threads +# DISABLED FOR NOW +# start slave; + +# Now time for cleanup +connection master; +drop database mysqltest; +drop database mysqltest2; +save_master_pos; +connection slave; +sync_with_master; +# These have to be dropped on slave because they are not replicated +drop database mysqltest2; +drop database mysqltest3; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_load_table_from_master.test b/mysql-test/suite/rpl/t/rpl_load_table_from_master.test new file mode 100644 index 00000000000..b9cec3858a9 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_load_table_from_master.test @@ -0,0 +1,98 @@ +########################################################### +# Change Author: JBM +# Change Date: 2006-2-2 +# Change: Added ENGINE=$engine_type for first create table +# Reason: Only MyISAM supports load from master no need to +# run test case for other engines, in addition test will +# fail if other engines are set as default engine +########################################################### +# Change Author: JBM +# Change Date: 2006-2-3 +# Change: removed ENGINE=$engine_type for first create table +# and renamed test file to rpl_load_table_from_master.test. +# In addition added test requirements. +# Reason: Request from review. +############################################################ +# REQUIREMENT TEST 1: +# LOAD TABLE FROM MASTER must work with a forced timestamp. +############################################################ +# +# Test forced timestamp +# +-- source include/master-slave.inc + +-- echo "******************** Test Requirment 1 *************" + +# Don't log table creating to the slave as we want to test LOAD TABLE +SET SQL_LOG_BIN=0,timestamp=200006; +eval CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM; +INSERT INTO t1 ( a) VALUE ('F'); +select unix_timestamp(t) from t1; +connection slave; +load table t1 from master; +select unix_timestamp(t) from t1; + +# Delete the created table on master and slave +connection master; +set SQL_LOG_BIN=1,timestamp=default; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; +connection master; + +# +# Test copying table with checksum +# + +# Don't log table creating to the slave as we want to test LOAD TABLE +set SQL_LOG_BIN=0; + +####################################################### +# REQUIREMENTi TEST 2: +#LOAD TABLE FROM MASTER must work with table checksum +####################################################### +-- echo "******************** Test Requirment 2 *************" + +eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; +INSERT INTO t1 VALUES (1); +save_master_pos; +connection slave; +sync_with_master; +load table t1 from master; +check table t1; +drop table t1; +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; + +connection master; +set SQL_LOG_BIN=0; +create table t1 (word char(20) not null, index(word))ENGINE=MyISAM; +load data infile '../std_data_ln/words.dat' into table t1; +create table t2 (word char(20) not null)ENGINE=MyISAM; +load data infile '../std_data_ln/words.dat' into table t2; +create table t3 (word char(20) not null primary key)ENGINE=MyISAM; +connection slave; +load table t1 from master; +load table t2 from master; +load table t3 from master; +check table t1; +select count(*) from t2; +select count(*) from t3; +connection master; +set SQL_LOG_BIN=1; +drop table if exists t1,t2,t3; +save_master_pos; +connection slave; +sync_with_master; +create table t1(n int); +drop table t1; + + + + + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_loaddata.test b/mysql-test/suite/rpl/t/rpl_loaddata.test new file mode 100644 index 00000000000..6f9ee4ef80a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loaddata.test @@ -0,0 +1,7 @@ +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +let $engine_type=MyISAM; +-- source extra/rpl_tests/rpl_loaddata.test diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_charset.test b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test new file mode 100644 index 00000000000..7f2389cb9f6 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loaddata_charset.test @@ -0,0 +1,33 @@ +# +# Check LOAD DATA + character sets + replication +# +source include/master-slave.inc; + +# +# Bug#15126 character_set_database is not replicated +# (LOAD DATA INFILE need it) +# +connection master; +create table t1 (a varchar(10) character set utf8); +load data infile '../std_data_ln/loaddata6.dat' into table t1; +set @@character_set_database=koi8r; +load data infile '../std_data_ln/loaddata6.dat' into table t1; +set @@character_set_database=DEFAULT; +load data infile '../std_data_ln/loaddata6.dat' into table t1; +load data infile '../std_data_ln/loaddata6.dat' into table t1; +load data infile '../std_data_ln/loaddata6.dat' into table t1; +set @@character_set_database=koi8r; +load data infile '../std_data_ln/loaddata6.dat' into table t1; +set @@character_set_database=DEFAULT; +load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8r; + +select hex(a) from t1; + +save_master_pos; +connection slave; +sync_with_master; + +select hex(a) from t1; +connection master; +drop table t1; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_m-master.opt b/mysql-test/suite/rpl/t/rpl_loaddata_m-master.opt new file mode 100644 index 00000000000..9d4a8f0b95e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loaddata_m-master.opt @@ -0,0 +1 @@ +--binlog_ignore_db=test diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_m.test b/mysql-test/suite/rpl/t/rpl_loaddata_m.test new file mode 100644 index 00000000000..537d4c163ef --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loaddata_m.test @@ -0,0 +1,52 @@ +# See if the master logs LOAD DATA INFILE correctly when binlog_*_db rules +# exist. +# This is for BUG#1100 (LOAD DATA INFILE was half-logged). +###################################################### +# Change Author: JBM +# Change Date: 2005-12-22 +# Change: Test rewritten to remove show binlog events +# and to test the option better + Cleanup +###################################################### +-- source include/master-slave.inc + +--disable_warnings +drop database if exists mysqltest; +--enable_warnings + +connection master; +# 'test' database should be ignored by the slave +USE test; +CREATE TABLE t1(a INT, b INT, UNIQUE(b)); +LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE test.t1; +SELECT COUNT(*) FROM test.t1; + +# 'mysqltest' database should NOT be ignored by the slave +CREATE DATABASE mysqltest; +USE mysqltest; +CREATE TABLE t1(a INT, b INT, UNIQUE(b)); +LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE mysqltest.t1; +SELECT COUNT(*) FROM mysqltest.t1; + +# Now lets check the slave to see what we have :-) +save_master_pos; +connection slave; +sync_with_master; + +SHOW DATABASES; + +USE test; +SHOW TABLES; + +USE mysqltest; +SHOW TABLES; +SELECT COUNT(*) FROM mysqltest.t1; + +#show binlog events; + +# Cleanup +connection master; +DROP DATABASE mysqltest; +DROP TABLE test.t1; +sync_slave_with_master; + +# End of test diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_s-slave.opt b/mysql-test/suite/rpl/t/rpl_loaddata_s-slave.opt new file mode 100644 index 00000000000..9d4a8f0b95e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loaddata_s-slave.opt @@ -0,0 +1 @@ +--binlog_ignore_db=test diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_s.test b/mysql-test/suite/rpl/t/rpl_loaddata_s.test new file mode 100644 index 00000000000..f397d741310 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loaddata_s.test @@ -0,0 +1,28 @@ +# See if the slave logs (in its own binlog, with --log-slave-updates) a +# replicated LOAD DATA INFILE correctly when it has binlog_*_db rules. +# This is for BUG#1100 (LOAD DATA INFILE was half-logged). + +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/master-slave.inc + +connection slave; +# Not sure why we connect to slave and then try to reset master, but I will leave it [JBM] +reset master; + +connection master; +# 'test' is the current database +create table test.t1(a int, b int, unique(b)); +load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1; + +# Test logging on slave; + +save_master_pos; +connection slave; +sync_with_master; +select count(*) from test.t1; # check that LOAD was replicated +source include/show_binlog_events.inc; + +# Cleanup +connection master; +drop table test.t1; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_simple.test b/mysql-test/suite/rpl/t/rpl_loaddata_simple.test new file mode 100644 index 00000000000..9e908cac677 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loaddata_simple.test @@ -0,0 +1,14 @@ +--source include/master-slave.inc + +CREATE TABLE t1 (word CHAR(20) NOT NULL); +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; +SELECT * FROM t1 ORDER BY word; +sync_slave_with_master; + +# Check +SELECT * FROM t1 ORDER BY word; + +# Cleanup +connection master; +drop table t1; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_loaddatalocal.test b/mysql-test/suite/rpl/t/rpl_loaddatalocal.test new file mode 100644 index 00000000000..b10603e7195 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loaddatalocal.test @@ -0,0 +1,65 @@ +# See if "LOAD DATA LOCAL INFILE" is well replicated +# (LOAD DATA LOCAL INFILE is not written to the binlog +# the same way as LOAD DATA INFILE : Append_blocks are smaller). +# In MySQL 4.0 <4.0.12 there were 2 bugs with LOAD DATA LOCAL INFILE : +# - the loaded file was not written entirely to the master's binlog, +# only the first 4KB, 8KB or 16KB usually. +# - the loaded file's first line was not written entirely to the +# master's binlog (1st char was absent) +source include/master-slave.inc; + +create table t1(a int); +let $1=10000; +disable_query_log; +set SQL_LOG_BIN=0; +while ($1) +{ + insert into t1 values(1); + dec $1; +} +set SQL_LOG_BIN=1; +enable_query_log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; +#This will generate a 20KB file, now test LOAD DATA LOCAL +truncate table t1; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; +--remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile +save_master_pos; +connection slave; +sync_with_master; +select a,count(*) from t1 group by a; +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; + +# End of 4.1 tests + +# +# Now let us test how well we replicate LOAD DATA LOCAL in situation when +# we met duplicates in tables to which we are adding rows. +# (It supposed that LOAD DATA LOCAL ignores such errors) +# +connection master; +create table t1(a int); +insert into t1 values (1), (2), (2), (3); +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; +drop table t1; +create table t1(a int primary key); +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; +--remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile +SELECT * FROM t1 ORDER BY a; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM t1 ORDER BY a; +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_loadfile.test b/mysql-test/suite/rpl/t/rpl_loadfile.test new file mode 100644 index 00000000000..a671bab15bb --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loadfile.test @@ -0,0 +1,52 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/18/2005 # +############################################################################# +# TEST: To test the LOAD_FILE() in rbr # +############################################################################# +# Change Author: JBM +# Change Date: 2006-01-16 +# Change: Added Order by for NDB +########## + +# Includes +-- source include/master-slave.inc + + +# Begin clean up test section +--disable_warnings +connection master; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +--enable_warnings + +# Section 1 test + +CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES(1,'test'); +UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=1; +delimiter |; +create procedure test.p1() +begin + INSERT INTO test.t1 VALUES(2,'test'); + UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=2; +end| +delimiter ;| + +CALL test.p1(); +SELECT * FROM test.t1 ORDER BY blob_column; +save_master_pos; +# Need to allow some time when NDB engine is used for +# the injector thread to have time to populate binlog +sleep 10; +sync_slave_with_master; +connection slave; +SELECT * FROM test.t1 ORDER BY blob_column; + +# Cleanup +connection master; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE test.t1; +sync_slave_with_master; + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_locale.test b/mysql-test/suite/rpl/t/rpl_locale.test new file mode 100644 index 00000000000..2f2d637e1b4 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_locale.test @@ -0,0 +1,24 @@ +# Replication of locale variables + +source include/master-slave.inc; + +# +# Bug#22645 LC_TIME_NAMES: Statement not replicated +# +connection master; +create table t1 (s1 char(10)); +set lc_time_names= 'de_DE'; +insert into t1 values (date_format('2001-01-01','%W')); +set lc_time_names= 'en_US'; +insert into t1 values (date_format('2001-01-01','%W')); +select * from t1; +sync_slave_with_master; +connection slave; +select * from t1; +connection master; +drop table t1; +sync_slave_with_master; + +# End of 4.1 tests + + diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test new file mode 100644 index 00000000000..2c6c1d9868d --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_log_pos.test @@ -0,0 +1,57 @@ +########## +# Change Author: JBM +# Change Date: 2006-01-16 +# Change: Added Order by for NDB +########## + +# +# Testing of setting slave to wrong log position with master_log_pos +# + +# Passes with rbr no problem, removed statement include [jbm] + +source include/master-slave.inc; +--replace_column 3 +show master status; +sync_slave_with_master; + +stop slave; +--source include/wait_for_slave_to_stop.inc + +change master to master_log_pos=75; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 23 # 33 # +query_vertical show slave status; + +start slave; +let $slave_param= Slave_SQL_Running; +let $slave_param_value= Yes; +--source include/wait_for_slave_param.inc +let $slave_param= Slave_IO_Running; +let $slave_param_value= No; +--source include/wait_for_slave_param.inc +stop slave; +--source include/wait_for_slave_to_stop.inc + +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 23 # 33 # +query_vertical show slave status; + +connection master; +--replace_column 3 +show master status; +create table if not exists t1 (n int); +drop table if exists t1; +create table t1 (n int); +insert into t1 values (1),(2),(3); +save_master_pos; +connection slave; +change master to master_log_pos=106; +start slave; +sync_with_master; +select * from t1 ORDER BY n; +connection master; +drop table t1; +sync_slave_with_master; + +--echo End of 5.0 tests diff --git a/mysql-test/suite/rpl/t/rpl_many_optimize.test b/mysql-test/suite/rpl/t/rpl_many_optimize.test new file mode 100644 index 00000000000..91fab0b27a8 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_many_optimize.test @@ -0,0 +1,22 @@ +# Test for BUG#7658 "optimize crashes slave thread (1 in 1000)]" + +source include/master-slave.inc; + +create table t1 (a int not null auto_increment primary key, b int, key(b)); +INSERT INTO t1 (a) VALUES (1),(2); +# Now many OPTIMIZE to test if we crash (BUG#7658) +let $1=300; +disable_query_log; +disable_result_log; +while ($1) +{ + eval OPTIMIZE TABLE t1; + dec $1; +} +enable_result_log; +enable_query_log; +drop table t1; +# Bug was that slave segfaulted after ~ a hundred of OPTIMIZE (or ANALYZE) +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_master_pos_wait.test b/mysql-test/suite/rpl/t/rpl_master_pos_wait.test new file mode 100644 index 00000000000..893c8746efc --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_master_pos_wait.test @@ -0,0 +1,18 @@ +# See if master_pos_wait(,,timeout) +# Terminates with "timeout expired" (-1) +source include/master-slave.inc; +save_master_pos; +connection slave; +sync_with_master; +# Ask for a master log that has certainly not been reached yet +# timeout= 2 seconds +select master_pos_wait('master-bin.999999',0,2); +explain extended select master_pos_wait('master-bin.999999',0,2); +# Testcase for bug 651 (master_pos_wait() hangs if slave idle and STOP SLAVE). +send select master_pos_wait('master-bin.999999',0); +connection slave1; +stop slave sql_thread; +connection slave; +reap; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh b/mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh new file mode 100755 index 00000000000..8ce79797822 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh @@ -0,0 +1 @@ +rm -f $MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test new file mode 100644 index 00000000000..db9b557baad --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test @@ -0,0 +1,103 @@ +# +# Test of replicating some difficult functions +# +source include/master-slave.inc; + +create table t1(id int, i int, r1 int, r2 int, p varchar(100)); +insert into t1 values(1, connection_id(), 0, 0, ""); +# don't put rand and password in the same query, to see if they replicate +# independently +# Pure rand test +insert into t1 values(2, 0, rand()*1000, rand()*1000, ""); +# change the rand suite on the master (we do this because otherwise password() +# benefits from the fact that the above rand() is well replicated : +# it picks the same sequence element, which hides a possible bug in password() replication. +set sql_log_bin=0; +insert into t1 values(6, 0, rand(), rand(), ""); +delete from t1 where id=6; +set sql_log_bin=1; +# Pure password test +insert into t1 values(3, 0, 0, 0, password('does_this_work?')); +# "altogether now" +insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?')); +select * into outfile 'rpl_misc_functions.outfile' from t1; +sync_slave_with_master; +create table t2 like t1; +# read the values from the master table +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval load data local infile '$MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2; +# compare them with the replica; the SELECT below should return no row +select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); + +connection master; +drop table t1; + +# End of 4.1 tests + +# +# BUG#25543 test calling rand() multiple times on the master in +# a stored procedure. +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (col_a double default NULL); + +DELIMITER |; + +# Use a SP that calls rand() multiple times +CREATE PROCEDURE test_replication_sp1() +BEGIN + INSERT INTO t1 VALUES (rand()), (rand()); + INSERT INTO t1 VALUES (rand()); +END| + +# Use a SP that calls another SP to call rand() multiple times +CREATE PROCEDURE test_replication_sp2() +BEGIN + CALL test_replication_sp1(); + CALL test_replication_sp1(); +END| + +# Use a SF that calls rand() multiple times +CREATE FUNCTION test_replication_sf() RETURNS DOUBLE DETERMINISTIC +BEGIN + RETURN (rand() + rand()); +END| + +DELIMITER ;| + +# Exercise the functions and procedures then compare the results on +# the master to those on the slave. +CALL test_replication_sp1(); +CALL test_replication_sp2(); +INSERT INTO t1 VALUES (test_replication_sf()); +INSERT INTO t1 VALUES (test_replication_sf()); +INSERT INTO t1 VALUES (test_replication_sf()); + +# Record the results of the query on the master +--exec $MYSQL --port=$MASTER_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql + +--sync_slave_with_master + +# Record the results of the query on the slave +--exec $MYSQL --port=$SLAVE_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql + +# Compare the results from the master to the slave. +--exec diff $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql + +# Cleanup +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test_replication_sp1; +DROP PROCEDURE IF EXISTS test_replication_sp2; +DROP FUNCTION IF EXISTS test_replication_sf; +DROP TABLE IF EXISTS t1; +--enable_warnings +--sync_slave_with_master + +# If all is good, when can cleanup our dump files. +--remove_file $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql +--remove_file $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql diff --git a/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test new file mode 100644 index 00000000000..6a1f81abed3 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test @@ -0,0 +1,46 @@ +# Mixed DDL-DML (CREATE ... SELECT ...) statements can only be +# replicated properly in statement-based replication. +# Currently statement based due to bug 12345 +--source include/have_binlog_format_mixed_or_statement.inc + +source include/master-slave.inc; + +# Test replication of auto_increment + +create table t1 (n int auto_increment primary key); +set insert_id = 2000; +insert into t1 values (NULL),(NULL),(NULL); +sync_slave_with_master; +select * from t1; +connection master; +--replace_result $SLAVE_MYPORT 9999 +show slave hosts; +drop table t1; +sync_slave_with_master; +stop slave; +connection master; + +# Test replication of timestamp + +create table t2(id int auto_increment primary key, created datetime); +set timestamp=12345; +insert into t2 set created=now(); +select * from t2; + +# Test replication of CREATE .. LIKE (Bug #2557) + +create table t3 like t2; +create temporary table t4 like t2; +create table t5 select * from t4; +save_master_pos; +connection slave; +start slave; +sync_with_master; +select * from t2; +show create table t3; +show create table t5; +connection master; +drop table t2,t3,t5; +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_multi_delete-slave.opt b/mysql-test/suite/rpl/t/rpl_multi_delete-slave.opt new file mode 100644 index 00000000000..c98fe0b0a46 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_delete-slave.opt @@ -0,0 +1 @@ +--replicate-wild-do-table=test.% diff --git a/mysql-test/suite/rpl/t/rpl_multi_delete.test b/mysql-test/suite/rpl/t/rpl_multi_delete.test new file mode 100644 index 00000000000..a251cbf8833 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_delete.test @@ -0,0 +1,26 @@ +source include/master-slave.inc; +create table t1 (a int primary key); +create table t2 (a int); + +insert into t1 values (1); +insert into t2 values (1); + + +delete t1.* from t1, t2 where t1.a = t2.a; + +save_master_pos; +select * from t1; +select * from t2; + +connection slave; +sync_with_master; +select * from t1; +select * from t2; + +connection master; +drop table t1,t2; +save_master_pos; +connection slave; +sync_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_multi_delete2-slave.opt b/mysql-test/suite/rpl/t/rpl_multi_delete2-slave.opt new file mode 100644 index 00000000000..0febb2891b1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_delete2-slave.opt @@ -0,0 +1 @@ +"--replicate-rewrite-db=mysqltest_from->mysqltest_to" --replicate-do-table=mysqltest_to.a diff --git a/mysql-test/suite/rpl/t/rpl_multi_delete2.test b/mysql-test/suite/rpl/t/rpl_multi_delete2.test new file mode 100644 index 00000000000..81379d4056b --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_delete2.test @@ -0,0 +1,68 @@ +#multi delete replication bugs + + +source include/master-slave.inc; + +#BUG#11139 - improper wild-table and table rules +#checking for multi deletes with an alias + +connection master; +set sql_log_bin=0; +create database mysqltest_from; +set sql_log_bin=1; + +connection slave; +create database mysqltest_to; + + +connection master; +use mysqltest_from; +--disable_warnings +drop table if exists a; +--enable_warnings +CREATE TABLE a (i INT); +INSERT INTO a VALUES(1); +DELETE alias FROM a alias WHERE alias.i=1; +SELECT * FROM a; +insert into a values(2),(3); +delete a alias FROM a alias where alias.i=2; +select * from a; +save_master_pos; +connection slave; + +use mysqltest_to; +sync_with_master; +select * from a; + +# BUG#3461 +connection master; +create table t1 (a int primary key); +create table t2 (a int); + +insert into t1 values (1); +insert into t2 values (1); + +delete t1.* from t1, t2 where t1.a = t2.a; + +save_master_pos; +select * from t1; +select * from t2; + +connection slave; +# BUG#3461 would cause sync to fail +sync_with_master; +error 1146; +select * from t1; +error 1146; +select * from t2; + +# cleanup +connection master; +set sql_log_bin=0; +drop database mysqltest_from; +set sql_log_bin=1; +connection slave; +drop database mysqltest_to; + +# End of 4.1 tests + diff --git a/mysql-test/suite/rpl/t/rpl_multi_engine-slave.opt b/mysql-test/suite/rpl/t/rpl_multi_engine-slave.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_engine-slave.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_multi_engine.test b/mysql-test/suite/rpl/t/rpl_multi_engine.test new file mode 100644 index 00000000000..10780c765f7 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_engine.test @@ -0,0 +1,108 @@ +# See if replication between MyISAM, MEMORY and InnoDB works. + +#This test case is not written for NDB, result files do not +#match when NDB is the default engine +-- source include/not_ndb_default.inc + +-- source include/master-slave.inc + +connection slave; +-- source include/have_innodb.inc + +connection master; +-- source include/have_innodb.inc +--disable_warnings +create database if not exists mysqltest1; +use mysqltest1; +drop table if exists t1; + +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc +VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT +0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); + +sync_slave_with_master; +use mysqltest1; + +# MyISAM to MyISAM then InnoDB then MEMORY + +connection master; +alter table t1 engine=myisam; +show create table t1; +sync_slave_with_master; + +connection slave; +alter table t1 engine=myisam; +show create table t1; + +--source include/rpl_multi_engine.inc + +connection slave; +alter table t1 engine=innodb; +show create table t1; + +--source include/rpl_multi_engine.inc + +connection slave; +alter table t1 engine=memory; +show create table t1; + +--source include/rpl_multi_engine.inc + +# MEMORY to ... + +connection master; +alter table t1 engine=memory; +show create table t1; +sync_slave_with_master; + +connection slave; +alter table t1 engine=myisam; +show create table t1; + +--source include/rpl_multi_engine.inc + +connection slave; +alter table t1 engine=innodb; +show create table t1; + +--source include/rpl_multi_engine.inc + +connection slave; +alter table t1 engine=memory; +show create table t1; + +--source include/rpl_multi_engine.inc + +# InnoDB to ... + +connection master; +alter table t1 engine=innodb; +show create table t1; +sync_slave_with_master; + +connection slave; +alter table t1 engine=myisam; +show create table t1; + +--source include/rpl_multi_engine.inc + +connection slave; +alter table t1 engine=innodb; +show create table t1; + +--source include/rpl_multi_engine.inc + +connection slave; +alter table t1 engine=memory; +show create table t1; + +--source include/rpl_multi_engine.inc + +# cleanup +connection master; +DROP TABLE t1; +# Need to drop mysqltest1 as well so other test will pass. +DROP DATABASE mysqltest1; +sync_slave_with_master; + +# End of 5.1 test case diff --git a/mysql-test/suite/rpl/t/rpl_multi_update.test b/mysql-test/suite/rpl/t/rpl_multi_update.test new file mode 100644 index 00000000000..a6111455d16 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_update.test @@ -0,0 +1,7 @@ +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +let $engine_type=MyISAM; +-- source extra/rpl_tests/rpl_multi_update.test diff --git a/mysql-test/suite/rpl/t/rpl_multi_update2-slave.opt b/mysql-test/suite/rpl/t/rpl_multi_update2-slave.opt new file mode 100644 index 00000000000..17d4171af0e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_update2-slave.opt @@ -0,0 +1 @@ +--replicate-ignore-table=nothing.sensible diff --git a/mysql-test/suite/rpl/t/rpl_multi_update2.test b/mysql-test/suite/rpl/t/rpl_multi_update2.test new file mode 100644 index 00000000000..7401786501e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_update2.test @@ -0,0 +1,9 @@ +####################################################### +# Wrapper for rpl_multi_update2.test to allow multi # +# Engines to reuse test code. By JBM 2006-02-15 # +# Added comments section and to skip when ndb is # +# Default engine. # +####################################################### +--source include/not_ndb_default.inc +let $engine_type=MyISAM; +--source extra/rpl_tests/rpl_multi_update2.test diff --git a/mysql-test/suite/rpl/t/rpl_multi_update3.test b/mysql-test/suite/rpl/t/rpl_multi_update3.test new file mode 100644 index 00000000000..438a644729c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_update3.test @@ -0,0 +1,9 @@ +####################################################### +# Wrapper for rpl_multi_update3.test to allow multi # +# Engines to reuse test code. By JBM 2006-02-15 # +# Added comments section and to skip when ndb is # +# Default engine. # +####################################################### +--source include/not_ndb_default.inc +let $engine_type=MyISAM; +-- source extra/rpl_tests/rpl_multi_update3.test diff --git a/mysql-test/suite/rpl/t/rpl_multi_update4-slave.opt b/mysql-test/suite/rpl/t/rpl_multi_update4-slave.opt new file mode 100644 index 00000000000..fea27db43ee --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_update4-slave.opt @@ -0,0 +1 @@ +--replicate-wild-do-table=d1.% diff --git a/mysql-test/suite/rpl/t/rpl_multi_update4.test b/mysql-test/suite/rpl/t/rpl_multi_update4.test new file mode 100644 index 00000000000..4991a385f6f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_multi_update4.test @@ -0,0 +1,45 @@ +# Let's verify that multi-update is not always skipped by slave if +# some replicate-* rules exist. +# (BUG#15699) + +source include/master-slave.inc; + +### Clean-up + +connection master; +--disable_warnings +drop database if exists d1; +drop database if exists d2; + +connection slave; +drop database if exists d2; +--enable_warnings + +### Do on master + +connection master; +create database d1; # accepted by slave +create table d1.t0 (id int); +create database d2; # ignored by slave +use d2; +create table t1 (id int); +create table t2 (id int); +insert into t1 values (1), (2), (3), (4), (5); +insert into t2 select id + 3 from t1; +# a problematic query which must be filter out by slave +update t1 join t2 using (id) set t1.id = 0; +insert into d1.t0 values (0); # replication works + +### Check on slave + +sync_slave_with_master; +use d1; +select * from t0 where id=0; # must find + +### Clean-up +connection master; +drop database d1; +drop database d2; +sync_slave_with_master; + +# End of test diff --git a/mysql-test/suite/rpl/t/rpl_optimize.test b/mysql-test/suite/rpl/t/rpl_optimize.test new file mode 100644 index 00000000000..80f0c052fc8 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_optimize.test @@ -0,0 +1,54 @@ +# Test for BUG#1858 "OPTIMIZE TABLE done by a client +# thread stops the slave SQL thread". +# You can replace OPTIMIZE by REPAIR. +##################################### +# Change Author: JBM +# Change Date: 2006-02-09 +# Change: NDB does not and will not support +# OPTIMIZE for memory tables. If and when +# it does support for Disk Data, a new +# version of this test will be need. +# Skipping this test if default engine = ndb +##################################### +-- source include/not_ndb_default.inc +-- source include/master-slave.inc + +create table t1 (a int not null auto_increment primary key, b int, key(b)); +INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +save_master_pos; +# a few updates to force OPTIMIZE to do something +update t1 set b=(a/2*rand()); +delete from t1 order by b limit 10000; + +connection slave; +sync_with_master; +optimize table t1; +connection master; +save_master_pos; +connection slave; +# Bug was that when the INSERT terminated on slave, +# the slave SQL thread got killed by OPTIMIZE. +sync_with_master; # won't work if slave SQL thread stopped + +connection master; # cleanup +drop table t1; +connection slave; +sync_with_master; + +# If the machine is so fast that slave syncs before OPTIMIZE +# starts, this test wil demonstrate nothing but will pass. + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_packet-master.opt b/mysql-test/suite/rpl/t/rpl_packet-master.opt new file mode 100644 index 00000000000..42d4f94c999 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_packet-master.opt @@ -0,0 +1 @@ +-O max_allowed_packet=1024 -O net_buffer_length=1024 diff --git a/mysql-test/suite/rpl/t/rpl_packet-slave.opt b/mysql-test/suite/rpl/t/rpl_packet-slave.opt new file mode 100644 index 00000000000..42d4f94c999 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_packet-slave.opt @@ -0,0 +1 @@ +-O max_allowed_packet=1024 -O net_buffer_length=1024 diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test new file mode 100644 index 00000000000..26fe36d8c40 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_packet.test @@ -0,0 +1,80 @@ +# +# Check replication protocol packet size handling +# Bug#19402 SQL close to the size of the max_allowed_packet fails on slave +# + +# max-out size db name +source include/master-slave.inc; + +let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; +disable_warnings; +eval drop database if exists $db; +enable_warnings; +eval create database $db; + +connection master; +select @@net_buffer_length, @@max_allowed_packet; +disconnect master; + +# alas, can't use eval here; if db name changed apply the change here +connect (master,localhost,root,,DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________); + +connection master; +create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM; + +INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023'); +save_master_pos; + +connection slave; +sync_with_master; +eval select count(*) from `$db`.`t1` /* must be 1 */; + +SHOW STATUS LIKE 'Slave_running'; +select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; +connection master; +eval drop database $db; +save_master_pos; + +connection slave; +sync_with_master; + +# +# Bug #23755: Replicated event larger that max_allowed_packet infinitely re-transmits +# +# Check that a situation when the size of event on the master is greater than +# max_allowed_packet on the slave does not lead to infinite re-transmits. + +connection master; + +# Change the max packet size on master + +SET @@global.max_allowed_packet=4096; +SET @@global.net_buffer_length=4096; + +# Restart slave for new setting to take effect +connection slave; +STOP SLAVE; +START SLAVE; + +# Reconnect to master for new setting to take effect +disconnect master; +connect (master, localhost, root); +connection master; + +CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM; + +INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); + +# The slave I/O thread must stop after trying to read the above event +connection slave; +sleep 2; +SHOW STATUS LIKE 'Slave_running'; + +# cleanup +#connection master; +#drop table t1; +#connection slave; +#drop table t1; + + +# End of tests diff --git a/mysql-test/suite/rpl/t/rpl_ps.test b/mysql-test/suite/rpl/t/rpl_ps.test new file mode 100644 index 00000000000..b8792722192 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ps.test @@ -0,0 +1,51 @@ +# +# Test of replicating user variables +# +########################################################### +# 2006-02-08 By JBM added order by for use w/ NDB engine +########################################################### +source include/master-slave.inc; + +#save_master_pos; +#connection slave; +#sync_with_master; +#reset master; +#connection master; + +--disable_warnings +drop table if exists t1; +--enable_warnings + +create table t1(n char(30)); + +prepare stmt1 from 'insert into t1 values (?)'; +set @var1= "from-master-1"; +execute stmt1 using @var1; +set @var1= "from-master-2-'',"; +execute stmt1 using @var1; +SELECT * FROM t1 ORDER BY n; + +set @var2= 'insert into t1 values (concat("from-var-", ?))'; +prepare stmt2 from @var2; +set @var1='from-master-3'; +execute stmt2 using @var1; + +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM t1 ORDER BY n; + +connection master; + +drop table t1; + +save_master_pos; +connection slave; +sync_with_master; +stop slave; + +# End of 4.1 tests + +reset master; +reset slave; +disconnect master; diff --git a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test new file mode 100644 index 00000000000..4f72996671d --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test @@ -0,0 +1,47 @@ +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/not_ndb_default.inc +-- source include/master-slave.inc + +# Test that the slave temporarily switches to ROW when seeing binrow +# events when it is in STATEMENT or MIXED mode + +SET BINLOG_FORMAT=MIXED; +SET GLOBAL BINLOG_FORMAT=MIXED; +SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT; + +--echo **** On Master **** +CREATE TABLE t1 (a INT, b LONG); +INSERT INTO t1 VALUES (1,1), (2,2); +INSERT INTO t1 VALUES (3,UUID()), (4,UUID()); +let $VERSION=`select version()`; +--replace_result $VERSION VERSION +--replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS; +sync_slave_with_master; +--echo **** On Slave **** +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS +--replace_result $VERSION VERSION +--replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS; + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql + +connection master; +DROP TABLE IF EXISTS t1; + +# Let's compare. Note: If they match test will pass, if they do not match +# the test will show that the diff statement failed and not reject file +# will be created. You will need to go to the mysql-test dir and diff +# the files your self to see what is not matching + +diff_files $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql; + +# If all is good, we can remove the files + +--remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql +--remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql diff --git a/mysql-test/suite/rpl/t/rpl_read_only-slave.opt b/mysql-test/suite/rpl/t/rpl_read_only-slave.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_read_only-slave.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_read_only.test b/mysql-test/suite/rpl/t/rpl_read_only.test new file mode 100644 index 00000000000..62864b62a28 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_read_only.test @@ -0,0 +1,113 @@ +# Test case for BUG #11733 +-- source include/master-slave.inc +-- source include/have_innodb.inc + +# Create a test and replicate it to slave +connection master; +create user test; +sync_slave_with_master; + +# Setting the master readonly : +# - the variable @@readonly is not replicated on the slave + +connect (master2,127.0.0.1,test,,test,$MASTER_MYPORT,); +connect (slave2,127.0.0.1,test,,test,$SLAVE_MYPORT,); + +connection master1; + +create table t1(a int) engine=InnoDB; +create table t2(a int) engine=MyISAM; +insert into t1 values(1001); +insert into t2 values(2001); + +connection master; +set global read_only=1; + +connection master1; +select @@read_only; +select * from t1; +select * from t2; + +sync_slave_with_master; +select @@read_only; +select * from t1; +select * from t2; + +# - replication of transactions +connection master; +set global read_only=0; + +connection master1; +BEGIN; +insert into t1 values(1002); +insert into t2 values(2002); + +connection master2; +BEGIN; +insert into t1 values(1003); +insert into t2 values(2003); + +connection master; +set global read_only=1; + +connection master1; +## works even with read_only=1, because master1 is root +COMMIT; + +connection master2; +--error ER_OPTION_PREVENTS_STATEMENT +COMMIT; + +connection master; +set global read_only=0; + +connection master1; +insert into t1 values(1004); +insert into t2 values(2004); + +select * from t1; +select * from t2; + +sync_slave_with_master; +select * from t1; +select * from t2; + +# Setting the slave readonly : replication will pass +# +connection slave1; +set global read_only=1; + +connection slave; +select @@read_only; +# Make sure the replicated table is also transactional +show create table t1; +# Make sure the replicated table is not transactional +show create table t2; + +connection master; +insert into t1 values(1005); +insert into t2 values(2005); +select * from t1; +select * from t2; + +sync_slave_with_master; +connection slave; +select * from t1; +select * from t2; + +# Non root user can not write on the slave +connection slave2; +--error ER_OPTION_PREVENTS_STATEMENT +insert into t1 values(1006); +--error ER_OPTION_PREVENTS_STATEMENT +insert into t2 values(2006); + +## Cleanup +connection master; +drop user test; +drop table t1; +drop table t2; +sync_slave_with_master; +set global read_only=0; + + diff --git a/mysql-test/suite/rpl/t/rpl_redirect.test b/mysql-test/suite/rpl/t/rpl_redirect.test new file mode 100644 index 00000000000..078d1048794 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_redirect.test @@ -0,0 +1,47 @@ +# +# Test of automatic redirection of queries to master/slave. +# + +source include/master-slave.inc; +# We disable this for now as PS doesn't handle redirection +--disable_ps_protocol + +#first, make sure the slave has had enough time to register +save_master_pos; +connection slave; +sync_with_master; + +#discover slaves +connection master; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 16 # 23 # 33 # +SHOW SLAVE STATUS; +--replace_result $SLAVE_MYPORT SLAVE_PORT +SHOW SLAVE HOSTS; +rpl_probe; + +#turn on master/slave query direction auto-magic +enable_rpl_parse; +create table t1 ( n int); +insert into t1 values (1),(2),(3),(4); +disable_rpl_parse; +save_master_pos; +connection slave; +sync_with_master; +insert into t1 values(5); +connection master; +enable_rpl_parse; +# The first of the queries will be sent to the slave, the second to the master. +SELECT * FROM t1 ORDER BY n; +SELECT * FROM t1 ORDER BY n; +disable_rpl_parse; +SELECT * FROM t1 ORDER BY n; +connection slave; +SELECT * FROM t1 ORDER BY n; + +# Cleanup +connection master; +drop table t1; +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_relay_space_innodb-master.opt b/mysql-test/suite/rpl/t/rpl_relay_space_innodb-master.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_relay_space_innodb-master.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_relay_space_innodb-slave.opt b/mysql-test/suite/rpl/t/rpl_relay_space_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_relay_space_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test b/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test new file mode 100644 index 00000000000..156d53ef856 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_relay_space_innodb.test @@ -0,0 +1,22 @@ +################################### +# Wrapper rpl_sv_relay_space.test # +# This test has to be wrapped as # +# It tests ndb, innodb and MyISAM.# +# By Wrapping we are saving some # +# space and making the test more # +# Maintainable by only having one # +# test file and reusing the code # +# In Addition, INNODB has to have # +# Option files during this test # +# to force innodb on the slave # +# else the test will fail # +################################### +#Change Author: JBM # +#Change Date: 2006-02-03 # +#Change: Added Comments # +################################### +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=InnoDB; +-- source extra/rpl_tests/rpl_sv_relay_space.test + diff --git a/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test b/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test new file mode 100644 index 00000000000..1d8563e7fd9 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_relay_space_myisam.test @@ -0,0 +1,21 @@ +################################### +# Wrapper rpl_sv_relay_space.test # +# This test has to be wrapped as # +# It tests ndb, innodb and MyISAM.# +# By Wrapping we are saving some # +# space and making the test more # +# Maintainable by only having one # +# test file and reusing the code # +# In Addition, INNODB has to have # +# Option files during this test # +# to force innodb on the slave # +# else the test will fail # +################################### +#Change Author: JBM # +#Change Date: 2006-02-03 # +#Change: Added Comments # +################################### +-- source include/not_ndb_default.inc +let $engine_type=MyISAM; +-- source extra/rpl_tests/rpl_sv_relay_space.test + diff --git a/mysql-test/suite/rpl/t/rpl_relayrotate-slave.opt b/mysql-test/suite/rpl/t/rpl_relayrotate-slave.opt new file mode 100644 index 00000000000..cf4319f2b40 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_relayrotate-slave.opt @@ -0,0 +1,3 @@ +-O max_relay_log_size=16384 +--loose-innodb +--log-warnings diff --git a/mysql-test/suite/rpl/t/rpl_relayrotate.test b/mysql-test/suite/rpl/t/rpl_relayrotate.test new file mode 100644 index 00000000000..46d54aea1d2 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_relayrotate.test @@ -0,0 +1,10 @@ +####################################################### +# Wrapper for rpl_relayrotate.test to allow multi # +# Engines to reuse test code. By JBM 2006-02-15 # +# Added comments section and to skip when ndb is # +# Default engine. # +####################################################### +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=innodb; +-- source extra/rpl_tests/rpl_relayrotate.test diff --git a/mysql-test/suite/rpl/t/rpl_relayspace-slave.opt b/mysql-test/suite/rpl/t/rpl_relayspace-slave.opt new file mode 100644 index 00000000000..06d96aa3b9a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_relayspace-slave.opt @@ -0,0 +1 @@ +--relay_log_space_limit=10 diff --git a/mysql-test/suite/rpl/t/rpl_relayspace.test b/mysql-test/suite/rpl/t/rpl_relayspace.test new file mode 100644 index 00000000000..70315c14f34 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_relayspace.test @@ -0,0 +1,34 @@ +# The slave is started with relay_log_space_limit=10 bytes, +# to force the deadlock after one event. + +source include/master-slave.inc; +connection slave; +stop slave; +connection master; +# This will generate a master's binlog > 10 bytes +create table t1 (a int); +drop table t1; +create table t1 (a int); +drop table t1; +connection slave; +reset slave; +start slave io_thread; +# Give the I/O thread time to block. +sleep 2; +# A bug caused the I/O thread to refuse stopping. +stop slave io_thread; +reset slave; +start slave; +# The I/O thread stops filling the relay log when +# it's >10b. And the SQL thread cannot purge this relay log +# as purge is done only when the SQL thread switches to another +# relay log, which does not exist here. +# So we should have a deadlock. +# if it is not resolved automatically we'll detect +# it with master_pos_wait that waits for farther than 1Ob; +# it will timeout after 10 seconds; +# also the slave will probably not cooperate to shutdown +# (as 2 threads are locked) +select master_pos_wait('master-bin.001',200,6)=-1; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_replicate_do-slave.opt b/mysql-test/suite/rpl/t/rpl_replicate_do-slave.opt new file mode 100644 index 00000000000..da345474216 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_replicate_do-slave.opt @@ -0,0 +1 @@ +--replicate-do-table=test.t1 diff --git a/mysql-test/suite/rpl/t/rpl_replicate_do.test b/mysql-test/suite/rpl/t/rpl_replicate_do.test new file mode 100644 index 00000000000..600840a2828 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_replicate_do.test @@ -0,0 +1,92 @@ +# This test assumes we are ignoring updates on table t2, but doing +# updates on t1 +source include/master-slave.inc; +--disable_warnings +drop table if exists t11; +connection slave; +drop table if exists t11; +--enable_warnings + +create table t2 (n int); +insert into t2 values(4); +connection master; +create table t2 (s char(20)); +load data infile '../std_data_ln/words.dat' into table t2; +insert into t2 values('five'); +create table t1 (m int); +insert into t1 values(15),(16),(17); +update t1 set m=20 where m=16; +delete from t1 where m=17; +create table t11 select * from t1; +save_master_pos; +connection slave; +sync_with_master; +select * from t1 ORDER BY m; +select * from t2; +--error 1146 +select * from t11; +connection master; +drop table if exists t1,t2,t11; +save_master_pos; +connection slave; +sync_with_master; +# show slave status, just to see of it prints replicate-do-table +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # +show slave status; + +# +# BUG#12542 +# TEST: "SET ONE_SHOT should always be executed on slave" +# +# We could use any timezone different than server default in this test +# +connection master; +create table t1 (ts timestamp); +set one_shot time_zone='met'; +insert into t1 values('2005-08-12 00:00:00'); +set one_shot time_zone='met'; +select * from t1; +sync_slave_with_master; + +connection slave; +set one_shot time_zone='met'; +select * from t1; + +connection master; +drop table t1; +sync_slave_with_master; + +# End of 4.1 tests + +# +# Bug#24478 DROP TRIGGER is not caught by replicate-*-table filters +# +--echo *** master *** +connection master; +create table t1 (a int, b int); +create trigger trg1 before insert on t1 for each row set new.b=2; +create table t2 (a int, b int); +create trigger trg2 before insert on t2 for each row set new.b=2; +show tables; +show triggers; +sync_slave_with_master; +--echo *** slave *** +connection slave; +show tables; +show triggers; +--echo *** master *** +connection master; +drop trigger trg1; +drop trigger trg2; +show triggers; +sync_slave_with_master; +--echo *** slave *** +connection slave; +show tables; +show triggers; +--echo *** master *** +connection master; +drop table t1; +drop table t2; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_replicate_ignore_db-slave.opt b/mysql-test/suite/rpl/t/rpl_replicate_ignore_db-slave.opt new file mode 100644 index 00000000000..6e3aed44f78 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_replicate_ignore_db-slave.opt @@ -0,0 +1 @@ +--replicate_ignore_db=mysqltest1 diff --git a/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test b/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test new file mode 100644 index 00000000000..bcfef919fad --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test @@ -0,0 +1,30 @@ +# see if --replicate-ignore-db works + +--source include/master-slave.inc + +--disable_warnings +drop database if exists mysqltest1; +drop database if exists mysqltest2; +--enable_warnings +create database mysqltest1; +create database mysqltest2; + +use mysqltest1; +create table t1 (a int); +insert into t1 values(1); +sync_slave_with_master; +--error 1146 +select * from mysqltest1.t1; + +connection master; +use mysqltest2; +create table t1 (a int); +insert into t1 values(1); +sync_slave_with_master; +select * from mysqltest2.t1; + +# cleanup +connection master; +drop database mysqltest1; +drop database mysqltest2; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt b/mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt new file mode 100644 index 00000000000..a462ad19ba0 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt @@ -0,0 +1 @@ +"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1->test" diff --git a/mysql-test/suite/rpl/t/rpl_rewrt_db.test b/mysql-test/suite/rpl/t/rpl_rewrt_db.test new file mode 100644 index 00000000000..52f04e073dd --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_rewrt_db.test @@ -0,0 +1,84 @@ +# TBF - difference in row level logging +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/master-slave.inc + +--disable_warnings +drop database if exists mysqltest1; +--enable_warnings +create database mysqltest1; + +use mysqltest1; +create table t1 (a int); +insert into t1 values(9); +select * from mysqltest1.t1; +sync_slave_with_master; +show databases like 'mysqltest1'; # should be empty +select * from test.t1; +# cleanup +connection master; +drop table t1; +drop database mysqltest1; +sync_slave_with_master; + +# +# BUG#6353: +# Option --replicate-rewrite-db should work together with LOAD DATA INFILE +# + +connection slave; +--disable_warnings +drop database if exists rewrite; +--enable_warnings +create database rewrite; + +connection master; +use test; +create table t1 (a date, b date, c date not null, d date); +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ','; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; +sync_slave_with_master; + +connection slave; +select * from rewrite.t1; + +connection master; +truncate table t1; +load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); +sync_slave_with_master; + +connection slave; +select * from rewrite.t1; + +connection master; +drop table t1; +create table t1 (a text, b text); +load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; +sync_slave_with_master; + +connection slave; +select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1; + +connection master; +drop table t1; +create table t1 (a int, b char(10)); +load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; +sync_slave_with_master; + +connection slave; +select * from rewrite.t1; + +connection master; +truncate table t1; +load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; +sync_slave_with_master; + +connection slave; +# The empty line last comes from the end line field in the file +select * from rewrite.t1; + +drop database rewrite; + +connection master; +drop table t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt b/mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt new file mode 100644 index 00000000000..ad2c6a647b5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs-master.opt @@ -0,0 +1 @@ +-O max_binlog_size=4096 diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh b/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh new file mode 100755 index 00000000000..81490a54b4b --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs-slave.sh @@ -0,0 +1,2 @@ +rm -f $MYSQLTEST_VARDIR/slave-data/master.info +rm -f $MYSQLTEST_VARDIR/slave-data/*relay* diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi b/mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi new file mode 100644 index 00000000000..80190bf6d29 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.slave-mi @@ -0,0 +1 @@ +--server-id=2 diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs.test b/mysql-test/suite/rpl/t/rpl_rotate_logs.test new file mode 100644 index 00000000000..155f9f4b6e0 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test @@ -0,0 +1,175 @@ +# This test uses chmod, can't be run with root permissions +-- source include/not_as_root.inc + +-- source include/have_log_bin.inc + +# +# Test is run with max_binlog_size=2048 to force automatic rotation of the +# binary log +# Tests done: +# - Check that slaves reports correct failures if master.info has strange +# modes/information +# - Automatic binary log rotation +# - Ensure that temporary tables works over flush logs and binary log +# changes +# - Test creating a duplicate key error and recover from it + +# Requires statement logging +-- source include/have_binlog_format_mixed_or_statement.inc + +connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); +--disable_warnings +drop table if exists t1, t2, t3, t4; +--enable_warnings +connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK); +# Create empty file +write_file $MYSQLTEST_VARDIR/slave-data/master.info; +EOF +chmod 0000 $MYSQLTEST_VARDIR/slave-data/master.info; +connection slave; +--disable_warnings +drop table if exists t1, t2, t3, t4; +--enable_warnings + +# START SLAVE will fail because it can't read the file (mode 000) +# (system error 13) +--replace_result $MYSQL_TEST_DIR TESTDIR +--error 1105,1105,29 +start slave; +chmod 0600 $MYSQLTEST_VARDIR/slave-data/master.info; +# It will fail again because the file is empty so the slave cannot get valuable +# info about how to connect to the master from it (failure in +# init_strvar_from_file() in init_master_info()). +--error 1201 +start slave; +--replace_result $MASTER_MYPORT MASTER_PORT + +# CHANGE MASTER will fail because it first parses master.info before changing +# it (so when master.info is bad, people have to use RESET SLAVE first). +--error 1201 +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root'; +reset slave; +--replace_result $MASTER_MYPORT MASTER_PORT +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root'; +connection master; +reset master; +connection slave; +start slave; +connection master; + +# +# Test FLUSH LOGS +# +create temporary table temp_table (a char(80) not null); +insert into temp_table values ("testing temporary tables"); +create table t1 (s text); +insert into t1 values('Could not break slave'),('Tried hard'); +sync_slave_with_master; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 16 # 23 # 33 # +show slave status; +select * from t1; +connection master; +flush logs; +create table t2(m int not null auto_increment primary key); +insert into t2 values (34),(67),(123); +flush logs; +show binary logs; +create table t3 select * from temp_table; + +sync_slave_with_master; + +select * from t3; +connection master; +drop table temp_table, t3; + +# +# Now lets make some duplicate key mess and see if we can recover from it +# + +# First insert a value on the slave +connection slave; +insert into t2 values(1234); + +#same value on the master +connection master; +set insert_id=1234; +insert into t2 values(NULL); +connection slave; +--source include/wait_for_slave_sql_to_stop.inc + +#restart slave skipping one event +set global sql_slave_skip_counter=1; +start slave; + +connection master; + +#let slave catch up +sync_slave_with_master; +connection master; +purge master logs to 'master-bin.000002'; +show master logs; +# we just tests if synonyms are accepted +purge binary logs to 'master-bin.000002'; +show binary logs; + +# Calculate time to use in "purge master logs before" by taking +# last modification time of t2 and adding 1 second +# This is donw in order to handle the case where file system +# time differs from mysqld's time +--disable_result_log +select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND) + from information_schema.tables + where TABLE_SCHEMA="test" and TABLE_NAME="t2"; +--enable_result_log + +purge master logs before (@time_for_purge); +show binary logs; +insert into t2 values (65); +sync_slave_with_master; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 16 # 23 # 33 # +show slave status; +select * from t2; + +# +# Test forcing the replication log to rotate +# + +connection master; +create temporary table temp_table (a char(80) not null); +insert into temp_table values ("testing temporary tables part 2"); +let $1=100; + +create table t3 (n int); +disable_query_log; +while ($1) +{ +#eval means expand $ expressions + eval insert into t3 values($1 + 4); + dec $1; +} +enable_query_log; +select count(*) from t3 where n >= 4; +create table t4 select * from temp_table; +show binary logs; +show master status; +save_master_pos; +connection slave; +sync_with_master; +select * from t4; + +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 16 # 23 # 33 # +show slave status; +# because of concurrent insert, the table may not be up to date +# if we do not lock +lock tables t3 read; +select count(*) from t3 where n >= 4; +unlock tables; +#clean up +connection master; +drop table if exists t1,t2,t3,t4; +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_row_001.test b/mysql-test/suite/rpl/t/rpl_row_001.test new file mode 100644 index 00000000000..639c55362a5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_001.test @@ -0,0 +1,7 @@ +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +let $engine_type=MYISAM; +-- source extra/rpl_tests/rpl_row_001.test diff --git a/mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt b/mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt new file mode 100644 index 00000000000..0e1929507f7 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_4_bytes-master.opt @@ -0,0 +1 @@ +--loose-debug=d,"old_row_based_repl_4_byte_map_id_master" diff --git a/mysql-test/suite/rpl/t/rpl_row_4_bytes.test b/mysql-test/suite/rpl/t/rpl_row_4_bytes.test new file mode 100644 index 00000000000..73ef6dd2345 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_4_bytes.test @@ -0,0 +1,33 @@ +# This test is to make sure that slaves can read a binlog containining +# table map ids stored in 4 bytes, even though we now store them in 6 +# bytes. This is for backward-compatibility. +# If the slave does not detect that the master stores the table map id +# in 4 bytes, slave will read 6 bytes, and so will read the 2 bytes of +# flags at the place where there actually is data, so the test should +# fail. + +-- source include/have_binlog_format_row.inc +-- source include/have_debug.inc +-- source include/master-slave.inc + +connection master; +--disable_warnings +drop database if exists mysqltest1; +create database mysqltest1; +--enable_warnings +use mysqltest1; +CREATE TABLE t1 (a char(3)); +CREATE TABLE t2 (a char(3)); +insert into t1 values("ANN"); +insert into t1 values("GUI"); +insert into t2 values("LIL"); +insert into t2 values("ABE"); +insert into t2 values("ANG"); +sync_slave_with_master; +use mysqltest1; +select * from t1 order by a; +select * from t2 order by a; + +connection master; +DROP DATABASE mysqltest1; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_row_NOW.test b/mysql-test/suite/rpl/t/rpl_row_NOW.test new file mode 100644 index 00000000000..c28b714277e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_NOW.test @@ -0,0 +1,74 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/18/2005 # +# Updated 08/30/2005 Added dumps and diff # +############################################################################# +#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=12480 # +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + + +# Begin clean up test section +connection master; +--disable_warnings +create database if not exists mysqltest1; +DROP TABLE IF EXISTS mysqltest1.t1; +--enable_warnings + + +# Begin test section 1 +CREATE TABLE mysqltest1.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, + a TIMESTAMP DEFAULT '2005-05-05 01:01:01', + b TIMESTAMP DEFAULT '2005-05-05 01:01:01', + PRIMARY KEY(n)); +delimiter |; +CREATE FUNCTION mysqltest1.f1() RETURNS TIMESTAMP +BEGIN + DECLARE v1 INT DEFAULT 300; + WHILE v1 > 0 DO + SET v1 = v1 - 1; + END WHILE; + RETURN NOW(); +END| +delimiter ;| + +INSERT INTO mysqltest1.t1 VALUES(NULL,NOW(),mysqltest1.f1()); + +delimiter |; +CREATE TRIGGER mysqltest1.trig1 BEFORE INSERT ON mysqltest1.t1 +FOR EACH ROW BEGIN + SET new.b = mysqltest1.f1(); +END| +delimiter ;| + +INSERT INTO mysqltest1.t1 SET n = NULL, a = now(); + +sync_slave_with_master; + +connection master; + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/NOW_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/NOW_slave.sql + +# lets cleanup +DROP TABLE IF EXISTS mysqltest1.t1; +DROP FUNCTION mysqltest1.f1; +DROP DATABASE mysqltest1; + +# Lets compare. Note: If they match test will pass, if they do not match +# the test will show that the diff statement failed and not reject file +# will be created. You will need to go to the mysql-test dir and diff +# the files your self to see what is not matching :-) The failed dump +# files will be located in $MYSQLTEST_VARDIR/tmp + +diff_files $MYSQLTEST_VARDIR/tmp/NOW_master.sql $MYSQLTEST_VARDIR/tmp/NOW_slave.sql; + +# If all is good, when can cleanup our dump files. +--remove_file $MYSQLTEST_VARDIR/tmp/NOW_master.sql +--remove_file $MYSQLTEST_VARDIR/tmp/NOW_slave.sql + +sync_slave_with_master; +# End of 5.1 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_USER.test b/mysql-test/suite/rpl/t/rpl_row_USER.test new file mode 100644 index 00000000000..7b13ebc50ee --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_USER.test @@ -0,0 +1,60 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/18/2005 # +############################################################################# +# TEST: To test the USER() and CURRENT_USER() in rbr # +############################################################################# +# Change Author: JBM +# Change Date: 2006-01-16 +# Change: Added Order by for NDB +########## + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +# Begin clean up test section +connection master; +--disable_warnings +DROP DATABASE IF EXISTS mysqltest1; +CREATE DATABASE mysqltest1; +--enable_warnings + +# Section 1 test +CREATE USER tester IDENTIFIED BY 'test'; +GRANT ALL ON mysqltest1.* TO 'tester'@'%' IDENTIFIED BY 'test'; +GRANT ALL ON mysqltest1.* TO ''@'localhost%'; +FLUSH PRIVILEGES; +connect (m_1,localhost,tester,,mysqltest1); + +connection m_1; +CREATE TABLE mysqltest1.t1 (a INT, users VARCHAR(255), PRIMARY KEY(a)); +INSERT INTO mysqltest1.t1 VALUES(1,USER()); +INSERT INTO mysqltest1.t1 VALUES(2,CURRENT_USER()); +delimiter |; +create procedure mysqltest1.p1() +begin + INSERT INTO mysqltest1.t1 VALUES(3,USER()); + INSERT INTO mysqltest1.t1 VALUES(4,CURRENT_USER()); +end| +delimiter ;| + +CALL mysqltest1.p1(); +connection master; +SELECT * FROM mysqltest1.t1 ORDER BY a; +sync_slave_with_master; +SELECT * FROM mysqltest1.t1 ORDER BY a; + +connection master; +# Lets cleanup +#show binlog events; + +DROP DATABASE mysqltest1; +REVOKE ALL ON mysqltest1.* FROM 'tester'@'%'; +REVOKE ALL ON mysqltest1.* FROM ''@'localhost%'; +DROP USER tester@'%'; +DROP USER ''@'localhost%'; + +sync_slave_with_master; + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_UUID.test b/mysql-test/suite/rpl/t/rpl_row_UUID.test new file mode 100644 index 00000000000..6ead7c2ee9b --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_UUID.test @@ -0,0 +1,7 @@ +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +let $engine_type=myisam; +--source extra/rpl_tests/rpl_row_UUID.test diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs-master.opt b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs-master.opt new file mode 100644 index 00000000000..ed7656c1f99 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs-master.opt @@ -0,0 +1,2 @@ +--binlog_ignore_db=test_ignore --loose-innodb + diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs-slave.opt b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs-slave.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs-slave.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test new file mode 100644 index 00000000000..0109edf4264 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test @@ -0,0 +1,186 @@ +--source include/have_binlog_format_row.inc + +let $SERVER_VERSION=`select version()`; + +#This test case is not written for NDB, the result files +#will not match when NDB is the default engine +-- source include/not_ndb_default.inc + +--source include/master-slave.inc + +# Bug#15942 (RBR ignores --binlog_ignore_db and tries to map to table +# on slave for writes) + +CREATE DATABASE test_ignore; # --binlog_ignore_db=mysqltest_ignore + +--echo **** On Master **** +SHOW DATABASES; +USE test; +CREATE TABLE t1 (a INT, b INT); +SHOW TABLES; +INSERT INTO t1 VALUES (1,1), (2,2); +USE test_ignore; +CREATE TABLE t2 (a INT, b INT); +SHOW TABLES; +INSERT INTO t2 VALUES (3,3), (4,4); +source include/show_binlog_events.inc; +sync_slave_with_master; +--echo **** On Slave **** +SHOW DATABASES; +USE test; +SHOW TABLES; +--error 1049 +USE test_ignore; + +connection master; +DROP DATABASE test_ignore; +sync_slave_with_master; + +# Bug#19995: Extreneous table maps generated for statements that does +# not generate rows +--disable_query_log +--source include/master-slave-reset.inc +--enable_query_log + +connection master; +CREATE TABLE t1 (a INT); +DELETE FROM t1; +INSERT INTO t1 VALUES (1),(2); +DELETE FROM t1 WHERE a = 0; +UPDATE t1 SET a=99 WHERE a = 0; +--replace_result $SERVER_VERSION SERVER_VERSION +--replace_regex /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS; + +DROP TABLE t1; + +# BUG#17620: Replicate (Row Based) Fails when Query Cache enabled on +# slave +--echo ================ Test for BUG#17620 ================ +--disable_query_log +--source include/master-slave-reset.inc +--enable_query_log + +--echo **** On Slave **** +connection slave; +SET GLOBAL QUERY_CACHE_SIZE=0; + +--echo **** On Master **** +connection master; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); + +--echo **** On Slave **** +sync_slave_with_master; +SET GLOBAL QUERY_CACHE_SIZE=16*1024*1024; + +--echo **** On Master **** +connection master; +INSERT INTO t1 VALUES (4),(5),(6); + +--echo **** On Slave **** +sync_slave_with_master; +SELECT * FROM t1; + +--echo **** On Master **** +connection master; +INSERT INTO t1 VALUES (7),(8),(9); + +--echo **** On Slave **** +sync_slave_with_master; +SELECT * FROM t1; + +SET GLOBAL QUERY_CACHE_SIZE=0; + +# Bug#22550: Replication of BIT columns failing +--echo ================ Test for BUG#22550 ================ +--disable_query_log +--source include/master-slave-reset.inc +--enable_query_log + +connection master; +CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; +sync_slave_with_master; + +connection master; +INSERT INTO t1 VALUES(1,2); +SELECT HEX(a),b FROM t1; +sync_slave_with_master; +SELECT HEX(a),b FROM t1; + +connection master; +UPDATE t1 SET a=0 WHERE b=2; +SELECT HEX(a),b FROM t1; +sync_slave_with_master; +SELECT HEX(a),b FROM t1; + +connection master; +DROP TABLE IF EXISTS t1; +sync_slave_with_master; + +# BUG#22583: RBR between MyISAM and non-MyISAM tables containing a BIT +# field does not work + +--echo ================ Test for BUG#22583 ================ +--disable_query_log +--source include/master-slave-reset.inc +--enable_query_log + +# disabling warnings temporarily for ENGINE=INNODB to work without InnoDB +--disable_warnings +--echo **** On Master **** +connection master; +CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM; +CREATE TABLE t1_innodb (k INT, a BIT(1), b BIT(9)) ENGINE=INNODB; +CREATE TABLE t2_myisam (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=MYISAM; +CREATE TABLE t2_innodb (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=INNODB; +--echo **** On Slave **** +sync_slave_with_master; +ALTER TABLE t1_myisam ENGINE=INNODB; +ALTER TABLE t1_innodb ENGINE=MYISAM; +ALTER TABLE t2_myisam ENGINE=INNODB; +ALTER TABLE t2_innodb ENGINE=MYISAM; +--enable_warnings + +--echo **** On Master **** +connection master; +INSERT INTO t1_myisam VALUES(1, b'0', 257); +INSERT INTO t1_myisam VALUES(2, b'1', 256); +INSERT INTO t1_innodb VALUES(1, b'0', 257); +INSERT INTO t1_innodb VALUES(2, b'1', 256); +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +INSERT INTO t2_myisam VALUES(1, b'0', 9); +INSERT INTO t2_myisam VALUES(2, b'1', 8); +INSERT INTO t2_innodb VALUES(1, b'0', 9); +INSERT INTO t2_innodb VALUES(2, b'1', 8); +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +SELECT k, HEX(a),HEX(b) FROM t2_innodb; +--echo **** On Slave **** +sync_slave_with_master; +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +SELECT k, HEX(a),HEX(b) FROM t2_innodb; + +--echo **** On Master **** +connection master; +UPDATE t1_myisam SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +UPDATE t1_innodb SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +UPDATE t2_myisam SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +UPDATE t2_innodb SET a=0 WHERE k=2; +SELECT k, HEX(a),HEX(b) FROM t2_innodb; +--echo **** On Slave **** +sync_slave_with_master; +SELECT k, HEX(a),HEX(b) FROM t1_myisam; +SELECT k, HEX(a),HEX(b) FROM t1_innodb; +SELECT k, HEX(a),HEX(b) FROM t2_myisam; +SELECT k, HEX(a),HEX(b) FROM t2_innodb; + +--echo **** On Master **** +connection master; +DROP TABLE IF EXISTS t1_myisam, t1_innodb, t2_myisam, t2_innodb; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test b/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test new file mode 100644 index 00000000000..c2cef800ec8 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_basic_2myisam.test @@ -0,0 +1,3 @@ +let $type= 'MYISAM' ; +let $extra_index= ; +-- source extra/rpl_tests/rpl_row_basic.test diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_3innodb-slave.opt b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test new file mode 100644 index 00000000000..89effc4b3bb --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_basic_3innodb.test @@ -0,0 +1,6 @@ +-- source include/have_innodb.inc + +let $type= 'INNODB' ; +let $extra_index= ; +-- source extra/rpl_tests/rpl_row_basic.test + diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test b/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test new file mode 100644 index 00000000000..687b3bc785d --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_basic_8partition.test @@ -0,0 +1,210 @@ +############################################################ +# Author: MATZ # +# Date: 2006-03-22 # +# Purpose: See if replication of partition tables work # +# Most of this test is copied from the rpl_xxx2yyy tests, # +# but here we just test some simple basic replication of # +# partition tables with same engine (MyISAM) in both ends. # +############################################################ + +--source include/have_binlog_format_row.inc +--source include/have_partition.inc +--source include/not_ndb_default.inc +--source include/master-slave.inc +connection master; +--disable_warnings +DROP TABLE IF EXISTS t1; + +let $maybe_ro_var = @@BINLOG_FORMAT; +let $val4var = ROW; +--source include/safe_set_to_maybe_ro_var.inc + +--echo **** Partition RANGE testing **** + +# Create table that is partitioned by range on year i.e. year(t) and +# replicate basice operations such at insert, update delete between 2 +# different storage engines Alter table and ensure table is handled +# Correctly on the slave +# Note that the storage engine should not be explicit: the default +# storage engine is used on master and slave. + +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), + bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, + f FLOAT DEFAULT 0, total BIGINT UNSIGNED, + y YEAR, t DATE) + PARTITION BY RANGE (YEAR(t)) + (PARTITION p0 VALUES LESS THAN (1901), + PARTITION p1 VALUES LESS THAN (1946), + PARTITION p2 VALUES LESS THAN (1966), + PARTITION p3 VALUES LESS THAN (1986), + PARTITION p4 VALUES LESS THAN (2005), + PARTITION p5 VALUES LESS THAN MAXVALUE); + +--echo --- On master --- +SHOW CREATE TABLE t1; + +--echo --- On slave -- +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--source include/rpl_multi_engine3.inc + +connection master; +# Check that simple Alter statements are replicated correctly +ALTER TABLE t1 MODIFY vc TEXT; + +--echo --- On master --- +SHOW CREATE TABLE t1; + +--echo --- On slave --- +sync_slave_with_master; +SHOW CREATE TABLE t1; + +# Perform basic operation on master and ensure replicated correctly +--source include/rpl_multi_engine3.inc + +connection master; +DROP TABLE IF EXISTS t1; + +######################################################## + +--echo **** Partition LIST testing **** + +# Create table that is partitioned by list on id i.e. (2,4). Pretend +# that we missed one and alter to add. Then replicate basice +# operations such at insert, update delete between 2 different storage +# engines Alter table and ensure table is handled Correctly on the +# slave. + + +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), + bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, + f FLOAT DEFAULT 0, total BIGINT UNSIGNED, + y YEAR, t DATE) + PARTITION BY LIST(id) + (PARTITION p0 VALUES IN (2, 4), + PARTITION p1 VALUES IN (42, 142), + PARTITION p2 VALUES IN (412)); + +--echo --- On master --- +SHOW CREATE TABLE t1; + +--echo --- On slave --- +sync_slave_with_master; +SHOW CREATE TABLE t1; + +# Perform basic operation on master and ensure replicated correctly +--source include/rpl_multi_engine3.inc + +connection master; +# Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 MODIFY vc TEXT; + +--echo --- On master --- +SHOW CREATE TABLE t1; + +--echo --- On slave --- +sync_slave_with_master; +SHOW CREATE TABLE t1; + +# Perform basic operation on master and ensure replicated correctly +--source include/rpl_multi_engine3.inc + +connection master; +DROP TABLE IF EXISTS t1; + +######################################################## + +--echo **** Partition HASH testing **** + +# Create table that is partitioned by hash on year i.e. YEAR(t). Then +# replicate basice operations such at insert, update delete between 2 +# different storage engines Alter table and ensure table is handled +# Correctly on the slave + +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), + bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, + f FLOAT DEFAULT 0, total BIGINT UNSIGNED, + y YEAR, t DATE) + PARTITION BY HASH( YEAR(t) ) + PARTITIONS 4; + +--echo --- On master --- +SHOW CREATE TABLE t1; + +--echo --- On slave --- +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--source include/rpl_multi_engine3.inc + +# Check that simple Alter statements are replicated correctly +ALTER TABLE t1 MODIFY vc TEXT; + +--echo --- On master --- +SHOW CREATE TABLE t1; + +--echo --- On slave --- +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--source include/rpl_multi_engine3.inc + +connection master; +DROP TABLE IF EXISTS t1; + +######################################################## + +# This part does not work +--echo **** Partition by KEY **** + +# Create table that is partitioned by key on id with 4 parts. Then +# replicate basice operations such at insert, update delete between 2 +# different storage engines Alter table and ensure table is handled +# Correctly on the slave + +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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)) + PARTITION BY KEY() + PARTITIONS 4; + +--echo --- On master --- +SHOW CREATE TABLE t1; + +--echo --- On slave --- +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--source include/rpl_multi_engine3.inc + +connection master; +# Check that simple Alter statements are replicated correctly +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); + +--echo --- On master --- +SHOW CREATE TABLE t1; + +--echo --- On slave --- +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--source include/rpl_multi_engine3.inc + +connection master; +# Check that simple Alter statements are replicated correctly +ALTER TABLE t1 MODIFY vc TEXT; + +--echo --- On master --- +SHOW CREATE TABLE t1; + +--echo --- On slave --- +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--source include/rpl_multi_engine3.inc + +DROP TABLE IF EXISTS t1; + +# End of 5.1 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_blob_innodb-slave.opt b/mysql-test/suite/rpl/t/rpl_row_blob_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_blob_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test b/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test new file mode 100644 index 00000000000..0bce657f9f9 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_blob_innodb.test @@ -0,0 +1,12 @@ +################################# +# Wrapper for rpl_row_blob.test# +################################# +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=InnoDB; +-- source extra/rpl_tests/rpl_row_blob.test + diff --git a/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test b/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test new file mode 100644 index 00000000000..a470c36f9f8 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_blob_myisam.test @@ -0,0 +1,11 @@ +################################# +# Wrapper for rpl_row_blob.test# +################################# +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +let $engine_type=myisam; +-- source extra/rpl_tests/rpl_row_blob.test + diff --git a/mysql-test/suite/rpl/t/rpl_row_charset.test b/mysql-test/suite/rpl/t/rpl_row_charset.test new file mode 100644 index 00000000000..9737c52c70f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_charset.test @@ -0,0 +1,7 @@ +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +let $engine_type=myisam; +-- source extra/rpl_tests/rpl_row_charset.test diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table-slave.opt b/mysql-test/suite/rpl/t/rpl_row_create_table-slave.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_create_table-slave.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test new file mode 100644 index 00000000000..be10d48b757 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -0,0 +1,236 @@ +# Testing table creations for row-based replication. + +--source include/have_binlog_format_row.inc +--source include/master-slave.inc +--source include/have_innodb.inc +connection slave; +--source include/have_innodb.inc +connection master; + +# Bug#18326: Do not lock table for writing during prepare of statement +# The use of the ps protocol causes extra table maps in the binlog, so +# we disable the ps-protocol for this statement. +--disable_ps_protocol + +--disable_query_log +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; +--enable_warnings +--enable_query_log + +# Set the default storage engine to different values on master and +# slave. We need to stop the slave for the server variable to take +# effect, since the variable is only read on start-up. +sync_slave_with_master; +--disable_query_log +set @storage_engine = @@global.storage_engine; +STOP SLAVE; +SET GLOBAL storage_engine=memory; +START SLAVE; +--enable_query_log + +connection master; +CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t2 (a INT, b INT) ENGINE=Merge; +CREATE TABLE t3 (a INT, b INT) CHARSET=utf8; +CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8; +--replace_column 1 # 4 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ +--query_vertical SHOW BINLOG EVENTS FROM 216 +--echo **** On Master **** +--query_vertical SHOW CREATE TABLE t1 +--query_vertical SHOW CREATE TABLE t2 +--query_vertical SHOW CREATE TABLE t3 +sync_slave_with_master; +--echo **** On Slave **** +--query_vertical SHOW CREATE TABLE t1 +--query_vertical SHOW CREATE TABLE t2 +--query_vertical SHOW CREATE TABLE t3 + +connection master; +CREATE TABLE t5 (b INT, c INT) SELECT * FROM t3; + +CREATE TEMPORARY TABLE tt3 (a INT, b INT); +INSERT INTO tt3 VALUES (1,2), (2,4), (3,6), (4,2), (5,10), (6,12); +CREATE TABLE t6 (b INT, c INT) SELECT * FROM tt3; +--echo **** On Master **** +--query_vertical SHOW CREATE TABLE t5 +SELECT * FROM t5 ORDER BY a,b,c; +--query_vertical SHOW CREATE TABLE t6 +SELECT * FROM t6 ORDER BY a,b,c; +sync_slave_with_master; +--echo **** On Slave **** +--query_vertical SHOW CREATE TABLE t5 +SELECT * FROM t5 ORDER BY a,b,c; +--query_vertical SHOW CREATE TABLE t6 +SELECT * FROM t6 ORDER BY a,b,c; + +connection master; +# Test for erroneous constructions +--error ER_DUP_ENTRY +CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; +# Shouldn't be written to the binary log +--replace_column 1 # 4 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS FROM 1098; + +# Test that INSERT-SELECT works the same way as for SBR. +CREATE TABLE t7 (a INT, b INT UNIQUE); +--error ER_DUP_ENTRY +INSERT INTO t7 SELECT a,b FROM tt3; +SELECT * FROM t7 ORDER BY a,b; +# Should be written to the binary log +--replace_column 1 # 4 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS FROM 1098; +sync_slave_with_master; +SELECT * FROM t7 ORDER BY a,b; + +connection master; +CREATE TEMPORARY TABLE tt4 (a INT, b INT); +INSERT INTO tt4 VALUES (4,8), (5,10), (6,12); +BEGIN; +INSERT INTO t7 SELECT a,b FROM tt4; +ROLLBACK; +--replace_column 1 # 4 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS FROM 1294; +SELECT * FROM t7 ORDER BY a,b; +sync_slave_with_master; +SELECT * FROM t7 ORDER BY a,b; + +connection master; +CREATE TABLE t8 LIKE t4; +CREATE TABLE t9 LIKE tt4; +CREATE TEMPORARY TABLE tt5 LIKE t4; +CREATE TEMPORARY TABLE tt6 LIKE tt4; +CREATE TEMPORARY TABLE tt7 SELECT 1; +--echo **** On Master **** +--query_vertical SHOW CREATE TABLE t8 +--query_vertical SHOW CREATE TABLE t9 +--replace_column 1 # 4 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS FROM 1390; +sync_slave_with_master; +--echo **** On Slave **** +--query_vertical SHOW CREATE TABLE t8 +--query_vertical SHOW CREATE TABLE t9 + +connection master; +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; +sync_slave_with_master; +# Here we reset the value of the default storage engine +STOP SLAVE; +SET GLOBAL storage_engine=@storage_engine; +START SLAVE; +--enable_ps_protocol + +# BUG#22864 (Rollback following CREATE ... SELECT discards 'CREATE +# table' from log): +--echo ================ BUG#22864 ================ +connection slave; +STOP SLAVE; +RESET SLAVE; +connection master; +RESET MASTER; +connection slave; +START SLAVE; +connection master; +SET AUTOCOMMIT=0; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); + +CREATE TABLE t2 ENGINE=INNODB SELECT * FROM t1; +ROLLBACK; + +CREATE TABLE t3 ENGINE=INNODB SELECT * FROM t1; +INSERT INTO t3 VALUES (4),(5),(6); +ROLLBACK; + +CREATE TABLE t4 ENGINE=INNODB SELECT * FROM t1; +INSERT INTO t1 VALUES (4),(5),(6); +ROLLBACK; + +SHOW TABLES; +SELECT TABLE_NAME,ENGINE + FROM INFORMATION_SCHEMA.TABLES + WHERE TABLE_NAME LIKE 't_' +ORDER BY TABLE_NAME; +SELECT * FROM t1 ORDER BY a; +SELECT * FROM t2 ORDER BY a; +SELECT * FROM t3 ORDER BY a; +SELECT * FROM t4 ORDER BY a; +--replace_column 1 # 4 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS; +sync_slave_with_master; +SHOW TABLES; +SELECT TABLE_NAME,ENGINE + FROM INFORMATION_SCHEMA.TABLES + WHERE TABLE_NAME LIKE 't_' +ORDER BY TABLE_NAME; +SELECT * FROM t1 ORDER BY a; +SELECT * FROM t2 ORDER BY a; +SELECT * FROM t3 ORDER BY a; +SELECT * FROM t4 ORDER BY a; + +connection master; +DROP TABLE IF EXISTS t1,t2,t3,t4; +SET AUTOCOMMIT=1; +sync_slave_with_master; + +# Some tests with temporary tables +connection slave; +STOP SLAVE; +RESET SLAVE; + +connection master; +RESET MASTER; + +connection slave; +START SLAVE; + +connection master; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); + +CREATE TABLE t2 (a INT) ENGINE=INNODB; + +BEGIN; +INSERT INTO t2 SELECT a*a FROM t1; +CREATE TEMPORARY TABLE tt1 +SELECT a+1 AS a + FROM t1 + WHERE a MOD 2 = 1; +INSERT INTO t2 SELECT a+2 FROM tt1; +COMMIT; + +SELECT * FROM t2 ORDER BY a; +--replace_column 1 # 4 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS; +sync_slave_with_master; +SELECT * FROM t2 ORDER BY a; + +connection master; +TRUNCATE TABLE t2; + +BEGIN; +INSERT INTO t2 SELECT a*a FROM t1; +CREATE TEMPORARY TABLE tt2 +SELECT a+1 AS a + FROM t1 + WHERE a MOD 2 = 1; +INSERT INTO t2 SELECT a+2 FROM tt2; +ROLLBACK; + +SELECT * FROM t2 ORDER BY a; +--replace_column 1 # 4 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS FROM 631; +sync_slave_with_master; +SELECT * FROM t2 ORDER BY a; + +connection master; +DROP TABLE t1,t2; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test b/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test new file mode 100644 index 00000000000..a0e74567349 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_delayed_ins.test @@ -0,0 +1,7 @@ +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +let $engine_type=myisam; +-- source extra/rpl_tests/rpl_row_delayed_ins.test diff --git a/mysql-test/suite/rpl/t/rpl_row_drop.test b/mysql-test/suite/rpl/t/rpl_row_drop.test new file mode 100644 index 00000000000..20c217a7c3a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_drop.test @@ -0,0 +1,48 @@ +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +# Bug#12415: DROP of temporary table on master stops slave +connection master; +--echo **** On Master **** +CREATE TABLE t1 (a int); +CREATE TABLE t2 (a int); +CREATE TEMPORARY TABLE t2 (a int, b int); +SHOW TABLES; +sync_slave_with_master; +--echo **** On Slave **** +SHOW TABLES; +connection master; +--echo **** On Master **** +DROP TABLE t2; # Dropping the temporary table +SHOW TABLES; +sync_slave_with_master; +--echo **** On Slave **** +SHOW TABLES; # There should be two tables on the slave + +connection master; +--echo **** On Master **** +CREATE TEMPORARY TABLE t2 (a int, b int); +SHOW TABLES; +sync_slave_with_master; +--echo **** On Slave **** +SHOW TABLES; +connection master; +--echo **** On Master **** +# Should drop the non-temporary table t1 and the temporary table t2 +DROP TABLE t1,t2; +let $VERSION=`select version()`; +--replace_result $VERSION VERSION +--replace_regex /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS; +SHOW TABLES; +sync_slave_with_master; +--echo **** On Slave **** +SHOW TABLES; + +--disable_query_log +--disable_warnings +connection master; +DROP TABLE IF EXISTS t2; +sync_slave_with_master; +--enable_warnings +--enable_query_log diff --git a/mysql-test/suite/rpl/t/rpl_row_err_daisychain-master.opt b/mysql-test/suite/rpl/t/rpl_row_err_daisychain-master.opt new file mode 100644 index 00000000000..83ed8522e72 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_err_daisychain-master.opt @@ -0,0 +1 @@ +--binlog-format=row diff --git a/mysql-test/suite/rpl/t/rpl_row_err_daisychain-slave.opt b/mysql-test/suite/rpl/t/rpl_row_err_daisychain-slave.opt new file mode 100644 index 00000000000..4cb7a31da81 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_err_daisychain-slave.opt @@ -0,0 +1 @@ +--binlog-format=statement --log-slave-updates diff --git a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test new file mode 100644 index 00000000000..a2f9e31fc5d --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test @@ -0,0 +1,17 @@ +# depends on the binlog output +-- source include/have_binlog_format_row.inc + +let $rename_event_pos= 619; + +# Bug#18326: Do not lock table for writing during prepare of statement +# The use of the ps protocol causes extra table maps in the binlog, so +# we disable the ps-protocol for this statement. + +# Merge tables are not supported in NDB +-- source include/not_ndb_default.inc + + +--disable_ps_protocol +-- source extra/rpl_tests/rpl_flsh_tbls.test +--enable_ps_protocol + diff --git a/mysql-test/suite/rpl/t/rpl_row_func001.test b/mysql-test/suite/rpl/t/rpl_row_func001.test new file mode 100644 index 00000000000..53fb55118e6 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_func001.test @@ -0,0 +1,57 @@ +############################################################################# +# This test is being created to test out the non deterministic items with # +# row based replication. # +# Original Author: JBM # +# Original Date: Aug/10/2005 # +# Update: 08/29/2005 change name to initails # +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + + +# Begin clean up test section +connection master; +--disable_warnings +--error 0,1305 +DROP FUNCTION test.f1; +DROP TABLE IF EXISTS test.t1; + + +--enable_warnings + +# Section 1 test from bug #12487 Uses stored function to insert rows to see what is replicated. + +create table test.t1 (a int, PRIMARY KEY(a)); + +delimiter //; +create function test.f1(i int) returns int +begin +insert into test.t1 values(i); +return 0; +end// +delimiter ;// + +select test.f1(1); +select test.f1(2); +select * from test.t1; + +save_master_pos; +sync_slave_with_master; +connection slave; +#show create table test.t1; +select * from test.t1; + +connection master; + +#Used for debugging +#show binlog events; + +# Cleanup + +DROP FUNCTION test.f1; +DROP TABLE test.t1; +sync_slave_with_master; + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_func002.test b/mysql-test/suite/rpl/t/rpl_row_func002.test new file mode 100644 index 00000000000..44a704bfbc5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_func002.test @@ -0,0 +1,104 @@ +############################################################################# +# This test is being created to test out the non deterministic items with # +# row based replication. # +# Original Author: JBM # +# Original Date: Aug/10/2005 # +# Update: 08/29/2005 Turn on diff # +############################################################################# +# Note: Many lines are commented out in this test case. These were used for # +# creating the test case and debugging and are being left for # +# debugging, but they can not be used for the regular testing as the # +# Time changes and is not deteministic, so instead we dump both the # +# master and slave and diff the dumps. If the dumps differ then the # +# test case will fail. To run during diff failuers, comment out the # +# diff. # +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + + +# Begin clean up test section +connection master; +--disable_warnings +--error 0,1305 +DROP FUNCTION test.f1; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; + +--enable_warnings + +# Section 1 test from Peter G. This test changes uses a stored function to update rows and return the timestamp. We change the value of the time stamp on the master to see what is replicated. + +CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a)); +CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a)); + +delimiter //; +create function test.f1() RETURNS TIMESTAMP +BEGIN +UPDATE test.t1 SET t = CURRENT_TIMESTAMP; +RETURN CURRENT_TIMESTAMP; +END// +delimiter ;// + +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +#select * from test.t1; +#save_master_pos; +#sync_slave_with_master; +#connection slave; +#select * from test.t1; +#connection master; + + +SET TIMESTAMP=2; +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +#select * from test.t1; +#save_master_pos; +#sync_slave_with_master; +#connection slave; +#select * from test.t1; +#connection master; + +#sleep 3; +SET TIMESTAMP=1; +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); +#select * from test.t1; +#save_master_pos; +#sync_slave_with_master; +#connection slave; +#select * from test.t1; +#connection master; + + +SET TIMESTAMP=333300000; +INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); + +# We need a sync to ensure that the slave has caught up before +# dumping the database. +sync_slave_with_master; + +connection master; +#Used for debugging +#show binlog events; + +# time to dump the databases and so we can see if they match + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func002_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func002_slave.sql + +# Cleanup +DROP FUNCTION test.f1; +DROP TABLE test.t1; +DROP TABLE test.t2; +sync_slave_with_master; + +# the test will show that the diff statement failed and no reject file +# will be created. You will need to go to the mysql-test dir and diff +# the files your self to see what is not matching :-). The files are located +# in mysql-test/var/tmp + +diff_files $MYSQLTEST_VARDIR/tmp/func002_master.sql $MYSQLTEST_VARDIR/tmp/func002_slave.sql; + +# End of 5.0 test case + diff --git a/mysql-test/suite/rpl/t/rpl_row_func003-slave.opt b/mysql-test/suite/rpl/t/rpl_row_func003-slave.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_func003-slave.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_func003.test b/mysql-test/suite/rpl/t/rpl_row_func003.test new file mode 100644 index 00000000000..abfadfe1a1a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_func003.test @@ -0,0 +1,11 @@ +################################### +# Wrapper for rpl_row_func003.test# +################################### +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=INNODB; +-- source extra/rpl_tests/rpl_row_func003.test diff --git a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt new file mode 100644 index 00000000000..abd717f8222 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl-slave.opt @@ -0,0 +1 @@ +--replicate-ignore-table=test.t2 diff --git a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test new file mode 100644 index 00000000000..803c214b6c5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test @@ -0,0 +1,35 @@ +# Test to see what slave says when master is updating a table it does +# not have +--source include/have_binlog_format_row.inc + +source include/master-slave.inc; + +connection master; +create table t1 (a int not null primary key); +insert into t1 values (1); +create table t2 (a int); +insert into t2 values (1); +update t1, t2 set t1.a = 0 where t1.a = t2.a; + +sync_slave_with_master; +# t2 should not have been replicated +# t1 should have been properly updated +show tables; +select * from t1; +drop table t1; + +connection master; +insert into t1 values (1); + +connection slave; +# slave should have stopped because can't find table t1 +--source include/wait_for_slave_sql_to_stop.inc +# see if we have a good error message: +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 7 # 8 # 9 # 23 # 33 # +--vertical_results +show slave status; + +# cleanup +connection master; +drop table t1, t2; diff --git a/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test b/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test new file mode 100644 index 00000000000..9aeb57c4fa2 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_insert_delayed.test @@ -0,0 +1,14 @@ +--source include/have_binlog_format_row.inc +--source include/master-slave.inc +--source include/not_embedded.inc +--source include/not_windows.inc + +connection master; +set @old_global_binlog_format = @@global.binlog_format; + +let $binlog_format_statement=0; +set @@global.binlog_format = row; +--source extra/rpl_tests/rpl_insert_delayed.test + +connection master; +set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/suite/rpl/t/rpl_row_log-master.opt b/mysql-test/suite/rpl/t/rpl_row_log-master.opt new file mode 100644 index 00000000000..e0d075c3fbd --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_log-master.opt @@ -0,0 +1 @@ +--skip-external-locking diff --git a/mysql-test/suite/rpl/t/rpl_row_log-slave.opt b/mysql-test/suite/rpl/t/rpl_row_log-slave.opt new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_log-slave.opt @@ -0,0 +1 @@ + diff --git a/mysql-test/suite/rpl/t/rpl_row_log.test b/mysql-test/suite/rpl/t/rpl_row_log.test new file mode 100644 index 00000000000..3253ae9ecba --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_log.test @@ -0,0 +1,16 @@ +################################### +# Wrapper for rpl_row_log.test # +# Added wrapper so that MyISAM & # +# Innodb and NDB could all use the# +# Same test. NDB produced a diff # +# bin-log # +################################### +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +-- source include/have_binlog_format_row.inc +let $engine_type=MyISAM; +-- source extra/rpl_tests/rpl_log.test + diff --git a/mysql-test/suite/rpl/t/rpl_row_log_innodb-master.opt b/mysql-test/suite/rpl/t/rpl_row_log_innodb-master.opt new file mode 100644 index 00000000000..e0d075c3fbd --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_log_innodb-master.opt @@ -0,0 +1 @@ +--skip-external-locking diff --git a/mysql-test/suite/rpl/t/rpl_row_log_innodb-slave.opt b/mysql-test/suite/rpl/t/rpl_row_log_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_log_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_log_innodb.test b/mysql-test/suite/rpl/t/rpl_row_log_innodb.test new file mode 100644 index 00000000000..5e5182e3519 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_log_innodb.test @@ -0,0 +1,13 @@ +################################### +# Wrapper for rpl_row_log.test # +# Added wrapper so that MyISAM & # +# Innodb and NDB could all use the# +# Same test. NDB produced a diff # +# bin-log # +################################### +-- source include/not_ndb_default.inc +-- source include/have_binlog_format_row.inc +-- source include/have_innodb.inc +let $engine_type=InnoDB; +-- source extra/rpl_tests/rpl_log.test + diff --git a/mysql-test/suite/rpl/t/rpl_row_max_relay_size.test b/mysql-test/suite/rpl/t/rpl_row_max_relay_size.test new file mode 100644 index 00000000000..a0be59e44a7 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_max_relay_size.test @@ -0,0 +1,11 @@ +# Test of options max_binlog_size and max_relay_log_size and +# how they act (if max_relay_log_size == 0, use max_binlog_size +# for relay logs too). +# Test of manual relay log rotation with FLUSH LOGS. + +# Requires statement logging +-- source include/not_ndb_default.inc +SET SESSION BINLOG_FORMAT=ROW; +SET GLOBAL BINLOG_FORMAT=ROW; +-- source extra/rpl_tests/rpl_max_relay_size.test + diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog-master.opt b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog-master.opt new file mode 100644 index 00000000000..07d12817f5f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog-master.opt @@ -0,0 +1 @@ +--max-binlog-size=1040384 diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test new file mode 100644 index 00000000000..dd46d64f684 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test @@ -0,0 +1,348 @@ +################################################################## +# Author: JBM # +# Date: 2006-02-22 # +# Purpose: To test changes to mysqlbinlog for row based bin logs # +# We are using .opt file since we need small binlog size # +################################################################## +# Include Section +# Make sure that we have row based bin log +-- source include/have_binlog_format_row.inc +# Embedded server doesn't support binlogging +-- source include/not_embedded.inc +-- source include/master-slave.inc +# This test requires the cp932 charset compiled in +-- source include/have_cp932.inc + +# Setup Section +# we need this for getting fixed timestamps inside of this test + +--disable_query_log +select "---Setup Section --" as ""; +--enable_query_log + +set timestamp=1000000000; + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3; +--enable_warnings + +connection master; +CREATE TABLE t1(word VARCHAR(20)); +CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY); +CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT); + + +# Test Section +# Lets start by putting some data into the tables. + +--disable_query_log +INSERT INTO t1 VALUES ("abirvalg"); +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; + +# d1 length 3000 +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); + +let $count=500; +while ($count) +{ + INSERT INTO t2 VALUES (NULL); + eval INSERT INTO t3 VALUES ($count,@d1,'20060222000000','Tested in Texas',$count*2.2); + dec $count; +} +--enable_query_log + + +--disable_query_log +select "---Test1 check table load --" as ""; +--enable_query_log + +# Lets Check the tables on the Master +SELECT COUNT(*) from t1; +SELECT COUNT(*) from t2; +SELECT COUNT(*) from t3; +SELECT * FROM t1 ORDER BY word LIMIT 5; +SELECT * FROM t2 ORDER BY id LIMIT 5; +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; + +# Should have the same on the slave; + +sync_slave_with_master; +SELECT COUNT(*) from t1; +SELECT COUNT(*) from t2; +SELECT COUNT(*) from t3; +SELECT * FROM t1 ORDER BY word LIMIT 5; +SELECT * FROM t2 ORDER BY id LIMIT 5; +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; + +# Okay time to get busy, back to master + +connection master; + +# simple query to show more in second binlog +insert into t1 values ("Alas"); +flush logs; + +# delimiters are for easier debugging in future +--disable_query_log +select "--- Test 1 Dump binlog to file --" as ""; +--enable_query_log + +# +# Prepare local temporary file to recreate what we have currently. + +--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/master.sql + +--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/master.sql + +# Now that we have our file, lets get rid of the current database. +# Cleanup the master and the slave and try to recreate. +--disable_query_log +select "--- Test 1 delete tables, clean master and slave --" as ""; +--enable_query_log + +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; + +sync_slave_with_master; +#we expect STOP SLAVE to produce a warning as the slave is stopped +#(the server was started with skip-slave-start) +--disable_warnings +stop slave; +--enable_warnings +--require r/slave-stopped.result +show status like 'Slave_running'; +connection master; +reset master; +connection slave; +reset slave; +start slave; +--require r/slave-running.result +show status like 'Slave_running'; +connection master; + +# We should be clean at this point, now we will run in the file from above. +--disable_query_log +select "--- Test 1 Load from Dump binlog file --" as ""; +--enable_query_log + +--exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/master.sql" + +--disable_query_log +select "--- Test 1 Check Load Results --" as ""; +--enable_query_log + +# Lets Check the tables on the Master +SELECT COUNT(*) from t1; +SELECT COUNT(*) from t2; +SELECT COUNT(*) from t3; +SELECT * FROM t1 ORDER BY word LIMIT 5; +SELECT * FROM t2 ORDER BY id LIMIT 5; +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; + +# Should have the same on the slave; + +sync_slave_with_master; +SELECT COUNT(*) from t1; +SELECT COUNT(*) from t2; +SELECT COUNT(*) from t3; +SELECT * FROM t1 ORDER BY word LIMIT 5; +SELECT * FROM t2 ORDER BY id LIMIT 5; +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +connection master; + +# We should be gold by the time, so I will get rid of our file. + +--exec rm $MYSQLTEST_VARDIR/tmp/master.sql + + +# this test for position option +# By setting this position to 413, we should only get the create of t3 +--disable_query_log +select "--- Test 2 position test --" as ""; +--enable_query_log +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 $MYSQLTEST_VARDIR/log/master-bin.000001 + +# These are tests for remote binlog. +# They should return the same as previous test. + +--disable_query_log +select "--- Test 3 First Remote test --" as ""; +--enable_query_log + +# This is broken now +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 + +# This part is disabled due to bug #17654 + +--disable_query_log +select "--- Test 4 Second Remote test --" as ""; +--enable_query_log +--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql + +--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/remote.sql + +# Now that we have our file, lets get rid of the current database. +# Cleanup the master and the slave and try to recreate. + +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; + +sync_slave_with_master; + +#we expect STOP SLAVE to produce a warning as the slave is stopped +#(the server was started with skip-slave-start) + +--disable_warnings +stop slave; +--enable_warnings +--require r/slave-stopped.result +show status like 'Slave_running'; +connection master; +reset master; +connection slave; +reset slave; +start slave; +--require r/slave-running.result +show status like 'Slave_running'; +connection master; + +# We should be clean at this point, now we will run in the file from above. + +--exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/remote.sql" + +# Lets Check the tables on the Master + +SELECT COUNT(*) from t1; +SELECT COUNT(*) from t2; +SELECT COUNT(*) from t3; +SELECT * FROM t1 ORDER BY word LIMIT 5; +SELECT * FROM t2 ORDER BY id LIMIT 5; +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; + +# Should have the same on the slave; + +sync_slave_with_master; +SELECT COUNT(*) from t1; +SELECT COUNT(*) from t2; +SELECT COUNT(*) from t3; +SELECT * FROM t1 ORDER BY word LIMIT 5; +SELECT * FROM t2 ORDER BY id LIMIT 5; +SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; +connection master; + +# We should be gold by the time, so I will get rid of our file. + +--exec rm $MYSQLTEST_VARDIR/tmp/remote.sql +################### End Bug 17654 ###################### + +# LOAD DATA +--disable_query_log +select "--- Test 5 LOAD DATA --" as ""; +--enable_query_log +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 + +# Bug#7853 (mysqlbinlog does not accept input from stdin) + +--disable_query_log +select "--- Test 6 reading stdin --" as ""; +--enable_query_log +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--exec $MYSQL_BINLOG --short-form - < $MYSQLTEST_VARDIR/log/master-bin.000001 + +--disable_query_log +select "--- Test 7 reading stdin w/position --" as ""; +--enable_query_log +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--exec $MYSQL_BINLOG --short-form --position=416 - < $MYSQLTEST_VARDIR/log/master-bin.000001 + +# Bug#16217 (mysql client did not know how not switch its internal charset) +--disable_query_log +select "--- Test 8 switch internal charset --" as ""; +--enable_query_log +sync_slave_with_master; + +#we expect STOP SLAVE to produce a warning as the slave is stopped +#(the server was started with skip-slave-start) + +--disable_warnings +stop slave; +--enable_warnings +--require r/slave-stopped.result +show status like 'Slave_running'; +connection master; +reset master; +connection slave; +reset slave; +start slave; +--require r/slave-running.result +show status like 'Slave_running'; +connection master; + +create table t4 (f text character set utf8); +create table t5 (f text character set cp932); +--exec $MYSQL --default-character-set=utf8 test -e "insert into t4 values(_utf8'ソ')" +--exec $MYSQL --default-character-set=cp932 test -e "insert into t5 values(_cp932'ƒ\');" +flush logs; +rename table t4 to t04, t5 to t05; +--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 | $MYSQL --default-character-set=utf8 +# original and recovered data must be equal +select HEX(f) from t04; +select HEX(f) from t4; +select HEX(f) from t05; +select HEX(f) from t5; + +# slave should have same +sync_slave_with_master; +select HEX(f) from t04; +select HEX(f) from t4; +select HEX(f) from t05; +select HEX(f) from t5; + +--disable_query_log +select "--- Test cleanup --" as ""; +--enable_query_log +# clean up +connection master; +sync_slave_with_master; + +connection master; + +# BUG#17654 also test mysqlbinlog to ensure it can read the binlog from a remote server +# and ensure that the results are the same as if read from a file (the same file). + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (a INT NOT NULL KEY, b INT); + +INSERT INTO t1 VALUES(1,1); + +SELECT * FROM t1; + +FLUSH LOGS; + +--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql +--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/local.sql + +--diff_files $MYSQLTEST_VARDIR/tmp/local.sql $MYSQLTEST_VARDIR/tmp/remote.sql + +--exec rm $MYSQLTEST_VARDIR/tmp/remote.sql + +--exec rm $MYSQLTEST_VARDIR/tmp/local.sql + +DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_row_mystery22.test b/mysql-test/suite/rpl/t/rpl_row_mystery22.test new file mode 100644 index 00000000000..9933fec22fc --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_mystery22.test @@ -0,0 +1,45 @@ +# Originally taken from rpl_mystery22.test, +# but this row-based-replication test has a totally different spirit: +# slave will not stop because of dup key, +# instead we test if it does overwrite the dup key +# as expected. +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +# first, cause a duplicate key problem on the slave +create table t1(n int auto_increment primary key, s char(10)); +sync_slave_with_master; +insert into t1 values (2,'old'); +connection master; +insert into t1 values(NULL,'new'); +insert into t1 values(NULL,'new'); +save_master_pos; +connection slave; +sync_with_master; +select * from t1 order by n; +delete from t1 where n = 2; +--disable_warnings +start slave; +--enable_warnings +sync_with_master; +stop slave; +connection master; +create table t2(n int); +drop table t2; +insert into t1 values(NULL,'new'); +# what happens when we delete a row which does not exist on slave? +set sql_log_bin=0; +insert into t1 values(NULL,'new'); +set sql_log_bin=1; +delete from t1 where n=4; +save_master_pos; +connection slave; +--disable_warnings +start slave; +--enable_warnings +sync_with_master; +select * from t1 order by n; +#clean up +connection master; +drop table t1; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_row_reset_slave.test b/mysql-test/suite/rpl/t/rpl_row_reset_slave.test new file mode 100644 index 00000000000..a970c161153 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_reset_slave.test @@ -0,0 +1,5 @@ +# TBF - difference in row level logging +# Temp tables are not replicated in rbr, but it is still good to hit rbr with everthing +-- source include/have_binlog_format_row.inc +-- source extra/rpl_tests/rpl_reset_slave.test + diff --git a/mysql-test/suite/rpl/t/rpl_row_sp001.test b/mysql-test/suite/rpl/t/rpl_row_sp001.test new file mode 100644 index 00000000000..c12e73b6861 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp001.test @@ -0,0 +1,146 @@ +############################################################################# +# This test is being created to test out the non deterministic items with # +# row based replication. # +# Original Author: JBM # +# Original Date: Aug/09/2005 # +# Updated: Aug/29/2005 +############################################################################# +# Test: Includes two stored procedure tests. First test uses SP to insert # +# values from RAND() and NOW() into a table. # +# The second test uses SP with CASE structure to decide what to text # +# to update a given table with. # +############################################################################ + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +-- disable_query_log +-- disable_result_log + +# Begin clean up test section +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; + +-- enable_query_log +-- enable_result_log + +# Begin test section 1 for non deterministic SP +let $message=; +--source include/show_msg.inc + +create table test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); + +delimiter //; +create procedure test.p1() +begin + INSERT INTO test.t1 (f,d) VALUES (RAND(),NOW()); +end// +delimiter ;// + +# show binlog events; + +-- disable_query_log +-- disable_result_log +let $1=10; +while ($1) +{ + call test.p1(); + sleep 1; + dec $1; +} +-- enable_result_log +-- enable_query_log + +## Used for debugging +#show binlog events; +#select * from test.t1; +#sync_slave_with_master; +#select * from test.t1; +#connection master; + +let $message=; +--source include/show_msg.inc + + +CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t CHAR(4), PRIMARY KEY(a)); + +delimiter //; +CREATE PROCEDURE test.p2(n int) +begin +CASE n +WHEN 1 THEN + UPDATE test.t2 set t ='Tex'; +WHEN 2 THEN + UPDATE test.t2 set t ='SQL'; +ELSE + UPDATE test.t2 set t ='NONE'; +END CASE; +end// +delimiter ;// + +INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'); + +SELECT * FROM t2 ORDER BY a; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM t2 ORDER BY a; + +connection master; +call test.p2(1); +SELECT * FROM t2 ORDER BY a; +sync_slave_with_master; +SELECT * FROM t2 ORDER BY a; + + +connection master; +call test.p2(2); +SELECT * FROM t2 ORDER BY a; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM t2 ORDER BY a; + +connection master; +call test.p2(3); +SELECT * FROM t2 ORDER BY a; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM t2 ORDER BY a; + +##Used for debugging +#show binlog events; + +# time to dump the databases and so we can see if they match + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp001_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp001_slave.sql + +# First lets cleanup + +connection master; +DROP PROCEDURE test.p1; +DROP PROCEDURE test.p2; +DROP TABLE test.t1; +DROP TABLE test.t2; +sync_slave_with_master; + +# Lets compare. Note: If they match test will pass, if they do not match +# the test will show that the diff statement failed and not reject file +# will be created. You will need to go to the mysql-test dir and diff +# the files your self to see what is not matching :-) Failed dump files +# will be located in $MYSQLTEST_VARDIR/tmp + +diff_files $MYSQLTEST_VARDIR/tmp/sp001_master.sql $MYSQLTEST_VARDIR/tmp/sp001_slave.sql; + +# If all is good, when can cleanup our dump files. +--remove_file $MYSQLTEST_VARDIR/tmp/sp001_master.sql +--remove_file $MYSQLTEST_VARDIR/tmp/sp001_slave.sql + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_sp002_innodb-master.opt b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb-master.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb-master.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_sp002_innodb-slave.opt b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test new file mode 100644 index 00000000000..e272e34e715 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp002_innodb.test @@ -0,0 +1,11 @@ +################################# +# Wrapper for rpl_row_sp002.test# +################################# +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=INNODB; +-- source extra/rpl_tests/rpl_row_sp002.test diff --git a/mysql-test/suite/rpl/t/rpl_row_sp003-master.opt b/mysql-test/suite/rpl/t/rpl_row_sp003-master.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp003-master.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_sp003-slave.opt b/mysql-test/suite/rpl/t/rpl_row_sp003-slave.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp003-slave.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_sp003.test b/mysql-test/suite/rpl/t/rpl_row_sp003.test new file mode 100644 index 00000000000..99b30253c8a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp003.test @@ -0,0 +1,11 @@ +################################# +# Wrapper for rpl_row_sp003.test# +################################# +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=INNODB; +-- source extra/rpl_tests/rpl_row_sp003.test diff --git a/mysql-test/suite/rpl/t/rpl_row_sp005.test b/mysql-test/suite/rpl/t/rpl_row_sp005.test new file mode 100644 index 00000000000..054fa02f514 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp005.test @@ -0,0 +1,110 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/15/2005 # +# Updated: Aug/29/2005: Removed sleeps # +############################################################################# +# Test: Tests SPs with cursors, flow logic, and alter sp. In addition the # +# tests SPs with insert and update operations. # +############################################################################# +# 2006-02-08 By JBM added ORDER BY for use with NDB engine +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + + +# Begin clean up test section +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t3; +--enable_warnings +# End of cleanup + +# Begin test section 1 +CREATE TABLE IF NOT EXISTS test.t1(id INT, data CHAR(16),PRIMARY KEY(id)); +CREATE TABLE IF NOT EXISTS test.t2(id2 INT,PRIMARY KEY(id2)); +CREATE TABLE IF NOT EXISTS test.t3(id3 INT,PRIMARY KEY(id3), c CHAR(16)); + +delimiter |; +CREATE PROCEDURE test.p1() +BEGIN +DECLARE done INT DEFAULT 0; + DECLARE spa CHAR(16); + DECLARE spb,spc INT; + DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1 ORDER BY id; + DECLARE cur2 CURSOR FOR SELECT id2 FROM test.t2 ORDER BY id2; + DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; + + OPEN cur1; + OPEN cur2; + + REPEAT + FETCH cur1 INTO spb, spa; + FETCH cur2 INTO spc; + IF NOT done THEN + IF spb < spc THEN + INSERT INTO test.t3 VALUES (spb,spa); + ELSE + INSERT INTO test.t3 VALUES (spc,spa); + END IF; + END IF; + UNTIL done END REPEAT; + + CLOSE cur1; + CLOSE cur2; +END| +CREATE PROCEDURE test.p2() +BEGIN + INSERT INTO test.t1 VALUES (4,'MySQL'),(20,'ROCKS'),(11,'Texas'),(10,'kyle'); + INSERT INTO test.t2 VALUES (4),(2),(1),(3); + UPDATE test.t1 SET id=id+4 WHERE id=4; +END| +delimiter ;| + +let $message=< ---- Master selects-- >; +--source include/show_msg.inc +CALL test.p2(); +SELECT * FROM test.t1 ORDER BY id; +SELECT * FROM test.t2 ORDER BY id2; + +let $message=< ---- Slave selects-- >; +--source include/show_msg.inc +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t1 ORDER BY id; +SELECT * FROM test.t2 ORDER BY id2; + +let $message=< ---- Master selects-- >; +--source include/show_msg.inc +connection master; +CALL test.p1(); +sleep 6; +SELECT * FROM test.t3 ORDER BY id3; + +let $message=< ---- Slave selects-- >; +--source include/show_msg.inc +connection slave; +SELECT * FROM test.t3 ORDER BY id3; + +connection master; + +ALTER PROCEDURE test.p1 MODIFIES SQL DATA; +#show binlog events; + +# Cleanup + +connection master; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +sync_slave_with_master; + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB-slave.opt b/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test b/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test new file mode 100644 index 00000000000..f7e59440027 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp006_InnoDB.test @@ -0,0 +1,11 @@ +################################# +# Wrapper for rpl_row_sp006.test# +################################# +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=InnoDB; +-- source extra/rpl_tests/rpl_row_sp006.test diff --git a/mysql-test/suite/rpl/t/rpl_row_sp007_innodb-slave.opt b/mysql-test/suite/rpl/t/rpl_row_sp007_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp007_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test b/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test new file mode 100644 index 00000000000..41af5a5f997 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp007_innodb.test @@ -0,0 +1,11 @@ +################################# +# Wrapper for rpl_row_sp007.test# +################################# +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +# Added to skip if ndb is default # +######################################################## +-- source include/not_ndb_default.inc +-- source include/have_innodb.inc +let $engine_type=INNODB; +-- source extra/rpl_tests/rpl_row_sp007.test diff --git a/mysql-test/suite/rpl/t/rpl_row_sp008.test b/mysql-test/suite/rpl/t/rpl_row_sp008.test new file mode 100644 index 00000000000..b1295820c99 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp008.test @@ -0,0 +1,57 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/15/2005 # +# Update: 08/29/2005 Remove sleep # +############################################################################# +# TEST: Use SQL_CALC_FOUND_ROWS and insert results into a table inside a sp # +############################################################################# + + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +# Begin clean up test section +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t2; +--enable_warnings +# End of cleanup + + + +# Begin test section 1 +CREATE TABLE test.t1 (a INT,PRIMARY KEY(a)); +CREATE TABLE test.t2 (a INT,PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES(1),(2); + +delimiter |; +CREATE PROCEDURE test.p1() +BEGIN + SELECT SQL_CALC_FOUND_ROWS * FROM test.t1 LIMIT 1; + INSERT INTO test.t2 VALUES(FOUND_ROWS()); +END| +delimiter ;| + +let $message=< ---- Master selects-- >; +--source include/show_msg.inc +CALL test.p1(); +SELECT * FROM test.t2; + +let $message=< ---- Slave selects-- >; +--source include/show_msg.inc +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t2; + +# Cleanup + +connection master; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +sync_slave_with_master; + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_sp009.test b/mysql-test/suite/rpl/t/rpl_row_sp009.test new file mode 100644 index 00000000000..92d47c6f50f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp009.test @@ -0,0 +1,105 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/18/2005 # +# Updated: 08/29/2005 removed sleeps and added master pos save and snyc # +############################################################################# +#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=12168 # +############################################################################# +# 2006-02-08 By JBM : Added order by for ndb engine use +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + + +# Begin clean up test section +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; + + +# Begin test section 1 +CREATE TABLE test.t1 (a INT, PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES (1),(2),(3),(4); +CREATE TABLE test.t2 (a INT, PRIMARY KEY(a)); + +delimiter |; +CREATE PROCEDURE test.p1 (arg1 CHAR(1)) +BEGIN + DECLARE b, c INT; + IF arg1 = 'a' THEN + BEGIN + DECLARE cur1 CURSOR FOR SELECT A FROM test.t1 WHERE a % 2; + DECLARE continue handler for not found set b = 1; + SET b = 0; + OPEN cur1; + c1_repeat: REPEAT + FETCH cur1 INTO c; + IF (b = 1) THEN + LEAVE c1_repeat; + END IF; + + INSERT INTO test.t2 VALUES (c); + UNTIL b = 1 + END REPEAT; + CLOSE cur1; + END; + END IF; + IF arg1 = 'b' THEN + BEGIN + DECLARE cur2 CURSOR FOR SELECT a FROM test.t1 WHERE NOT a % 2; + DECLARE continue handler for not found set b = 1; + SET b = 0; + OPEN cur2; + c2_repeat: REPEAT + FETCH cur2 INTO c; + IF (b = 1) THEN + LEAVE c2_repeat; + END IF; + + INSERT INTO test.t2 VALUES (c); + UNTIL b = 1 + END REPEAT; + CLOSE cur2; + END; + END IF; +END| +delimiter ;| + +CALL test.p1('a'); +SELECT * FROM test.t2 ORDER BY a; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t2 ORDER BY a; +connection master; +truncate test.t2; + +# this next call fails, but should not +call test.p1('b'); +select * from test.t2 ORDER BY a; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t2 ORDER BY a; + +connection master; +truncate test.t2; +SELECT * FROM test.t2 ORDER BY a; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t2 ORDER BY a; + +# Cleanup +connection master; +#show binlog events; +DROP PROCEDURE test.p1; +DROP TABLE test.t1; +DROP TABLE test.t2; +sync_slave_with_master; + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_sp010.test b/mysql-test/suite/rpl/t/rpl_row_sp010.test new file mode 100644 index 00000000000..28b82217517 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp010.test @@ -0,0 +1,80 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/18/2005 # +# Update: 08/29/2005 remove sleep added master pos save and sync # +############################################################################# +#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=11126 # +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + + +# Begin clean up test section +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p4; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; + + +# Begin test section 1 +delimiter |; +CREATE PROCEDURE test.p1() +BEGIN + INSERT INTO test.t1 VALUES(2); +END| +CREATE PROCEDURE test.p2() +BEGIN + DROP TEMPORARY TABLE IF EXISTS test.t1; + CREATE TEMPORARY TABLE test.t1 (a int, PRIMARY KEY(a)); + INSERT INTO test.t1 VALUES(1); + CALL test.p1(); +END| +delimiter ;| +CALL test.p2(); +SELECT * FROM test.t1 ORDER BY a; + +save_master_pos; +connection slave; +sync_with_master; +show tables; + +connection master; +delimiter |; +CREATE PROCEDURE test.p3() +BEGIN + INSERT INTO test.t2 VALUES(7); +END| +CREATE PROCEDURE test.p4() +BEGIN + DROP TABLE IF EXISTS test.t2; + CREATE TABLE test.t2 (a int, PRIMARY KEY(a)); + INSERT INTO test.t2 VALUES(6); + CALL test.p3(); +END| +delimiter ;| +CALL test.p4(); +SELECT * FROM test.t2 ORDER BY a; + +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t2 ORDER BY a; + +# Cleanup +connection master; +#show binlog events; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p4; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +sync_slave_with_master; + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_sp011.test b/mysql-test/suite/rpl/t/rpl_row_sp011.test new file mode 100644 index 00000000000..25c2fc9ad26 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp011.test @@ -0,0 +1,111 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/18/2005 # +# Updated: 08/29/2005 turned on diff and commented out debug SQL statements# +############################################################################# +#TEST: SP to test alter table and nested SP calls # +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + + +# Begin clean up test section +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p4; +DROP PROCEDURE IF EXISTS test.p5; +DROP PROCEDURE IF EXISTS test.p6; +DROP PROCEDURE IF EXISTS test.p7; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; + + +# Begin test section 1 +CREATE TABLE test.t1 (a int, PRIMARY KEY(a)); +INSERT INTO test.t1 VALUES (1); + +delimiter |; +CREATE PROCEDURE test.p1() +BEGIN + ALTER TABLE test.t1 ADD COLUMN b CHAR(4) AFTER a; + UPDATE test.t1 SET b = 'rbr' WHERE a = 1; + CALL test.p2(); +END| +CREATE PROCEDURE test.p2() +BEGIN + ALTER TABLE test.t1 ADD COLUMN f FLOAT AFTER b; + UPDATE test.t1 SET f = RAND() WHERE a = 1; + CALL test.p3(); +END| +CREATE PROCEDURE test.p3() +BEGIN + ALTER TABLE test.t1 RENAME test.t2; + CALL test.p4(); +END| +CREATE PROCEDURE test.p4() +BEGIN + ALTER TABLE test.t2 ADD INDEX (f); + ALTER TABLE test.t2 CHANGE a a INT UNSIGNED NOT NULL AUTO_INCREMENT; + INSERT INTO test.t2 VALUES (NULL,'TEST',RAND()); + CALL test.p5(); +END| +CREATE PROCEDURE test.p5() +BEGIN + ALTER TABLE test.t2 ORDER BY f; + INSERT INTO test.t2 VALUES (NULL,'STM',RAND()); + CALL test.p6(); +END| +CREATE PROCEDURE test.p6() +BEGIN + ALTER TABLE test.t2 ADD COLUMN b2 CHAR(4) FIRST; + ALTER TABLE test.t2 ADD COLUMN to_drop BIT(8) AFTER b2; + INSERT INTO test.t2 VALUES ('new',1,NULL,'STM',RAND()); + CALL test.p7(); +END| +CREATE PROCEDURE test.p7() +BEGIN + ALTER TABLE test.t2 DROP COLUMN to_drop; + INSERT INTO test.t2 VALUES ('gone',NULL,'STM',RAND()); +END| +delimiter ;| +CALL test.p1(); + +#SELECT * FROM test.t2; +sync_slave_with_master; +#SELECT * FROM test.t2; + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp011_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp011_slave.sql + +# Cleanup +connection master; +#show binlog events; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p4; +DROP PROCEDURE IF EXISTS test.p5; +DROP PROCEDURE IF EXISTS test.p6; +DROP PROCEDURE IF EXISTS test.p7; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +sync_slave_with_master; + +# Lets compare. Note: If they match test will pass, if they do not match +# the test will show that the diff statement failed and not reject file +# will be created. You will need to go to the mysql-test dir and diff +# the files your self to see what is not matching :-) Failed test +# Will leave dump files in $MYSQLTEST_VARDIR/tmp + +diff_files $MYSQLTEST_VARDIR/tmp/sp011_master.sql $MYSQLTEST_VARDIR/tmp/sp011_slave.sql; + +# If all is good, when can cleanup our dump files. +--remove_file $MYSQLTEST_VARDIR/tmp/sp011_master.sql +--remove_file $MYSQLTEST_VARDIR/tmp/sp011_slave.sql + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_sp012.test b/mysql-test/suite/rpl/t/rpl_row_sp012.test new file mode 100644 index 00000000000..3a8d295121c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_sp012.test @@ -0,0 +1,75 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/22/2005 # +# Update: 08/29/2005 Added save pos and sync # +############################################################################# +#TEST: SP to test security and current_user and user # +############################################################################# + + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/not_embedded.inc +-- source include/master-slave.inc + + +# Begin clean up test section +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; + + +# Begin test section 1 +# Create user user1 with no particular access rights +grant usage on *.* to user1@localhost; +flush privileges; + +SELECT CURRENT_USER(); +SELECT USER(); +CREATE PROCEDURE test.p1 () SQL SECURITY INVOKER SELECT CURRENT_USER(), USER(); +CREATE PROCEDURE test.p2 () SQL SECURITY DEFINER CALL test.p1(); +CREATE PROCEDURE test.p3 () SQL SECURITY INVOKER CALL test.p1(); +GRANT EXECUTE ON PROCEDURE p1 TO user1@localhost; +GRANT EXECUTE ON PROCEDURE p2 TO user1@localhost; +GRANT EXECUTE ON PROCEDURE p3 TO user1@localhost; + +# Need to wait for the rights to be applied at the slave +sync_slave_with_master; + +let $message=<******** Master user1 p3 & p2 calls *******>; +--source include/show_msg.inc +connect (muser1,localhost,user1,,); +connection muser1; +SELECT CURRENT_USER(); +SELECT USER(); +CALL test.p3(); +CALL test.p2(); + +let $message=<******** Slave user1 p3 & p2 calls *******>; +--source include/show_msg.inc +connect (suser1,127.0.0.1,user1,,test,$SLAVE_MYPORT,); + +connection master; +save_master_pos; +connection suser1; +sync_with_master; + +SELECT CURRENT_USER(); +SELECT USER(); +CALL test.p3(); +CALL test.p2(); + +# Cleanup +connection master; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p3; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP USER user1@localhost; +sync_slave_with_master; + +# End of 5.0 test case + diff --git a/mysql-test/suite/rpl/t/rpl_row_stop_middle.test b/mysql-test/suite/rpl/t/rpl_row_stop_middle.test new file mode 100644 index 00000000000..da363736100 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_stop_middle.test @@ -0,0 +1,44 @@ +# Test for BUG#11729: see if, when STOP SLAVE occurs while the slave +# SQL thread has processed a Table_map_log_event but has not processed +# the last Rows_log_event associated to it, the slave thread does not +# forget to close its tables. + +# Can be run with statement-based but no interest (and long test) +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +connection master; +create table t1 (a int not null auto_increment primary key, b int, key(b)); +sync_slave_with_master; +stop slave; +connection master; +INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; +INSERT INTO t1 (a) SELECT null FROM t1; + +connection slave; +start slave; + +# hope one second is not enough for slave to reach the last +# Rows_log_event, so that test actually tests something. + +real_sleep 1; +stop slave; + +# see if slave hangs on DROP TABLE + +drop table t1; + +connection master; # cleanup +drop table t1; diff --git a/mysql-test/suite/rpl/t/rpl_row_stop_middle_update-master.opt b/mysql-test/suite/rpl/t/rpl_row_stop_middle_update-master.opt new file mode 100644 index 00000000000..b7db8f97bdd --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_stop_middle_update-master.opt @@ -0,0 +1 @@ +--loose-binlog-row-event-max-size=256 diff --git a/mysql-test/suite/rpl/t/rpl_row_stop_middle_update-slave.opt b/mysql-test/suite/rpl/t/rpl_row_stop_middle_update-slave.opt new file mode 100644 index 00000000000..ea49a27adf4 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_stop_middle_update-slave.opt @@ -0,0 +1 @@ +--loose-debug=d,STOP_SLAVE_after_first_Rows_event diff --git a/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test b/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test new file mode 100644 index 00000000000..29b3008e822 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test @@ -0,0 +1,31 @@ +-- source include/have_binlog_format_row.inc +-- source include/have_debug.inc +-- source include/master-slave.inc + +# master is asked to create small Rows events: if only one event is +# created, stopping slave at the end of that one will show no bug, we +# need at least two (and stop after first); in this test we use three. + +connection master; +create table t1 (words varchar(20)) engine=myisam; + +load data infile '../std_data_ln/words.dat' into table t1 (words); +select count(*) from t1; +save_master_pos; + +connection slave; + +# slave will automatically tell itself to stop thanks to the .opt +# file; it will initiate the stop request after the first +# Rows_log_event (out of 3) but should wait until the last one is +# executed before stopping. + +wait_for_slave_to_stop; + +# check that we inserted all rows (waited until the last Rows event) +select count(*) from t1; + +connection master; +drop table t1; +connection slave; # slave SQL thread is stopped +drop table t1; diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test b/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test new file mode 100644 index 00000000000..ab4914e15fa --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test @@ -0,0 +1,8 @@ + +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +let $engine_type = 'MyISAM'; +-- source extra/rpl_tests/rpl_row_tabledefs.test + + diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb-slave.opt b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test new file mode 100644 index 00000000000..7824fbfb663 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test @@ -0,0 +1,9 @@ + +-- source include/have_binlog_format_row.inc +-- source include/have_innodb.inc +-- source include/master-slave.inc + +let $engine_type = 'InnoDB'; +-- source extra/rpl_tests/rpl_row_tabledefs.test + + diff --git a/mysql-test/suite/rpl/t/rpl_row_trig001.test b/mysql-test/suite/rpl/t/rpl_row_trig001.test new file mode 100644 index 00000000000..7b1fca2d6a1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_trig001.test @@ -0,0 +1,100 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/09/2005 # +############################################################################# +# TEST: Use after insert and before inset triggers and stored procdures to # +# Update and insert data # +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +-- disable_query_log +-- disable_result_log + +# Begin clean up test section +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test.p2; +DROP PROCEDURE IF EXISTS test.p3; +--error 0,1360 +DROP TRIGGER test.t2_ai; +--error 0,1360 +DROP TRIGGER test.t3_bi_t2; +--error 0,1360 +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; + + +# test section 1, lets add a trigger to the mix. Taken from bug #12280 +let $message=; +--source include/show_msg.inc + +CREATE TABLE test.t1 (n MEDIUMINT NOT NULL, d DATETIME, PRIMARY KEY(n)); +CREATE TABLE test.t2 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); +CREATE TABLE test.t3 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d DATETIME, PRIMARY KEY(n)); + +INSERT INTO test.t1 VALUES (1,NOW()); + +delimiter //; +CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t1 SET d=NOW() where n = 1;// +CREATE PROCEDURE test.p3() +BEGIN + INSERT INTO test.t3 (d) VALUES (NOW()); +END// +CREATE TRIGGER test.t3_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW CALL test.p3()// +CREATE PROCEDURE test.p2() +BEGIN + INSERT INTO test.t2 (f,d) VALUES (RAND(),NOW()); +END// +delimiter ;// + +-- disable_query_log +-- disable_result_log +let $1=10; +while ($1) +{ + CALL test.p2(); + sleep 1; + dec $1; +} +-- enable_result_log +-- enable_query_log + +#show binlog events; +#select * from test.t2; +#select * from test.t3; +#connection slave; +#select * from test.t2; +#select * from test.t3; + +let $message=; +--source include/show_msg.inc + +# time to dump the databases and so we can see if they match + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trig001_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trig001_slave.sql + +# Cleanup +connection master; +DROP PROCEDURE test.p2; +DROP PROCEDURE test.p3; +DROP TRIGGER test.t2_ai; +DROP TRIGGER test.t3_bi_t2; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +sync_slave_with_master; + +# Lets compare. Note: If they match test will pass, if they do not match +# the test will show that the diff statement failed and not reject file +# will be created. You will need to go to the mysql-test dir and diff +# the files your self to see what is not matching :-) Failed tests +# will leave dump files in $MYSQLTEST_VARDIR/tmp + +diff_files $MYSQLTEST_VARDIR/tmp/trig001_master.sql $MYSQLTEST_VARDIR/tmp/trig001_slave.sql; + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_trig002.test b/mysql-test/suite/rpl/t/rpl_row_trig002.test new file mode 100644 index 00000000000..7ca8a68f060 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_trig002.test @@ -0,0 +1,80 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/14/2005 # +# Updated: 08/29/2005 added save master pos and sync with master # +############################################################################# +# TEST: Taken and modified from BUG#12048 After Insert updates replication # +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +#-- disable_query_log +#-- disable_result_log + +# Begin clean up test section +connection master; +--disable_warnings +--error 0,1360 +DROP TRIGGER test.t2_ai; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +--enable_warnings + +# test section 1, Taken from bug #12408 + +CREATE TABLE test.t2 (value CHAR(30),domain_id INT, mailaccount_id INT, program CHAR(30),keey CHAR(30),PRIMARY KEY(domain_id)); + +CREATE TABLE test.t3 (value CHAR(30),domain_id INT, mailaccount_id INT, program CHAR(30),keey CHAR(30),PRIMARY KEY(domain_id)); + +CREATE TABLE test.t1 (id INT,domain CHAR(30),PRIMARY KEY(id)); + +delimiter |; +CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t3 ms, test.t1 d SET ms.value='No' WHERE ms.domain_id = (SELECT max(id) FROM test.t1 WHERE domain='example.com') AND ms.mailaccount_id IS NULL AND ms.program='spamfilter' AND ms.keey='scan_incoming'| +delimiter ;| + +INSERT INTO test.t1 VALUES (1, 'example.com'),(2, 'mysql.com'),(3, 'earthmotherwear.com'), (4, 'yahoo.com'),(5, 'example.com'); + +SELECT * FROM test.t1 ORDER BY id; +#show binlog events; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t1 ORDER BY id; +connection master; + +INSERT INTO test.t3 VALUES ('Yes', 5, NULL, 'spamfilter','scan_incoming'); +INSERT INTO test.t3 VALUES ('Yes', 1, NULL, 'spamfilter','scan_incoming'); +INSERT INTO test.t2 VALUES ('Yes', 1, NULL, 'spamfilter','scan_incoming'); + +select * from test.t2; +select * from test.t3; +save_master_pos; +connection slave; +sync_with_master; +select * from test.t2; +select * from test.t3; +connection master; + +DELETE FROM test.t1 WHERE id = 1; + +SELECT * FROM test.t1 ORDER BY id; +connection master; +SELECT * FROM test.t1 ORDER BY id; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t1 ORDER BY id; + +# Cleanup +connection master; +#show binlog events; +DROP TRIGGER test.t2_ai; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +sync_slave_with_master; + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_trig003.test b/mysql-test/suite/rpl/t/rpl_row_trig003.test new file mode 100644 index 00000000000..4a1bbc5ca89 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_trig003.test @@ -0,0 +1,152 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/16/2005 # +# Updated: 8/29/2005 Remove sleep calls add dump and diff # +############################################################################# +# TEST: This test includes all trigger types. BEFORE/AFTER INSERT, UPDATE & # +# DELETE. In addition, includes cursor, bit, varchar, flow control, # +# looping, ROUND(), NOW(), YEAR(), TIMESTAMP # +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +#-- disable_query_log +#-- disable_result_log + +# Begin clean up test section +connection master; +--disable_warnings +--error 0,1360 +DROP TRIGGER test.t1_bi; +--error 0,1360 +DROP TRIGGER test.t2_ai; +--error 0,1360 +DROP TRIGGER test.t1_bu; +--error 0,1360 +DROP TRIGGER test.t2_au; +--error 0,1360 +DROP TRIGGER test.t1_bd; +--error 0,1360 +DROP TRIGGER test.t2_ad; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +--enable_warnings + +# test section 1 + +CREATE TABLE test.t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); +CREATE TABLE test.t2 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); +CREATE TABLE test.t3 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); + +# Note Most of these cause the slave to core or do not produce desired results. Currently commenting out the ones not working until they are fixed. + +delimiter |; +CREATE TRIGGER test.t1_bi BEFORE INSERT ON test.t1 FOR EACH ROW UPDATE test.t3 SET b1=1 and y=YEAR(NOW())| +CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW BEGIN + INSERT INTO test.t3 VALUES(NULL,0,'MySQL Replication team rocks!', 'Dark beer in prague is #1',12345.34,12.51,0,1965,NOW()); + UPDATE test.t3 SET f = ROUND(f); +END| +CREATE TRIGGER test.t1_bu BEFORE UPDATE on test.t1 FOR EACH ROW BEGIN + UPDATE test.t3 SET y = '2000'; + INSERT INTO test.t3 VALUES(NULL,1,'Testing MySQL databases before update ', 'Insert should work',621.43, 0105.21,0,1974,NOW()); +END| +CREATE TRIGGER test.t2_au AFTER UPDATE on test.t2 FOR EACH ROW BEGIN + DECLARE done INT DEFAULT 0; + DECLARE a DECIMAL(10,4); + DECLARE b FLOAT; + DECLARE num MEDIUMINT; + DECLARE cur1 CURSOR FOR SELECT t2.id, t2.d, t2.f FROM test.t2; + DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; + + OPEN cur1; + + REPEAT + FETCH cur1 INTO num, a, b; + IF NOT done THEN + UPDATE test.t3 SET total =(a*b) WHERE ID = num; + END IF; + UNTIL done END REPEAT; + CLOSE cur1; +END| +CREATE TRIGGER test.t1_bd BEFORE DELETE on test.t1 FOR EACH ROW BEGIN + DECLARE done INT DEFAULT 0; + DECLARE a BIT(8); + DECLARE b VARCHAR(255); + DECLARE c CHAR(255); + DECLARE d DECIMAL(10,4); + DECLARE e FLOAT; + DECLARE f BIGINT UNSIGNED; + DECLARE g YEAR; + DECLARE h TIMESTAMP; + DECLARE cur1 CURSOR FOR SELECT t1.b1, t1.vc, t1.bc, t1.d, t1.f, t1.total, t1.y, t1.t FROM test.t1; + DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; + + OPEN cur1; + + REPEAT + FETCH cur1 INTO a, b, c, d, e, f, g, h; + IF NOT done THEN + INSERT INTO test.t3 VALUES(NULL, a, b, c, d, e, f, g, h); + END IF; + UNTIL done END REPEAT; + CLOSE cur1; +END| +CREATE TRIGGER test.t2_ad AFTER DELETE ON test.t2 FOR EACH ROW + DELETE FROM test.t1| +delimiter ;| + +INSERT INTO test.t1 VALUES(NULL,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,NOW()); +INSERT INTO test.t2 VALUES(NULL,0,'Testing MySQL databases is a cool ', 'MySQL Customers ROCK!',654321.4321,1.24521,0,YEAR(NOW()),NOW()); + +UPDATE test.t1 SET b1 = 0 WHERE b1 = 1; + +INSERT INTO test.t2 VALUES(NULL,1,'This is an after update test.', 'If this works, total will not be zero on the master or slave',1.4321,5.221,0,YEAR(NOW()),NOW()); +UPDATE test.t2 SET b1 = 0 WHERE b1 = 1; + +INSERT INTO test.t1 VALUES(NULL,1,'add some more test data test.', 'and hope for the best', 3.321,5.221,0,YEAR(NOW()),NOW()); + +# To make sure BUG#14698 is gone, we sleep 2 seconds before calling trigger +# (with the bug in, that caused differences in TIMESTAMP columns). +# We just need to let the machine's clock advance, it's not +# to do synchronization, so real_sleep is good. +real_sleep 2; + +DELETE FROM test.t1 WHERE id = 1; + +DELETE FROM test.t2 WHERE id = 1; + +save_master_pos; +connection slave; +sync_with_master; +connection master; + +# time to dump the databases and so we can see if they match + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trg003_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trg003_slave.sql + +# cleanup +--disable_warnings +--error 0,1360 +DROP TRIGGER test.t1_bi; +--error 0,1360 +DROP TRIGGER test.t2_ai; +--error 0,1360 +DROP TRIGGER test.t1_bu; +--error 0,1360 +DROP TRIGGER test.t2_au; +--error 0,1360 +DROP TRIGGER test.t1_bd; +--error 0,1360 +DROP TRIGGER test.t2_ad; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +--enable_warnings + +diff_files $MYSQLTEST_VARDIR/tmp/trg003_master.sql $MYSQLTEST_VARDIR/tmp/trg003_slave.sql; + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_row_trig004.test b/mysql-test/suite/rpl/t/rpl_row_trig004.test new file mode 100644 index 00000000000..a918c602d56 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_trig004.test @@ -0,0 +1,18 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Oct/18/2005 # +############################################################################# +# TEST: Use before insert triggers and has the second insert fail # +############################################################################# +# Change by JBM 2006-02-14 added to skip when NDB default engine # +# This test has been wrapped to allow multipal engines to use same code # +############################################################################# + +# Includes +-- source include/not_ndb_default.inc +-- source include/have_binlog_format_row.inc +-- source include/have_innodb.inc +-- source include/master-slave.inc +let $engine_type=INNODB; +-- source extra/rpl_tests/rpl_trig004.test + diff --git a/mysql-test/suite/rpl/t/rpl_row_until.test b/mysql-test/suite/rpl/t/rpl_row_until.test new file mode 100644 index 00000000000..f1d21e65a4c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_until.test @@ -0,0 +1,87 @@ +-- source include/not_ndb_default.inc +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +# Test is dependent on binlog positions + +# prepare version for substitutions +let $VERSION=`select version()`; + +# stop slave before he will start replication also sync with master +# for avoiding undetermenistic behaviour +save_master_pos; +connection slave; +sync_with_master; +stop slave; + +connection master; +# create some events on master +create table t1(n int not null auto_increment primary key); +insert into t1 values (1),(2),(3),(4); +drop table t1; +create table t2(n int not null auto_increment primary key); +insert into t2 values (1),(2); +insert into t2 values (3),(4); +drop table t2; + +# try to replicate all queries until drop of t1 +connection slave; +start slave until master_log_file='master-bin.000001', master_log_pos=311; +sleep 2; +wait_for_slave_to_stop; +# here table should be still not deleted +select * from t1; +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 9 # 11 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS; + +# this should fail right after start +start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; +# again this table should be still not deleted +select * from t1; +sleep 2; +wait_for_slave_to_stop; +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 9 # 11 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS; + +# try replicate all up to and not including the second insert to t2; +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; +sleep 2; +wait_for_slave_to_stop; +select * from t2; +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 9 # 11 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS; + +# clean up +start slave; +connection master; +save_master_pos; +connection slave; +sync_with_master; +stop slave; + +# this should stop immediately as we are already there +start slave until master_log_file='master-bin.000001', master_log_pos=740; +sleep 2; +wait_for_slave_to_stop; +# here the sql slave thread should be stopped +--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 +--replace_column 1 # 9 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS; + +#testing various error conditions +--error 1277 +start slave until master_log_file='master-bin', master_log_pos=561; +--error 1277 +start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; +--error 1277 +start slave until master_log_file='master-bin.000001'; +--error 1277 +start slave until relay_log_file='slave-relay-bin.000002'; +--error 1277 +start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; +# Warning should be given for second command +start slave sql_thread; +start slave until master_log_file='master-bin.000001', master_log_pos=740; diff --git a/mysql-test/suite/rpl/t/rpl_row_view01.test b/mysql-test/suite/rpl/t/rpl_row_view01.test new file mode 100644 index 00000000000..634e3c30cc6 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_view01.test @@ -0,0 +1,89 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/19/2005 # +# Updated: 08/29/2005 Remove sleeps # +############################################################################# +#TEST: row based replication of views # +############################################################################# +# 2006-02-08 By JBM added order by and sleep for use with ndb engine +############################################################################# +# Includes +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc + +# Begin clean up test section +connection master; +--disable_warnings +create database if not exists mysqltest1; +DROP VIEW IF EXISTS mysqltest1.v1; +DROP VIEW IF EXISTS mysqltest1.v2; +DROP VIEW IF EXISTS mysqltest1.v3; +DROP VIEW IF EXISTS mysqltest1.v4; +DROP TABLE IF EXISTS mysqltest1.t3; +DROP TABLE IF EXISTS mysqltest1.t1; +DROP TABLE IF EXISTS mysqltest1.t2; +DROP TABLE IF EXISTS mysqltest1.t4; + +# Begin test section 1 +CREATE TABLE mysqltest1.t1 (a INT, c CHAR(6),PRIMARY KEY(a)); +CREATE TABLE mysqltest1.t2 (a INT, c CHAR(6),PRIMARY KEY(a)); +CREATE TABLE mysqltest1.t3 (a INT, c CHAR(6), c2 CHAR(6), PRIMARY KEY(a)); +CREATE TABLE mysqltest1.t4 (a INT, qty INT, price INT,PRIMARY KEY(a)); +CREATE TABLE mysqltest1.t5 (qty INT, price INT, total INT, PRIMARY KEY(qty)); +INSERT INTO mysqltest1.t1 VALUES (1,'Thank'),(2,'it'),(3,'Friday'); +INSERT INTO mysqltest1.t2 VALUES (1,'GOD'),(2,'is'),(3,'TGIF'); +INSERT INTO mysqltest1.t4 VALUES(1, 3, 50),(2, 18, 3),(4, 4, 4); + + +CREATE VIEW mysqltest1.v2 AS SELECT qty, price, qty*price AS value FROM mysqltest1.t4 ORDER BY qty; +CREATE VIEW mysqltest1.v1 AS SELECT t1.a, t1.c, t2.c as c2 FROM mysqltest1.t1 as t1, mysqltest1.t2 AS t2 WHERE mysqltest1.t1.a = mysqltest1.t2.a ORDER BY a; +CREATE VIEW mysqltest1.v3 AS SELECT * FROM mysqltest1.t1; +CREATE VIEW mysqltest1.v4 AS SELECT * FROM mysqltest1.v3 WHERE a > 1 WITH LOCAL CHECK OPTION; + + +SELECT * FROM mysqltest1.v2; +SELECT * FROM mysqltest1.v1; +# Had to add a sleep for use with NDB +# engine. Injector thread would have not +# populated biblog and data would not be on +# the slave. +sleep 10; +sync_slave_with_master; +SELECT * FROM mysqltest1.v2; +SELECT * FROM mysqltest1.v1; +connection master; + +INSERT INTO mysqltest1.t5 SELECT * FROM mysqltest1.v2; +INSERT INTO mysqltest1.t3 SELECT * FROM mysqltest1.v1; + +SELECT * FROM mysqltest1.t5 ORDER BY qty; +SELECT * FROM mysqltest1.t3 ORDER BY a; +sync_slave_with_master; +SELECT * FROM mysqltest1.t5 ORDER BY qty; +SELECT * FROM mysqltest1.t3 ORDER BY a; +connection master; + +INSERT INTO mysqltest1.v4 VALUES (4,'TEST'); + +SELECT * FROM mysqltest1.t1 ORDER BY a; +SELECT * FROM mysqltest1.v4 ORDER BY a; +sync_slave_with_master; +SELECT * FROM mysqltest1.t1 ORDER BY a; +SELECT * FROM mysqltest1.v4 ORDER BY a; + +connection master; + +# lets cleanup +DROP VIEW IF EXISTS mysqltest1.v1; +DROP VIEW IF EXISTS mysqltest1.v2; +DROP VIEW IF EXISTS mysqltest1.v3; +DROP VIEW IF EXISTS mysqltest1.v4; +DROP TABLE IF EXISTS mysqltest1.t3; +DROP TABLE IF EXISTS mysqltest1.t1; +DROP TABLE IF EXISTS mysqltest1.t2; +DROP TABLE IF EXISTS mysqltest1.t4; +DROP DATABASE mysqltest1; +sync_slave_with_master; + +# End of 5.1 test case + diff --git a/mysql-test/suite/rpl/t/rpl_server_id1.test b/mysql-test/suite/rpl/t/rpl_server_id1.test new file mode 100644 index 00000000000..71310750b60 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_server_id1.test @@ -0,0 +1,26 @@ +# This test checks that the slave I/O thread refuses to start if slave +# and master have the same server id (because this is a useless setup, +# and otherwise SHOW SLAVE STATUS shows progress but all queries are +# ignored, which has caught our customers), unless +# --replicate-same-server-id. + +source include/master-slave.inc; +connection slave; +create table t1 (n int); +reset master; +# replicate ourselves +stop slave; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval change master to master_port=$SLAVE_MYPORT; +--replace_result $SLAVE_MYPORT SLAVE_PORT +--replace_column 16 # 18 # +show slave status; +start slave; +insert into t1 values (1); +# can't MASTER_POS_WAIT(), it does not work in this weird setup +# (when slave is its own master without --replicate-same-server-id) +sleep 2; # enough time for the event to be replicated (it should not) +show status like "slave_running"; +drop table t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_server_id2-slave.opt b/mysql-test/suite/rpl/t/rpl_server_id2-slave.opt new file mode 100644 index 00000000000..302889525dd --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_server_id2-slave.opt @@ -0,0 +1 @@ +--disable-log-slave-updates --replicate-same-server-id diff --git a/mysql-test/suite/rpl/t/rpl_server_id2.test b/mysql-test/suite/rpl/t/rpl_server_id2.test new file mode 100644 index 00000000000..0f2eb560d18 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_server_id2.test @@ -0,0 +1,26 @@ +# This test checks that a slave DOES execute queries originating +# from itself, if running with --replicate-same-server-id. + +source include/master-slave.inc; +connection slave; +create table t1 (n int); +reset master; +# replicate ourselves +stop slave; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval change master to master_port=$SLAVE_MYPORT; +--replace_result $SLAVE_MYPORT SLAVE_PORT +--replace_column 18 # +show slave status; +start slave; +insert into t1 values (1); +save_master_pos; +sync_with_master; +select * from t1; # check that indeed 2 were inserted +# We stop the slave before cleaning up otherwise we'll get +# 'drop table t1' executed twice, so an error in the slave.err +# (not critical). +stop slave; +drop table t1; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_session_var.test b/mysql-test/suite/rpl/t/rpl_session_var.test new file mode 100644 index 00000000000..a6f4b496a23 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_session_var.test @@ -0,0 +1,42 @@ +# Replication of session variables. +# FOREIGN_KEY_CHECKS is tested in rpl_insert_id.test + +source include/master-slave.inc; +drop table if exists t1; +create table t1(a varchar(100),b int); +set @@session.sql_mode=pipes_as_concat; +insert into t1 values('My'||'SQL', 1); +set @@session.sql_mode=default; +insert into t1 values('1'||'2', 2); +select * from t1 where b<3 order by a; +save_master_pos; +connection slave; +sync_with_master; +select * from t1 where b<3 order by a; +connection master; +# if the slave does the next sync_with_master fine, then it means it accepts the +# two lines of ANSI syntax below, which is what we want to check. +set @@session.sql_mode=ignore_space; +insert into t1 values(password ('MySQL'), 3); +set @@session.sql_mode=ansi_quotes; +create table "t2" ("a" int); +drop table t1, t2; +set @@session.sql_mode=default; +create table t1(a int auto_increment primary key); +create table t2(b int, a int); +set @@session.sql_auto_is_null=1; +insert into t1 values(null); +insert into t2 select 1,a from t1 where a is null; +set @@session.sql_auto_is_null=0; +insert into t1 values(null); +insert into t2 select 2,a from t1 where a is null; +select * from t2 order by b; +save_master_pos; +connection slave; +sync_with_master; +select * from t2 order by b; +connection master; +drop table t1,t2; +save_master_pos; +connection slave; +sync_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_set_charset.test b/mysql-test/suite/rpl/t/rpl_set_charset.test new file mode 100644 index 00000000000..c70eb2681f5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_set_charset.test @@ -0,0 +1,35 @@ +source include/master-slave.inc; +--disable_warnings +drop database if exists mysqltest1; +# 4.1 bases its conversion on the db's charset, +# while 4.0 uses the part of "SET CHARACTER SET" after "_". +# So for 4.1 we add a clause to CREATE DATABASE. +create database mysqltest1 /*!40100 character set latin2 */; +use mysqltest1; +drop table if exists t1; +--enable_warnings +create table t1 (a varchar(255) character set latin2, b varchar(4)); +SET CHARACTER SET cp1250_latin2; +INSERT INTO t1 VALUES ('ŠŒŽ','80'); +INSERT INTO t1 VALUES ('šœžŸ','90'); +INSERT INTO t1 VALUES ('£¥ª¯','A0'); +INSERT INTO t1 VALUES ('³¹º¼¾¿','B0'); +INSERT INTO t1 VALUES ('ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ','C0'); +INSERT INTO t1 VALUES ('ÐÑÒÓÔÕÖרÙÚÛÜÝÞß','D0'); +INSERT INTO t1 VALUES ('àáâãäåæçèéêëìíîï','E0'); +INSERT INTO t1 VALUES ('ðñòóôõö÷øùúûüýþÿ','F0'); +select "--- on master ---"; +select hex(a),b from t1 order by b; +save_master_pos; +connection slave; +sync_with_master; +use mysqltest1; +select "--- on slave ---"; +select hex(a),b from t1 order by b; +connection master; +drop database mysqltest1; +save_master_pos; +connection slave; +sync_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_sf.test b/mysql-test/suite/rpl/t/rpl_sf.test new file mode 100644 index 00000000000..ecf91a723fa --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sf.test @@ -0,0 +1,70 @@ +-- source include/have_log_bin.inc + +# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR + +# save status + +let $oblf=`select @@SESSION.BINLOG_FORMAT`; +let $otfc=`select @@log_bin_trust_function_creators`; + +set global log_bin_trust_function_creators=0; + + + +# fail *on definition* + +set binlog_format=STATEMENT; + +delimiter |; +--error ER_BINLOG_UNSAFE_ROUTINE +create function fn16456() + returns int +begin + return unix_timestamp(); +end| +delimiter ;| + + + +# force in definition, so we can see whether we fail on call + +set global log_bin_trust_function_creators=1; + +delimiter |; +create function fn16456() + returns int +begin + return unix_timestamp(); +end| +delimiter ;| + +set global log_bin_trust_function_creators=0; + + + +# allow funcall in RBR + +set binlog_format=ROW; + +--replace_column 1 timestamp +select fn16456(); + + + +# fail funcall in SBR + +set binlog_format=STATEMENT; + +--error ER_BINLOG_ROW_RBR_TO_SBR +select fn16456(); + + + +# restore status + +drop function fn16456; + +--disable_query_log +eval set binlog_format=$oblf; +eval set global log_bin_trust_function_creators=$otfc; +--enable_query_log diff --git a/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt b/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt new file mode 100644 index 00000000000..982362d93a5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt @@ -0,0 +1 @@ +--slave-skip-error=1053,1582 diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test new file mode 100644 index 00000000000..ff81e2f010e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_skip_error.test @@ -0,0 +1,29 @@ +########################################## +# 2006-02-07 By JBM: Added order by +######################################### +# Note that errors are ignored by opt file. +source include/master-slave.inc; + +create table t1 (n int not null primary key); +save_master_pos; +connection slave; +sync_with_master; +insert into t1 values (1); +connection master; +# Here we expect (ignored) error, since 1 is already in slave table +insert into t1 values (1); + +# These should work fine +insert into t1 values (2),(3); + +save_master_pos; +connection slave; +sync_with_master; +select * from t1 ORDER BY n; + +# Cleanup +connection master; +drop table t1; +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_slave_status.test b/mysql-test/suite/rpl/t/rpl_slave_status.test new file mode 100644 index 00000000000..32320a50656 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_slave_status.test @@ -0,0 +1,58 @@ +--source include/master-slave.inc + +############################################################################ +# Test case for BUG#10780 +# +# REQUIREMENT +# A slave without replication privileges should have Slave_IO_Running = No + +# 1. Create new replication user +connection master; +grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; + +connection slave; +stop slave; +change master to master_user='rpl',master_password='rpl'; +start slave; + +# 2. Do replication as new user +connection master; +--disable_warnings +drop table if exists t1; +--enable_warnings +create table t1 (n int); +insert into t1 values (1); +save_master_pos; +connection slave; +sync_with_master; +select * from t1; + +# 3. Delete new replication user +connection master; +delete from mysql.user where user='rpl'; +flush privileges; +connection slave; + +# 4. Restart slave without privileges +# (slave.err will contain access denied error for this START SLAVE command) +stop slave; +start slave; + +# 5. Make sure Slave_IO_Running = No +--replace_result $MASTER_MYPORT MASTER_MYPORT +# Column 1 is replaced, since the output can be either +# "Connecting to master" or "Waiting for master update" +--replace_column 1 # 7 # 8 # 9 # 22 # 23 # +--vertical_results +show slave status; + +# Cleanup (Note that slave IO thread is not running) +connection slave; +drop table t1; +delete from mysql.user where user='rpl'; +connection master; +drop table t1; + +# end of test case for BUG#10780 + +# end of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_sp-master.opt b/mysql-test/suite/rpl/t/rpl_sp-master.opt new file mode 100644 index 00000000000..709a224fd92 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sp-master.opt @@ -0,0 +1 @@ +--log_bin_trust_routine_creators=0 diff --git a/mysql-test/suite/rpl/t/rpl_sp-slave.opt b/mysql-test/suite/rpl/t/rpl_sp-slave.opt new file mode 100644 index 00000000000..709a224fd92 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sp-slave.opt @@ -0,0 +1 @@ +--log_bin_trust_routine_creators=0 diff --git a/mysql-test/suite/rpl/t/rpl_sp.test b/mysql-test/suite/rpl/t/rpl_sp.test new file mode 100644 index 00000000000..f363b64558a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sp.test @@ -0,0 +1,585 @@ +# row-based and statement have expected binlog difference in result files + +# Test of replication of stored procedures (WL#2146 for MySQL 5.0) +# Modified by WL#2971. + +# Note that in the .opt files we still use the old variable name +# log-bin-trust-routine-creators so that this test checks that it's +# still accepted (this test also checks that the new name is +# accepted). The old name could be removed in 5.1 or 6.0. + +source include/have_binlog_format_mixed.inc; +source include/master-slave.inc; + +# we need a db != test, where we don't have automatic grants +--disable_warnings +drop database if exists mysqltest1; +--enable_warnings +create database mysqltest1; +use mysqltest1; +create table t1 (a varchar(100)); +sync_slave_with_master; +use mysqltest1; + +# ********************** PART 1 : STORED PROCEDURES *************** + +# Does the same proc as on master get inserted into mysql.proc ? +# (same definer, same properties...) + +connection master; + +delimiter |; + +# Stored procedures don't have the limitations that functions have +# regarding binlogging: it's ok to create a procedure as not +# deterministic and updating data, while it's not ok to create such a +# function. We test this. + +create procedure foo() +begin + declare b int; + set b = 8; + insert into t1 values (b); + insert into t1 values (unix_timestamp()); +end| +delimiter ;| + +# we replace columns having times +# (even with fixed timestamp displayed time may changed based on TZ) +--replace_result localhost.localdomain localhost 127.0.0.1 localhost +--replace_column 13 # 14 # +select * from mysql.proc where name='foo' and db='mysqltest1'; +sync_slave_with_master; +# You will notice in the result that the definer does not match what +# it is on master, it is a known bug on which Alik is working +--replace_result localhost.localdomain localhost 127.0.0.1 localhost +--replace_column 13 # 14 # +select * from mysql.proc where name='foo' and db='mysqltest1'; + +connection master; +# see if timestamp used in SP on slave is same as on master +set timestamp=1000000000; +call foo(); +select * from t1; +sync_slave_with_master; +select * from t1; + +# Now a SP which is not updating tables + +connection master; +delete from t1; +create procedure foo2() + select * from mysqltest1.t1; +call foo2(); + +# check that this is allowed (it's not for functions): +alter procedure foo2 contains sql; + +# SP with definer's right + +drop table t1; +create table t1 (a int); +create table t2 like t1; + +create procedure foo3() + deterministic + insert into t1 values (15); + +# let's create a non-privileged user +grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1; +grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1; +grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; + +# ToDo: BUG#14931: There is a race between the last grant binlogging, and +# the binlogging in the new connection made below, causing sporadic test +# failures due to switched statement order in binlog. To fix this we do +# SELECT 1 in the first connection before starting the second, ensuring +# that binlogging is done in the expected order. +# Please remove this SELECT 1 when BUG#14931 is fixed. +SELECT 1; + +connect (con1,127.0.0.1,zedjzlcsjhd,,mysqltest1,$MASTER_MYPORT,); +connection con1; + +# this routine will fail in the second INSERT because of privileges +delimiter |; +create procedure foo4() + deterministic + begin + insert into t2 values(3); + insert into t1 values (5); + end| + +delimiter ;| + +# I add ,0 so that it does not print the error in the test output, +# because this error is hostname-dependent +--error 1142,0 +call foo4(); # invoker has no INSERT grant on table t1 => failure + +connection master; +call foo3(); # success (definer == root) +show warnings; + +--error 1142,0 +call foo4(); # definer's rights => failure + +# we test replication of ALTER PROCEDURE +alter procedure foo4 sql security invoker; +call foo4(); # invoker's rights => success +show warnings; + +# Note that half-failed procedure calls are ok with binlogging; +# if we compare t2 on master and slave we see they are identical: + +select * from t1; +select * from t2; +sync_slave_with_master; +select * from t1; +select * from t2; + +# Let's check another failing-in-the-middle procedure +connection master; +delete from t2; +alter table t2 add unique (a); + +drop procedure foo4; +delimiter |; +create procedure foo4() + deterministic + begin + insert into t2 values(20),(20); + end| + +delimiter ;| + +--error ER_DUP_ENTRY +call foo4(); +show warnings; + +select * from t2; +sync_slave_with_master; +# check that this failed-in-the-middle replicated right: +select * from t2; + +# Test of DROP PROCEDURE + +--replace_result localhost.localdomain localhost 127.0.0.1 localhost +--replace_column 13 # 14 # +select * from mysql.proc where name="foo4" and db='mysqltest1'; +connection master; +drop procedure foo4; +select * from mysql.proc where name="foo4" and db='mysqltest1'; +sync_slave_with_master; +select * from mysql.proc where name="foo4" and db='mysqltest1'; + +# ********************** PART 2 : FUNCTIONS *************** + +connection master; +drop procedure foo; +drop procedure foo2; +drop procedure foo3; + +delimiter |; +# check that needs "deterministic" +--error 1418 +create function fn1(x int) + returns int +begin + insert into t1 values (x); + return x+2; +end| +create function fn1(x int) + returns int + deterministic +begin + insert into t1 values (x); + return x+2; +end| + +delimiter ;| +delete t1,t2 from t1,t2; +select fn1(20); +insert into t2 values(fn1(21)); +select * from t1; +select * from t2; +sync_slave_with_master; +select * from t1; +select * from t2; + +connection master; +delimiter |; + +drop function fn1; + +create function fn1() + returns int + no sql +begin + return unix_timestamp(); +end| + +delimiter ;| +# check that needs "deterministic" +--error 1418 +alter function fn1 contains sql; + +delete from t1; +set timestamp=1000000000; +insert into t1 values(fn1()); + +connection con1; + +delimiter |; +--error 1419 # only full-global-privs user can create a function +create function fn2() + returns int + no sql +begin + return unix_timestamp(); +end| +delimiter ;| +connection master; +# test old variable name: +set global log_bin_trust_routine_creators=1; +# now use new name: +set global log_bin_trust_function_creators=0; +set global log_bin_trust_function_creators=1; +# slave needs it too otherwise will not execute what master allowed: +connection slave; +set global log_bin_trust_function_creators=1; + +connection con1; + +delimiter |; +create function fn2() + returns int + no sql +begin + return unix_timestamp(); +end| +delimiter ;| + +connection master; + +# Now a function which is supposed to not update tables +# as it's "reads sql data", so should not give error even if +# non-deterministic. + +delimiter |; +create function fn3() + returns int + not deterministic + reads sql data +begin + return 0; +end| +delimiter ;| + +select fn3(); +--replace_result localhost.localdomain localhost 127.0.0.1 localhost +--replace_column 13 # 14 # +select * from mysql.proc where db='mysqltest1'; +select * from t1; + +sync_slave_with_master; +use mysqltest1; +select * from t1; +--replace_result localhost.localdomain localhost 127.0.0.1 localhost +--replace_column 13 # 14 # +select * from mysql.proc where db='mysqltest1'; + +# Let's check a failing-in-the-middle function +connection master; +delete from t2; +alter table t2 add unique (a); + +drop function fn1; + +delimiter |; +create function fn1(x int) + returns int +begin + insert into t2 values(x),(x); + return 10; +end| + +delimiter ;| + +do fn1(100); + +--error ER_DUP_ENTRY +select fn1(20); + +select * from t2; +sync_slave_with_master; + +# check that this failed-in-the-middle replicated right: +select * from t2; + +# ********************** PART 3 : TRIGGERS *************** + +connection con1; +# now fails due to missing trigger grant (err 1142 i/o 1227) due to new +# check in sql_trigger.cc (v1.44) by anozdrin on 2006/02/01 --azundris +--error ER_TABLEACCESS_DENIED_ERROR +create trigger trg before insert on t1 for each row set new.a= 10; + +connection master; +delete from t1; +# TODO: when triggers can contain an update, test that this update +# does not go into binlog. +# I'm not setting user vars in the trigger, because replication of user vars +# would take care of propagating the user var's value to slave, so even if +# the trigger was not executed on slave it would not be discovered. +create trigger trg before insert on t1 for each row set new.a= 10; +insert into t1 values (1); +select * from t1; +sync_slave_with_master; +select * from t1; + +connection master; +delete from t1; +drop trigger trg; +insert into t1 values (1); +select * from t1; +sync_slave_with_master; +select * from t1; + + +# ********************** PART 4 : RELATED FIXED BUGS *************** + + +# +# Test for bug #13969 "Routines which are replicated from master can't be +# executed on slave". +# +connection master; +create procedure foo() + not deterministic + reads sql data + select * from t1; +sync_slave_with_master; +# This should not fail +call foo(); +connection master; +drop procedure foo; +sync_slave_with_master; + + +# Clean up +connection master; +drop function fn1; +drop database mysqltest1; +drop user "zedjzlcsjhd"@127.0.0.1; +use test; +sync_slave_with_master; +use test; + +# +# Bug#14077 "Failure to replicate a stored function with a cursor": +# verify that stored routines with cursors work on slave. +# +connection master; +--disable_warnings +drop function if exists f1; +--enable_warnings +delimiter |; +create function f1() returns int reads sql data +begin + declare var integer; + declare c cursor for select a from v1; + open c; + fetch c into var; + close c; + return var; +end| +delimiter ;| +create view v1 as select 1 as a; +create table t1 (a int); +insert into t1 (a) values (f1()); +select * from t1; +drop view v1; +drop function f1; +sync_slave_with_master; +connection slave; +select * from t1; + +# +# Bug#16621 "INSERTs in Stored Procedures causes data corruption in the Binary +# Log for 5.0.18" +# + +# Prepare environment. + +connection master; + +--disable_warnings +DROP PROCEDURE IF EXISTS p1; +DROP TABLE IF EXISTS t1; +--enable_warnings + +# Test case. + +CREATE TABLE t1(col VARCHAR(10)); + +CREATE PROCEDURE p1(arg VARCHAR(10)) + INSERT INTO t1 VALUES(arg); + +CALL p1('test'); + +SELECT * FROM t1; + +sync_slave_with_master; +SELECT * FROM t1; + +# Cleanup +connection master; +DROP PROCEDURE p1; + + +# +# BUG#20438: CREATE statements for views, stored routines and triggers can be +# not replicable. +# + +--echo +--echo ---> Test for BUG#20438 + +# Prepare environment. + +--echo +--echo ---> Preparing environment... +--echo ---> connection: master +--connection master + +--disable_warnings +DROP PROCEDURE IF EXISTS p1; +DROP FUNCTION IF EXISTS f1; +--enable_warnings + +--echo +--echo ---> Synchronizing slave with master... + +--save_master_pos +--connection slave +--sync_with_master + +--echo +--echo ---> connection: master +--connection master + +# Test. + +--echo +--echo ---> Creating procedure... + +/*!50003 CREATE PROCEDURE p1() SET @a = 1 */; + +/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */; + +--echo +--echo ---> Checking on master... + +SHOW CREATE PROCEDURE p1; +SHOW CREATE FUNCTION f1; + +--echo +--echo ---> Synchronizing slave with master... + +--save_master_pos +--connection slave +--sync_with_master + +--echo ---> connection: master + +--echo +--echo ---> Checking on slave... + +SHOW CREATE PROCEDURE p1; +SHOW CREATE FUNCTION f1; + +# Cleanup. + +--echo +--echo ---> connection: master +--connection master + +--echo +--echo ---> Cleaning up... + +DROP PROCEDURE p1; +DROP FUNCTION f1; + +--save_master_pos +--connection slave +--sync_with_master +--connection master + + +# cleanup +connection master; +drop table t1; +sync_slave_with_master; + +# +# Bug22043: MySQL don't add "USE " before "DROP PROCEDURE IF EXISTS" +# + +connection master; +--disable_warnings +drop database if exists mysqltest; +drop database if exists mysqltest2; +--enable_warnings +create database mysqltest; +create database mysqltest2; +use mysqltest2; +create table t ( t integer ); +create procedure mysqltest.test() begin end; +insert into t values ( 1 ); +--error ER_BAD_DB_ERROR +create procedure `\\`.test() begin end; + +# +# BUG#19725: Calls to stored function in other database are not +# replicated correctly in some cases +# + +connection master; +delimiter |; +create function f1 () returns int +begin + insert into t values (1); + return 0; +end| +delimiter ;| +sync_slave_with_master; +# Let us test if we don't forget to binlog the function's database +connection master; +use mysqltest; +set @a:= mysqltest2.f1(); +sync_slave_with_master; +connection master; + + +# Final inspection which verifies how all statements of this test file +# were written to the binary log. +--replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ +show binlog events in 'master-bin.000001' from 106; + + +# Restore log_bin_trust_function_creators to its original value. +# This is a cleanup for all parts above where we tested stored +# functions and triggers. +set global log_bin_trust_function_creators=0; +connection master; +set global log_bin_trust_function_creators=0; + +# Clean up +drop database mysqltest; +drop database mysqltest2; + +--echo End of 5.0 tests +--echo End of 5.1 tests + diff --git a/mysql-test/suite/rpl/t/rpl_sp004.test b/mysql-test/suite/rpl/t/rpl_sp004.test new file mode 100644 index 00000000000..967e7007c15 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sp004.test @@ -0,0 +1,97 @@ +############################################################################# +# Original Author: JBM # +# Original Date: Aug/14/2005 # +############################################################################# +# Test: This test contains two sp that create and drop tables, insert and # +# updated data and uses the NOW() function. # +############################################################################# + + +# Includes +-- source include/master-slave.inc + + +# Begin clean up test section +connection master; +--disable_warnings +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t3; +--enable_warnings +# End of cleanup + +# Begin test section 1 + +delimiter |; +CREATE PROCEDURE test.p1() +BEGIN + CREATE TABLE IF NOT EXISTS test.t1(a INT,PRIMARY KEY(a)); + CREATE TABLE IF NOT EXISTS test.t2(a INT,PRIMARY KEY(a)); + INSERT INTO test.t1 VALUES (4),(2),(1),(3); + UPDATE test.t1 SET a=a+4 WHERE a=4; + INSERT INTO test.t2 (a) SELECT t1.a FROM test.t1; + UPDATE test.t1 SET a=a+4 WHERE a=8; + CREATE TABLE IF NOT EXISTS test.t3(n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); +END| +CREATE PROCEDURE test.p2() +BEGIN + DROP TABLE IF EXISTS test.t1; + DROP TABLE IF EXISTS test.t2; + INSERT INTO test.t3 VALUES(NULL,11111111.233333,NOW()); +END| +delimiter ;| + +CALL test.p1(); +SELECT * FROM test.t1 ORDER BY a; +SELECT * FROM test.t2 ORDER BY a; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t1 ORDER BY a; +SELECT * FROM test.t2 ORDER BY a; + +connection master; +CALL test.p2(); +USE test; +SHOW TABLES; +#SELECT * FROM test.t3; +save_master_pos; +connection slave; +sync_with_master; +USE test; +SHOW TABLES; +#SELECT * FROM test.t3; + +connection master; +CALL test.p1(); +SELECT * FROM test.t1 ORDER BY a; +SELECT * FROM test.t2 ORDER BY a; +#SELECT * FROM test.t3; +save_master_pos; +connection slave; +sync_with_master; +SELECT * FROM test.t1 ORDER BY a; +SELECT * FROM test.t2 ORDER BY a; +#SELECT * FROM test.t3; + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp004_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp004_slave.sql + +# Cleanup +connection master; +#show binlog events; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +DROP TABLE IF EXISTS test.t3; +sync_slave_with_master; + +# If the test fails, you will need to diff the dumps to see why. + +diff_files $MYSQLTEST_VARDIR/tmp/sp004_master.sql $MYSQLTEST_VARDIR/tmp/sp004_slave.sql; + + +# End of 5.0 test case diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects-master.opt b/mysql-test/suite/rpl/t/rpl_sp_effects-master.opt new file mode 100644 index 00000000000..61dd7a6ad0e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sp_effects-master.opt @@ -0,0 +1 @@ +--log_bin_trust_routine_creators=1 diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt b/mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt new file mode 100644 index 00000000000..61dd7a6ad0e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sp_effects-slave.opt @@ -0,0 +1 @@ +--log_bin_trust_routine_creators=1 diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects.test b/mysql-test/suite/rpl/t/rpl_sp_effects.test new file mode 100644 index 00000000000..027bfd69f36 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sp_effects.test @@ -0,0 +1,211 @@ +########################################## +# Change Author: JBM +# Change Date: 2006-05-02 +# Change: Added Order By for NDB testing +########################################## + +# Test of replication of stored procedures (WL#2146 for MySQL 5.0) +-- source include/master-slave.inc + +# **************************************************************** +connection master; + +# cleanup +--disable_warnings +drop procedure if exists p1; +drop procedure if exists p2; +drop function if exists f1; +drop table if exists t1,t2; +drop view if exists v1; +--enable_warnings +create table t1 (a int); + +SET GLOBAL log_bin_trust_function_creators = 1; + +# 1. Test simple variables use. +delimiter //; +create procedure p1() +begin + declare spv int default 0; + while spv < 5 do + insert into t1 values(spv+1); + set spv=spv+1; + end while; +end// +delimiter ;// + +call p1(); + +sync_slave_with_master; +connection slave; +SELECT * FROM t1 ORDER BY a; +connection master; +SELECT * FROM t1 ORDER BY a; + +# 2. Test SP variable name +delimiter //; +create procedure p2() +begin + declare a int default 4; + create table t2 as select a; +end// +delimiter ;// + +call p2(); +SELECT * FROM t2 ORDER BY a; +sync_slave_with_master; +connection slave; +SELECT * FROM t2 ORDER BY a; + +connection master; +drop procedure p1; +drop procedure p2; +drop table t2; + +# 3. Test FUNCTIONs in various places + +delimiter //; +create function f1(x int) returns int +begin + insert into t1 values(x); + return x+1; +end// + +create procedure p1(a int, b int) +begin + declare v int default f1(5); + if (f1(6)) then + select 'yes'; + end if; + set v = f1(7); + while f1(8) < 1 do + select 'this cant be'; + end while; + +end// +delimiter ;// + +call p1(f1(1), f1(2)); +SELECT * FROM t1 ORDER BY a; + +create table t2(a int); +insert into t2 values (10),(11); +SELECT a,f1(a) FROM t2 ORDER BY a; + +# This shouldn't put separate 'call f1(3)' into binlog: +insert into t2 select f1(3); +SELECT 'master:',a FROM t1 ORDER BY a; + +sync_slave_with_master; +connection slave; +SELECT 'slave:',a FROM t1 ORDER BY a; + +connection master; +drop procedure p1; +delete from t1; +delete from t2; + +# 4. VIEWs +delete from t1; +insert into t2 values(1),(2); +create view v1 as select f1(a) as f from t2; +select * from v1 order by f; +SELECT 'master:',a FROM t1 ORDER BY a; + +sync_slave_with_master; +connection slave; +SELECT 'slave:',a FROM t1 ORDER BY a; + +connection master; +drop view v1; +delete from t1; + +# 5. Prepared statements. +prepare s1 from 'select f1(?)'; +set @xx=123; +execute s1 using @xx; +SELECT 'master:',a FROM t1 ORDER BY a; + +sync_slave_with_master; +connection slave; +SELECT 'slave:',a FROM t1 ORDER BY a; + +connection master; +delete from t1; + +# 5. Cursors. +# t2 has (1),(2); +delimiter //; +create procedure p1(spv int) +begin + declare c cursor for select f1(spv) from t2; + while (spv > 2) do + open c; + fetch c into spv; + close c; + set spv= spv - 10; + end while; +end// +delimiter ;// +call p1(15); +SELECT 'master:',a FROM t1 ORDER BY a; +sync_slave_with_master; +connection slave; +SELECT 'slave:',a FROM t1 ORDER BY a; + +connection master; +drop procedure p1; +drop function f1; +drop table t1,t2; + +# BUG#12637: User variables + SPs replication +create table t1 (a int); +delimiter //; +create procedure p1() +begin + insert into t1 values(@x); + set @x=@x+1; + insert into t1 values(@x); + if (f2()) then + insert into t1 values(1243); + end if; +end// + +create function f2() returns int +begin + insert into t1 values(@z); + set @z=@z+1; + insert into t1 values(@z); + return 0; +end// + +create function f1() returns int +begin + insert into t1 values(@y); + call p1(); + return 0; +end// + +delimiter ;// + +set @x=10; +set @y=20; +set @z=100; +select f1(); + +set @x=30; +call p1(); + +SELECT 'master', a FROM t1 ORDER BY a; +sync_slave_with_master; +connection slave; +SELECT 'slave', a FROM t1 ORDER BY a; + +connection master; +drop table t1; +drop function f1; +drop function f2; +drop procedure p1; +sync_slave_with_master; + +SET GLOBAL log_bin_trust_function_creators = 0; diff --git a/mysql-test/suite/rpl/t/rpl_sporadic_master-master.opt b/mysql-test/suite/rpl/t/rpl_sporadic_master-master.opt new file mode 100644 index 00000000000..6d5b66bed61 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sporadic_master-master.opt @@ -0,0 +1 @@ +--sporadic-binlog-dump-fail --max-binlog-dump-events=2 diff --git a/mysql-test/suite/rpl/t/rpl_sporadic_master.test b/mysql-test/suite/rpl/t/rpl_sporadic_master.test new file mode 100644 index 00000000000..824f7abc9f5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sporadic_master.test @@ -0,0 +1,29 @@ +############################################################# +# 2006-02-07 By JBM added order by +############################################################# +# test to see if replication can continue when master sporadically fails on +# COM_BINLOG_DUMP and additionally limits the number of events per dump + +source include/master-slave.inc; + +create table t2(n int); +create table t1(n int not null auto_increment primary key); +insert into t1 values (NULL),(NULL); +truncate table t1; +# We have to use 4 in the following to make this test work with all table types +insert into t1 values (4),(NULL); +sync_slave_with_master; +stop slave; +start slave; +connection master; +insert into t1 values (NULL),(NULL); +flush logs; +truncate table t1; +insert into t1 values (10),(NULL),(NULL),(NULL),(NULL),(NULL); +sync_slave_with_master; +select * from t1 ORDER BY n; +connection master; +drop table t1,t2; +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_ssl.test b/mysql-test/suite/rpl/t/rpl_ssl.test new file mode 100644 index 00000000000..a0317028557 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ssl.test @@ -0,0 +1,71 @@ +source include/have_ssl.inc; +source include/master-slave.inc; + +# create a user for replication that requires ssl encryption +connection master; +grant replication slave on *.* to replssl@localhost require ssl; +create table t1 (t int auto_increment, KEY(t)); + +sync_slave_with_master; + +# Set slave to use SSL for connection to master +stop slave; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval change master to + master_user='replssl', + master_password='', + master_ssl=1, + master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', + master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', + master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem'; +start slave; + +# Switch to master and insert one record, then sync it to slave +connection master; +insert into t1 values(1); +sync_slave_with_master; + +# The record should now be on slave +select * from t1; + +# The slave is synced and waiting/reading from master +# SHOW SLAVE STATUS will show "Waiting for master to send event" +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # +query_vertical show slave status; + +# Stop the slave, as reported in bug#21871 it would hang +STOP SLAVE; + +select * from t1; + +# Do the same thing a number of times +disable_query_log; +let $i= 100; +while ($i) +{ + start slave; + connection master; + insert into t1 values (NULL); + connection slave; + stop slave; + dec $i; +} +start slave; +enable_query_log; +connection master; +# INSERT one more record to make sure +# the sync has something to do +insert into t1 values (NULL); +sync_slave_with_master; +--source include/wait_for_slave_to_start.inc +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # +query_vertical show slave status; + +connection master; +drop user replssl@localhost; +drop table t1; +sync_slave_with_master; + +--echo End of 5.0 tests diff --git a/mysql-test/suite/rpl/t/rpl_ssl1.test b/mysql-test/suite/rpl/t/rpl_ssl1.test new file mode 100644 index 00000000000..6ca1484bb17 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_ssl1.test @@ -0,0 +1,97 @@ +source include/have_ssl.inc; +source include/master-slave.inc; + +# We don't test all types of ssl auth params here since it's a bit hard +# until problems with OpenSSL 0.9.7 are unresolved + +# creating replication user for whom ssl auth is required +# preparing playground +connection master; +grant replication slave on *.* to replssl@localhost require ssl; +create table t1 (t int); +save_master_pos; + +#syncing with master +connection slave; +sync_with_master; + +#trying to use this user without ssl +stop slave; +change master to master_user='replssl',master_password=''; +start slave; + +#showing that replication don't work +connection master; +insert into t1 values (1); +#reasonable timeout for changes to propagate to slave +sleep 3; +connection slave; +select * from t1; + +#showing that replication could work with ssl params +stop slave; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval change master to master_ssl=1 , master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem'; +start slave; + +#avoiding unneeded sleeps +connection master; +save_master_pos; +connection slave; +sync_with_master; + +#checking that replication is ok +select * from t1; + +#checking show slave status +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # +query_vertical show slave status; + +#checking if replication works without ssl also performing clean up +stop slave; +change master to master_user='root',master_password='', master_ssl=0; +start slave; +connection master; +drop user replssl@localhost; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # +query_vertical show slave status; + +# End of 4.1 tests + +# Start replication with ssl_verify_server_cert turned on +connection slave; +stop slave; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval change master to + master_host="localhost", + master_ssl=1 , + master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', + master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', + master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem', + master_ssl_verify_server_cert=1; +start slave; + +connection master; +create table t1 (t int); +insert into t1 values (1); + +sync_slave_with_master; + +echo on slave; +#checking that replication is ok +select * from t1; + +#checking show slave status +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # +query_vertical show slave status; + +connection master; +drop table t1; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test new file mode 100644 index 00000000000..19988cf902a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test @@ -0,0 +1,36 @@ +source include/master-slave.inc; + +# +# Bug#6148 () +# +connection slave; +stop slave; + +# Let the master do lots of insertions +connection master; +create table t1(n int); +let $1=5000; +disable_query_log; +while ($1) +{ + eval insert into t1 values($1); + dec $1; +} +enable_query_log; +save_master_pos; + +connection slave; +start slave; +sleep 1; +stop slave io_thread; +start slave io_thread; +sync_with_master; + +connection master; +drop table t1; +save_master_pos; + +connection slave; +sync_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001-slave.opt b/mysql-test/suite/rpl/t/rpl_stm_000001-slave.opt new file mode 100644 index 00000000000..48457b17309 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_000001-slave.opt @@ -0,0 +1 @@ +--loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test new file mode 100644 index 00000000000..aee067b2d4a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test @@ -0,0 +1,2 @@ +let $engine_type=myisam; +-- source extra/rpl_tests/rpl_stm_000001.test diff --git a/mysql-test/suite/rpl/t/rpl_stm_EE_err2.test b/mysql-test/suite/rpl/t/rpl_stm_EE_err2.test new file mode 100644 index 00000000000..face651b9a1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_EE_err2.test @@ -0,0 +1,8 @@ +############################# +# Author: JBM +# Date: 2006-01-11 +# Purpose: Engine Wrapper for rpl_stm_EE_err2.test +############################## +-- source include/have_binlog_format_mixed_or_statement.inc +let $engine_type=myisam; +-- source extra/rpl_tests/rpl_stm_EE_err2.test diff --git a/mysql-test/suite/rpl/t/rpl_stm_charset.test b/mysql-test/suite/rpl/t/rpl_stm_charset.test new file mode 100644 index 00000000000..b103a47d78c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_charset.test @@ -0,0 +1,2 @@ +let $engine_type=myisam; +-- source extra/rpl_tests/rpl_stm_charset.test diff --git a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test new file mode 100644 index 00000000000..a8a33d05e8b --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test @@ -0,0 +1,8 @@ +# depends on the binlog output +--source include/have_binlog_format_mixed_or_statement.inc + +let $rename_event_pos= 656; +-- source extra/rpl_tests/rpl_flsh_tbls.test + +# End of 4.1 tests +# Adding comment for force manual merge 5.0 -> wl1012. Delete me if needed. diff --git a/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test new file mode 100644 index 00000000000..d55e3a4da2c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test @@ -0,0 +1,20 @@ +# we run first in statement-based then in mixed binlogging + +--source include/have_binlog_format_mixed_or_statement.inc +--source include/master-slave.inc +--source include/not_embedded.inc +--source include/not_windows.inc + +connection master; +set @old_global_binlog_format = @@global.binlog_format; + +let $binlog_format_statement=1; +set @@global.binlog_format = statement; +--source extra/rpl_tests/rpl_insert_delayed.test + +let $binlog_format_statement=0; +set @@global.binlog_format = mixed; +--source extra/rpl_tests/rpl_insert_delayed.test + +connection master; +set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/suite/rpl/t/rpl_stm_log-master.opt b/mysql-test/suite/rpl/t/rpl_stm_log-master.opt new file mode 100644 index 00000000000..cef79bc8585 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_log-master.opt @@ -0,0 +1 @@ +--force-restart diff --git a/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt b/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_log-slave.opt @@ -0,0 +1 @@ + diff --git a/mysql-test/suite/rpl/t/rpl_stm_log.test b/mysql-test/suite/rpl/t/rpl_stm_log.test new file mode 100644 index 00000000000..5a1e0facc83 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_log.test @@ -0,0 +1,8 @@ +# Requires statement logging +-- source include/have_binlog_format_mixed_or_statement.inc +let $engine_type=MyISAM; +-- source extra/rpl_tests/rpl_log.test + + +# End of 4.1 tests +# Adding comment for force manual merge 5.0 -> wl1012: Delete me diff --git a/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test b/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test new file mode 100644 index 00000000000..950aa8b322a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_max_relay_size.test @@ -0,0 +1,11 @@ +# Test of options max_binlog_size and max_relay_log_size and +# how they act (if max_relay_log_size == 0, use max_binlog_size +# for relay logs too). +# Test of manual relay log rotation with FLUSH LOGS. + +# Requires statement logging +-- source include/have_binlog_format_mixed_or_statement.inc +-- source extra/rpl_tests/rpl_max_relay_size.test + +# End of 4.1 tests +# diff --git a/mysql-test/suite/rpl/t/rpl_stm_multi_query.test b/mysql-test/suite/rpl/t/rpl_stm_multi_query.test new file mode 100644 index 00000000000..c39d1fad015 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_multi_query.test @@ -0,0 +1,12 @@ +# Test for BUG#8436: verify that a multi-query (i.e. one query +# containing several queries (assuming client has +# CLIENT_MULTI_STATEMENTS) will be binlogged ONE-query-per-event (not +# one binlog event containing all queries) + +# Requires statement logging +-- source include/have_binlog_format_mixed_or_statement.inc +-- source extra/rpl_tests/rpl_multi_query.test + + +# End of 4.1 tests +# diff --git a/mysql-test/suite/rpl/t/rpl_stm_mystery22.test b/mysql-test/suite/rpl/t/rpl_stm_mystery22.test new file mode 100644 index 00000000000..017593fdfba --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_mystery22.test @@ -0,0 +1,66 @@ +################################ +# Change Author: JBM +# Change Date: 2006-01-12 +# Change: Added back have stm binlog +# and added requirments comments +################################ +# test case to make slave thread get ahead by 22 bytes +################################ +#REQUIREMENT: If there is a faked slave duplicate key insert +#error and the slave is restarted, the replication should +#proceed in a correct way. +################################ +#REQUIREMENT: If there is a faked slave non-existing record +#delete error and the slave is restarted, then the replication +#should proceed in a correct way. +################################# + +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/master-slave.inc + +# first, cause a duplicate key problem on the slave +create table t1(n int auto_increment primary key, s char(10)); +sync_slave_with_master; +insert into t1 values (2,'old'); +connection master; +insert into t1 values(NULL,'new'); +insert into t1 values(NULL,'new'); +save_master_pos; +connection slave; +# wait until the slave tries to run the query, fails and aborts slave thread +wait_for_slave_to_stop; +select * from t1 order by n; +delete from t1 where n = 2; +--disable_warnings +start slave; +--enable_warnings +sync_with_master; +#now the buggy slave would be confused on the offset but it can replicate +#in order to make it break, we need to stop/start the slave one more time +stop slave; +connection master; +# to be able to really confuse the slave, we need some non-auto-increment +# events in the log +create table t2(n int); +drop table t2; +insert into t1 values(NULL,'new'); +# what happens when we delete a row which does not exist on slave? +set sql_log_bin=0; +insert into t1 values(NULL,'new'); +set sql_log_bin=1; +delete from t1 where n=4; +save_master_pos; +connection slave; +--disable_warnings +start slave; +--enable_warnings +#now the truth comes out - if the slave is buggy, it will never sync because +#the slave thread is not able to read events +sync_with_master; +select * from t1 order by n; +#clean up +connection master; +drop table t1; +sync_slave_with_master; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_stm_no_op.test b/mysql-test/suite/rpl/t/rpl_stm_no_op.test new file mode 100644 index 00000000000..66dc89bd712 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_no_op.test @@ -0,0 +1,93 @@ +# It's true only in statement-based replication that a statement which +# updates no rows (UPDATE/DELETE) is binlogged; in row-based +# replication, as we log modified rows, nothing is binlogged in this +# case. So this test is meaningul only in statement-based (and if it was +# enabled in row-based, it would fail as expected). + +-- source include/have_binlog_format_mixed_or_statement.inc + +source include/master-slave.inc; + +# see if DROP DATABASE is binlogged even if no effect +connection slave; +create database mysqltest; +connection master; +drop database if exists mysqltest; +sync_slave_with_master; +# can't read dir +--replace_result "Errcode: 1" "Errcode: X" "Errcode: 2" "Errcode: X" \\ / +--error 1049 +show tables from mysqltest; + +# see if DROP TABLE is binlogged even if no effect +connection slave; +create table t1 (a int); +connection master; +drop table if exists t1; +sync_slave_with_master; +# table does not exist +--error 1146 +select * from t1; + +# see if single-table DELETE is binlogged even if no effect +connection master; +create table t1 (a int, b int); +sync_slave_with_master; +insert into t1 values(1,1); +connection master; +delete from t1; +sync_slave_with_master; +select * from t1; + +# see if single-table UPDATE is binlogged even if no effect +insert into t1 values(1,1); +connection master; +insert into t1 values(2,1); +update t1 set a=2; +sync_slave_with_master; +select * from t1; + +# End of 4.1 tests + +# see if multi-table UPDATE is binlogged even if no effect (BUG#13348) + +connection master; +create table t2 (a int, b int); +delete from t1; +insert into t1 values(1,1); +insert into t2 values(1,1); + +sync_slave_with_master; +# force a difference to see if master's multi-UPDATE will correct it +update t1 set a=2; + +connection master; +UPDATE t1, t2 SET t1.a = t2.a; + +sync_slave_with_master; +select * from t1; +select * from t2; + +# See if multi-table DELETE is binlogged even if no effect + +connection master; +delete from t1; +delete from t2; + +sync_slave_with_master; +# force a difference to see if master's multi-DELETE will correct it +insert into t1 values(1,1); +insert into t2 values(1,1); + +connection master; +DELETE t1.*, t2.* from t1, t2; + +sync_slave_with_master; +select * from t1; +select * from t2; + + +# cleanup +connection master; +drop table t1, t2; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_stm_reset_slave.test b/mysql-test/suite/rpl/t/rpl_stm_reset_slave.test new file mode 100644 index 00000000000..6a99d4e1613 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_reset_slave.test @@ -0,0 +1,6 @@ +# TBF - difference in row level logging +-- source include/have_binlog_format_mixed_or_statement.inc +-- source extra/rpl_tests/rpl_reset_slave.test + +# End of 4.1 tests +# diff --git a/mysql-test/suite/rpl/t/rpl_stm_until.test b/mysql-test/suite/rpl/t/rpl_stm_until.test new file mode 100644 index 00000000000..f42965c0eb0 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_until.test @@ -0,0 +1,88 @@ +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/master-slave.inc + +# Test is dependent on binlog positions + +# prepare version for substitutions +let $VERSION=`select version()`; + +# stop slave before he will start replication also sync with master +# for avoiding undetermenistic behaviour +save_master_pos; +connection slave; +sync_with_master; +stop slave; + +connection master; +# create some events on master +create table t1(n int not null auto_increment primary key); +insert into t1 values (1),(2),(3),(4); +drop table t1; +create table t2(n int not null auto_increment primary key); +insert into t2 values (1),(2); +insert into t2 values (3),(4); +drop table t2; + +# try to replicate all queries until drop of t1 +connection slave; +start slave until master_log_file='master-bin.000001', master_log_pos=323; +sleep 2; +wait_for_slave_to_stop; +# here table should be still not deleted +select * from t1; +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 9 # 11 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS + +# this should fail right after start +start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; +# again this table should be still not deleted +select * from t1; +sleep 2; +wait_for_slave_to_stop; +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 9 # 11 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS + +# try replicate all up to and not including the second insert to t2; +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; +sleep 2; +wait_for_slave_to_stop; +select * from t2; +--replace_result $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 9 # 11 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS + +# clean up +start slave; +connection master; +save_master_pos; +connection slave; +sync_with_master; +stop slave; + +# this should stop immediately as we are already there +start slave until master_log_file='master-bin.000001', master_log_pos=776; +sleep 2; +wait_for_slave_to_stop; +# here the sql slave thread should be stopped +--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 +--replace_column 1 # 9 # 23 # 33 # +--query_vertical SHOW SLAVE STATUS + +#testing various error conditions +--error 1277 +start slave until master_log_file='master-bin', master_log_pos=561; +--error 1277 +start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; +--error 1277 +start slave until master_log_file='master-bin.000001'; +--error 1277 +start slave until relay_log_file='slave-relay-bin.000002'; +--error 1277 +start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; +# Warning should be given for second command +start slave sql_thread; +start slave until master_log_file='master-bin.000001', master_log_pos=776; + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test new file mode 100644 index 00000000000..b0012827db8 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test @@ -0,0 +1,568 @@ +# +# rpl_switch_stm_row_mixed tests covers +# +# - switching explicitly between STATEMENT, ROW, and MIXED binlog format +# showing when it is possible and when not. +# - switching from MIXED to RBR implicitly listing all use cases, +# e.g a query invokes UUID(), thereafter to serve as the definition +# of MIXED binlog format +# - correctness of execution + + +-- source include/not_ndb_default.inc +-- source include/master-slave.inc + +connection master; +--disable_warnings +drop database if exists mysqltest1; +create database mysqltest1; +--enable_warnings +use mysqltest1; + +# Save binlog format +set @my_binlog_format= @@global.binlog_format; + +# play with switching +set session binlog_format=mixed; +show session variables like "binlog_format%"; +set session binlog_format=statement; +show session variables like "binlog_format%"; +set session binlog_format=row; +show session variables like "binlog_format%"; + +set global binlog_format=DEFAULT; +show global variables like "binlog_format%"; +set global binlog_format=MIXED; +show global variables like "binlog_format%"; +set global binlog_format=STATEMENT; +show global variables like "binlog_format%"; +set global binlog_format=ROW; +show global variables like "binlog_format%"; +show session variables like "binlog_format%"; +select @@global.binlog_format, @@session.binlog_format; + +CREATE TABLE t1 (a varchar(100)); + +prepare stmt1 from 'insert into t1 select concat(UUID(),?)'; +set @string="emergency_1_"; +insert into t1 values("work_2_"); +execute stmt1 using @string; +deallocate prepare stmt1; + +prepare stmt1 from 'insert into t1 select ?'; +insert into t1 values(concat(UUID(),"work_3_")); +execute stmt1 using @string; +deallocate prepare stmt1; + +insert into t1 values(concat("for_4_",UUID())); +insert into t1 select "yesterday_5_"; + +# verify that temp tables prevent a switch to SBR +create temporary table tmp(a char(100)); +insert into tmp values("see_6_"); +--error ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR +set binlog_format=statement; +insert into t1 select * from tmp; +drop temporary table tmp; + +# Now we go to SBR +set binlog_format=statement; +show global variables like "binlog_format%"; +show session variables like "binlog_format%"; +select @@global.binlog_format, @@session.binlog_format; +set global binlog_format=statement; +show global variables like "binlog_format%"; +show session variables like "binlog_format%"; +select @@global.binlog_format, @@session.binlog_format; + +prepare stmt1 from 'insert into t1 select ?'; +set @string="emergency_7_"; +insert into t1 values("work_8_"); +execute stmt1 using @string; +deallocate prepare stmt1; + +prepare stmt1 from 'insert into t1 select ?'; +insert into t1 values("work_9_"); +execute stmt1 using @string; +deallocate prepare stmt1; + +insert into t1 values("for_10_"); +insert into t1 select "yesterday_11_"; + +# test statement (is not default after wl#3368) +set binlog_format=statement; +select @@global.binlog_format, @@session.binlog_format; +set global binlog_format=statement; +select @@global.binlog_format, @@session.binlog_format; + +prepare stmt1 from 'insert into t1 select ?'; +set @string="emergency_12_"; +insert into t1 values("work_13_"); +execute stmt1 using @string; +deallocate prepare stmt1; + +prepare stmt1 from 'insert into t1 select ?'; +insert into t1 values("work_14_"); +execute stmt1 using @string; +deallocate prepare stmt1; + +insert into t1 values("for_15_"); +insert into t1 select "yesterday_16_"; + +# and now the mixed mode + +set global binlog_format=mixed; +select @@global.binlog_format, @@session.binlog_format; +set binlog_format=default; +select @@global.binlog_format, @@session.binlog_format; + +prepare stmt1 from 'insert into t1 select concat(UUID(),?)'; +set @string="emergency_17_"; +insert into t1 values("work_18_"); +execute stmt1 using @string; +deallocate prepare stmt1; + +prepare stmt1 from 'insert into t1 select ?'; +insert into t1 values(concat(UUID(),"work_19_")); +execute stmt1 using @string; +deallocate prepare stmt1; + +insert into t1 values(concat("for_20_",UUID())); +insert into t1 select "yesterday_21_"; + +prepare stmt1 from 'insert into t1 select ?'; +insert into t1 values(concat(UUID(),"work_22_")); +execute stmt1 using @string; +deallocate prepare stmt1; + +insert into t1 values(concat("for_23_",UUID())); +insert into t1 select "yesterday_24_"; + +# Test of CREATE TABLE SELECT + +create table t2 select rpad(UUID(),100,' '); +create table t3 select 1 union select UUID(); +create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3); +create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); +# what if UUID() is first: +insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); + +# inside a stored procedure + +delimiter |; +create procedure foo() +begin +insert into t1 values("work_25_"); +insert into t1 values(concat("for_26_",UUID())); +insert into t1 select "yesterday_27_"; +end| +create procedure foo2() +begin +insert into t1 values(concat("emergency_28_",UUID())); +insert into t1 values("work_29_"); +insert into t1 values(concat("for_30_",UUID())); +set session binlog_format=row; # accepted for stored procs +insert into t1 values("more work_31_"); +set session binlog_format=mixed; +end| +create function foo3() returns bigint unsigned +begin + set session binlog_format=row; # rejected for stored funcs + insert into t1 values("alarm"); + return 100; +end| +create procedure foo4(x varchar(100)) +begin +insert into t1 values(concat("work_250_",x)); +insert into t1 select "yesterday_270_"; +end| +delimiter ;| +call foo(); +call foo2(); +call foo4("hello"); +call foo4(UUID()); +call foo4("world"); + +# test that can't SET in a stored function +--error ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT +select foo3(); +select * from t1 where a="alarm"; + +# Tests of stored functions/triggers/views for BUG#20930 "Mixed +# binlogging mode does not work with stored functions, triggers, +# views" + +# Function which calls procedure +drop function foo3; +delimiter |; +create function foo3() returns bigint unsigned +begin + insert into t1 values("foo3_32_"); + call foo(); + return 100; +end| +delimiter ;| +insert into t2 select foo3(); + +prepare stmt1 from 'insert into t2 select foo3()'; +execute stmt1; +execute stmt1; +deallocate prepare stmt1; + +# Test if stored function calls stored function which calls procedure +# which requires row-based. + +delimiter |; +create function foo4() returns bigint unsigned +begin + insert into t2 select foo3(); + return 100; +end| +delimiter ;| +select foo4(); + +prepare stmt1 from 'select foo4()'; +execute stmt1; +execute stmt1; +deallocate prepare stmt1; + +# A simple stored function +delimiter |; +create function foo5() returns bigint unsigned +begin + insert into t2 select UUID(); + return 100; +end| +delimiter ;| +select foo5(); + +prepare stmt1 from 'select foo5()'; +execute stmt1; +execute stmt1; +deallocate prepare stmt1; + +# A simple stored function where UUID() is in the argument +delimiter |; +create function foo6(x varchar(100)) returns bigint unsigned +begin + insert into t2 select x; + return 100; +end| +delimiter ;| +select foo6("foo6_1_"); +select foo6(concat("foo6_2_",UUID())); + +prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))'; +execute stmt1; +execute stmt1; +deallocate prepare stmt1; + + +# Test of views using UUID() + +create view v1 as select uuid(); +create table t11 (data varchar(255)); +insert into t11 select * from v1; +# Test of querying INFORMATION_SCHEMA which parses the view's body, +# to verify that it binlogs statement-based (is not polluted by +# the parsing of the view's body). +insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11'); +prepare stmt1 from "insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')"; +execute stmt1; +execute stmt1; +deallocate prepare stmt1; + +# Test of triggers with UUID() +delimiter |; +create trigger t11_bi before insert on t11 for each row +begin + set NEW.data = concat(NEW.data,UUID()); +end| +delimiter ;| +insert into t11 values("try_560_"); + +# Test that INSERT DELAYED works in mixed mode (BUG#20649) +insert delayed into t2 values("delay_1_"); +insert delayed into t2 values(concat("delay_2_",UUID())); +insert delayed into t2 values("delay_6_"); + +# Test for BUG#20633 (INSERT DELAYED RAND()/user_variable does not +# replicate fine in statement-based ; we test that in mixed mode it +# works). +insert delayed into t2 values(rand()); +set @a=2.345; +insert delayed into t2 values(@a); + +sleep 4; # time for the delayed inserts to reach disk + +# If you want to do manual testing of the mixed mode regarding UDFs (not +# testable automatically as quite platform- and compiler-dependent), +# you just need to set the variable below to 1, and to +# "make udf_example.so" in sql/, and to copy sql/udf_example.so to +# MYSQL_TEST_DIR/lib/mysql. +let $you_want_to_test_UDF=0; +if ($you_want_to_test_UDF) +{ + CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so'; + prepare stmt1 from 'insert into t1 select metaphon(?)'; + set @string="emergency_133_"; + insert into t1 values("work_134_"); + execute stmt1 using @string; + deallocate prepare stmt1; + prepare stmt1 from 'insert into t1 select ?'; + insert into t1 values(metaphon("work_135_")); + execute stmt1 using @string; + deallocate prepare stmt1; + insert into t1 values(metaphon("for_136_")); + insert into t1 select "yesterday_137_"; + create table t6 select metaphon("for_138_"); + create table t7 select 1 union select metaphon("for_139_"); + create table t8 select * from t1 where 3 in (select 1 union select 2 union select metaphon("for_140_") union select 3); + create table t9 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); +} + +create table t20 select * from t1; # save for comparing later +create table t21 select * from t2; +create table t22 select * from t3; +drop table t1,t2,t3; + +# This tests the fix to +# BUG#19630 stored function inserting into two auto_increment breaks statement-based binlog +# We verify that under the mixed binlog mode, a stored function +# modifying at least two tables having an auto_increment column, +# is binlogged row-based. Indeed in statement-based binlogging, +# only the auto_increment value generated for the first table +# is recorded in the binlog, the value generated for the 2nd table +# lacking. + +create table t1 (a int primary key auto_increment, b varchar(100)); +create table t2 (a int primary key auto_increment, b varchar(100)); +create table t3 (b varchar(100)); +delimiter |; +create function f (x varchar(100)) returns int deterministic +begin + insert into t1 values(null,x); + insert into t2 values(null,x); + return 1; +end| +delimiter ;| +select f("try_41_"); +# Two operations which compensate each other except that their net +# effect is that they advance the auto_increment counter of t2 on slave: +sync_slave_with_master; +use mysqltest1; +insert into t2 values(2,null),(3,null),(4,null); +delete from t2 where a>=2; + +connection master; +# this is the call which didn't replicate well +select f("try_42_"); +sync_slave_with_master; + +# now use prepared statement and test again, just to see that the RBB +# mode isn't set at PREPARE but at EXECUTE. + +insert into t2 values(3,null),(4,null); +delete from t2 where a>=3; + +connection master; +prepare stmt1 from 'select f(?)'; +set @string="try_43_"; +insert into t1 values(null,"try_44_"); # should be SBB +execute stmt1 using @string; # should be RBB +deallocate prepare stmt1; +sync_slave_with_master; + +# verify that if only one table has auto_inc, it does not trigger RBB +# (we'll check in binlog further below) + +connection master; +create table t12 select * from t1; # save for comparing later +drop table t1; +create table t1 (a int, b varchar(100), key(a)); +select f("try_45_"); + +# restore table's key +create table t13 select * from t1; +drop table t1; +create table t1 (a int primary key auto_increment, b varchar(100)); + +# now test if it's two functions, each of them inserts in one table + +drop function f; +# we need a unique key to have sorting of rows by mysqldump +create table t14 (unique (a)) select * from t2; +truncate table t2; +delimiter |; +create function f1 (x varchar(100)) returns int deterministic +begin + insert into t1 values(null,x); + return 1; +end| +create function f2 (x varchar(100)) returns int deterministic +begin + insert into t2 values(null,x); + return 1; +end| +delimiter ;| +select f1("try_46_"),f2("try_47_"); + +sync_slave_with_master; +insert into t2 values(2,null),(3,null),(4,null); +delete from t2 where a>=2; + +connection master; +# Test with SELECT and INSERT +select f1("try_48_"),f2("try_49_"); +insert into t3 values(concat("try_50_",f1("try_51_"),f2("try_52_"))); +sync_slave_with_master; + +# verify that if f2 does only read on an auto_inc table, this does not +# switch to RBB +connection master; +drop function f2; +delimiter |; +create function f2 (x varchar(100)) returns int deterministic +begin + declare y int; + insert into t1 values(null,x); + set y = (select count(*) from t2); + return y; +end| +delimiter ;| +select f1("try_53_"),f2("try_54_"); +sync_slave_with_master; + +# And now, a normal statement with a trigger (no stored functions) + +connection master; +drop function f2; +delimiter |; +create trigger t1_bi before insert on t1 for each row +begin + insert into t2 values(null,"try_55_"); +end| +delimiter ;| +insert into t1 values(null,"try_56_"); +# and now remove one auto_increment and verify SBB +alter table t1 modify a int, drop primary key; +insert into t1 values(null,"try_57_"); +sync_slave_with_master; + +# Test for BUG#20499 "mixed mode with temporary table breaks binlog" +# Slave used to have only 2 rows instead of 3. +connection master; +CREATE TEMPORARY TABLE t15 SELECT UUID(); +create table t16 like t15; +INSERT INTO t16 SELECT * FROM t15; +# we'll verify that this one is done RBB +insert into t16 values("try_65_"); +drop table t15; +# we'll verify that this one is done SBB +insert into t16 values("try_66_"); +sync_slave_with_master; + +# and now compare: + +connection master; + +# first check that data on master is sensible +select count(*) from t1; +select count(*) from t2; +select count(*) from t3; +select count(*) from t4; +select count(*) from t5; +select count(*) from t11; +select count(*) from t20; +select count(*) from t21; +select count(*) from t22; +select count(*) from t12; +select count(*) from t13; +select count(*) from t14; +select count(*) from t16; +if ($you_want_to_test_UDF) +{ + select count(*) from t6; + select count(*) from t7; + select count(*) from t8; + select count(*) from t9; +} + +sync_slave_with_master; + +# +# Bug#20863 If binlog format is changed between update and unlock of +# tables, wrong binlog +# + +connection master; +DROP TABLE IF EXISTS t11; +SET SESSION BINLOG_FORMAT=STATEMENT; +CREATE TABLE t11 (song VARCHAR(255)); +LOCK TABLES t11 WRITE; +SET SESSION BINLOG_FORMAT=ROW; +INSERT INTO t11 VALUES('Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict'); +SET SESSION BINLOG_FORMAT=STATEMENT; +INSERT INTO t11 VALUES('Careful With That Axe, Eugene'); +UNLOCK TABLES; + +--query_vertical SELECT * FROM t11 +sync_slave_with_master; +USE mysqltest1; +--query_vertical SELECT * FROM t11 + +connection master; +DROP TABLE IF EXISTS t12; +SET SESSION BINLOG_FORMAT=MIXED; +CREATE TABLE t12 (data LONG); +LOCK TABLES t12 WRITE; +INSERT INTO t12 VALUES(UUID()); +UNLOCK TABLES; + +source include/show_binlog_events.inc; +sync_slave_with_master; + +# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql + +# Let's compare. Note: If they match test will pass, if they do not match +# the test will show that the diff statement failed and not reject file +# will be created. You will need to go to the mysql-test dir and diff +# the files your self to see what is not matching + +diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql; + +connection master; +source include/show_binlog_events.inc; + +# Now test that mysqlbinlog works fine on a binlog generated by the +# mixed mode + +# BUG#11312 "DELIMITER is not written to the binary log that causes +# syntax error" makes that mysqlbinlog will fail if we pass it the +# text of queries; this forces us to use --base64-output here. + +# BUG#20929 "BINLOG command causes invalid free plus assertion +# failure" makes mysqld segfault when receiving --base64-output + +# So I can't enable this piece of test +# SIGH + +if ($enable_when_11312_or_20929_fixed) +{ +--exec $MYSQL_BINLOG --base64-output $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_mixed.sql +drop database mysqltest1; +--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_mixed.sql +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql +# the old mysqldump output on slave is the same as what it was on +# master before restoring on master. +diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql; +} + +drop database mysqltest1; +sync_slave_with_master; + +connection master; +# Restore binlog format setting +set global binlog_format =@my_binlog_format; diff --git a/mysql-test/suite/rpl/t/rpl_temp_table.test b/mysql-test/suite/rpl/t/rpl_temp_table.test new file mode 100644 index 00000000000..9b73961aeea --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_temp_table.test @@ -0,0 +1,59 @@ +# drop table t1 t2 t3 are included int master-slave.inc +# meaningful only in statement-based: + +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/master-slave.inc + + +create table t2 (n int, PRIMARY KEY(n)); +create temporary table t1 (n int); +create temporary table t3 (n int not null); + +insert into t1 values(1),(2),(3),(100),(25),(26),(200),(300); +insert into t2 select * from t1; +alter table t3 add primary key(n); + +flush logs; +insert into t3 values (1010); +insert into t2 select * from t3; + +drop table if exists t3; +insert into t2 values (1012); + +connection master1; +create temporary table t1 (n int); +insert into t1 values (4),(5); +insert into t2 select * from t1; + +save_master_pos; +disconnect master; + +connection slave; +#add 1 to the saved position, so we will catch drop table on disconnect +#for sure +sync_with_master 1; + +connection master1; +insert into t2 values(61); + +save_master_pos; +disconnect master1; + +connection slave; +#same trick - make sure we catch drop of temporary table on disconnect +sync_with_master 1; + +select * from t2; +select count(*) from t2; +select sum(n) from t2; +show status like 'Slave_open_temp_tables'; + +# +# Clean up +# +connect (master2,localhost,root,,); +connection master2; +drop table if exists t1,t2; +save_master_pos; +connection slave; +sync_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test new file mode 100644 index 00000000000..09b8b83f25f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_temporary.test @@ -0,0 +1,215 @@ +# Test need anonymous user when connection are made as "zedjzlcsjhd" +source include/add_anonymous_users.inc; + +-- source include/master-slave.inc + +# Clean up old slave's binlogs. +# The slave is started with --log-slave-updates +# and this test does SHOW BINLOG EVENTS on the slave's +# binlog. But previous tests can influence the current test's +# binlog (e.g. a temporary table in the previous test has not +# been explicitly deleted, or it has but the slave hasn't had +# enough time to catch it before STOP SLAVE, +# and at the beginning of the current +# test the slave immediately writes DROP TEMPORARY TABLE this_old_table). +# We wait for the slave to have written all he wants to the binlog +# (otherwise RESET MASTER may come too early). +save_master_pos; +connection slave; +sync_with_master; +reset master; +connection master; + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); +# We want to connect as an unprivileged user. But if we use user="" then this +# will pick the Unix login, which will cause problems if you're running the test +# as root. +connect (con3,localhost,zedjzlcsjhd,,); + +# We are going to use SET PSEUDO_THREAD_ID in this test; +# check that it requires the SUPER privilege. + +connection con3; +SET @save_select_limit=@@session.sql_select_limit; +--error 1227 +SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100; +SELECT @@session.sql_select_limit = @save_select_limit; #shouldn't have changed +# While we are here we also test that SQL_LOG_BIN can't be set +--error 1227 +SET @@session.sql_select_limit=10, @@session.sql_log_bin=0; +SELECT @@session.sql_select_limit = @save_select_limit; #shouldn't have changed +# Now as root, to be sure it works +connection con2; +SET @@session.pseudo_thread_id=100; +SET @@session.pseudo_thread_id=connection_id(); +SET @@session.sql_log_bin=0; +SET @@session.sql_log_bin=1; + +connection con3; +let $VERSION=`select version()`; + +--disable_warnings +drop table if exists t1,t2; +--enable_warnings + +create table t1(f int); +create table t2(f int); +insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + +connection con1; +create temporary table t3(f int); +insert into t3 select * from t1 where f<6; +sleep 1; + +connection con2; +create temporary table t3(f int); +sleep 1; + +connection con1; +insert into t2 select count(*) from t3; +sleep 1; + +connection con2; +insert into t3 select * from t1 where f>=4; +sleep 1; + +connection con1; +drop temporary table t3; +sleep 1; + +connection con2; +insert into t2 select count(*) from t3; +drop temporary table t3; + +select * from t2 ORDER BY f; + +# Commented out 8/30/2005 to make compatable with both sbr and rbr +#--replace_result $VERSION VERSION +#--replace_column 2 # 5 # +#show binlog events; + +drop table t1, t2; + +use test; +SET TIMESTAMP=1040323920; +create table t1(f int); +SET TIMESTAMP=1040323931; +create table t2(f int); +SET TIMESTAMP=1040323938; +insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + +SET TIMESTAMP=1040323945; +SET @@session.pseudo_thread_id=1; +create temporary table t3(f int); +SET TIMESTAMP=1040323952; +SET @@session.pseudo_thread_id=1; +insert into t3 select * from t1 where f<6; +SET TIMESTAMP=1040324145; +SET @@session.pseudo_thread_id=2; +create temporary table t3(f int); +SET TIMESTAMP=1040324186; +SET @@session.pseudo_thread_id=1; +insert into t2 select count(*) from t3; +SET TIMESTAMP=1040324200; +SET @@session.pseudo_thread_id=2; +insert into t3 select * from t1 where f>=4; +SET TIMESTAMP=1040324211; +SET @@session.pseudo_thread_id=1; +drop temporary table t3; +SET TIMESTAMP=1040324219; +SET @@session.pseudo_thread_id=2; +insert into t2 select count(*) from t3; +SET TIMESTAMP=1040324224; +SET @@session.pseudo_thread_id=2; +drop temporary table t3; + +select * from t2 ORDER BY f; +drop table t1,t2; + +# Create last a temporary table that is not dropped at end to ensure that we +# don't get any memory leaks for this + +create temporary table t3 (f int); +sync_with_master; + +# The server will now close done + +# +# Bug#17284 erroneous temp table cleanup on slave +# + +connection master; +create temporary table t4 (f int); +create table t5 (f int); +sync_with_master; +# find dumper's $id +select id from information_schema.processlist where command='Binlog Dump' into @id; +kill @id; # to stimulate reconnection by slave w/o timeout +insert into t5 select * from t4; +save_master_pos; + +connection slave; +sync_with_master; +select * from t5 /* must be 1 after reconnection */; + +connection master; +drop temporary table t4; +drop table t5; + +# +# BUG#17263 incorrect generation DROP temp tables +# Temporary tables of connection are dropped in batches +# where a batch correspond to pseudo_thread_id +# value was set up at the moment of temp table creation +# +connection con1; +set @@session.pseudo_thread_id=100; +create temporary table t101 (id int); +create temporary table t102 (id int); +set @@session.pseudo_thread_id=200; +create temporary table t201 (id int); +create temporary table `t``201` (id int); +# emulate internal temp table not to come to binlog +create temporary table `#sql_not_user_table202` (id int); +set @@session.pseudo_thread_id=300; +create temporary table t301 (id int); +create temporary table t302 (id int); +create temporary table `#sql_not_user_table303` (id int); +disconnect con1; + +#now do something to show that slave is ok after DROP temp tables +connection master; +create table t1(f int); +insert into t1 values (1); + +sync_slave_with_master; +#connection slave; +select * from t1 /* must be 1 */; + +connection master; +drop table t1; + +# +#14157: utf8 encoding in binlog without set character_set_client +# +--write_file $MYSQLTEST_VARDIR/tmp/bug14157.sql +create table t1 (a int); +set names latin1; +create temporary table `äöüÄÖÜ` (a int); +insert into `äöüÄÖÜ` values (1); +insert into t1 select * from `äöüÄÖÜ` +EOF +--exec $MYSQL --character-sets-dir=../sql/share/charsets/ --default-character-set=latin1 test < $MYSQLTEST_VARDIR/tmp/bug14157.sql + +sync_slave_with_master; +#connection slave; +select * from t1; + +connection master; +drop table t1; + +# Delete the anonymous users +source include/delete_anonymous_users.inc; + +# End of 5.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_timezone-master.opt b/mysql-test/suite/rpl/t/rpl_timezone-master.opt new file mode 100644 index 00000000000..8e43bfbbb7e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_timezone-master.opt @@ -0,0 +1 @@ +--default-time-zone=Europe/Moscow diff --git a/mysql-test/suite/rpl/t/rpl_timezone-slave.opt b/mysql-test/suite/rpl/t/rpl_timezone-slave.opt new file mode 100644 index 00000000000..191182c329c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_timezone-slave.opt @@ -0,0 +1 @@ +--default-time-zone=Japan diff --git a/mysql-test/suite/rpl/t/rpl_timezone.test b/mysql-test/suite/rpl/t/rpl_timezone.test new file mode 100644 index 00000000000..4b8c8152c82 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_timezone.test @@ -0,0 +1,142 @@ +####################################### +# Change Author: JBM +# Change Date: 2006-01-17 +# Change: Added order by +####################################### +# Test of replication of time zones. +###################################### +# There is currently some bug possibly in prepared statements (this +# test fails with --ps-protocol): sys_var_thd_time_zone::value_ptr() +# is called only at prepare time, not at execution time. So, +# thd->time_zone_used is not equal to 1 (it is back to 0, because of +# reset_thd_for_next_command called at execution time), so the +# timezone used in CONVERT_TZ is not binlogged. To debug (by Guilhem +# and possibly Konstantin). + +--disable_ps_protocol + +source include/master-slave.inc; + +# Save original timezone +set @my_time_zone= @@global.time_zone; + +# Some preparations +let $VERSION=`select version()`; +set timestamp=100000000; # for fixed output of mysqlbinlog +create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n)); +create table t2 (t char(32), n int not null auto_increment, PRIMARY KEY(n)); + +connection slave; +select @@time_zone; +#set time_zone='UTC'; +#select @@time_zone; +# +# Let us check how well replication works when we are saving datetime +# value in TIMESTAMP field. +# +connection master; +select @@time_zone; +#set time_zone='UTC'; +#select @@time_zone; +insert into t1 values ('20050101000000', NULL), ('20050611093902',NULL); +insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); +SELECT * FROM t1 ORDER BY n; +sync_slave_with_master; +#set time_zone='UTC'; +SELECT * FROM t1 ORDER BY n; + +# Let us check also that setting of time_zone back to default also works +# well +connection master; +delete from t1; +set time_zone='Europe/Moscow'; +insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); +SELECT * FROM t1 ORDER BY n; +sync_slave_with_master; +set time_zone='Europe/Moscow'; +SELECT * FROM t1 ORDER BY n; +connection master; +# Change Author: JBM +# Change Date: 2005-12-22 +# Change: Comment out the exec of the binlog so test works for both SBR and RBR +#--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +#--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 + +# Let us check with LOAD DATA INFILE +# (we do it after mysqlbinlog because the temp files names are not constant) +connection master; +delete from t1; +set time_zone='UTC'; +load data infile '../std_data_ln/rpl_timezone2.dat' into table t1; +SELECT * FROM t1 ORDER BY n; +sync_slave_with_master; +set time_zone='UTC'; +SELECT * FROM t1 ORDER BY n; +set time_zone='Europe/Moscow'; + +# Put back values of before the LOAD +connection master; +set time_zone='Europe/Moscow'; +delete from t1; +insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); + +# +# Now let us check how well we replicate statments reading TIMESTAMP fields +# (We should see the same data on master and on slave but it should differ +# from originally inserted) +# +set time_zone='MET'; +insert into t2 (select * from t1); +SELECT * FROM t1 ORDER BY n; +sync_slave_with_master; +SELECT * FROM t2 ORDER BY n; + +# +# Now let us check how well we replicate various CURRENT_* functions +# +connection master; +delete from t2; +set timestamp=1000072000; +insert into t2 values (current_timestamp,NULL), (current_date,NULL), (current_time,NULL); +sync_slave_with_master; +SELECT * FROM t2 ORDER BY n; + +# +# At last let us check replication of FROM_UNIXTIME/UNIX_TIMESTAMP functions. +# +connection master; +delete from t2; +insert into t2 values (from_unixtime(1000000000),NULL), + (unix_timestamp('2001-09-09 03:46:40'),NULL); +SELECT * FROM t2 ORDER BY n; +sync_slave_with_master; +# We should get same result on slave as on master +SELECT * FROM t2 ORDER BY n; + +# +# Let us check that we are allowing to set global time_zone with +# replication +# +connection master; +set global time_zone='MET'; + +# +# Let us see if CONVERT_TZ(@@time_zone) replicates +# +delete from t2; +set time_zone='UTC'; +insert into t2 values(convert_tz('2004-01-01 00:00:00','MET',@@time_zone),NULL); +insert into t2 values(convert_tz('2005-01-01 00:00:00','MET','Japan'),NULL); +SELECT * FROM t2 ORDER BY n; +sync_slave_with_master; +SELECT * FROM t2 ORDER BY n; + +# Clean up +connection master; +drop table t1, t2; +sync_slave_with_master; + + +# Restore original timezone +connection master; +set global time_zone= @my_time_zone; diff --git a/mysql-test/suite/rpl/t/rpl_trigger.test b/mysql-test/suite/rpl/t/rpl_trigger.test new file mode 100644 index 00000000000..9f5f6fc9b4c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_trigger.test @@ -0,0 +1,477 @@ +# +# Test of triggers with replication +# Adding statement include due to Bug 12574 +# TODO: Remove statement include once 12574 is patched +--source include/have_binlog_format_mixed_or_statement.inc +--source include/master-slave.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; + +--enable_warnings + +# +# #12482: Triggers has side effects with auto_increment values +# + +create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null); +create table t2 (a int auto_increment, primary key (a), b int); +create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null); + +delimiter |; +create trigger t1 before insert on t1 for each row +begin + insert into t3 values (NULL, "t1", new.a, new.b, rand()); +end| + +create trigger t2 after insert on t2 for each row +begin + insert into t3 values (NULL, "t2", new.a, new.b, rand()); +end| +delimiter ;| + +insert into t3 values(100,"log",0,0,0); + +# Ensure we always have same random numbers +SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186; + +# Emulate that we have rows 2-9 deleted on the slave +insert into t1 values(1,1,rand()),(NULL,2,rand()); +insert into t2 (b) values(last_insert_id()); +insert into t2 values(3,0),(NULL,0); +insert into t2 values(NULL,0),(500,0); + +select a,b, truncate(rand_value,4) from t1; +select * from t2; +select a,name, old_a, old_b, truncate(rand_value,4) from t3; +save_master_pos; +connection slave; +sync_with_master; +--disable_query_log +select "--- On slave --" as ""; +--enable_query_log +select a,b, truncate(rand_value,4) from t1; +select * from t2; +select a,name, old_a, old_b, truncate(rand_value,4) from t3; +connection master; +drop table t1,t2,t3; + +# +# #12480: NOW() is not constant in a trigger +# #12481: Using NOW() in a stored function breaks statement based replication +# + +# Start by getting a lock on 'bug12480' to be able to use get_lock() as sleep() +connect (con2,localhost,root,,); +connection con2; +select get_lock("bug12480",2); +connection default; + +create table t1 (a datetime,b datetime, c datetime); +--disable_warnings +drop function if exists bug12480; +--enable_warnings + +delimiter |; + +create function bug12480() returns datetime +begin + set @a=get_lock("bug12480",2); + return now(); +end| + +create trigger t1_first before insert on t1 +for each row begin + set @a=get_lock("bug12480",2); + set new.b= now(); + set new.c= bug12480(); +end +| + +delimiter ;| +insert into t1 set a = now(); +select a=b && a=c from t1; +let $time=`select a from t1`; + +# Check that definer attribute is replicated properly: +# - dump definers on the master; +# - wait for the slave to synchronize with the master; +# - dump definers on the slave; + +SELECT routine_name, definer +FROM information_schema.routines; + +SELECT trigger_name, definer +FROM information_schema.triggers; + +save_master_pos; +connection slave; +sync_with_master; +--disable_query_log +select "--- On slave --" as ""; +--enable_query_log + +# XXX: Definers of stored procedures and functions are not replicated. WL#2897 +# (Complete definer support in the stored routines) addresses this issue. So, +# the result file is expected to be changed after implementation of this WL +# item. + +SELECT routine_name, definer +FROM information_schema.routines; + +SELECT trigger_name, definer +FROM information_schema.triggers; + +select a=b && a=c from t1; +--disable_query_log +eval select a='$time' as 'test' from t1; +--enable_query_log + +connection master; +disconnect con2; + +truncate table t1; +drop trigger t1_first; + +insert into t1 values ("2003-03-03","2003-03-03","2003-03-03"),(bug12480(),bug12480(),bug12480()),(now(),now(),now()); +select a=b && a=c from t1; + +drop function bug12480; +drop table t1; + +# +# #14614: Replication of tables with trigger generates error message if databases is changed +# Note. The error message is emitted by _myfree() using fprintf() to the stderr +# and because of that does not fall into the .result file. +# + +create table t1 (i int); +create table t2 (i int); + +delimiter |; +create trigger tr1 before insert on t1 for each row +begin + insert into t2 values (1); +end| +delimiter ;| + +create database other; +use other; +insert into test.t1 values (1); + +save_master_pos; +connection slave; +sync_with_master; + +connection master; +use test; +drop table t1,t2; +drop database other; + + +# +# Test specific triggers including SELECT into var with replication +# BUG#13227: +# slave performs an update to the replicatable table, t1, +# and modifies its local data, t3, by mean of its local trigger that uses +# another local table t2. +# Expected values are commented into queries. +# +# Body of the test executes in a loop since the problem occurred randomly. +# + +let $max_rows=5; +let $rnd=10; + +--echo test case for BUG#13227 +while ($rnd) +{ + --echo ------------------- + echo $rnd; + --echo ------------------- + +### SETUP + +--disable_warnings + connection master; + eval drop table if exists t1$rnd; + connection slave; + eval drop table if exists t2$rnd,t3$rnd; +--enable_warnings + + connection master; + eval create table t1$rnd (f1 int) /* 2 replicate */; + let $i=$max_rows; + while ($i) + { + eval insert into t1$rnd values (-$i); + dec $i; + } + + sync_slave_with_master; +#connection slave; + eval select * from t1$rnd; + delimiter |; + eval create trigger trg1$rnd before update on t1$rnd /* slave local */ + for each row + begin + DECLARE r integer; + SELECT f2 INTO r FROM t2$rnd where f1=NEW.f1; + INSERT INTO t3$rnd values (r); + end| + delimiter ;| + eval create table t2$rnd (f1 int, f2 int) /* slave local */; + eval create table t3$rnd (f3 int) /* slave local */; + let $i=$max_rows; + while ($i) + { + eval insert into t2$rnd values ($i, $i*100); + dec $i; + } + +### Test + +#connection slave; + +# trigger works as specified when updates from slave + eval select * from t2$rnd; + eval UPDATE t1$rnd SET f1=$max_rows where f1=-$max_rows; + eval SELECT * from t1$rnd /* must be f1 $max_rows, 1 - $max_rows 2 - $max_rows ... -1 */; + eval SELECT * from t3$rnd /* must be f3 $max_rows*100 */; + + connection master; + let $i=$max_rows; + while ($i) + { + eval UPDATE t1$rnd SET f1=$i where f1=-$i; + dec $i; + } + + sync_slave_with_master; +#connection slave; + eval SELECT * from t1$rnd /* must be f1 $max_rows ... 1 */; + eval SELECT * from t3$rnd /* must be f3 $max_rows * 100 ... 100 */; + +### CLEANUP +#connection slave; + eval drop trigger trg1$rnd; + eval drop table t2$rnd,t3$rnd; + + connection master; + eval drop table t1$rnd; + + dec $rnd; +} + + +# +# BUG#16266: Definer is not fully qualified error during replication. +# +# The idea of this test is to emulate replication of a trigger from the old +# master (master w/o "DEFINER in triggers" support) to the new slave and check +# that: +# 1. the trigger on the slave will be replicated w/o errors; +# 2. the trigger on the slave will be non-SUID (will have no DEFINER); +# 3. the trigger can be activated later on the slave w/o errors. +# +# In order to emulate this kind of replication, we make the slave playing the binlog, +# recorded by 5.0.16 master. This binlog contains the following statements: +# CREATE TABLE t1(c INT); +# CREATE TABLE t2(s CHAR(200)); +# CREATE TRIGGER trg1 AFTER INSERT ON t1 +# FOR EACH ROW +# INSERT INTO t2 VALUES(CURRENT_USER()); +# INSERT INTO t1 VALUES(1); +# + +# 1. Check that the trigger's replication is succeeded. + +# Stop the slave. + +connection slave; +STOP SLAVE; + +# Replace master's binlog. + +connection master; +FLUSH LOGS; +exec cp $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLTEST_VARDIR/log/master-bin.000001; + +# Make the slave to replay the new binlog. + +connection slave; +RESET SLAVE; +START SLAVE; + +SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0; + +# Check that the replication succeeded. + +SHOW TABLES LIKE 't_'; +SHOW TRIGGERS; +SELECT * FROM t1; +SELECT * FROM t2; + +# 2. Check that the trigger is non-SUID on the slave; +# 3. Check that the trigger can be activated on the slave. + +INSERT INTO t1 VALUES(2); + +SELECT * FROM t1; +SELECT * FROM t2; + +# That's all, cleanup. + +DROP TRIGGER trg1; +DROP TABLE t1; +DROP TABLE t2; + +STOP SLAVE; +RESET SLAVE; + +# The master should be clean. + +connection master; +SHOW TABLES LIKE 't_'; +SHOW TRIGGERS; + +RESET MASTER; + +# Restart slave. + +connection slave; +START SLAVE; + + +# +# BUG#20438: CREATE statements for views, stored routines and triggers can be +# not replicable. +# + +--echo +--echo ---> Test for BUG#20438 + +# Prepare environment. + +--echo +--echo ---> Preparing environment... +--echo ---> connection: master +--connection master + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +--enable_warnings + +--echo +--echo ---> Synchronizing slave with master... + +--save_master_pos +--connection slave +--sync_with_master + +--echo +--echo ---> connection: master +--connection master + +# Test. + +--echo +--echo ---> Creating objects... + +CREATE TABLE t1(c INT); +CREATE TABLE t2(c INT); + +/*!50003 CREATE TRIGGER t1_bi BEFORE INSERT ON t1 + FOR EACH ROW + INSERT INTO t2 VALUES(NEW.c * 10) */; + +--echo +--echo ---> Inserting value... + +INSERT INTO t1 VALUES(1); + +--echo +--echo ---> Checking on master... + +SELECT * FROM t1; +SELECT * FROM t2; + +--echo +--echo ---> Synchronizing slave with master... + +--save_master_pos +--connection slave +--sync_with_master + +--echo ---> connection: master + +--echo +--echo ---> Checking on slave... + +SELECT * FROM t1; +SELECT * FROM t2; + +# Cleanup. + +--echo +--echo ---> connection: master +--connection master + +--echo +--echo ---> Cleaning up... + +DROP TABLE t1; +DROP TABLE t2; + +--save_master_pos +--connection slave +--sync_with_master +--connection master + +# +# BUG#23703: DROP TRIGGER needs an IF EXISTS +# + +connection master; + +--disable_warnings +drop table if exists t1; +--enable_warnings + +create table t1(a int, b varchar(50)); + +-- error ER_TRG_DOES_NOT_EXIST +drop trigger not_a_trigger; + +drop trigger if exists not_a_trigger; + +create trigger t1_bi before insert on t1 +for each row set NEW.b := "In trigger t1_bi"; + +insert into t1 values (1, "a"); +drop trigger if exists t1_bi; +insert into t1 values (2, "b"); +drop trigger if exists t1_bi; +insert into t1 values (3, "c"); + +select * from t1; + +save_master_pos; +connection slave; +sync_with_master; + +select * from t1; + +connection master; + +drop table t1; + +# +# End of tests +# +save_master_pos; +connection slave; +sync_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_trunc_temp.test b/mysql-test/suite/rpl/t/rpl_trunc_temp.test new file mode 100644 index 00000000000..28bcb0c06c3 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_trunc_temp.test @@ -0,0 +1,35 @@ +# Requires statement logging +-- source include/have_binlog_format_mixed_or_statement.inc + +source include/master-slave.inc; + +# +# Bug#17137 Running "truncate table" on temporary table +# leaves the table open on a slave +# + +create temporary table t1 (n int); +insert into t1 values(1); +sync_slave_with_master; +show status like 'Slave_open_temp_tables'; + +# Perform a delete from temp table +connection master; +delete from t1; +sync_slave_with_master; +show status like 'Slave_open_temp_tables'; + +# Perform truncate on temp table +connection master; +truncate t1; +sync_slave_with_master; +show status like 'Slave_open_temp_tables'; + +# Disconnect the master, temp table on slave should dissapear +disconnect master; +--real_sleep 3 # time for DROP to be read by slave +connection slave; +show status like 'Slave_open_temp_tables'; + + +# End of 4.1 tests diff --git a/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test b/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test new file mode 100644 index 00000000000..a0f0ea04f44 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_truncate_2myisam.test @@ -0,0 +1,4 @@ +--source include/not_ndb_default.inc +let $engine=MyISAM; +--source extra/rpl_tests/rpl_truncate.test + diff --git a/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test b/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test new file mode 100644 index 00000000000..a31fd62a29a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_truncate_3innodb.test @@ -0,0 +1,6 @@ + +--source include/have_innodb.inc +--source include/not_ndb_default.inc + +let $engine=InnoDB; +--source extra/rpl_tests/rpl_truncate.test diff --git a/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt b/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt new file mode 100644 index 00000000000..01cf3e0520f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2-master.opt @@ -0,0 +1 @@ +--binlog-format=mixed diff --git a/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test b/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test new file mode 100644 index 00000000000..4ee6c98d463 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_truncate_7ndb_2.test @@ -0,0 +1,6 @@ +# Same test as rpl_truncate_7ndb.test, but with mixed mode +# This is marked with 'big_test' just because the rpl_truncate_7ndb test is +# so slow... + +--source include/big_test.inc +--source t/rpl_truncate_7ndb.test diff --git a/mysql-test/suite/rpl/t/rpl_udf-master.opt b/mysql-test/suite/rpl/t/rpl_udf-master.opt new file mode 100644 index 00000000000..7d8786c156a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_udf-master.opt @@ -0,0 +1 @@ +$UDF_EXAMPLE_LIB_OPT diff --git a/mysql-test/suite/rpl/t/rpl_udf-slave.opt b/mysql-test/suite/rpl/t/rpl_udf-slave.opt new file mode 100644 index 00000000000..7d8786c156a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_udf-slave.opt @@ -0,0 +1 @@ +$UDF_EXAMPLE_LIB_OPT diff --git a/mysql-test/suite/rpl/t/rpl_udf.test b/mysql-test/suite/rpl/t/rpl_udf.test new file mode 100644 index 00000000000..262ad04630c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_udf.test @@ -0,0 +1,22 @@ +################################################################### +# Author: Chuck Bell # +# Date: 2006-12-21 # +# Purpose: To test that UDFs are replicated in both row based and # +# statement based format. This tests work completed in WL#3629. # +################################################################### + +--source include/not_embedded.inc +--source include/master-slave.inc + +let $engine_type= MyISAM; + +set binlog_format=row; + +# Embedded server doesn't support binlogging +--source include/rpl_udf.inc + +set binlog_format=statement; + +# Embedded server doesn't support binlogging +--source include/rpl_udf.inc + diff --git a/mysql-test/suite/rpl/t/rpl_user_variables.test b/mysql-test/suite/rpl/t/rpl_user_variables.test new file mode 100644 index 00000000000..539f9c88e0d --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_user_variables.test @@ -0,0 +1,362 @@ +################################### +# +# Test of replicating user variables +# +################################### + +-- source include/master-slave.inc +# Disable PS as the log positions differs +--disable_ps_protocol + + +# Clean up old slave's binlogs. +# The slave is started with --log-slave-updates +# and this test does SHOW BINLOG EVENTS on the slave's +# binlog. But previous tests can influence the current test's +# binlog (e.g. a temporary table in the previous test has not +# been explicitly deleted, or it has but the slave hasn't had +# enough time to catch it before STOP SLAVE, +# and at the beginning of the current +# test the slave immediately writes DROP TEMPORARY TABLE this_old_table). +# We wait for the slave to have written all he wants to the binlog +# (otherwise RESET MASTER may come too early). +save_master_pos; +connection slave; +sync_with_master; +reset master; +connection master; + +create table t1(n char(30)); +set @i1:=12345678901234, @i2:=-12345678901234, @i3:=0, @i4:=-1; +set @s1:='This is a test', @r1:=12.5, @r2:=-12.5; +set @n1:=null; +set @s2:='', @s3:='abc\'def', @s4:= 'abc\\def', @s5:= 'abc''def'; +insert into t1 values (@i1), (@i2), (@i3), (@i4); +insert into t1 values (@r1), (@r2); +insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5); +insert into t1 values (@n1); +insert into t1 values (@n2); # not explicitely set before +insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1); +insert into t1 values (@a+(@b:=@a+1)); +set @q:='abc'; +insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')); +set @a:=5; +insert into t1 values (@a),(@a); +# To flush the pending event, we add the following statement. RBR can +# concatenate the result of several statements, which SBR cannot. +select * from t1 where n = ''; +connection master1; # see if variable is reset in binlog when thread changes +insert into t1 values (@a),(@a),(@a*5); +SELECT * FROM t1 ORDER BY n; +sync_slave_with_master; +SELECT * FROM t1 ORDER BY n; +connection master; +insert into t1 select * FROM (select @var1 union select @var2) AS t2; +drop table t1; +--echo End of 4.1 tests. + +# BUG#20141 +# The following tests ensure that if user-defined variables are used in SF/Triggers +# that they are replicated correctly. These tests should be run in both SBR and RBR +# modes. + +# This test uses a procedure that inserts data values based on the value of a +# user-defined variable. It also has a trigger that inserts data based on the +# same variable. Successful test runs show that the @var is replicated +# properly and that the procedure and trigger insert the correct data on the +# slave. +# +# The test of stored procedure was included for completeness. Replication of stored +# procedures was not directly affected by BUG#20141. +# +# This test was constructed for BUG#20141 + +--disable_warnings +DROP TABLE IF EXISTS t20; +DROP TABLE IF EXISTS t21; +DROP PROCEDURE IF EXISTS test.insert; +--enable_warnings + +CREATE TABLE t20 (a VARCHAR(20)); +CREATE TABLE t21 (a VARCHAR(20)); +DELIMITER |; + +# Create a procedure that uses the @var for flow control + +CREATE PROCEDURE test.insert() +BEGIN + IF (@VAR) + THEN + INSERT INTO test.t20 VALUES ('SP_TRUE'); + ELSE + INSERT INTO test.t20 VALUES ('SP_FALSE'); + END IF; +END| + +# Create a trigger that uses the @var for flow control + +CREATE TRIGGER test.insert_bi BEFORE INSERT + ON test.t20 FOR EACH ROW + BEGIN + IF (@VAR) + THEN + INSERT INTO test.t21 VALUES ('TRIG_TRUE'); + ELSE + INSERT INTO test.t21 VALUES ('TRIG_FALSE'); + END IF; + END| +DELIMITER ;| + +sync_slave_with_master; +connection master; + +# Set @var and call the procedure, repeat with different values + +SET @VAR=0; +CALL test.insert(); +SET @VAR=1; +CALL test.insert(); + +--echo On master: Check the tables for correct data + +SELECT * FROM t20; +SELECT * FROM t21; + +sync_slave_with_master; + +--echo On slave: Check the tables for correct data and it matches master + +SELECT * FROM t20; +SELECT * FROM t21; +connection master; + +# Cleanup + +DROP TABLE t20; +DROP TABLE t21; +DROP PROCEDURE test.insert; + +# This test uses a stored function that uses user-defined variables to return data +# This test was constructed for BUG#20141 + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP FUNCTION IF EXISTS test.square; +--enable_warnings + +CREATE TABLE t1 (i INT); + +# Create function that returns a value from @var. In this case, the square function + +CREATE FUNCTION test.square() RETURNS INTEGER DETERMINISTIC RETURN +(@var * @var); + +# Set the @var to different values and insert them into a table + +SET @var = 1; +INSERT INTO t1 VALUES (square()); +SET @var = 2; +INSERT INTO t1 VALUES (square()); +SET @var = 3; +INSERT INTO t1 VALUES (square()); +SET @var = 4; +INSERT INTO t1 VALUES (square()); +SET @var = 5; +INSERT INTO t1 VALUES (square()); + +--echo On master: Retrieve the values from the table + +SELECT * FROM t1; + +sync_slave_with_master; + +--echo On slave: Retrieve the values from the table and verify they are the same as on master + +SELECT * FROM t1; + +connection master; + +# Cleanup + +DROP TABLE t1; +DROP FUNCTION test.square; + +# This test uses stored functions that uses user-defined variables to return data +# based on the use of @vars inside a function body. +# This test was constructed for BUG#14914 + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +--enable_warnings + +CREATE TABLE t1(a int); +DELIMITER |; + +# Create a function that simply returns the value of an @var. +# Create a function that uses an @var for flow control, creates and uses another +# @var and sets its value to a value based on another @var. + +CREATE FUNCTION f1() returns int deterministic BEGIN + return @a; +END | + +CREATE FUNCTION f2() returns int deterministic BEGIN + IF (@b > 0) then + SET @c = (@a + @b); + else + SET @c = (@a - 1); + END if; + return @c; +END | +DELIMITER ;| + +sync_slave_with_master; +connection master; + +# Set an @var to a value and insert data into a table using the first function. +# Set two more @vars to some values and insert data into a table using the second function. + +SET @a=500; +INSERT INTO t1 values(f1()); +SET @b = 125; +SET @c = 1; +INSERT INTO t1 values(f2()); + +--echo On master: Retrieve the values from the table + +sync_slave_with_master; +connection master; + +SELECT * from t1; + +connection slave; + +--echo On slave: Check the tables for correct data and it matches master + +SELECT * from t1; + +connection master; + +# Cleanup + +DROP TABLE t1; +DROP FUNCTION f1; +DROP FUNCTION f2; + +# This test uses a function that changes a user-defined variable in its body. This test +# will ensure the @vars are replicated when needed and not interrupt the normal execution +# of the function on the slave. This also applies to procedures and triggers. + +# This test was constructed for BUG#25167 + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +--enable_warnings +CREATE TABLE t1 (i int); +CREATE TABLE t2 (k int); +DELIMITER |; + +# Create a trigger that inserts data into another table, changes the @var then inserts +# another row with the modified value. + +CREATE trigger t1_bi before INSERT on t1 for each row BEGIN + INSERT INTO t2 values (@a); + SET @a:=42; + INSERT INTO t2 values (@a); +END | +DELIMITER ;| + +sync_slave_with_master; +connection master; + +# Set the @var to a value then insert data into first table. + +SET @a:=100; +INSERT INTO t1 values (5); + +--echo On master: Check to see that data was inserted correctly in both tables + +SELECT * from t1; +SELECT * from t2; + +sync_slave_with_master; + +--echo On slave: Check the tables for correct data and it matches master + +SELECT * from t1; +SELECT * from t2; + +connection master; +drop table t1, t2; + +# +# Bug #12826: Possible to get inconsistent slave using SQL syntax Prepared Statements +# +connection master; +create table t1(a int, b int); +prepare s1 from 'insert into t1 values (@x:=@x+1, ?)'; +set @x=1; execute s1 using @x; +select * from t1; +sync_slave_with_master; +connection slave; +select * from t1; +connection master; +drop table t1; + +--echo End of 5.0 tests. + +# This test uses a stored function that uses user-defined variables to return data +# The test ensures the value of the user-defined variable is replicated correctly +# and in the correct order of assignment. + +# This test was constructed for BUG#20141 + +--disable_warnings +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +--enable_warnings + +CREATE TABLE t1 (i INT); + +# Create two functions. One simply returns the user-defined variable. The other +# returns a value based on the user-defined variable. + +CREATE FUNCTION f1() RETURNS INT RETURN @a; DELIMITER |; CREATE +FUNCTION f2() RETURNS INT BEGIN + INSERT INTO t1 VALUES (10 + @a); + RETURN 0; +END| +DELIMITER ;| + +sync_slave_with_master; +connection master; + +# Set the variable and execute the functions. + +SET @a:=123; +SELECT f1(), f2(); + +--echo On master: Check to see that data was inserted correctly + +INSERT INTO t1 VALUES(f1()); +SELECT * FROM t1; + +sync_slave_with_master; + +--echo On slave: Check the table for correct data and it matches master + +SELECT * FROM t1; + +connection master; + +# Cleanup + +DROP FUNCTION f1; +DROP FUNCTION f2; +DROP TABLE t1; + +sync_slave_with_master; +stop slave; diff --git a/mysql-test/suite/rpl/t/rpl_variables-master.opt b/mysql-test/suite/rpl/t/rpl_variables-master.opt new file mode 100644 index 00000000000..a668c6bfbe8 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_variables-master.opt @@ -0,0 +1 @@ +--slave-skip-errors=3,100,137,643,1752 diff --git a/mysql-test/suite/rpl/t/rpl_variables.test b/mysql-test/suite/rpl/t/rpl_variables.test new file mode 100644 index 00000000000..84dc3acfe6e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_variables.test @@ -0,0 +1,20 @@ +source include/master-slave.inc; + +# Init for rstore of variable values +set @my_slave_net_timeout =@@global.slave_net_timeout; + +set global slave_net_timeout=100; +set global sql_slave_skip_counter=100; + +# End of 4.1 tests + +# BUG #7800: Add various-slave related variables to SHOW VARIABLES +show variables like 'slave_compressed_protocol'; +--replace_column 2 SLAVE_LOAD_TMPDIR +show variables like 'slave_load_tmpdir'; +# We just set some arbitrary values in variables-master.opt so we can test +# that a list of values works correctly +show variables like 'slave_skip_errors'; + +# Cleanup +set global slave_net_timeout=default; diff --git a/mysql-test/suite/rpl/t/rpl_view-slave.opt b/mysql-test/suite/rpl/t/rpl_view-slave.opt new file mode 100644 index 00000000000..79b3bf6174b --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_view-slave.opt @@ -0,0 +1 @@ +--replicate-ignore-table=test.foo diff --git a/mysql-test/suite/rpl/t/rpl_view.test b/mysql-test/suite/rpl/t/rpl_view.test new file mode 100644 index 00000000000..51ad319b212 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_view.test @@ -0,0 +1,167 @@ +# NYI - row-based cannot use CREATE ... SELECT + +source include/master-slave.inc; +--disable_warnings +drop table if exists t1,v1; +drop view if exists t1,v1; +sync_slave_with_master; +reset master; +--enable_warnings + +# +# Check that creation drop of view is replicated, also check replication of +# updating of view +# +connection master; +create table t1 (a int); +insert into t1 values (1); +create view v1 as select a from t1; +insert into v1 values (2); +select * from v1 order by a; +sync_slave_with_master; +# view already have to be on slave +select * from v1 order by a; +connection master; +update v1 set a=3 where a=1; +select * from v1 order by a; +sync_slave_with_master; +select * from v1 order by a; +connection master; +delete from v1 where a=2; +select * from v1 order by a; +sync_slave_with_master; +select * from v1 order by a; +connection master; +# 'alter view' internally maped to creation, but still check that it works +alter view v1 as select a as b from t1; +sync_slave_with_master; +select * from v1 order by 1; +connection master; +drop view v1; +sync_slave_with_master; +#error, because view have to be removed from slave +-- error 1146 +select * from v1 order by a; +connection master; +drop table t1; +sync_slave_with_master; +# Change Author: JBM +# Change Date: 2005-12-22 +# Change: Commented out binlog events to work with SBR and RBR +#--replace_column 2 # 5 # +# show binlog events limit 1,100; + +# +# BUG#20438: CREATE statements for views, stored routines and triggers can be +# not replicable. +# + +--echo +--echo ---> Test for BUG#20438 + +# Prepare environment. + +--echo +--echo ---> Preparing environment... +--echo ---> connection: master +--connection master + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +--enable_warnings + +--echo +--echo ---> Synchronizing slave with master... + +--save_master_pos +--connection slave +--sync_with_master + +--echo +--echo ---> connection: master +--connection master + +# Test. + +--echo +--echo ---> Creating objects... + +CREATE TABLE t1(c INT); + +/*!50003 CREATE VIEW v1 AS SELECT * FROM t1 */; + +--echo +--echo ---> Inserting value... + +INSERT INTO t1 VALUES(1); + +--echo +--echo ---> Checking on master... + +SELECT * FROM t1; + +--echo +--echo ---> Synchronizing slave with master... + +--save_master_pos +--connection slave +--sync_with_master + +--echo ---> connection: master + +--echo +--echo ---> Checking on slave... + +SELECT * FROM t1; + +# Cleanup. + +--echo +--echo ---> connection: master +--connection master + +--echo +--echo ---> Cleaning up... + +DROP VIEW v1; +DROP TABLE t1; + +--save_master_pos +--connection slave +--sync_with_master +--connection master + +# +# BUG#19419: "VIEW: View that the column name is different +# by master and slave is made". +# +connection master; +create table t1(a int, b int); +insert into t1 values (1, 1), (1, 2), (1, 3); +create view v1(a, b) as select a, sum(b) from t1 group by a; + +sync_slave_with_master; +explain v1; +show create table v1; +select * from v1; + +connection master; +drop table t1; +drop view v1; + +sync_slave_with_master; + +# +# BUG#28244 CREATE VIEW breaks replication when view exists +# +connection master; +CREATE TABLE t1(a INT); +CREATE VIEW v1 AS SELECT * FROM t1; +--error ER_TABLE_EXISTS_ERROR +CREATE VIEW v1 AS SELECT * FROM t1; +DROP VIEW v1; +DROP TABLE t1; +sync_slave_with_master; + +--echo End of 5.0 tests diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result new file mode 100644 index 00000000000..f8ec4624062 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result @@ -0,0 +1,855 @@ +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; +--- Doing pre test cleanup --- +DROP TABLE IF EXISTS t1; +--- Start test 1 Basic testing --- +--- Create Table Section --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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` bit(8) 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 PARTITION BY KEY () +--- Show table on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly -- +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +ALTER TABLE t1 MODIFY vc TEXT; +--- 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` bit(8) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () +--- 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` bit(8) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 1 Basic testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 2 partition RANGE testing -- +--- Do setup -- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY RANGE (YEAR(t)) +(PARTITION p0 VALUES LESS THAN (1901), +PARTITION p1 VALUES LESS THAN (1946), +PARTITION p2 VALUES LESS THAN (1966), +PARTITION p3 VALUES LESS THAN (1986), +PARTITION p4 VALUES LESS THAN (2005), +PARTITION p5 VALUES LESS THAN MAXVALUE); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) +--- Show table on slave -- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(t,id); +ALTER TABLE t1 MODIFY vc TEXT; +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 2 partition RANGE testing --- +--- Do Cleanup --- +DROP TABLE IF EXISTS t1; +--- Start test 3 partition LIST testing --- +--- Do setup --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY LIST(id) +(PARTITION p0 VALUES IN (2, 4), +PARTITION p1 VALUES IN (42, 142)); +--- Test 3 Alter to add partition --- +ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) +--- Show table on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, PARTITION p2 VALUES IN (412) ENGINE = InnoDB) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(id); +ALTER TABLE t1 MODIFY vc TEXT; +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, PARTITION p2 VALUES IN (412) ENGINE = InnoDB) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 3 partition LIST testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 4 partition HASH testing --- +--- Do setup --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY HASH( YEAR(t) ) +PARTITIONS 4; +--- show that tables have been created correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(t,id); +ALTER TABLE t1 MODIFY vc TEXT; +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 4 partition HASH testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 5 partition by key testing --- +--- Create Table Section --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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)) +PARTITION BY KEY() +PARTITIONS 4; +--- Show that tables on master are ndbcluster tables --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 PARTITION BY KEY () PARTITIONS 4 +--- Show that tables on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 PARTITION BY KEY () PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +--- 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` bit(8) 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 NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Make sure that our tables on slave are still right type --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 MODIFY vc TEXT; +--- 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` bit(8) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- 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` bit(8) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 5 key partition testing --- +--- Do Cleanup --- +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result new file mode 100644 index 00000000000..8611d83f3f3 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result @@ -0,0 +1,855 @@ +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; +--- Doing pre test cleanup --- +DROP TABLE IF EXISTS t1; +--- Start test 1 Basic testing --- +--- Create Table Section --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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` bit(8) 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` bit(8) 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 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly -- +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +ALTER TABLE t1 MODIFY vc TEXT; +--- 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` bit(8) 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, + PRIMARY KEY (`id`,`total`) +) 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` bit(8) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 1 Basic testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 2 partition RANGE testing -- +--- Do setup -- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY RANGE (YEAR(t)) +(PARTITION p0 VALUES LESS THAN (1901), +PARTITION p1 VALUES LESS THAN (1946), +PARTITION p2 VALUES LESS THAN (1966), +PARTITION p3 VALUES LESS THAN (1986), +PARTITION p4 VALUES LESS THAN (2005), +PARTITION p5 VALUES LESS THAN MAXVALUE); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) +--- Show table on slave -- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(t,id); +ALTER TABLE t1 MODIFY vc TEXT; +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 2 partition RANGE testing --- +--- Do Cleanup --- +DROP TABLE IF EXISTS t1; +--- Start test 3 partition LIST testing --- +--- Do setup --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY LIST(id) +(PARTITION p0 VALUES IN (2, 4), +PARTITION p1 VALUES IN (42, 142)); +--- Test 3 Alter to add partition --- +ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) +--- Show table on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(id); +ALTER TABLE t1 MODIFY vc TEXT; +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 3 partition LIST testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 4 partition HASH testing --- +--- Do setup --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY HASH( YEAR(t) ) +PARTITIONS 4; +--- show that tables have been created correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(t,id); +ALTER TABLE t1 MODIFY vc TEXT; +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +--- 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` bit(8) DEFAULT NULL, + `vc` text, + `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 NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 4 partition HASH testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 5 partition by key testing --- +--- Create Table Section --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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)) +PARTITION BY KEY() +PARTITIONS 4; +--- Show that tables on master are ndbcluster tables --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 PARTITION BY KEY () PARTITIONS 4 +--- Show that tables on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 PARTITION BY KEY () PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +--- 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` bit(8) 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 NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Make sure that our tables on slave are still right type --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) 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 NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 MODIFY vc TEXT; +--- 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` bit(8) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- 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` bit(8) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 5 key partition testing --- +--- Do Cleanup --- +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result new file mode 100644 index 00000000000..422379d4f55 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result @@ -0,0 +1,40 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, vchar_column VARCHAR(100), PRIMARY KEY(a)) engine=NDB; +INSERT INTO test.t1 VALUES(1,UUID(),UUID()); +create procedure test.p1() +begin +INSERT INTO test.t1 VALUES(2,UUID(),UUID()); +INSERT INTO test.t1 VALUES(3,UUID(),UUID()); +end| +CALL test.p1(); +create function test.fn1(x int) +returns int +begin +insert into t1 values (4+x,UUID(),UUID()); +insert into t1 values (5+x,UUID(),UUID()); +return 0; +end| +select fn1(0); +fn1(0) +0 +create table t2 (a int); +insert into t2 values(fn1(2)); +SHOW CREATE TABLE test.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL DEFAULT '0', + `blob_column` longblob, + `vchar_column` varchar(100) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +DROP PROCEDURE test.p1; +DROP FUNCTION test.fn1; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result new file mode 100644 index 00000000000..dd4cc90a75f --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_auto_inc.result @@ -0,0 +1,170 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +***************** Test 1 ************************ + +CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; +insert into t1 values (NULL,1),(NULL,2),(NULL,3); +******* Select from Master ************* + +select * from t1 ORDER BY a; +a b +3 1 +4 2 +5 3 +******* Select from Slave ************* + +select * from t1 ORDER BY a; +a b +3 1 +4 2 +5 3 +drop table t1; +create table t1 (a int not null auto_increment,b int, primary key (a)) engine=NDB; +insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); +delete from t1 where b=4; +insert into t1 values (NULL,5),(NULL,6); +******* Select from Master ************* + +select * from t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +5 5 +6 6 +******* Select from Slave ************* + +select * from t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +5 5 +6 6 +drop table t1; +create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; +insert into t1 values (NULL),(5),(NULL); +insert into t1 values (250),(NULL); +******* Select from Master ************* + +select * from t1 ORDER BY a; +a +1 +5 +6 +250 +251 +insert into t1 values (1000); +set @@insert_id=400; +insert into t1 values(NULL),(NULL); +******* Select from Master ************* + +select * from t1 ORDER BY a; +a +1 +5 +6 +250 +251 +400 +401 +1000 +******* Select from Slave ************* + +select * from t1 ORDER BY a; +a +1 +5 +6 +250 +251 +400 +401 +1000 +drop table t1; +create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; +insert into t1 values (NULL),(5),(NULL),(NULL); +insert into t1 values (500),(NULL),(502),(NULL),(600); +******* Select from Master ************* + +select * from t1 ORDER BY a; +a +1 +5 +6 +7 +500 +501 +502 +503 +600 +set @@insert_id=600; +insert into t1 values(600),(NULL),(NULL); +ERROR 23000: Can't write; duplicate key in table 't1' +set @@insert_id=600; +insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); +******* Select from Master ************* + +select * from t1 ORDER BY a; +a +1 +5 +6 +7 +500 +501 +502 +503 +600 +610 +611 +******* Select from Slave ************* + +select * from t1 ORDER BY a; +a +1 +5 +6 +7 +500 +501 +502 +503 +600 +610 +611 +drop table t1; +create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; +insert into t1 values(2),(12),(22),(32),(42); +insert into t1 values (NULL),(NULL); +insert into t1 values (3),(NULL),(NULL); +******* Select from Master ************* + +select * from t1 ORDER BY a; +a +1 +2 +3 +4 +5 +******* Select from Slave ************* + +** Slave should have 2, 12, 22, 32, 42 ** +** Master will have 2 but not 12, 22, 32, 42 ** + +select * from t1 ORDER BY a; +a +1 +2 +3 +4 +5 +12 +22 +32 +42 +drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result new file mode 100644 index 00000000000..06c005427d1 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_bank.result @@ -0,0 +1,120 @@ +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; +CREATE DATABASE IF NOT EXISTS BANK; +DROP DATABASE BANK; +CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; +USE BANK; +CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, +ACCOUNT_TYPE INT UNSIGNED NOT NULL, +BALANCE INT UNSIGNED NOT NULL, +DEPOSIT_COUNT INT UNSIGNED NOT NULL, +DEPOSIT_SUM INT UNSIGNED NOT NULL, +WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, +WITHDRAWAL_SUM INT UNSIGNED NOT NULL, +PURGED INT UNSIGNED NOT NULL, +PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) +ENGINE = NDB; +CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, +OWNER INT UNSIGNED NOT NULL, +BALANCE INT UNSIGNED NOT NULL, +ACCOUNT_TYPE INT UNSIGNED NOT NULL, +PRIMARY KEY USING HASH (ACCOUNT_ID)) +ENGINE = NDB; +CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, +ACCOUNT INT UNSIGNED NOT NULL, +ACCOUNT_TYPE INT UNSIGNED NOT NULL, +OTHER_ACCOUNT INT UNSIGNED NOT NULL, +TRANSACTION_TYPE INT UNSIGNED NOT NULL, +TIME BIGINT UNSIGNED NOT NULL, +AMOUNT INT UNSIGNED NOT NULL, +PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) +ENGINE = NDB; +CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, +VALUE BIGINT UNSIGNED NOT NULL, +PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) +ENGINE = NDB; +CREATE TABLE ACCOUNT_TYPE ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, +DESCRIPTION CHAR(64) NOT NULL, +PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) +ENGINE = NDB; +STOP SLAVE; +RESET SLAVE; +CREATE DATABASE IF NOT EXISTS BANK; +DROP DATABASE BANK; +CREATE DATABASE BANK; +RESET MASTER; +CREATE TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM mysql.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM mysql.backup_info; +@the_backup_id:=backup_id + +SELECT @the_epoch:=MAX(epoch) FROM mysql.apply_status; +@the_epoch:=MAX(epoch) + +SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) +FROM mysql.binlog_index WHERE epoch > ORDER BY epoch ASC LIMIT 1; +@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) + master-bin.000001 +CHANGE MASTER TO +master_log_file = 'master-bin.000001', +master_log_pos = ; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +STOP SLAVE; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +STOP SLAVE; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +STOP SLAVE; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +STOP SLAVE; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +STOP SLAVE; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +STOP SLAVE; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +STOP SLAVE; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +STOP SLAVE; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +STOP SLAVE; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +STOP SLAVE; +START SLAVE; +use test; +create table t1 (a int primary key) engine=ndb; +insert into t1 values (1); +drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result new file mode 100644 index 00000000000..37217bf0ad1 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result @@ -0,0 +1,227 @@ +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; +CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', +`nom` char(4) default NULL, +`prenom` char(4) default NULL, +PRIMARY KEY (`nid`)) +ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); +select * from t1 order by nid; +nid nom prenom +1 XYZ1 ABC1 +select * from t1 order by nid; +nid nom prenom +1 XYZ1 ABC1 +delete from t1; +INSERT INTO t1 VALUES(1,"XYZ2","ABC2"); +select * from t1 order by nid; +nid nom prenom +1 XYZ2 ABC2 +select * from t1 order by nid; +nid nom prenom +1 XYZ2 ABC2 +delete from t1; +insert into t1 values(1,"AA", "AA"); +insert into t1 values(2,"BB", "BB"); +insert into t1 values(3,"CC", "CC"); +insert into t1 values(4,"DD", "DD"); +begin; +delete from t1 where nid = 1; +insert into t1 values (1,"A2", "A2"); +update t1 set nom="B2" where nid = 2; +delete from t1 where nid = 2; +update t1 set nom = "D2" where nid = 4; +delete from t1 where nid = 4; +insert into t1 values (4, "D3", "D3"); +update t1 set nom = "D4" where nid = 4; +insert into t1 values (5, "EE", "EE"); +delete from t1 where nid = 5; +commit; +select * from t1 order by 1; +nid nom prenom +1 A2 A2 +3 CC CC +4 D4 D3 +select * from t1 order by 1; +nid nom prenom +1 A2 A2 +3 CC CC +4 D4 D3 +DROP table t1; +CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', +`nom` char(4) default NULL, +`prenom` char(4) default NULL) +ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES(1,"XYZ1","ABC1"),(2,"AAA","BBB"),(3,"CCC","DDD"); +select * from t1 order by nid; +nid nom prenom +1 XYZ1 ABC1 +2 AAA BBB +3 CCC DDD +select * from t1 order by nid; +nid nom prenom +1 XYZ1 ABC1 +2 AAA BBB +3 CCC DDD +delete from t1 where nid = 2; +INSERT INTO t1 VALUES(4,"EEE","FFF"); +select * from t1 order by nid; +nid nom prenom +1 XYZ1 ABC1 +3 CCC DDD +4 EEE FFF +select * from t1 order by nid; +nid nom prenom +1 XYZ1 ABC1 +3 CCC DDD +4 EEE FFF +UPDATE t1 set nid=nid+1; +UPDATE t1 set nom="CCP" where nid = 4; +select * from t1 order by nid; +nid nom prenom +2 XYZ1 ABC1 +4 CCP DDD +5 EEE FFF +select * from t1 order by nid; +nid nom prenom +2 XYZ1 ABC1 +4 CCP DDD +5 EEE FFF +DROP table t1; +CREATE TABLE `t1` ( +`prid` int(10) unsigned NOT NULL, +`id_type` enum('IMSI','SIP') NOT NULL, +`fkimssub` varchar(50) NOT NULL, +`user_id` varchar(20) DEFAULT NULL, +`password` varchar(20) DEFAULT NULL, +`ptg_nbr` varchar(20) DEFAULT NULL, +`old_tmsi` int(10) unsigned DEFAULT NULL, +`new_tmsi` int(10) unsigned DEFAULT NULL, +`dev_capability` int(10) unsigned DEFAULT NULL, +`dev_oid` bigint(20) unsigned DEFAULT NULL, +`lac_cell_id` bigint(20) unsigned DEFAULT NULL, +`ms_classmark1` int(10) unsigned DEFAULT NULL, +`cipher_key` int(10) unsigned DEFAULT NULL, +`priid_master` int(10) unsigned DEFAULT NULL, +PRIMARY KEY (`prid`), +UNIQUE KEY `fkimssub` (`fkimssub`,`ptg_nbr`) USING HASH +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; +Warnings: +Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan +INSERT INTO `t1` VALUES (183342,'IMSI','config3_sub_2Privates_3Publics_imssub_36668','user_id_73336','user_id_73336','73336',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(47617,'IMSI','config3_sub_2Privates_3Publics_imssub_9523','user_id_19046','user_id_19046','19046',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(200332,'IMSI','config3_sub_2Privates_3Publics_imssub_40066','user_id_80132','user_id_80132','80132',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(478882,'IMSI','config3_sub_2Privates_3Publics_imssub_95776','user_id_191552','user_id_191552','191552',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(490146,'IMSI','config3_sub_2Privates_3Publics_imssub_98029','user_id_196057','user_id_196057','196057',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(499301,'IMSI','config3_sub_2Privates_3Publics_imssub_99860','user_id_199719','user_id_199719','199719',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(506101,'IMSI','config3_sub_2Privates_3Publics_imssub_101220','user_id_202439','user_id_202439','202439',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(510142,'IMSI','config3_sub_2Privates_3Publics_imssub_102028','user_id_204056','user_id_204056','204056',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(515871,'IMSI','config3_sub_2Privates_3Publics_imssub_103174','user_id_206347','user_id_206347','206347',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(209842,'IMSI','config3_sub_2Privates_3Publics_imssub_41968','user_id_83936','user_id_83936','83936',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(365902,'IMSI','config3_sub_2Privates_3Publics_imssub_73180','user_id_146360','user_id_146360','146360',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(11892,'IMSI','config3_sub_2Privates_3Publics_imssub_2378','user_id_4756','user_id_4756','4756',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL); +select count(*) from t1; +count(*) +12 +select count(*) from t1; +count(*) +12 +update t1 set dev_oid=dev_oid+1; +select count(*) from t1; +count(*) +12 +select count(*) from t1; +count(*) +12 +DROP table t1; +CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', +`nom` char(4) default NULL, +`prenom` char(4) default NULL, +PRIMARY KEY USING HASH (`nid`)) +ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); +**** On Slave **** +BEGIN; +UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; +set GLOBAL slave_transaction_retries=1; +**** On Master **** +UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; +**** On Slave **** +SHOW SLAVE STATUS;; +Slave_IO_State +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos +Relay_Log_File +Relay_Log_Pos +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos +Relay_Log_Space +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master +Master_SSL_Verify_Server_Cert No +set GLOBAL slave_transaction_retries=10; +START SLAVE; +select * from t1 order by nid; +nid nom prenom +1 LOCK ABC1 +COMMIT; +select * from t1 order by nid; +nid nom prenom +1 DEAD ABC1 +DROP TABLE t1; +CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB; +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +ALTER TABLE t1 ADD c2 INT; +SELECT * FROM t1 ORDER BY c1; +c1 c2 +1 NULL +2 NULL +3 NULL +4 NULL +5 NULL +6 NULL +7 NULL +8 NULL +9 NULL +10 NULL +ALTER TABLE t1 CHANGE c2 c2 TEXT CHARACTER SET utf8; +ALTER TABLE t1 CHANGE c2 c2 BLOB; +SELECT * FROM t1 ORDER BY c1 LIMIT 5; +c1 c2 +1 NULL +2 NULL +3 NULL +4 NULL +5 NULL +TRUNCATE t1; +SELECT count(*) FROM t1; +count(*) +0 +INSERT INTO t1 VALUES (101,NULL),(102,NULL),(103,NULL),(104,NULL),(105,NULL),(106,NULL),(107,NULL),(108,NULL),(109,NULL),(1010,NULL); +SELECT count(*) FROM t1; +count(*) +10 +SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; +c1 +101 +102 +103 +104 +105 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result new file mode 100644 index 00000000000..c11de8c27e3 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob.result @@ -0,0 +1,135 @@ +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; +create table t1 ( +a int not null primary key, +b text not null +) engine=ndb; +insert into t1 values(1, repeat('abc',10)); +insert into t1 values(2, repeat('def',200)); +insert into t1 values(3, repeat('ghi',3000)); +select 'M', a, sha1(b) from t1 +order by a; +M a sha1(b) +M 1 8a6c4cf7cf97e66c487c3e3b717e9ae13623d07d +M 2 0ccd08c0fa6ad6a4382b27b1d36586d6ceb4fffa +M 3 75e7b3299e0b776aeac2a4d1542d5b3c0ba2e05e +select 'S', a, sha1(b) from t1 +order by a; +S a sha1(b) +S 1 8a6c4cf7cf97e66c487c3e3b717e9ae13623d07d +S 2 0ccd08c0fa6ad6a4382b27b1d36586d6ceb4fffa +S 3 75e7b3299e0b776aeac2a4d1542d5b3c0ba2e05e +drop table t1; +create table t1 ( +a int not null primary key, +b text not null, +c int, +d longblob, +e tinyblob +) engine=ndbcluster; +insert into t1 values ( +0, repeat(@s2,454), 100, repeat(@s2,345), NULL); +insert into t1 values ( +1, repeat(@s0,504), NULL, repeat(@s1,732), repeat(@s1,1)); +insert into t1 values ( +2, '', 102, '', repeat(@s2,1)); +insert into t1 values ( +3, repeat(@s0,545), 103, repeat(@s2,788), repeat(@s0,1)); +insert into t1 values ( +4, repeat(@s1,38), 104, repeat(@s0,260), repeat(@s0,1)); +insert into t1 values ( +5, repeat(@s2,12), 105, repeat(@s2,40), repeat(@s1,1)); +insert into t1 values ( +6, repeat(@s1,242), 106, NULL, repeat(@s1,1)); +insert into t1 values ( +7, repeat(@s1,30), 107, repeat(@s0,161), ''); +insert into t1 values ( +8, repeat(@s1,719), 108, repeat(@s2,104), NULL); +insert into t1 values ( +9, repeat(@s2,427), NULL, NULL, NULL); +select 'M', a, sha1(b), c, sha1(d), sha1(e) +from t1 order by a; +M a sha1(b) c sha1(d) sha1(e) +M 0 9538f61e649383c0d1054de2a2f0171188129f33 100 2b6515f29c20b8e9e17cc597527e516c0de8d612 NULL +M 1 dcb9a12ca86e718ff2564be041b7c1b3ff5ea559 NULL f23e7439d9a73c3954979b85a7ef6ef35faf4e9d abfe8ae5212b22d023aa6de84beeb1344ac5668a +M 2 da39a3ee5e6b4b0d3255bfef95601890afd80709 102 da39a3ee5e6b4b0d3255bfef95601890afd80709 33deebe47470a40e960834bffa4cdc66790845a6 +M 3 ec8e06d9ac4695d6a898b519ba840590263a9bff 103 278629ad080c3c4377978c006c2e54d0992e43cc 700915801f853603510aeb67b331866d996fdbda +M 4 0392fa8c425d293c79291f0f34779d1101d13fcb 104 5084b602c7203e0e9590a163415ac605da17ac32 700915801f853603510aeb67b331866d996fdbda +M 5 0f9653f0c7a69cd1c617792d546582e974a7a24d 105 566588a04ff26d05160d61c83435292bfda2978e abfe8ae5212b22d023aa6de84beeb1344ac5668a +M 6 a37e8b0ff4fc13a42be02cdecb36186436959bae 106 NULL abfe8ae5212b22d023aa6de84beeb1344ac5668a +M 7 a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f 107 39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8 da39a3ee5e6b4b0d3255bfef95601890afd80709 +M 8 e139adcb7b2974ee7ff227fd405709e5cb7c896c 108 ba8073b0e1a281d4111bd2d82c7722b01574c00b NULL +M 9 1fc5168fe4be566b17b658d94e7813f0b5032cdb NULL NULL NULL +select 'S', a, sha1(b), c, sha1(d), sha1(e) +from t1 order by a; +S a sha1(b) c sha1(d) sha1(e) +S 0 9538f61e649383c0d1054de2a2f0171188129f33 100 2b6515f29c20b8e9e17cc597527e516c0de8d612 NULL +S 1 dcb9a12ca86e718ff2564be041b7c1b3ff5ea559 NULL f23e7439d9a73c3954979b85a7ef6ef35faf4e9d abfe8ae5212b22d023aa6de84beeb1344ac5668a +S 2 da39a3ee5e6b4b0d3255bfef95601890afd80709 102 da39a3ee5e6b4b0d3255bfef95601890afd80709 33deebe47470a40e960834bffa4cdc66790845a6 +S 3 ec8e06d9ac4695d6a898b519ba840590263a9bff 103 278629ad080c3c4377978c006c2e54d0992e43cc 700915801f853603510aeb67b331866d996fdbda +S 4 0392fa8c425d293c79291f0f34779d1101d13fcb 104 5084b602c7203e0e9590a163415ac605da17ac32 700915801f853603510aeb67b331866d996fdbda +S 5 0f9653f0c7a69cd1c617792d546582e974a7a24d 105 566588a04ff26d05160d61c83435292bfda2978e abfe8ae5212b22d023aa6de84beeb1344ac5668a +S 6 a37e8b0ff4fc13a42be02cdecb36186436959bae 106 NULL abfe8ae5212b22d023aa6de84beeb1344ac5668a +S 7 a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f 107 39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8 da39a3ee5e6b4b0d3255bfef95601890afd80709 +S 8 e139adcb7b2974ee7ff227fd405709e5cb7c896c 108 ba8073b0e1a281d4111bd2d82c7722b01574c00b NULL +S 9 1fc5168fe4be566b17b658d94e7813f0b5032cdb NULL NULL NULL +drop table t1; +CREATE TABLE IF NOT EXISTS t1 ( +db VARBINARY(63) NOT NULL, +name VARBINARY(63) NOT NULL, +slock BINARY(32) NOT NULL, +query BLOB NOT NULL, +node_id INT UNSIGNED NOT NULL, +epoch BIGINT UNSIGNED NOT NULL, +id INT UNSIGNED NOT NULL, +version INT UNSIGNED NOT NULL, +type INT UNSIGNED NOT NULL, +PRIMARY KEY USING HASH (db,name)) +ENGINE=NDB; +insert into t1 values ('test','t1', +'abc',repeat(@s0,10), 11,12,13,14,15); +insert into t1 values ('test','t2', +'def',repeat(@s1,100), 21,22,23,24,25); +insert into t1 values ('test','t3', +'ghi',repeat(@s2,1000),31,32,33,34,35); +insert into t1 values ('testtttttttttt','t1', +'abc',repeat(@s0,10), 11,12,13,14,15); +insert into t1 values ('testttttttttttt','t1', +'def',repeat(@s1,100), 21,22,23,24,25); +insert into t1 values ('testtttttttttttt','t1', +'ghi',repeat(@s2,1000),31,32,33,34,35); +insert into t1 values ('t','t11111111111', +'abc',repeat(@s0,10), 11,12,13,14,15); +insert into t1 values ('t','t111111111111', +'def',repeat(@s1,100), 21,22,23,24,25); +insert into t1 values ('t','t1111111111111', +'ghi',repeat(@s2,1000),31,32,33,34,35); +select 'M', db, name, sha1(query), node_id, epoch, id, version, type +from t1 order by db, name; +M db name sha1(query) node_id epoch id version type +M t t11111111111 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 +M t t111111111111 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 +M t t1111111111111 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 +M test t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 +M test t2 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 +M test t3 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 +M testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 +M testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 +M testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 +select 'S', db, name, sha1(query), node_id, epoch, id, version, type +from t1 order by db, name; +S db name sha1(query) node_id epoch id version type +S t t11111111111 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 +S t t111111111111 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 +S t t1111111111111 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 +S test t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 +S test t2 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 +S test t3 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 +S testtttttttttt t1 8fc937d303ee7e4795c0b964d4066cedd6d74cfd 11 12 13 14 15 +S testttttttttttt t1 a5229e9f8977bc99afc3b3627c56f083e97e01bd 21 22 23 24 25 +S testtttttttttttt t1 0820e6ad3eeb06ea60e5e04d0bfe36f286b91098 31 32 33 34 35 +drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result new file mode 100644 index 00000000000..055efffbd6a --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result @@ -0,0 +1,156 @@ +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; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +***** Table Create Section **** + +CREATE TABLE test.t1 (c1 int not null auto_increment, +data LONGBLOB, PRIMARY KEY(c1))ENGINE=#; + +**** Data Insert Section test.t1 ***** + +INSERT INTO test.t1 VALUES (NULL, NULL); +INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024)); +INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024)); + +**** Data Insert Validation Master Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +NULL +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; +LENGTH(data) +16384 + +**** Data Insert Validation Slave Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +NULL +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +1024 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3; +LENGTH(data) +16384 + +**** Data Update Section test.t1 **** + +UPDATE test.t1 set data=repeat('a',18*1024) where c1 = 1; +UPDATE t1 set data=repeat('c',17*1024) where c1 = 2; + +**** Data Update Validation Master Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +18432 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +17408 + +**** Data Update Validation Slave Section test.t1 **** + +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1; +LENGTH(data) +18432 +SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2; +LENGTH(data) +17408 + +**** End Test Section test.t1 **** + +**** Create Table test.t2 **** + +CREATE TABLE test.t2 ( +c1 INT NOT NULL PRIMARY KEY, +c2 TEXT, +c3 INT, +c4 LONGBLOB, +KEY(c3))ENGINE=#; + +*** Setup Values For test.t2 *** +set @x0 = '01234567012345670123456701234567'; +set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +set @b1 = concat(@b1,@x0); +set @d1 = 'dd1'; +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); +set @b2 = 'b2'; +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); +set @d2 = 'dd2'; +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); +set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); + +**** Data Insert Section test.t2 ***** + +INSERT INTO test.t2 VALUES(1,@b1,111,@d1); +INSERT INTO test.t2 VALUES(2,@b2,222,@d2); + +**** Data Insert Validation Master Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 2256 b1 3000 dd1 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 20000 b2 30000 dd2 + +**** Data Insert Validation Slave Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 2256 b1 3000 dd1 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 20000 b2 30000 dd2 + +**** Data Update Section test.t2 **** + +UPDATE test.t2 SET c2=@b2, c4=@d2 WHERE c1=1; +UPDATE test.t2 SET c2=@b1, c4=@d1 WHERE c1=2; + +**** Data Update Validation Master Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 20000 b2 30000 dd2 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 2256 b1 3000 dd1 + +**** Data Update Validation Slave Section test.t2 **** + +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=1; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +1 20000 b2 30000 dd2 +SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3) +FROM test.t2 WHERE c1=2; +c1 LENGTH(c2) SUBSTR(c2,1+2*900,2) LENGTH(c4) SUBSTR(c4,1+3*900,3) +2 2256 b1 3000 dd1 + +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result new file mode 100644 index 00000000000..ed9b3cfbfa8 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result @@ -0,0 +1,201 @@ +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 timestamp=1000000000; +drop database if exists mysqltest2; +drop database if exists mysqltest3; +create database mysqltest2 character set latin2; +set @@character_set_server=latin5; +create database mysqltest3; + +--- --master-- +show create database mysqltest2; +Database Create Database +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ + +--- --slave-- +show create database mysqltest2; +Database Create Database +mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin2 */ +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin5 */ +set @@collation_server=armscii8_bin; +drop database mysqltest3; +create database mysqltest3; + +--- --master-- +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ + +--- --slave-- +show create database mysqltest3; +Database Create Database +mysqltest3 CREATE DATABASE `mysqltest3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */ +use mysqltest2; +create table t1 (a int auto_increment primary key, b varchar(100)); +set character_set_client=cp850, collation_connection=latin2_croatian_ci; +insert into t1 (b) values(@@character_set_server); +insert into t1 (b) values(@@collation_server); +insert into t1 (b) values(@@character_set_client); +insert into t1 (b) values(@@character_set_connection); +insert into t1 (b) values(@@collation_connection); + +--- --master-- +select * from t1 order by a; +a b +1 armscii8 +2 armscii8_bin +3 cp850 +4 latin2 +5 latin2_croatian_ci + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 armscii8 +2 armscii8_bin +3 cp850 +4 latin2 +5 latin2_croatian_ci +select "--- --muller--" as ""; + +--- --muller-- +set character_set_client=latin1, collation_connection=latin1_german1_ci; +truncate table t1; +insert into t1 (b) values(@@collation_connection); +insert into t1 (b) values(LEAST("Müller","Muffler")); +set collation_connection=latin1_german2_ci; +insert into t1 (b) values(@@collation_connection); +insert into t1 (b) values(LEAST("Müller","Muffler")); + +--- --master-- +select * from t1 order by a; +a b +1 latin1_german1_ci +2 Muffler +3 latin1_german2_ci +4 Müller + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 latin1_german1_ci +2 Muffler +3 latin1_german2_ci +4 Müller +select "--- --INSERT--" as ""; + +--- --INSERT-- +set @a= _cp850 'Müller' collate cp850_general_ci; +truncate table t1; +insert into t1 (b) values(collation(@a)); + +--- --master-- +select * from t1 order by a; +a b +1 cp850_general_ci + +--- --slave-- +select * from mysqltest2.t1 order by a; +a b +1 cp850_general_ci +drop database mysqltest2; +drop database mysqltest3; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # drop database if exists mysqltest2 +master-bin.000001 # Query # # drop database if exists mysqltest3 +master-bin.000001 # Query # # create database mysqltest2 character set latin2 +master-bin.000001 # Query # # create database mysqltest3 +master-bin.000001 # Query # # drop database mysqltest3 +master-bin.000001 # Query # # create database mysqltest3 +master-bin.000001 # Query # # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest2`; truncate table t1 +master-bin.000001 # Table_map # # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # drop database mysqltest2 +master-bin.000001 # Query # # drop database mysqltest3 +select "--- --global--" as ""; + +--- --global-- +set global character_set_server=latin2; +set global character_set_server=latin1; +set global character_set_server=latin2; +set global character_set_server=latin1; +select "--- --oneshot--" as ""; + +--- --oneshot-- +set one_shot @@character_set_server=latin5; +set @@max_join_size=1000; +select @@character_set_server; +@@character_set_server +latin5 +select @@character_set_server; +@@character_set_server +latin1 +set @@character_set_server=latin5; +select @@character_set_server; +@@character_set_server +latin5 +select @@character_set_server; +@@character_set_server +latin5 +set one_shot max_join_size=10; +ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server +set character_set_client=9999999; +ERROR 42000: Unknown character set: '9999999' +set collation_server=9999998; +ERROR HY000: Unknown collation: '9999998' +select "--- --3943--" as ""; + +--- --3943-- +use test; +CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); +SET CHARACTER_SET_CLIENT=koi8r, +CHARACTER_SET_CONNECTION=cp1251, +CHARACTER_SET_RESULTS=koi8r; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); +select hex(c1), hex(c2) from t1; +hex(c1) hex(c2) +CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +select hex(c1), hex(c2) from t1; +hex(c1) hex(c2) +CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +drop table t1; +select "--- --6676--" as ""; + +--- --6676-- +create table `t1` ( +`pk` varchar(10) not null default '', +primary key (`pk`) +) engine=NDB default charset=latin1; +set @p=_latin1 'test'; +update t1 set pk='test' where pk=@p; +drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result new file mode 100644 index 00000000000..88516b757df --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result @@ -0,0 +1,95 @@ +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; +RESET MASTER; +CHANGE MASTER TO master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; +START SLAVE; +CREATE TABLE t1 (a int key, b int) ENGINE=ndb; +SHOW TABLES; +Tables_in_test +t1 +INSERT INTO t1 VALUES (1,2); +INSERT INTO t1 VALUES (2,3); +SELECT * FROM t1 ORDER BY a; +a b +1 2 +2 3 +show slave status;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SELECT * FROM t1 ORDER BY a; +a b +1 2 +2 3 +show slave status;; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 60 +Master_Log_File slave-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File slave-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +STOP SLAVE; +DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result new file mode 100644 index 00000000000..ee452f345f9 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result @@ -0,0 +1,97 @@ +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; +CREATE TABLE t1 (a int key, b int) ENGINE=NDB; +SHOW TABLES; +Tables_in_test +t1 +RESET MASTER; +INSERT INTO t1 VALUES (1,2); +INSERT INTO t1 VALUES (2,3); +STOP SLAVE; +CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=SLAVE_PORT,MASTER_USER="root"; +RESET MASTER; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port SLAVE_PORT +Connect_Retry 60 +Master_Log_File slave-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File slave-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SELECT * FROM t1 ORDER BY a; +a b +1 2 +2 3 +STOP SLAVE; +START SLAVE; +SELECT * FROM t1 ORDER BY a; +a b +1 2 +2 3 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result new file mode 100644 index 00000000000..3fc4ca26967 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_commit_afterflush.result @@ -0,0 +1,13 @@ +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; +CREATE TABLE t1 (a INT) ENGINE=NDB; +begin; +insert into t1 values(1); +flush tables with read lock; +commit; +unlock tables; +drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result new file mode 100644 index 00000000000..a4614b4b484 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result @@ -0,0 +1,417 @@ +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; +DROP TABLE IF EXISTS t1, t2, t3; +***** Test 1 RPL of CDD and Alter ***** +***** Test 1 setup ***** +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE 4M +ENGINE=NDB; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE=NDB; +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile02.dat' +INITIAL_SIZE 4M +ENGINE=NDB; +CREATE TABLE t1 +(c1 INT NOT NULL PRIMARY KEY, +c2 INT NOT NULL, +c3 INT NOT NULL) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; +***** insert some data ***** +***** Select from Master ***** +SELECT * FROM t1 ORDER BY c1 LIMIT 5; +c1 c2 c3 +1 2 4 +2 4 5 +3 6 6 +4 8 7 +5 10 8 +***** Select from Slave ***** +SELECT * FROM t1 ORDER BY c1 LIMIT 5; +c1 c2 c3 +1 2 4 +2 4 5 +3 6 6 +4 8 7 +5 10 8 +FILE_NAME FILE_TYPE TABLESPACE_NAME LOGFILE_GROUP_NAME +NULL UNDO LOG NULL lg1 +datafile.dat DATAFILE ts1 lg1 +datafile02.dat DATAFILE ts1 lg1 +undofile.dat UNDO LOG NULL lg1 +undofile02.dat UNDO LOG NULL lg1 +**** Do First Set of ALTERs in the master table **** +CREATE INDEX t1_i ON t1(c2, c3); +ALTER TABLE t1 ADD c4 TIMESTAMP; +ALTER TABLE t1 ADD c5 DOUBLE; +ALTER TABLE t1 ADD INDEX (c5); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) NOT NULL, + `c3` int(11) NOT NULL, + `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `c5` double DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `t1_i` (`c2`,`c3`), + KEY `c5` (`c5`) +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +**** Show first set of ALTERs on SLAVE **** +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) NOT NULL, + `c3` int(11) NOT NULL, + `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `c5` double DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `t1_i` (`c2`,`c3`), + KEY `c5` (`c5`) +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +**** Second set of alters test 1 **** +ALTER TABLE t1 RENAME t2; +ALTER TABLE t2 DROP INDEX c5; +CREATE TABLE t1(c1 INT)ENGINE=NDB; +INSERT INTO t1 VALUES(1); +DROP TABLE t1; +ALTER TABLE t2 RENAME t1; +**** Show second set of ALTERs on MASTER **** +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) NOT NULL, + `c3` int(11) NOT NULL, + `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `c5` double DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `t1_i` (`c2`,`c3`) +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +**** Show second set of ALTERs on SLAVE **** +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) NOT NULL, + `c3` int(11) NOT NULL, + `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `c5` double DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `t1_i` (`c2`,`c3`) +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +**** Third and last set of alters for test1 **** +ALTER TABLE t1 CHANGE c1 c1 DOUBLE; +ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); +ALTER TABLE t1 DROP COLUMN c3; +ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; +ALTER TABLE t1 CHANGE c4 c4 BLOB; +ALTER TABLE t1 CHANGE c4 c3 BLOB; +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +UPDATE t1 SET c3=@b1 where c1 = 1; +UPDATE t1 SET c3=@b1 where c1 = 2; +**** Show last set of ALTERs on MASTER **** +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` double NOT NULL DEFAULT '0', + `c2` decimal(10,2) DEFAULT NULL, + `c3` blob, + `c5` double DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `t1_i` (`c2`) +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +SELECT * FROM t1 ORDER BY c1 LIMIT 5; +c1 c2 c3 c5 +1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL +2 4.00 b1b1b1b1b1b1b1b1b1b1 NULL +3 6.00 0000-00-00 00:00:00 NULL +4 8.00 0000-00-00 00:00:00 NULL +5 10.00 0000-00-00 00:00:00 NULL +**** Show last set of ALTERs on SLAVE **** +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` double NOT NULL DEFAULT '0', + `c2` decimal(10,2) DEFAULT NULL, + `c3` blob, + `c5` double DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `t1_i` (`c2`) +) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1 +SELECT * FROM t1 where c1 = 1; +c1 c2 c3 c5 +1 2.00 b1b1b1b1b1b1b1b1b1b1 NULL +DROP TABLE t1; +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +******** Create additional TABLESPACE test 2 ************** +CREATE TABLESPACE ts2 +ADD DATAFILE 'datafile03.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE=NDB; +ALTER TABLESPACE ts2 +ADD DATAFILE 'datafile04.dat' +INITIAL_SIZE 12M +ENGINE=NDB; +DROP DATABASE IF EXISTS tpcb; +Warnings: +Note 1008 Can't drop database 'tpcb'; database doesn't exist +CREATE DATABASE tpcb; +*********** Create TPCB Tables ***************** +CREATE TABLE tpcb.account +(id INT, bid INT, balance DECIMAL(10,2), +filler CHAR(255), PRIMARY KEY(id)) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB; +CREATE TABLE tpcb.branch +(bid INT, balance DECIMAL(10,2), filler VARCHAR(255), +PRIMARY KEY(bid)) +ENGINE=NDB; +CREATE TABLE tpcb.teller +(tid INT, balance DECIMAL(10,2), filler VARCHAR(255), +PRIMARY KEY(tid)) +TABLESPACE ts2 STORAGE DISK +ENGINE=NDB; +CREATE TABLE tpcb.history +(id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, +tid INT, bid INT, amount DECIMAL(10,2), +tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, +filler CHAR(80),PRIMARY KEY (id)) +TABLESPACE ts2 STORAGE DISK +ENGINE=NDB; +********* Create Procedures and Functions ************ +CREATE PROCEDURE tpcb.load() +BEGIN +DECLARE acct INT DEFAULT 1000; +DECLARE brch INT DEFAULT 100; +DECLARE tell INT DEFAULT 1000; +DECLARE tmp INT DEFAULT 100; +WHILE brch > 0 DO +SET tmp = 100; +WHILE tmp > 0 DO +INSERT INTO tpcb.account VALUES (acct, brch, 0.0, "FRESH ACCOUNT"); +SET acct = acct - 1; +SET tmp = tmp -1; +END WHILE; +INSERT INTO tpcb.branch VALUES (brch, 0.0, "FRESH BRANCH"); +SET brch = brch - 1; +END WHILE; +WHILE tell > 0 DO +INSERT INTO tpcb.teller VALUES (tell, 0.0, "FRESH TELLER"); +SET tell = tell - 1; +END WHILE; +END| +CREATE FUNCTION tpcb.account_id () RETURNS INT +BEGIN +DECLARE num INT; +DECLARE ran INT; +SELECT RAND() * 10 INTO ran; +IF (ran < 2) +THEN +SELECT RAND() * 10 INTO num; +ELSEIF (ran < 4) +THEN +SELECT RAND() * 100 INTO num; +ELSE +SELECT RAND() * 1000 INTO num; +END IF; +IF (num < 1) +THEN +RETURN 1; +END IF; +RETURN num; +END| +CREATE FUNCTION tpcb.teller_id () RETURNS INT +BEGIN +DECLARE num INT; +DECLARE ran INT; +SELECT RAND() * 10 INTO ran; +IF (ran < 2) +THEN +SELECT RAND() * 10 INTO num; +ELSEIF (ran < 5) +THEN +SELECT RAND() * 100 INTO num; +ELSE +SELECT RAND() * 1000 INTO num; +END IF; +IF (num < 1) +THEN +RETURN 1; +END IF; +RETURN num; +END| +CREATE PROCEDURE tpcb.trans() +BEGIN +DECLARE acct INT DEFAULT 0; +DECLARE brch INT DEFAULT 0; +DECLARE tell INT DEFAULT 0; +DECLARE bal DECIMAL(10,2) DEFAULT 0.0; +DECLARE amount DECIMAL(10,2) DEFAULT 1.00; +DECLARE test INT DEFAULT 0; +DECLARE bbal DECIMAL(10,2) DEFAULT 0.0; +DECLARE tbal DECIMAL(10,2) DEFAULT 0.0; +DECLARE local_uuid VARCHAR(255); +DECLARE local_user VARCHAR(255); +DECLARE local_time TIMESTAMP; +SELECT RAND() * 10 INTO test; +SELECT tpcb.account_id() INTO acct; +SELECT tpcb.teller_id() INTO tell; +SELECT account.balance INTO bal FROM tpcb.account WHERE id = acct; +SELECT account.bid INTO brch FROM tpcb.account WHERE id = acct; +SELECT teller.balance INTO tbal FROM tpcb.teller WHERE tid = tell; +SELECT branch.balance INTO bbal FROM tpcb.branch WHERE bid = brch; +IF (test < 5) +THEN +SET bal = bal + amount; +SET bbal = bbal + amount; +SET tbal = tbal + amount; +UPDATE tpcb.account SET balance = bal, filler = 'account updated' + WHERE id = acct; +UPDATE tpcb.branch SET balance = bbal, filler = 'branch updated' + WHERE bid = brch; +UPDATE tpcb.teller SET balance = tbal, filler = 'teller updated' + WHERE tid = tell; +ELSE +SET bal = bal - amount; +SET bbal = bbal - amount; +SET tbal = tbal - amount; +UPDATE tpcb.account SET balance = bal, filler = 'account updated' + WHERE id = acct; +UPDATE tpcb.branch SET balance = bbal, filler = 'branch updated' + WHERE bid = brch; +UPDATE tpcb.teller SET balance = tbal, filler = 'teller updated' + WHERE tid = tell; +END IF; +SET local_uuid=UUID(); +SET local_user=USER(); +SET local_time= NOW(); +INSERT INTO tpcb.history VALUES(NULL,acct,tell,brch,amount, local_time,local_user, +local_uuid,'completed trans'); +END| +****** TEST 2 test time ********************************* +USE tpcb; +*********** Load up the database ****************** +CALL tpcb.load(); +********** Check load master and slave ************** +SELECT COUNT(*) FROM account; +COUNT(*) +10000 +USE tpcb; +SELECT COUNT(*) FROM account; +COUNT(*) +10000 +******** Run in some transactions *************** +***** Time to try slave sync *********** +**** Must make sure slave is clean ***** +STOP SLAVE; +RESET SLAVE; +DROP PROCEDURE IF EXISTS tpcb.load; +DROP PROCEDURE IF EXISTS tpcb.trans; +DROP TABLE IF EXISTS tpcb.account; +DROP TABLE IF EXISTS tpcb.teller; +DROP TABLE IF EXISTS tpcb.branch; +DROP TABLE IF EXISTS tpcb.history; +DROP DATABASE tpcb; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile02.dat' +ENGINE=NDB; +DROP TABLESPACE ts1 ENGINE=NDB; +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile03.dat' +ENGINE=NDB; +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile04.dat' +ENGINE=NDB; +DROP TABLESPACE ts2 ENGINE=NDB; +DROP LOGFILE GROUP lg1 ENGINE=NDB; +********** Take a backup of the Master ************* +SELECT COUNT(*) FROM history; +COUNT(*) +1000 +SELECT COUNT(*) FROM history; +COUNT(*) +2000 +CREATE TEMPORARY TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM mysql.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM mysql.backup_info; +@the_backup_id:=backup_id + +DROP TABLE IF EXISTS mysql.backup_info; +************ Restore the slave ************************ +CREATE DATABASE tpcb; +***** Check a few slave restore values *************** +USE tpcb; +SELECT COUNT(*) FROM account; +COUNT(*) +10000 +***** Add some more records to master ********* +***** Finsh the slave sync process ******* +@the_epoch:=MAX(epoch) + +@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) + master-bin.000001 +* 4. * +* 5. * +START SLAVE; +**** We should be ready to continue on ************* +****** Let's make sure we match ******* +***** MASTER ******* +USE tpcb; +SELECT COUNT(*) FROM history; +COUNT(*) +4050 +****** SLAVE ******** +USE tpcb; +SELECT COUNT(*) FROM history; +COUNT(*) +4050 +*** DUMP MASTER & SLAVE FOR COMPARE ******** +*************** TEST 2 CLEANUP SECTION ******************** +DROP PROCEDURE IF EXISTS tpcb.load; +DROP PROCEDURE IF EXISTS tpcb.trans; +DROP TABLE tpcb.account; +DROP TABLE tpcb.teller; +DROP TABLE tpcb.branch; +DROP TABLE tpcb.history; +DROP DATABASE tpcb; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile02.dat' +ENGINE=NDB; +DROP TABLESPACE ts1 ENGINE=NDB; +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile03.dat' +ENGINE=NDB; +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile04.dat' +ENGINE=NDB; +DROP TABLESPACE ts2 ENGINE=NDB; +DROP LOGFILE GROUP lg1 ENGINE=NDB; +****** Do dumps compare ************ diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result new file mode 100644 index 00000000000..f1cc6e9af24 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_basic.result @@ -0,0 +1,72 @@ +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; +DROP TABLE IF EXISTS t1; +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +alter logfile group lg1 +add undofile 'undofile02.dat' +initial_size 4M engine=ndb; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; +alter tablespace ts1 +add datafile 'datafile02.dat' +initial_size 4M engine=ndb; +CREATE TABLE t1 +(pk1 int not null primary key, b int not null, c int not null) +tablespace ts1 storage disk +engine ndb; +insert into t1 values (1,2,3); +select * from t1 order by pk1; +pk1 b c +1 2 3 +select * from t1 order by pk1; +pk1 b c +1 2 3 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1 +master-bin.000001 # Query 1 # CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB +master-bin.000001 # Query 1 # alter logfile group lg1 +add undofile 'undofile02.dat' +initial_size 4M engine=ndb +master-bin.000001 # Query 1 # CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB +master-bin.000001 # Query 1 # alter tablespace ts1 +add datafile 'datafile02.dat' +initial_size 4M engine=ndb +master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 +(pk1 int not null primary key, b int not null, c int not null) +tablespace ts1 storage disk +engine ndb +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows 1 # table_id: # +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # COMMIT +drop table t1; +alter tablespace ts1 +drop datafile 'datafile.dat' +engine=ndb; +alter tablespace ts1 +drop datafile 'datafile02.dat' +engine=ndb; +DROP TABLESPACE ts1 ENGINE=NDB; +DROP LOGFILE GROUP lg1 ENGINE=NDB; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result new file mode 100644 index 00000000000..ece6b84c227 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result @@ -0,0 +1,726 @@ +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; +--- Doing pre test cleanup --- +DROP TABLE IF EXISTS t1; +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; +--- Start test 2 partition RANGE testing -- +--- Do setup -- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), +bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB +PARTITION BY RANGE (YEAR(t)) +(PARTITION p0 VALUES LESS THAN (1901), +PARTITION p1 VALUES LESS THAN (1946), +PARTITION p2 VALUES LESS THAN (1966), +PARTITION p3 VALUES LESS THAN (1986), +PARTITION p4 VALUES LESS THAN (2005), +PARTITION p5 VALUES LESS THAN MAXVALUE); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(63) DEFAULT NULL, + `bc` char(63) 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 +) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) +--- Show table on slave -- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(63) DEFAULT NULL, + `bc` char(63) 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 +) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 MODIFY vc VARCHAR(255); +--- 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` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(63) 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 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) +--- 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` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(63) 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 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 2 partition RANGE testing --- +--- Do Cleanup --- +DROP TABLE IF EXISTS t1; +--- Start test 3 partition LIST testing --- +--- Do setup --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), +bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB +PARTITION BY LIST(id) +(PARTITION p0 VALUES IN (2, 4), +PARTITION p1 VALUES IN (42, 142)); +--- Test 3 Alter to add partition --- +ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(63) DEFAULT NULL, + `bc` char(63) 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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) +--- Show table on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(63) DEFAULT NULL, + `bc` char(63) 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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 MODIFY vc VARCHAR(255); +--- 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` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(63) 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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) +--- 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` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(63) 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 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 3 partition LIST testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 4 partition HASH testing --- +--- Do setup --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), +bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB +PARTITION BY HASH( YEAR(t) ) +PARTITIONS 4; +--- show that tables have been created correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(63) DEFAULT NULL, + `bc` char(63) 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 +) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(63) DEFAULT NULL, + `bc` char(63) 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 +) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 MODIFY vc VARCHAR(255); +--- 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` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(63) 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 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +--- 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` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(63) 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 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 4 partition HASH testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 5 partition by key testing --- +--- Create Table Section --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), +bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE,PRIMARY KEY(id)) +TABLESPACE ts1 STORAGE DISK +ENGINE=NDB +PARTITION BY KEY() +PARTITIONS 4; +--- Show that tables on master are ndbcluster tables --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(63) DEFAULT NULL, + `bc` char(63) 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`) +) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Show that tables on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(63) DEFAULT NULL, + `bc` char(63) 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`) +) TABLESPACE ts1 STORAGE DISK ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +--- 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` bit(8) DEFAULT NULL, + `vc` varchar(63) DEFAULT NULL, + `bc` char(63) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Make sure that our tables on slave are still right type --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(63) DEFAULT NULL, + `bc` char(63) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 MODIFY vc VARCHAR(255); +--- 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` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(63) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- 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` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(63) 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, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(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 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- 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 +DELETE FROM t1; +--- End test 5 key partition testing --- +--- Do Cleanup --- +DROP TABLE IF EXISTS t1; +alter tablespace ts1 +drop datafile 'datafile.dat' +engine=ndb; +alter tablespace ts1 +drop datafile 'datafile02.dat' +engine=ndb; +DROP TABLESPACE ts1 ENGINE=NDB; +DROP LOGFILE GROUP lg1 ENGINE=NDB; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result new file mode 100644 index 00000000000..aeaca1e7de0 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ddl.result @@ -0,0 +1,1616 @@ +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; + +-------- switch to master ------- +SET AUTOCOMMIT = 1; +DROP DATABASE IF EXISTS mysqltest1; +DROP DATABASE IF EXISTS mysqltest2; +DROP DATABASE IF EXISTS mysqltest3; +CREATE DATABASE mysqltest1; +CREATE DATABASE mysqltest2; +CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=NDB; +INSERT INTO mysqltest1.t1 SET f1= 0; +CREATE TABLE mysqltest1.t2 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t3 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t4 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t5 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t6 (f1 BIGINT) ENGINE=NDB; +CREATE INDEX my_idx6 ON mysqltest1.t6(f1); +CREATE TABLE mysqltest1.t7 (f1 BIGINT) ENGINE=NDB; +INSERT INTO mysqltest1.t7 SET f1= 0; +CREATE TABLE mysqltest1.t8 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t9 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t10 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t11 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t12 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t13 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t14 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t15 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t16 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t17 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t18 (f1 BIGINT) ENGINE=NDB; +CREATE TABLE mysqltest1.t19 (f1 BIGINT) ENGINE=NDB; +CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) ENGINE=MEMORY; +SET AUTOCOMMIT = 0; +use mysqltest1; + +-------- switch to slave -------- +SET AUTOCOMMIT = 1; +use mysqltest1; + +-------- switch to master ------- + +######## SELECT 1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 0 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +SELECT 1; +1 +1 +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## SELECT COUNT(*) FROM t1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 0 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +SELECT COUNT(*) FROM t1; +COUNT(*) +2 +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## COMMIT ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 0 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +0 + +-------- switch to master ------- +COMMIT; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## ROLLBACK ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 1 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## SET AUTOCOMMIT=1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 1 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +1 + +-------- switch to master ------- +SET AUTOCOMMIT=1; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SET AUTOCOMMIT=0; + +######## START TRANSACTION ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 2 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +2 + +-------- switch to master ------- +START TRANSACTION; +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## BEGIN ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 3 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +3 + +-------- switch to master ------- +BEGIN; +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## DROP TABLE mysqltest1.t2 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 4 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +4 + +-------- switch to master ------- +DROP TABLE mysqltest1.t2; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TABLES LIKE 't2'; +Tables_in_mysqltest1 (t2) + +-------- switch to slave -------- +SHOW TABLES LIKE 't2'; +Tables_in_mysqltest1 (t2) + +-------- switch to master ------- + +######## DROP TEMPORARY TABLE mysqltest1.t23 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 5 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +DROP TEMPORARY TABLE mysqltest1.t23; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- +SHOW TABLES LIKE 't23'; +Tables_in_mysqltest1 (t23) + +-------- switch to slave -------- +SHOW TABLES LIKE 't23'; +Tables_in_mysqltest1 (t23) + +-------- switch to master ------- + +######## RENAME TABLE mysqltest1.t3 to mysqltest1.t20 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 5 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +5 + +-------- switch to master ------- +RENAME TABLE mysqltest1.t3 to mysqltest1.t20; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TABLES LIKE 't20'; +Tables_in_mysqltest1 (t20) +t20 + +-------- switch to slave -------- +SHOW TABLES LIKE 't20'; +Tables_in_mysqltest1 (t20) +t20 + +-------- switch to master ------- + +######## ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 6 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +6 + +-------- switch to master ------- +ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT; +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +describe mysqltest1.t4; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 bigint(20) YES NULL + +-------- switch to slave -------- +describe mysqltest1.t4; +Field Type Null Key Default Extra +f1 bigint(20) YES NULL +f2 bigint(20) YES NULL + +-------- switch to master ------- + +######## CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= NDB ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 7 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +7 + +-------- switch to master ------- +CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= NDB; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 8 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +CREATE TEMPORARY TABLE mysqltest1.t22 (f1 BIGINT) ENGINE=MEMORY; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- + +######## TRUNCATE TABLE mysqltest1.t7 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 8 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +8 + +-------- switch to master ------- +TRUNCATE TABLE mysqltest1.t7; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT * FROM mysqltest1.t7; +f1 + +-------- switch to slave -------- +SELECT * FROM mysqltest1.t7; +f1 + +-------- switch to master ------- + +######## LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 9 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +9 + +-------- switch to master ------- +LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +UNLOCK TABLES; + +######## UNLOCK TABLES ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 10 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +UNLOCK TABLES; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- +LOCK TABLES mysqltest1.t1 READ; + +######## UNLOCK TABLES ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 10 + 1; +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +UNLOCK TABLES; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: MASTER: The INSERT is not committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +TEST-INFO: SLAVE: The INSERT is not committed (Succeeded) + +-------- switch to master ------- +LOCK TABLES mysqltest1.t1 WRITE, mysqltest1.t8 READ; + +######## UNLOCK TABLES ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 10 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +10 + +-------- switch to master ------- +UNLOCK TABLES; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- + +######## DROP INDEX my_idx6 ON mysqltest1.t6 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 11 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +11 + +-------- switch to master ------- +DROP INDEX my_idx6 ON mysqltest1.t6; +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW INDEX FROM mysqltest1.t6; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment + +-------- switch to slave -------- +SHOW INDEX FROM mysqltest1.t6; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment + +-------- switch to master ------- + +######## CREATE INDEX my_idx5 ON mysqltest1.t5(f1) ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 12 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +12 + +-------- switch to master ------- +CREATE INDEX my_idx5 ON mysqltest1.t5(f1); +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW INDEX FROM mysqltest1.t5; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE + +-------- switch to slave -------- +SHOW INDEX FROM mysqltest1.t5; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t5 1 my_idx5 1 f1 A 0 NULL NULL YES BTREE + +-------- switch to master ------- + +######## DROP DATABASE mysqltest2 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 13 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +13 + +-------- switch to master ------- +DROP DATABASE mysqltest2; +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW DATABASES LIKE "mysqltest2"; +Database (mysqltest2) + +-------- switch to slave -------- +SHOW DATABASES LIKE "mysqltest2"; +Database (mysqltest2) + +-------- switch to master ------- + +######## CREATE DATABASE mysqltest3 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 14 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +14 + +-------- switch to master ------- +CREATE DATABASE mysqltest3; +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW DATABASES LIKE "mysqltest3"; +Database (mysqltest3) +mysqltest3 + +-------- switch to slave -------- +SHOW DATABASES LIKE "mysqltest3"; +Database (mysqltest3) +mysqltest3 + +-------- switch to master ------- + +######## CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1" ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 15 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +15 + +-------- switch to master ------- +CREATE PROCEDURE p1() READS SQL DATA SELECT "this is p1"; +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment + +-------- switch to slave -------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment + +-------- switch to master ------- + +######## ALTER PROCEDURE p1 COMMENT "I have been altered" ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 16 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +16 + +-------- switch to master ------- +ALTER PROCEDURE p1 COMMENT "I have been altered"; +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment I have been altered + +-------- switch to slave -------- +SHOW PROCEDURE STATUS LIKE 'p1'; +Db mysqltest1 +Name p1 +Type PROCEDURE +Definer root@localhost +Modified # +Created # +Security_type DEFINER +Comment I have been altered + +-------- switch to master ------- + +######## DROP PROCEDURE p1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 17 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +17 + +-------- switch to master ------- +DROP PROCEDURE p1; +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW PROCEDURE STATUS LIKE 'p1'; + +-------- switch to slave -------- +SHOW PROCEDURE STATUS LIKE 'p1'; + +-------- switch to master ------- + +######## CREATE OR REPLACE VIEW v1 as select * from t1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 18 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +18 + +-------- switch to master ------- +CREATE OR REPLACE VIEW v1 as select * from t1; +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to slave -------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to master ------- + +######## ALTER VIEW v1 AS select f1 from t1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 19 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +19 + +-------- switch to master ------- +ALTER VIEW v1 AS select f1 from t1; +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to slave -------- +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` + +-------- switch to master ------- + +######## DROP VIEW IF EXISTS v1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 20 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +20 + +-------- switch to master ------- +DROP VIEW IF EXISTS v1; +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW CREATE VIEW v1; +ERROR 42S02: Table 'mysqltest1.v1' doesn't exist + +-------- switch to slave -------- +SHOW CREATE VIEW v1; +ERROR 42S02: Table 'mysqltest1.v1' doesn't exist + +-------- switch to master ------- + +######## CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 21 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +21 + +-------- switch to master ------- +CREATE TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1; +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost + +-------- switch to slave -------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @a:=1 BEFORE NULL root@localhost + +-------- switch to master ------- + +######## DROP TRIGGER trg1 ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 22 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +22 + +-------- switch to master ------- +DROP TRIGGER trg1; +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer + +-------- switch to slave -------- +SHOW TRIGGERS; +Trigger Event Table Statement Timing Created sql_mode Definer + +-------- switch to master ------- + +######## CREATE USER user1@localhost ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 23 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +23 + +-------- switch to master ------- +CREATE USER user1@localhost; +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT user FROM mysql.user WHERE user = 'user1'; +user +user1 + +-------- switch to slave -------- +SELECT user FROM mysql.user WHERE user = 'user1'; +user +user1 + +-------- switch to master ------- + +######## RENAME USER user1@localhost TO rename1@localhost ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 24 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +24 + +-------- switch to master ------- +RENAME USER user1@localhost TO rename1@localhost; +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user +rename1 + +-------- switch to slave -------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user +rename1 + +-------- switch to master ------- + +######## DROP USER rename1@localhost ######## + +-------- switch to master ------- +INSERT INTO t1 SET f1= 25 + 1; +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +25 + +-------- switch to master ------- +DROP USER rename1@localhost; +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +-------- switch to master ------- +ROLLBACK; +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +TEST-INFO: MASTER: The INSERT is committed (Succeeded) + +-------- switch to slave -------- +SELECT MAX(f1) FROM t1; +MAX(f1) +26 + +TEST-INFO: SLAVE: The INSERT is committed (Succeeded) + +-------- switch to master ------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user + +-------- switch to slave -------- +SELECT user FROM mysql.user WHERE user = 'rename1'; +user +use test; + +-------- switch to master ------- +DROP DATABASE mysqltest1; +DROP DATABASE mysqltest3; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result new file mode 100644 index 00000000000..1cecb030181 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result @@ -0,0 +1,15 @@ +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; +create table t1 (a int, b int) engine=NDB; +insert into t1 values(1,1); +select * from t1; +a b +1 1 +delete from t1; +select * from t1; +a b +drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result new file mode 100644 index 00000000000..316f5fc7e31 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_db.result @@ -0,0 +1,58 @@ +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; +DROP DATABASE IF EXISTS replica; +CREATE DATABASE replica; +CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +USE replica; +CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +USE test; +INSERT INTO t1 VALUES(1, repeat('abc',10)); +INSERT INTO t2 VALUES(1, repeat('abc',10)); +SHOW TABLES; +Tables_in_test +t1 +t2 +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +SELECT COUNT(*) FROM t2; +COUNT(*) +1 +USE replica; +INSERT INTO replica.t1 VALUES(2, repeat('def',200)); +INSERT INTO replica.t2 VALUES(2, repeat('def',200)); +SHOW TABLES; +Tables_in_replica +t1 +t2 +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +SELECT COUNT(*) FROM t2; +COUNT(*) +1 +SHOW TABLES; +Tables_in_test +USE replica; +SHOW TABLES; +Tables_in_replica +t1 +t2 +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +SELECT COUNT(*) FROM t2; +COUNT(*) +1 +USE test; +SHOW TABLES; +Tables_in_test +USE test; +DROP TABLE t1, t2; +DROP DATABASE IF EXISTS replica; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result new file mode 100644 index 00000000000..dda2844f6d0 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_do_table.result @@ -0,0 +1,26 @@ +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; +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +INSERT INTO t1 VALUES(1, repeat('abc',10)); +INSERT INTO t1 VALUES(2, repeat('def',200)); +INSERT INTO t1 VALUES(3, repeat('ghi',3000)); +INSERT INTO t2 VALUES(1, repeat('abc',10)); +INSERT INTO t2 VALUES(2, repeat('def',200)); +INSERT INTO t2 VALUES(3, repeat('ghi',3000)); +SHOW TABLES; +Tables_in_test +t1 +SELECT COUNT(*) FROM t1; +COUNT(*) +3 +INSERT INTO t1 VALUES (3, repeat('bad',1)); +ERROR 23000: Duplicate entry '3' for key 'PRIMARY' +INSERT INTO t1 VALUES (3, repeat('bad too',1)); +ERROR 23000: Duplicate entry '3' for key 'PRIMARY' +DROP TABLE IF EXISTS t1, t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result new file mode 100644 index 00000000000..8f6dae7c5b5 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result @@ -0,0 +1,750 @@ +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; +**** Diff Table Def Start **** +*** On Slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(4) DEFAULT 'TEST') +ENGINE='NDB'; +*** Create t1 on Master *** +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t1 () VALUES(1,2,'TEXAS'),(2,1,'AUSTIN'),(3,4,'QA'); +SELECT * FROM t1 ORDER BY a; +a b c +1 2 TEXAS +2 1 AUSTIN +3 4 QA +*** Select from slave *** +SELECT * FROM t1 ORDER BY a; +a b c d e +1 2 TEXAS NULL NULL +2 1 AUSTIN NULL NULL +3 4 QA NULL NULL +*** Drop t1 *** +DROP TABLE t1; +*** Create t3 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t3 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='NDB'; +*** Create t3 on Master *** +CREATE TABLE t3 (a BLOB, b INT PRIMARY KEY, c CHAR(20) +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 252, test.t3 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t3 *** +DROP TABLE t3; +*** Create t4 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t4 (a INT, b INT PRIMARY KEY, c CHAR(20), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='NDB'; +*** Create t4 on Master *** +CREATE TABLE t4 (a DECIMAL(8,2), b INT PRIMARY KEY, c CHAR(20) +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'), +(30000.22,4,'QA TESTING'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 246, test.t4 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t4 *** +DROP TABLE t4; +*** Create t5 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t5 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT, e DOUBLE, +f DECIMAL(8,2))ENGINE='NDB'; +*** Create t5 on Master *** +CREATE TABLE t5 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT, e BLOB, +f FLOAT) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098), +(2,'JOE',300.01,0,'b2b2',1.0000009); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 5 type mismatch - received type 4, test.t5 has type 246 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t5 *** +DROP TABLE t5; +*** Create t6 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t6 (a INT PRIMARY KEY, b CHAR(5), +c FLOAT, d INT)ENGINE='NDB'; +*** Create t6 on Master *** +CREATE TABLE t6 (a INT PRIMARY KEY, b VARCHAR(6), +c DECIMAL(8,2), d BIT +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t6 () VALUES(1,'Kyle',200.23,1), +(2,'JOE',300.01,0); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 3 type mismatch - received type 16, test.t6 has type 3 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; +*** Drop t6 *** +DROP TABLE t6; +DROP TABLE t6; +START SLAVE; +**** Diff Table Def End **** +**** Extra Colums Start **** +*** Create t7 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e CHAR(20) DEFAULT 'Extra Column Testing') +ENGINE='NDB'; +*** Create t7 on Master *** +CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t7 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t7 ORDER BY a; +a b c +1 b1b1 Kyle +2 b1b1 JOE +3 b1b1 QA +*** Select from slave *** +SELECT * FROM t7 ORDER BY a; +a b c d e +1 b1b1 Kyle NULL NULL +2 b1b1 JOE NULL NULL +3 b1b1 QA NULL NULL +*** Drop t7 *** +DROP TABLE t7; +*** Create t8 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00', +e INT)ENGINE='NDB'; +*** Create t8 on Master *** +CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +*** Drop t8 *** +DROP TABLE t8; +*** Create t10 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t10 (a INT KEY, b BLOB, f DOUBLE DEFAULT '233', +c CHAR(5), e INT DEFAULT '1')ENGINE='NDB'; +*** Create t10 on Master *** +CREATE TABLE t10 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 254, test.t10 has type 5 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t10 *** +DROP TABLE t10; +*** Create t11 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; +*** Create t11 on Master *** +CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254) +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 2 type mismatch - received type 15, test.t11 has type 252 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Drop t11 *** +DROP TABLE t11; +*** Create t12 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t12 (a INT KEY, b BLOB, f TEXT, +c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='NDB'; +*** Create t12 on Master *** +CREATE TABLE t12 (a INT PRIMARY KEY, b BLOB, c BLOB +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t12 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t12 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave *** +SELECT * FROM t12 ORDER BY a; +a b f c e +1 b1b1b1b1b1b1b1b1 Kyle NULL NULL +2 b1b1b1b1b1b1b1b1 JOE NULL NULL +3 b1b1b1b1b1b1b1b1 QA NULL NULL +*** Drop t12 *** +DROP TABLE t12; +**** Extra Colums End **** +*** BUG 22177 Start *** +*** Create t13 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t13 (a INT KEY, b BLOB, c CHAR(5), +d INT DEFAULT '1', +e TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='NDB'; +*** Create t13 on Master *** +CREATE TABLE t13 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t13 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SELECT * FROM t13 ORDER BY a; +a b c +1 b1b1b1b1b1b1b1b1 Kyle +2 b1b1b1b1b1b1b1b1 JOE +3 b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t13 ORDER BY a; +a b c d e +1 b1b1b1b1b1b1b1b1 Kyle NULL CURRENT_TIMESTAMP +2 b1b1b1b1b1b1b1b1 JOE NULL CURRENT_TIMESTAMP +3 b1b1b1b1b1b1b1b1 QA NULL CURRENT_TIMESTAMP +*** Drop t13 *** +DROP TABLE t13; +*** 22117 END *** +*** Alter Master Table Testing Start *** +*** Create t14 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t14 (c1 INT KEY, c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='NDB'; +*** Create t14 on Master *** +CREATE TABLE t14 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5) +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +ALTER TABLE t14 ADD COLUMN c2 DECIMAL(8,2) AFTER c1; +ALTER TABLE t14 ADD COLUMN c3 TEXT AFTER c2; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t14 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t14 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t14 ORDER BY c1; +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 +*** connect to master and drop columns *** +ALTER TABLE t14 DROP COLUMN c2; +ALTER TABLE t14 DROP COLUMN c4; +*** Select from Master *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 +1 Replication Testing Extra Col Kyle +2 This Test Should work JOE +3 If is does not, I will open a bug QA +*** Select from Slave *** +SELECT * FROM t14 ORDER BY c1; +c1 c3 c5 c6 c7 +1 Replication Testing Extra Col Kyle NULL CURRENT_TIMESTAMP +2 This Test Should work JOE NULL CURRENT_TIMESTAMP +3 If is does not, I will open a bug QA NULL CURRENT_TIMESTAMP +*** Drop t14 *** +DROP TABLE t14; +*** Create t15 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t15 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='NDB'; +*** Create t15 on Master *** +CREATE TABLE t15 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +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 t15 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t15 ORDER BY c1; +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 +*** Add column on master that is a Extra on Slave *** +ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5; +******************************************** +*** Expect slave to fail with Error 1060 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1060 +Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +*** Try to insert in master **** +INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2); +SELECT * FROM t15 ORDER BY c1; +c1 c2 c3 c4 c5 c6 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle NULL +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE NULL +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA NULL +5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 +*** Try to select from slave **** +SELECT * FROM t15 ORDER BY c1; +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 +5 2.00 Replication Testing b1b1b1b1b1b1b1b1 Buda 2 CURRENT_TIMESTAMP +*** DROP TABLE t15 *** +DROP TABLE t15; +*** Create t16 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t16 (c1 INT KEY, c2 DECIMAL(8,2), c3 TEXT, +c4 BLOB, c5 CHAR(5), +c6 INT DEFAULT '1', +c7 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP +)ENGINE='NDB'; +*** Create t16 on Master *** +CREATE TABLE t16 (c1 INT PRIMARY KEY, c2 DECIMAL(8,2), c3 TEXT, +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 t16 () VALUES(1,1.00,'Replication Testing Extra Col',@b1,'Kyle'), +(2,2.00,'This Test Should work',@b1,'JOE'), +(3,3.00,'If is does not, I will open a bug',@b1,'QA'); +SELECT * FROM t16 ORDER BY c1; +c1 c2 c3 c4 c5 +1 1.00 Replication Testing Extra Col b1b1b1b1b1b1b1b1 Kyle +2 2.00 This Test Should work b1b1b1b1b1b1b1b1 JOE +3 3.00 If is does not, I will open a bug b1b1b1b1b1b1b1b1 QA +*** Select on Slave **** +SELECT * FROM t16 ORDER BY c1; +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 +*** Add Partition on master *** +ALTER TABLE t16 PARTITION BY KEY(c1) PARTITIONS 4; +INSERT INTO t16 () VALUES(4,1.00,'Replication Rocks',@b1,'Omer'); +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ +*** Show table on Slave **** +SHOW CREATE TABLE t16; +Table Create Table +t16 CREATE TABLE `t16` ( + `c1` int(11) NOT NULL, + `c2` decimal(8,2) DEFAULT NULL, + `c3` text, + `c4` blob, + `c5` char(5) DEFAULT NULL, + `c6` int(11) DEFAULT '1', + `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`c1`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (c1) PARTITIONS 4 */ +*** DROP TABLE t16 *** +DROP TABLE t16; +*** Alter Master End *** +*** Create t17 on slave *** +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t17 (a SMALLINT, b INT PRIMARY KEY, c CHAR(5), +d FLOAT DEFAULT '2.00', +e CHAR(5) DEFAULT 'TEST2') +ENGINE='NDB'; +*** Create t17 on Master *** +CREATE TABLE t17 (a BIGINT PRIMARY KEY, b INT, c CHAR(10) +) ENGINE='NDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX'); +******************************************** +*** Expect slave to fail with Error 1522 *** +******************************************** +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1523 +Last_Error Column 0 type mismatch - received type 8, test.t17 has type 2 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; +** DROP table t17 *** +DROP TABLE t17; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result new file mode 100644 index 00000000000..ad72a3fb244 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result @@ -0,0 +1,29 @@ +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; +DROP FUNCTION IF EXISTS test.f1; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=NDB; +create function test.f1() RETURNS CHAR(16) +BEGIN +DECLARE tmp CHAR(16); +DECLARE var_name FLOAT; +SET var_name = RAND(); +IF var_name > .6 +THEN SET tmp = 'Texas'; +ELSE SET tmp = 'MySQL'; +END IF; +RETURN tmp; +END| +INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); +INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1()); +SET AUTOCOMMIT=0; +START TRANSACTION; +INSERT INTO test.t1 VALUES (null,test.f1()); +ROLLBACK; +SET AUTOCOMMIT=1; +DROP FUNCTION test.f1; +DROP TABLE test.t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result new file mode 100644 index 00000000000..2f2273c145e --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result @@ -0,0 +1,73 @@ +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; +CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; +INSERT INTO t1 VALUES ("row1","will go away",1); +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row1 will go away 1 +SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; +@the_epoch:=MAX(epoch) + +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row1 will go away 1 +SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) +FROM mysql.ndb_binlog_index WHERE epoch = ; +@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) + master-bin.000001 +INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); +DELETE FROM t1 WHERE c3 = 1; +UPDATE t1 SET c2="should go away" WHERE c3 = 2; +UPDATE t1 SET c2="C" WHERE c3 = 3; +DELETE FROM t1 WHERE c3 = 2; +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No +STOP SLAVE; +CHANGE MASTER TO +master_log_file = 'master-bin.000001', +master_log_pos = ; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 No No 0 0 None 0 No No +START SLAVE; +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +STOP SLAVE; +DROP TABLE t1; +RESET master; +DROP TABLE t1; +RESET slave; +START SLAVE; +CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ; +INSERT INTO t1 VALUES ("row1","remove on slave",1); +DELETE FROM t1; +BEGIN; +UPDATE t1 SET c2="does not exist" WHERE c3=1; +INSERT INTO t1 VALUES ("row2","new on slave",2); +COMMIT; +SELECT * FROM t1; +c1 c2 c3 +row2 new on slave 2 +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result new file mode 100644 index 00000000000..148e6247b03 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb_trans.result @@ -0,0 +1,103 @@ +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; +create table t1 (a int, unique(a)) engine=ndbcluster; +create table t2 (a int, unique(a)) engine=innodb; +begin; +insert into t1 values(1); +insert into t2 values(1); +rollback; +select count(*) from t1; +count(*) +0 +select count(*) from t2; +count(*) +0 +select count(*) from t1; +count(*) +0 +select count(*) from t2; +count(*) +0 +begin; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; +Warnings: +Warning 1262 Row 1 was truncated; it contained more data than there were input columns +Warning 1262 Row 2 was truncated; it contained more data than there were input columns +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +Warnings: +Warning 1262 Row 1 was truncated; it contained more data than there were input columns +Warning 1262 Row 2 was truncated; it contained more data than there were input columns +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +select count(*) from t1; +count(*) +2 +select count(*) from t2; +count(*) +0 +select count(*) from t1; +count(*) +2 +select count(*) from t2; +count(*) +0 +delete from t1; +delete from t2; +begin; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; +Warnings: +Warning 1262 Row 1 was truncated; it contained more data than there were input columns +Warning 1262 Row 2 was truncated; it contained more data than there were input columns +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +Warnings: +Warning 1262 Row 1 was truncated; it contained more data than there were input columns +Warning 1262 Row 2 was truncated; it contained more data than there were input columns +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +select count(*) from t1; +count(*) +2 +select count(*) from t2; +count(*) +0 +select count(*) from t1; +count(*) +2 +select count(*) from t2; +count(*) +0 +delete from t1; +delete from t2; +begin; +insert into t2 values(3),(4); +insert into t1 values(3),(4); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; +Warnings: +Warning 1262 Row 1 was truncated; it contained more data than there were input columns +Warning 1262 Row 2 was truncated; it contained more data than there were input columns +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +Warnings: +Warning 1262 Row 1 was truncated; it contained more data than there were input columns +Warning 1262 Row 2 was truncated; it contained more data than there were input columns +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +select count(*) from t1; +count(*) +4 +select count(*) from t2; +count(*) +0 +select count(*) from t1; +count(*) +4 +select count(*) from t2; +count(*) +0 +drop table t1,t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result new file mode 100644 index 00000000000..030845e89e2 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result @@ -0,0 +1,70 @@ +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; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned, +unique (b) +) ENGINE=NDB; +CREATE TABLE t2 ( +a int unsigned, # to force INSERT SELECT to have a certain order +b int unsigned +) ENGINE=NDB; +INSERT INTO t1 VALUES (NULL, 1); +INSERT INTO t1 VALUES (NULL, 2); +INSERT INTO t1 VALUES (NULL, 3); +INSERT INTO t1 VALUES (NULL, 4); +INSERT INTO t2 VALUES (1, 1); +INSERT INTO t2 VALUES (2, 2); +INSERT INTO t2 VALUES (3, 5); +INSERT INTO t2 VALUES (4, 3); +INSERT INTO t2 VALUES (5, 4); +INSERT INTO t2 VALUES (6, 6); +INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +drop table t1; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned, +unique (b) +) ENGINE=myisam; +INSERT INTO t1 VALUES (1, 1); +INSERT INTO t1 VALUES (2, 2); +INSERT INTO t1 VALUES (3, 3); +INSERT INTO t1 VALUES (4, 4); +INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +SELECT * FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +drop table t1, t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result new file mode 100644 index 00000000000..e51f0096557 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_load.result @@ -0,0 +1,42 @@ +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; +DROP DATABASE IF EXISTS TEST_DB; +CREATE DATABASE TEST_DB; +USE TEST_DB; +CREATE TABLE SUBSCRIBER +( NUMBER CHAR(12) BINARY NOT NULL, +NAME CHAR(32) BINARY NOT NULL, +GROUP_ID INT UNSIGNED NOT NULL, +LOCATION INT UNSIGNED NOT NULL, +SESSIONS INT UNSIGNED NOT NULL, +CHANGED_BY CHAR(32) BINARY NOT NULL, +CHANGED_TIME CHAR(32) BINARY NOT NULL, +PRIMARY KEY USING HASH (NUMBER)) +ENGINE = NDB; +CREATE TABLE GROUP2 +( GROUP_ID INT UNSIGNED NOT NULL, +GROUP_NAME CHAR(32) BINARY NOT NULL, +ALLOW_READ CHAR(1) BINARY NOT NULL, +ALLOW_INSERT INT UNSIGNED NOT NULL, +ALLOW_DELETE INT UNSIGNED NOT NULL, +PRIMARY KEY USING HASH (GROUP_ID)) +ENGINE = NDB; +CREATE TABLE SESSION +( NUMBER CHAR(12) BINARY NOT NULL, +SERVER_ID INT UNSIGNED NOT NULL, +DATA BINARY(2000) NOT NULL, +PRIMARY KEY USING HASH (NUMBER,SERVER_ID)) +ENGINE = NDB; +CREATE TABLE SERVER +( SUFFIX CHAR(2) BINARY NOT NULL, +SERVER_ID INT UNSIGNED NOT NULL, +NAME CHAR(32) BINARY NOT NULL, +NO_OF_READ INT UNSIGNED NOT NULL, +NO_OF_INSERT INT UNSIGNED NOT NULL, +NO_OF_DELETE INT UNSIGNED NOT NULL, +PRIMARY KEY USING HASH (SUFFIX, SERVER_ID)) +ENGINE = NDB; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result new file mode 100644 index 00000000000..db2ce27d43b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result @@ -0,0 +1,151 @@ +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; +stop slave; +reset master; +reset slave; +reset master; +create table t1(n int not null auto_increment primary key)ENGINE=NDB; +insert into t1 values (NULL); +drop table t1; +create table t1 (word char(20) not null)ENGINE=NDB; +load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines; +select count(*) from t1; +count(*) +69 +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows 1 # table_id: # +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # COMMIT +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB +master-bin.000001 # Query 1 # BEGIN +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows 1 # table_id: # +master-bin.000001 # Write_rows 1 # table_id: # +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # COMMIT +show binlog events from 106 limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB +show binlog events from 106 limit 2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB +master-bin.000001 # Query 1 # BEGIN +show binlog events from 106 limit 2,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +flush logs; +create table t3 (a int)ENGINE=NDB; +start slave; + +let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ; + +--source include/wait_slave_status.inc +flush logs; +stop slave; +create table t2 (n int)ENGINE=NDB; +insert into t2 values (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Rotate # # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002'; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB +master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB +master-bin.000002 # Query 1 # BEGIN +master-bin.000002 # Table_map 1 # table_id: # (test.t2) +master-bin.000002 # Table_map 1 # table_id: # (mysql.ndb_apply_status) +master-bin.000002 # Write_rows 1 # table_id: # +master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000002 # Query 1 # COMMIT +show binary logs; +Log_name File_size +master-bin.000001 1775 +master-bin.000002 617 +start slave; +show binary logs; +Log_name File_size +slave-bin.000001 1870 +slave-bin.000002 202 +show binlog events in 'slave-bin.000001' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB +slave-bin.000001 # Query 2 # BEGIN +slave-bin.000001 # Table_map 2 # table_id: # (test.t1) +slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) +slave-bin.000001 # Write_rows 2 # table_id: # +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Query 2 # COMMIT +slave-bin.000001 # Query 1 # use `test`; drop table t1 +slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB +slave-bin.000001 # Query 2 # BEGIN +slave-bin.000001 # Table_map 2 # table_id: # (test.t1) +slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status) +slave-bin.000001 # Write_rows 2 # table_id: # +slave-bin.000001 # Write_rows 1 # table_id: # +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Query 2 # COMMIT +slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB +slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 +show binlog events in 'slave-bin.000002' from 4; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB +slave-bin.000002 # Query 2 # BEGIN +slave-bin.000002 # Table_map 2 # table_id: # (test.t2) +slave-bin.000002 # Table_map 2 # table_id: # (mysql.ndb_apply_status) +slave-bin.000002 # Write_rows 2 # table_id: # +slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000002 # Query 2 # COMMIT +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 617 # # master-bin.000002 Yes Yes # 0 0 617 # None 0 No # No +show binlog events in 'slave-bin.000005' from 4; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +create table t1(a int auto_increment primary key, b int); +insert into t1 values (NULL, 1); +reset master; +set insert_id=5; +insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +select * from t1; +a b +1 1 +5 1 +6 1 +drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result new file mode 100644 index 00000000000..760114f3639 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result @@ -0,0 +1,55 @@ +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; +CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; +reset master; +SHOW TABLES; +Tables_in_test +t1 +INSERT INTO t1 VALUES ("row1","will go away",1); +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row1 will go away 1 +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row1 will go away 1 +SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; +@the_epoch:=MAX(epoch) + +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row1 will go away 1 +stop slave; +SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) +FROM mysql.ndb_binlog_index WHERE epoch = ; +@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) +106 master-bin1.000001 +CHANGE MASTER TO +master_port=, +master_log_file = 'master-bin1.000001', +master_log_pos = 106 ; +start slave; +INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); +DELETE FROM t1 WHERE c3 = 1; +UPDATE t1 SET c2="should go away" WHERE c3 = 2; +UPDATE t1 SET c2="C" WHERE c3 = 3; +DELETE FROM t1 WHERE c3 = 2; +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +INSERT INTO t1 VALUES ("row5","E",5); +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +row5 E 5 +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +row5 E 5 +STOP SLAVE; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result new file mode 100644 index 00000000000..5d00ae6598c --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result @@ -0,0 +1,55 @@ +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; +drop table if exists t1,t2; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=NDB; +CREATE TABLE t2 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=NDB; +INSERT INTO t1 VALUES (NULL, 0); +INSERT INTO t1 SELECT NULL, 0 FROM t1; +INSERT INTO t2 VALUES (NULL, 0), (NULL,1); +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a; +SELECT * FROM t1 ORDER BY a; +a b +1 4 +2 5 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +SELECT * FROM t1 ORDER BY a; +a b +1 4 +2 5 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +drop table t1,t2; +reset master; +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES (0); +UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b; +select * from t1; +a +3 +select * from t1; +a +3 +drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result new file mode 100644 index 00000000000..dc4e11c9c9e --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result @@ -0,0 +1,197 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; + +-------- Test for BUG#9361 -------- +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=NDB; +CREATE TABLE t2 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=NDB; +INSERT INTO t1 VALUES (NULL, 0); +INSERT INTO t1 SELECT NULL, 0 FROM t1; +INSERT INTO t2 VALUES (NULL, 0), (NULL,1); +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +UPDATE t2, (SELECT a FROM t1 ORDER BY a) AS t SET t2.b = t.a+5 ; +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 6 +2 6 +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 6 +2 6 +drop table t1,t2; + +-------- Test 1 for BUG#9361 -------- +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1 ( +a1 char(30), +a2 int, +a3 int, +a4 char(30), +a5 char(30) +); +CREATE TABLE t2 ( +b1 int, +b2 char(30) +); +INSERT INTO t1 VALUES ('Yes', 1, NULL, 'foo', 'bar'); +INSERT INTO t2 VALUES (1, 'baz'); +UPDATE t1 a, t2 +SET a.a1 = 'No' +WHERE a.a2 = +(SELECT b1 +FROM t2 +WHERE b2 = 'baz') +AND a.a3 IS NULL +AND a.a4 = 'foo' +AND a.a5 = 'bar'; +SELECT * FROM t1; +a1 a2 a3 a4 a5 +No 1 NULL foo bar +SELECT * FROM t2; +b1 b2 +1 baz +DROP TABLE t1, t2; + +-------- Test 2 for BUG#9361 -------- +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +CREATE TABLE t1 ( +i INT, +j INT, +x INT, +y INT, +z INT +); +CREATE TABLE t2 ( +i INT, +k INT, +x INT, +y INT, +z INT +); +CREATE TABLE t3 ( +j INT, +k INT, +x INT, +y INT, +z INT +); +INSERT INTO t1 VALUES ( 1, 2,13,14,15); +INSERT INTO t2 VALUES ( 1, 3,23,24,25); +INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); +UPDATE t1 AS a +INNER JOIN t2 AS b +ON a.i = b.i +INNER JOIN t3 AS c +ON a.j = c.j AND b.k = c.k +SET a.x = b.x, +a.y = b.y, +a.z = ( +SELECT sum(z) +FROM t3 +WHERE y = 34 +) +WHERE b.x = 23; +SELECT * FROM t1; +i j x y z +1 2 23 24 71 +DROP TABLE t1, t2, t3; +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +DROP TABLE IF EXISTS t2; +Warnings: +Note 1051 Unknown table 't2' +CREATE TABLE t1 ( +idp int(11) NOT NULL default '0', +idpro int(11) default NULL, +price decimal(19,4) default NULL, +PRIMARY KEY (idp) +); +CREATE TABLE t2 ( +idpro int(11) NOT NULL default '0', +price decimal(19,4) default NULL, +nbprice int(11) default NULL, +PRIMARY KEY (idpro) +); +INSERT INTO t1 VALUES +(1,1,'3.0000'), +(2,2,'1.0000'), +(3,1,'1.0000'), +(4,1,'4.0000'), +(5,3,'2.0000'), +(6,2,'4.0000'); +INSERT INTO t2 VALUES +(1,'0.0000',0), +(2,'0.0000',0), +(3,'0.0000',0); +update +t2 +join +( select idpro, min(price) as min_price, count(*) as nbr_price +from t1 +where idpro>0 and price>0 +group by idpro +) as table_price +on t2.idpro = table_price.idpro +set t2.price = table_price.min_price, +t2.nbprice = table_price.nbr_price; +select "-- MASTER AFTER JOIN --" as ""; + +-- MASTER AFTER JOIN -- +select * from t1; +idp idpro price +1 1 3.0000 +2 2 1.0000 +3 1 1.0000 +4 1 4.0000 +5 3 2.0000 +6 2 4.0000 +select * from t2; +idpro price nbprice +1 1.0000 3 +2 1.0000 2 +3 2.0000 1 +select "-- SLAVE AFTER JOIN --" as ""; + +-- SLAVE AFTER JOIN -- +select * from t1; +idp idpro price +1 1 3.0000 +2 2 1.0000 +3 1 1.0000 +4 1 4.0000 +5 3 2.0000 +6 2 4.0000 +select * from t2; +idpro price nbprice +1 1.0000 3 +2 1.0000 2 +3 2.0000 1 +DROP TABLE t1, t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result new file mode 100644 index 00000000000..6aa64973611 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result @@ -0,0 +1,16 @@ +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; +stop slave; +create table t1 (a int) engine=NDB; +reset slave; +start slave; +stop slave; +start slave; +select max(a) from t1; +max(a) +8000 +drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result new file mode 100644 index 00000000000..4e28a7e5865 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_rep_ignore.result @@ -0,0 +1,54 @@ +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; +DROP DATABASE IF EXISTS replica; +CREATE DATABASE replica; +CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +USE replica; +CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +USE test; +INSERT INTO t1 VALUES(1, repeat('abc',10)); +INSERT INTO t2 VALUES(1, repeat('abc',10)); +SHOW TABLES; +Tables_in_test +t1 +t2 +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +SELECT COUNT(*) FROM t2; +COUNT(*) +1 +USE replica; +INSERT INTO replica.t1 VALUES(2, repeat('def',200)); +INSERT INTO replica.t2 VALUES(2, repeat('def',200)); +SHOW TABLES; +Tables_in_replica +t1 +t2 +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +SELECT COUNT(*) FROM t2; +COUNT(*) +1 +SHOW TABLES; +Tables_in_test +USE replica; +SHOW TABLES; +Tables_in_replica +t2 +SELECT COUNT(*) FROM t2; +COUNT(*) +1 +USE test; +SHOW TABLES; +Tables_in_test +USE test; +DROP TABLE t1, t2; +DROP DATABASE IF EXISTS replica; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result new file mode 100644 index 00000000000..56bb31e329d --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result @@ -0,0 +1,55 @@ +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; +CREATE TABLE t1 (word CHAR(20) NOT NULL); +LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; +LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/std_data/words.dat' INTO TABLE t1; +SELECT * FROM t1 ORDER BY word LIMIT 10; +word +Aarhus +Aarhus +Aarhus +Aarhus +Aaron +Aaron +Aaron +Aaron +Ababa +Ababa +STOP SLAVE; +SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); +START SLAVE; +SET PASSWORD FOR root@"localhost" = PASSWORD(''); +CREATE TABLE t3(n INT); +INSERT INTO t3 VALUES(1),(2); +SELECT * FROM t3 ORDER BY n; +n +1 +2 +SELECT SUM(LENGTH(word)) FROM t1; +SUM(LENGTH(word)) +1022 +DROP TABLE t1,t3; +CREATE TABLE t1 (n INT) ENGINE=NDB; +RESET MASTER; +STOP SLAVE; +RESET SLAVE; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +LOCK TABLES t1 READ; +START SLAVE; +UNLOCK TABLES; +SELECT COUNT(*) FROM t1; +COUNT(*) +5000 +DROP TABLE t1; +CREATE TABLE t1 (n INT); +INSERT INTO t1 VALUES(3456); +SELECT n FROM t1; +n +3456 +DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result new file mode 100644 index 00000000000..d7922c61b52 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result @@ -0,0 +1,49 @@ +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; +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=NDBCLUSTER; +CREATE PROCEDURE test.p1() +BEGIN +INSERT INTO test.t1 VALUES (4); +SELECT get_lock("test", 100); +UPDATE test.t1 set a=a+4 WHERE a=4; +END| +CREATE PROCEDURE test.p2() +BEGIN +UPDATE test.t1 SET a=a+1; +END| +SELECT get_lock("test", 200); +get_lock("test", 200) +1 +CALL test.p1(); +CALL test.p2(); +SELECT release_lock("test"); +release_lock("test") +1 +SELECT * FROM test.t1; +a +5 +SELECT * FROM test.t1; +a +5 +DROP TABLE IF EXISTS test.t1; +CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=NDBCLUSTER; +CALL test.p2(); +CALL test.p1(); +get_lock("test", 100) +0 +SELECT * FROM test.t1; +a +8 +SELECT * FROM test.t1; +a +8 +DROP PROCEDURE IF EXISTS test.p1; +DROP PROCEDURE IF EXISTS test.p2; +DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result new file mode 100644 index 00000000000..482d43c8f10 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result @@ -0,0 +1,46 @@ +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; +create database if not exists mysqltest1; +DROP PROCEDURE IF EXISTS mysqltest1.p1; +DROP PROCEDURE IF EXISTS mysqltest1.p2; +DROP TABLE IF EXISTS mysqltest1.t2; +DROP TABLE IF EXISTS mysqltest1.t1; +CREATE TABLE IF NOT EXISTS mysqltest1.t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=NDBCLUSTER; +CREATE TABLE IF NOT EXISTS mysqltest1.t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=NDBCLUSTER; +CREATE PROCEDURE mysqltest1.p1() +BEGIN +DECLARE done INT DEFAULT 0; +DECLARE spa CHAR(16); +DECLARE spb INT; +DECLARE cur1 CURSOR FOR SELECT name, +(YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5) +show binlog events from limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 Query 1 # use `test`; insert into t1 values (1,2) +show binlog events from limit 1,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Xid 1 445 COMMIT /* XID */ +begin; +insert into t1 values (2,3); +insert into t2 values (3,4); +commit; +select @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status; +@start_pos:=start_pos @end_pos:=end_pos + +show binlog events from limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 Query 1 # use `test`; BEGIN +show binlog events from limit 1,2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; insert into t1 values (2,3) +master-bin.000001 # Query # # use `test`; insert into t2 values (3,4) +show binlog events from limit 3,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Xid 1 COMMIT /* XID */ diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result new file mode 100644 index 00000000000..f2797eaa623 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result @@ -0,0 +1,96 @@ +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; +STOP SLAVE; +CREATE DATABASE ndbsynctest; +USE ndbsynctest; +CREATE DATABASE ndbsynctest; +USE ndbsynctest; +CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ; +INSERT INTO t1 VALUES (1,1,"row1"),(0,1,"row2"),(1,0,"row3"),(0,0,"row4"); +CREATE TABLE t2 (c1 CHAR(15), c2 BIT(1) NOT NULL, c3 BIT(1) NOT NULL, PRIMARY KEY(c1)) ENGINE = NDB ; +INSERT INTO t2 VALUES ("ABC",1,1),("BCDEF",0,1),("CD",1,0),("DEFGHIJKL",0,0); +SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; +hex(c1) hex(c2) c3 +1 1 row1 +0 1 row2 +1 0 row3 +0 0 row4 +SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; +hex(c2) hex(c3) c1 +1 1 ABC +0 1 BCDEF +1 0 CD +0 0 DEFGHIJKL +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +DROP TABLE test.backup_info; +UPDATE t1 SET c2=0 WHERE c3="row2"; +SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; +hex(c1) hex(c2) c3 +1 1 row1 +0 0 row2 +1 0 row3 +0 0 row4 +SHOW TABLES; +Tables_in_ndbsynctest +DROP DATABASE ndbsynctest; +CREATE DATABASE ndbsynctest; +USE ndbsynctest; +SHOW TABLES; +Tables_in_ndbsynctest +t1 +t2 +SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; +hex(c1) hex(c2) c3 +1 1 row1 +0 1 row2 +1 0 row3 +0 0 row4 +SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; +hex(c2) hex(c3) c1 +1 1 ABC +0 1 BCDEF +1 0 CD +0 0 DEFGHIJKL +SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; +@the_epoch:=MAX(epoch) + +SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) +FROM mysql.ndb_binlog_index WHERE epoch > ORDER BY epoch ASC LIMIT 1; +@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) + master-bin.000001 +CHANGE MASTER TO +master_log_file = 'master-bin.000001', +master_log_pos = ; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No +SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; +hex(c1) hex(c2) c3 +1 1 row1 +0 0 row2 +1 0 row3 +0 0 row4 +SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; +hex(c2) hex(c3) c1 +1 1 ABC +0 1 BCDEF +1 0 CD +0 0 DEFGHIJKL +DROP DATABASE ndbsynctest; +STOP SLAVE; +reset master; +select * from mysql.ndb_binlog_index; +Position File epoch inserts updates deletes schemaops +reset slave; +select * from mysql.ndb_apply_status; +server_id epoch log_name start_pos end_pos diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result new file mode 100644 index 00000000000..ba5f0dea91c --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result @@ -0,0 +1,30 @@ +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; +DROP TRIGGER test.t1_bi_t2; +DROP TABLE IF EXISTS test.t1; +DROP TABLE IF EXISTS test.t2; +CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=NDB; +CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=NDB; +CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)// +INSERT INTO test.t2 VALUES (1, 0.0); +INSERT INTO test.t2 VALUES (1, 0.0); +Got one of the listed errors +select * from test.t1; +n d +1 1.234 +select * from test.t2; +n f +1 0 +select * from test.t1; +n d +1 1.234 +select * from test.t2; +n f +1 0 +DROP TRIGGER test.t1_bi_t2; +DROP TABLE test.t1; +DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result b/mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result new file mode 100644 index 00000000000..5de6914882d --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndbapi_multi.result @@ -0,0 +1,8 @@ +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; +Running ndbapi_simple_dual +Running mgmapi_logevent diff --git a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result new file mode 100644 index 00000000000..5519e0dcd0c --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result @@ -0,0 +1,418 @@ +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; +CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'NDB' ; +SELECT * FROM t1; +C1 C2 +SELECT * FROM t1; +C1 C2 +INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X'); +INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A'); +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A A +A B +A C +X X +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A A +A B +A C +X X +X Y +X Z +DELETE FROM t1 WHERE C1 = C2; +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A C +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A C +X Y +X Z +UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A I +X Y +X Z +SELECT * FROM t1 ORDER BY C1,C2; +C1 C2 +A B +A I +X Y +X Z +UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N'; +SELECT * FROM t1 ORDER BY c1,c2; +C1 C2 +A B +A I +X Y +X Z +SELECT * FROM t1 ORDER BY c1,c2; +C1 C2 +A B +A I +X Y +X Z +CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'NDB' ; +INSERT INTO t2 +VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25), +(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81); +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 2 +2 A 4 +3 A 9 +4 A 15 +5 A 25 +6 A 35 +7 A 50 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +2 A 4 +3 A 9 +5 A 25 +8 A 64 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 2 +2 A 4 +3 A 9 +4 A 15 +5 A 25 +6 A 35 +7 A 50 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +2 A 4 +3 A 9 +5 A 25 +8 A 64 +9 A 81 +UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1; +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999; +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +4 A 16 +5 A 25 +6 A 36 +7 A 49 +8 A 64 +9 A 81 +DELETE FROM t2 WHERE c1 % 4 = 0; +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +5 A 25 +6 A 36 +7 A 49 +9 A 81 +SELECT * FROM t2 ORDER BY c1,c2; +c1 c12 c2 +1 A 1 +2 A 4 +3 A 9 +5 A 25 +6 A 36 +7 A 49 +9 A 81 +UPDATE t2 SET c12='X'; +CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'NDB' ; +INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1); +INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2); +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A A 3 B 2 +A B 1 B 1 +A C 1 B 2 +X X 3 B 1 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A A 3 B 2 +A B 1 B 1 +A C 1 B 2 +X X 3 B 1 +X Y 2 B 1 +X Z 2 B 2 +DELETE FROM t3 WHERE C1 = C2; +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A C 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A C 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A I 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +SELECT * FROM t3 ORDER BY C1,C2; +C1 C2 pk1 C3 pk2 +A B 1 B 1 +A I 1 B 2 +X Y 2 B 1 +X Z 2 B 2 +CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'NDB' ; +INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); +INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +X X 3 +A C 4 +X Z 5 +A A 6 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +X X 3 +A C 4 +X Z 5 +A A 6 +DELETE FROM t6 WHERE C1 = C2; +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A C 4 +X Z 5 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A C 4 +X Z 5 +UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C'; +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A I 4 +X Z 5 +SELECT * FROM t6 ORDER BY C3; +C1 C2 C3 +A B 1 +X Y 2 +A I 4 +X Z 5 +CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'NDB' ; +INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3); +INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6); +UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1; +SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; +C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 +X Q 2 1 R 1 X Y 2 S 1 +X Q 2 1 R 1 X Z 2 S 2 +X Q 2 2 R 4 X Y 2 S 1 +X Q 2 2 R 4 X Z 2 S 2 +X Q 2 3 R 9 X Y 2 S 1 +X Q 2 3 R 9 X Z 2 S 2 +X Q 2 5 R 25 X Y 2 S 1 +X Q 2 5 R 25 X Z 2 S 2 +X Q 2 6 R 36 X Y 2 S 1 +X Q 2 6 R 36 X Z 2 S 2 +X Q 2 7 R 49 X Y 2 S 1 +X Q 2 7 R 49 X Z 2 S 2 +X Q 2 9 R 81 X Y 2 S 1 +X Q 2 9 R 81 X Z 2 S 2 +X Q 3 1 R 1 X Y 2 S 1 +X Q 3 1 R 1 X Z 2 S 2 +X Q 3 2 R 4 X Y 2 S 1 +X Q 3 2 R 4 X Z 2 S 2 +X Q 3 3 R 9 X Y 2 S 1 +X Q 3 3 R 9 X Z 2 S 2 +X Q 3 5 R 25 X Y 2 S 1 +X Q 3 5 R 25 X Z 2 S 2 +X Q 3 6 R 36 X Y 2 S 1 +X Q 3 6 R 36 X Z 2 S 2 +X Q 3 7 R 49 X Y 2 S 1 +X Q 3 7 R 49 X Z 2 S 2 +X Q 3 9 R 81 X Y 2 S 1 +X Q 3 9 R 81 X Z 2 S 2 +X Q 5 1 R 1 X Y 2 S 1 +X Q 5 1 R 1 X Z 2 S 2 +X Q 5 2 R 4 X Y 2 S 1 +X Q 5 2 R 4 X Z 2 S 2 +X Q 5 3 R 9 X Y 2 S 1 +X Q 5 3 R 9 X Z 2 S 2 +X Q 5 5 R 25 X Y 2 S 1 +X Q 5 5 R 25 X Z 2 S 2 +X Q 5 6 R 36 X Y 2 S 1 +X Q 5 6 R 36 X Z 2 S 2 +X Q 5 7 R 49 X Y 2 S 1 +X Q 5 7 R 49 X Z 2 S 2 +X Q 5 9 R 81 X Y 2 S 1 +X Q 5 9 R 81 X Z 2 S 2 +SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2; +C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2 +X Q 2 1 R 1 X Y 2 S 1 +X Q 2 1 R 1 X Z 2 S 2 +X Q 2 2 R 4 X Y 2 S 1 +X Q 2 2 R 4 X Z 2 S 2 +X Q 2 3 R 9 X Y 2 S 1 +X Q 2 3 R 9 X Z 2 S 2 +X Q 2 5 R 25 X Y 2 S 1 +X Q 2 5 R 25 X Z 2 S 2 +X Q 2 6 R 36 X Y 2 S 1 +X Q 2 6 R 36 X Z 2 S 2 +X Q 2 7 R 49 X Y 2 S 1 +X Q 2 7 R 49 X Z 2 S 2 +X Q 2 9 R 81 X Y 2 S 1 +X Q 2 9 R 81 X Z 2 S 2 +X Q 3 1 R 1 X Y 2 S 1 +X Q 3 1 R 1 X Z 2 S 2 +X Q 3 2 R 4 X Y 2 S 1 +X Q 3 2 R 4 X Z 2 S 2 +X Q 3 3 R 9 X Y 2 S 1 +X Q 3 3 R 9 X Z 2 S 2 +X Q 3 5 R 25 X Y 2 S 1 +X Q 3 5 R 25 X Z 2 S 2 +X Q 3 6 R 36 X Y 2 S 1 +X Q 3 6 R 36 X Z 2 S 2 +X Q 3 7 R 49 X Y 2 S 1 +X Q 3 7 R 49 X Z 2 S 2 +X Q 3 9 R 81 X Y 2 S 1 +X Q 3 9 R 81 X Z 2 S 2 +X Q 5 1 R 1 X Y 2 S 1 +X Q 5 1 R 1 X Z 2 S 2 +X Q 5 2 R 4 X Y 2 S 1 +X Q 5 2 R 4 X Z 2 S 2 +X Q 5 3 R 9 X Y 2 S 1 +X Q 5 3 R 9 X Z 2 S 2 +X Q 5 5 R 25 X Y 2 S 1 +X Q 5 5 R 25 X Z 2 S 2 +X Q 5 6 R 36 X Y 2 S 1 +X Q 5 6 R 36 X Z 2 S 2 +X Q 5 7 R 49 X Y 2 S 1 +X Q 5 7 R 49 X Z 2 S 2 +X Q 5 9 R 81 X Y 2 S 1 +X Q 5 9 R 81 X Z 2 S 2 +CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'NDB' ; +INSERT INTO t4 SET C1 = 1; +SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; +C1 HEX(B1) HEX(B2) +1 NULL 0 +SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; +C1 HEX(B1) HEX(B2) +1 NULL 0 +CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'NDB' ; +--- on slave: original values --- +INSERT INTO t7 VALUES (1,3), (2,6), (3,9); +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 3 +2 6 +3 9 +--- on master: new values inserted --- +INSERT INTO t7 VALUES (1,2), (2,4), (3,6); +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 2 +2 4 +3 6 +--- on slave: old values should be overwritten by replicated values --- +SELECT * FROM t7 ORDER BY C1; +C1 C2 +1 2 +2 4 +3 6 +--- on master --- +CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'NDB' ; +INSERT INTO t8 VALUES (99,99,99); +INSERT INTO t8 VALUES (99,22,33); +ERROR 23000: Duplicate entry '99' for key 'PRIMARY' +INSERT INTO t8 VALUES (11,99,33); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +INSERT INTO t8 VALUES (11,22,99); +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +SELECT * FROM t8 ORDER BY a; +a b c +99 99 99 +--- on slave --- +SELECT * FROM t8 ORDER BY a; +a b c +99 99 99 +INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); +SELECT * FROM t8 ORDER BY a; +a b c +1 2 3 +2 4 6 +3 6 9 +99 99 99 +--- on master --- +INSERT INTO t8 VALUES (2,4,8); +--- on slave --- +SELECT * FROM t8 ORDER BY a; +a b c +1 2 3 +2 4 8 +3 6 9 +99 99 99 +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result new file mode 100644 index 00000000000..62ace911e45 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result @@ -0,0 +1,95 @@ +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; +**** On Master **** +CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1 ORDER BY a,b; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1 ORDER BY a,b; +a b +1 1 +2 2 +3 3 +**** On Master **** +TRUNCATE TABLE t1; +SELECT * FROM t1 ORDER BY a,b; +a b +**** On Slave **** +SELECT * FROM t1 ORDER BY a,b; +a b +**** On Master **** +DROP TABLE t1; +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 223 Query 1 287 BEGIN +master-bin.000001 287 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 327 Table_map 1 98 table_id: # (mysql.ndb_apply_status) +master-bin.000001 385 Write_rows 1 157 table_id: # +master-bin.000001 444 Write_rows 1 195 table_id: # +master-bin.000001 482 Write_rows 1 233 table_id: # flags: STMT_END_F +master-bin.000001 520 Query 1 585 COMMIT +master-bin.000001 585 Query 1 665 use `test`; TRUNCATE TABLE t1 +master-bin.000001 665 Query 1 741 use `test`; DROP TABLE t1 +**** On Master **** +CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1 ORDER BY a,b; +a b +1 1 +2 2 +**** On Slave **** +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1 ORDER BY a,b; +a b +1 1 +2 2 +3 3 +**** On Master **** +DELETE FROM t1; +SELECT * FROM t1 ORDER BY a,b; +a b +**** On Slave **** +SELECT * FROM t1 ORDER BY a,b; +a b +3 3 +**** On Master **** +DROP TABLE t1; +SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 223 Query 1 287 BEGIN +master-bin.000001 287 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 327 Table_map 1 98 table_id: # (mysql.ndb_apply_status) +master-bin.000001 385 Write_rows 1 157 table_id: # +master-bin.000001 444 Write_rows 1 195 table_id: # +master-bin.000001 482 Write_rows 1 233 table_id: # flags: STMT_END_F +master-bin.000001 520 Query 1 585 COMMIT +master-bin.000001 585 Query 1 665 use `test`; TRUNCATE TABLE t1 +master-bin.000001 665 Query 1 741 use `test`; DROP TABLE t1 +master-bin.000001 741 Query 1 858 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 858 Query 1 922 BEGIN +master-bin.000001 922 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 962 Table_map 1 98 table_id: # (mysql.ndb_apply_status) +master-bin.000001 1020 Write_rows 1 157 table_id: # +master-bin.000001 1079 Write_rows 1 195 table_id: # +master-bin.000001 1117 Write_rows 1 233 table_id: # flags: STMT_END_F +master-bin.000001 1155 Query 1 1220 COMMIT +master-bin.000001 1220 Query 1 1284 BEGIN +master-bin.000001 1284 Table_map 1 40 table_id: # (test.t1) +master-bin.000001 1324 Table_map 1 98 table_id: # (mysql.ndb_apply_status) +master-bin.000001 1382 Write_rows 1 157 table_id: # +master-bin.000001 1441 Delete_rows 1 191 table_id: # +master-bin.000001 1475 Delete_rows 1 225 table_id: # flags: STMT_END_F +master-bin.000001 1509 Query 1 1574 COMMIT +master-bin.000001 1574 Query 1 1650 use `test`; DROP TABLE t1 diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def new file mode 100644 index 00000000000..b238c8ac9c5 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/disabled.def @@ -0,0 +1,27 @@ +############################################################################## +# +# List the test cases that are to be disabled temporarily. +# +# Separate the test case name and the comment with ':'. +# +# : BUG# +# +# Do not use any TAB characters for whitespace. +# +############################################################################## + + +rpl_ndb_circular_simplex : BUG#27972 2007-04-20 mats Slave cannot start where it stopped +rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated +rpl_ndb_2myisam : BUG#19227 Seems to pass currently +rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD +rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master +rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement +rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement +#rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly +rpl_ndb_ddl : BUG#28798 2007-05-31 lars Valgrind failure in NDB + + +# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open + +#rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt new file mode 100644 index 00000000000..701dddb075b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt @@ -0,0 +1 @@ +--default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt new file mode 100644 index 00000000000..d8857e54be2 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt @@ -0,0 +1 @@ +--innodb --default-storage-engine=innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test new file mode 100644 index 00000000000..e09d8b6685b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test @@ -0,0 +1,16 @@ +############################################################# +# Author: JBM +# Date: 2006-02-24 +# Purpose: Trying to test ability to replicate from cluster +# to innodb, or myisam, or replicate from innodb/myisam to +# cluster slave. Due to limitations I have created wrappers +# to be able to use the same code for all these different +# test and to have control over the tests. +############################################################## +-- source include/have_ndb.inc +-- source include/master-slave.inc +connection slave; +-- source include/have_innodb.inc +connection master; +SET storage_engine=ndb; +--source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt new file mode 100644 index 00000000000..701dddb075b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt @@ -0,0 +1 @@ +--default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt new file mode 100644 index 00000000000..6035ce27c46 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt @@ -0,0 +1 @@ +--default-storage-engine=myisam diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test new file mode 100644 index 00000000000..abbe419bc02 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test @@ -0,0 +1,13 @@ +############################################################# +# Author: JBM +# Date: 2006-02-24 +# Purpose: Trying to test ability to replicate from cluster +# to innodb, or myisam, or replicate from innodb/myisam to +# cluster slave. Due to limitations I have created wrappers +# to be able to use the same code for all these different +# test and to have control over the tests. +############################################################## +-- source include/have_ndb.inc +-- source include/master-slave.inc +SET storage_engine=ndb; +--source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test new file mode 100644 index 00000000000..c6fc218beed --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_UUID.test @@ -0,0 +1,6 @@ +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +######################################################## +--source include/have_ndb.inc +let $engine_type=NDB; +--source extra/rpl_tests/rpl_row_UUID.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test new file mode 100644 index 00000000000..53bb7e764f1 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_auto_inc.test @@ -0,0 +1,118 @@ +# +# Test of auto_increment in CRBR +# +##################################### +# By: JBM +# Date: 2006-02-10 +# Change: Augmented test to use with cluster +##################################### +--source include/have_ndb.inc +--source include/master-slave.inc +--source include/have_binlog_format_mixed_or_row.inc + +--echo ***************** Test 1 ************************ +--echo +CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; +insert into t1 values (NULL,1),(NULL,2),(NULL,3); +--echo ******* Select from Master ************* +--echo +select * from t1 ORDER BY a; + + +sync_slave_with_master; +--echo ******* Select from Slave ************* +--echo +select * from t1 ORDER BY a; +connection master; +drop table t1; + +create table t1 (a int not null auto_increment,b int, primary key (a)) engine=NDB; +insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); +delete from t1 where b=4; +insert into t1 values (NULL,5),(NULL,6); +--echo ******* Select from Master ************* +--echo +select * from t1 ORDER BY a; + +sync_slave_with_master; +--echo ******* Select from Slave ************* +--echo +select * from t1 ORDER BY a; +connection master; + +drop table t1; + +create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; +# Insert with 2 insert statements to get better testing of logging +insert into t1 values (NULL),(5),(NULL); +insert into t1 values (250),(NULL); +--echo ******* Select from Master ************* +--echo +select * from t1 ORDER BY a; +insert into t1 values (1000); +set @@insert_id=400; +insert into t1 values(NULL),(NULL); +--echo ******* Select from Master ************* +--echo +select * from t1 ORDER BY a; + +sync_slave_with_master; +--echo ******* Select from Slave ************* +--echo +select * from t1 ORDER BY a; +connection master; +drop table t1; + +create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; +# Insert with 2 insert statements to get better testing of logging +insert into t1 values (NULL),(5),(NULL),(NULL); +insert into t1 values (500),(NULL),(502),(NULL),(600); +--echo ******* Select from Master ************* +--echo +select * from t1 ORDER BY a; +set @@insert_id=600; +# We expect a duplicate key error that we will ignore below +--error 1022 +insert into t1 values(600),(NULL),(NULL); +set @@insert_id=600; +insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); +--echo ******* Select from Master ************* +--echo +select * from t1 ORDER BY a; + +sync_slave_with_master; +--echo ******* Select from Slave ************* +--echo +select * from t1 ORDER BY a; +connection master; +drop table t1; + +# +# Test that auto-increment works when slave has rows in the table +# + +create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; + +sync_slave_with_master; +insert into t1 values(2),(12),(22),(32),(42); +connection master; + +insert into t1 values (NULL),(NULL); +insert into t1 values (3),(NULL),(NULL); +--echo ******* Select from Master ************* +--echo +select * from t1 ORDER BY a; + +sync_slave_with_master; +--echo ******* Select from Slave ************* +--echo +--echo ** Slave should have 2, 12, 22, 32, 42 ** +--echo ** Master will have 2 but not 12, 22, 32, 42 ** +--echo +select * from t1 ORDER BY a; +connection master; + +drop table t1; + +# End cleanup +sync_slave_with_master; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test new file mode 100644 index 00000000000..c1448573f5b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test @@ -0,0 +1,181 @@ +# +# Currently this test only runs in the source tree with the +# ndb/test programs compiled. +# invoke with: ./mysql-test-run --ndb-extra-test --do-test=rpl_ndb_bank +# +# 1. start a "bank" application running on the master cluster +# 2. perform online sync of slave +# 3. periodically check consistency of slave +# 4. stop the bank application +# 5. check that the slave and master BANK databases are the same +# + +--source include/have_ndb.inc +--source include/have_ndb_extra.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +# kill any trailing processes +--system killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL || true + +--disable_warnings +# initialize master +--connection master +CREATE DATABASE IF NOT EXISTS BANK; +DROP DATABASE BANK; +CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; +--enable_warnings + +# +# These tables should correspond to the table definitions in +# storage/ndb/test/src/NDBT_Tables.cpp +# +--connection master +USE BANK; +CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, + ACCOUNT_TYPE INT UNSIGNED NOT NULL, + BALANCE INT UNSIGNED NOT NULL, + DEPOSIT_COUNT INT UNSIGNED NOT NULL, + DEPOSIT_SUM INT UNSIGNED NOT NULL, + WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, + WITHDRAWAL_SUM INT UNSIGNED NOT NULL, + PURGED INT UNSIGNED NOT NULL, + PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) + ENGINE = NDB; + +CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, + OWNER INT UNSIGNED NOT NULL, + BALANCE INT UNSIGNED NOT NULL, + ACCOUNT_TYPE INT UNSIGNED NOT NULL, + PRIMARY KEY USING HASH (ACCOUNT_ID)) + ENGINE = NDB; + +CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, + ACCOUNT INT UNSIGNED NOT NULL, + ACCOUNT_TYPE INT UNSIGNED NOT NULL, + OTHER_ACCOUNT INT UNSIGNED NOT NULL, + TRANSACTION_TYPE INT UNSIGNED NOT NULL, + TIME BIGINT UNSIGNED NOT NULL, + AMOUNT INT UNSIGNED NOT NULL, + PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) + ENGINE = NDB; + +CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, + VALUE BIGINT UNSIGNED NOT NULL, + PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) + ENGINE = NDB; + +CREATE TABLE ACCOUNT_TYPE ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, + DESCRIPTION CHAR(64) NOT NULL, + PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) + ENGINE = NDB; + +# +# create "BANK" application +# +--exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankCreator >> $NDB_TOOLS_OUTPUT + +# +# start main loop +# repeat backup-restore-check +# + +# set this high if testing to run many syncs in loop +--let $2=1 +while ($2) +{ + +# +# start "BANK" application +# +--exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankTimer -w 5 >> $NDB_TOOLS_OUTPUT & +--exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankMakeGL >> $NDB_TOOLS_OUTPUT & +--exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankTransactionMaker >> $NDB_TOOLS_OUTPUT & + +# +# let the "BANK" run for a while +# +--sleep 5 + +--disable_warnings +# initialize slave for sync +--connection slave +STOP SLAVE; +RESET SLAVE; +# to make sure we drop any ndbcluster tables +CREATE DATABASE IF NOT EXISTS BANK; +DROP DATABASE BANK; +# create database +CREATE DATABASE BANK; +--enable_warnings + +# +# Time to sync the slave: +# start by taking a backup on master +--connection master +RESET MASTER; +--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT + +# there is no neat way to find the backupid, this is a hack to find it... +--exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat +CREATE TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM mysql.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; +--exec rm $MYSQLTEST_VARDIR/tmp.dat || true +--replace_column 1 +SELECT @the_backup_id:=backup_id FROM mysql.backup_info; +let the_backup_id=`select @the_backup_id`; + +# restore on slave, first check that nothing is there +--connection slave +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -p 8 -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT + +# +# now setup replication to continue from last epoch +--source include/ndb_setup_slave.inc +--connection slave +START SLAVE; + + +# +# Now loop and check consistency every 2 seconds on slave +# +--connection slave +--let $1=10 +while ($1) +{ + --sleep 2 + --replace_result $MASTER_MYPORT MASTER_PORT + --replace_column 1 7 8 9 16 22 23 33 + SHOW SLAVE STATUS; + STOP SLAVE; + --exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT_SLAVE ../storage/ndb/test/ndbapi/bank/bankValidateAllGLs >> $NDB_TOOLS_OUTPUT + START SLAVE; + --dec $1 +} + +# +# Stop transactions +# +--exec killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL + +# +# Check that the databases are the same on slave and master +# 1. dump database BANK on both master and slave +# 2. compare, there should be no difference +# +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info BANK ACCOUNT_TYPE ACCOUNT GL TRANSACTION > $MYSQLTEST_VARDIR/tmp/master_BANK.sql +--connection master +use test; +create table t1 (a int primary key) engine=ndb; +insert into t1 values (1); +--sync_slave_with_master +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info BANK ACCOUNT_TYPE ACCOUNT GL TRANSACTION > $MYSQLTEST_VARDIR/tmp/slave_BANK.sql +--connection master +drop table t1; + +diff_files $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BANK.sql; + + --dec $2 +} diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test new file mode 100644 index 00000000000..e485b1d1bde --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test @@ -0,0 +1,261 @@ +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + + + +# +# Bug #11087 +# +# connect to the master and create tabe t1 in gotoslave database +--connection master +CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', + `nom` char(4) default NULL, + `prenom` char(4) default NULL, + PRIMARY KEY (`nid`)) + ENGINE=ndbcluster DEFAULT CHARSET=latin1; + +INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); +select * from t1 order by nid; + +--sync_slave_with_master +# connect to slave and ensure data it there. +--connection slave +select * from t1 order by nid; + +--connection master +delete from t1; +INSERT INTO t1 VALUES(1,"XYZ2","ABC2"); +# Make sure all rows are on the master +select * from t1 order by nid; + +# make sure all rows are on the slave. +--sync_slave_with_master +--connection slave +# Bug #11087 would have row with nid 2 missing +select * from t1 order by nid; + +--connection master +delete from t1; +insert into t1 values(1,"AA", "AA"); +insert into t1 values(2,"BB", "BB"); +insert into t1 values(3,"CC", "CC"); +insert into t1 values(4,"DD", "DD"); + +begin; +# delete+insert = update +delete from t1 where nid = 1; +insert into t1 values (1,"A2", "A2"); + +# update+delete = delete +update t1 set nom="B2" where nid = 2; +delete from t1 where nid = 2; + +# multi-update +update t1 set nom = "D2" where nid = 4; +delete from t1 where nid = 4; +insert into t1 values (4, "D3", "D3"); +update t1 set nom = "D4" where nid = 4; + +# insert+delete = nothing +insert into t1 values (5, "EE", "EE"); +delete from t1 where nid = 5; + +commit; +select * from t1 order by 1; +--sync_slave_with_master +--connection slave +select * from t1 order by 1; +--connection master +DROP table t1; + +# +# Test replication of table with no primary key +# +--connection master +CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', + `nom` char(4) default NULL, + `prenom` char(4) default NULL) + ENGINE=ndbcluster DEFAULT CHARSET=latin1; + +INSERT INTO t1 VALUES(1,"XYZ1","ABC1"),(2,"AAA","BBB"),(3,"CCC","DDD"); +select * from t1 order by nid; + +--sync_slave_with_master +# connect to slave and ensure data it there. +--connection slave +select * from t1 order by nid; + +--connection master +delete from t1 where nid = 2; +INSERT INTO t1 VALUES(4,"EEE","FFF"); +# Make sure all rows are on the master +select * from t1 order by nid; + +# make sure all rows are on the slave. +--sync_slave_with_master +--connection slave +select * from t1 order by nid; + +--connection master +UPDATE t1 set nid=nid+1; +UPDATE t1 set nom="CCP" where nid = 4; +select * from t1 order by nid; + +# make sure all rows are on the slave. +--sync_slave_with_master +--connection slave +select * from t1 order by nid; + +--connection master +DROP table t1; + +# +# Bug #27378 update becomes delete on slave +# + +--connection master +CREATE TABLE `t1` ( + `prid` int(10) unsigned NOT NULL, + `id_type` enum('IMSI','SIP') NOT NULL, + `fkimssub` varchar(50) NOT NULL, + `user_id` varchar(20) DEFAULT NULL, + `password` varchar(20) DEFAULT NULL, + `ptg_nbr` varchar(20) DEFAULT NULL, + `old_tmsi` int(10) unsigned DEFAULT NULL, + `new_tmsi` int(10) unsigned DEFAULT NULL, + `dev_capability` int(10) unsigned DEFAULT NULL, + `dev_oid` bigint(20) unsigned DEFAULT NULL, + `lac_cell_id` bigint(20) unsigned DEFAULT NULL, + `ms_classmark1` int(10) unsigned DEFAULT NULL, + `cipher_key` int(10) unsigned DEFAULT NULL, + `priid_master` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`prid`), + UNIQUE KEY `fkimssub` (`fkimssub`,`ptg_nbr`) USING HASH +) ENGINE=ndbcluster DEFAULT CHARSET=latin1; + +INSERT INTO `t1` VALUES (183342,'IMSI','config3_sub_2Privates_3Publics_imssub_36668','user_id_73336','user_id_73336','73336',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(47617,'IMSI','config3_sub_2Privates_3Publics_imssub_9523','user_id_19046','user_id_19046','19046',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(200332,'IMSI','config3_sub_2Privates_3Publics_imssub_40066','user_id_80132','user_id_80132','80132',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(478882,'IMSI','config3_sub_2Privates_3Publics_imssub_95776','user_id_191552','user_id_191552','191552',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(490146,'IMSI','config3_sub_2Privates_3Publics_imssub_98029','user_id_196057','user_id_196057','196057',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(499301,'IMSI','config3_sub_2Privates_3Publics_imssub_99860','user_id_199719','user_id_199719','199719',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(506101,'IMSI','config3_sub_2Privates_3Publics_imssub_101220','user_id_202439','user_id_202439','202439',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(510142,'IMSI','config3_sub_2Privates_3Publics_imssub_102028','user_id_204056','user_id_204056','204056',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(515871,'IMSI','config3_sub_2Privates_3Publics_imssub_103174','user_id_206347','user_id_206347','206347',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(209842,'IMSI','config3_sub_2Privates_3Publics_imssub_41968','user_id_83936','user_id_83936','83936',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(365902,'IMSI','config3_sub_2Privates_3Publics_imssub_73180','user_id_146360','user_id_146360','146360',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(11892,'IMSI','config3_sub_2Privates_3Publics_imssub_2378','user_id_4756','user_id_4756','4756',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL); + +select count(*) from t1; + +--sync_slave_with_master +--connection slave +select count(*) from t1; + +--connection master +update t1 set dev_oid=dev_oid+1; +select count(*) from t1; + +--sync_slave_with_master +--connection slave +select count(*) from t1; + +--connection master +DROP table t1; + +################################################################## +# +# Check that retries are made on the slave on some temporary errors +# + +# +# 1. Deadlock +# +--connection master +CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', + `nom` char(4) default NULL, + `prenom` char(4) default NULL, + PRIMARY KEY USING HASH (`nid`)) + ENGINE=ndbcluster DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); + +# cause a lock on that row on the slave +--sync_slave_with_master +--connection slave +--echo **** On Slave **** +BEGIN; +UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; + +# set number of retries low so we fail the retries +set GLOBAL slave_transaction_retries=1; + +# now do a change to this row on the master +# will deadlock on the slave because of lock above +--connection master +--echo **** On Master **** +UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; + +# wait for deadlock to be detected +# sleep longer than dead lock detection timeout in config +# we do this 2 times, once with few retries to verify that we +# get a failure with the set sleep, and once with the _same_ +# sleep, but with more retries to get it to succeed +--sleep 5 + +# replication should have stopped, since max retries where not enough +# verify with show slave status +--connection slave +--echo **** On Slave **** +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 7 8 9 16 19 20 22 23 33 +--query_vertical SHOW SLAVE STATUS; + +# now set max retries high enough to succeed, and start slave again +set GLOBAL slave_transaction_retries=10; +START SLAVE; +# wait for deadlock to be detected and retried +# should be the same sleep as above for test to be valid +--sleep 5 + +# commit transaction to release lock on row and let replication succeed +select * from t1 order by nid; +COMMIT; + +# verify that the row succeded to be applied on the slave +--connection master +--sync_slave_with_master +--connection slave +select * from t1 order by nid; + +# cleanup +--connection master +DROP TABLE t1; + + +# +# BUG#18094 +# Slave caches invalid table definition after atlters causes select failure +# +--connection master +CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB; + +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + +ALTER TABLE t1 ADD c2 INT; + +--sync_slave_with_master +connection slave; +SELECT * FROM t1 ORDER BY c1; + +connection master; +ALTER TABLE t1 CHANGE c2 c2 TEXT CHARACTER SET utf8; +ALTER TABLE t1 CHANGE c2 c2 BLOB; + +--sync_slave_with_master +connection slave; +# here we would get error 1412 prior to bug +SELECT * FROM t1 ORDER BY c1 LIMIT 5; + +--connection master +TRUNCATE t1; +SELECT count(*) FROM t1; +INSERT INTO t1 VALUES (101,NULL),(102,NULL),(103,NULL),(104,NULL),(105,NULL),(106,NULL),(107,NULL),(108,NULL),(109,NULL),(1010,NULL); +--sync_slave_with_master +connection slave; +SELECT count(*) FROM t1; +SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; + +# cleanup +--connection master +DROP TABLE t1; +-- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test new file mode 100644 index 00000000000..94af986b222 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob.test @@ -0,0 +1,142 @@ +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +# +# basic test of blob replication for NDB +# + +# easy test + +--connection master +create table t1 ( + a int not null primary key, + b text not null +) engine=ndb; + +insert into t1 values(1, repeat('abc',10)); +insert into t1 values(2, repeat('def',200)); +insert into t1 values(3, repeat('ghi',3000)); + +select 'M', a, sha1(b) from t1 +order by a; + +--sync_slave_with_master +--sleep 5 +--connection slave +select 'S', a, sha1(b) from t1 +order by a; + +--connection master +drop table t1; +--sync_slave_with_master + +# hard test + +--connection master +create table t1 ( + a int not null primary key, + b text not null, + c int, + d longblob, + e tinyblob +) engine=ndbcluster; + +--disable_query_log +# length 61 +set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; +set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; +set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; +--enable_query_log + +insert into t1 values ( + 0, repeat(@s2,454), 100, repeat(@s2,345), NULL); +insert into t1 values ( + 1, repeat(@s0,504), NULL, repeat(@s1,732), repeat(@s1,1)); +insert into t1 values ( + 2, '', 102, '', repeat(@s2,1)); +insert into t1 values ( + 3, repeat(@s0,545), 103, repeat(@s2,788), repeat(@s0,1)); +insert into t1 values ( + 4, repeat(@s1,38), 104, repeat(@s0,260), repeat(@s0,1)); +insert into t1 values ( + 5, repeat(@s2,12), 105, repeat(@s2,40), repeat(@s1,1)); +insert into t1 values ( + 6, repeat(@s1,242), 106, NULL, repeat(@s1,1)); +insert into t1 values ( + 7, repeat(@s1,30), 107, repeat(@s0,161), ''); +insert into t1 values ( + 8, repeat(@s1,719), 108, repeat(@s2,104), NULL); +insert into t1 values ( + 9, repeat(@s2,427), NULL, NULL, NULL); + +select 'M', a, sha1(b), c, sha1(d), sha1(e) +from t1 order by a; + +--sync_slave_with_master +--sleep 5 +--connection slave +select 'S', a, sha1(b), c, sha1(d), sha1(e) +from t1 order by a; + +--connection master +drop table t1; +--sync_slave_with_master + +# table with varsize key (future cluster/schema) + +# sql/ha_ndbcluster_binlog.cc +--connection master +CREATE TABLE IF NOT EXISTS t1 ( + db VARBINARY(63) NOT NULL, + name VARBINARY(63) NOT NULL, + slock BINARY(32) NOT NULL, + query BLOB NOT NULL, + node_id INT UNSIGNED NOT NULL, + epoch BIGINT UNSIGNED NOT NULL, + id INT UNSIGNED NOT NULL, + version INT UNSIGNED NOT NULL, + type INT UNSIGNED NOT NULL, + PRIMARY KEY USING HASH (db,name)) +ENGINE=NDB; + +insert into t1 values ('test','t1', + 'abc',repeat(@s0,10), 11,12,13,14,15); +insert into t1 values ('test','t2', + 'def',repeat(@s1,100), 21,22,23,24,25); +insert into t1 values ('test','t3', + 'ghi',repeat(@s2,1000),31,32,33,34,35); +insert into t1 values ('testtttttttttt','t1', + 'abc',repeat(@s0,10), 11,12,13,14,15); +insert into t1 values ('testttttttttttt','t1', + 'def',repeat(@s1,100), 21,22,23,24,25); +insert into t1 values ('testtttttttttttt','t1', + 'ghi',repeat(@s2,1000),31,32,33,34,35); +insert into t1 values ('t','t11111111111', + 'abc',repeat(@s0,10), 11,12,13,14,15); +insert into t1 values ('t','t111111111111', + 'def',repeat(@s1,100), 21,22,23,24,25); +insert into t1 values ('t','t1111111111111', + 'ghi',repeat(@s2,1000),31,32,33,34,35); + +select 'M', db, name, sha1(query), node_id, epoch, id, version, type +from t1 order by db, name; + +--sync_slave_with_master +--sleep 5 +--connection slave +select 'S', db, name, sha1(query), node_id, epoch, id, version, type +from t1 order by db, name; + +--connection master +drop table t1; +--sync_slave_with_master + +# +# view the binlog - not deterministic (mats) +# + +#--connection master +#let $VERSION=`select version()`; +#--replace_result $VERSION VERSION +#show binlog events; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test new file mode 100644 index 00000000000..2e8f02eaf75 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_blob2.test @@ -0,0 +1,9 @@ +################################# +# Wrapper for rpl_row_blob.test # +# Using wrapper to share test # +# code between engine tests # +################################# +-- source include/have_ndb.inc +let $engine_type=NDBCLUSTER; +-- source extra/rpl_tests/rpl_row_blob.test + diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test new file mode 100644 index 00000000000..eb412a0349a --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_charset.test @@ -0,0 +1,6 @@ +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +######################################################## +--source include/have_ndb.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_row_charset.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test new file mode 100644 index 00000000000..88b5808160b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test @@ -0,0 +1,57 @@ +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +# set up circular replication + +--connection slave +RESET MASTER; +--connection master +--replace_result $SLAVE_MYPORT SLAVE_PORT +--eval CHANGE MASTER TO master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root" +START SLAVE; + +# create the table on the "slave" +--connection slave +CREATE TABLE t1 (a int key, b int) ENGINE=ndb; +#CREATE TABLE t2 (a int key, b int) ENGINE=ndb; +--save_master_pos +--connection master +--sync_with_master +# now we should have a table on the master as well +SHOW TABLES; + +# insert some values on the slave and master +--connection master +INSERT INTO t1 VALUES (1,2); +--connection slave +INSERT INTO t1 VALUES (2,3); + +# ensure data has propagated both ways +--connection slave +--save_master_pos +--connection master +--sync_with_master +--sync_slave_with_master + +# connect to slave and ensure data it there. +--connection slave +SELECT * FROM t1 ORDER BY a; +#SELECT * FROM t2 ORDER BY a; +--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # +--query_vertical show slave status; +# connect to master and ensure data it there. +--connection master +SELECT * FROM t1 ORDER BY a; +#SELECT * FROM t2 ORDER BY a; +--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # +--query_vertical show slave status; + +# stop replication on "master" as not to replicate +# shutdown circularly, eg drop table +--connection master +STOP SLAVE; + +# cleanup +--connection master +DROP TABLE t1; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test new file mode 100644 index 00000000000..2ea60beaba2 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test @@ -0,0 +1,82 @@ +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +connection master; +CREATE TABLE t1 (a int key, b int) ENGINE=NDB; +sync_slave_with_master; +SHOW TABLES; + +# Lose the events from the slave binary log: there is no +# need to re-create the table on the master. +connection slave; +RESET MASTER; + +# Insert some values on the slave and master +connection master; +INSERT INTO t1 VALUES (1,2); +# Switch to slave once event is applied and insert a row +sync_slave_with_master; +connection slave; +INSERT INTO t1 VALUES (2,3); + +# ... it is now very probable that we have a mixed event in the binary +# log. If we don't, the test should still pass, but will not test the +# mixed event situation. + +# The statement is disabled since it cannot reliably show the same +# info all the time. Use it for debug purposes. + +#SHOW BINLOG EVENTS; + +# Replicate back to the master to test this mixed event on the master +STOP SLAVE; + +connection master; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=$SLAVE_MYPORT,MASTER_USER="root"; + +RESET MASTER; +START SLAVE; + +connection slave; +save_master_pos; +connection master; +sync_with_master; + +# The statement is disabled since it cannot reliably show the same +# info all the time. Use it for debug purposes. + +#SHOW BINLOG EVENTS; + +# Check that there is no error in replication +--replace_result $SLAVE_MYPORT SLAVE_PORT +--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # +query_vertical SHOW SLAVE STATUS; + +# Check that we have the data on the master +SELECT * FROM t1 ORDER BY a; + +# We should now have another mixed event, likely with "slave" server +# id last, and with the STMT_END_F flag set. + +# The statement is disabled since it cannot reliably show the same +# info all the time. Use it for debug purposes. + +#SHOW BINLOG EVENTS; + +# now lets see that this data is applied correctly on the slave +STOP SLAVE; +save_master_pos; + +connection slave; +START SLAVE; + +# check that we have the data on the slave +sync_with_master; +SELECT * FROM t1 ORDER BY a; + +# Check that there is no error in replication +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # +query_vertical SHOW SLAVE STATUS; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test new file mode 100644 index 00000000000..ce2a4d9506c --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test @@ -0,0 +1,9 @@ +##################################### +# Wrapper for rpl_commit_after_flush# +# Wrapped to reuse test code on # +# Different engines # +# By JBM 2004-02-15 # +##################################### +-- source include/have_ndb.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_commit_after_flush.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test new file mode 100644 index 00000000000..0a1ab37cdad --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test @@ -0,0 +1,581 @@ +############################################### +# Author: JBM # +# Date: 2006-03-07 # +# Purpose: To test advance DD and replication # +############################################### + +#### Include Section #### +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/ndb_default_cluster.inc +--source include/not_embedded.inc +--source include/big_test.inc +#--source include/have_ndb_extra.inc +--source include/master-slave.inc + +#### Test start cleanup section ##### +--disable_warnings +DROP TABLE IF EXISTS t1, t2, t3; +--enable_warnings + +###################################################### +# Requirment: Cluster DD and replication must be able# +# to handle ALTER tables and indexes and must rpl # +# to the slave correctly # +###################################################### + +## Test #1 replication of CDD and Alter Tables ##### +--echo ***** Test 1 RPL of CDD and Alter ***** +--echo ***** Test 1 setup ***** + +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; + +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE 4M +ENGINE=NDB; + +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE=NDB; + +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile02.dat' +INITIAL_SIZE 4M +ENGINE=NDB; + +CREATE TABLE t1 + (c1 INT NOT NULL PRIMARY KEY, + c2 INT NOT NULL, + c3 INT NOT NULL) + TABLESPACE ts1 STORAGE DISK + ENGINE=NDB; + +--echo ***** insert some data ***** + +let $j= 900; +--disable_query_log +while ($j) +{ + eval INSERT INTO t1 VALUES($j,$j*2,$j+3); + dec $j; +} +--enable_query_log + +--echo ***** Select from Master ***** + +SELECT * FROM t1 ORDER BY c1 LIMIT 5; + +--echo ***** Select from Slave ***** +--sync_slave_with_master +connection slave; +SELECT * FROM t1 ORDER BY c1 LIMIT 5; + +################################### +# Just to some File Schema check # +################################### + +--disable_query_log +SELECT DISTINCT FILE_NAME, FILE_TYPE, TABLESPACE_NAME, LOGFILE_GROUP_NAME + FROM INFORMATION_SCHEMA.FILES + WHERE ENGINE="ndbcluster" ORDER BY FILE_NAME; +--enable_query_log + +--echo **** Do First Set of ALTERs in the master table **** +################################################### +# On this first set of alters I expect: +# 1. To be able to create and index on 2 columns +# 2. To be able to create a unique index +# 3. To be able to add two columns and have +# it all replicated correctly to the slave cluster. +################################################### +connection master; +CREATE INDEX t1_i ON t1(c2, c3); +#Bug 18039 +#CREATE UNIQUE INDEX t1_i2 ON t1(c2); +ALTER TABLE t1 ADD c4 TIMESTAMP; +ALTER TABLE t1 ADD c5 DOUBLE; +ALTER TABLE t1 ADD INDEX (c5); +SHOW CREATE TABLE t1; + +--echo **** Show first set of ALTERs on SLAVE **** +--sync_slave_with_master +connection slave; +SHOW CREATE TABLE t1; + +--echo **** Second set of alters test 1 **** +############################################ +# With this next set of alters we have had +# Some issues with renames of tables. So this +# test renames our main table, drop and index off +# of it, creates another table with then name +# of the orginal table, inserts a row, drops +# the table and renames the orginal table back. +# I want to make sure that 1) the cluster does +# okay with this and 2) that it is replicated +# correctly. +############################################# +connection master; +ALTER TABLE t1 RENAME t2; +ALTER TABLE t2 DROP INDEX c5; +CREATE TABLE t1(c1 INT)ENGINE=NDB; +INSERT INTO t1 VALUES(1); +DROP TABLE t1; +ALTER TABLE t2 RENAME t1; + +--echo **** Show second set of ALTERs on MASTER **** + +SHOW CREATE TABLE t1; + +--echo **** Show second set of ALTERs on SLAVE **** +--sync_slave_with_master +connection slave; +SHOW CREATE TABLE t1; + +--echo **** Third and last set of alters for test1 **** +######################################################### +# In this last set of alters, we are messing with the +# cluster ability to rebuild indexes, drop a column that make up +# an index with another column and change types several times in +# a row. I have choosen the BLOB as it seems to have had many +# issues in this release. I want to make sure that the cluster +# deals with these radical changes and that the replication to +# the slave cluster is dones correctly. +########################################################### +connection master; +ALTER TABLE t1 CHANGE c1 c1 DOUBLE; +ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); +ALTER TABLE t1 DROP COLUMN c3; +ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; +ALTER TABLE t1 CHANGE c4 c4 BLOB; +ALTER TABLE t1 CHANGE c4 c3 BLOB; +set @b1 = 'b1'; +set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); +UPDATE t1 SET c3=@b1 where c1 = 1; +UPDATE t1 SET c3=@b1 where c1 = 2; + +--echo **** Show last set of ALTERs on MASTER **** + +SHOW CREATE TABLE t1; +SELECT * FROM t1 ORDER BY c1 LIMIT 5; + +--echo **** Show last set of ALTERs on SLAVE **** +--sync_slave_with_master +connection slave; +SHOW CREATE TABLE t1; +# Bug 18094 +#SELECT * FROM t1 ORDER BY c1 LIMIT 5; +SELECT * FROM t1 where c1 = 1; + +connection master; +DROP TABLE t1; +--sync_slave_with_master +connection slave; +STOP SLAVE; +RESET SLAVE; +connection master; +RESET MASTER; +connection slave; +START SLAVE; + +################### TEST 2 TPCB for disk data ########################### +# Requirement: To have Stored Procedures and Functions that are used to # +# populate and post transactions to the data base using CDD that span # +# 2 tables spaces and also use a memory only cluster tables. In addition# +# The slave is to be stopped, cleaned and restored and synced with the # +# Master cluster # +######################################################################### + +--echo ******** Create additional TABLESPACE test 2 ************** + +connection master; +CREATE TABLESPACE ts2 +ADD DATAFILE 'datafile03.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE=NDB; + +ALTER TABLESPACE ts2 +ADD DATAFILE 'datafile04.dat' +INITIAL_SIZE 12M +ENGINE=NDB; + +###### CLEAN UP SECTION ############## +DROP DATABASE IF EXISTS tpcb; +CREATE DATABASE tpcb; +######## Creat Table Section ######### +--echo *********** Create TPCB Tables ***************** +CREATE TABLE tpcb.account + (id INT, bid INT, balance DECIMAL(10,2), + filler CHAR(255), PRIMARY KEY(id)) + TABLESPACE ts1 STORAGE DISK + ENGINE=NDB; + +CREATE TABLE tpcb.branch + (bid INT, balance DECIMAL(10,2), filler VARCHAR(255), + PRIMARY KEY(bid)) + ENGINE=NDB; + +CREATE TABLE tpcb.teller + (tid INT, balance DECIMAL(10,2), filler VARCHAR(255), + PRIMARY KEY(tid)) + TABLESPACE ts2 STORAGE DISK + ENGINE=NDB; + +CREATE TABLE tpcb.history + (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, + tid INT, bid INT, amount DECIMAL(10,2), + tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, + filler CHAR(80),PRIMARY KEY (id)) + TABLESPACE ts2 STORAGE DISK + ENGINE=NDB; + +--echo ********* Create Procedures and Functions ************ +delimiter |; +CREATE PROCEDURE tpcb.load() +BEGIN + DECLARE acct INT DEFAULT 1000; + DECLARE brch INT DEFAULT 100; + DECLARE tell INT DEFAULT 1000; + DECLARE tmp INT DEFAULT 100; + WHILE brch > 0 DO + SET tmp = 100; + WHILE tmp > 0 DO + INSERT INTO tpcb.account VALUES (acct, brch, 0.0, "FRESH ACCOUNT"); + SET acct = acct - 1; + SET tmp = tmp -1; + END WHILE; + INSERT INTO tpcb.branch VALUES (brch, 0.0, "FRESH BRANCH"); + SET brch = brch - 1; + END WHILE; + WHILE tell > 0 DO + INSERT INTO tpcb.teller VALUES (tell, 0.0, "FRESH TELLER"); + SET tell = tell - 1; + END WHILE; +END| + +CREATE FUNCTION tpcb.account_id () RETURNS INT +BEGIN + DECLARE num INT; + DECLARE ran INT; + SELECT RAND() * 10 INTO ran; + IF (ran < 2) + THEN + SELECT RAND() * 10 INTO num; + ELSEIF (ran < 4) + THEN + SELECT RAND() * 100 INTO num; + ELSE + SELECT RAND() * 1000 INTO num; + END IF; + IF (num < 1) + THEN + RETURN 1; + END IF; + RETURN num; +END| + +CREATE FUNCTION tpcb.teller_id () RETURNS INT +BEGIN + DECLARE num INT; + DECLARE ran INT; + SELECT RAND() * 10 INTO ran; + IF (ran < 2) + THEN + SELECT RAND() * 10 INTO num; + ELSEIF (ran < 5) + THEN + SELECT RAND() * 100 INTO num; + ELSE + SELECT RAND() * 1000 INTO num; + END IF; + IF (num < 1) + THEN + RETURN 1; + END IF; + RETURN num; +END| + +CREATE PROCEDURE tpcb.trans() +BEGIN + DECLARE acct INT DEFAULT 0; + DECLARE brch INT DEFAULT 0; + DECLARE tell INT DEFAULT 0; + DECLARE bal DECIMAL(10,2) DEFAULT 0.0; + DECLARE amount DECIMAL(10,2) DEFAULT 1.00; + DECLARE test INT DEFAULT 0; + DECLARE bbal DECIMAL(10,2) DEFAULT 0.0; + DECLARE tbal DECIMAL(10,2) DEFAULT 0.0; + DECLARE local_uuid VARCHAR(255); + DECLARE local_user VARCHAR(255); + DECLARE local_time TIMESTAMP; + + SELECT RAND() * 10 INTO test; + SELECT tpcb.account_id() INTO acct; + SELECT tpcb.teller_id() INTO tell; + + SELECT account.balance INTO bal FROM tpcb.account WHERE id = acct; + SELECT account.bid INTO brch FROM tpcb.account WHERE id = acct; + SELECT teller.balance INTO tbal FROM tpcb.teller WHERE tid = tell; + SELECT branch.balance INTO bbal FROM tpcb.branch WHERE bid = brch; + + IF (test < 5) + THEN + SET bal = bal + amount; + SET bbal = bbal + amount; + SET tbal = tbal + amount; + UPDATE tpcb.account SET balance = bal, filler = 'account updated' + WHERE id = acct; + UPDATE tpcb.branch SET balance = bbal, filler = 'branch updated' + WHERE bid = brch; + UPDATE tpcb.teller SET balance = tbal, filler = 'teller updated' + WHERE tid = tell; + ELSE + SET bal = bal - amount; + SET bbal = bbal - amount; + SET tbal = tbal - amount; + UPDATE tpcb.account SET balance = bal, filler = 'account updated' + WHERE id = acct; + UPDATE tpcb.branch SET balance = bbal, filler = 'branch updated' + WHERE bid = brch; + UPDATE tpcb.teller SET balance = tbal, filler = 'teller updated' + WHERE tid = tell; + END IF; + + SET local_uuid=UUID(); + SET local_user=USER(); + SET local_time= NOW(); + INSERT INTO tpcb.history VALUES(NULL,acct,tell,brch,amount, local_time,local_user, + local_uuid,'completed trans'); +END| +delimiter ;| + +--echo ****** TEST 2 test time ********************************* +USE tpcb; + +--echo *********** Load up the database ****************** +CALL tpcb.load(); + +--echo ********** Check load master and slave ************** +SELECT COUNT(*) FROM account; +--sync_slave_with_master +connection slave; +USE tpcb; +SELECT COUNT(*) FROM account; + +--echo ******** Run in some transactions *************** + +connection master; +let $j= 1000; +--disable_query_log +while ($j) +{ + CALL tpcb.trans(); + dec $j; +} +--enable_query_log + +--echo ***** Time to try slave sync *********** +--echo **** Must make sure slave is clean ***** +--connection slave +STOP SLAVE; +RESET SLAVE; +DROP PROCEDURE IF EXISTS tpcb.load; +DROP PROCEDURE IF EXISTS tpcb.trans; +DROP TABLE IF EXISTS tpcb.account; +DROP TABLE IF EXISTS tpcb.teller; +DROP TABLE IF EXISTS tpcb.branch; +DROP TABLE IF EXISTS tpcb.history; +DROP DATABASE tpcb; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile02.dat' +ENGINE=NDB; + +DROP TABLESPACE ts1 ENGINE=NDB; + +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile03.dat' +ENGINE=NDB; + +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile04.dat' +ENGINE=NDB; + +DROP TABLESPACE ts2 ENGINE=NDB; + +DROP LOGFILE GROUP lg1 ENGINE=NDB; + +--echo ********** Take a backup of the Master ************* +connection master; + +SELECT COUNT(*) FROM history; + +let $j= 1000; +--disable_query_log +while ($j) +{ + CALL tpcb.trans(); + dec $j; +} +--enable_query_log + +SELECT COUNT(*) FROM history; + +#RESET MASTER; +--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT + +--exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat + +CREATE TEMPORARY TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; + +DELETE FROM mysql.backup_info; + +LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; +--exec rm $MYSQLTEST_VARDIR/tmp.dat || true +--replace_column 1 + +SELECT @the_backup_id:=backup_id FROM mysql.backup_info; + +let the_backup_id=`select @the_backup_id`; + +DROP TABLE IF EXISTS mysql.backup_info; +#RESET MASTER; + +--echo ************ Restore the slave ************************ +connection slave; +CREATE DATABASE tpcb; +--source include/ndb_restore_slave_eoption.inc + +--echo ***** Check a few slave restore values *************** +connection slave; +USE tpcb; +SELECT COUNT(*) FROM account; + +--echo ***** Add some more records to master ********* +connection master; +let $j= 1000; +--disable_query_log +while ($j) +{ + CALL tpcb.trans(); + dec $j; +} +--enable_query_log + +# +# now setup replication to continue from last epoch +# 1. get apply_status epoch from slave +# 2. get corresponding _next_ binlog postition from master +# 3. change master on slave +# 4. add some transaction for slave to process +# 5. start the replication + +--echo ***** Finsh the slave sync process ******* +--disable_query_log +# 1. 2. 3. +--source include/ndb_setup_slave.inc +--enable_query_log + +# 4. +--echo * 4. * +connection master; +let $j= 1000; +--disable_query_log +while ($j) +{ + CALL tpcb.trans(); + dec $j; +} +--enable_query_log + +# 5. +--echo * 5. * +connection slave; +START SLAVE; + +--echo **** We should be ready to continue on ************* + +connection master; +let $j= 50; +--disable_query_log +while ($j) +{ + CALL tpcb.trans(); + dec $j; +} +--enable_query_log + +--echo ****** Let's make sure we match ******* +--echo ***** MASTER ******* +USE tpcb; +SELECT COUNT(*) FROM history; + +--echo ****** SLAVE ******** +--sync_slave_with_master +connection slave; +USE tpcb; +SELECT COUNT(*) FROM history; + +--echo *** DUMP MASTER & SLAVE FOR COMPARE ******** + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql + +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql + +--echo *************** TEST 2 CLEANUP SECTION ******************** +connection master; +DROP PROCEDURE IF EXISTS tpcb.load; +DROP PROCEDURE IF EXISTS tpcb.trans; +DROP TABLE tpcb.account; +DROP TABLE tpcb.teller; +DROP TABLE tpcb.branch; +DROP TABLE tpcb.history; +DROP DATABASE tpcb; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile.dat' +ENGINE=NDB; + +ALTER TABLESPACE ts1 +DROP DATAFILE 'datafile02.dat' +ENGINE=NDB; + +DROP TABLESPACE ts1 ENGINE=NDB; + +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile03.dat' +ENGINE=NDB; + +ALTER TABLESPACE ts2 +DROP DATAFILE 'datafile04.dat' +ENGINE=NDB; + +DROP TABLESPACE ts2 ENGINE=NDB; + +DROP LOGFILE GROUP lg1 ENGINE=NDB; + +--sync_slave_with_master + +connection master; + +--echo ****** Do dumps compare ************ + +diff_files $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql; + +## Note: Ths files should only get removed, if the above diff succeeds. + +--exec rm $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql +--exec rm $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql + +# End 5.1 test case diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test new file mode 100644 index 00000000000..7387d39db87 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_basic.test @@ -0,0 +1,85 @@ +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# +# Basic test of disk tables for NDB +# + +# +# Start by creating a logfile group +# + +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; + +alter logfile group lg1 +add undofile 'undofile02.dat' +initial_size 4M engine=ndb; + +# +# Create a tablespace connected to the logfile group +# + +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; + +alter tablespace ts1 +add datafile 'datafile02.dat' +initial_size 4M engine=ndb; + +# +# Create a table using this tablespace +# + +CREATE TABLE t1 +(pk1 int not null primary key, b int not null, c int not null) +tablespace ts1 storage disk +engine ndb; + +# +# insert some data +# + +insert into t1 values (1,2,3); +select * from t1 order by pk1; + +# +# check that the data is also on the slave +# + +--sync_slave_with_master +--connection slave +select * from t1 order by pk1; + +# +# view the binlog +# + +--connection master +-- source include/show_binlog_events2.inc + +# +# cleanup +# + +drop table t1; +alter tablespace ts1 +drop datafile 'datafile.dat' +engine=ndb; +alter tablespace ts1 +drop datafile 'datafile02.dat' +engine=ndb; +DROP TABLESPACE ts1 ENGINE=NDB; +DROP LOGFILE GROUP lg1 ENGINE=NDB; +-- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test new file mode 100644 index 00000000000..9291f38e8db --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_partitions.test @@ -0,0 +1,310 @@ +####################################### +# Author: JBM # +# Date: 2006-03-09 # +# Purpose: To test the replication of # +# Cluster Disk Data using partitions # +####################################### + +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +--echo --- Doing pre test cleanup --- + +connection master; +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_query_log + + +# Start by creating a logfile group +################################## + +CREATE LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile.dat' +INITIAL_SIZE 16M +UNDO_BUFFER_SIZE = 1M +ENGINE=NDB; + +ALTER LOGFILE GROUP lg1 +ADD UNDOFILE 'undofile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; + +################################################### +# Create a tablespace connected to the logfile group +################################################### + +CREATE TABLESPACE ts1 +ADD DATAFILE 'datafile.dat' +USE LOGFILE GROUP lg1 +INITIAL_SIZE 12M +ENGINE NDB; + +ALTER TABLESPACE ts1 +ADD DATAFILE 'datafile02.dat' +INITIAL_SIZE = 4M +ENGINE=NDB; + +################################################################# + +--echo --- Start test 2 partition RANGE testing -- +--echo --- Do setup -- + + +################################################# +# Requirment: Create table that is partitioned # +# by range on year i.e. year(t) and replicate # +# basice operations such at insert, update # +# delete between 2 different storage engines # +# Alter table and ensure table is handled # +# Correctly on the slave # +################################################# + +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), + bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, + f FLOAT DEFAULT 0, total BIGINT UNSIGNED, + y YEAR, t DATE) + TABLESPACE ts1 STORAGE DISK + ENGINE=NDB + PARTITION BY RANGE (YEAR(t)) + (PARTITION p0 VALUES LESS THAN (1901), + PARTITION p1 VALUES LESS THAN (1946), + PARTITION p2 VALUES LESS THAN (1966), + PARTITION p3 VALUES LESS THAN (1986), + PARTITION p4 VALUES LESS THAN (2005), + PARTITION p5 VALUES LESS THAN MAXVALUE); + +--echo --- Show table on master --- + +SHOW CREATE TABLE t1; + +--echo --- Show table on slave -- + +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--echo --- Perform basic operation on master --- +--echo --- and ensure replicated correctly --- + +--source include/rpl_multi_engine3.inc + +--echo --- Check that simple Alter statements are replicated correctly --- + +ALTER TABLE t1 MODIFY vc VARCHAR(255); + +--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; + +--echo --- Perform basic operation on master --- +--echo --- and ensure replicated correctly --- +--enable_query_log + +--source include/rpl_multi_engine3.inc + +--echo --- End test 2 partition RANGE testing --- +--echo --- Do Cleanup --- + +DROP TABLE IF EXISTS t1; + +######################################################## + +--echo --- Start test 3 partition LIST testing --- +--echo --- Do setup --- +################################################# + + +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), + bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, + f FLOAT DEFAULT 0, total BIGINT UNSIGNED, + y YEAR, t DATE) + TABLESPACE ts1 STORAGE DISK + ENGINE=NDB + PARTITION BY LIST(id) + (PARTITION p0 VALUES IN (2, 4), + PARTITION p1 VALUES IN (42, 142)); + +--echo --- Test 3 Alter to add partition --- + +ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); + +--echo --- Show table on master --- + +SHOW CREATE TABLE t1; + +--echo --- Show table on slave --- + +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--echo --- Perform basic operation on master --- +--echo --- and ensure replicated correctly --- + +--source include/rpl_multi_engine3.inc + +--echo --- Check that simple Alter statements are replicated correctly --- + +ALTER TABLE t1 MODIFY vc VARCHAR(255); + +--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; + +--echo --- Perform basic operation on master --- +--echo --- and ensure replicated correctly --- + +--source include/rpl_multi_engine3.inc + +--echo --- End test 3 partition LIST testing --- +--echo --- Do Cleanup -- + +DROP TABLE IF EXISTS t1; + +######################################################## + +--echo --- Start test 4 partition HASH testing --- +--echo --- Do setup --- +################################################# + + +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), + bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, + f FLOAT DEFAULT 0, total BIGINT UNSIGNED, + y YEAR, t DATE) + TABLESPACE ts1 STORAGE DISK + ENGINE=NDB + PARTITION BY HASH( YEAR(t) ) + PARTITIONS 4; + +--echo --- show that tables have been created correctly --- + +SHOW CREATE TABLE t1; +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--echo --- Perform basic operation on master --- +--echo --- and ensure replicated correctly --- + +--source include/rpl_multi_engine3.inc + +--echo --- Check that simple Alter statements are replicated correctly --- + +ALTER TABLE t1 MODIFY vc VARCHAR(255); + +--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; + +--echo --- Perform basic operation on master --- +--echo --- and ensure replicated correctly --- + +--source include/rpl_multi_engine3.inc + +--echo --- End test 4 partition HASH testing --- +--echo --- Do Cleanup -- + +DROP TABLE IF EXISTS t1; + +######################################################## + +--echo --- Start test 5 partition by key testing --- +--echo --- Create Table Section --- + +################################################# + +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), + bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, + f FLOAT DEFAULT 0, total BIGINT UNSIGNED, + y YEAR, t DATE,PRIMARY KEY(id)) + TABLESPACE ts1 STORAGE DISK + ENGINE=NDB + PARTITION BY KEY() + PARTITIONS 4; + +--echo --- Show that tables on master are ndbcluster tables --- + +SHOW CREATE TABLE t1; + +--echo --- Show that tables on slave --- + +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--echo --- Perform basic operation on master --- +--echo --- and ensure replicated correctly --- + +--source include/rpl_multi_engine3.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, ADD PRIMARY KEY(id, total); + +--echo --- Show the new improved table on the master --- + +SHOW CREATE TABLE t1; + +--echo --- Make sure that our tables on slave are still right type --- +--echo --- and that the alter statements replicated correctly --- + +sync_slave_with_master; +SHOW CREATE TABLE t1; + +--echo --- Perform basic operation on master --- +--echo --- and ensure replicated correctly --- + +--source include/rpl_multi_engine3.inc + +--echo --- Check that simple Alter statements are replicated correctly --- + +ALTER TABLE t1 MODIFY vc VARCHAR(255); + +--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; + +--echo --- Perform basic operation on master --- +--echo --- and ensure replicated correctly --- + +--source include/rpl_multi_engine3.inc + +--echo --- End test 5 key partition testing --- +--echo --- Do Cleanup --- + +DROP TABLE IF EXISTS t1; +alter tablespace ts1 +drop datafile 'datafile.dat' +engine=ndb; +alter tablespace ts1 +drop datafile 'datafile02.dat' +engine=ndb; +DROP TABLESPACE ts1 ENGINE=NDB; +DROP LOGFILE GROUP lg1 ENGINE=NDB; +--sync_slave_with_master + +# End of 5.1 test case diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test new file mode 100644 index 00000000000..66db755de15 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ddl.test @@ -0,0 +1,33 @@ +#################### rpl_ndb_ddl.test ######################## +# # +# DDL statements (sometimes with implicit COMMIT) executed # +# by the master and it's propagation into the slave # +# # +############################################################## + +# +# NOTE, PLEASE BE CAREFUL, WHEN MODIFYING THE TESTS !! +# +# 1. !All! objects to be dropped, renamed, altered ... must be created +# in AUTOCOMMIT= 1 mode before AUTOCOMMIT is set to 0 and the test +# sequences start. +# +# 2. Never use a test object, which was direct or indirect affected by a +# preceeding test sequence again. +# Except table d1.t1 where ONLY DML is allowed. +# +# If one preceeding test sequence hits a (sometimes not good visible, +# because the sql error code of the statement might be 0) bug +# and these rules are ignored, a following test sequence might earn ugly +# effects like failing 'sync_slave_with_master', crashes of the slave or +# abort of the test case etc.. +# + +--source include/master-slave.inc +--source include/have_binlog_format_row.inc +--source include/have_ndb.inc +let $engine_type= NDB; +let $temp_engine_type= MEMORY; +let $show_binlog = 0; +let $manipulate = 0; +-- source extra/rpl_tests/rpl_ddl.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test new file mode 100644 index 00000000000..92ceddf7f5c --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_delete_nowhere.test @@ -0,0 +1,8 @@ +######################################### +# By JBM 2006-02-14 Test wrapping to # +# Share test code between engine tests # +######################################### +--source include/have_ndb.inc +-- source include/have_binlog_format_row.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_delete_no_where.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt new file mode 100644 index 00000000000..fb5e378b65f --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db-slave.opt @@ -0,0 +1 @@ +--replicate-do-db=replica diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test new file mode 100644 index 00000000000..9b65d43f244 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_db.test @@ -0,0 +1,57 @@ +########################################################### +# Author: Jeb +# Date: 14-12-2006 +# Purpose: To test --replicate-do-database=db_name +# using cluster. Only replica should replicate. +########################################################## + +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +--disable_warnings +DROP DATABASE IF EXISTS replica; +--enable_warnings + +# Create database and tables for the test. +CREATE DATABASE replica; +CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +USE replica; +CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; + +# Insert data into db that should not be picked up by slave +USE test; +INSERT INTO t1 VALUES(1, repeat('abc',10)); +INSERT INTO t2 VALUES(1, repeat('abc',10)); +SHOW TABLES; +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; + +# Insert data into db that should be replicated +USE replica; +INSERT INTO replica.t1 VALUES(2, repeat('def',200)); +INSERT INTO replica.t2 VALUES(2, repeat('def',200)); +SHOW TABLES; +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; + +# Check results on slave +--sync_slave_with_master +SHOW TABLES; +USE replica; +SHOW TABLES; +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; +USE test; +SHOW TABLES; + +# Cleanup from testing +connection master; +USE test; +DROP TABLE t1, t2; +DROP DATABASE IF EXISTS replica; +--sync_slave_with_master + +# End 5.1 test case diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt new file mode 100644 index 00000000000..da345474216 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table-slave.opt @@ -0,0 +1 @@ +--replicate-do-table=test.t1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test new file mode 100644 index 00000000000..55a40d85172 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_do_table.test @@ -0,0 +1,46 @@ +########################################################### +# Author: Jeb +# Date: 14-12-2006 +# Purpose: To test --replicate-do-table=db_name.tbl_name +# using cluster. Only t1 should replicate. +########################################################## + +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; + +INSERT INTO t1 VALUES(1, repeat('abc',10)); +INSERT INTO t1 VALUES(2, repeat('def',200)); +INSERT INTO t1 VALUES(3, repeat('ghi',3000)); +INSERT INTO t2 VALUES(1, repeat('abc',10)); +INSERT INTO t2 VALUES(2, repeat('def',200)); +INSERT INTO t2 VALUES(3, repeat('ghi',3000)); + +--sync_slave_with_master +SHOW TABLES; +SELECT COUNT(*) FROM t1; + +# +# Bug #27044 replicated with unique field ndb table allows dup key inserts +# +connection master; + +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES (3, repeat('bad',1)); + +connection slave; +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES (3, repeat('bad too',1)); + +# cleanup + +connection master; +DROP TABLE IF EXISTS t1, t2; +--sync_slave_with_master diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test new file mode 100644 index 00000000000..cf0501c490a --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraCol.test @@ -0,0 +1,13 @@ +########################################### +# Author: Jeb +# Date: 2006-09-08 +# Purpose: Wapper for rpl_extraSlave_Col.test +# Using NDB +########################################### +-- source include/have_binlog_format_row.inc +--source include/have_ndb.inc +-- source include/master-slave.inc +let $engine_type = 'NDB'; +-- source extra/rpl_tests/rpl_extraSlave_Col.test + + diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test new file mode 100644 index 00000000000..a19de7d3d6b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_func003.test @@ -0,0 +1,12 @@ +################################### +# Wrapper for rpl_row_func003.test# +# This test was orginally designed# +# To test InnoDB using RBR, but # +# It can also be used to test NDB # +# So this wrapper is being used to# +# reduce test case code # +################################### +-- source include/have_ndb.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_row_func003.test +-- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test new file mode 100644 index 00000000000..f2bfe745523 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test @@ -0,0 +1,117 @@ +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +# +# Currently test only works with ndb since it retrieves "old" +# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; +# + +# create a table with one row +CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; +INSERT INTO t1 VALUES ("row1","will go away",1); +SELECT * FROM t1 ORDER BY c3; + +# sync slave and retrieve epoch +sync_slave_with_master; +--replace_column 1 +SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; +let $the_epoch= `select @the_epoch` ; +SELECT * FROM t1 ORDER BY c3; + +# get the master binlog pos from the epoch +connection master; +--replace_result $the_epoch +--replace_column 1 +eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) + FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ; +let $the_pos= `SELECT @the_pos` ; +let $the_file= `SELECT @the_file` ; + +# insert some more values +INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); +DELETE FROM t1 WHERE c3 = 1; +UPDATE t1 SET c2="should go away" WHERE c3 = 2; +UPDATE t1 SET c2="C" WHERE c3 = 3; +DELETE FROM t1 WHERE c3 = 2; + +SELECT * FROM t1 ORDER BY c3; + +# check that we have it on the slave +--sync_slave_with_master +--connection slave +SELECT * FROM t1 ORDER BY c3; + +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 7 8 9 16 22 23 33 +SHOW SLAVE STATUS; + +# stop slave and reset position to before the last changes +STOP SLAVE; +--replace_result $the_pos +eval CHANGE MASTER TO + master_log_file = '$the_file', + master_log_pos = $the_pos ; + +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 7 8 9 16 22 23 33 +SHOW SLAVE STATUS; + +# start the slave again +# -> same events should have been applied again +# e.g. inserting rows that already there +# deleting a row which is not there +# updating a row which is not there +START SLAVE; + +--connection master +SELECT * FROM t1 ORDER BY c3; +--sync_slave_with_master +--connection slave +SELECT * FROM t1 ORDER BY c3; + +STOP SLAVE; + +# +# cleanup +# +--connection master +DROP TABLE t1; +RESET master; +--connection slave +DROP TABLE t1; +RESET slave; + +START SLAVE; + +# +# Test that we can handle update of a row that does not exist on the slave +# will trigger usage of AO_IgnoreError on slave side so that the INSERT +# still succeeds even if the replication of the UPDATE generates an error. +# +--connection master +CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ; +INSERT INTO t1 VALUES ("row1","remove on slave",1); + +--sync_slave_with_master +--connection slave +DELETE FROM t1; + +--connection master +BEGIN; +UPDATE t1 SET c2="does not exist" WHERE c3=1; +INSERT INTO t1 VALUES ("row2","new on slave",2); +COMMIT; + +--sync_slave_with_master +--connection slave +SELECT * FROM t1; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 7 8 9 16 22 23 33 +SHOW SLAVE STATUS; + +connection master; +DROP TABLE IF EXISTS t1; + +# End of 5.1 Test +-- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-master.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt new file mode 100644 index 00000000000..7f9eb96dff1 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt @@ -0,0 +1 @@ +--default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test new file mode 100644 index 00000000000..229ee11353b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test @@ -0,0 +1,16 @@ +############################################################# +# Author: JBM +# Date: 2006-02-24 +# Purpose: Trying to test ability to replicate from cluster +# to innodb, or myisam, or replicate from innodb/myisam to +# cluster slave. Due to limitations I have created wrappers +# to be able to use the same code for all these different +# test and to have control over the tests. +############################################################## +-- source include/have_innodb.inc +-- source include/master-slave.inc +connection slave; +-- source include/have_ndb.inc +connection master; +SET storage_engine=innodb; +--source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test new file mode 100644 index 00000000000..127c2464570 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test @@ -0,0 +1,66 @@ +# Test of a transaction mixing the two engines + +-- source include/have_ndb.inc +-- source include/have_innodb.inc +-- source include/master-slave.inc + +create table t1 (a int, unique(a)) engine=ndbcluster; +create table t2 (a int, unique(a)) engine=innodb; + + +begin; +insert into t1 values(1); +insert into t2 values(1); +rollback; + +select count(*) from t1; +select count(*) from t2; +sync_slave_with_master; +select count(*) from t1; +select count(*) from t2; +connection master; + +begin; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +rollback; + +select count(*) from t1; +select count(*) from t2; +sync_slave_with_master; +select count(*) from t1; +select count(*) from t2; +connection master; + +delete from t1; +delete from t2; +begin; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +rollback; + +select count(*) from t1; +select count(*) from t2; +sync_slave_with_master; +select count(*) from t1; +select count(*) from t2; +connection master; + +delete from t1; +delete from t2; +begin; +insert into t2 values(3),(4); +insert into t1 values(3),(4); +load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; +load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; +rollback; + +select count(*) from t1; +select count(*) from t2; +sync_slave_with_master; +select count(*) from t1; +select count(*) from t2; +connection master; + +drop table t1,t2; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test new file mode 100644 index 00000000000..17acb5983f4 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_insert_ignore.test @@ -0,0 +1,8 @@ +##################################### +# Wrapper for rpl_insert_ignore.test# +##################################### +-- source include/have_ndb.inc +-- source include/have_binlog_format_row.inc +let $engine_type=NDB; +let $engine_type2=myisam; +-- source extra/rpl_tests/rpl_insert_ignore.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test new file mode 100644 index 00000000000..2ee540afd18 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_load.test @@ -0,0 +1,66 @@ +# +# Currently this test only runs in the source tree with the +# ndb/test programs compiled. +# invoke with: ./mysql-test-run --ndb-extra-test --do-test=rpl_ndb_load +# + +--source include/have_ndb.inc +--source include/have_ndb_extra.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +--disable_warnings +# reset master +connection master; +DROP DATABASE IF EXISTS TEST_DB; +CREATE DATABASE TEST_DB; +--enable_warnings + +# +# These tables should correspond to the table definitions in +# storage/ndb/test/ndbapi/bench/ +# +connection master; +USE TEST_DB; +CREATE TABLE SUBSCRIBER + ( NUMBER CHAR(12) BINARY NOT NULL, + NAME CHAR(32) BINARY NOT NULL, + GROUP_ID INT UNSIGNED NOT NULL, + LOCATION INT UNSIGNED NOT NULL, + SESSIONS INT UNSIGNED NOT NULL, + CHANGED_BY CHAR(32) BINARY NOT NULL, + CHANGED_TIME CHAR(32) BINARY NOT NULL, + PRIMARY KEY USING HASH (NUMBER)) + ENGINE = NDB; + +CREATE TABLE GROUP_T + ( GROUP_ID INT UNSIGNED NOT NULL, + GROUP_NAME CHAR(32) BINARY NOT NULL, + ALLOW_READ CHAR(1) BINARY NOT NULL, + ALLOW_INSERT INT UNSIGNED NOT NULL, + ALLOW_DELETE INT UNSIGNED NOT NULL, + PRIMARY KEY USING HASH (GROUP_ID)) + ENGINE = NDB; + +CREATE TABLE SESSION + ( NUMBER CHAR(12) BINARY NOT NULL, + SERVER_ID INT UNSIGNED NOT NULL, + DATA VARBINARY(1998) NOT NULL, + PRIMARY KEY USING HASH (NUMBER,SERVER_ID)) + ENGINE = NDB; + +CREATE TABLE SERVER + ( SUFFIX CHAR(2) BINARY NOT NULL, + SERVER_ID INT UNSIGNED NOT NULL, + NAME CHAR(32) BINARY NOT NULL, + NO_OF_READ INT UNSIGNED NOT NULL, + NO_OF_INSERT INT UNSIGNED NOT NULL, + NO_OF_DELETE INT UNSIGNED NOT NULL, + PRIMARY KEY USING HASH (SUFFIX, SERVER_ID)) + ENGINE = NDB; + +# +# start "load" application +# +--exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/DbCreate >> $NDB_TOOLS_OUTPUT +--exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/DbAsyncGenerator >> $NDB_TOOLS_OUTPUT diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt new file mode 100644 index 00000000000..e0d075c3fbd --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log-master.opt @@ -0,0 +1 @@ +--skip-external-locking diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test new file mode 100644 index 00000000000..e883d24b977 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_log.test @@ -0,0 +1,12 @@ +################################### +# Wrapper for rpl_row_log.test # +# Added wrapper so that MyISAM & # +# Innodb and NDB could all use the# +# Same test. NDB produced a diff # +# bin-log # +################################### +-- source include/have_binlog_format_row.inc +-- source include/have_ndb.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_log.test + diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test new file mode 100644 index 00000000000..196d0a5ed6f --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test @@ -0,0 +1,71 @@ +--source include/have_ndb.inc +--source include/have_multi_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +# note: server2 is another "master" connected to the master cluster + +# +# Currently test only works with ndb since it retrieves "old" +# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; +# + +# create a table with one row, and make sure the other "master" gets it +CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; +connection server2; +reset master; +SHOW TABLES; +connection master; +INSERT INTO t1 VALUES ("row1","will go away",1); +SELECT * FROM t1 ORDER BY c3; +connection server2; +SELECT * FROM t1 ORDER BY c3; + +# sync slave and retrieve epoch and stop the slave +connection master; +sync_slave_with_master; +--replace_column 1 +SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; +let $the_epoch= `select @the_epoch` ; +SELECT * FROM t1 ORDER BY c3; +stop slave; + +# get the master binlog pos from the epoch, from the _other_ "master", server2 +connection server2; +--replace_result $the_epoch +eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) + FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ; +let $the_pos= `SELECT @the_pos` ; +let $the_file= `SELECT @the_file` ; + +# now connect the slave to the _other_ "master" +connection slave; +--replace_result $MASTER_MYPORT1 +eval CHANGE MASTER TO + master_port=$MASTER_MYPORT1, + master_log_file = '$the_file', + master_log_pos = $the_pos ; +start slave; + +# insert some more values on the first master +connection master; +INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); +DELETE FROM t1 WHERE c3 = 1; +UPDATE t1 SET c2="should go away" WHERE c3 = 2; +UPDATE t1 SET c2="C" WHERE c3 = 3; +DELETE FROM t1 WHERE c3 = 2; + +SELECT * FROM t1 ORDER BY c3; + +save_master_pos; + +# insert another row, and check that we have it on the slave +connection server2; +INSERT INTO t1 VALUES ("row5","E",5); +SELECT * FROM t1 ORDER BY c3; +#sync_slave_with_master; +connection slave; +--sleep 2 +SELECT * FROM t1 ORDER BY c3; + +STOP SLAVE; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt new file mode 100644 index 00000000000..17d4171af0e --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2-slave.opt @@ -0,0 +1 @@ +--replicate-ignore-table=nothing.sensible diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test new file mode 100644 index 00000000000..df4f0eec39d --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update2.test @@ -0,0 +1,12 @@ +############################################################ +# By JBM 2006-02-15 Wrapper for rpl_multi_update2.test # +# to reuse test code between engine runs # +############################################################ +-- source include/have_ndb.inc + +# Run this only for row based replication, as replication of +# auto_increment values are not supported with NDB as storage engine +-- source include/have_binlog_format_row.inc + +let $engine_type=NDB; +--source extra/rpl_tests/rpl_multi_update2.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test new file mode 100644 index 00000000000..008e2143987 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi_update3.test @@ -0,0 +1,8 @@ +############################################################ +# By JBM 2006-02-15 Wrapper for rpl_multi_update3.test # +# to reuse test code between engine runs # +############################################################ +-- source include/have_ndb.inc +-- source include/have_binlog_format_row.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_multi_update3.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-master.opt new file mode 100644 index 00000000000..83ed8522e72 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-master.opt @@ -0,0 +1 @@ +--binlog-format=row diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt new file mode 100644 index 00000000000..7f9eb96dff1 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt @@ -0,0 +1 @@ +--default-storage-engine=ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test new file mode 100644 index 00000000000..0c2df6441cb --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test @@ -0,0 +1,15 @@ +############################################################# +# Author: JBM +# Date: 2006-02-24 +# Purpose: Trying to test ability to replicate from cluster +# to innodb, or myisam, or replicate from innodb/myisam to +# cluster slave. Due to limitations I have created wrappers +# to be able to use the same code for all these different +# test and to have control over the tests. +############################################################## +-- source include/master-slave.inc +connection slave; +--source include/have_ndb.inc +connection master; +SET storage_engine=myisam; +--source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt new file mode 100644 index 00000000000..cf4319f2b40 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate-slave.opt @@ -0,0 +1,3 @@ +-O max_relay_log_size=16384 +--loose-innodb +--log-warnings diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test new file mode 100644 index 00000000000..c5ec0e1d21b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_relayrotate.test @@ -0,0 +1,8 @@ +############################################################ +# By JBM 2006-02-15 Wrapper for rpl_relayrotate.test # +# to reuse test code between engine runs # +############################################################ +-- source include/have_ndb.inc +-- source include/have_ndb_extra.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_relayrotate.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt new file mode 100644 index 00000000000..6262cf451a6 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore-slave.opt @@ -0,0 +1 @@ +--replicate-ignore-db=test --replicate-ignore-table=replica.t1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test new file mode 100644 index 00000000000..47f5bce5527 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_rep_ignore.test @@ -0,0 +1,58 @@ +########################################################### +# Author: Jeb +# Date: 15-12-2006 +# Purpose: To test --replicate-ignore-table=db_name.tbl_name +# and --replicate-ignore-db=db_name +# using cluster. Only replica should replicate. +########################################################## + +--source include/have_ndb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +--disable_warnings +DROP DATABASE IF EXISTS replica; +--enable_warnings + +# Create database and tables for the test. +CREATE DATABASE replica; +CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +USE replica; +CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; +CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; + +# Insert data into db that should not be picked up by slave +USE test; +INSERT INTO t1 VALUES(1, repeat('abc',10)); +INSERT INTO t2 VALUES(1, repeat('abc',10)); +SHOW TABLES; +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; + +# Insert data into db that should be replicated +USE replica; +INSERT INTO replica.t1 VALUES(2, repeat('def',200)); +INSERT INTO replica.t2 VALUES(2, repeat('def',200)); +SHOW TABLES; +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; + +# Check results on slave +--sync_slave_with_master +SHOW TABLES; +USE replica; +SHOW TABLES; +#SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; +USE test; +SHOW TABLES; + +# Cleanup from testing +connection master; +USE test; +DROP TABLE t1, t2; +DROP DATABASE IF EXISTS replica; +--sync_slave_with_master + +# End 5.1 test case diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test new file mode 100644 index 00000000000..1e2a4ec02df --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_row_001.test @@ -0,0 +1,6 @@ +######################################################## +# By JBM 2005-02-15 Wrapped to allow reuse of test code# +######################################################## +--source include/have_ndb.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_row_001.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test new file mode 100644 index 00000000000..75ad9f0a488 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp003.test @@ -0,0 +1,9 @@ +################################# +# Wrapper for rpl_row_sp003.test# +# These tests have been wrapped # +# so the same code can be used # +# For different engines # +################################# +-- source include/have_ndb.inc +let $engine_type=NDBCLUSTER; +-- source extra/rpl_tests/rpl_row_sp003.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test new file mode 100644 index 00000000000..590facc3648 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sp006.test @@ -0,0 +1,9 @@ +################################# +# Wrapper for rpl_row_sp006.test# +# These tests have been wrapped # +# so the same code can be used # +# For different engines # +################################# +-- source include/have_ndb.inc +let $engine_type=NDBCLUSTER; +-- source extra/rpl_tests/rpl_row_sp006.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test new file mode 100644 index 00000000000..b92fbbcfce6 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test @@ -0,0 +1,62 @@ +--source include/have_ndb.inc +--source include/have_innodb.inc +--source include/have_binlog_format_mixed_or_statement.inc +--source include/master-slave.inc + +--connection master +create table t1 (a int key, b int) engine innodb; +create table t2 (a int key, b int) engine innodb; + +--sync_slave_with_master +--connection slave +alter table t1 engine ndb; +alter table t2 engine ndb; + +# check binlog position without begin +--connection master +insert into t1 values (1,2); + +--sync_slave_with_master +--connection slave +--replace_column 1 2 +select @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status; +--let $start_pos = `select @start_pos` +--let $end_pos = `select @end_pos` + +--connection master +# here is actually a bug, since there is no begin statement, the +# query is autocommitted, and end_pos shows end of the insert and not +# end of the commit +--replace_result $start_pos +--replace_column 5 # +--eval show binlog events from $start_pos limit 1 +--replace_result $start_pos $end_pos +--replace_column 2 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ +--eval show binlog events from $start_pos limit 1,1 + +# check binlog position with begin +--connection master +begin; +insert into t1 values (2,3); +insert into t2 values (3,4); +commit; + +--sync_slave_with_master +--connection slave +--replace_column 1 2 +select @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status; +--let $start_pos = `select @start_pos` +--let $end_pos = `select @end_pos` + +--connection master +--replace_result $start_pos +--replace_column 5 # +--eval show binlog events from $start_pos limit 1 +--replace_result $start_pos +--replace_column 2 # 4 # 5 # +--eval show binlog events from $start_pos limit 1,2 +--replace_result $start_pos $end_pos +--replace_column 2 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ +--eval show binlog events from $start_pos limit 3,1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test new file mode 100644 index 00000000000..14e2b36b588 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test @@ -0,0 +1,104 @@ +--source include/have_ndb.inc +--source include/ndb_default_cluster.inc +--source include/not_embedded.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +# +# Currently test only works with ndb since it retrieves "old" +# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; +# + +# stop the save +--connection slave +STOP SLAVE; +CREATE DATABASE ndbsynctest; +USE ndbsynctest; + +# get some data on the master +--connection master +CREATE DATABASE ndbsynctest; +USE ndbsynctest; +CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ; +INSERT INTO t1 VALUES (1,1,"row1"),(0,1,"row2"),(1,0,"row3"),(0,0,"row4"); +CREATE TABLE t2 (c1 CHAR(15), c2 BIT(1) NOT NULL, c3 BIT(1) NOT NULL, PRIMARY KEY(c1)) ENGINE = NDB ; +INSERT INTO t2 VALUES ("ABC",1,1),("BCDEF",0,1),("CD",1,0),("DEFGHIJKL",0,0); +SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; +SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; + +# take a backup on master +--source include/ndb_backup.inc + +# update a row +UPDATE t1 SET c2=0 WHERE c3="row2"; +SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; + +# restore on slave, first check that nothing is there +--connection slave + +# we should have no tables +SHOW TABLES; + +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT + +# +# BUG#11960 +# prior to bugfix "DROP DATABASE" would give a warning since +# the events were not created by ndb_restore +# +DROP DATABASE ndbsynctest; +CREATE DATABASE ndbsynctest; +USE ndbsynctest; +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT + +# continue test +SHOW TABLES; + +SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; +SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; + +# +# now setup replication to continue from last epoch +--source include/ndb_setup_slave.inc +--connection slave +START SLAVE; + +# +# +# +--connection master +--sync_slave_with_master +--connection slave +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 7 8 9 16 22 23 33 +SHOW SLAVE STATUS; + +SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; +SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; + +# +# Cleanup +# + +--connection master +DROP DATABASE ndbsynctest; +--sync_slave_with_master +--connection slave +STOP SLAVE; + +# +# Test some replication commands +# +--connection master +reset master; +# should now contain nothing +select * from mysql.ndb_binlog_index; + +--connection slave +reset slave; +# should now contain nothing +select * from mysql.ndb_apply_status; + +# End 5.1 Test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test new file mode 100644 index 00000000000..7439da563a6 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_trig004.test @@ -0,0 +1,15 @@ +############################################################################# +# Original Author: JBM # +# Original Date: 2006-02-14 # +############################################################################# +# TEST: Use before insert triggers and has the second insert fail # +# Test is wrapped to save code and share between engines # +############################################################################# + +# Includes +-- source include/have_binlog_format_row.inc +-- source include/have_ndb.inc +-- source include/master-slave.inc +let $engine_type=NDB; +-- source extra/rpl_tests/rpl_trig004.test + diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test new file mode 100644 index 00000000000..62b83f0557a --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndbapi_multi.test @@ -0,0 +1,11 @@ +-- source include/have_ndb.inc +-- source include/have_binlog_format_row.inc +-- source include/master-slave.inc +-- source include/have_ndbapi_examples.inc + +--exec echo Running ndbapi_simple_dual +--exec $NDB_EXAMPLES_DIR/ndbapi_simple_dual/ndbapi_simple_dual $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" $SLAVE_MYSOCK "localhost:$NDBCLUSTER_PORT_SLAVE" >> $NDB_EXAMPLES_OUTPUT + +--exec echo Running mgmapi_logevent +--exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "localhost:$NDBCLUSTER_PORT" "localhost:$NDBCLUSTER_PORT_SLAVE" 1 >> $NDB_EXAMPLES_OUTPUT + diff --git a/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test new file mode 100644 index 00000000000..1ec2fb333ae --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_row_basic_7ndb.test @@ -0,0 +1,5 @@ +-- source include/have_ndb.inc +let $type= 'NDB' ; +let $extra_index= ; +-- source extra/rpl_tests/rpl_row_basic.test +-- source include/master-slave-end.inc diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test new file mode 100644 index 00000000000..1d69eee5dd0 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test @@ -0,0 +1,71 @@ + +--source include/have_ndb.inc +--source include/master-slave.inc +--source include/have_binlog_format_mixed_or_row.inc + +--disable_query_log +--disable_warnings +connection slave; +STOP SLAVE; +connection master; +DROP TABLE IF EXISTS t1; +RESET MASTER; +connection slave; +DROP TABLE IF EXISTS t1; +RESET SLAVE; +START SLAVE; +--enable_warnings +--enable_query_log + +--echo **** On Master **** +connection master; +CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1 ORDER BY a,b; +--echo **** On Slave **** +# This is silly, but NDB doesn't add to the binlog fast enough +--real_sleep 10 +sync_slave_with_master; +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1 ORDER BY a,b; +--echo **** On Master **** +connection master; +TRUNCATE TABLE t1; +SELECT * FROM t1 ORDER BY a,b; +--echo **** On Slave **** +sync_slave_with_master; +# Should be empty +SELECT * FROM t1 ORDER BY a,b; +--echo **** On Master **** +connection master; +DROP TABLE t1; +let SERVER_VERSION=`select version()`; +--replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/ +--replace_result $SERVER_VERSION SERVER_VERSION +SHOW BINLOG EVENTS; + +--echo **** On Master **** +connection master; +CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1 ORDER BY a,b; +--echo **** On Slave **** +sync_slave_with_master; +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1 ORDER BY a,b; +--echo **** On Master **** +connection master; +DELETE FROM t1; +SELECT * FROM t1 ORDER BY a,b; +--echo **** On Slave **** +sync_slave_with_master; +# Should be empty +SELECT * FROM t1 ORDER BY a,b; +--echo **** On Master **** +connection master; +DROP TABLE t1; +--replace_regex /table_id: [0-9]+/table_id: #/ +--replace_result $SERVER_VERSION SERVER_VERSION +SHOW BINLOG EVENTS; + +-- source include/master-slave-end.inc diff --git a/mysql-test/t/binlog_killed.test b/mysql-test/t/binlog_killed.test deleted file mode 100644 index 6c0b4b46a4e..00000000000 --- a/mysql-test/t/binlog_killed.test +++ /dev/null @@ -1,248 +0,0 @@ --- source include/have_innodb.inc --- source include/have_binlog_format_mixed_or_statement.inc --- source include/not_embedded.inc - -### -### bug#22725 : incorrect killed error in binlogged query -### - -connect (con1, localhost, root,,); -connect (con2, localhost, root,,); - -create table t1 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB; -create table t2 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=MyISAM; -create table t3 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB; - -# -# effective test for bug#22725 -# - -connection con1; -select get_lock("a", 20); - -connection con2; -let $ID= `select connection_id()`; -reset master; -send insert into t2 values (null, null), (null, get_lock("a", 10)); - - -connection con1; - -disable_abort_on_error; -disable_query_log; -disable_result_log; - -eval kill query $ID; - -connection con2; ---error 0,ER_QUERY_INTERRUPTED -reap; -let $rows= `select count(*) from t2 /* must be 2 or 0 */`; - ---exec $MYSQL_BINLOG --start-position=134 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select -(@a:=load_file("$MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog")) -is not null; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -let $error_code= `select @a like "%#%error_code=0%" /* must return 1 or 0*/`; -let $insert_binlogged= `select @a like "%insert into%" /* must return 1 or 0 */`; -eval set @result= $rows- $error_code - $insert_binlogged; - -enable_abort_on_error; -enable_query_log; -enable_result_log; - -select @result /* must be zero either way */; - -# the functions are either *insensitive* to killing or killing can cause -# strange problmes with the error propagation out of SF's stack -# Bug#27563, Bug#27565, BUG#24971 -# -# TODO: use if's block as regression test for the bugs or remove -# -if (0) -{ -delimiter |; -create function bug27563() -RETURNS int(11) -DETERMINISTIC -begin - select get_lock("a", 10) into @a; - return 1; -end| -delimiter ;| - -# the function is sensitive to killing requiring innodb though with wrong client error -# TO FIX in BUG#27565; TODO: remove --error 1105 afterwards -delimiter |; -create function bug27565() -RETURNS int(11) -DETERMINISTIC -begin - select a from t1 where a=1 into @a for update; - return 1; -end| -delimiter ;| - -reset master; - - -### ta table case: killing causes rollback - -# A. autocommit ON -connection con1; -select get_lock("a", 20); - -connection con2; -let $ID= `select connection_id()`; -send insert into t1 values (bug27563(),1); - -connection con1; -eval kill query $ID; - -connection con2; -# todo (re-record test): after bugs 27563,27565 got fixed affected rows will report zero ---enable_info -# todo: remove 0 return after fixing Bug#27563 ---error 0,ER_QUERY_INTERRUPTED -reap; ### pb: wrong error ---disable_info -###--replace_column 2 # 5 # -### show binlog events from 98 /* nothing in binlog unless Bug#27563 */; -show master status /* must be only FD event unless Bug#27563 */; -select count(*) from t1 /* must be zero unless Bug#27563 */; - -# M. multi-statement-ta -connection con2; -let $ID= `select connection_id()`; -begin; -send insert into t1 values (bug27563(),1); - -connection con1; -eval kill query $ID; -connection con2; -# todo (re-record test): after bugs 27563,27565 got fixed affected rows will report zero ---enable_info -# todo: remove 0 return after fixing Bug#27563 ---error 0,ER_QUERY_INTERRUPTED -reap; ---disable_info -select count(*) from t1 /* must be zero unless Bug#27563 */; -commit; - - -### non-ta table case: killing must be recorded in binlog - -reset master; - -connection con2; -let $ID= `select connection_id()`; -send insert into t2 values (bug27563(),1); - -connection con1; -eval kill query $ID; - -connection con2; -# todo: remove 0 return after fixing Bug#27563 ---error 0,ER_QUERY_INTERRUPTED -reap; -select count(*) from t2 /* must be one */; -#show binlog events from 98 /* must have the insert on non-ta table */; -show master status /* must have the insert event more to FD */; -# the value of the error flag of KILLED_QUERY is tested further - -connection con1; -select RELEASE_LOCK("a"); - -### test with effective killing of SF() - -delete from t1; -delete from t2; -insert into t1 values (1,1); -insert into t2 values (1,1); - -# -# Bug#27565 -# test where KILL is propagated as error to the top level -# still another bug with the error message to the user -# todo: fix reexecute the result file after fixing -# -begin; update t1 set b=0 where a=1; - -connection con2; -let $ID= `select connection_id()`; -send update t2 set b=bug27565()-1 where a=1; - -connection con1; -eval kill query $ID; -commit; - -connection con2; -# todo: fix Bug #27565 killed query of SF() is not reported correctly and -# remove 1105 (wrong) -#--error ER_QUERY_INTERRUPTED ---error 1105,ER_QUERY_INTERRUPTED -reap; ### pb: wrong error -select * from t1 /* must be: (1,0) */; -select * from t2 /* must be as before: (1,1) */; - -## bug#22725 with effective and propagating killing -# -# top-level ta-table -connection con1; -delete from t3; -reset master; -begin; update t1 set b=0 where a=1; - -connection con2; -let $ID= `select connection_id()`; -# the query won't perform completely since the function gets interrupted -send insert into t3 values (0,0),(1,bug27565()); - -connection con1; -eval kill query $ID; -rollback; - -connection con2; -# todo: fix Bug #27565 killed query of SF() is not reported correctly and -# remove 1105 (wrong) -#--error ER_QUERY_INTERRUPTED ---error 1105,ER_QUERY_INTERRUPTED -reap; ### pb: wrong error -select count(*) from t3 /* must be zero */; -show master status /* nothing in binlog */; - -# top-level non-ta-table -connection con1; -delete from t2; -reset master; -begin; update t1 set b=0 where a=1; - -connection con2; -let $ID= `select connection_id()`; -# the query won't perform completely since the function gets intrurrupted -send insert into t2 values (0,0),(1,bug27565()) /* non-ta t2 */; - -connection con1; -eval kill query $ID; -rollback; - -connection con2; -# todo: fix Bug #27565 killed query of SF() is not reported correctly and -# remove 1105 (wrong) -#--error ER_QUERY_INTERRUPTED ---error 1105,ER_QUERY_INTERRUPTED -reap; ### pb: wrong error - -select count(*) from t2 /* count must be one */; -show master status /* insert into non-ta must be in binlog */; - -drop function bug27563; -drop function bug27565; -} - -system rm $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog ; - -drop table t1,t2,t3; - diff --git a/mysql-test/t/binlog_row_binlog-master.opt b/mysql-test/t/binlog_row_binlog-master.opt deleted file mode 100644 index ad2c6a647b5..00000000000 --- a/mysql-test/t/binlog_row_binlog-master.opt +++ /dev/null @@ -1 +0,0 @@ --O max_binlog_size=4096 diff --git a/mysql-test/t/binlog_row_binlog.test b/mysql-test/t/binlog_row_binlog.test deleted file mode 100644 index 8adc8eee5c1..00000000000 --- a/mysql-test/t/binlog_row_binlog.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc --- source extra/binlog_tests/binlog.test diff --git a/mysql-test/t/binlog_row_blackhole.test b/mysql-test/t/binlog_row_blackhole.test deleted file mode 100644 index d5355ad1ff0..00000000000 --- a/mysql-test/t/binlog_row_blackhole.test +++ /dev/null @@ -1,11 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc - -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. ---disable_ps_protocol --- source extra/binlog_tests/blackhole.test ---enable_ps_protocol diff --git a/mysql-test/t/binlog_row_ctype_cp932.test b/mysql-test/t/binlog_row_ctype_cp932.test deleted file mode 100644 index 595af5a3114..00000000000 --- a/mysql-test/t/binlog_row_ctype_cp932.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc --- source extra/binlog_tests/ctype_cp932.test diff --git a/mysql-test/t/binlog_row_ctype_ucs.test b/mysql-test/t/binlog_row_ctype_ucs.test deleted file mode 100644 index 96e14ed8882..00000000000 --- a/mysql-test/t/binlog_row_ctype_ucs.test +++ /dev/null @@ -1,6 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc --- source extra/binlog_tests/ctype_ucs_binlog.test - diff --git a/mysql-test/t/binlog_row_drop_tmp_tbl.test b/mysql-test/t/binlog_row_drop_tmp_tbl.test deleted file mode 100644 index 5b503b78d85..00000000000 --- a/mysql-test/t/binlog_row_drop_tmp_tbl.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc --- source extra/binlog_tests/drop_temp_table.test diff --git a/mysql-test/t/binlog_row_innodb_stat-master.opt b/mysql-test/t/binlog_row_innodb_stat-master.opt deleted file mode 100644 index 4cb927540bf..00000000000 --- a/mysql-test/t/binlog_row_innodb_stat-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog_cache_size=32768 diff --git a/mysql-test/t/binlog_row_innodb_stat.test b/mysql-test/t/binlog_row_innodb_stat.test deleted file mode 100644 index e4e6762226b..00000000000 --- a/mysql-test/t/binlog_row_innodb_stat.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc --- source extra/binlog_tests/innodb_stat.test diff --git a/mysql-test/t/binlog_row_insert_select.test b/mysql-test/t/binlog_row_insert_select.test deleted file mode 100644 index 806d495c8fb..00000000000 --- a/mysql-test/t/binlog_row_insert_select.test +++ /dev/null @@ -1,10 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. ---disable_ps_protocol --- source extra/binlog_tests/insert_select-binlog.test ---enable_ps_protocol diff --git a/mysql-test/t/binlog_row_mix_innodb_myisam-master.opt b/mysql-test/t/binlog_row_mix_innodb_myisam-master.opt deleted file mode 100644 index e76299453d3..00000000000 --- a/mysql-test/t/binlog_row_mix_innodb_myisam-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb_lock_wait_timeout=2 diff --git a/mysql-test/t/binlog_row_mix_innodb_myisam.test b/mysql-test/t/binlog_row_mix_innodb_myisam.test deleted file mode 100644 index 335a05be146..00000000000 --- a/mysql-test/t/binlog_row_mix_innodb_myisam.test +++ /dev/null @@ -1,32 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_row.inc - -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. ---disable_ps_protocol - --- source extra/binlog_tests/mix_innodb_myisam_binlog.test - ---enable_ps_protocol - -# This piece below cannot be put into -# extra/binlog_tests/mix_innodb_myisam_binlog.test -# because the argument of --start-position differs between statement- -# and row-based (and "eval --exec" doesn't work). -# we check that the error code of the "ROLLBACK" event is 0 and not -# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction -# and does not make slave to stop) -flush logs; ---exec $MYSQL_BINLOG --start-position=520 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select -(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) -is not null; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval select -@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", -@a not like "%#%error_code=%error_code=%"; -drop table t1, t2; diff --git a/mysql-test/t/binlog_statement_insert_delayed.test b/mysql-test/t/binlog_statement_insert_delayed.test deleted file mode 100644 index 9b78296236f..00000000000 --- a/mysql-test/t/binlog_statement_insert_delayed.test +++ /dev/null @@ -1,9 +0,0 @@ -# This test is to verify replication with INSERT DELAY through -# unrecommended STATEMENT binlog format - --- source include/not_embedded.inc --- source include/have_binlog_format_statement.inc --- disable_query_log -reset master; # get rid of previous tests binlog --- enable_query_log --- source extra/binlog_tests/binlog_insert_delayed.test diff --git a/mysql-test/t/binlog_stm_binlog-master.opt b/mysql-test/t/binlog_stm_binlog-master.opt deleted file mode 100644 index ad2c6a647b5..00000000000 --- a/mysql-test/t/binlog_stm_binlog-master.opt +++ /dev/null @@ -1 +0,0 @@ --O max_binlog_size=4096 diff --git a/mysql-test/t/binlog_stm_binlog.test b/mysql-test/t/binlog_stm_binlog.test deleted file mode 100644 index 280b7a3aef9..00000000000 --- a/mysql-test/t/binlog_stm_binlog.test +++ /dev/null @@ -1,18 +0,0 @@ -# REQUIREMENT -# replace_regex should replace output of SHOW BINLOG EVENTS - -create table t1 (a int, b int) engine=innodb; -begin; -insert into t1 values (1,2); -commit; ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -show binlog events; -drop table t1; - -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/not_embedded.inc --- source include/have_binlog_format_mixed.inc --- source extra/binlog_tests/binlog.test - diff --git a/mysql-test/t/binlog_stm_blackhole.test b/mysql-test/t/binlog_stm_blackhole.test deleted file mode 100644 index 02ba2be095b..00000000000 --- a/mysql-test/t/binlog_stm_blackhole.test +++ /dev/null @@ -1,6 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/not_embedded.inc --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/blackhole.test diff --git a/mysql-test/t/binlog_stm_ctype_cp932.test b/mysql-test/t/binlog_stm_ctype_cp932.test deleted file mode 100644 index c0791d81445..00000000000 --- a/mysql-test/t/binlog_stm_ctype_cp932.test +++ /dev/null @@ -1,6 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/not_embedded.inc --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/ctype_cp932.test diff --git a/mysql-test/t/binlog_stm_ctype_ucs.test b/mysql-test/t/binlog_stm_ctype_ucs.test deleted file mode 100644 index c8cd7e06398..00000000000 --- a/mysql-test/t/binlog_stm_ctype_ucs.test +++ /dev/null @@ -1,6 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/ctype_ucs_binlog.test - diff --git a/mysql-test/t/binlog_stm_drop_tmp_tbl.test b/mysql-test/t/binlog_stm_drop_tmp_tbl.test deleted file mode 100644 index 6017f272d01..00000000000 --- a/mysql-test/t/binlog_stm_drop_tmp_tbl.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/drop_temp_table.test diff --git a/mysql-test/t/binlog_stm_innodb_stat-master.opt b/mysql-test/t/binlog_stm_innodb_stat-master.opt deleted file mode 100644 index 4cb927540bf..00000000000 --- a/mysql-test/t/binlog_stm_innodb_stat-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog_cache_size=32768 diff --git a/mysql-test/t/binlog_stm_innodb_stat.test b/mysql-test/t/binlog_stm_innodb_stat.test deleted file mode 100644 index a08039c4a41..00000000000 --- a/mysql-test/t/binlog_stm_innodb_stat.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/innodb_stat.test diff --git a/mysql-test/t/binlog_stm_insert_select.test b/mysql-test/t/binlog_stm_insert_select.test deleted file mode 100644 index 3aefa1e6cf7..00000000000 --- a/mysql-test/t/binlog_stm_insert_select.test +++ /dev/null @@ -1,5 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/insert_select-binlog.test diff --git a/mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt b/mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt deleted file mode 100644 index e76299453d3..00000000000 --- a/mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb_lock_wait_timeout=2 diff --git a/mysql-test/t/binlog_stm_mix_innodb_myisam.test b/mysql-test/t/binlog_stm_mix_innodb_myisam.test deleted file mode 100644 index 72651c13be7..00000000000 --- a/mysql-test/t/binlog_stm_mix_innodb_myisam.test +++ /dev/null @@ -1,24 +0,0 @@ -# This is a wrapper for binlog.test so that the same test case can be used -# For both statement and row based bin logs 9/19/2005 [jbm] - --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/binlog_tests/mix_innodb_myisam_binlog.test - -# This piece below cannot be put into -# extra/binlog_tests/mix_innodb_myisam_binlog.test -# because the argument of --start-position differs between statement- -# and row-based (and "eval --exec" doesn't work). -# we check that the error code of the "ROLLBACK" event is 0 and not -# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction -# and does not make slave to stop) -flush logs; ---exec $MYSQL_BINLOG --start-position=555 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select -(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output")) -is not null; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval select -@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", -@a not like "%#%error_code=%error_code=%"; -drop table t1, t2; diff --git a/mysql-test/t/binlog_stm_ps.test b/mysql-test/t/binlog_stm_ps.test deleted file mode 100644 index 83add5af3d7..00000000000 --- a/mysql-test/t/binlog_stm_ps.test +++ /dev/null @@ -1,26 +0,0 @@ -# This test is to verify replication with PS - --- source include/not_embedded.inc --- source include/have_binlog_format_mixed_or_statement.inc - --- disable_query_log -reset master; # get rid of previous tests binlog --- enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings -reset master; - -# -# Bug #26842: master binary log contains invalid queries - replication fails -# -create table t1 (a int); -prepare s from "insert into t1 values (@a),(?)"; -set @a=98; execute s using @a; -prepare s from "insert into t1 values (?)"; -set @a=99; execute s using @a; -prepare s from "insert into t1 select 100 limit ?"; -set @a=100; execute s using @a; -source include/show_binlog_events.inc; -drop table t1; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 27e3b9bc614..31ff0d58477 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -21,29 +21,6 @@ im_instance_conf : BUG#28743 Instance manager generates warnings in test im_utils : BUG#28743 Instance manager generates warnings in test suite concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences -ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog -ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog -ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed - -partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table -rpl_ndb_circular_simplex : BUG#27972 2007-04-20 mats Slave cannot start where it stopped -rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated -rpl_ndb_2myisam : BUG#19227 Seems to pass currently -rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD -rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master -rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement -rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement -#rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly -rpl_ndb_ddl : BUG#28798 2007-05-31 lars Valgrind failure in NDB - -# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open -#ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent CRBR: multiple binlog, second binlog may miss schema log events -#ndb_binlog_discover : bug#21806 2006-08-24 -#ndb_autodiscover3 : bug#21806 - -#rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly - -ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms im_options_set : Bug#20294: Instance manager tests fail randomly im_options_unset : Bug#20294: Instance manager tests fail randomly diff --git a/mysql-test/t/loaddata_autocom_ndb.test b/mysql-test/t/loaddata_autocom_ndb.test deleted file mode 100644 index f4a6743aabe..00000000000 --- a/mysql-test/t/loaddata_autocom_ndb.test +++ /dev/null @@ -1,4 +0,0 @@ ---source include/have_ndb.inc -let $engine_type=ndbcluster; - ---source include/loaddata_autocom.inc diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test deleted file mode 100644 index a7b52d54710..00000000000 --- a/mysql-test/t/ndb_alter_table.test +++ /dev/null @@ -1,439 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; -drop database if exists mysqltest; ---enable_warnings - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); - -connection con2; --- sleep 2 -connection con1; - -# -# Basic test to show that the ALTER TABLE -# is working -# -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412); - -ALTER TABLE t1 ADD COLUMN c int not null; -SELECT * FROM t1; - -DROP TABLE t1; - -# -# Verfify changing table names between databases -# -CREATE DATABASE mysqltest; -USE mysqltest; -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; -RENAME TABLE t1 TO test.t1; -SHOW TABLES; -DROP DATABASE mysqltest; -USE test; -SHOW TABLES; -DROP TABLE t1; - -# -# More advanced test -# -create table t1 ( -col1 int not null auto_increment primary key, -col2 varchar(30) not null, -col3 varchar (20) not null, -col4 varchar(4) not null, -col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, -col6 int not null, to_be_deleted int) ENGINE=ndbcluster; ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -insert into t1 values -(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -alter table t1 -add column col4_5 varchar(20) not null after col4, -add column col7 varchar(30) not null after col5, -add column col8 datetime not null, drop column to_be_deleted, -change column col2 fourth varchar(30) not null after col3, -modify column col6 int not null first; ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); ---replace_column 6 # 7 # 8 # 10 # 12 # 13 # 14 # 18 # -show table status; -select * from t1 order by col1; -delete from t1; -insert into t1 values (0,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -SET SQL_MODE=''; -insert into t1 values (1,0,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -alter table t1 drop column col4_5; -insert into t1 values (2,0,4,3,5,"PENDING","EXTRA",'2004-01-01 00:00:00'); -select * from t1 order by col1; -drop table t1; - - -# -# Check that invalidating dictionary cache works -# - -CREATE TABLE t1 ( - a INT NOT NULL, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412); - -ALTER TABLE t1 ADD COLUMN c int not null; -select * from t1 order by a; - -connection con2; -select * from t1 order by a; -alter table t1 drop c; - -connection con1; -select * from t1 order by a; -drop table t1; - -connection con2; ---error 1146 -select * from t1 order by a; - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; -alter table t1 modify column a int not null auto_increment; -SET SQL_MODE=''; -select * from t1 order by a; -INSERT INTO t1 VALUES (0,19),(20,21); -select * from t1 order by a; -drop table t1; - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,1),(17,18); -select * from t1 order by a; -alter table t1 add c int not null unique auto_increment; -select c from t1 order by c; -INSERT INTO t1 VALUES (1,2,0),(18,19,4),(20,21,0); -select c from t1 order by c; -drop table t1; - -## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs -#create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -#engine=ndb; -#insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -#create index c on t1(c); -#connection server2; -#select * from t1 where c = 'two'; -#connection server1; -#alter table t1 drop index c; -#connection server2; -#select * from t1 where c = 'two'; -#connection server1; -#drop table t1; - -#--disable_warnings -#DROP TABLE IF EXISTS t2; -#--enable_warnings - -#create table t2 (a int NOT NULL PRIMARY KEY) engine=myisam; -#let $1=12001; -#disable_query_log; -#while ($1) -#{ -# eval insert into t2 values($1); -# dec $1; -#} -#enable_query_log; -#alter table t2 engine=ndbcluster; -#alter table t2 add c int; -#--error 1297 -#delete from t2; -#to make sure we do a full table scan -#select count(*) from t2 where a+0 > 0; -#truncate table t2; -#select count(*) from t2; -#drop table t2; - -## Test moved to ndb_alter_table_row|stmt respectively as behaviour differs -#connection server1; -#create table t3 (a int primary key) engine=ndbcluster; - -#connection server2; -#begin; -#insert into t3 values (1); - -#connection server1; -#alter table t3 rename t4; - -#connection server2; -## with rbr the below will not work as the "alter" event -## explicitly invalidates the dictionary cache. -### This should work as transaction is ongoing... -##delete from t3; -##insert into t3 values (1); -#commit; - -## This should fail as its a new transaction -#--error 1146 -#select * from t3; -#select * from t4; -#drop table t4; -#show tables; -#connection server1; - -create table t1 ( -ai bigint auto_increment, -c001 int(11) not null, -c002 int(11) not null, -c003 int(11) not null, -c004 int(11) not null, -c005 int(11) not null, -c006 int(11) not null, -c007 int(11) not null, -c008 int(11) not null, -c009 int(11) not null, -c010 int(11) not null, -c011 int(11) not null, -c012 int(11) not null, -c013 int(11) not null, -c014 int(11) not null, -c015 int(11) not null, -c016 int(11) not null, -c017 int(11) not null, -c018 int(11) not null, -c019 int(11) not null, -c020 int(11) not null, -c021 int(11) not null, -c022 int(11) not null, -c023 int(11) not null, -c024 int(11) not null, -c025 int(11) not null, -c026 int(11) not null, -c027 int(11) not null, -c028 int(11) not null, -c029 int(11) not null, -c030 int(11) not null, -c031 int(11) not null, -c032 int(11) not null, -c033 int(11) not null, -c034 int(11) not null, -c035 int(11) not null, -c036 int(11) not null, -c037 int(11) not null, -c038 int(11) not null, -c039 int(11) not null, -c040 int(11) not null, -c041 int(11) not null, -c042 int(11) not null, -c043 int(11) not null, -c044 int(11) not null, -c045 int(11) not null, -c046 int(11) not null, -c047 int(11) not null, -c048 int(11) not null, -c049 int(11) not null, -c050 int(11) not null, -c051 int(11) not null, -c052 int(11) not null, -c053 int(11) not null, -c054 int(11) not null, -c055 int(11) not null, -c056 int(11) not null, -c057 int(11) not null, -c058 int(11) not null, -c059 int(11) not null, -c060 int(11) not null, -c061 int(11) not null, -c062 int(11) not null, -c063 int(11) not null, -c064 int(11) not null, -c065 int(11) not null, -c066 int(11) not null, -c067 int(11) not null, -c068 int(11) not null, -c069 int(11) not null, -c070 int(11) not null, -c071 int(11) not null, -c072 int(11) not null, -c073 int(11) not null, -c074 int(11) not null, -c075 int(11) not null, -c076 int(11) not null, -c077 int(11) not null, -c078 int(11) not null, -c079 int(11) not null, -c080 int(11) not null, -c081 int(11) not null, -c082 int(11) not null, -c083 int(11) not null, -c084 int(11) not null, -c085 int(11) not null, -c086 int(11) not null, -c087 int(11) not null, -c088 int(11) not null, -c089 int(11) not null, -c090 int(11) not null, -c091 int(11) not null, -c092 int(11) not null, -c093 int(11) not null, -c094 int(11) not null, -c095 int(11) not null, -c096 int(11) not null, -c097 int(11) not null, -c098 int(11) not null, -c099 int(11) not null, -c100 int(11) not null, -c101 int(11) not null, -c102 int(11) not null, -c103 int(11) not null, -c104 int(11) not null, -c105 int(11) not null, -c106 int(11) not null, -c107 int(11) not null, -c108 int(11) not null, -c109 int(11) not null, -primary key (ai), -unique key tx1 (c002, c003, c004, c005)) engine=ndb; - -create index tx2 -on t1 (c010, c011, c012, c013); - -drop table t1; - -# End of 4.1 tests - -# On-line alter table - - -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10), - vstring varchar(10), - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('zero','one','two','three','four') not null, - flags set('zero','one','two','three','four') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp, - PRIMARY KEY (auto) -) engine=ndb; - -CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(20), logging VARCHAR(20), _database VARCHAR(255), _schema VARCHAR(20), name VARCHAR(255)); - ---disable_warnings ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---enable_warnings - -# Ndb doesn't support renaming attributes on-line -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; - -alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; ---disable_warnings ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---enable_warnings - -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; - -set @t1_id = (select id from ndb_show_tables where name like '%t1%'); -truncate ndb_show_tables; - -create index i1 on t1(medium); -alter table t1 add index i2(new_tiny); -drop index i1 on t1; - ---disable_warnings ---exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat -LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; ---exec rm $MYSQLTEST_VARDIR/master-data/test/tmp.dat || true ---enable_warnings - -select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; - -DROP TABLE t1, ndb_show_tables; - -# simple test that auto incr is not lost at rename or alter -create table t1 (a int primary key auto_increment, b int) engine=ndb; -insert into t1 (b) values (101),(102),(103); -select * from t1 where a = 3; -alter table t1 rename t2; -insert into t2 (b) values (201),(202),(203); -select * from t2 where a = 6; -alter table t2 add c int; -insert into t2 (b) values (301),(302),(303); -select * from t2 where a = 9; -alter table t2 rename t1; -insert into t1 (b) values (401),(402),(403); -select * from t1 where a = 12; -drop table t1; - -# some other ALTER combinations -# add/drop pk -create table t1 (a int not null, b varchar(10)) engine=ndb; -show index from t1; -alter table t1 add primary key (a); -show index from t1; -alter table t1 drop primary key; -show index from t1; -drop table t1; - -# alter .. alter -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -show create table t1; -alter table t1 alter b set default 1; -show create table t1; -drop table t1; - -# alter .. order by -create table t1 (a int not null, b int not null) engine=ndb; -insert into t1 values (1, 300), (2, 200), (3, 100); -select * from t1 order by a; -alter table t1 order by b; -select * from t1 order by b; -drop table t1; - ---echo End of 5.1 tests diff --git a/mysql-test/t/ndb_alter_table2.test b/mysql-test/t/ndb_alter_table2.test deleted file mode 100644 index afe6e44f698..00000000000 --- a/mysql-test/t/ndb_alter_table2.test +++ /dev/null @@ -1,85 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connect (con3,localhost,root,,test); -connect (con4,localhost,root,,test); -connect (con5,localhost,root,,test); -connect (con6,localhost,root,,test); - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL -) ENGINE=ndbcluster; - -connection con1; -BEGIN; -INSERT INTO t1 VALUES (9410,9412); -connection con2; -BEGIN; ---send -INSERT INTO t1 VALUES (9411,9412); -connection con3; -BEGIN; ---send -INSERT INTO t1 VALUES (9412,9412); -connection con4; -BEGIN; ---send -INSERT INTO t1 VALUES (9413,9412); -connection con5; -BEGIN; ---send -INSERT INTO t1 VALUES (9414,9412); -connection con6; -BEGIN; ---send -INSERT INTO t1 VALUES (9415,9412); -connection con1; -sleep 1; - -ROLLBACK; -connection con2; -reap; -ROLLBACK; -connection con3; -reap; -ROLLBACK; -connection con4; -reap; -ROLLBACK; -connection con5; -reap; -ROLLBACK; -connection con6; -reap; -ROLLBACK; - -connection server2; - -drop table t1; -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL -) ENGINE=ndbcluster; - -connection server1; - ---disable_result_log ---error 0,1412 -select * from t1; ---enable_result_log -select * from t1; -select * from t1; -select * from t1; -select * from t1; -select * from t1; - -drop table t1; diff --git a/mysql-test/t/ndb_alter_table3.test b/mysql-test/t/ndb_alter_table3.test deleted file mode 100644 index a5fe613adcf..00000000000 --- a/mysql-test/t/ndb_alter_table3.test +++ /dev/null @@ -1,49 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -connection server1; -create table t1 ( a int primary key, b varchar(10), c varchar(10), index (b) ) -engine=ndb; -insert into t1 values (1,'one','one'), (2,'two','two'), (3,'three','three'); -create index c on t1(c); -connection server2; -show indexes from t1; -select * from t1 where c = 'two'; -connection server1; -alter table t1 drop index c; -connection server2; -show indexes from t1; -select * from t1 where c = 'two'; -connection server1; -drop table t1; - -connection server1; -create table t3 (a int primary key) engine=ndbcluster; - -connection server2; -begin; -insert into t3 values (1); - -connection server1; -alter table t3 rename t4; - -connection server2; -# with rbr the below will not work as the "alter" event -# explicitly invalidates the dictionary cache. -## This should work as transaction is ongoing... -#delete from t3; -#insert into t3 values (1); -commit; - -# This should fail as its a new transaction ---error 1146 -select * from t3; -select * from t4; -drop table t4; -show tables; -connection server1; diff --git a/mysql-test/t/ndb_autodiscover.test b/mysql-test/t/ndb_autodiscover.test deleted file mode 100644 index 06d47693c10..00000000000 --- a/mysql-test/t/ndb_autodiscover.test +++ /dev/null @@ -1,548 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -################################################ -# Test that a table that does not exist as a -# frm file on disk can be "discovered" from a -# connected NDB Cluster -# - -flush status; - -# -# Test discover + SELECT -# - -create table t1( - id int not null primary key, - name char(20) -) engine=ndb; - -insert into t1 values(1, "Autodiscover"); -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -select * from t1; -show status like 'handler_discover%'; - -# -# Test discover + INSERT -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -insert into t1 values (2, "Auto 2"); -show status like 'handler_discover%'; -insert into t1 values (3, "Discover 3"); -show status like 'handler_discover%'; -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -select * from t1 order by id; -show status like 'handler_discover%'; - -# -# Test discover + UPDATE -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -update t1 set name="Autodiscover" where id = 2; -show status like 'handler_discover%'; -select * from t1 order by id; -show status like 'handler_discover%'; - -# -# Test discover + DELETE -# - -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm -delete from t1 where id = 3; -select * from t1 order by id; -show status like 'handler_discover%'; - -drop table t1; - - - -###################################################### -# Test that a table that is outdated on disk -# can be "discovered" from a connected NDB Cluster -# - -flush status; - -create table t2( - id int not null primary key, - name char(22) -) engine=ndb; -insert into t2 values (1, "Discoverer"); -select * from t2; -show status like 'handler_discover%'; -flush tables; - -# Modify the frm file on disk -system echo "blaj" >> $MYSQLTEST_VARDIR/master-data/test/t2.frm ; -select * from t2; - -show status like 'handler_discover%'; - -drop table t2; - - -################################################## -# Test that a table that already exists in NDB -# is only discovered if CREATE TABLE IF NOT EXISTS -# is used -# - -flush status; - -create table t3( - id int not null primary key, - name char(255) -) engine=ndb; -insert into t3 values (1, "Explorer"); -select * from t3; -show status like 'handler_discover%'; -flush tables; - -# Remove the frm file from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm - ---error 1050 -create table t3( - id int not null primary key, - name char(20), a int, b float, c char(24) -) engine=ndb; - -# The table shall not have been discovered since -# IF NOT EXISTS wasn't specified - -show status like 'handler_discover%'; - -# now it should be discovered -create table IF NOT EXISTS t3( - id int not null primary key, - id2 int not null, - name char(20) -) engine=ndb; - -# NOTE! the table called t3 have now been updated to -# use the same frm as in NDB, thus it's not certain that -# the table schema is the same as was stated in the -# CREATE TABLE statement above - -show status like 'handler_discover%'; - -SHOW CREATE TABLE t3; - -select * from t3; -show status like 'handler_discover%'; - -drop table t3; - -################################################## -# Test that a table that already exists in NDB -# is discovered when SHOW TABLES -# is used -# - -flush status; - -create table t7( - id int not null primary key, - name char(255) -) engine=ndb; -create table t6( - id int not null primary key, - name char(255) -) engine=MyISAM; -insert into t7 values (1, "Explorer"); -insert into t6 values (2, "MyISAM table"); -select * from t7; -show status like 'handler_discover%'; - -# Remove the frm file from disk -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - -show tables from test; -show status like 'handler_discover%'; - -# Remove the frm file from disk again -flush tables; ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - ---replace_column 6 # 7 # 8 # 9 # 12 # 13 # 15 # 18 # -show table status; -show status like 'handler_discover%'; - -drop table t6, t7; - - -####################################################### -# Test that a table that has been dropped from NDB -# but still exists on disk, get a consistent error message -# saying "No such table existed" -# - -flush status; - -create table t4( - id int not null primary key, - name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - -# -# Test that correct error is returned ---error 1146 -select * from t4; ---error 1146 -select * from t4; - -show status like 'handler_discover%'; ---error 1051 -drop table t4; - -create table t4( - id int not null primary key, - name char(27) -) engine=ndb; -insert into t4 values (1, "Automatic"); -select * from t4; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - ---error 1146 -select * from t4; - -drop table if exists t4; - -# Test that dropping a table that does not exists -# on disk or in NDB gives same result as above ---error 1051 -drop table t5; -drop table if exists t5; - - -####################################################### -# Test that a table that has been dropped from NDB -# but still exists on disk is deleted from disk -# when SHOW TABLES is called -# - -flush status; - -create table t4( - id int not null primary key, - id2 int, - name char(27) -) engine=ndb; -insert into t4 values (1, 76, "Automatic2"); -select * from t4; -flush tables; - -# Remove the table from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t4 >> $NDB_TOOLS_OUTPUT ; - -SHOW TABLES; - ---error 1146 -select * from t4; - -####################################################### -# Test SHOW TABLES ability to detect new and delete old -# tables. Test all at once using many tables -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; - -# Populate tables -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); - -# Remove t3, t5 from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 >> $NDB_TOOLS_OUTPUT ; -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 >> $NDB_TOOLS_OUTPUT ; -# Remove t6, t7 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - -SHOW TABLES; - -select * from t6; -select * from t7; - -show status like 'handler_discover%'; - -drop table t1, t2, t4, t6, t7, t8, t9; - -####################################################### -# Test SHOW TABLES LIKE ability to detect new and delete old -# tables. Test all at once using many tables. -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=myisam; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; -create table t5(id int, d char(56)) engine=ndbcluster; -create table t6(id int) engine=ndbcluster; -create table t7(id int) engine=ndbcluster; -create table t8(id int, e char(34)) engine=myisam; -create table t9(id int) engine=myisam; - -# Populate tables -insert into t2 values (2, "myisam table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t5 values (5, "ndb table 5"); -insert into t6 values (6); -insert into t8 values (8, "myisam table 8"); -insert into t9 values (9); - -# Remove t3, t5 from NDB -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t3 > /dev/null ; -system exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test t5 > /dev/null ; -# Remove t6, t7 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t6.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t7.frm - - -SHOW TABLES LIKE 't6'; - -show status like 'handler_discover%'; - -# Check that t3 or t5 can't be created -# frm files for these tables is stilll on disk ---error 1050 -create table t3(a int); ---error 1050 -create table t5(a int); - -SHOW TABLES LIKE 't%'; - -show status like 'handler_discover%'; - -drop table t1, t2, t4, t6, t7, t8, t9; - - - -###################################################### -# Test that several tables can be discovered when -# one statement access several table at once. -# - -flush status; - -# Create tables -create table t1(id int) engine=ndbcluster; -create table t2(id int, b char(255)) engine=ndbcluster; -create table t3(id int, c char(255)) engine=ndbcluster; -create table t4(id int) engine=myisam; - -# Populate tables -insert into t1 values (1); -insert into t2 values (2, "table 2"); -insert into t3 values (3, "ndb table 3"); -insert into t4 values (4); - -# Remove t1, t2, t3 from disk ---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t2.frm ---remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm -flush tables; - -# Select from the table which only exists in NDB. -select * from t1, t2, t3, t4; - -# 3 table should have been discovered -show status like 'handler_discover%'; - -drop table t1, t2, t3, t4; - - -######################################################### -# Test that a table that has been changed in NDB -# since it's been opened will be refreshed and discovered -# again -# - -flush status; - -show status like 'handler_discover%'; - -create table t5( - id int not null primary key, - name char(200) -) engine=ndb; -insert into t5 values (1, "Magnus"); -select * from t5; - -ALTER TABLE t5 ADD COLUMN adress char(255) FIRST; - -select * from t5; - -insert into t5 values - ("Adress for record 2", 2, "Carl-Gustav"), - ("Adress for record 3", 3, "Karl-Emil"); -update t5 set name="Bertil" where id = 2; -select * from t5 order by id; - -show status like 'handler_discover%'; - -drop table t5; - - -################################################################ -# Test that a table that has been changed with ALTER TABLE -# can be used from the same thread -# - -flush status; - -show status like 'handler_discover%'; - -create table t6( - id int not null primary key, - name char(20) -) engine=ndb; -insert into t6 values (1, "Magnus"); -select * from t6; - -ALTER TABLE t6 ADD COLUMN adress char(255) FIRST; - -select * from t6; -insert into t6 values - ("Adress for record 2", 2, "Carl-Gustav"), - ("Adress for record 3", 3, "Karl-Emil"); -update t6 set name="Bertil" where id = 2; -select * from t6 order by id; - -show status like 'handler_discover%'; - -drop table t6; - -##################################################### -# Test that only tables in the current database shows -# up in SHOW TABLES -# - -show tables; - -create table t1 (a int,b longblob) engine=ndb; -show tables; -create database test2; -use test2; -show tables; ---error 1146 -select * from t1; -create table t2 (b int,c longblob) engine=ndb; -use test; -select * from t1; -show tables; -drop table t1; -use test2; -drop table t2; -drop database test2; -use test; - -######################################################### -# Bug#8035 -# mysqld would segfault on second select * before bug was fixed -# ---disable_warnings -drop database if exists test_only_ndb_tables; ---enable_warnings -create database test_only_ndb_tables; -use test_only_ndb_tables; -create table t1 (a int primary key) engine=ndb; -select * from t1; ---exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null ---error 1015 -select * from t1; ---exec $NDB_MGM --no-defaults -e "all start" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null -use test; -drop database test_only_ndb_tables; - -##################################################### -# Test that it's not possible to create tables -# with same name as NDB internal tables -# This will also test that it's not possible to create -# a table with tha same name as a table that can't be -# discovered( for example a table created via NDBAPI) - -# Test disabled since it doesn't work on case insensitive systems -#--error 1050 -#CREATE TABLE sys.SYSTAB_0 (a int); -#--error 1105 -#select * from sys.SYSTAB_0; - -#CREATE TABLE IF NOT EXISTS sys.SYSTAB_0 (a int); -#show warnings; -#--error 1105 -#select * from sys.SYSTAB_0; - -#--error 1051 -#drop table sys.SYSTAB_0; -#drop table IF EXISTS sys.SYSTAB_0; - -###################################################### -# Note! This should always be the last step in this -# file, the table t9 will be used and dropped -# by ndb_autodiscover2 -# - -CREATE TABLE t9 ( - a int NOT NULL PRIMARY KEY, - b int -) engine=ndb; - -insert t9 values(1, 2), (2,3), (3, 4), (4, 5); - -#Don't drop the table, instead remove the frm file ---remove_file $MYSQLTEST_VARDIR/master-data/test/t9.frm - -# Now leave test case, when ndb_autodiscover2 will run, this -# MySQL Server will have been restarted because it has a -# ndb_autodiscover2-master.opt file. - -create table t10 ( - a int not null primary key, - b blob -) engine=ndb; - -insert into t10 values (1, 'kalle'); - ---exec $NDB_TOOLS_DIR/ndb_drop_table --no-defaults -d test `$NDB_TOOLS_DIR/ndb_show_tables --no-defaults | grep BLOB | while read a b c d e f g; do echo $g; done` >> $NDB_TOOLS_OUTPUT 2>&1 || true - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_autodiscover2-master.opt b/mysql-test/t/ndb_autodiscover2-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/t/ndb_autodiscover2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/t/ndb_autodiscover2.test b/mysql-test/t/ndb_autodiscover2.test deleted file mode 100644 index ebe14696cd2..00000000000 --- a/mysql-test/t/ndb_autodiscover2.test +++ /dev/null @@ -1,21 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# -# Simple test to show use of discover when the server has been restarted -# The previous step has simply removed the frm file -# from disk, but left the table in NDB -# ---sleep 3 -select * from t9 order by a; - -# handler_discover should be 1 -show status like 'handler_discover%'; - -drop table t9; - ---error 1296 -select * from t10; -drop table t10; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_autodiscover3.test b/mysql-test/t/ndb_autodiscover3.test deleted file mode 100644 index d0b9d0983e9..00000000000 --- a/mysql-test/t/ndb_autodiscover3.test +++ /dev/null @@ -1,86 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# see bug#21563 --- source include/have_binlog_format_row.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - -# Workaround for Bug#27644 -# ndb: connecting api node/mysqld may "steal" node_id from running mysqld -# - let ndb_waiter use a fixed node id so "steal" cannot happen ---let connect_str = "nodeid=6;$NDB_CONNECTSTRING" - -# -# Transaction ongoing while cluster is restarted -# ---connection server1 -create table t1 (a int key) engine=ndbcluster; - -begin; -insert into t1 values (1); - ---exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# Wait for mysqld to reconnect and exit from readonly mode -# Should preferrably be a "while (!"select ndb_readonly")" loop -sleep 2; ---error 1297 -insert into t1 values (2); ---error 1296 -commit; - -drop table t1; - -# -# Stale cache after restart -i -# ---connection server1 -create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster; -insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1); -select * from t2 order by a limit 3; - ---exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# to ensure mysqld has connected again, and recreated system tables ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT -sleep 2; ---connection server2 ---error ER_NO_SUCH_TABLE -select * from t2; -show tables like 't2'; -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; - -# server 1 should have a stale cache, and in this case wrong frm, transaction must be retried ---connection server1 -select * from t2 order by a limit 3; -reset master; - ---exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT -# to ensure mysqld has connected again, and recreated system tables ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT -sleep 2; ---connection server1 ---error ER_NO_SUCH_TABLE -select * from t2; -show tables like 't2'; -reset master; -create table t2 (a int key) engine=ndbcluster; -insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -select * from t2 order by a limit 3; - -# server 2 should have a stale cache, but with right frm, transaction need not be retried ---connection server2 -select * from t2 order by a limit 3; -reset master; - -drop table t2; -# End of 4.1 tests diff --git a/mysql-test/t/ndb_backup_print.test b/mysql-test/t/ndb_backup_print.test deleted file mode 100644 index 1e516f03ae6..00000000000 --- a/mysql-test/t/ndb_backup_print.test +++ /dev/null @@ -1,66 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -#NO.1 test output of backup ---exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' - -create table t1 - (pk int key - ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) - ,b1 TINYINT, b2 TINYINT UNSIGNED - ,c1 SMALLINT, c2 SMALLINT UNSIGNED - ,d1 INT, d2 INT UNSIGNED - ,e1 BIGINT, e2 BIGINT UNSIGNED - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine ndb; - -insert into t1 values - (1 - ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 - ,127, 255 - ,32767, 65535 - ,2147483647, 4294967295 - ,9223372036854775807, 18446744073709551615 - ,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 - ,0x12,0x123456789abcdef0, 0x00123450 - ); - -insert into t1 values - (2 - ,0, 0, 0, 0, 0 - ,-128, 0 - ,-32768, 0 - ,-2147483648, 0 - ,-9223372036854775808, 0 - ,'','','' - ,'','','' - ,0x0,0x0,0x0 - ,0x0,0x0,0x0 - ); - -insert into t1 values - (3 - ,NULL,NULL,NULL,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ); - -#NO.2 test output of backup after some simple SQL operations ---exec $NDB_MGM --no-defaults -e "start backup" |sed -e 's/[0-9]//g' |sed -e 's/localhost//g' |sed -e 's/\.\.\.*//g' diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test deleted file mode 100644 index b9ccdf9fd0d..00000000000 --- a/mysql-test/t/ndb_basic.test +++ /dev/null @@ -1,843 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# workaround for bug#16445 -# remove to reproduce bug and run tests from ndb start -# and with ndb_autodiscover disabled. Fails on Linux 50 % of the times -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; -drop table t1; - -# -# Basic test to show that the NDB -# table handler is working -# - -# -# Show status and variables -# ---replace_column 2 # -SHOW GLOBAL STATUS LIKE 'ndb%'; ---replace_column 2 # -SHOW GLOBAL VARIABLES LIKE 'ndb%'; - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; - -SHOW INDEX FROM t1; -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); -SHOW INDEX FROM t1; -SELECT pk1 FROM t1 ORDER BY pk1; -SELECT * FROM t1 ORDER BY pk1; -SELECT t1.* FROM t1 ORDER BY pk1; - -# Update on record by primary key -UPDATE t1 SET attr1=1 WHERE pk1=9410; -SELECT * FROM t1 ORDER BY pk1; - -# Update primary key -UPDATE t1 SET pk1=2 WHERE attr1=1; -SELECT * FROM t1 ORDER BY pk1; -UPDATE t1 SET pk1=pk1 + 1; -SELECT * FROM t1 ORDER BY pk1; -UPDATE t1 SET pk1=4 WHERE pk1 = 3; -SELECT * FROM t1 ORDER BY pk1; - -# Delete the record -DELETE FROM t1; -SELECT * FROM t1; - -# Insert more records and update them all at once -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9408, 8765, NULL, '8765'), -(7,8, NULL, NULL), (8,9, NULL, NULL), (9,10, NULL, NULL), (10,11, NULL, NULL), (11,12, NULL, NULL), (12,13, NULL, NULL), (13,14, NULL, NULL); -UPDATE t1 SET attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; - -UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000; -SELECT * FROM t1 ORDER BY pk1; - -UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999; -SELECT * FROM t1 ORDER BY pk1; - -# Delete one record by specifying pk -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1 ORDER BY pk1; - -# Delete all from table -DELETE FROM t1; -SELECT * FROM t1; - -# Insert three records with attr1=4 and two with attr1=5 -# Delete all with attr1=4 -INSERT INTO t1 values (1, 4, NULL, NULL), (2, 4, NULL, NULL), (3, 5, NULL, NULL), (4, 4, NULL, NULL), (5, 5, NULL, NULL); -DELETE FROM t1 WHERE attr1=4; -SELECT * FROM t1 order by pk1; -DELETE FROM t1; - -# Insert two records and delete one -INSERT INTO t1 VALUES (9410,9412, NULL, NULL), (9411, 9413, NULL, NULL); -DELETE FROM t1 WHERE pk1 = 9410; -SELECT * FROM t1; -DROP TABLE t1; - -# -# Create table without primary key -# a hidden primary key column is created by handler -# -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; -INSERT INTO t1 values(3456, 7890); -SELECT * FROM t1; -UPDATE t1 SET id=2 WHERE id2=12; -SELECT * FROM t1; -UPDATE t1 SET id=1234 WHERE id2=7890; -SELECT * FROM t1; -DELETE FROM t1; - -INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890), (3454, 7890); -SELECT * FROM t1 ORDER BY id; -DELETE FROM t1 WHERE id = 3456; -SELECT * FROM t1 ORDER BY id; - -DROP TABLE t1; - -# test create with the keyword "engine=NDBCLUSTER" -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=NDBCLUSTER; - -INSERT INTO t1 values(1, 9999); - -DROP TABLE t1; - -# test create with the keyword "engine=NDB" -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=NDB; - -INSERT INTO t1 values(1, 9999); - -DROP TABLE t1; - - -# -# A more extensive test with a lot more records -# - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -CREATE TABLE t3 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned, - PRIMARY KEY(a) -) engine=ndbcluster; - -CREATE TABLE t4 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - - -# -# insert more records into tables -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -enable_query_log; - - -# -# delete every other record in the tables -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval delete from t2 where a=$1; - eval delete from t3 where a=$1; - eval delete from t4 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - - -select * from t2 where a = 7 order by b; -select * from t2 where a = 7 order by a; -select * from t2 where a = 7 order by 2; -select * from t2 where a = 7 order by c; - -select * from t2 where a = 7 and b = 16 order by b; -select * from t2 where a = 7 and b = 16 order by a; -select * from t2 where a = 7 and b = 17 order by a; -select * from t2 where a = 7 and b != 16 order by b; - -select * from t2 where a = 7 and b = 16 and c = 5 order by b; -select * from t2 where a = 7 and b = 16 and c = 5 order by a; -select * from t2 where a = 7 and b = 16 and c = 6 order by a; -select * from t2 where a = 7 and b != 16 and c = 5 order by b; - -select * from t3 where a = 7 order by b; -select * from t3 where a = 7 order by a; -select * from t3 where a = 7 order by 2; -select * from t3 where a = 7 order by c; - -select * from t3 where a = 7 and b = 16 order by b; -select * from t3 where a = 7 and b = 16 order by a; -select * from t3 where a = 7 and b = 17 order by a; -select * from t3 where a = 7 and b != 16 order by b; - -select * from t4 where a = 7 order by b; -select * from t4 where a = 7 order by a; -select * from t4 where a = 7 order by 2; -select * from t4 where a = 7 order by c; - -select * from t4 where a = 7 and b = 16 order by b; -select * from t4 where a = 7 and b = 16 order by a; -select * from t4 where a = 7 and b = 17 order by a; -select * from t4 where a = 7 and b != 16 order by b; - -# -# update records -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - -delete from t2 where a > 5; -select x1.a, x1.b from t2 x1, t2 x2 where x1.b = x2.b order by x1.a; -select a, b FROM t2 outer_table where -a = (select a from t2 where b = outer_table.b ) order by a; - - -delete from t2; -delete from t3; -delete from t4; - -drop table t2; -drop table t3; -drop table t4; - -# -# Test delete and update from table with 3 keys -# - -CREATE TABLE t5 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - -insert into t5 values(10, 19, 5, 26010); - -delete from t5 where a=10 and b=19 and c=5; - -select * from t5; - -insert into t5 values(10, 19, 5, 26010); - -update t5 set d=21997 where a=10 and b=19 and c=5; - -select * from t5; - -delete from t5; - -drop table t5; - -# -# Test using table with a char(255) column first in table -# - -CREATE TABLE t6 ( - adress char(255), - a int NOT NULL PRIMARY KEY, - b int -) engine = NDB; - -insert into t6 values - ("Nice road 3456", 1, 23), - ("Street Road 78", 3, 92), - ("Road street 89C", 5, 71), - (NULL, 7, NULL); -select * from t6 order by a; -select a, b from t6 order by a; - -update t6 set adress="End of road 09" where a=3; -update t6 set b=181, adress="Street 76" where a=7; -select * from t6 order by a; -select * from t6 where a=1; -delete from t6 where a=1; -select * from t6 order by a; -delete from t6 where b=71; -select * from t6 order by a; - -drop table t6; - -# -# Test using table with a char(255) column first in table and a -# primary key consisting of two columns -# - -CREATE TABLE t7 ( - adress char(255), - a int NOT NULL, - b int, - c int NOT NULL, - PRIMARY KEY(a, c) -) engine = NDB; - -insert into t7 values - ("Highway 3456", 1, 23, 2), - ("Street Road 78", 3, 92, 3), - ("Main street 89C", 5, 71, 4), - (NULL, 8, NULL, 12); -select * from t7 order by a; -select a, b from t7 order by a; - -update t7 set adress="End of road 09" where a=3; -update t7 set adress="Gatuvägen 90C" where a=5 and c=4; -update t7 set adress="No adress" where adress is NULL; -select * from t7 order by a; -select * from t7 where a=1 and c=2; -delete from t7 where a=1; -delete from t7 where a=3 and c=3; -delete from t7 where a=5 and c=4; -select * from t7; -delete from t7 where b=23; -select * from t7; - -drop table t7; - -# -# Test multiple databases in one statement -# - -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413'); - -create database mysqltest; -use mysqltest; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -insert into t2 select pk1,attr1,attr2 from test.t1; -select * from t2 order by a; -select b from test.t1, t2 where c = test.t1.attr2; -select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a; - -drop table test.t1, t2; -drop database mysqltest; - -# -# BUG#6031 - DROP DATABASE doesn't drop database on first try -# - ---disable_warnings -drop database if exists ndbtest1; ---enable_warnings - -create database ndbtest1; -use ndbtest1; -create table t1(id int) engine=ndbcluster; -drop database ndbtest1; ---error 1008 -drop database ndbtest1; - -# -# test support of char(0) -# - -use test; -create table t1 (a int primary key, b char(0)); -insert into t1 values (1,""); -insert into t1 values (2,NULL); -select * from t1 order by a; -select * from t1 order by b; -select * from t1 where b IS NULL; -select * from t1 where b IS NOT NULL; -drop table t1; - -# -# test the limit of no of attributes in one table -# -# also tests bug#17179, more than 31 attributes in -# a partitioned table -# -create table t1 ( -c1 int, -c2 int, -c3 int, -c4 int, -c5 int, -c6 int, -c7 int, -c8 int, -c9 int, -c10 int, -c11 int, -c12 int, -c13 int, -c14 int, -c15 int, -c16 int, -c17 int, -c18 int, -c19 int, -c20 int, -c21 int, -c22 int, -c23 int, -c24 int, -c25 int, -c26 int, -c27 int, -c28 int, -c29 int, -c30 int, -c31 int, -c32 int, -c33 int, -c34 int, -c35 int, -c36 int, -c37 int, -c38 int, -c39 int, -c40 int, -c41 int, -c42 int, -c43 int, -c44 int, -c45 int, -c46 int, -c47 int, -c48 int, -c49 int, -c50 int, -c51 int, -c52 int, -c53 int, -c54 int, -c55 int, -c56 int, -c57 int, -c58 int, -c59 int, -c60 int, -c61 int, -c62 int, -c63 int, -c64 int, -c65 int, -c66 int, -c67 int, -c68 int, -c69 int, -c70 int, -c71 int, -c72 int, -c73 int, -c74 int, -c75 int, -c76 int, -c77 int, -c78 int, -c79 int, -c80 int, -c81 int, -c82 int, -c83 int, -c84 int, -c85 int, -c86 int, -c87 int, -c88 int, -c89 int, -c90 int, -c91 int, -c92 int, -c93 int, -c94 int, -c95 int, -c96 int, -c97 int, -c98 int, -c99 int, -c100 int, -c101 int, -c102 int, -c103 int, -c104 int, -c105 int, -c106 int, -c107 int, -c108 int, -c109 int, -c110 int, -c111 int, -c112 int, -c113 int, -c114 int, -c115 int, -c116 int, -c117 int, -c118 int, -c119 int, -c120 int, -c121 int, -c122 int, -c123 int, -c124 int, -c125 int, -c126 int, -c127 int, -c128 int, -primary key using hash(c1)) engine=ndb partition by key(c1); -drop table t1; - -# -# test max size of attribute name and truncation -# - -create table t1 ( -a1234567890123456789012345678901234567890 int primary key, -a12345678901234567890123456789a1234567890 int, -index(a12345678901234567890123456789a1234567890) -) engine=ndb; -show tables; -insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); ---replace_column 9 # -explain select * from t1 where a12345678901234567890123456789a1234567890=2; -select * from t1 where a12345678901234567890123456789a1234567890=2; -drop table t1; - -# -# test fragment creation -# -# first a table with _many_ fragments per node group -# then a table with just one fragment per node group -# -create table t1 - (a bigint, b bigint, c bigint, d bigint, - primary key (a,b,c,d)) - engine=ndb - max_rows=800000000; -insert into t1 values - (1,2,3,4),(2,3,4,5),(3,4,5,6), - (3,2,3,4),(1,3,4,5),(2,4,5,6), - (1,2,3,5),(2,3,4,8),(3,4,5,9), - (3,2,3,5),(1,3,4,8),(2,4,5,9), - (1,2,3,6),(2,3,4,6),(3,4,5,7), - (3,2,3,6),(1,3,4,6),(2,4,5,7), - (1,2,3,7),(2,3,4,7),(3,4,5,8), - (3,2,3,7),(1,3,4,7),(2,4,5,8), - (1,3,3,4),(2,4,4,5),(3,5,5,6), - (3,3,3,4),(1,4,4,5),(2,5,5,6), - (1,3,3,5),(2,4,4,8),(3,5,5,9), - (3,3,3,5),(1,4,4,8),(2,5,5,9), - (1,3,3,6),(2,4,4,6),(3,5,5,7), - (3,3,3,6),(1,4,4,6),(2,5,5,7), - (1,3,3,7),(2,4,4,7),(3,5,5,8), - (3,3,3,7),(1,4,4,7),(2,5,5,8); -select count(*) from t1; -drop table t1; - -create table t1 - (a bigint, b bigint, c bigint, d bigint, - primary key (a)) - engine=ndb - max_rows=1; -drop table t1; - -# -# Test auto_increment -# - -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); - -create table t1 - (counter int(64) NOT NULL auto_increment, - datavalue char(40) default 'XXXX', - primary key (counter) - ) ENGINE=ndbcluster; - -connection con1; -insert into t1 (datavalue) values ('newval'); -insert into t1 (datavalue) values ('newval'); -select * from t1 order by counter; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; -connection con2; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -insert into t1 (datavalue) select datavalue from t1 where counter < 100; -select * from t1 order by counter; - -drop table t1; - -# -# bug#27437 -connection con1; -create table t1 (a int primary key auto_increment) engine = ndb; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -connection con2; -insert into t1(a) values (20),(28); -connection con1; -insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); -connection con2; -insert into t1() values (21), (22); -connection con1; - -drop table t1; - -# -# BUG#14514 Creating table with packed key fails silently -# - -CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; -select * from t1; -drop table t1; - -# -# Bug #17249 delete statement with join where clause fails -# when table do not have pk - # - -create table t1 (a int) engine=ndb; -create table t2 (a int) engine=ndb; -insert into t1 values (1); -insert into t2 values (1); -delete t1.* from t1, t2 where t1.a = t2.a; -select * from t1; -select * from t2; -drop table t1; -drop table t2; - -# -# Bug #17257 update fails for inner joins if tables -# do not have Primary Key -# - -CREATE TABLE t1 ( - i INT, - j INT, - x INT, - y INT, - z INT -) engine=ndb; - -CREATE TABLE t2 ( - i INT, - k INT, - x INT, - y INT, - z INT -) engine=ndb; - -CREATE TABLE t3 ( - j INT, - k INT, - x INT, - y INT, - z INT -) engine=ndb; - -INSERT INTO t1 VALUES ( 1, 2,13,14,15); -INSERT INTO t2 VALUES ( 1, 3,23,24,25); -INSERT INTO t3 VALUES ( 2, 3, 1,34,35), ( 2, 3, 1,34,36); - -UPDATE t1 AS a -INNER JOIN t2 AS b - ON a.i = b.i -INNER JOIN t3 AS c - ON a.j = c.j AND b.k = c.k -SET a.x = b.x, - a.y = b.y, - a.z = ( - SELECT sum(z) - FROM t3 - WHERE y = 34 - ) -WHERE b.x = 23; -select * from t1; -drop table t1; -drop table t2; -drop table t3; - -# End of 4.1 tests - -# -# Test long table name -# -create table atablewithareallylongandirritatingname (a int); -insert into atablewithareallylongandirritatingname values (2); -select * from atablewithareallylongandirritatingname; -drop table atablewithareallylongandirritatingname; - -# -# Bug#15682 -# -create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; -insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from t1 order by f1; -select * from t1 order by f2; -select * from t1 order by f3; -drop table t1; -# Bug#16561 Unknown ERROR msg "ERROR 1186 (HY000): Binlog closed" by perror -# - -# As long there is no error code 1186 defined by NDB -# we should get a message "Illegal ndb error code: 1186" ---error 1 ---exec $MY_PERROR --ndb 1186 2>&1 - -# -# Bug #25746 - VARCHAR UTF8 PK issue -# - prior to bugfix 4209, illegal length parameter would be -# returned in SELECT * - -CREATE TABLE t1 ( -a VARBINARY(40) NOT NULL, -b VARCHAR (256) CHARACTER SET UTF8 NOT NULL, -c VARCHAR(256) CHARACTER SET UTF8 NOT NULL, -PRIMARY KEY (b,c)) ENGINE=ndbcluster; -INSERT INTO t1 VALUES -("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc"); -SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; - -# delete -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); -insert into t2 values (1,10), (2,20), (3,30); -select * from t1 order by a; -delete from t1 where a > 0 order by a desc limit 1; -select * from t1 order by a; -delete from t1,t2 using t1,t2 where t1.a = t2.a; -select * from t2 order by a; -drop table t1,t2; - -# insert ignore -create table t1 (a int not null primary key, b int not null) engine=ndb; -insert into t1 values (1,10), (2,20), (3,30); ---error ER_DUP_ENTRY -insert into t1 set a=1, b=100; -insert ignore into t1 set a=1, b=100; -select * from t1 order by a; -insert into t1 set a=1, b=1000 on duplicate key update b=b+1; -select * from t1 order by a; -drop table t1; - -# update -create table t1 (a int not null primary key, b int not null) engine=ndb; -create table t2 (c int not null primary key, d int not null) engine=ndb; -insert into t1 values (1,10), (2,10), (3,30), (4, 30); -insert into t2 values (1,10), (2,10), (3,30), (4, 30); ---error ER_DUP_ENTRY -update t1 set a = 1 where a = 3; -select * from t1 order by a; -update t1 set b = 1 where a > 1 order by a desc limit 1; -select * from t1 order by a; ---error ER_DUP_ENTRY -update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; -select * from t1 order by a; -drop table t1,t2; - -# End of 5.0 tests ---echo End of 5.0 tests - - -# -# Bug #18483 Cannot create table with FK constraint -# ndb does not support foreign key constraint, it is silently ignored -# in line with other storage engines -# -CREATE TABLE t1 (a VARCHAR(255) NOT NULL, - CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb; -CREATE TABLE t2(a VARCHAR(255) NOT NULL, - b VARCHAR(255) NOT NULL, - c VARCHAR(255) NOT NULL, - CONSTRAINT pk_b_c_id PRIMARY KEY (b,c), - CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb; -drop table t1, t2; - -# bug#24301 -create table t1 (a int not null primary key, b int) engine=ndb; -insert into t1 values(1,1),(2,2),(3,3); -create table t2 like t1; -insert into t2 select * from t1; -select * from t1 order by a; -select * from t2 order by a; -drop table t1, t2; - -# create table if not exists ---disable_warnings -create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; -create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb; ---enable_warnings - -# create like -create table t2 like t1; - -# multi rename -rename table t1 to t10, t2 to t20; -drop table t10,t20; - ---echo End of 5.1 tests diff --git a/mysql-test/t/ndb_binlog_basic.test b/mysql-test/t/ndb_binlog_basic.test deleted file mode 100644 index e4642dc3230..00000000000 --- a/mysql-test/t/ndb_binlog_basic.test +++ /dev/null @@ -1,72 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -drop table if exists t1, t2; -drop database if exists mysqltest; -create database mysqltest; -use mysqltest; -drop database mysqltest; -use test; ---enable_warnings - -# -# basic insert, update, delete test, alter, rename, drop -# check that ndb_binlog_index gets the right info -# - -create table t1 (a int primary key) engine=ndb; -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -save_master_pos; ---replace_column 1 # -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; - -delete from t1; -alter table t1 add (b int); -insert into t1 values (3,3),(4,4); -alter table t1 rename t2; - -# get all in one epoch -begin; -insert into t2 values (1,1),(2,2); -update t2 set b=1 where a=3; -delete from t2 where a=4; -commit; -drop table t2; - -# check that above is ok -# (save_master_pos waits for last gcp to complete, ensuring that we have -# the expected data in the binlog) -save_master_pos; -select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5; -select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5; -select inserts,updates,deletes from - mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0; - -# -# check that purge clears the ndb_binlog_index -# -flush logs; ---sleep 1 -purge master logs before now(); -select count(*) from mysql.ndb_binlog_index; - -# -# several tables in different databases -# check that same table name in different databases don't mix up -# -create table t1 (a int primary key, b int) engine=ndb; -create database mysqltest; -use mysqltest; -create table t1 (c int, d int primary key) engine=ndb; -use test; - -insert into mysqltest.t1 values (2,1),(2,2); -save_master_pos; ---replace_column 1 # -select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index; - -drop table t1; -drop database mysqltest; -select inserts,updates,deletes from - mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0; diff --git a/mysql-test/t/ndb_binlog_basic2.test b/mysql-test/t/ndb_binlog_basic2.test deleted file mode 100644 index bcc6b503320..00000000000 --- a/mysql-test/t/ndb_binlog_basic2.test +++ /dev/null @@ -1,15 +0,0 @@ --- source include/have_ndb.inc --- source include/have_log_bin.inc - ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set session binlog_format=row; ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set session binlog_format=statement; ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set global binlog_format=row; ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set global binlog_format=statement; ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set session binlog_format=default; ---error ER_NDB_CANT_SWITCH_BINLOG_FORMAT -set global binlog_format=default; diff --git a/mysql-test/t/ndb_binlog_ddl_multi.test b/mysql-test/t/ndb_binlog_ddl_multi.test deleted file mode 100644 index 487dfbf16e5..00000000000 --- a/mysql-test/t/ndb_binlog_ddl_multi.test +++ /dev/null @@ -1,191 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -connection server2; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; -connection server1; -drop database if exists mysqltest; -drop table if exists t1,t2,t3; ---connection server1 -reset master; ---connection server2 -reset master; ---enable_warnings - -# -# basic test to see if ddl distribution works across -# multiple binlogs -# - -# create database ---connection server1 -create database mysqltest; - -# create table ---connection server1 -use mysqltest; -create table t1 (a int primary key) engine=ndb; - ---connection server2 -create table t2 (a int primary key) engine=ndb; ---source include/show_binlog_events2.inc - ---connection server1 ---source include/show_binlog_events2.inc - -# alter table ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server2 -alter table t2 add column (b int); - ---connection server1 ---source include/show_binlog_events2.inc - -# alter database ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server2 -ALTER DATABASE mysqltest CHARACTER SET latin1; - - -# having drop here instead of below sometimes triggers bug#18976 -## drop table and drop should come after data events ---connection server2 -drop table mysqltest.t1; - ---connection server1 ---source include/show_binlog_events2.inc -# to track down bug#18976 ---real_sleep 10 ---source include/show_binlog_events2.inc - -#--connection server2 -#drop table mysqltest.t1; - -# drop database and drop should come after data events ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server1 -use test; -insert into t2 values (1,2); -drop database mysqltest; -create table t1 (a int primary key) engine=ndb; - ---connection server2 ---source include/show_binlog_events2.inc - ---connection server2 -drop table t2; - -# logfile groups and table spaces ---connection server1 -reset master; ---connection server2 -reset master; - ---connection server1 -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 -ENGINE = NDB; - -DROP LOGFILE GROUP lg1 -ENGINE =NDB; - -# having drop here instead of below sometimes triggers bug#18976 -#drop table t1; - ---connection server2 ---source include/show_binlog_events2.inc -# to track down bug#18976 ---real_sleep 10 ---source include/show_binlog_events2.inc - -drop table t1; - -# -# Bug #17827 cluster: rename of several tables in one statement, -# gets multiply logged -# ---connection server1 -reset master; -show tables; ---connection server2 -reset master; -show tables; - ---connection server1 -create table t1 (a int key) engine=ndb; -create table t2 (a int key) engine=ndb; -create table t3 (a int key) engine=ndb; -rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; ---connection server2 ---source include/show_binlog_events2.inc - -drop table t1; -drop table t2; -drop table t3; - -# -# Bug #17838 binlog not setup on seconday master after rename -# -# ---connection server1 -reset master; -show tables; ---connection server2 -reset master; -show tables; - ---connection server1 -create table t1 (a int key) engine=ndb; -insert into t1 values(1); -rename table t1 to t2; -insert into t2 values(2); - -# now we should see data in table t1 _and_ t2 -# prior to bug fix, data was missing for t2 ---connection server2 -drop table t2; ---source include/show_binlog_events2.inc diff --git a/mysql-test/t/ndb_binlog_discover.test b/mysql-test/t/ndb_binlog_discover.test deleted file mode 100644 index 999079ad29c..00000000000 --- a/mysql-test/t/ndb_binlog_discover.test +++ /dev/null @@ -1,36 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Bug #14516 Restart of cluster can cause NDB API replication failure -# -create table t1 (a int key) engine=ndb; -reset master; ---exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --not-started > /dev/null ---exec $NDB_MGM --no-defaults -e "all start" > /dev/null ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults > /dev/null - ---disable_query_log -let $mysql_errno= 1; -while ($mysql_errno) -{ - # Table t1 is readonly until the mysqld has reconnected properly - --error 0,1036,1296 - insert into t1 values(1); - if ($mysql_errno) - { - --sleep 0.1 - } -} ---enable_query_log - ---source include/show_binlog_events2.inc -PURGE MASTER LOGS TO 'master-bin.000002'; - ---source include/show_binlog_events2.inc -drop table t1; diff --git a/mysql-test/t/ndb_binlog_ignore_db-master.opt b/mysql-test/t/ndb_binlog_ignore_db-master.opt deleted file mode 100644 index e3947c0eeed..00000000000 --- a/mysql-test/t/ndb_binlog_ignore_db-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-ignore-db=mysqltest diff --git a/mysql-test/t/ndb_binlog_ignore_db.test b/mysql-test/t/ndb_binlog_ignore_db.test deleted file mode 100644 index 8f80e53f2e4..00000000000 --- a/mysql-test/t/ndb_binlog_ignore_db.test +++ /dev/null @@ -1,16 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc -reset master; - ---disable_warnings -drop table if exists t1; -drop database if exists mysqltest; ---enable_warnings - -create database mysqltest; -use mysqltest; -create table t1 (a int primary key, b int) engine=ndb; -insert into t1 values (1, 1); --- source include/show_binlog_events2.inc - -drop database mysqltest; diff --git a/mysql-test/t/ndb_binlog_log_bin.test b/mysql-test/t/ndb_binlog_log_bin.test deleted file mode 100644 index b2dbaa797b6..00000000000 --- a/mysql-test/t/ndb_binlog_log_bin.test +++ /dev/null @@ -1,50 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -connection server2; -drop table if exists t1,t2,t3; -reset master; -connection server1; -drop table if exists t1,t2,t3; -reset master; ---enable_warnings - -# basic SQL_LOG_BIN functionality -# see updates from one thread but not the other -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); -# do some stuff with SQL_LOG_BIN=0 -connection con2; -set SQL_LOG_BIN=0; -create database mysqltest; -use mysqltest; -create table t1 (a int key, b int) engine=ndb; -create table t2 (a int key, b int) engine=ndb; -insert into t1 values (1,1); -alter table t1 add c int; -# we should not see it in the local server --- source include/show_binlog_events2.inc -reset master; -# we should not see it in another server -connection server2; -use mysqltest; -insert into t2 values (1,1); --- source include/show_binlog_events2.inc -reset master; -# but if you do stuff in "default" client setting -connection con1; -use mysqltest; -drop table t1; -drop table t2; -create table t1 (d int key, e int) engine=ndb; -create table t2 (d int key, e int) engine=ndb; -insert into t1 values (1,1); --- source include/show_binlog_events2.inc -# and in another server -connection server2; -use mysqltest; -insert into t2 values (1,1); --- source include/show_binlog_events2.inc -drop database mysqltest; diff --git a/mysql-test/t/ndb_binlog_multi.test b/mysql-test/t/ndb_binlog_multi.test deleted file mode 100644 index c227c7fec93..00000000000 --- a/mysql-test/t/ndb_binlog_multi.test +++ /dev/null @@ -1,83 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/have_binlog_format_row.inc - ---disable_warnings -connection server2; -drop table if exists t1,t2,t3; -connection server1; -drop table if exists t1,t2,t3; ---enable_warnings - -# Dummy table create/drop to avoid a race where table is created -# before event subscription is set up, causing test failure (BUG#20677). -connection server2; -CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; -connection server1; -DROP TABLE t3; - -# reset for test -connection server1; -reset master; -connection server2; -reset master; - -# -# basic test to see if one server sees the table from the other -# and sets up the replication correctly -# - -# create table on the other server -connection server2; -CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; - -# insert something on server2 -INSERT INTO t2 VALUES (1,1),(2,2); -# verify that we get the data in the binlog ---source include/show_binlog_events2.inc -select * from t2 order by a; ---replace_column 1 -SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -let $the_epoch= `SELECT @the_epoch`; - -# see if we got something on server1 -connection server1; -SELECT * FROM t2 ORDER BY a; -# doing drop table will ensure that all the events have been received -DROP TABLE t2; -# verify thar we have table and data in binlog ---source include/show_binlog_events2.inc ---replace_result $the_epoch -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch=$the_epoch; - -# reset for next test -connection server1; -reset master; -connection server2; -reset master; - -# single schema ops will not show -connection server2; -CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; -INSERT INTO t1 VALUES (1),(2); ---source include/show_binlog_events2.inc ---replace_column 1 -SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; -let $the_epoch2= `SELECT @the_epoch2`; - ---replace_result $the_epoch $the_epoch2 -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; - -# now see that we have the events on the other server -connection server2; -# doing drop table will ensure that all the events have been received -drop table t1; -# verify thar we have table and data in binlog ---source include/show_binlog_events2.inc ---replace_result $the_epoch $the_epoch2 -eval SELECT inserts,updates,deletes,schemaops FROM - mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; diff --git a/mysql-test/t/ndb_bitfield.test b/mysql-test/t/ndb_bitfield.test deleted file mode 100644 index de0ae23bfe6..00000000000 --- a/mysql-test/t/ndb_bitfield.test +++ /dev/null @@ -1,124 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 ( - pk1 int not null primary key, - b bit(64) -) engine=ndbcluster; - -show create table t1; -insert into t1 values -(0,b'1111111111111111111111111111111111111111111111111111111111111111'), -(1,b'1000000000000000000000000000000000000000000000000000000000000000'), -(2,b'0000000000000000000000000000000000000000000000000000000000000001'), -(3,b'1010101010101010101010101010101010101010101010101010101010101010'), -(4,b'0101010101010101010101010101010101010101010101010101010101010101'); -select hex(b) from t1 order by pk1; -drop table t1; - -create table t1 ( - pk1 int not null primary key, - b bit(9) -) engine=ndbcluster; -insert into t1 values -(0,b'000000000'), -(1,b'000000001'), -(2,b'000000010'), -(3,b'000000011'), -(4,b'000000100'); -select hex(b) from t1 order by pk1; -update t1 set b = b + b'101010101'; -select hex(b) from t1 order by pk1; -drop table t1; - -create table t1 (a bit(7), b bit(9)) engine = ndbcluster; -insert into t1 values -(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), -(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), -(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), -(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), -(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), -(44, 307), (68, 454), (57, 135); -select a+0 from t1 order by a; -select b+0 from t1 order by b; -drop table t1; - -create table t1 ( - dummyKey INTEGER NOT NULL, - a001 TINYINT, - a010 TINYINT, - a012 TINYINT, - a015 TINYINT, - a016 TINYINT, - a017 TINYINT, - a019 TINYINT, - a029 TINYINT, - a030 TINYINT, - a031 TINYINT, - a032 TINYINT, - a042 TINYINT, - a043 TINYINT, - a044 TINYINT, - a3001 TINYINT, - a3002 TINYINT, - a3003 TINYINT, - a3004 TINYINT, - a3005 TINYINT, - a3021 TINYINT, - a3022 TINYINT, - a BIT(6), - b BIT(6), - c BIT(6), - d TINYINT, - e TINYINT, - f TINYINT, - g TINYINT, - h TINYINT, - i TINYINT, - j TINYINT, - k TINYINT, - l TINYINT, - m TINYINT, - n TINYINT, - o TINYINT, - a034 TINYINT, -PRIMARY KEY USING HASH (dummyKey) ) engine=ndb; -INSERT INTO `t1` VALUES -(1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1), -(2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1), -(3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1), -(4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1), -(8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1); ---exec $MYSQL_DUMP --hex-blob --compact --order-by-primary --skip-extended-insert --no-create-info test t1 -drop table t1; - ---error 1005 -create table t1 ( - pk1 bit(9) not null primary key, - b int -) engine=ndbcluster; -show warnings; - ---error 1005 -create table t1 ( - pk1 int not null primary key, - b bit(9), - key(b) -) engine=ndbcluster; -show warnings; - -# bug#16125 -create table t1 ( - pk1 int primary key, - b bit(32) not null -) engine=ndbcluster; - -insert into t1 values (1,1); -drop table t1; diff --git a/mysql-test/t/ndb_blob.test b/mysql-test/t/ndb_blob.test deleted file mode 100644 index b9a8c7e20ee..00000000000 --- a/mysql-test/t/ndb_blob.test +++ /dev/null @@ -1,499 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; -drop database if exists test2; ---enable_warnings - -# -# Minimal NDB blobs test. -# -# On NDB API level there is an extensive test program "testBlobs". -# A prerequisite for this handler test is that "testBlobs" succeeds. -# - -# -- general test starts -- - -# make test harder with autocommit off -set autocommit=0; - -create table t1 ( - a int not null primary key, - b text not null, - c int not null, - d longblob, - key (c) -) engine=ndbcluster; - -# -- values -- - -# x0 size 256 (current inline size) -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 (blob part aligned) -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - -# -- pk ops -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where a = 1; - -# pk read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; - -# pk update -update t1 set b=@b2,d=@d2 where a=1; -update t1 set b=@b1,d=@d1 where a=2; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; - -# pk update -update t1 set b=concat(b,b),d=concat(d,d) where a=1; -update t1 set b=concat(b,b),d=concat(d,d) where a=2; -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; - -# pk update to null -update t1 set d=null where a=1; -commit; -select a from t1 where d is null; - -# bug#24028 - does not occur on MySQL level -# bug#17986 - not seen by us anymore but could show as warning here -delete from t1 where a=45567; -commit; - -# pk delete -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; - -# -- replace ( bug-6018 ) -- - -# insert -replace t1 set a=1,b=@b1,c=111,d=@d1; -replace t1 set a=2,b=@b2,c=222,d=@d2; -commit; ---replace_column 9 # -explain select * from t1 where a = 1; - -# pk read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=2; - -# update -replace t1 set a=1,b=@b2,c=111,d=@d2; -replace t1 set a=2,b=@b1,c=222,d=@d1; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a=2; - -# update -replace t1 set a=1,b=concat(@b2,@b2),c=111,d=concat(@d2,@d2); -replace t1 set a=2,b=concat(@b1,@b1),c=222,d=concat(@d1,@d1); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where a=1; -select a,length(b),substr(b,1+4*900,2),length(d),substr(d,1+6*900,3) -from t1 where a=2; - -# update to null -replace t1 set a=1,b='xyz',c=111,d=null; -commit; -select a,b from t1 where d is null; - -# pk delete -delete from t1 where a=1; -delete from t1 where a=2; -commit; -select count(*) from t1; - -# -- hash index ops -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where c = 111; - -# hash key read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=111; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=222; - -# hash key update -update t1 set b=@b2,d=@d2 where c=111; -update t1 set b=@b1,d=@d1 where c=222; -commit; -select a,length(b),substr(b,1+2*9000,2),length(d),substr(d,1+3*9000,3) -from t1 where c=111; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c=222; - -# hash key update to null -update t1 set d=null where c=111; -commit; -select a from t1 where d is null; - -# hash key delete -delete from t1 where c=111; -delete from t1 where c=222; -commit; -select count(*) from t1; - -# -- table scan ops, short values -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; ---replace_column 9 # -explain select * from t1; - -# table scan read -select * from t1 order by a; - -# table scan update -update t1 set b=concat(a,'x',b),d=concat(a,'x',d); -commit; -select * from t1 order by a; - -# table scan delete -delete from t1; -commit; -select count(*) from t1; - -# -- table scan ops, long values -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1; - -# table scan read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; - -# table scan update -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 order by a; - -# table scan delete -delete from t1; -commit; -select count(*) from t1; - -# -- range scan ops, short values -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; ---replace_column 9 # -explain select * from t1 where c >= 100 order by a; - -# range scan read -select * from t1 where c >= 100 order by a; - -# range scan update -update t1 set b=concat(a,'x',b),d=concat(a,'x',d) -where c >= 100; -commit; -select * from t1 where c >= 100 order by a; - -# range scan delete -delete from t1 where c >= 100; -commit; -select count(*) from t1; - -# -- range scan ops, long values -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -commit; ---replace_column 9 # -explain select * from t1 where c >= 100 order by a; - -# range scan read -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where c >= 100 order by a; - -# range scan update -update t1 set b=concat(b,b),d=concat(d,d); -commit; -select a,length(b),substr(b,1+4*9000,2),length(d),substr(d,1+6*9000,3) -from t1 where c >= 100 order by a; - -# range scan delete -delete from t1 where c >= 100; -commit; -select count(*) from t1; - -# -- rollback -- - -insert into t1 values(1,@b1,111,@d1); -insert into t1 values(2,@b2,222,@d2); -# 626 -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 0; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 1; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 where a = 2; -select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) -from t1 order by a; -rollback; -select count(*) from t1; - -# -- alter table and multi db -- - -insert into t1 values(1,'b1',111,'dd1'); -insert into t1 values(2,'b2',222,'dd2'); -insert into t1 values(3,'b3',333,'dd3'); -insert into t1 values(4,'b4',444,'dd4'); -insert into t1 values(5,'b5',555,'dd5'); -insert into t1 values(6,'b6',666,'dd6'); -insert into t1 values(7,'b7',777,'dd7'); -insert into t1 values(8,'b8',888,'dd8'); -insert into t1 values(9,'b9',999,'dd9'); -commit; - -select * from t1 order by a; -alter table t1 add x int; -select * from t1 order by a; -alter table t1 drop x; -select * from t1 order by a; - -create database test2; -use test2; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -insert into t2 values (1,1,1),(2,2,2); -select * from test.t1,t2 where test.t1.a = t2.a order by test.t1.a; - -drop table t2; -use test; - -select * from t1 order by a; -alter table t1 add x int; -select * from t1 order by a; -alter table t1 drop x; -select * from t1 order by a; - -# -- end general test -- - -drop table t1; -drop database test2; - -# -- bug-5252 tinytext crashes + no-commit result + replace -- - -set autocommit=0; -create table t1 ( - a int not null primary key, - b tinytext -) engine=ndbcluster; - -insert into t1 values(1, 'x'); -update t1 set b = 'y'; -select * from t1; -delete from t1; -select * from t1; -commit; -replace t1 set a=2, b='y'; -select * from t1; -delete from t1; -select * from t1; -drop table t1; - -# -- bug-5013 insert empty string to text -- - -set autocommit=0; -create table t1 ( - a int not null primary key, - b text not null -) engine=ndbcluster; - -insert into t1 values(1, ''); -select * from t1; -commit; -drop table t1; - -# -- bug #5349 -- -set autocommit=1; -use test; -CREATE TABLE t1 ( - a int, - b text, - PRIMARY KEY (a) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES -(1,'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); -INSERT INTO t1 VALUES -(2,'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'); - -select * from t1 order by a; -alter table t1 engine=ndb; -select * from t1 order by a; - -# -- bug #5872 -- -set autocommit=1; -alter table t1 engine=myisam; -select * from t1 order by a; -drop table t1; - -# -- bug #7340 -- -create table t1 ( - id int(11) unsigned primary key NOT NULL auto_increment, - msg text NOT NULL -) engine=ndbcluster default charset=utf8; -insert into t1 (msg) values( -'Tries to validate (8 byte length + inline bytes) as UTF8 :( -Fast fix: removed validation for Text. It is not yet indexable -so bad data will not crash kernel.'); -select * from t1; -drop table t1; - -# -- bug #19201 -create table t1 ( - a int primary key not null auto_increment, - b text -) engine=ndbcluster; ---disable_query_log -set autocommit=1; -# more rows than batch size (64) -# for this bug no blob parts would be necessary -let $1 = 500; -while ($1) -{ - insert into t1 (b) values (repeat('x',4000)); - dec $1; -} ---enable_query_log -select count(*) from t1; -truncate t1; -select count(*) from t1; -drop table t1; - -# -- bug#19956 - var* key, complex key - -create table t1 ( - a varchar(40) not null, - b mediumint not null, - t text, - c varchar(2) not null, - d bigint not null, - primary key (a,b,c), - key (c,a), - unique key (d) -) engine=ndb; - ---disable_query_log -set @s1 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s2 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s3 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; -set @v1 = repeat(@s1,123); -set @v2 = repeat(@s2,234); -set @v3 = repeat(@s3,345); -set @v4 = NULL; ---enable_query_log - -insert into t1 (a,b,c,d,t) values ('a',1110,'a',1,@v1); -insert into t1 (a,b,c,d,t) values ('b',1110,'a',2,@v2); -insert into t1 (a,b,c,d,t) values ('a',1110,'b',3,@v3); -insert into t1 (a,b,c,d,t) values ('b',1110,'b',4,@v4); -select a,b,c,d,sha1(t) from t1 order by c,a; - -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='a'; -select a,b,c,d,sha1(t) from t1 where a='a' and b=1110 and c='b'; - -update t1 set t=@v4 where a='b' and b=1110 and c='a'; -update t1 set t=@v2 where a='b' and b=1110 and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v2 where d=2; -update t1 set t=@v4 where d=4; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v4 where a='b' and c='a'; -update t1 set t=@v2 where a='b' and c='b'; -select a,b,c,d,sha1(t) from t1 order by c,a; - -update t1 set t=@v2 where b+d=1112; -update t1 set t=@v4 where b+d=1114; -select a,b,c,d,sha1(t) from t1 order by c,a; - -delete from t1 where a='a' and b=1110 and c='a'; -delete from t1 where a='b' and c='a'; -delete from t1 where d=3; -delete from t1 where b+d=1114; -select count(*) from t1; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_blob_partition.test b/mysql-test/t/ndb_blob_partition.test deleted file mode 100644 index 35df57b96ba..00000000000 --- a/mysql-test/t/ndb_blob_partition.test +++ /dev/null @@ -1,97 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Minimal NDB blobs test with range partitions. -# - -create table t1 ( - a mediumint not null, - b text not null, - c int not null, - d longblob, - primary key using hash (a,c), - unique key (c) -) - engine=ndb - partition by range (c) - partitions 3 - ( partition p1 values less than (200), - partition p2 values less than (300), - partition p3 values less than (400)); - ---disable_query_log -sleep 1; - -# length 61 -set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; - -set @v1 = repeat(@s0, 100); # 1d42dd9090cf78314a06665d4ea938c35cc760f4 -set @v2 = repeat(@s1, 200); # 10d3c783026b310218d10b7188da96a2401648c6 -set @v3 = repeat(@s2, 300); # a33549d9844092289a58ac348dd59f09fc28406a -set @v4 = repeat(@s0, 400); # daa61c6de36a0526f0d47dc29d6b9de7e6d2630c -set @v5 = repeat(@s1, 500); # 70fc9a7d08beebc522258bfb02000a30c77a8f1d -set @v6 = repeat(@s2, 600); # 090565c580809efed3d369481a4bbb168b20713e -set @v7 = repeat(@s0, 700); # 1e0070bec426871a46291de27b9bd6e4255ab4e5 -set @v8 = repeat(@s1, 800); # acbaba01bc2e682f015f40e79d9cbe475db3002e -set @v9 = repeat(@s2, 900); # 9ee30d99162574f79c66ae95cdf132dcf9cbc259 ---enable_query_log - -# -- insert -- -insert into t1 values (1, @v1, 101, @v2); -insert into t1 values (1, @v2, 102, @v3); -insert into t1 values (1, @v3, 103, @v4); -insert into t1 values (2, @v4, 201, @v5); -insert into t1 values (2, @v5, 202, @v6); -insert into t1 values (2, @v6, 203, @v7); -insert into t1 values (3, @v7, 301, @v8); -insert into t1 values (3, @v8, 302, @v9); -insert into t1 values (3, @v9, 303, @v1); -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- pk read -- -select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101; -select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201; -select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301; - -# -- pk update -- -update t1 set b = @v3, d = @v4 where a = 1 and c = 102; -update t1 set b = @v6, d = @v7 where a = 2 and c = 202; -update t1 set b = @v9, d = @v1 where a = 3 and c = 302; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- hash index update -- -update t1 set b = @v4, d = @v5 where c = 103; -update t1 set b = @v7, d = @v8 where c = 203; -update t1 set b = @v1, d = @v2 where c = 303; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- full scan update -- -update t1 set b = @v5, d = @v6; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- range scan update -update t1 set b = @v1, d = @v2 where 100 < c and c < 200; -update t1 set b = @v4, d = @v5 where 200 < c and c < 300; -update t1 set b = @v7, d = @v8 where 300 < c and c < 400; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- delete -- -delete from t1 where a = 1 and c = 101; -delete from t1 where c = 102; -# delete from t1 where c < 300; # XXX coredump -delete from t1; -select a, sha1(b), c, sha1(d) from t1 order by a; - -# -- clean up -- -drop table t1; diff --git a/mysql-test/t/ndb_cache.test b/mysql-test/t/ndb_cache.test deleted file mode 100644 index 9c299b61c24..00000000000 --- a/mysql-test/t/ndb_cache.test +++ /dev/null @@ -1,122 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# Turn on and reset query cache -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - -# Create test table in NDB -CREATE TABLE t1 ( pk int not null primary key, - a int, b int not null, c varchar(20)) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); - -# Perform one query which should be inerted in query cache -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Perform the same query and make sure the query cache is hit -select * from t1; -show status like "Qcache_hits"; - -# Update the table and make sure the correct data is returned -update t1 set a=3 where pk=1; -select * from t1; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Insert a new record and make sure the correct data is returned -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk; -show status like "Qcache_hits"; - -# Perform a "new" query and make sure the query cache is not hit -select * from t1 where b=3; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_hits"; - -# Same query again... -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Delete from the table -delete from t1 where c='Fourth row'; -show status like "Qcache_queries_in_cache"; -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Start another connection and check that the query cache is hit -connect (con1,localhost,root,,); -connection con1; -use test; -select * from t1 order by pk; -select * from t1 where b=3; -show status like "Qcache_hits"; - -# Update the table and switch to other connection -update t1 set a=4 where b=3; -connect (con2,localhost,root,,); -connection con2; -use test; -show status like "Qcache_queries_in_cache"; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Use transactions and make sure the query cache is not updated until -# transaction is commited -begin; -update t1 set a=5 where pk=1; -# Note!! the below test shows that table is invalidated -# before transaction is committed -# TODO Fix so that cache is not invalidated HERE! -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -commit; -# TODO Here query is invalidated once again, commit count in NDB has changed -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1; - -show status like "Qcache_queries_in_cache"; - -SET GLOBAL query_cache_size=0; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_cache2.test b/mysql-test/t/ndb_cache2.test deleted file mode 100644 index 352b01ef73f..00000000000 --- a/mysql-test/t/ndb_cache2.test +++ /dev/null @@ -1,361 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5; ---enable_warnings - - -# Turn on and reset query cache -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -# Turn on thread that will fetch commit count for open tables -set GLOBAL ndb_cache_check_time=100; -reset query cache; -flush status; - -# Create test tables in NDB -CREATE TABLE t1 ( - pk int not null primary key, - a1 int, - b1 int not null, - c1 varchar(20) -) ENGINE=ndb; -CREATE TABLE t2 ( - pk int not null primary key, - a2 int, - b2 int not null -) ENGINE=ndb; -CREATE TABLE t3 ( - pk int not null primary key, - a3 int, - b3 int not null, - c3 int not null, - d3 varchar(20) -) ENGINE=ndb; -CREATE TABLE t4 ( - a4 int, - b4 int not null, - c4 char(20) -) ENGINE=ndbcluster; -CREATE TABLE t5 ( - pk int not null primary key, - a5 int, - b5 int not null, - c5 varchar(255) -) ENGINE=ndbcluster; -insert into t1 value (1, 2, 3, 'First row'); -insert into t2 value (1, 2, 3); -insert into t3 value (1, 2, 3, 4, '3 - First row'); -insert into t4 value (2, 3, '4 - First row'); -insert into t5 value (1, 2, 3, '5 - First row'); - -# Perform one query which should be inserted in query cache -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Perform the same query and make sure the query cache is hit -select * from t1; -show status like "Qcache_hits"; - -# Update the table and make sure the correct data is returned -update t1 set a1=3 where pk=1; -select * from t1; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Insert a new record and make sure the correct data is returned -insert into t1 value (2, 7, 8, 'Second row'); -insert into t1 value (4, 5, 6, 'Fourth row'); -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk desc; -show status like "Qcache_hits"; - -# Perform a "new" query and make sure the query cache is not hit -select * from t1 where b1=3; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_hits"; - -# Same query again... -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Delete from the table -delete from t1 where c1='Fourth row'; -show status like "Qcache_queries_in_cache"; -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Start another connection and check that the query cache is hit -connect (con1,localhost,root,,); -connection con1; -use test; -select * from t1 order by pk desc; -select * from t1 where b1=3; -show status like "Qcache_hits"; - -# Update the table and switch to other connection -update t1 set a1=4 where b1=3; -connect (con2,localhost,root,,); -connection con2; -use test; -show status like "Qcache_queries_in_cache"; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -# Load all tables into cache -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; - -##################################################################### -# Start transaction and perform update -# Switch to other transaction and check that update does not show up -# Switch back and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -update t1 set a1=5 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -commit; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -##################################################################### -# Start transaction and perform update -# Switch to other transaction and check that update does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -update t1 set a1=6 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The two queries below will not hit cache since transaction is ongoing -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -##################################################################### -# Start transaction and perform insert -# Switch to other transaction and check that insert does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -insert into t1 set pk=5, a1=6, b1=3, c1="New row"; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 where pk=5; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below four queries will not be cached, trans is ongoing -select * from t1 where pk=5; -select * from t1 where pk=5; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; - -##################################################################### -# Start transaction and perform delete -# Switch to other transaction and check that delete does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -connection con1; -flush status; -begin; -delete from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 where pk=2; -select * from t1 order by pk desc; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below four queries will not be cached, trans is ongoing -select * from t1 where pk=2; -select * from t1 order by pk desc; -select * from t1 order by pk desc; -select * from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -select * from t1 where pk=2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; - -##################################################################### -# Start a transaction which updates all tables -# Switch to other transaction and check updates does not show up -# Switch back, perform selects and commit transaction -# Switch to other transaction and check that update shows up -##################################################################### -flush status; -begin; -update t1 set a1=9 where pk=1; -update t2 set a2=9 where pk=1; -update t3 set a3=9 where pk=1; -update t4 set a4=9 where a4=2; -update t5 set a5=9 where pk=1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -connection con1; -# The below five queries will not be cached, trans is ongoing -select * from t1 order by pk desc; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -commit; - -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con1; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -connection con2; -select * from t1 order by pk desc; -select * from t2; -select * from t3; -select * from t4; -select * from t5; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1, t2, t3, t4, t5; - -# There should be no queries in cache, when tables have been dropped -show status like "Qcache_queries_in_cache"; - -SET GLOBAL query_cache_size=0; -SET GLOBAL ndb_cache_check_time=0; - - diff --git a/mysql-test/t/ndb_cache_multi.test b/mysql-test/t/ndb_cache_multi.test deleted file mode 100644 index 404393c211e..00000000000 --- a/mysql-test/t/ndb_cache_multi.test +++ /dev/null @@ -1,72 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - - -# Turn on and reset query cache on server1 -connection server1; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - -# Turn on and reset query cache on server2 -connection server2; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -reset query cache; -flush status; - - - -# Create test tables in NDB and load them into cache -# on server1 -connection server1; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - - -# Connect server2, load table in to cache, then update the table -connection server2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -update t1 set a=3 where a=2; - -# Connect to server1 and check that cache is invalidated -# and correct data is returned -connection server1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -drop table t1, t2; - - -# Turn off query cache on server1 -connection server1; -set GLOBAL query_cache_size=0; - -# Turn off query cache on server2 -connection server2; -set GLOBAL query_cache_size=0; diff --git a/mysql-test/t/ndb_cache_multi2.test b/mysql-test/t/ndb_cache_multi2.test deleted file mode 100644 index 2afcf0c18f7..00000000000 --- a/mysql-test/t/ndb_cache_multi2.test +++ /dev/null @@ -1,126 +0,0 @@ --- source include/have_query_cache.inc --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - - -# Turn on and reset query cache on server1 -connection server1; -echo == Connected to server1 ==; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; - -# Turn on and reset query cache on server2 -connection server2; -echo == Connected to server2 ==; -set GLOBAL query_cache_type=on; -set GLOBAL query_cache_size=1355776; -set GLOBAL ndb_cache_check_time=1; -reset query cache; -flush status; - -# Create test tables in NDB and load them into cache -# on server1 -connection server1; -echo == Connected to server1 ==; -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -# Run the check query once to load it into qc on server1 -# See at the end of this test why we need to disable ps-protocol for -# this query (*) ---disable_ps_protocol -select a != 3 from t1; ---enable_ps_protocol -select * from t2; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - - -# Connect server2, load table in to cache, then update the table -connection server2; -echo == Connected to server2 ==; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -select * from t1; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; -update t1 set a=3 where a=2; - -# Connect to server1 and check that cache is invalidated -# and correct data is returned -connection server1; -echo == Connected to server1 ==; - -# Loop and wait for max 10 seconds until query cache thread -# has invalidated the cache and the column a in t1 is equal to 3 -let $retries=20; -while (`select a != 3 from t1`) -{ - dec $retries; - if (!$retries) - { - The query_cache thread failed to invalidate query_cache in 10 seconds; - } - sleep 0.5; -} - -# Select from t1 one last time for the result file -# Column a should be 3 -select * from t1; - -# There should now be three queries in the cache -show status like "Qcache_queries_in_cache"; - -drop table t1, t2; - -# Turn off and reset query cache on server1 and server2 -connection server1; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; -connection server2; -set GLOBAL query_cache_size=0; -set GLOBAL ndb_cache_check_time=0; -reset query cache; -flush status; - -# (*) Why we need to execute the query in non-ps mode. -# The principle of this test is: two mysqlds connected to one cluster, -# both using their query cache. Queries are cached in server1 -# ("select a!=3 from t1", "select * from t1"), -# table t1 is modified in server2, we want to see that this invalidates -# the query cache of server1. Invalidation with NDB works like this: -# when a query is found in the query cache, NDB is asked if the tables -# have changed. In this test, ha_ndbcluster calls NDB every millisecond -# to collect change information about tables. -# Due to this millisecond delay, there is need for a loop ("while...") -# in this test, which waits until a query1 ("select a!=3 from t1") is -# invalidated (which is equivalent to it returning -# up-to-date results), and then expects query2 ("select * from t1") -# to have been invalidated (see up-to-date results). -# But when enabling --ps-protocol in this test, the logic breaks, -# because query1 is still done via mysql_real_query() (see mysqltest.c: -# eval_expr() always uses mysql_real_query()). So, query1 returning -# up-to-date results is not a sign of it being invalidated in the cache, -# because it was NOT in the cache ("select a!=3 from t1" on line 39 -# was done with prep stmts, while `select a!=3 from t1` is not, -# thus the second does not see the first in the cache). Thus, we may run -# query2 when cache still has not been invalidated. -# The solution is to make the initial "select a!=3 from t1" run -# as a normal query, this repairs the broken logic. -# But note, "select * from t1" is still using prepared statements -# which was the goal of this test with --ps-protocol. diff --git a/mysql-test/t/ndb_charset.test b/mysql-test/t/ndb_charset.test deleted file mode 100644 index 2d9f66564bc..00000000000 --- a/mysql-test/t/ndb_charset.test +++ /dev/null @@ -1,257 +0,0 @@ ---source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Minimal NDB charset test. -# - -# pk - binary - -create table t1 ( - a char(3) character set latin1 collate latin1_bin primary key -) engine=ndb; -# ok -insert into t1 values('aAa'); -insert into t1 values('aaa'); -insert into t1 values('AAA'); -# 3 -select * from t1 order by a; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 0 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# pk - case insensitive - -create table t1 ( - a char(3) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -# ok -insert into t1 values('aAa'); -# fail ---error ER_DUP_ENTRY -insert into t1 values('aaa'); ---error ER_DUP_ENTRY -insert into t1 values('AAA'); -# 1 -select * from t1 order by a; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 1 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# pk - varchar - -create table t1 ( - a varchar(20) character set latin1 collate latin1_swedish_ci primary key -) engine=ndb; -# -insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); --- error ER_DUP_ENTRY -insert into t1 values('b'); --- error ER_DUP_ENTRY -insert into t1 values('a '); -# -select a,length(a) from t1 order by a; -select a,length(a) from t1 order by a desc; -select * from t1 where a = 'a'; -select * from t1 where a = 'a '; -select * from t1 where a = 'd'; -drop table t1; - -# unique hash index - binary - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_bin not null, - unique key(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -# 3 -select * from t1 order by p; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 0 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# unique hash index - case insensitive - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_swedish_ci not null, - unique key(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -# fail ---error ER_DUP_ENTRY -insert into t1 values(2, 'aaa'); ---error ER_DUP_ENTRY -insert into t1 values(3, 'AAA'); -# 1 -select * from t1 order by p; -# 1 -select * from t1 where a = 'aAa'; -# 1 -select * from t1 where a = 'aaa'; -# 1 -select * from t1 where a = 'AaA'; -# 1 -select * from t1 where a = 'AAA'; -drop table t1; - -# unique hash index - varchar - -create table t1 ( - p int primary key, - a varchar(20) character set latin1 collate latin1_swedish_ci not null, - unique key(a) -) engine=ndb; -# -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); --- error ER_DUP_ENTRY -insert into t1 values(99,'b'); --- error ER_DUP_ENTRY -insert into t1 values(99,'a '); -# -select a,length(a) from t1 order by a; -select a,length(a) from t1 order by a desc; -select * from t1 where a = 'a'; -select * from t1 where a = 'a '; -select * from t1 where a = 'd'; -drop table t1; - -# ordered index - binary - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_bin not null, - index(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -# 6 -select * from t1 order by p; -# plan too flaky -#--replace_column 9 # -#explain select * from t1 where a = 'zZz' order by p; -# 2 -select * from t1 where a = 'aAa' order by p; -# 2 -select * from t1 where a = 'aaa' order by p; -# 0 -select * from t1 where a = 'AaA' order by p; -# 2 -select * from t1 where a = 'AAA' order by p; -drop table t1; - -# ordered index - case insensitive - -create table t1 ( - p int primary key, - a char(3) character set latin1 collate latin1_swedish_ci not null, - index(a) -) engine=ndb; -# ok -insert into t1 values(1, 'aAa'); -insert into t1 values(2, 'aaa'); -insert into t1 values(3, 'AAA'); -insert into t1 values(4, 'aAa'); -insert into t1 values(5, 'aaa'); -insert into t1 values(6, 'AAA'); -# 6 -select * from t1 order by p; -# plan too flaky -#--replace_column 9 # -#explain select * from t1 where a = 'zZz' order by p; -# 6 -select * from t1 where a = 'aAa' order by p; -# 6 -select * from t1 where a = 'aaa' order by p; -# 6 -select * from t1 where a = 'AaA' order by p; -# 6 -select * from t1 where a = 'AAA' order by p; -drop table t1; - -# ordered index - varchar - -create table t1 ( - p int primary key, - a varchar(20) character set latin1 collate latin1_swedish_ci not null, - index(a, p) -) engine=ndb; -# -insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); -insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F '); -select p,a,length(a) from t1 order by a, p; -select * from t1 where a = 'a ' order by a desc, p desc; -select * from t1 where a >= 'D' order by a, p; -select * from t1 where a < 'D' order by a, p; -# -select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a; -drop table t1; - -# minimal multi-byte test -# removed by jonas as this requires a configure --with-extra-charsets -#create table t1 ( -# a char(5) character set ucs2, -# b varchar(7) character set utf8, -# primary key(a, b) -#) engine=ndb; -# -#insert into t1 values -# ('a','A '),('B ','b'),('c','C '),('D','d'),('e ','E'),('F','f '), -# ('A','b '),('b ','C'),('C','d '),('d','E'),('E ','f'), -# ('a','C '),('B ','d'),('c','E '),('D','f'); -#-- error ER_DUP_ENTRY -#insert into t1 values('d','f'); -# -#select a,b,length(a),length(b) from t1 order by a,b limit 3; -#select a,b,length(a),length(b) from t1 order by a desc, b desc limit 3; -#select a,b,length(a),length(b) from t1 where a='c' and b='c'; -#drop table t1; - -# bug#14007 -create table t1 ( - a char(10) primary key -) engine=ndbcluster default charset=latin1; - -insert into t1 values ('aaabb'); -select * from t1; -replace into t1 set a = 'AAABB'; -select * from t1; -replace into t1 set a = 'aAaBb'; -select * from t1; -replace into t1 set a = 'aaabb'; -select * from t1; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_condition_pushdown.test b/mysql-test/t/ndb_condition_pushdown.test deleted file mode 100644 index ab56430ac1d..00000000000 --- a/mysql-test/t/ndb_condition_pushdown.test +++ /dev/null @@ -1,1756 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4; ---enable_warnings - -# -# Test of condition pushdown to storage engine -# -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10), - vstring varchar(10), - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('zero','one','two','three','four') not null, - flags set('zero','one','two','three','four') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp, - PRIMARY KEY (auto) -) engine=ndb; - -insert into t1 values -(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, - b'001','one','one', - '1901-01-01','1901', -'01:01:01','1901-01-01 01:01:01',NULL), -(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2, - b'010','two','one,two', - '1902-02-02','1902', -'02:02:02','1902-02-02 02:02:02',NULL), -(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3, - b'011','three','one,two,three', - '1903-03-03','1903', -'03:03:03','1903-03-03 03:03:03',NULL), -(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4, - b'100','four','one,two,three,four', - '1904-04-04','1904', -'04:04:04','1904-04-04 04:04:04',NULL); - -CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster; - -insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f"); - -CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster; - -insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); - -CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster; - -insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); - -set @old_ecpd = @@session.engine_condition_pushdown; -set engine_condition_pushdown = off; - -# Test all types and compare operators -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -bits = b'001' and -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -bits != b'001' and -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -bits > b'001' and -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -bits >= b'001' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -bits < b'100' and -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 and -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -bits <= b'100' and -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test LIKE/NOT LIKE -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -# BETWEEN -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -(bits between b'001' and b'011') and -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -(b'001' between bits and bits) and -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -# NOT BETWEEN -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -(bits not between b'001' and b'011') and -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -(b'001' not between bits and bits) and -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -# IN -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -bits in(b'001',b'011') and -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in(short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -b'001' in(bits) and -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -# NOT IN -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -bits not in(b'001',b'011') and -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -b'001' not in(bits) and -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -# Various tests -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; - -set engine_condition_pushdown = on; - -# Test all types and compare operators ---replace_column 9 # -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test index scan with filter -create index medium_index on t1(medium); - -# Test all types and compare operators ---replace_column 9 # -explain -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string != "aaaa" and -vstring != "aaaa" and -bin != 0xAAAA and -vbin != 0xAAAA and -tiny != -1 and -short != -1 and -medium != -1 and -long_int != -1 and -longlong != -1 and -(real_float < 1.0 or real_float > 2.0) and -(real_double < 1.0 or real_double > 2.0) and -(real_decimal < 1.0 or real_decimal > 2.0) and -utiny != 1 and -ushort != 1 and -umedium != 1 and -ulong != 1 and -ulonglong != 1 and -/* bits != b'001' and */ -options != 'one' and -flags != 'one' and -date_field != '1901-01-01' and -year_field != '1901' and -time_field != '01:01:01' and -date_time != '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string > "aaaa" and -vstring > "aaaa" and -bin > 0xAAAA and -vbin > 0xAAAA and -tiny < -1 and -short < -1 and -medium < -1 and -long_int < -1 and -longlong < -1 and -real_float > 1.1 and -real_double > 1.1 and -real_decimal > 1.1 and -utiny > 1 and -ushort > 1 and -umedium > 1 and -ulong > 1 and -ulonglong > 1 and -/* bits > b'001' and */ -(options = 'two' or options = 'three' or options = 'four') and -(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field > '1901-01-01' and -year_field > '1901' and -time_field > '01:01:01' and -date_time > '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - -select auto from t1 where -string >= "aaaa" and -vstring >= "aaaa" and -bin >= 0xAAAA and -vbin >= 0xAAAA and -tiny <= -1 and -short <= -1 and -medium <= -1 and -long_int <= -1 and -longlong <= -1 and -real_float >= 1.0 and -real_double >= 1.0 and -real_decimal >= 1.0 and -utiny >= 1 and -ushort >= 1 and -umedium >= 1 and -ulong >= 1 and -ulonglong >= 1 and -/* bits >= b'001' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field >= '1901-01-01' and -year_field >= '1901' and -time_field >= '01:01:01' and -date_time >= '1901-01-01 01:01:01' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string < "dddd" and -vstring < "dddd" and -bin < 0xDDDD and -vbin < 0xDDDD and -tiny > -4 and -short > -4 and -medium > -4 and -long_int > -4 and -longlong > -4 and -real_float < 4.4 and -real_double < 4.4 and -real_decimal < 4.4 and -utiny < 4 and -ushort < 4 and -umedium < 4 and -ulong < 4 and -ulonglong < 4 and -/* bits < b'100' and */ -(options = 'one' or options = 'two' or options = 'three') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and -date_field < '1904-01-01' and -year_field < '1904' and -time_field < '04:04:04' and -date_time < '1904-04-04 04:04:04' -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -select auto from t1 where -string <= "dddd" and -vstring <= "dddd" and -bin <= 0xDDDD and -vbin <= 0xDDDD and -tiny >= -4 and -short >= -4 and -medium >= -4 and -long_int >= -4 and -longlong >= -4 and -real_float <= 4.5 and -real_double <= 4.5 and -real_decimal <= 4.5 and -utiny <= 4 - 1 + 1 and /* Checking function composition */ -ushort <= 4 and -umedium <= 4 and -ulong <= 4 and -ulonglong <= 4 and -/* bits <= b'100' and */ -(options = 'one' or options = 'two' or options = 'three' or options = 'four') and -(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and -date_field <= '1904-04-04' and -year_field <= '1904' and -time_field <= '04:04:04' and -date_time <= '1904-04-04 04:04:04' -order by auto; - -# Test LIKE/NOT LIKE ---replace_column 9 # -explain -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string like "b%" and -vstring like "b%" and -bin like concat(0xBB, '%') and -vbin like concat(0xBB, '%') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -select auto from t1 where -string not like "b%" and -vstring not like "b%" and -bin not like concat(0xBB, '%') and -vbin not like concat(0xBB, '%') -order by auto; - -# BETWEEN ---replace_column 9 # -explain -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -(string between "aaaa" and "cccc") and -(vstring between "aaaa" and "cccc") and -(bin between 0xAAAA and 0xCCCC) and -(vbin between 0xAAAA and 0xCCCC) and -(tiny between -3 and -1) and -(short between -3 and -1) and -(medium between -3 and -1) and -(long_int between -3 and -1) and -(longlong between -3 and -1) and -(utiny between 1 and 3) and -(ushort between 1 and 3) and -(umedium between 1 and 3) and -(ulong between 1 and 3) and -(ulonglong between 1 and 3) and -/* (bits between b'001' and b'011') and */ -(options between 'one' and 'three') and -(flags between 'one' and 'one,two,three') and -(date_field between '1901-01-01' and '1903-03-03') and -(year_field between '1901' and '1903') and -(time_field between '01:01:01' and '03:03:03') and -(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -select auto from t1 where -("aaaa" between string and string) and -("aaaa" between vstring and vstring) and -(0xAAAA between bin and bin) and -(0xAAAA between vbin and vbin) and -(-1 between tiny and tiny) and -(-1 between short and short) and -(-1 between medium and medium) and -(-1 between long_int and long_int) and -(-1 between longlong and longlong) and -(1 between utiny and utiny) and -(1 between ushort and ushort) and -(1 between umedium and umedium) and -(1 between ulong and ulong) and -(1 between ulonglong and ulonglong) and -/* (b'001' between bits and bits) and */ -('one' between options and options) and -('one' between flags and flags) and -('1901-01-01' between date_field and date_field) and -('1901' between year_field and year_field) and -('01:01:01' between time_field and time_field) and -('1901-01-01 01:01:01' between date_time and date_time) -order by auto; - -# NOT BETWEEN ---replace_column 9 # -explain -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -(string not between "aaaa" and "cccc") and -(vstring not between "aaaa" and "cccc") and -(bin not between 0xAAAA and 0xCCCC) and -(vbin not between 0xAAAA and 0xCCCC) and -(tiny not between -3 and -1) and -(short not between -3 and -1) and -(medium not between -3 and -1) and -(long_int not between -3 and -1) and -(longlong not between -3 and -1) and -(utiny not between 1 and 3) and -(ushort not between 1 and 3) and -(umedium not between 1 and 3) and -(ulong not between 1 and 3) and -(ulonglong not between 1 and 3) and -/* (bits not between b'001' and b'011') and */ -(options not between 'one' and 'three') and -(flags not between 'one' and 'one,two,three') and -(date_field not between '1901-01-01' and '1903-03-03') and -(year_field not between '1901' and '1903') and -(time_field not between '01:01:01' and '03:03:03') and -(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -select auto from t1 where -("aaaa" not between string and string) and -("aaaa" not between vstring and vstring) and -(0xAAAA not between bin and bin) and -(0xAAAA not between vbin and vbin) and -(-1 not between tiny and tiny) and -(-1 not between short and short) and -(-1 not between medium and medium) and -(-1 not between long_int and long_int) and -(-1 not between longlong and longlong) and -(1 not between utiny and utiny) and -(1 not between ushort and ushort) and -(1 not between umedium and umedium) and -(1 not between ulong and ulong) and -(1 not between ulonglong and ulonglong) and -/* (b'001' not between bits and bits) and */ -('one' not between options and options) and -('one' not between flags and flags) and -('1901-01-01' not between date_field and date_field) and -('1901' not between year_field and year_field) and -('01:01:01' not between time_field and time_field) and -('1901-01-01 01:01:01' not between date_time and date_time) -order by auto; - -# IN ---replace_column 9 # -explain -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -string in("aaaa","cccc") and -vstring in("aaaa","cccc") and -bin in(0xAAAA,0xCCCC) and -vbin in(0xAAAA,0xCCCC) and -tiny in(-1,-3) and -short in(-1,-3) and -medium in(-1,-3) and -long_int in(-1,-3) and -longlong in(-1,-3) and -utiny in(1,3) and -ushort in(1,3) and -umedium in(1,3) and -ulong in(1,3) and -ulonglong in(1,3) and -/* bits in(b'001',b'011') and */ -options in('one','three') and -flags in('one','one,two,three') and -date_field in('1901-01-01','1903-03-03') and -year_field in('1901','1903') and -time_field in('01:01:01','03:03:03') and -date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -select auto from t1 where -"aaaa" in(string) and -"aaaa" in(vstring) and -0xAAAA in(bin) and -0xAAAA in(vbin) and -(-1 in(tiny)) and -(-1 in (short)) and -(-1 in(medium)) and -(-1 in(long_int)) and -(-1 in(longlong)) and -1 in(utiny) and -1 in(ushort) and -1 in(umedium) and -1 in(ulong) and -1 in(ulonglong) and -/* b'001' in(bits) and */ -'one' in(options) and -'one' in(flags) and -'1901-01-01' in(date_field) and -'1901' in(year_field) and -'01:01:01' in(time_field) and -'1901-01-01 01:01:01' in(date_time) -order by auto; - -# NOT IN ---replace_column 9 # -explain -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - -select auto from t1 where -string not in("aaaa","cccc") and -vstring not in("aaaa","cccc") and -bin not in(0xAAAA,0xCCCC) and -vbin not in(0xAAAA,0xCCCC) and -tiny not in(-1,-3) and -short not in(-1,-3) and -medium not in(-1,-3) and -long_int not in(-1,-3) and -longlong not in(-1,-3) and -utiny not in(1,3) and -ushort not in(1,3) and -umedium not in(1,3) and -ulong not in(1,3) and -ulonglong not in(1,3) and -/* bits not in(b'001',b'011') and */ -options not in('one','three') and -flags not in('one','one,two,three') and -date_field not in('1901-01-01','1903-03-03') and -year_field not in('1901','1903') and -time_field not in('01:01:01','03:03:03') and -date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') -order by auto; - ---replace_column 9 # -explain -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -select auto from t1 where -"aaaa" not in(string) and -"aaaa" not in(vstring) and -0xAAAA not in(bin) and -0xAAAA not in(vbin) and -(-1 not in(tiny)) and -(-1 not in(short)) and -(-1 not in(medium)) and -(-1 not in(long_int)) and -(-1 not in(longlong)) and -1 not in(utiny) and -1 not in(ushort) and -1 not in(umedium) and -1 not in(ulong) and -1 not in(ulonglong) and -/* b'001' not in(bits) and */ -'one' not in(options) and -'one' not in(flags) and -'1901-01-01' not in(date_field) and -'1901' not in(year_field) and -'01:01:01' not in(time_field) and -'1901-01-01 01:01:01' not in(date_time) -order by auto; - -# Update test -update t1 -set medium = 17 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = -1 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; - -# Delete test -delete from t1 -where -string = "aaaa" and -vstring = "aaaa" and -bin = 0xAAAA and -vbin = 0xAAAA and -tiny = -1 and -short = -1 and -medium = 17 and -long_int = -1 and -longlong = -1 and -real_float > 1.0 and real_float < 2.0 and -real_double > 1.0 and real_double < 2.0 and -real_decimal > 1.0 and real_decimal < 2.0 and -utiny = 1 and -ushort = 1 and -umedium = 1 and -ulong = 1 and -ulonglong = 1 and -/* bits = b'001' and */ -options = 'one' and -flags = 'one' and -date_field = '1901-01-01' and -year_field = '1901' and -time_field = '01:01:01' and -date_time = '1901-01-01 01:01:01'; - -select count(*) from t1; - -# Various tests ---replace_column 9 # -explain -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; -select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; - ---replace_column 9 # -explain -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; -select * from t2 where attr3 is not null and attr1 > 2 order by pk1; - ---replace_column 9 # -explain -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; -select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; - ---replace_column 9 # -explain -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; -select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; - ---replace_column 9 # -explain -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; -select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; - ---replace_column 9 # -explain -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; -select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; - -# Some tests that are currently not supported and should not push condition ---replace_column 9 # -explain -select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; ---replace_column 9 # -explain -select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; ---replace_column 9 # -explain -select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1; - -# bug#15722 -create table t5 (a int primary key auto_increment, b tinytext not null) -engine = ndb; -insert into t5 (b) values ('jonas'), ('jensing'), ('johan'); -set engine_condition_pushdown = off; -select * from t5 where b like '%jo%' order by a; -set engine_condition_pushdown = on; ---replace_column 9 # -explain select * from t5 where b like '%jo%'; -select * from t5 where b like '%jo%' order by a; - -# bug#21056 ndb pushdown equal/setValue error on datetime -set engine_condition_pushdown = off; -select auto from t1 where date_time like '1902-02-02 %' order by auto; -select auto from t1 where date_time not like '1902-02-02 %' order by auto; -set engine_condition_pushdown = on; ---replace_column 9 # -explain select auto from t1 where date_time like '1902-02-02 %'; -select auto from t1 where date_time like '1902-02-02 %' order by auto; ---replace_column 9 # -explain select auto from t1 where date_time not like '1902-02-02 %'; -select auto from t1 where date_time not like '1902-02-02 %' order by auto; - -# bug#17421 -1 -drop table t1; -create table t1 (a int, b varchar(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -# in TUP the constants 'ab' 'abc' were expected in varchar format -# "like" returned error which became "false" -# scan filter negates "or" which exposes the bug -set engine_condition_pushdown = off; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; -set engine_condition_pushdown = on; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; - -# bug#17421 -2 -drop table t1; -create table t1 (a int, b char(3), primary key using hash(a)) -engine=ndb; -insert into t1 values (1,'a'), (2,'ab'), (3,'abc'); -# test that incorrect MySQL behaviour is preserved -# 'ab ' LIKE 'ab' is true in MySQL -set engine_condition_pushdown = off; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; -set engine_condition_pushdown = on; -select * from t1 where b like 'ab'; -select * from t1 where b like 'ab' or b like 'ab'; -select * from t1 where b like 'abc'; -select * from t1 where b like 'abc' or b like 'abc'; - -# bug#20406 (maybe same as bug#17421 -1, not seen on 32-bit x86) -drop table t1; -create table t1 ( fname varchar(255), lname varchar(255) ) -engine=ndbcluster; -insert into t1 values ("Young","Foo"); - -set engine_condition_pushdown = 0; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -set engine_condition_pushdown = 1; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); - -# make sure optimizer does not do some crazy shortcut -insert into t1 values ("aaa", "aaa"); -insert into t1 values ("bbb", "bbb"); -insert into t1 values ("ccc", "ccc"); -insert into t1 values ("ddd", "ddd"); - -set engine_condition_pushdown = 0; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); -set engine_condition_pushdown = 1; -SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); - -set engine_condition_pushdown = @old_ecpd; -DROP TABLE t1,t2,t3,t4,t5; diff --git a/mysql-test/t/ndb_config.test b/mysql-test/t/ndb_config.test deleted file mode 100644 index f63c0087c1e..00000000000 --- a/mysql-test/t/ndb_config.test +++ /dev/null @@ -1,23 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults -r \\\n -f " " --query=nodeid,host,DataMemory,IndexMemory --type=ndbd 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --type=ndbd --host=localhost 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=type,nodeid,host --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null - -# End of 4.1 tests - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.jonas --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf1.cnf --query=type,nodeid,host,IndexMemory,DataMemory --mycnf 2> /dev/null - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster0 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster1 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --query=type,nodeid,host --mycnf 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null - - ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=localhost --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=1.2.3.4 --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null ---exec $NDB_TOOLS_DIR/ndb_config --no-defaults --query=nodeid --host=127.0.0.1 --config-file=$NDB_BACKUP_DIR/config.ini 2> /dev/null diff --git a/mysql-test/t/ndb_config2.test b/mysql-test/t/ndb_config2.test deleted file mode 100644 index 170f1b2e5e7..00000000000 --- a/mysql-test/t/ndb_config2.test +++ /dev/null @@ -1,7 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - -# Following doesn't work in all configurations (if shm is not defined) - ---exec $NDB_TOOLS_DIR/ndb_config --defaults-group-suffix=.cluster2 --defaults-file=$MYSQL_TEST_DIR/std_data/ndb_config_mycnf2.cnf --ndb-shm --connections --query=type,nodeid1,nodeid2,group,nodeidserver --mycnf 2> /dev/null diff --git a/mysql-test/t/ndb_cursor.test b/mysql-test/t/ndb_cursor.test deleted file mode 100644 index 406f8629cfe..00000000000 --- a/mysql-test/t/ndb_cursor.test +++ /dev/null @@ -1,47 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; -drop table if exists t2; ---enable_warnings - -create table t1 ( - a int not null primary key, - b int not null -) engine=ndb; - -create table t2 ( - a int not null primary key, - b int not null -) engine=ndb; - -insert into t1 values (1,10), (2,20), (3,30), (4, 40); - -delimiter //; -create procedure test_cursor () -begin - declare done int default 0; - declare temp_a int; - declare temp_b int; - declare cur1 cursor for select a,b from t1; - declare continue handler for sqlstate '02000' set done = 1; - open cur1; - repeat - fetch cur1 into temp_a, temp_b; - if not done then - insert into t2 values (temp_a, temp_b); - end if; - until done end repeat; - close cur1; -end; -// -delimiter ;// - -select * from t2 order by a; -call test_cursor(); -select * from t2 order by a; -drop procedure test_cursor; -drop table t1,t2; - ---echo end of 5.1 tests diff --git a/mysql-test/t/ndb_database.test b/mysql-test/t/ndb_database.test deleted file mode 100644 index 8bfdf40de88..00000000000 --- a/mysql-test/t/ndb_database.test +++ /dev/null @@ -1,24 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop database if exists mysqltest; ---enable_warnings - -# -# Check that all tables in a database are dropped when database is dropped -# - -create database mysqltest; -create table mysqltest.t1 (a int primary key, b int) engine=ndb; -use mysqltest; -show tables; - -drop database mysqltest; -create database mysqltest; -use mysqltest; -show tables; - -drop database mysqltest; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_dd_alter.test b/mysql-test/t/ndb_dd_alter.test deleted file mode 100644 index 7635a8944da..00000000000 --- a/mysql-test/t/ndb_dd_alter.test +++ /dev/null @@ -1,274 +0,0 @@ -############################################################## -# Author: JBM -# Date: 2006-01-12 -# Purpose: To test using ndb memory and disk tables together. -############################################################## - -############################################################## -# Author: Nikolay -# Date: 2006-05-12 -# Purpose: To test using ndb memory and disk tables together. -# -# Select from disk into memory table -# Select from disk into memory table -# Create test that loads data, use mysql dump to dump data, drop table, -# create table and load from mysql dump. -# Use group by asc and dec; Use having; Use order by -# ALTER Tests (Meta data testing): -# ALTER from InnoDB to Cluster Disk Data -# ALTER from MyISAM to Cluster Disk Data -# ALTER from Cluster Disk Data to InnoDB -# ALTER from Cluster Disk Data to MyISAM -# ALTER DD Tables and add columns -# ALTER DD Tables and add Indexes -# ALTER DD Tables and drop columns -# -############################################################## -# Author: Jonathan -# Date 2006-08-28 -# Purpose: To take out some of the test that are already -# Covered by other tests. Per Jonas -# The new purpose of this test is testing "Alter" -# Statements. Therefore the name is changed to -# ndb_dd_alter.test -# Removed tests include: -# Select from disk into memory table -# Select from disk into memory table -# Create test that loads data, use mysql dump to dump data, drop table, -# create table and load from mysql dump. -# Use group by asc and dec; Use having; Use order by -############################################################## - --- source include/have_ndb.inc --- source include/have_innodb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings - -############ Test Setup Section ############# --- echo **** Test Setup Section **** -################## ALTER Tests (Meta data testing) #################### - - CREATE LOGFILE GROUP lg - ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE = 1M - ENGINE=NDB; - - CREATE TABLESPACE ts - ADD DATAFILE './table_space/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 12M - ENGINE NDB; - -#### Try to ALTER from InnoDB to Cluster Disk Data - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) ENGINE=InnoDB; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} -enable_query_log; - -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' -SELECT * FROM test.t1 ORDER BY a1; -DROP TABLE test.t1; - -#### Try to ALTER from MyISAM to Cluster Disk Data - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) ENGINE=MyISAM; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} -enable_query_log; - -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' -SELECT * FROM test.t1 ORDER BY a1; - -#### Try to ALTER from Cluster Disk Data to InnoDB - -ALTER TABLE test.t1 ENGINE=InnoDB; -SHOW CREATE TABLE test.t1; -SELECT * FROM test.t1 ORDER BY a1; -ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -#### Try to ALTER from Cluster Disk Data to MyISAM - -ALTER TABLE test.t1 ENGINE=MyISAM; -SHOW CREATE TABLE test.t1; -DROP TABLE test.t1; - -#### Try to ALTER DD Tables and add columns - -CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB; - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1); - dec $1; -} -enable_query_log; - -SELECT * FROM test.t1 ORDER BY a1; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; - -ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0'; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a2 = $1+1.2345, a3 = $1+20000000.00 where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT * FROM test.t1 ORDER BY a1; - -ALTER TABLE test.t1 ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a4 = 0, a5 = 1, a6 = $1+23456, a7 = '2006-1-1', - a8 = '07:04:00' where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1; - -ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB; -SHOW CREATE TABLE test.t1; -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -disable_query_log; -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -enable_query_log; - -let $1=20; -disable_query_log; -while ($1) -{ - eval update test.t1 set a9 = '1971-5-28 16:55:03', a10 = 'abc', a11 = 'abcdefg', - a12 = 'LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', a13 = 'Text Field', - a14 = @d2 where a1 = $1; - dec $1; -} -enable_query_log; - -SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1; - -#### Try to ALTER DD Tables and add Indexes - -ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3); - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -ALTER TABLE test.t1 DROP INDEX a2_i; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -TRUNCATE TABLE test.t1; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -#### Try to ALTER DD Tables and drop columns - - -ALTER TABLE test.t1 DROP a14; -ALTER TABLE test.t1 DROP a13; -ALTER TABLE test.t1 DROP a12; -ALTER TABLE test.t1 DROP a11; -ALTER TABLE test.t1 DROP a10; -ALTER TABLE test.t1 DROP a9; -ALTER TABLE test.t1 DROP a8; -ALTER TABLE test.t1 DROP a7; -ALTER TABLE test.t1 DROP a6; -ALTER TABLE test.t1 DROP PRIMARY KEY; - -SHOW CREATE TABLE test.t1; - -# Check column storage ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep 'ST=' - -DROP TABLE test.t1; - - ALTER TABLESPACE ts - DROP DATAFILE './table_space/datafile.dat' - ENGINE NDB; - DROP TABLESPACE ts ENGINE NDB; - DROP LOGFILE GROUP lg ENGINE=NDB; - -####################### End section 4 ######################### -#End 5.1 test case - diff --git a/mysql-test/t/ndb_dd_backuprestore.test b/mysql-test/t/ndb_dd_backuprestore.test deleted file mode 100644 index 48db8ec3e0b..00000000000 --- a/mysql-test/t/ndb_dd_backuprestore.test +++ /dev/null @@ -1,349 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-24 -# Purpose: Test CDD backup and restore -######################################## - --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -DROP TABLE IF EXISTS test.t4; -DROP TABLE IF EXISTS test.t5; -DROP TABLE IF EXISTS test.t6; ---enable_warnings - -############ Test 1 Simple DD backup and restore ############# --- echo **** Test 1 Simple DD backup and restore **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 CHAR(50) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden", $j, b'1'); - dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -################# Mixed Cluster Test ############################ --- echo **** Test 2 Mixed Cluster Test backup and restore **** - -CREATE TABLE test.t2 -(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB; - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; -} ---enable_query_log - -CREATE TABLE test.t3 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t4 (c1 int not null auto_increment, data LONGBLOB, PRIMARY KEY(c1))ENGINE=NDB; - -let $j= 50; ---disable_query_log -while ($j) -{ - INSERT INTO test.t3 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t3 VALUES (NULL, repeat('b',16*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('a',1*1024)); - INSERT INTO test.t4 VALUES (NULL, repeat('b',16*1024)); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY pk1 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t3 WHERE c1 = 2; - -SELECT COUNT(*) FROM test.t4; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 1; - -SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -###################### Adding partition ################################# --- echo **** Test 3 Adding partition Test backup and restore **** - -CREATE TABLESPACE table_space2 -ADD DATAFILE './table_space2/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - -CREATE TABLE test.t1 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(150) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space1 STORAGE DISK ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 4; - -CREATE TABLE test.t4 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(180) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY HASH(c3) PARTITIONS 2; - -CREATE TABLE test.t2 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY KEY(c3) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t5 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY KEY(pk1) (PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -CREATE TABLE test.t3 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(202) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))TABLESPACE table_space2 STORAGE DISK ENGINE=NDB PARTITION BY RANGE (c3) PARTITIONS 3 (PARTITION x1 VALUES LESS THAN (105), PARTITION x2 VALUES LESS THAN (333), PARTITION x3 VALUES LESS THAN (720)); - -CREATE TABLE test.t6 (pk1 MEDIUMINT NOT NULL AUTO_INCREMENT, c2 VARCHAR(220) NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL, PRIMARY KEY(pk1,c3))ENGINE=NDB PARTITION BY RANGE (pk1) PARTITIONS 2 (PARTITION x1 VALUES LESS THAN (333), PARTITION x2 VALUES LESS THAN (720)); - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - - -let $j= 500; ---disable_query_log -while ($j) -{ - eval INSERT INTO test.t1 VALUES (NULL, "Sweden, Texas", $j, b'0'); - eval INSERT INTO test.t4 VALUES (NULL, "Sweden, Texas", $j, b'0'); - dec $j; - eval INSERT INTO test.t2 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t5 VALUES (NULL, "Sweden, Texas, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - dec $j; - eval INSERT INTO test.t3 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); - eval INSERT INTO test.t6 VALUES (NULL, "TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU", $j, b'1'); } --enable_query_log - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - --- source include/ndb_backup.inc - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE table_space2 -DROP DATAFILE './table_space2/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP TABLESPACE table_space2 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - --- source include/ndb_restore_master.inc - - -SHOW CREATE TABLE test.t1; - -SHOW CREATE TABLE test.t2; - -SHOW CREATE TABLE test.t3; - -SHOW CREATE TABLE test.t4; - -SHOW CREATE TABLE test.t5; - -SHOW CREATE TABLE test.t6; - -SELECT * FROM information_schema.partitions WHERE table_name= 't1'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't2'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't3'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't4'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't5'; - -SELECT * FROM information_schema.partitions WHERE table_name= 't6'; - -SELECT COUNT(*) FROM test.t1; - -SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t2; - -SELECT pk1, c2, c3, hex(c4) FROM test.t2 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t3; - -SELECT pk1, c2, c3, hex(c4) FROM test.t3 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t4; - -SELECT pk1, c2, c3, hex(c4) FROM test.t4 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t5; - -SELECT pk1, c2, c3, hex(c4) FROM test.t5 ORDER BY c3 LIMIT 5; - -SELECT COUNT(*) FROM test.t6; - -SELECT pk1, c2, c3, hex(c4) FROM test.t6 ORDER BY c3 LIMIT 5; - -# Cleanup - -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -DROP TABLE test.t4; -DROP TABLE test.t5; -DROP TABLE test.t6; - -ALTER TABLESPACE table_space1 DROP DATAFILE './table_space1/datafile.dat' ENGINE=NDB; - -ALTER TABLESPACE table_space2 DROP DATAFILE './table_space2/datafile.dat' ENGINE=NDB; - -DROP TABLESPACE table_space1 ENGINE = NDB; - -DROP TABLESPACE table_space2 ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 ENGINE = NDB; - -#End 5.1 test case - - diff --git a/mysql-test/t/ndb_dd_basic.test b/mysql-test/t/ndb_dd_basic.test deleted file mode 100644 index 3acf4669868..00000000000 --- a/mysql-test/t/ndb_dd_basic.test +++ /dev/null @@ -1,454 +0,0 @@ -################################# -# Author: JO -# Org Date: ? -# Purpose: To test basic Cluster Disk Data -################################# -# Change Author: JBM -# Change Date: 2006-01-11 -# Change: Cleanup and test rename -################################# -# Change Author: Guangbao Ni -# Change Date: 2007-03-20 -# Change: Test insert data when no datafile in spacetable -################################# - --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# some negative tests -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=MYISAM; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=XYZ; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M; - -################################## -# Basic test of disk tables for NDB -# Start by creating a logfile group -################################## - -set storage_engine=ndb; -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################### -# Create a tablespace connected to the logfile group -################################################### - -set storage_engine=myisam; -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -######################################## -# Create a table using this tablespace -######################################## - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -SHOW CREATE TABLE t1; - -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -SELECT COUNT(*) FROM t1; - -#################################### -# Test error cases with size numbers -#################################### ---error ER_WRONG_SIZE_NUMBER -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10y -ENGINE = NDB; - ---error ER_WRONG_SIZE_NUMBER -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10MB -ENGINE = NDB; - ---error 1064 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 MB -ENGINE = NDB; - ---error 1064 -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 10 M -ENGINE = NDB; - ---error ER_SIZE_OVERFLOW_ERROR -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'x.dat' -INITIAL_SIZE 1000000000000K -ENGINE = NDB; - -DROP TABLE t1; - -create tablespace ts2 -add datafile 'datafile2_1.dat' -use logfile group lg1 -initial_size 12M -engine ndb; - -CREATE TABLE City ( - ID int(11) NOT NULL AUTO_INCREMENT, - Name char(35) NOT NULL, - CountryCode char(3) NOT NULL, - District char(20) NOT NULL, - Population int(11) NOT NULL, - PRIMARY KEY (ID) -) ENGINE=ndbcluster -tablespace ts2 -storage disk; - -alter tablespace ts2 -drop datafile 'datafile2_1.dat' -engine ndb; - -#It will give error messages: NoDatafile in tablespace ---error ER_GET_ERRMSG -insert -into City (Name,CountryCode,District,Population) -values ('BeiJing','CN','Beijing',2000); - ---error ER_DROP_FILEGROUP_FAILED -drop tablespace ts2 -engine ndb; - -drop table City; - -drop tablespace ts2 -engine ndb; - -############################ -# Test update of mm/dd part -############################ - -CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; -INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '7'WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -DROP TABLE t1; - -##### - -CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE NDB; -INSERT INTO t1 VALUE (1,'1','1'), (2,'2','2'), (3,'3','3'); -BEGIN; -UPDATE t1 SET b = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '2' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -BEGIN; -UPDATE t1 SET c = '3' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET b = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -UPDATE t1 SET c = '4' WHERE a = 1; -SELECT b FROM t1 WHERE a = 1; -SELECT * FROM t1 WHERE a = 1; -COMMIT; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '6' WHERE b = '5'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET b = '7' WHERE c = '4'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '5' WHERE a = 1; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '6' WHERE b = '7'; -SELECT * FROM t1 ORDER BY 1; -UPDATE t1 SET c = '7' WHERE c = '6'; -SELECT * FROM t1 ORDER BY 1; -DROP TABLE t1; - -######################## -# Test for blobs... -######################## - -CREATE TABLE t1 ( - a INT NOT NULL PRIMARY KEY, - b TEXT NOT NULL -) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; - -# b1 length 2000+256 (blob part aligned) -######################################### -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# b2 length 20000 -########################################## -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); - -INSERT INTO t1 VALUES(1,@b1); -INSERT INTO t1 VALUES(2,@b2); -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=2; -UPDATE t1 SET b=@b2 WHERE a=1; -UPDATE t1 SET b=@b1 WHERE a=2; -SELECT a,length(b),substr(b,1+2*9000,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+2*900,2) FROM t1 WHERE a=2; -UPDATE t1 SET b=concat(b,b) WHERE a=1; -UPDATE t1 SET b=concat(b,b) WHERE a=2; -SELECT a,length(b),substr(b,1+4*9000,2) FROM t1 WHERE a=1; -SELECT a,length(b),substr(b,1+4*900,2) FROM t1 WHERE a=2; -DELETE FROM t1 WHERE a=1; -DELETE FROM t1 WHERE a=2; -SELECT COUNT(*) FROM t1; -DROP TABLE t1; - -# bug#20612 INS-DEL bug (not pgman bug) -# found via disk data assert but is not pgman or disk data related - -CREATE TABLE t1 ( - a int NOT NULL, - b varchar(4000), -- must use 2 pages undo - PRIMARY KEY using hash (a) -) -TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER; - -set autocommit = 0; -insert into t1 values(0,'x'); -insert into t1 values(1,'x'); -insert into t1 values(2,'x'); -insert into t1 values(3,'x'); -insert into t1 values(4,'x'); -insert into t1 values(5,'x'); -insert into t1 values(6,'x'); -insert into t1 values(7,'x'); -insert into t1 values(8,'x'); -delete from t1 where a = 0; -commit; - -delete from t1; -begin; -insert into t1 values (1, 'x'); -select * from t1; -rollback; - -set autocommit = 1; - - -drop table t1; -############################# -# Customer posted order by test case -# Org in ndb_dd_advance.test -############################# - -create table test.t1 (f1 varchar(50) primary key, f2 text,f3 int) -TABLESPACE ts1 STORAGE DISK engine=NDB; -insert into test.t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); -insert into test.t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); -select * from test.t1 order by f1; -select f1,f2 from test.t1 order by f2; -select f2 from test.t1 order by f2; -select f1,f2 from test.t1 order by f1; -drop table test.t1; - -################### -# Test Cleanup -################### - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 -ENGINE = NDB; - -DROP LOGFILE GROUP lg1 -ENGINE =NDB; - -#End 5.1 test case diff --git a/mysql-test/t/ndb_dd_ddl.test b/mysql-test/t/ndb_dd_ddl.test deleted file mode 100644 index aa692385b07..00000000000 --- a/mysql-test/t/ndb_dd_ddl.test +++ /dev/null @@ -1,363 +0,0 @@ -######################################### -# Author: JBM -# Date: 2006-01-03 -# Purpose: Test the NDB engine reaction to duplicate -# Table spaces and log groups. Also to test -# Statement mixed case. -############################################ -# Change Author:JBM -# Change Date 2006-01-19 -# Change: Adding to test cases feedback from OB -# 1) The 'duplicate' tests. -# a) The test is using the default (test) database and is not -# attempting to create databases (only logs, table spaces and -# tables). Is this intentional? -# b) What about a duplication of table name when one exists on disk and -# you are trying to create it again in memory? -# -#2) 'CaSE SensiTiVE' tests -# a) Suggest you include a test case where the case difference is in -# the file name. I know this is not an issue for *nix systems but -# will be when we expand to Windows and Mac. Better put it in now. -############################################ -# -# Jonas 2006-03-10 -# Add verification that ndb currently is limited to 1 logfile group -# - - --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP DATABASE IF EXISTS mysqltest; -CREATE DATABASE mysqltest; ---enable_warnings - -############## Duplcate Statement Testing ######### - ---echo **** Begin Duplicate Statement Testing **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -# Verify that one currently can create only 1 logfile group ---error ER_CREATE_FILEGROUP_FAILED -CREATE LOGFILE GROUP lg2 -ADD UNDOFILE 'undofile2.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; -SHOW WARNINGS; - ---error ER_CREATE_FILEGROUP_FAILED -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - ---error ER_CREATE_FILEGROUP_FAILED -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE=NDB; - -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - ---error ER_TABLE_EXISTS_ERROR -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - ---error ER_TABLE_EXISTS_ERROR -CREATE TABLE mysqltest.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -ENGINE=NDB; - - -DROP TABLE mysqltest.t1; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 -ENGINE=NDB; - ---error ER_DROP_FILEGROUP_FAILED -DROP TABLESPACE ts1 -ENGINE=NDB; - -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - ---error ER_DROP_FILEGROUP_FAILED -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - -DROP DATABASE IF EXISTS mysqltest; - ---echo **** End Duplicate Statement Testing **** -############# End Duplicate Statments ############ ---echo -############ Begin CaSe Testing ################## ---echo **** Begin Statment CaSe Testing **** - -creaTE LOgfilE GrOuP lg1 -adD undoFILE 'undofile.dat' -initiAL_siZE 1M -UnDo_BuFfEr_SiZe = 1M -ENGInE=NDb; - -altER LOgFiLE GrOUp lg1 -AdD UnDOfILe 'uNdOfiLe02.daT' -INItIAl_SIzE 1M ENgINE nDB; - -CrEAtE TABLEspaCE ts1 -ADD DATAfilE 'datafile.dat' -UsE LoGFiLE GRoUP lg1 -INITiaL_SizE 1M -ENGiNe NDb; - -AlTeR tAbLeSpAcE ts1 -AdD DaTaFiLe 'dAtAfiLe2.daT' -InItIaL_SiZe 1M -EnGiNe=NDB; - -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -TABLEspace ts1 storAGE dISk -ENGine nDb; - -DROP TABLE t1; - -AlteR TAblespaCE ts1 -droP DATAfile 'dAtAfiLe2.daT' -ENGINE=NDB; - -ALter tablesPACE ts1 -dROp dAtAfIlE 'datafile.dat' -ENGine=Ndb; - -DrOp TaBleSpAcE ts1 -engINE=ndB; - -DrOp lOgFiLe GrOuP lg1 -EnGiNe=nDb; - ---echo **** End Statment CaSe Testing **** -############ End CaSe Testing ################## ---echo -############ Begin = and no = Testing ########## ---echo **** Begin = And No = Testing **** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE=1M -UNDO_BUFFER_SIZE=1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE=1M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE=1M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE=1M -ENGINE=NDB; - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -DROP TABLE t1; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 -ENGINE=NDB; - -DROP LOGFILE GROUP lg1 -ENGINE=NDB; - ---echo ---echo **** End of = **** ---echo - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 1M -UNDO_BUFFER_SIZE 1M -ENGINE NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 1M -ENGINE NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile2.dat' -INITIAL_SIZE 1M -ENGINE NDB; - ---error 1005 -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE MEMORY -ENGINE NDB; - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE NDB; - - -CREATE INDEX b_i on t1(b); -CREATE INDEX bc_i on t1(b, c); - -DROP TABLE t1; - -# bug#20053 - -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile3.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 1M -ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; - ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; -# bug#20053 - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile2.dat' -ENGINE NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; - -DROP TABLESPACE ts1 -ENGINE NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile3.dat' -ENGINE NDB; - -DROP TABLESPACE ts2 -ENGINE NDB; - -DROP LOGFILE GROUP lg1 -ENGINE NDB; - ---echo **** End = And No = **** -############ End = And No = ################## - -### -# -# bug#16341 -create table t1 (a int primary key) engine = myisam; - ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---error ER_CREATE_FILEGROUP_FAILED ---eval create logfile group lg1 add undofile '$MYSQLTEST_VARDIR/master-data/test/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb; - -create logfile group lg1 -add undofile 'undofile.dat' -initial_size 1M -undo_buffer_size = 1M -engine=ndb; - ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---error ER_CREATE_FILEGROUP_FAILED ---eval create tablespace ts1 add datafile '$MYSQLTEST_VARDIR/master-data/test/t1.frm' use logfile group lg1 initial_size 1M engine ndb; - ---error ER_DROP_FILEGROUP_FAILED -drop tablespace ts1 -engine ndb; - -drop logfile group lg1 -engine ndb; - -drop table t1; - - - -# End 5.1 test diff --git a/mysql-test/t/ndb_dd_disk2memory.test b/mysql-test/t/ndb_dd_disk2memory.test deleted file mode 100644 index 5975f44e087..00000000000 --- a/mysql-test/t/ndb_dd_disk2memory.test +++ /dev/null @@ -1,292 +0,0 @@ -######################################## -# Author: JBM -# Date: 2006-01-12 -# Purpose: To test using ndb memory and -# disk tables together. -######################################## - --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings - -############ Test Setup Section ############# --- echo **** Test Setup Section **** - -CREATE LOGFILE GROUP log_group1 -ADD UNDOFILE './log_group1/undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE table_space1 -ADD DATAFILE './table_space1/datafile.dat' -USE LOGFILE GROUP log_group1 -INITIAL_SIZE 12M -ENGINE NDB; - - -CREATE TABLE test.t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE test.t2 -(pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL) -ENGINE=NDB; - ---echo -##################### Data load for first test #################### ---echo **** Data load for first test **** - -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - - -INSERT INTO test.t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75); - ---echo -##################### Test 1 Section Begins ############### ---echo *** Test 1 Section Begins *** -SELECT COUNT(*) FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -SELECT * FROM test.t2 LEFT JOIN test.t1 ON pk2=pk1 WHERE b2 IN (4); -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 WHERE b IN (4); -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2 WHERE pk1 IN (75); -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; ---echo -####################### Test 1 Section End ################ - -##################### Setup for test 2 #################### ---echo *** Setup for test 2 **** -DELETE FROM test.t1; -INSERT INTO test.t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45); ---echo -############################# Test Section 2 ############### ---echo **** Test Section 2 **** -SELECT b, c FROM test.t1 LEFT JOIN test.t2 ON pk1=pk2 ORDER BY b; -SELECT COUNT(*) FROM test.t1 LEFT JOIN test.t2 ON b=b2; -SELECT COUNT(*) FROM test.t1 RIGHT JOIN test.t2 ON b=b2; -SHOW CREATE TABLE test.t2; -SHOW CREATE TABLE test.t1; -ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; -SHOW CREATE TABLE test.t2; -ALTER TABLE test.t1 STORAGE MEMORY ENGINE=NDBCLUSTER; -SHOW CREATE TABLE test.t1; ---echo -######################### End Test Section 2 ################# -DROP TABLE test.t1; -DROP TABLE test.t2; -##################### Setup for Test Section 3 ############### ---echo *** Setup for Test Section 3 *** -CREATE TABLE test.t1 ( - usr_id INT unsigned NOT NULL, - uniq_id INT unsigned NOT NULL AUTO_INCREMENT, - start_num INT unsigned NOT NULL DEFAULT 1, - increment INT unsigned NOT NULL DEFAULT 1, - PRIMARY KEY (uniq_id), - INDEX usr_uniq_idx (usr_id, uniq_id), - INDEX uniq_usr_idx (uniq_id, usr_id)) -TABLESPACE table_space1 STORAGE DISK -ENGINE=NDB; - - -CREATE TABLE test.t2 ( - id INT unsigned NOT NULL DEFAULT 0, - usr2_id INT unsigned NOT NULL DEFAULT 0, - max INT unsigned NOT NULL DEFAULT 0, - c_amount INT unsigned NOT NULL DEFAULT 0, - d_max INT unsigned NOT NULL DEFAULT 0, - d_num INT unsigned NOT NULL DEFAULT 0, - orig_time INT unsigned NOT NULL DEFAULT 0, - c_time INT unsigned NOT NULL DEFAULT 0, - active ENUM ("no","yes") NOT NULL, - PRIMARY KEY (id,usr2_id), - INDEX id_idx (id), - INDEX usr2_idx (usr2_id)) -ENGINE=NDB; - -INSERT INTO test.t1 VALUES (3,NULL,0,50),(3,NULL,0,200),(3,NULL,0,25),(3,NULL,0,84676),(3,NULL,0,235),(3,NULL,0,10),(3,NULL,0,3098),(3,NULL,0,2947),(3,NULL,0,8987),(3,NULL,0,8347654),(3,NULL,0,20398),(3,NULL,0,8976),(3,NULL,0,500),(3,NULL,0,198); - ---echo -###################### Test Section 3 ###################### ---echo **** Test Section 3 **** -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; - -INSERT INTO test.t2 VALUES (2,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (4,3,3000,6000,0,0,746584,837484,'yes'); -INSERT INTO test.t2 VALUES (7,3,1000,2000,0,0,746294,937484,'yes'); - -SELECT test.t1.usr_id,test.t1.uniq_id,test.t1.increment, -test.t2.usr2_id,test.t2.c_amount,test.t2.max -FROM test.t1 -LEFT JOIN test.t2 ON test.t2.id = test.t1.uniq_id -WHERE test.t1.uniq_id = 4 -ORDER BY test.t2.c_amount; ---echo -####################### End Section 3 ######################### -DROP TABLE test.t1; -DROP TABLE test.t2; - -########## Test that use to be in ndb_dd_advance.test ######### -########## ndb_dd_advance.test is now ndb_dd_alter.test ####### -#### Use group by asc and dec; Use having; Use order by. #### - -CREATE TABLE test.t1 ( - a1 smallint NOT NULL, - a2 int NOT NULL, - a3 bigint NOT NULL, - a4 char(10), - a5 decimal(5,1), - a6 time, - a7 date, - a8 datetime, - a9 VARCHAR(255), - a10 blob, - PRIMARY KEY(a1) -) TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; - -CREATE TABLE test.t2 ( - b1 smallint NOT NULL, - b2 int NOT NULL, - b3 bigint NOT NULL, - b4 char(10), - b5 decimal(5,1), - b6 time, - b7 date, - b8 datetime, - b9 VARCHAR(255), - b10 blob, - PRIMARY KEY(b1) -) ENGINE=NDB; - -### ADD Some DATA to tables ###### - - -let $1=20; -disable_query_log; -while ($1) -{ - eval insert into test.t1 values($1, $1+1, $1+2000000000, "aaa$1", 34.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - eval insert into test.t2 values($1+2, $1+3, $1+3000000000, "aaa$1", 35.2, '4:3:2', '2006-1-1', '1971-5-28 16:55:03', "bbbbbbbbbbbbb$1", "binary data"); - dec $1; -} - -ALTER TABLE test.t1 ADD INDEX (a2), ADD INDEX (a3), ADD INDEX (a8); -ALTER TABLE test.t2 ADD INDEX (b2), ADD INDEX (b3), ADD INDEX (b8); -SHOW CREATE TABLE test.t1; -SHOW CREATE TABLE test.t2; -SELECT * FROM test.t1 order by a1; -SELECT * FROM test.t2 order by b1; -SELECT COUNT(a1), a1, COUNT(a1)*a1 FROM test.t1 GROUP BY a1; -SELECT COUNT(a2), (a2+1), COUNT(a2)*(a2+0) FROM test.t1 GROUP BY a2; - -DROP TABLE test.t1; -DROP TABLE test.t2; - -CREATE TABLE test.t1 (a INT NOT NULL, -b CHAR(5), c TEXT, d INT NOT NULL PRIMARY KEY) TABLESPACE -table_space1 STORAGE DISK ENGINE=NDB; - -insert into test.t1 (a,b,c,d) values (1,'a','Jonas',1),(2,'b','Tomas',2), -(3,'c','Pekka',3),(4,'d','Martin',4),(5,'e','Stewart',5),(6,'f','Jeb',6), -(7,'g','Serge',7),(8,'h','Clavin',8); -select distinct a from test.t1 group by b,a having a > 4 order by a desc; -select distinct a,c from test.t1 group by b,c,a having a > 2 order by a desc; -select distinct a from test.t1 group by b,a having a > 1 order by a asc; -select distinct a,c from test.t1 group by b,c,a having a > 3 order by a asc; -drop table test.t1; - -create table test.t1 (a char(1), key(a)) TABLESPACE table_space1 -STORAGE DISK ENGINE=NDB; -insert into test.t1 values('1'),('1'),('1'),('2'),('2'),('3'),('3'); -select * from test.t1 where a >= '1' order by a; -select distinct a from test.t1 order by a desc; -select distinct a from test.t1 where a >= '1' order by a desc; -select distinct a from test.t1 where a >= '1' order by a asc; -drop table test.t1; - -CREATE TABLE test.t1 (email varchar(50), infoID BIGINT, dateentered DATETIME) -TABLESPACE table_space1 STORAGE DISK ENGINE=NDB; -CREATE TABLE test.t2 (infoID BIGINT, shipcode varchar(10)) ENGINE=NDB; - -INSERT INTO test.t1 (email, infoID, dateentered) VALUES - ('test1@testdomain.com', 1, '2002-07-30 22:56:38'), - ('test1@testdomain.com', 1, '2002-07-27 22:58:16'), - ('test2@testdomain.com', 1, '2002-06-19 15:22:19'), - ('test2@testdomain.com', 2, '2002-06-18 14:23:47'), - ('test3@testdomain.com', 1, '2002-05-19 22:17:32'); - -INSERT INTO test.t2(infoID, shipcode) VALUES - (1, 'Z001'), - (2, 'R002'); - -SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2 -WHERE t1.infoID=t2.infoID order by email, shipcode; -SELECT DISTINCTROW email FROM test.t1 ORDER BY dateentered DESC; -SELECT DISTINCTROW email, shipcode FROM test.t1, test.t2 -WHERE test.t1.infoID=test.t2.infoID ORDER BY dateentered DESC; - -DROP TABLE test.t1,test.t2; - -################# -# Test Cleanup -################# - -ALTER TABLESPACE table_space1 -DROP DATAFILE './table_space1/datafile.dat' -ENGINE = NDB; - -DROP TABLESPACE table_space1 -ENGINE = NDB; - -DROP LOGFILE GROUP log_group1 -ENGINE =NDB; - -#End 5.1 test case - diff --git a/mysql-test/t/ndb_dd_dump.test b/mysql-test/t/ndb_dd_dump.test deleted file mode 100644 index 38ceafb7d80..00000000000 --- a/mysql-test/t/ndb_dd_dump.test +++ /dev/null @@ -1,288 +0,0 @@ --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; ---enable_warnings - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_01.dat' -INITIAL_SIZE 2M -UNDO_BUFFER_SIZE = 1M -ENGINE NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile_lg1_02.dat' -INITIAL_SIZE = 4M -ENGINE NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_01.dat' -USE LOGFILE GROUP lg1 -EXTENT_SIZE 1M -INITIAL_SIZE 2M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile_ts1_02.dat' -INITIAL_SIZE = 1M -ENGINE=NDB; - -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile_ts2_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 2M -ENGINE NDB; - -CREATE TABLESPACE ts3 -ADD DATAFILE 'datafile_ts3_01.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 4M -ENGINE NDB; - -######################################## -# Create a table using this tablespace -######################################## - -CREATE TABLE t1 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts1 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE t2 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts2 STORAGE DISK -ENGINE=NDB; - -CREATE TABLE t3 -(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL) -TABLESPACE ts3 STORAGE DISK -ENGINE=NDB; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -INSERT INTO t2 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5); - -INSERT INTO t3 VALUES -(1,1,1); - ---exec $MYSQL_DUMP --skip-comments --compact -Y test > $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; - -DROP LOGFILE GROUP lg1 ENGINE = NDB; - ---exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/ndb_dd_dump.sql - -SELECT DISTINCT - LOGFILE_GROUP_NAME, - FILE_NAME, - TOTAL_EXTENTS, - INITIAL_SIZE, - ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME; - -SELECT DISTINCT - TABLESPACE_NAME, - LOGFILE_GROUP_NAME, - FILE_NAME, - EXTENT_SIZE, - INITIAL_SIZE, - ENGINE -FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="DATAFILE" ORDER BY FILE_NAME; - -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -SELECT COUNT(*) FROM t3; - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -#### BUG 18856 test case comented out -##### Use "SELECT * INTO OUTFILE" to dump data and "LOAD DATA INFILE" to load ##### data back to the data file. - -#CREATE TABLE test.t ( -# a smallint NOT NULL, -# b int NOT NULL, -# c bigint NOT NULL, -# d char(10), -# e TEXT, -# f VARCHAR(255), -# PRIMARY KEY(a) -#) TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - -# ALTER TABLE test.t ADD INDEX (d), ADD INDEX (f); -# SHOW CREATE TABLE test.t; - -# insert records into tables - -# let $1=100; -# disable_query_log; -# while ($1) -# { -# eval insert into test.t values($1, $1+1, $1+2, "aaa$1", "bbb$1", "ccccc$1"); -# dec $1; -# } -# enable_query_log; - -# SELECT * FROM test.t order by a; - -# SELECT * INTO OUTFILE 't_backup' FROM test.t; -# TRUNCATE test.t; - -#'TRUNCATE test.t' failed: 1205: Lock wait timeout exceeded; try restarting #transaction. TABLESPACE ts STORAGE DISK ENGINE=NDB; - -# SELECT count(*) FROM test.t; -# LOAD DATA INFILE 't_backup' INTO TABLE test.t; - -# SELECT * FROM test.t order by a; - -# DROP TABLE test.t; - - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile_ts1_02.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile_ts2_01.dat' -ENGINE = NDB; - -ALTER TABLESPACE ts3 -DROP DATAFILE 'datafile_ts3_01.dat' -ENGINE = NDB; - -DROP TABLESPACE ts1 ENGINE = NDB; -DROP TABLESPACE ts2 ENGINE = NDB; -DROP TABLESPACE ts3 ENGINE = NDB; - -DROP LOGFILE GROUP lg1 ENGINE = NDB; - -#End 5.1 test case diff --git a/mysql-test/t/ndb_dd_sql_features.test b/mysql-test/t/ndb_dd_sql_features.test deleted file mode 100644 index f46cb217ab4..00000000000 --- a/mysql-test/t/ndb_dd_sql_features.test +++ /dev/null @@ -1,551 +0,0 @@ -############################################################## -# Author: Nikolay -# Date: 2006-04-01 -# Purpose: Specific Blob and Varchar testing using disk tables. -############################################################## -# Create Stored procedures that use disk based tables. -# Create function that operate on disk based tables. -# Create triggers that operate on disk based tables. -# Create views that operate on disk based tables. -# Try to create FK constraints on disk based tables. -# Create and use disk based table that use auto inc. -# Create test that use transaction (commit, rollback) -# Create large disk base table, do random queries, check cache hits, -# do same query 10 times check cache hits. -# Create test that uses COUNT(), SUM(), MAX(), MIN(), -# NOW(), USER(), ... other built in # SQL functions -# Create test that uses locks. -# Create test using truncate. -############################################################## -# Author: Jonathan -# Date: 2006-08-28 -# Change: Remove all the create and drop LFG and TS except -# The first create and the last drop to make test -# run faster. -# In addition, renamed test to be to a name that -# gives a better idea of what the test is about -########################################################### --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; ---enable_warnings - -#### Copy data from table in one table space to table in ### -#### different table space. #### ---echo ***** ---echo **** Copy data from table in one table space to table ---echo **** in different table space ---echo ***** - - CREATE LOGFILE GROUP lg - ADD UNDOFILE './lg_group/undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE = 1M - ENGINE=NDB; - - CREATE TABLESPACE ts1 - ADD DATAFILE './table_space1/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 25M - ENGINE NDB; - - CREATE TABLESPACE ts2 - ADD DATAFILE './table_space2/datafile.dat' - USE LOGFILE GROUP lg - INITIAL_SIZE 20M - ENGINE NDB; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - SHOW CREATE TABLE test.t1; - SHOW CREATE TABLE test.t2; - - INSERT INTO test.t1 VALUES (1,'111111','aaaaaaaa'); - INSERT INTO test.t1 VALUES (2,'222222','bbbbbbbb'); - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; - SELECT * FROM test.t2 ORDER BY a1; - - DROP TABLE test.t1, test.t2; - - # populate BLOB field with large data - -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); - -# x0 size 256 -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - CREATE TABLE test.t2 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - SHOW CREATE TABLE test.t1; - SHOW CREATE TABLE test.t2; - - INSERT INTO test.t1 VALUES (1,@vc1,@d1); - INSERT INTO test.t1 VALUES (2,@vc2,@b1); - INSERT INTO test.t1 VALUES (3,@vc3,@d2); - INSERT INTO test.t1 VALUES (4,@vc4,@b2); - - SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 WHERE a1=1; - SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) - FROM test.t1 where a1=2; - - INSERT INTO test.t2(a1,a2,a3) SELECT * FROM test.t1; - SELECT a1,length(a2),substr(a2,180,2),length(a3),substr(a3,1+3*900,3) - FROM test.t2 WHERE a1=1; - SELECT a1,length(a2),substr(a2,480,2),length(a3),substr(a3,1+2*900,3) - FROM test.t2 where a1=2; - - - DROP TABLE test.t1, test.t2; - -#### Insert, Update, Delete from NDB table with BLOB fields #### ---echo ***** ---echo **** Insert, Update, Delete from NDB table with BLOB fields ---echo ***** - -set @vc1 = repeat('a', 200); -set @vc2 = repeat('b', 500); -set @vc3 = repeat('c', 1000); -set @vc4 = repeat('d', 4000); -set @vc5 = repeat('d', 5000); - -set @bb1 = repeat('1', 2000); -set @bb2 = repeat('2', 5000); -set @bb3 = repeat('3', 10000); -set @bb4 = repeat('4', 40000); -set @bb5 = repeat('5', 50000); - -select length(@vc1),length(@vc2),length(@vc3),length(@vc4),length(@vc5) -from dual; -select length(@bb1),length(@bb2),length(@bb3),length(@bb4),length(@bb5) -from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(5000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; -# CREATE TABLE test.t2 (a1 int NOT NULL, a2 VARCHAR(5000), a3 BLOB) -# TABLESPACE ts2 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 VALUES (1,@vc1,@bb1); - INSERT INTO test.t1 VALUES (2,@vc2,@bb2); - INSERT INTO test.t1 VALUES (3,@vc3,@bb3); - INSERT INTO test.t1 VALUES (4,@vc4,@bb4); - INSERT INTO test.t1 VALUES (5,@vc5,@bb5); - - UPDATE test.t1 SET a2=@vc5, a3=@bb5 WHERE a1=1; - SELECT a1,length(a2),substr(a2,4998,2),length(a3),substr(a3,49997,3) - FROM test.t1 WHERE a1=1; - - UPDATE test.t1 SET a2=@vc4, a3=@bb4 WHERE a1=2; - SELECT a1,length(a2),substr(a2,3998,2),length(a3),substr(a3,39997,3) - FROM test.t1 WHERE a1=2; - - UPDATE test.t1 SET a2=@vc2, a3=@bb2 WHERE a1=3; - SELECT a1,length(a2),substr(a2,498,2),length(a3),substr(a3,3997,3) - FROM test.t1 WHERE a1=3; - - UPDATE test.t1 SET a2=@vc3, a3=@bb3 WHERE a1=4; - SELECT a1,length(a2),substr(a2,998,2),length(a3),substr(a3,9997,3) - FROM test.t1 WHERE a1=4; - - UPDATE test.t1 SET a2=@vc1, a3=@bb1 WHERE a1=5; - SELECT a1,length(a2),substr(a2,198,2),length(a3),substr(a3,1997,3) - FROM test.t1 WHERE a1=5; - - DELETE FROM test.t1 where a1=5; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=4; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=3; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=2; - SELECT count(*) from test.t1; - DELETE FROM test.t1 where a1=1; - SELECT count(*) from test.t1; - - DROP TABLE test.t1; - -##### Create Stored procedures that use disk based tables ##### ---echo ***** ---echo **** Create Stored procedures that use disk based tables ---echo ***** - -delimiter //; - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB// - CREATE PROCEDURE test.sp1() - BEGIN - INSERT INTO test.t1 values (1,'111111','aaaaaaaa'); - END// -delimiter ;// - - CALL test.sp1(); - SELECT * FROM test.t1; - -delimiter //; - CREATE PROCEDURE test.sp2(n INT, vc VARCHAR(256), blb BLOB) - BEGIN - UPDATE test.t1 SET a2=vc, a3=blb where a1=n; - END// -delimiter ;// - - CALL test.sp2(1,'222222','bbbbbbbb'); - SELECT * FROM test.t1; - - DELETE FROM test.t1; - DROP PROCEDURE test.sp1; - DROP PROCEDURE test.sp2; - DROP TABLE test.t1; - - -#### Create function that operate on disk based tables #### ---echo ***** ---echo ***** Create function that operate on disk based tables ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=100; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - - delimiter //; - CREATE FUNCTION test.fn1(n INT) RETURNS INT - BEGIN - DECLARE v INT; - SELECT a1 INTO v FROM test.t1 WHERE a1=n; - RETURN v; - END// - delimiter ;// - -delimiter //; - CREATE FUNCTION test.fn2(n INT, blb BLOB) RETURNS BLOB - BEGIN - DECLARE vv BLOB; - UPDATE test.t1 SET a3=blb where a1=n; - SELECT a3 INTO vv FROM test.t1 WHERE a1=n; - RETURN vv; - END// - delimiter ;// - - SELECT test.fn1(10) FROM DUAL; - SELECT test.fn2(50, 'new BLOB content') FROM DUAL; - - DELETE FROM test.t1; - DROP FUNCTION test.fn1; - DROP FUNCTION test.fn2; - DROP TABLE test.t1; - -#### Create triggers that operate on disk based tables #### ---echo ***** ---echo ***** Create triggers that operate on disk based tables ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - delimiter //; - CREATE TRIGGER test.trg1 BEFORE INSERT ON test.t1 FOR EACH ROW - BEGIN - if isnull(new.a2) then - set new.a2:= 'trg1 works on a2 field'; - end if; - if isnull(new.a3) then - set new.a3:= 'trg1 works on a3 field'; - end if; - end// - insert into test.t1 (a1) values (1)// - insert into test.t1 (a1,a2) values (2, 'ccccccc')// - select * from test.t1 order by a1// - delimiter ;// - - DELETE FROM test.t1; - DROP TRIGGER test.trg1; - DROP TABLE test.t1; - -#### Create, update views that operate on disk based tables #### ---echo ***** ---echo ***** Create, update views that operate on disk based tables ---echo ***** - - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=10; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - CREATE VIEW test.v1 AS SELECT * FROM test.t1; - SELECT * FROM test.v1 order by a1; - CHECK TABLE test.v1, test.t1; - - UPDATE test.v1 SET a2='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' WHERE a1=5; - SELECT * FROM test.v1 order by a1; - - DROP VIEW test.v1; - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create and use disk based table that use auto inc #### ---echo ***** ---echo ***** Create and use disk based table that use auto inc ---echo ***** - - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=10; - disable_query_log; - while ($1) - { - eval insert into test.t1 values(NULL, "aaaaa$1", "bbbbb$1"); - dec $1; - } - enable_query_log; - SELECT * FROM test.t1 ORDER BY a1; - DELETE FROM test.t1; - DROP TABLE test.t1; - - -#### Create test that use transaction (commit, rollback) #### ---echo ***** ---echo ***** Create test that use transaction (commit, rollback) ---echo ***** - - SET AUTOCOMMIT=0; - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - COMMIT; - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - ROLLBACK; - SELECT * FROM test.t1 ORDER BY a1; - - DELETE FROM test.t1; - DROP TABLE test.t1; - SET AUTOCOMMIT=1; - -# Now do the same thing with START TRANSACTION without using AUTOCOMMIT. - - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - START TRANSACTION; - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - COMMIT; - SELECT * FROM test.t1 ORDER BY a1; - - START TRANSACTION; - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - ROLLBACK; - SELECT * FROM test.t1 ORDER BY a1; - - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create test that uses locks #### ---echo ***** ---echo ***** Create test that uses locks ---echo ***** - - connect (con1,localhost,root,,); - connect (con2,localhost,root,,); - -# connection con1; ---disable_warnings - drop table if exists test.t1; - CREATE TABLE test.t1 (a1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a2 VARCHAR(256), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; ---enable_warnings - - LOCK TABLES test.t1 write; - INSERT INTO test.t1 VALUES(NULL, "aaaaa1", "bbbbb1"); - INSERT INTO test.t1 VALUES(NULL, "aaaaa2", "bbbbb2"); - SELECT * FROM test.t1 ORDER BY a1; - - connection con2; - SELECT * FROM test.t1 ORDER BY a1; - INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); - - connection con1; - UNLOCK TABLES; - - connection con2; - INSERT INTO test.t1 VALUES(NULL, "aaaaa3", "bbbbb3"); - SELECT * FROM test.t1 ORDER BY a1; - DELETE FROM test.t1; - DROP TABLE test.t1; - - #connection defualt; - -#### Create large disk base table, do random queries, check cache hits #### ---echo ***** ---echo ***** Create large disk base table, do random queries, check cache hits ---echo ***** - -set @vc1 = repeat('a', 200); -SELECT @vc1 FROM DUAL; -set @vc2 = repeat('b', 500); -set @vc3 = repeat('b', 998); - -# x0 size 256 -set @x0 = '01234567012345670123456701234567'; -set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0); - -# b1 length 2000+256 (blob part aligned) -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -set @b1 = concat(@b1,@x0); -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -# b2 length 20000 -set @b2 = 'b2'; -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2); -# d2 length 30000 -set @d2 = 'dd2'; -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); -set @d2 = concat(@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2,@d2); - -select length(@x0),length(@b1),length(@d1) from dual; -select length(@x0),length(@b2),length(@d2) from dual; - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(1000), a3 BLOB) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - - INSERT INTO test.t1 values(1,@vc1,@d1); - INSERT INTO test.t1 values(2,@vc2,@d2); - --replace_column 9 # - explain SELECT * from test.t1 WHERE a1 = 1; - - SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 WHERE a1=1 ORDER BY a1; - SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) - FROM test.t1 where a1=2 ORDER BY a1; - - UPDATE test.t1 set a2=@vc2,a3=@d2 where a1=1; - UPDATE test.t1 set a2=@vc1,a3=@d1 where a1=2; - - SELECT a1,length(a2),substr(a2,1+2*9000,2),length(a3),substr(a3,1+3*9000,3) - FROM test.t1 where a1=1; - SELECT a1,length(a2),substr(a2,1+2*900,2),length(a3),substr(a3,1+3*900,3) - FROM test.t1 where a1=2; - - #SHOW VARIABLES LIKE 'have_query_cache'; - #SHOW STATUS LIKE 'Qcache%'; - - DELETE FROM test.t1; - DROP TABLE test.t1; - -#### Create test that uses COUNT(), SUM(), MAX(), #### -##### MIN(), NOW(), USER(), TRUNCATE #### ---echo ***** ---echo ***** Create test that uses COUNT(), SUM(), MAX(), MIN(), NOW(), ---echo ***** USER(), TRUNCATE ---echo ***** - - CREATE TABLE test.t1 (a1 int NOT NULL PRIMARY KEY, a2 VARCHAR(256), - a3 BLOB, a4 DATE, a5 CHAR(250)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB; - let $1=100; - disable_query_log; - while ($1) - { - eval insert into test.t1 values($1, "aaaaaaaaaaaaaaaa$1", - "bbbbbbbbbbbbbbbbbb$1", '2006-06-20' , USER()); - dec $1; - } - enable_query_log; - - SELECT COUNT(*) from test.t1; - SELECT SUM(a1) from test.t1; - SELECT MIN(a1) from test.t1; - SELECT MAX(a1) from test.t1; - SELECT a5 from test.t1 where a1=50; - - - SELECT * from test.t1 order by a1; - - DROP TABLE test.t1; - - ALTER TABLESPACE ts1 - DROP DATAFILE './table_space1/datafile.dat' - ENGINE=NDB; - DROP TABLESPACE ts1 ENGINE=NDB; - - ALTER TABLESPACE ts2 - DROP DATAFILE './table_space2/datafile.dat' - ENGINE=NDB; - DROP TABLESPACE ts2 ENGINE=NDB; - - DROP LOGFILE GROUP lg - ENGINE=NDB; - - -#End 5.1 test case - diff --git a/mysql-test/t/ndb_gis.test b/mysql-test/t/ndb_gis.test deleted file mode 100644 index e14f462c32d..00000000000 --- a/mysql-test/t/ndb_gis.test +++ /dev/null @@ -1,5 +0,0 @@ ---source include/have_ndb.inc -SET storage_engine=ndbcluster; ---source include/gis_generic.inc -set engine_condition_pushdown = on; ---source include/gis_generic.inc diff --git a/mysql-test/t/ndb_grant.later b/mysql-test/t/ndb_grant.later deleted file mode 100644 index 5431d94e1f8..00000000000 --- a/mysql-test/t/ndb_grant.later +++ /dev/null @@ -1,385 +0,0 @@ --- source include/have_ndb.inc -# Test of GRANT commands - -# Cleanup ---disable_warnings -drop table if exists t1; ---enable_warnings - -SET NAMES binary; - -# -# Alter mysql system tables to ndb -# make sure you alter all back in the end -# -use mysql; -alter table columns_priv engine=ndb; -alter table db engine=ndb; -alter table func engine=ndb; -alter table help_category engine=ndb; -alter table help_keyword engine=ndb; -alter table help_relation engine=ndb; -alter table help_topic engine=ndb; -alter table host engine=ndb; -alter table tables_priv engine=ndb; -alter table time_zone engine=ndb; -alter table time_zone_leap_second engine=ndb; -alter table time_zone_name engine=ndb; -alter table time_zone_transition engine=ndb; -alter table time_zone_transition_type engine=ndb; -alter table user engine=ndb; -use test; - -# -# Test that SSL options works properly -# -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -flush privileges; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; -commit; -show grants for mysqltest_1@localhost; -begin; -grant delete on mysqltest.* to mysqltest_1@localhost; -commit; -select * from mysql.user where user="mysqltest_1"; -show grants for mysqltest_1@localhost; -begin; -revoke delete on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -grant select on mysqltest.* to mysqltest_1@localhost require NONE; -commit; -show grants for mysqltest_1@localhost; -begin; -grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "MySQL AB"; -commit; -show grants for mysqltest_1@localhost; -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; -flush privileges; - -# -# Test that the new db privileges are stored/retrieved correctly -# - -begin; -grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -flush privileges; -show grants for mysqltest_1@localhost; -begin; -revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; -commit; -flush privileges; -show grants for mysqltest_1@localhost; -begin; -revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -revoke all privileges on mysqltest.* from mysqltest_1@localhost; -commit; -delete from mysql.user where user='mysqltest_1'; -flush privileges; -begin; -grant usage on test.* to mysqltest_1@localhost with grant option; -commit; -show grants for mysqltest_1@localhost; -delete from mysql.user where user='mysqltest_1'; -delete from mysql.db where user='mysqltest_1'; -delete from mysql.tables_priv where user='mysqltest_1'; -delete from mysql.columns_priv where user='mysqltest_1'; -flush privileges; ---error 1141 -show grants for mysqltest_1@localhost; - -# -# Test what happens when you have same table and colum level grants -# - -create table t1 (a int); -begin; -GRANT select,update,insert on t1 to mysqltest_1@localhost; -GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -begin; -REVOKE select (a), update on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -begin; -GRANT select,references on t1 to mysqltest_1@localhost; -commit; -select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; -begin; -grant all on test.* to mysqltest_3@localhost with grant option; -revoke all on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -begin; -revoke grant option on test.* from mysqltest_3@localhost; -commit; -show grants for mysqltest_3@localhost; -begin; -grant all on test.t1 to mysqltest_2@localhost with grant option; -revoke all on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -begin; -revoke grant option on test.t1 from mysqltest_2@localhost; -commit; -show grants for mysqltest_2@localhost; -delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; -flush privileges; -drop table t1; - -# -# Test some error conditions -# -begin; ---error 1221 -GRANT FILE on mysqltest.* to mysqltest_1@localhost; -commit; -select 1; -- To test that the previous command didn't cause problems - -# -# Bug#6123: GRANT USAGE inserts useless Db row -# -create database mysqltest1; -begin; -grant usage on mysqltest1.* to test6123 identified by 'magic123'; -commit; -select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; -delete from mysql.user where user='test6123'; -drop database mysqltest1; - -# -# Test for 'drop user', 'revoke privileges, grant' -# - -create table t1 (a int); -begin; -grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; -commit; -show grants for drop_user2@localhost; -begin; -revoke all privileges, grant option from drop_user2@localhost; -commit; -drop user drop_user2@localhost; - -begin; -grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION; -grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION; -grant select(a) on test.t1 to drop_user@localhost; -commit; -show grants for drop_user@localhost; - -# -# Bug3086 -# -set sql_mode=ansi_quotes; -show grants for drop_user@localhost; -set sql_mode=default; - -set sql_quote_show_create=0; -show grants for drop_user@localhost; -set sql_mode="ansi_quotes"; -show grants for drop_user@localhost; -set sql_quote_show_create=1; -show grants for drop_user@localhost; -set sql_mode=""; -show grants for drop_user@localhost; - -revoke all privileges, grant option from drop_user@localhost; -show grants for drop_user@localhost; -drop user drop_user@localhost; -begin; ---error 1269 -revoke all privileges, grant option from drop_user@localhost; -commit; - -begin; -grant select(a) on test.t1 to drop_user1@localhost; -commit; -flush privileges; -begin; -grant select on test.t1 to drop_user2@localhost; -grant select on test.* to drop_user3@localhost; -grant select on *.* to drop_user4@localhost; -commit; -flush privileges; -# Drop user now implicitly revokes all privileges. -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -begin; ---error 1269 -revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, -drop_user3@localhost, drop_user4@localhost; -commit; -flush privileges; -#--error 1268 -drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, -drop_user4@localhost; -drop table t1; -begin; -grant usage on *.* to mysqltest_1@localhost identified by "password"; -grant select, update, insert on test.* to mysqltest_1@localhost; -commit; -show grants for mysqltest_1@localhost; -drop user mysqltest_1@localhost; - -# -# Bug #3403 Wrong encodin in SHOW GRANTS output -# -SET NAMES koi8r; -CREATE DATABASE ÂÄ; -USE ÂÄ; -CREATE TABLE ÔÁ (ËÏÌ int); - -begin; -GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost; -commit; - -begin; -GRANT SELECT ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; - -begin; -GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁ TO ÀÚÅÒ@localhost; -commit; -SHOW GRANTS FOR ÀÚÅÒ@localhost; -begin; -REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; -commit; - -DROP DATABASE ÂÄ; -SET NAMES latin1; - -# -# Bug #5831: REVOKE ALL PRIVILEGES, GRANT OPTION does not revoke everything -# -USE test; -CREATE TABLE t1 (a int ); -CREATE TABLE t2 LIKE t1; -CREATE TABLE t3 LIKE t1; -CREATE TABLE t4 LIKE t1; -CREATE TABLE t5 LIKE t1; -CREATE TABLE t6 LIKE t1; -CREATE TABLE t7 LIKE t1; -CREATE TABLE t8 LIKE t1; -CREATE TABLE t9 LIKE t1; -CREATE TABLE t10 LIKE t1; -CREATE DATABASE testdb1; -CREATE DATABASE testdb2; -CREATE DATABASE testdb3; -CREATE DATABASE testdb4; -CREATE DATABASE testdb5; -CREATE DATABASE testdb6; -CREATE DATABASE testdb7; -CREATE DATABASE testdb8; -CREATE DATABASE testdb9; -CREATE DATABASE testdb10; -begin; -GRANT ALL ON testdb1.* TO testuser@localhost; -GRANT ALL ON testdb2.* TO testuser@localhost; -GRANT ALL ON testdb3.* TO testuser@localhost; -GRANT ALL ON testdb4.* TO testuser@localhost; -GRANT ALL ON testdb5.* TO testuser@localhost; -GRANT ALL ON testdb6.* TO testuser@localhost; -GRANT ALL ON testdb7.* TO testuser@localhost; -GRANT ALL ON testdb8.* TO testuser@localhost; -GRANT ALL ON testdb9.* TO testuser@localhost; -GRANT ALL ON testdb10.* TO testuser@localhost; -GRANT SELECT ON test.t1 TO testuser@localhost; -GRANT SELECT ON test.t2 TO testuser@localhost; -GRANT SELECT ON test.t3 TO testuser@localhost; -GRANT SELECT ON test.t4 TO testuser@localhost; -GRANT SELECT ON test.t5 TO testuser@localhost; -GRANT SELECT ON test.t6 TO testuser@localhost; -GRANT SELECT ON test.t7 TO testuser@localhost; -GRANT SELECT ON test.t8 TO testuser@localhost; -GRANT SELECT ON test.t9 TO testuser@localhost; -GRANT SELECT ON test.t10 TO testuser@localhost; -GRANT SELECT (a) ON test.t1 TO testuser@localhost; -GRANT SELECT (a) ON test.t2 TO testuser@localhost; -GRANT SELECT (a) ON test.t3 TO testuser@localhost; -GRANT SELECT (a) ON test.t4 TO testuser@localhost; -GRANT SELECT (a) ON test.t5 TO testuser@localhost; -GRANT SELECT (a) ON test.t6 TO testuser@localhost; -GRANT SELECT (a) ON test.t7 TO testuser@localhost; -GRANT SELECT (a) ON test.t8 TO testuser@localhost; -GRANT SELECT (a) ON test.t9 TO testuser@localhost; -GRANT SELECT (a) ON test.t10 TO testuser@localhost; -commit; -begin; -REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost; -commit; -SHOW GRANTS FOR testuser@localhost; -DROP USER testuser@localhost; -DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -DROP DATABASE testdb1; -DROP DATABASE testdb2; -DROP DATABASE testdb3; -DROP DATABASE testdb4; -DROP DATABASE testdb5; -DROP DATABASE testdb6; -DROP DATABASE testdb7; -DROP DATABASE testdb8; -DROP DATABASE testdb9; -DROP DATABASE testdb10; - -# -# just SHOW PRIVILEGES test -# -SHOW PRIVILEGES; - -# -# Alter mysql system tables back to myisam -# -use mysql; -alter table columns_priv engine=myisam; -alter table db engine=myisam; -alter table func engine=myisam; -alter table help_category engine=myisam; -alter table help_keyword engine=myisam; -alter table help_relation engine=myisam; -alter table help_topic engine=myisam; -alter table host engine=myisam; -alter table tables_priv engine=myisam; -alter table time_zone engine=myisam; -alter table time_zone_leap_second engine=myisam; -alter table time_zone_name engine=myisam; -alter table time_zone_transition engine=myisam; -alter table time_zone_transition_type engine=myisam; -alter table user engine=myisam; -use test; -flush privileges; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_index.test b/mysql-test/t/ndb_index.test deleted file mode 100644 index 272f30e3e6f..00000000000 --- a/mysql-test/t/ndb_index.test +++ /dev/null @@ -1,131 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -CREATE TABLE t1 ( - PORT varchar(16) NOT NULL, - ACCESSNODE varchar(16) NOT NULL, - POP varchar(48) NOT NULL, - ACCESSTYPE int unsigned NOT NULL, - CUSTOMER_ID varchar(20) collate latin1_bin NOT NULL, - PROVIDER varchar(16), - TEXPIRE int unsigned, - NUM_IP int unsigned, - LEASED_NUM_IP int unsigned, - LOCKED_IP int unsigned, - STATIC_DNS int unsigned, - SUSPENDED_SERVICE int unsigned, - SUSPENDED_REASON int unsigned, - BGP_COMMUNITY int unsigned, - INDEX CUSTOMER_ID_INDEX(CUSTOMER_ID), - INDEX FQPN_INDEX(POP,ACCESSNODE,PORT), - PRIMARY KEY(POP,ACCESSNODE,PORT,ACCESSTYPE) -) engine=ndbcluster; - -INSERT INTO t1 VALUES ('port67', 'node78', 'pop98', 1, 'kllopmn', 'pr_43', 121212, 1, 2, 3, 8, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port67', 'node78', 'pop99', 2, 'klkighh', 'pr_44', 121213, 3, 3, 6, 7, NULL, NULL, NULL); -INSERT INTO t1 VALUES ('port79', 'node79', 'pop79', 2, 'kpongfaa', 'pr_44', 981213, 2, 4, 10, 11, 2, 99, 1278); - - -# Test select using port -select port, accessnode, pop, accesstype from t1 where port='port67' order by accesstype; -select port, accessnode, pop, accesstype from t1 where port='foo'; - -# Test select using accessnode -select port, accessnode, pop, accesstype from t1 where accessnode='node78' order by accesstype; -select port, accessnode, pop, accesstype from t1 where accessnode='foo'; - -# Test select using pop -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' order by accesstype; -# The following two querys will not return any rows since -# the index used for access is case sensitive -# They are thus disabled for now -#select port, accessnode, pop, accesstype from t1 where pop='POP98'; -#select port, accessnode, pop, accesstype from t1 where pop='POP98' order by accesstype; -select port, accessnode, pop, accesstype from t1 where pop='foo'; - -# Test select using accesstype -select port, accessnode, pop, accesstype from t1 where accesstype=1; -select port, accessnode, pop, accesstype from t1 where accesstype=2 order by port; -select port, accessnode, pop, accesstype from t1 where accesstype=98 order by port; - -# Test select using customer_id -# NOTE! customer_id has a INDEX (ordered index in NDB), it's case sensitive! -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where customer_id='KLLOPMN'; -select port, accessnode, pop, accesstype from t1 where customer_id='kLLoPMn'; -select port, accessnode, pop, accesstype from t1 where customer_id='foo'; - -# Test select using provider -select port, accessnode, pop, accesstype from t1 where provider='pr_43'; -select port, accessnode, pop, accesstype from t1 where provider='foo'; - -# Test select using texpire -select port, accessnode from t1 where texpire=121212; -select port, accessnode from t1 where texpire=2323; - -# Test select using num_ip -select port, accessnode, pop, accesstype from t1 where num_ip=1; -select port, accessnode, pop, accesstype from t1 where num_ip=89; - -# Test select using leased_num_ip -select port, accessnode, pop, accesstype from t1 where leased_num_ip=2; -select port, accessnode, pop, accesstype from t1 where leased_num_ip=89; - -# Test select using locked_ip -select port, accessnode, pop, accesstype from t1 where locked_ip=3; -select port, accessnode, pop, accesstype from t1 where locked_ip=89; - -# Test select using static_dns -select port, accessnode, pop, accesstype from t1 where static_dns=8; -select port, accessnode, pop, accesstype from t1 where static_dns=89; - -# Test select using suspended_service -select port, accessnode, pop, accesstype from t1 where suspended_service=8; -select port, accessnode, pop, accesstype from t1 where suspended_service=89; - -# Test select using suspended_reason -select port, accessnode, pop, accesstype from t1 where suspended_reason=NULL; -select port, accessnode, pop, accesstype from t1 where suspended_reason=89; -select port, accessnode, pop, accesstype from t1 where suspended_reason=0; - -# Test select using bgp_community -select port, accessnode, pop, accesstype from t1 where bgp_community=NULL; -select port, accessnode, pop, accesstype from t1 where bgp_community=89; -select port, accessnode, pop, accesstype from t1 where bgp_community=0; - -# Test select using full primary key -select port, accessnode, pop, accesstype from t1 where port='port67' and accessnode='node78' and pop='pop98' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78' and pop='pop98'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and port='port67' and accesstype=1 and accessnode='node78'; -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo' and accesstype=99; - -# Test select using partial primary key -select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where accesstype=1 and accessnode='node78' and pop='pop98'; -select port, accessnode, pop, accesstype from t1 where port='port67' and accesstype=1 and accessnode='node78'; -select port, accessnode from t1 where port='foo' and accessnode='foo' and pop='foo'; - -# Test select using CUSTOMER_ID_INDEX -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=1; -select port, accessnode, pop, accesstype from t1 where customer_id='kllopmn' and accesstype=2; -select port, accessnode, pop, accesstype from t1 where accesstype=2 and customer_id='kllopmn'; - -# Test select using FQPN_INDEX -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67'; -#select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' order by accesstype; -#select port, accessnode, pop, accesstype from t1 where accessnode='node78' and port='port67' and pop='pop98' order by accesstype; -#select port, accessnode, pop, accesstype from t1 where port='port67' and pop='pop98' and accessnode='node78' order by accesstype; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='kllopmn'; -select port, accessnode, pop, accesstype from t1 where pop='pop98' and accessnode='node78' and port='port67' and customer_id='foo'; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test deleted file mode 100644 index 782f17ca5b2..00000000000 --- a/mysql-test/t/ndb_index_ordered.test +++ /dev/null @@ -1,480 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, test1, test2; ---enable_warnings - -# -# Simple test to show use of ordered indexes -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - KEY(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 3), (2,3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -select * from t1 where b >= 4 order by b; -select * from t1 where b = 4 order by b; -select * from t1 where b > 4 order by b; -select * from t1 where b < 4 order by b; -select * from t1 where b <= 4 order by b; - -# Test of reset_bounds -select tt1.* from t1 as tt1, t1 as tt2 use index(b) where tt1.b = tt2.b order by tt1.b; -select a, b, c from t1 where a!=2 and c=6; -select a, b, c from t1 where a!=2 order by a; - -# -# Here we should add some "explain select" to verify that the ordered index is -# used for these queries. -# - -# -# Update using ordered index scan -# - -update t1 set c = 3 where b = 3; -select * from t1 order by a; -update t1 set c = 10 where b >= 6; -select * from t1 order by a; -update t1 set c = 11 where b < 5; -select * from t1 order by a; -update t1 set c = 12 where b > 0; -select * from t1 order by a; -update t1 set c = 13 where b <= 3; -select * from t1 order by a; -update t1 set b = b + 1 where b > 4 and b < 7; -select * from t1 order by a; -# Update primary key -update t1 set a = a + 10 where b > 1 and b < 7; -select * from t1 order by a; - -# -# Delete using ordered index scan -# - -drop table t1; - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - KEY(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 13), (2,3, 13), (3, 4, 12), (4, 5, 12), (5,6, 12), (6,7, 12); - -delete from t1 where b = 3; -select * from t1 order by a; -delete from t1 where b >= 6; -select * from t1 order by a; -delete from t1 where b < 4; -select * from t1 order by a; -delete from t1 where b > 5; -select * from t1 order by a; -delete from t1 where b <= 4; -select * from t1 order by a; - -drop table t1; - - -# -#multi part key -# -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned not null -) engine = ndb; - -create index a1 on t1 (b, c); - -insert into t1 values (1, 2, 13); -insert into t1 values (2,3, 13); -insert into t1 values (3, 4, 12); -insert into t1 values (4, 5, 12); -insert into t1 values (5,6, 12); -insert into t1 values (6,7, 12); -insert into t1 values (7, 2, 1); -insert into t1 values (8,3, 6); -insert into t1 values (9, 4, 12); -insert into t1 values (14, 5, 4); -insert into t1 values (15,5,5); -insert into t1 values (16,5, 6); -insert into t1 values (17,4,4); -insert into t1 values (18,1, 7); - - - -select * from t1 order by a; -select * from t1 where b<=5 order by a; -select * from t1 where b<=5 and c=0; -insert into t1 values (19,4, 0); -select * from t1 where b<=5 and c=0; -select * from t1 where b=4 and c<=5 order by a; -select * from t1 where b<=4 and c<=5 order by a; -select * from t1 where b<=5 and c=0 or b<=5 and c=2; - -select count(*) from t1 where b = 0; -select count(*) from t1 where b = 1; -drop table t1; - -# -# Indexing NULL values -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - KEY bc(b,c) -) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; - -select * from t1 use index (bc)order by a; -select * from t1 use index (bc) order by a; -select * from t1 use index (PRIMARY) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -select * from t1 use index (bc) where b < 4 order by a; -select * from t1 use index (bc) where b IS NOT NULL order by a; -drop table t1; - -# -# Order by again, including descending. -# - -create table t1 ( - a int unsigned primary key, - b int unsigned, - c char(10), - key bc (b, c) -) engine=ndb; - -insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); -insert into t1 select a*7,10*b,'f' from t1; -insert into t1 select a*13,10*b,'g' from t1; -insert into t1 select a*17,10*b,'h' from t1; -insert into t1 select a*19,10*b,'i' from t1; -insert into t1 select a*23,10*b,'j' from t1; -insert into t1 select a*29,10*b,'k' from t1; -# -select b, c from t1 where b <= 10 and c <'f' order by b, c; -select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; -# -select b, c from t1 where b=4000 and c<'k' order by b, c; -select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; -select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; -# -select min(b), max(b) from t1; -# -drop table t1; - -# -# Bug #6435 -CREATE TABLE test1 ( -SubscrID int(11) NOT NULL auto_increment, -UsrID int(11) NOT NULL default '0', -PRIMARY KEY (SubscrID), -KEY idx_usrid (UsrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO test1 VALUES (2,224),(3,224),(1,224); - -CREATE TABLE test2 ( -SbclID int(11) NOT NULL auto_increment, -SbcrID int(11) NOT NULL default '0', -PRIMARY KEY (SbclID), -KEY idx_sbcrid (SbcrID) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2); -select * from test1 order by 1; -select * from test2 order by 1; -SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON -l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2; -drop table test1; -drop table test2; - -# bug#7424 + bug#7725 - -create table t1 ( - pk int primary key, - dt datetime not null, - da date not null, - ye year not null, - ti time not null, - ts timestamp not null, - index(dt), - index(da), - index(ye), - index(ti), - index(ts) -) engine=ndb; - -insert into t1 (pk,dt,da,ye,ti,ts) values - (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'), - (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'), - (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'), - (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'), - (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'), - (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'), - (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'), - (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'), - (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59'); - -# datetime -select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; -select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; -select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; -select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; -select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; -select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; -select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; - -# date -select count(*)-9 from t1 use index (da) where da > '1900-01-01'; -select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; -select count(*)-5 from t1 use index (da) where da > '1955-12-31'; -select count(*)-5 from t1 use index (da) where da < '1970-03-03'; -select count(*)-6 from t1 use index (da) where da < '2001-01-01'; -select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; -select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; - -# year -select count(*)-9 from t1 use index (ye) where ye > '1900'; -select count(*)-6 from t1 use index (ye) where ye >= '1955'; -select count(*)-5 from t1 use index (ye) where ye > '1955'; -select count(*)-5 from t1 use index (ye) where ye < '1970'; -select count(*)-6 from t1 use index (ye) where ye < '2001'; -select count(*)-8 from t1 use index (ye) where ye <= '2001'; -select count(*)-9 from t1 use index (ye) where ye <= '2055'; - -# time -select count(*)-9 from t1 use index (ti) where ti >= '00:00:00'; -select count(*)-7 from t1 use index (ti) where ti > '00:00:00'; -select count(*)-7 from t1 use index (ti) where ti > '05:05:05'; -select count(*)-5 from t1 use index (ti) where ti > '06:06:06'; -select count(*)-5 from t1 use index (ti) where ti < '10:11:11'; -select count(*)-6 from t1 use index (ti) where ti <= '10:11:11'; -select count(*)-8 from t1 use index (ti) where ti < '23:59:59'; -select count(*)-9 from t1 use index (ti) where ti <= '23:59:59'; - -# timestamp -select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00'; -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00'; -select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05'; -select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06'; -select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11'; -select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11'; -select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59'; -select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59'; - -drop table t1; - -# decimal (not the new 5.0 thing) - -create table t1 ( - a int primary key, - s decimal(12), - t decimal(12, 5), - u decimal(12) unsigned, - v decimal(12, 5) unsigned, - key (s), - key (t), - key (u), - key (v) -) engine=ndb; -# -insert into t1 values - ( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042), - ( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003), - ( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488), - ( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013), - ( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002), - ( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018), - ( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001), - ( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374), - ( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000), - ( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008); -# -select count(*)- 5 from t1 use index (s) where s < -000000000007; -select count(*)- 7 from t1 use index (s) where s <= -000000000007; -select count(*)- 2 from t1 use index (s) where s = -000000000007; -select count(*)- 5 from t1 use index (s) where s >= -000000000007; -select count(*)- 3 from t1 use index (s) where s > -000000000007; -# -select count(*)- 4 from t1 use index (t) where t < -0000061.00003; -select count(*)- 5 from t1 use index (t) where t <= -0000061.00003; -select count(*)- 1 from t1 use index (t) where t = -0000061.00003; -select count(*)- 6 from t1 use index (t) where t >= -0000061.00003; -select count(*)- 5 from t1 use index (t) where t > -0000061.00003; -# -select count(*)- 2 from t1 use index (u) where u < 000000000061; -select count(*)- 4 from t1 use index (u) where u <= 000000000061; -select count(*)- 2 from t1 use index (u) where u = 000000000061; -select count(*)- 8 from t1 use index (u) where u >= 000000000061; -select count(*)- 6 from t1 use index (u) where u > 000000000061; -# -select count(*)- 5 from t1 use index (v) where v < 0000965.00042; -select count(*)- 6 from t1 use index (v) where v <= 0000965.00042; -select count(*)- 1 from t1 use index (v) where v = 0000965.00042; -select count(*)- 5 from t1 use index (v) where v >= 0000965.00042; -select count(*)- 4 from t1 use index (v) where v > 0000965.00042; - -drop table t1; - -# bug#7798 -create table t1(a int primary key, b int not null, index(b)); -insert into t1 values (1,1), (2,2); -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connection con1; -set autocommit=0; -begin; -select count(*) from t1; -connection con2; -ALTER TABLE t1 ADD COLUMN c int; -connection con1; -select a from t1 where b = 2; -show tables; -drop table t1; - -# mysqld 5.0.13 crash, no bug# -create table t1 (a int, c varchar(10), - primary key using hash (a), index(c)) engine=ndb; -insert into t1 (a, c) values (1,'aaa'),(3,'bbb'); -select count(*) from t1 where c<'bbb'; -drop table t1; - -# -- index statistics -- - -set autocommit=1; -show session variables like 'ndb_index_stat_%'; - -set ndb_index_stat_enable = off; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 0; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = on; -set ndb_index_stat_cache_entries = 4; -set ndb_index_stat_update_freq = 2; -show session variables like 'ndb_index_stat_%'; - -create table t1 (a int, b int, c varchar(10) not null, - primary key using hash (a), index(b,c)) engine=ndb; -insert into t1 values - (1,10,'aaa'),(2,10,'bbb'),(3,10,'ccc'), - (4,20,'aaa'),(5,20,'bbb'),(6,20,'ccc'), - (7,30,'aaa'),(8,30,'bbb'),(9,30,'ccc'); -select count(*) from t1 where b < 10; -select count(*) from t1 where b >= 10 and c >= 'bbb'; -select count(*) from t1 where b > 10; -select count(*) from t1 where b <= 20 and c < 'ccc'; -select count(*) from t1 where b = 20 and c = 'ccc'; -select count(*) from t1 where b > 20; -select count(*) from t1 where b = 30 and c > 'aaa'; -select count(*) from t1 where b <= 20; -select count(*) from t1 where b >= 20 and c > 'aaa'; -drop table t1; - -set ndb_index_stat_enable = @@global.ndb_index_stat_enable; -set ndb_index_stat_cache_entries = @@global.ndb_index_stat_cache_entries; -set ndb_index_stat_update_freq = @@global.ndb_index_stat_update_freq; -show session variables like 'ndb_index_stat_%'; - -# End of 4.1 tests - -# bug#24039 - -create table t1 (a int primary key) engine = ndb; -insert into t1 values (1), (2), (3); -begin; -delete from t1 where a > 1; -rollback; -select * from t1 order by a; -begin; -delete from t1 where a > 1; -rollback; - -begin; -select * from t1 order by a; -delete from t1 where a > 2; -select * from t1 order by a; -delete from t1 where a > 1; -select * from t1 order by a; -delete from t1 where a > 0; -select * from t1 order by a; -rollback; -select * from t1 order by a; -delete from t1; -drop table t1; - -# bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index - ---error ER_CANT_CREATE_TABLE -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, - CountryCode char(3) NOT NULL, - DishTitle varchar(64) NOT NULL, - calories smallint(5) unsigned DEFAULT NULL, - PRIMARY KEY (DishID), - INDEX i USING HASH (countrycode,calories) - ) ENGINE=ndbcluster; - -create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT, - CountryCode char(3) NOT NULL, - DishTitle varchar(64) NOT NULL, - calories smallint(5) unsigned DEFAULT NULL, - PRIMARY KEY (DishID) - ) ENGINE=ndbcluster; - ---error ER_UNSUPPORTED_EXTENSION -create index i on nationaldish(countrycode,calories) using hash; - -drop table nationaldish; diff --git a/mysql-test/t/ndb_index_unique.test b/mysql-test/t/ndb_index_unique.test deleted file mode 100644 index 78757c3bcf7..00000000000 --- a/mysql-test/t/ndb_index_unique.test +++ /dev/null @@ -1,361 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; ---enable_warnings - -# -# Simple test to show use of UNIQUE indexes -# - -CREATE TABLE t1 ( - a int NOT NULL PRIMARY KEY, - b int not null, - c int, - UNIQUE ib(b) -) engine=ndbcluster; - -insert t1 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t1 order by b; -select * from t1 where b = 4 order by b; -insert into t1 values(7,8,3); -select * from t1 where b = 4 order by a; - --- error ER_DUP_ENTRY -insert into t1 values(8, 2, 3); -select * from t1 order by a; -delete from t1 where a = 1; -insert into t1 values(8, 2, 3); -select * from t1 order by a; - -alter table t1 drop index ib; -insert into t1 values(1, 2, 3); -# Bug# #18129 ---error 1169 -create unique index ib on t1(b); - -drop table t1; - -# -# Indexing NULL values -# - -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - UNIQUE bc(b,c) -) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 use index (bc) where b IS NULL order by a; - -select * from t1 use index (bc)order by a; -select * from t1 use index (bc) order by a; -select * from t1 use index (PRIMARY) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c IS NULL order by a; -select * from t1 use index (bc) where b IS NULL and c = 2 order by a; -select * from t1 use index (bc) where b < 4 order by a; -select * from t1 use index (bc) where b IS NOT NULL order by a; --- error ER_DUP_ENTRY -insert into t1 values(5,1,1); -drop table t1; - - -# -# Show use of UNIQUE USING HASH indexes -# - -CREATE TABLE t2 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned not null, - UNIQUE (b, c) USING HASH -) engine=ndbcluster; - -insert t2 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t2 where a = 3; -select * from t2 where b = 4; -select * from t2 where c = 6; -insert into t2 values(7,8,3); -select * from t2 where b = 4 order by a; - --- error ER_DUP_ENTRY -insert into t2 values(8, 2, 3); -select * from t2 order by a; -delete from t2 where a = 1; -insert into t2 values(8, 2, 3); -select * from t2 order by a; - -# Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld -create unique index bi using hash on t2(b); --- error ER_DUP_ENTRY -insert into t2 values(9, 3, 1); -alter table t2 drop index bi; -insert into t2 values(9, 3, 1); -select * from t2 order by a; - -drop table t2; - -CREATE TABLE t2 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned, - UNIQUE (b, c) USING HASH -) engine=ndbcluster; - - -insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL); - -select * from t2 where c IS NULL order by a; -select * from t2 where b = 3 AND c IS NULL order by a; -select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a; -set @old_ecpd = @@session.engine_condition_pushdown; -set engine_condition_pushdown = true; -explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a; -set engine_condition_pushdown = @old_ecpd; - -drop table t2; - -# -# Show use of PRIMARY KEY USING HASH indexes -# - -CREATE TABLE t3 ( - a int unsigned NOT NULL, - b int unsigned not null, - c int unsigned, - PRIMARY KEY (a, b) USING HASH -) engine=ndbcluster; - -insert t3 values(1, 2, 3), (2, 3, 5), (3, 4, 6), (4, 5, 8), (5,6, 2), (6,7, 2); -select * from t3 where a = 3; -select * from t3 where b = 4; -select * from t3 where c = 6; -insert into t3 values(7,8,3); -select * from t3 where b = 4 order by a; - -drop table t3; - -# -# Indexes on NULL-able columns -# - -CREATE TABLE t1 ( - pk int NOT NULL PRIMARY KEY, - a int unsigned, - UNIQUE KEY (a) -) engine=ndbcluster; - -insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4); - -select * from t1 order by pk; - ---error ER_DUP_ENTRY -insert into t1 values (5,0); -select * from t1 order by pk; -delete from t1 where a = 0; -insert into t1 values (5,0); -select * from t1 order by pk; - -CREATE TABLE t2 ( - pk int NOT NULL PRIMARY KEY, - a int unsigned, - b tinyint NOT NULL, - c VARCHAR(10), - UNIQUE KEY si(a, c) -) engine=ndbcluster; - -insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc'); - -select * from t2 order by pk; - ---error ER_DUP_ENTRY -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; -delete from t2 where c IS NOT NULL; -insert into t2 values(2,3,19,'abc'); -select * from t2 order by pk; - -drop table t1, t2; - -# -# More complex tables -# - -CREATE TABLE t1 ( - cid smallint(5) unsigned NOT NULL default '0', - cv varchar(250) NOT NULL default '', - PRIMARY KEY (cid), - UNIQUE KEY cv (cv) -) engine=ndbcluster; -INSERT INTO t1 VALUES (8,'dummy'); -CREATE TABLE t2 ( - cid bigint(20) unsigned NOT NULL auto_increment, - cap varchar(255) NOT NULL default '', - PRIMARY KEY (cid), - UNIQUE KEY (cid, cap) -) engine=ndbcluster; -INSERT INTO t2 VALUES (NULL,'another dummy'); -CREATE TABLE t3 ( - gid bigint(20) unsigned NOT NULL auto_increment, - gn varchar(255) NOT NULL default '', - must tinyint(4) default NULL, - PRIMARY KEY (gid) -) engine=ndbcluster; -INSERT INTO t3 VALUES (1,'V1',NULL); -CREATE TABLE t4 ( - uid bigint(20) unsigned NOT NULL default '0', - gid bigint(20) unsigned NOT NULL, - rid bigint(20) unsigned NOT NULL, - cid bigint(20) unsigned NOT NULL, - UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t4 VALUES (1,1,2,4); -INSERT INTO t4 VALUES (1,1,2,3); -INSERT INTO t4 VALUES (1,1,5,7); -INSERT INTO t4 VALUES (1,1,10,8); -CREATE TABLE t5 ( - rid bigint(20) unsigned NOT NULL auto_increment, - rl varchar(255) NOT NULL default '', - PRIMARY KEY (rid) -) engine=ndbcluster; -CREATE TABLE t6 ( - uid bigint(20) unsigned NOT NULL auto_increment, - un varchar(250) NOT NULL default '', - uc smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (uid), - UNIQUE KEY nc (un,uc) -) engine=ndbcluster; -INSERT INTO t6 VALUES (1,'test',8); -INSERT INTO t6 VALUES (2,'test2',9); -INSERT INTO t6 VALUES (3,'tre',3); -CREATE TABLE t7 ( - mid bigint(20) unsigned NOT NULL PRIMARY KEY, - uid bigint(20) unsigned NOT NULL default '0', - gid bigint(20) unsigned NOT NULL, - rid bigint(20) unsigned NOT NULL, - cid bigint(20) unsigned NOT NULL, - UNIQUE KEY m (uid,gid,rid,cid) -) engine=ndbcluster; -INSERT INTO t7 VALUES(1, 1, 1, 1, 1); -INSERT INTO t7 VALUES(2, 2, 1, 1, 1); -INSERT INTO t7 VALUES(3, 3, 1, 1, 1); -INSERT INTO t7 VALUES(4, 4, 1, 1, 1); -INSERT INTO t7 VALUES(5, 5, 1, 1, 1); -INSERT INTO t7 VALUES(6, 1, 1, 1, 6); -INSERT INTO t7 VALUES(7, 2, 1, 1, 7); -INSERT INTO t7 VALUES(8, 3, 1, 1, 8); -INSERT INTO t7 VALUES(9, 4, 1, 1, 9); -INSERT INTO t7 VALUES(10, 5, 1, 1, 10); - -select * from t1 where cv = 'dummy'; -select * from t1 where cv = 'test'; -select * from t2 where cap = 'another dummy'; -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -select * from t4 where uid = 1 order by cid; -select * from t4 where rid = 2 order by cid; -select * from t6 where un='test' and uc=8; -select * from t6 where un='test' and uc=7; -select * from t6 where un='test'; -select * from t7 where mid = 8; -select * from t7 where uid = 8; -select * from t7 where uid = 1 order by mid; -select * from t7 where uid = 4 order by mid; -select * from t7 where gid = 4; -select * from t7 where gid = 1 order by mid; -select * from t7 where cid = 4; -select * from t7 where cid = 8; - -# -# insert more records into t4 -# -let $1=100; -disable_query_log; -while ($1) -{ - eval insert into t4 values(1, $1, 5, 12); - eval insert into t4 values($1, 3, 9, 11); - dec $1; -} -enable_query_log; - -select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4; -select * from t4 where uid = 1 and gid=1 and rid=1 and cid=4; -select * from t4 where uid = 1 order by gid,cid; -select * from t4 where uid = 1 order by gid,cid; -select * from t4 where rid = 2 order by cid; - - -drop table t1,t2,t3,t4,t5,t6,t7; - -# test null in indexes -CREATE TABLE t1 ( - a int unsigned NOT NULL PRIMARY KEY, - b int unsigned, - c int unsigned, - UNIQUE bc(b,c) ) engine = ndb; - -insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL); -select * from t1 where b=1 and c=1; -select * from t1 where b is null and c is null; -select * from t1 where b is null and c = 2; -select * from t1 where b = 4 and c is null; -create table t8 as -select * from t1 where (b = 1 and c = 1) - or (b is null and c is null) - or (b is null and c = 2) - or (b = 4 and c is null); -select * from t8 order by a; -select * from t1 order by a; -drop table t1, t8; - -############################### -# Bug 8101 -# -# Unique index not specified in the same order as in table -# - -create table t1( - id integer not null auto_increment, - month integer not null, - year integer not null, - code varchar( 2) not null, - primary key ( id), - unique idx_t1( month, code, year) -) engine=ndb; - -INSERT INTO t1 (month, year, code) VALUES (4,2004,'12'); -INSERT INTO t1 (month, year, code) VALUES (5,2004,'12'); - -select * from t1 where code = '12' and month = 4 and year = 2004 ; - -drop table t1; - -# bug#15918 Unique Key Limit in NDB Engine - -create table t1 (a int primary key, b varchar(1000) not null, unique key (b)) -engine=ndb charset=utf8; - -insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200)); ---error ER_DUP_ENTRY -insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200)); -select a, sha1(b) from t1; - -# perl -e 'print pack("H2000","e288ab6474"x200)' | sha1sum - -drop table t1; - -# bug#21873 MySQLD Crash on ALTER...ADD..UNIQUE..USING HASH statement for NDB backed table - -create table t1(id int not null) engine = NDB; - -alter table t1 add constraint uk_test unique (id) using hash; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_insert.test b/mysql-test/t/ndb_insert.test deleted file mode 100644 index 5b74cc9202c..00000000000 --- a/mysql-test/t/ndb_insert.test +++ /dev/null @@ -1,779 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test of INSERT in NDB -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0, 0, 0); -SELECT * FROM t1; - -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10), -(11,11,11),(12,12,12),(13,13,13),(14,14,14),(15,15,15), -(16,16,16),(17,17,17),(18,18,18),(19,19,19),(20,20,20), -(21,21,21),(22,22,22),(23,23,23),(24,24,24),(25,25,25), -(26,26,26),(27,27,27),(28,28,28),(29,29,29),(30,30,30), -(31,31,31),(32,32,32),(33,33,33),(34,34,34),(35,35,35), -(36,36,36),(37,37,37),(38,38,38),(39,39,39),(40,40,40), -(41,41,41),(42,42,42),(43,43,43),(44,44,44),(45,45,45), -(46,46,46),(47,47,47),(48,48,48),(49,49,49),(50,50,50), -(51,51,51),(52,52,52),(53,53,53),(54,54,54),(55,55,55), -(56,56,56),(57,57,57),(58,58,58),(59,59,59),(60,60,60), -(61,61,61),(62,62,62),(63,63,63),(64,64,64),(65,65,65), -(66,66,66),(67,67,67),(68,68,68),(69,69,69),(70,70,70), -(71,71,71),(72,72,72),(73,73,73),(74,74,74),(75,75,75), -(76,76,76),(77,77,77),(78,78,78),(79,79,79),(80,80,80), -(81,81,81),(82,82,82),(83,83,83),(84,84,84),(85,85,85), -(86,86,86),(87,87,87),(88,88,88),(89,89,89),(90,90,90), -(91,91,91),(92,92,92),(93,93,93),(94,94,94),(95,95,95), -(96,96,96),(97,97,97),(98,98,98),(99,99,99),(100,100,100), -(101,101,101),(102,102,102),(103,103,103),(104,104,104),(105,105,105), -(106,106,106),(107,107,107),(108,108,108),(109,109,109),(110,110,110), -(111,111,111),(112,112,112),(113,113,113),(114,114,114),(115,115,115), -(116,116,116),(117,117,117),(118,118,118),(119,119,119),(120,120,120), -(121,121,121),(122,122,122),(123,123,123),(124,124,124),(125,125,125), -(126,126,126),(127,127,127),(128,128,128),(129,129,129),(130,130,130), -(131,131,131),(132,132,132),(133,133,133),(134,134,134),(135,135,135), -(136,136,136),(137,137,137),(138,138,138),(139,139,139),(140,140,140), -(141,141,141),(142,142,142),(143,143,143),(144,144,144),(145,145,145), -(146,146,146),(147,147,147),(148,148,148),(149,149,149),(150,150,150), -(151,151,151),(152,152,152),(153,153,153),(154,154,154),(155,155,155), -(156,156,156),(157,157,157),(158,158,158),(159,159,159),(160,160,160), -(161,161,161),(162,162,162),(163,163,163),(164,164,164),(165,165,165), -(166,166,166),(167,167,167),(168,168,168),(169,169,169),(170,170,170), -(171,171,171),(172,172,172),(173,173,173),(174,174,174),(175,175,175), -(176,176,176),(177,177,177),(178,178,178),(179,179,179),(180,180,180), -(181,181,181),(182,182,182),(183,183,183),(184,184,184),(185,185,185), -(186,186,186),(187,187,187),(188,188,188),(189,189,189),(190,190,190), -(191,191,191),(192,192,192),(193,193,193),(194,194,194),(195,195,195), -(196,196,196),(197,197,197),(198,198,198),(199,199,199),(200,200,200), -(201,201,201),(202,202,202),(203,203,203),(204,204,204),(205,205,205), -(206,206,206),(207,207,207),(208,208,208),(209,209,209),(210,210,210), -(211,211,211),(212,212,212),(213,213,213),(214,214,214),(215,215,215), -(216,216,216),(217,217,217),(218,218,218),(219,219,219),(220,220,220), -(221,221,221),(222,222,222),(223,223,223),(224,224,224),(225,225,225), -(226,226,226),(227,227,227),(228,228,228),(229,229,229),(230,230,230), -(231,231,231),(232,232,232),(233,233,233),(234,234,234),(235,235,235), -(236,236,236),(237,237,237),(238,238,238),(239,239,239),(240,240,240), -(241,241,241),(242,242,242),(243,243,243),(244,244,244),(245,245,245), -(246,246,246),(247,247,247),(248,248,248),(249,249,249),(250,250,250), -(251,251,251),(252,252,252),(253,253,253),(254,254,254),(255,255,255), -(256,256,256),(257,257,257),(258,258,258),(259,259,259),(260,260,260), -(261,261,261),(262,262,262),(263,263,263),(264,264,264),(265,265,265), -(266,266,266),(267,267,267),(268,268,268),(269,269,269),(270,270,270), -(271,271,271),(272,272,272),(273,273,273),(274,274,274),(275,275,275), -(276,276,276),(277,277,277),(278,278,278),(279,279,279),(280,280,280), -(281,281,281),(282,282,282),(283,283,283),(284,284,284),(285,285,285), -(286,286,286),(287,287,287),(288,288,288),(289,289,289),(290,290,290), -(291,291,291),(292,292,292),(293,293,293),(294,294,294),(295,295,295), -(296,296,296),(297,297,297),(298,298,298),(299,299,299),(300,300,300), -(301,301,301),(302,302,302),(303,303,303),(304,304,304),(305,305,305), -(306,306,306),(307,307,307),(308,308,308),(309,309,309),(310,310,310), -(311,311,311),(312,312,312),(313,313,313),(314,314,314),(315,315,315), -(316,316,316),(317,317,317),(318,318,318),(319,319,319),(320,320,320), -(321,321,321),(322,322,322),(323,323,323),(324,324,324),(325,325,325), -(326,326,326),(327,327,327),(328,328,328),(329,329,329),(330,330,330), -(331,331,331),(332,332,332),(333,333,333),(334,334,334),(335,335,335), -(336,336,336),(337,337,337),(338,338,338),(339,339,339),(340,340,340), -(341,341,341),(342,342,342),(343,343,343),(344,344,344),(345,345,345), -(346,346,346),(347,347,347),(348,348,348),(349,349,349),(350,350,350), -(351,351,351),(352,352,352),(353,353,353),(354,354,354),(355,355,355), -(356,356,356),(357,357,357),(358,358,358),(359,359,359),(360,360,360), -(361,361,361),(362,362,362),(363,363,363),(364,364,364),(365,365,365), -(366,366,366),(367,367,367),(368,368,368),(369,369,369),(370,370,370), -(371,371,371),(372,372,372),(373,373,373),(374,374,374),(375,375,375), -(376,376,376),(377,377,377),(378,378,378),(379,379,379),(380,380,380), -(381,381,381),(382,382,382),(383,383,383),(384,384,384),(385,385,385), -(386,386,386),(387,387,387),(388,388,388),(389,389,389),(390,390,390), -(391,391,391),(392,392,392),(393,393,393),(394,394,394),(395,395,395), -(396,396,396),(397,397,397),(398,398,398),(399,399,399),(400,400,400), -(401,401,401),(402,402,402),(403,403,403),(404,404,404),(405,405,405), -(406,406,406),(407,407,407),(408,408,408),(409,409,409),(410,410,410), -(411,411,411),(412,412,412),(413,413,413),(414,414,414),(415,415,415), -(416,416,416),(417,417,417),(418,418,418),(419,419,419),(420,420,420), -(421,421,421),(422,422,422),(423,423,423),(424,424,424),(425,425,425), -(426,426,426),(427,427,427),(428,428,428),(429,429,429),(430,430,430), -(431,431,431),(432,432,432),(433,433,433),(434,434,434),(435,435,435), -(436,436,436),(437,437,437),(438,438,438),(439,439,439),(440,440,440), -(441,441,441),(442,442,442),(443,443,443),(444,444,444),(445,445,445), -(446,446,446),(447,447,447),(448,448,448),(449,449,449),(450,450,450), -(451,451,451),(452,452,452),(453,453,453),(454,454,454),(455,455,455), -(456,456,456),(457,457,457),(458,458,458),(459,459,459),(460,460,460), -(461,461,461),(462,462,462),(463,463,463),(464,464,464),(465,465,465), -(466,466,466),(467,467,467),(468,468,468),(469,469,469),(470,470,470), -(471,471,471),(472,472,472),(473,473,473),(474,474,474),(475,475,475), -(476,476,476),(477,477,477),(478,478,478),(479,479,479),(480,480,480), -(481,481,481),(482,482,482),(483,483,483),(484,484,484),(485,485,485), -(486,486,486),(487,487,487),(488,488,488),(489,489,489),(490,490,490), -(491,491,491),(492,492,492),(493,493,493),(494,494,494),(495,495,495), -(496,496,496),(497,497,497),(498,498,498),(499,499,499),(500, 500, 500); - -SELECT COUNT(*) FROM t1; - -INSERT INTO t1 VALUES -(501,501,501),(502,502,502),(503,503,503),(504,504,504),(505,505,505), -(506,506,506),(507,507,507),(508,508,508),(509,509,509),(510,510,510), -(511,511,511),(512,512,512),(513,513,513),(514,514,514),(515,515,515), -(516,516,516),(517,517,517),(518,518,518),(519,519,519),(520,520,520), -(521,521,521),(522,522,522),(523,523,523),(524,524,524),(525,525,525), -(526,526,526),(527,527,527),(528,528,528),(529,529,529),(530,530,530), -(531,531,531),(532,532,532),(533,533,533),(534,534,534),(535,535,535), -(536,536,536),(537,537,537),(538,538,538),(539,539,539),(540,540,540), -(541,541,541),(542,542,542),(543,543,543),(544,544,544),(545,545,545), -(546,546,546),(547,547,547),(548,548,548),(549,549,549),(550,550,550), -(551,551,551),(552,552,552),(553,553,553),(554,554,554),(555,555,555), -(556,556,556),(557,557,557),(558,558,558),(559,559,559),(560,560,560), -(561,561,561),(562,562,562),(563,563,563),(564,564,564),(565,565,565), -(566,566,566),(567,567,567),(568,568,568),(569,569,569),(570,570,570), -(571,571,571),(572,572,572),(573,573,573),(574,574,574),(575,575,575), -(576,576,576),(577,577,577),(578,578,578),(579,579,579),(580,580,580), -(581,581,581),(582,582,582),(583,583,583),(584,584,584),(585,585,585), -(586,586,586),(587,587,587),(588,588,588),(589,589,589),(590,590,590), -(591,591,591),(592,592,592),(593,593,593),(594,594,594),(595,595,595), -(596,596,596),(597,597,597),(598,598,598),(599,599,599),(600,600,600), -(601,601,601),(602,602,602),(603,603,603),(604,604,604),(605,605,605), -(606,606,606),(607,607,607),(608,608,608),(609,609,609),(610,610,610), -(611,611,611),(612,612,612),(613,613,613),(614,614,614),(615,615,615), -(616,616,616),(617,617,617),(618,618,618),(619,619,619),(620,620,620), -(621,621,621),(622,622,622),(623,623,623),(624,624,624),(625,625,625), -(626,626,626),(627,627,627),(628,628,628),(629,629,629),(630,630,630), -(631,631,631),(632,632,632),(633,633,633),(634,634,634),(635,635,635), -(636,636,636),(637,637,637),(638,638,638),(639,639,639),(640,640,640), -(641,641,641),(642,642,642),(643,643,643),(644,644,644),(645,645,645), -(646,646,646),(647,647,647),(648,648,648),(649,649,649),(650,650,650), -(651,651,651),(652,652,652),(653,653,653),(654,654,654),(655,655,655), -(656,656,656),(657,657,657),(658,658,658),(659,659,659),(660,660,660), -(661,661,661),(662,662,662),(663,663,663),(664,664,664),(665,665,665), -(666,666,666),(667,667,667),(668,668,668),(669,669,669),(670,670,670), -(671,671,671),(672,672,672),(673,673,673),(674,674,674),(675,675,675), -(676,676,676),(677,677,677),(678,678,678),(679,679,679),(680,680,680), -(681,681,681),(682,682,682),(683,683,683),(684,684,684),(685,685,685), -(686,686,686),(687,687,687),(688,688,688),(689,689,689),(690,690,690), -(691,691,691),(692,692,692),(693,693,693),(694,694,694),(695,695,695), -(696,696,696),(697,697,697),(698,698,698),(699,699,699),(700,700,700), -(701,701,701),(702,702,702),(703,703,703),(704,704,704),(705,705,705), -(706,706,706),(707,707,707),(708,708,708),(709,709,709),(710,710,710), -(711,711,711),(712,712,712),(713,713,713),(714,714,714),(715,715,715), -(716,716,716),(717,717,717),(718,718,718),(719,719,719),(720,720,720), -(721,721,721),(722,722,722),(723,723,723),(724,724,724),(725,725,725), -(726,726,726),(727,727,727),(728,728,728),(729,729,729),(730,730,730), -(731,731,731),(732,732,732),(733,733,733),(734,734,734),(735,735,735), -(736,736,736),(737,737,737),(738,738,738),(739,739,739),(740,740,740), -(741,741,741),(742,742,742),(743,743,743),(744,744,744),(745,745,745), -(746,746,746),(747,747,747),(748,748,748),(749,749,749),(750,750,750), -(751,751,751),(752,752,752),(753,753,753),(754,754,754),(755,755,755), -(756,756,756),(757,757,757),(758,758,758),(759,759,759),(760,760,760), -(761,761,761),(762,762,762),(763,763,763),(764,764,764),(765,765,765), -(766,766,766),(767,767,767),(768,768,768),(769,769,769),(770,770,770), -(771,771,771),(772,772,772),(773,773,773),(774,774,774),(775,775,775), -(776,776,776),(777,777,777),(778,778,778),(779,779,779),(780,780,780), -(781,781,781),(782,782,782),(783,783,783),(784,784,784),(785,785,785), -(786,786,786),(787,787,787),(788,788,788),(789,789,789),(790,790,790), -(791,791,791),(792,792,792),(793,793,793),(794,794,794),(795,795,795), -(796,796,796),(797,797,797),(798,798,798),(799,799,799),(800,800,800), -(801,801,801),(802,802,802),(803,803,803),(804,804,804),(805,805,805), -(806,806,806),(807,807,807),(808,808,808),(809,809,809),(810,810,810), -(811,811,811),(812,812,812),(813,813,813),(814,814,814),(815,815,815), -(816,816,816),(817,817,817),(818,818,818),(819,819,819),(820,820,820), -(821,821,821),(822,822,822),(823,823,823),(824,824,824),(825,825,825), -(826,826,826),(827,827,827),(828,828,828),(829,829,829),(830,830,830), -(831,831,831),(832,832,832),(833,833,833),(834,834,834),(835,835,835), -(836,836,836),(837,837,837),(838,838,838),(839,839,839),(840,840,840), -(841,841,841),(842,842,842),(843,843,843),(844,844,844),(845,845,845), -(846,846,846),(847,847,847),(848,848,848),(849,849,849),(850,850,850), -(851,851,851),(852,852,852),(853,853,853),(854,854,854),(855,855,855), -(856,856,856),(857,857,857),(858,858,858),(859,859,859),(860,860,860), -(861,861,861),(862,862,862),(863,863,863),(864,864,864),(865,865,865), -(866,866,866),(867,867,867),(868,868,868),(869,869,869),(870,870,870), -(871,871,871),(872,872,872),(873,873,873),(874,874,874),(875,875,875), -(876,876,876),(877,877,877),(878,878,878),(879,879,879),(880,880,880), -(881,881,881),(882,882,882),(883,883,883),(884,884,884),(885,885,885), -(886,886,886),(887,887,887),(888,888,888),(889,889,889),(890,890,890), -(891,891,891),(892,892,892),(893,893,893),(894,894,894),(895,895,895), -(896,896,896),(897,897,897),(898,898,898),(899,899,899),(900,900,900), -(901,901,901),(902,902,902),(903,903,903),(904,904,904),(905,905,905), -(906,906,906),(907,907,907),(908,908,908),(909,909,909),(910,910,910), -(911,911,911),(912,912,912),(913,913,913),(914,914,914),(915,915,915), -(916,916,916),(917,917,917),(918,918,918),(919,919,919),(920,920,920), -(921,921,921),(922,922,922),(923,923,923),(924,924,924),(925,925,925), -(926,926,926),(927,927,927),(928,928,928),(929,929,929),(930,930,930), -(931,931,931),(932,932,932),(933,933,933),(934,934,934),(935,935,935), -(936,936,936),(937,937,937),(938,938,938),(939,939,939),(940,940,940), -(941,941,941),(942,942,942),(943,943,943),(944,944,944),(945,945,945), -(946,946,946),(947,947,947),(948,948,948),(949,949,949),(950,950,950), -(951,951,951),(952,952,952),(953,953,953),(954,954,954),(955,955,955), -(956,956,956),(957,957,957),(958,958,958),(959,959,959),(960,960,960), -(961,961,961),(962,962,962),(963,963,963),(964,964,964),(965,965,965), -(966,966,966),(967,967,967),(968,968,968),(969,969,969),(970,970,970), -(971,971,971),(972,972,972),(973,973,973),(974,974,974),(975,975,975), -(976,976,976),(977,977,977),(978,978,978),(979,979,979),(980,980,980), -(981,981,981),(982,982,982),(983,983,983),(984,984,984),(985,985,985), -(986,986,986),(987,987,987),(988,988,988),(989,989,989),(990,990,990), -(991,991,991),(992,992,992),(993,993,993),(994,994,994),(995,995,995), -(996,996,996),(997,997,997),(998,998,998),(999,999,999),(1000,1000,1000), -(1001,1001,1001),(1002,1002,1002),(1003,1003,1003),(1004,1004,1004),(1005,1005,1005), -(1006,1006,1006),(1007,1007,1007),(1008,1008,1008),(1009,1009,1009),(1010,1010,1010), -(1011,1011,1011),(1012,1012,1012),(1013,1013,1013),(1014,1014,1014),(1015,1015,1015), -(1016,1016,1016),(1017,1017,1017),(1018,1018,1018),(1019,1019,1019),(1020,1020,1020), -(1021,1021,1021),(1022,1022,1022),(1023,1023,1023),(1024,1024,1024),(1025,1025,1025), -(1026,1026,1026),(1027,1027,1027),(1028,1028,1028),(1029,1029,1029),(1030,1030,1030), -(1031,1031,1031),(1032,1032,1032),(1033,1033,1033),(1034,1034,1034),(1035,1035,1035), -(1036,1036,1036),(1037,1037,1037),(1038,1038,1038),(1039,1039,1039),(1040,1040,1040), -(1041,1041,1041),(1042,1042,1042),(1043,1043,1043),(1044,1044,1044),(1045,1045,1045), -(1046,1046,1046),(1047,1047,1047),(1048,1048,1048),(1049,1049,1049),(1050,1050,1050), -(1051,1051,1051),(1052,1052,1052),(1053,1053,1053),(1054,1054,1054),(1055,1055,1055), -(1056,1056,1056),(1057,1057,1057),(1058,1058,1058),(1059,1059,1059),(1060,1060,1060), -(1061,1061,1061),(1062,1062,1062),(1063,1063,1063),(1064,1064,1064),(1065,1065,1065), -(1066,1066,1066),(1067,1067,1067),(1068,1068,1068),(1069,1069,1069),(1070,1070,1070), -(1071,1071,1071),(1072,1072,1072),(1073,1073,1073),(1074,1074,1074),(1075,1075,1075), -(1076,1076,1076),(1077,1077,1077),(1078,1078,1078),(1079,1079,1079),(1080,1080,1080), -(1081,1081,1081),(1082,1082,1082),(1083,1083,1083),(1084,1084,1084),(1085,1085,1085), -(1086,1086,1086),(1087,1087,1087),(1088,1088,1088),(1089,1089,1089),(1090,1090,1090), -(1091,1091,1091),(1092,1092,1092),(1093,1093,1093),(1094,1094,1094),(1095,1095,1095), -(1096,1096,1096),(1097,1097,1097),(1098,1098,1098),(1099,1099,1099),(1100,1100,1100), -(1101,1101,1101),(1102,1102,1102),(1103,1103,1103),(1104,1104,1104),(1105,1105,1105), -(1106,1106,1106),(1107,1107,1107),(1108,1108,1108),(1109,1109,1109),(1110,1110,1110), -(1111,1111,1111),(1112,1112,1112),(1113,1113,1113),(1114,1114,1114),(1115,1115,1115), -(1116,1116,1116),(1117,1117,1117),(1118,1118,1118),(1119,1119,1119),(1120,1120,1120), -(1121,1121,1121),(1122,1122,1122),(1123,1123,1123),(1124,1124,1124),(1125,1125,1125), -(1126,1126,1126),(1127,1127,1127),(1128,1128,1128),(1129,1129,1129),(1130,1130,1130), -(1131,1131,1131),(1132,1132,1132),(1133,1133,1133),(1134,1134,1134),(1135,1135,1135), -(1136,1136,1136),(1137,1137,1137),(1138,1138,1138),(1139,1139,1139),(1140,1140,1140), -(1141,1141,1141),(1142,1142,1142),(1143,1143,1143),(1144,1144,1144),(1145,1145,1145), -(1146,1146,1146),(1147,1147,1147),(1148,1148,1148),(1149,1149,1149),(1150,1150,1150), -(1151,1151,1151),(1152,1152,1152),(1153,1153,1153),(1154,1154,1154),(1155,1155,1155), -(1156,1156,1156),(1157,1157,1157),(1158,1158,1158),(1159,1159,1159),(1160,1160,1160), -(1161,1161,1161),(1162,1162,1162),(1163,1163,1163),(1164,1164,1164),(1165,1165,1165), -(1166,1166,1166),(1167,1167,1167),(1168,1168,1168),(1169,1169,1169),(1170,1170,1170), -(1171,1171,1171),(1172,1172,1172),(1173,1173,1173),(1174,1174,1174),(1175,1175,1175), -(1176,1176,1176),(1177,1177,1177),(1178,1178,1178),(1179,1179,1179),(1180,1180,1180), -(1181,1181,1181),(1182,1182,1182),(1183,1183,1183),(1184,1184,1184),(1185,1185,1185), -(1186,1186,1186),(1187,1187,1187),(1188,1188,1188),(1189,1189,1189),(1190,1190,1190), -(1191,1191,1191),(1192,1192,1192),(1193,1193,1193),(1194,1194,1194),(1195,1195,1195), -(1196,1196,1196),(1197,1197,1197),(1198,1198,1198),(1199,1199,1199),(1200,1200,1200), -(1201,1201,1201),(1202,1202,1202),(1203,1203,1203),(1204,1204,1204),(1205,1205,1205), -(1206,1206,1206),(1207,1207,1207),(1208,1208,1208),(1209,1209,1209),(1210,1210,1210), -(1211,1211,1211),(1212,1212,1212),(1213,1213,1213),(1214,1214,1214),(1215,1215,1215), -(1216,1216,1216),(1217,1217,1217),(1218,1218,1218),(1219,1219,1219),(1220,1220,1220), -(1221,1221,1221),(1222,1222,1222),(1223,1223,1223),(1224,1224,1224),(1225,1225,1225), -(1226,1226,1226),(1227,1227,1227),(1228,1228,1228),(1229,1229,1229),(1230,1230,1230), -(1231,1231,1231),(1232,1232,1232),(1233,1233,1233),(1234,1234,1234),(1235,1235,1235), -(1236,1236,1236),(1237,1237,1237),(1238,1238,1238),(1239,1239,1239),(1240,1240,1240), -(1241,1241,1241),(1242,1242,1242),(1243,1243,1243),(1244,1244,1244),(1245,1245,1245), -(1246,1246,1246),(1247,1247,1247),(1248,1248,1248),(1249,1249,1249),(1250,1250,1250), -(1251,1251,1251),(1252,1252,1252),(1253,1253,1253),(1254,1254,1254),(1255,1255,1255), -(1256,1256,1256),(1257,1257,1257),(1258,1258,1258),(1259,1259,1259),(1260,1260,1260), -(1261,1261,1261),(1262,1262,1262),(1263,1263,1263),(1264,1264,1264),(1265,1265,1265), -(1266,1266,1266),(1267,1267,1267),(1268,1268,1268),(1269,1269,1269),(1270,1270,1270), -(1271,1271,1271),(1272,1272,1272),(1273,1273,1273),(1274,1274,1274),(1275,1275,1275), -(1276,1276,1276),(1277,1277,1277),(1278,1278,1278),(1279,1279,1279),(1280,1280,1280), -(1281,1281,1281),(1282,1282,1282),(1283,1283,1283),(1284,1284,1284),(1285,1285,1285), -(1286,1286,1286),(1287,1287,1287),(1288,1288,1288),(1289,1289,1289),(1290,1290,1290), -(1291,1291,1291),(1292,1292,1292),(1293,1293,1293),(1294,1294,1294),(1295,1295,1295), -(1296,1296,1296),(1297,1297,1297),(1298,1298,1298),(1299,1299,1299),(1300,1300,1300), -(1301,1301,1301),(1302,1302,1302),(1303,1303,1303),(1304,1304,1304),(1305,1305,1305), -(1306,1306,1306),(1307,1307,1307),(1308,1308,1308),(1309,1309,1309),(1310,1310,1310), -(1311,1311,1311),(1312,1312,1312),(1313,1313,1313),(1314,1314,1314),(1315,1315,1315), -(1316,1316,1316),(1317,1317,1317),(1318,1318,1318),(1319,1319,1319),(1320,1320,1320), -(1321,1321,1321),(1322,1322,1322),(1323,1323,1323),(1324,1324,1324),(1325,1325,1325), -(1326,1326,1326),(1327,1327,1327),(1328,1328,1328),(1329,1329,1329),(1330,1330,1330), -(1331,1331,1331),(1332,1332,1332),(1333,1333,1333),(1334,1334,1334),(1335,1335,1335), -(1336,1336,1336),(1337,1337,1337),(1338,1338,1338),(1339,1339,1339),(1340,1340,1340), -(1341,1341,1341),(1342,1342,1342),(1343,1343,1343),(1344,1344,1344),(1345,1345,1345), -(1346,1346,1346),(1347,1347,1347),(1348,1348,1348),(1349,1349,1349),(1350,1350,1350), -(1351,1351,1351),(1352,1352,1352),(1353,1353,1353),(1354,1354,1354),(1355,1355,1355), -(1356,1356,1356),(1357,1357,1357),(1358,1358,1358),(1359,1359,1359),(1360,1360,1360), -(1361,1361,1361),(1362,1362,1362),(1363,1363,1363),(1364,1364,1364),(1365,1365,1365), -(1366,1366,1366),(1367,1367,1367),(1368,1368,1368),(1369,1369,1369),(1370,1370,1370), -(1371,1371,1371),(1372,1372,1372),(1373,1373,1373),(1374,1374,1374),(1375,1375,1375), -(1376,1376,1376),(1377,1377,1377),(1378,1378,1378),(1379,1379,1379),(1380,1380,1380), -(1381,1381,1381),(1382,1382,1382),(1383,1383,1383),(1384,1384,1384),(1385,1385,1385), -(1386,1386,1386),(1387,1387,1387),(1388,1388,1388),(1389,1389,1389),(1390,1390,1390), -(1391,1391,1391),(1392,1392,1392),(1393,1393,1393),(1394,1394,1394),(1395,1395,1395), -(1396,1396,1396),(1397,1397,1397),(1398,1398,1398),(1399,1399,1399),(1400,1400,1400), -(1401,1401,1401),(1402,1402,1402),(1403,1403,1403),(1404,1404,1404),(1405,1405,1405), -(1406,1406,1406),(1407,1407,1407),(1408,1408,1408),(1409,1409,1409),(1410,1410,1410), -(1411,1411,1411),(1412,1412,1412),(1413,1413,1413),(1414,1414,1414),(1415,1415,1415), -(1416,1416,1416),(1417,1417,1417),(1418,1418,1418),(1419,1419,1419),(1420,1420,1420), -(1421,1421,1421),(1422,1422,1422),(1423,1423,1423),(1424,1424,1424),(1425,1425,1425), -(1426,1426,1426),(1427,1427,1427),(1428,1428,1428),(1429,1429,1429),(1430,1430,1430), -(1431,1431,1431),(1432,1432,1432),(1433,1433,1433),(1434,1434,1434),(1435,1435,1435), -(1436,1436,1436),(1437,1437,1437),(1438,1438,1438),(1439,1439,1439),(1440,1440,1440), -(1441,1441,1441),(1442,1442,1442),(1443,1443,1443),(1444,1444,1444),(1445,1445,1445), -(1446,1446,1446),(1447,1447,1447),(1448,1448,1448),(1449,1449,1449),(1450,1450,1450), -(1451,1451,1451),(1452,1452,1452),(1453,1453,1453),(1454,1454,1454),(1455,1455,1455), -(1456,1456,1456),(1457,1457,1457),(1458,1458,1458),(1459,1459,1459),(1460,1460,1460), -(1461,1461,1461),(1462,1462,1462),(1463,1463,1463),(1464,1464,1464),(1465,1465,1465), -(1466,1466,1466),(1467,1467,1467),(1468,1468,1468),(1469,1469,1469),(1470,1470,1470), -(1471,1471,1471),(1472,1472,1472),(1473,1473,1473),(1474,1474,1474),(1475,1475,1475), -(1476,1476,1476),(1477,1477,1477),(1478,1478,1478),(1479,1479,1479),(1480,1480,1480), -(1481,1481,1481),(1482,1482,1482),(1483,1483,1483),(1484,1484,1484),(1485,1485,1485), -(1486,1486,1486),(1487,1487,1487),(1488,1488,1488),(1489,1489,1489),(1490,1490,1490), -(1491,1491,1491),(1492,1492,1492),(1493,1493,1493),(1494,1494,1494),(1495,1495,1495), -(1496,1496,1496),(1497,1497,1497),(1498,1498,1498),(1499,1499,1499),(1500,1500,1500), -(1501,1501,1501),(1502,1502,1502),(1503,1503,1503),(1504,1504,1504),(1505,1505,1505), -(1506,1506,1506),(1507,1507,1507),(1508,1508,1508),(1509,1509,1509),(1510,1510,1510), -(1511,1511,1511),(1512,1512,1512),(1513,1513,1513),(1514,1514,1514),(1515,1515,1515), -(1516,1516,1516),(1517,1517,1517),(1518,1518,1518),(1519,1519,1519),(1520,1520,1520), -(1521,1521,1521),(1522,1522,1522),(1523,1523,1523),(1524,1524,1524),(1525,1525,1525), -(1526,1526,1526),(1527,1527,1527),(1528,1528,1528),(1529,1529,1529),(1530,1530,1530), -(1531,1531,1531),(1532,1532,1532),(1533,1533,1533),(1534,1534,1534),(1535,1535,1535), -(1536,1536,1536),(1537,1537,1537),(1538,1538,1538),(1539,1539,1539),(1540,1540,1540), -(1541,1541,1541),(1542,1542,1542),(1543,1543,1543),(1544,1544,1544),(1545,1545,1545), -(1546,1546,1546),(1547,1547,1547),(1548,1548,1548),(1549,1549,1549),(1550,1550,1550), -(1551,1551,1551),(1552,1552,1552),(1553,1553,1553),(1554,1554,1554),(1555,1555,1555), -(1556,1556,1556),(1557,1557,1557),(1558,1558,1558),(1559,1559,1559),(1560,1560,1560), -(1561,1561,1561),(1562,1562,1562),(1563,1563,1563),(1564,1564,1564),(1565,1565,1565), -(1566,1566,1566),(1567,1567,1567),(1568,1568,1568),(1569,1569,1569),(1570,1570,1570), -(1571,1571,1571),(1572,1572,1572),(1573,1573,1573),(1574,1574,1574),(1575,1575,1575), -(1576,1576,1576),(1577,1577,1577),(1578,1578,1578),(1579,1579,1579),(1580,1580,1580), -(1581,1581,1581),(1582,1582,1582),(1583,1583,1583),(1584,1584,1584),(1585,1585,1585), -(1586,1586,1586),(1587,1587,1587),(1588,1588,1588),(1589,1589,1589),(1590,1590,1590), -(1591,1591,1591),(1592,1592,1592),(1593,1593,1593),(1594,1594,1594),(1595,1595,1595), -(1596,1596,1596),(1597,1597,1597),(1598,1598,1598),(1599,1599,1599),(1600,1600,1600), -(1601,1601,1601),(1602,1602,1602),(1603,1603,1603),(1604,1604,1604),(1605,1605,1605), -(1606,1606,1606),(1607,1607,1607),(1608,1608,1608),(1609,1609,1609),(1610,1610,1610), -(1611,1611,1611),(1612,1612,1612),(1613,1613,1613),(1614,1614,1614),(1615,1615,1615), -(1616,1616,1616),(1617,1617,1617),(1618,1618,1618),(1619,1619,1619),(1620,1620,1620), -(1621,1621,1621),(1622,1622,1622),(1623,1623,1623),(1624,1624,1624),(1625,1625,1625), -(1626,1626,1626),(1627,1627,1627),(1628,1628,1628),(1629,1629,1629),(1630,1630,1630), -(1631,1631,1631),(1632,1632,1632),(1633,1633,1633),(1634,1634,1634),(1635,1635,1635), -(1636,1636,1636),(1637,1637,1637),(1638,1638,1638),(1639,1639,1639),(1640,1640,1640), -(1641,1641,1641),(1642,1642,1642),(1643,1643,1643),(1644,1644,1644),(1645,1645,1645), -(1646,1646,1646),(1647,1647,1647),(1648,1648,1648),(1649,1649,1649),(1650,1650,1650), -(1651,1651,1651),(1652,1652,1652),(1653,1653,1653),(1654,1654,1654),(1655,1655,1655), -(1656,1656,1656),(1657,1657,1657),(1658,1658,1658),(1659,1659,1659),(1660,1660,1660), -(1661,1661,1661),(1662,1662,1662),(1663,1663,1663),(1664,1664,1664),(1665,1665,1665), -(1666,1666,1666),(1667,1667,1667),(1668,1668,1668),(1669,1669,1669),(1670,1670,1670), -(1671,1671,1671),(1672,1672,1672),(1673,1673,1673),(1674,1674,1674),(1675,1675,1675), -(1676,1676,1676),(1677,1677,1677),(1678,1678,1678),(1679,1679,1679),(1680,1680,1680), -(1681,1681,1681),(1682,1682,1682),(1683,1683,1683),(1684,1684,1684),(1685,1685,1685), -(1686,1686,1686),(1687,1687,1687),(1688,1688,1688),(1689,1689,1689),(1690,1690,1690), -(1691,1691,1691),(1692,1692,1692),(1693,1693,1693),(1694,1694,1694),(1695,1695,1695), -(1696,1696,1696),(1697,1697,1697),(1698,1698,1698),(1699,1699,1699),(1700,1700,1700), -(1701,1701,1701),(1702,1702,1702),(1703,1703,1703),(1704,1704,1704),(1705,1705,1705), -(1706,1706,1706),(1707,1707,1707),(1708,1708,1708),(1709,1709,1709),(1710,1710,1710), -(1711,1711,1711),(1712,1712,1712),(1713,1713,1713),(1714,1714,1714),(1715,1715,1715), -(1716,1716,1716),(1717,1717,1717),(1718,1718,1718),(1719,1719,1719),(1720,1720,1720), -(1721,1721,1721),(1722,1722,1722),(1723,1723,1723),(1724,1724,1724),(1725,1725,1725), -(1726,1726,1726),(1727,1727,1727),(1728,1728,1728),(1729,1729,1729),(1730,1730,1730), -(1731,1731,1731),(1732,1732,1732),(1733,1733,1733),(1734,1734,1734),(1735,1735,1735), -(1736,1736,1736),(1737,1737,1737),(1738,1738,1738),(1739,1739,1739),(1740,1740,1740), -(1741,1741,1741),(1742,1742,1742),(1743,1743,1743),(1744,1744,1744),(1745,1745,1745), -(1746,1746,1746),(1747,1747,1747),(1748,1748,1748),(1749,1749,1749),(1750,1750,1750), -(1751,1751,1751),(1752,1752,1752),(1753,1753,1753),(1754,1754,1754),(1755,1755,1755), -(1756,1756,1756),(1757,1757,1757),(1758,1758,1758),(1759,1759,1759),(1760,1760,1760), -(1761,1761,1761),(1762,1762,1762),(1763,1763,1763),(1764,1764,1764),(1765,1765,1765), -(1766,1766,1766),(1767,1767,1767),(1768,1768,1768),(1769,1769,1769),(1770,1770,1770), -(1771,1771,1771),(1772,1772,1772),(1773,1773,1773),(1774,1774,1774),(1775,1775,1775), -(1776,1776,1776),(1777,1777,1777),(1778,1778,1778),(1779,1779,1779),(1780,1780,1780), -(1781,1781,1781),(1782,1782,1782),(1783,1783,1783),(1784,1784,1784),(1785,1785,1785), -(1786,1786,1786),(1787,1787,1787),(1788,1788,1788),(1789,1789,1789),(1790,1790,1790), -(1791,1791,1791),(1792,1792,1792),(1793,1793,1793),(1794,1794,1794),(1795,1795,1795), -(1796,1796,1796),(1797,1797,1797),(1798,1798,1798),(1799,1799,1799),(1800,1800,1800), -(1801,1801,1801),(1802,1802,1802),(1803,1803,1803),(1804,1804,1804),(1805,1805,1805), -(1806,1806,1806),(1807,1807,1807),(1808,1808,1808),(1809,1809,1809),(1810,1810,1810), -(1811,1811,1811),(1812,1812,1812),(1813,1813,1813),(1814,1814,1814),(1815,1815,1815), -(1816,1816,1816),(1817,1817,1817),(1818,1818,1818),(1819,1819,1819),(1820,1820,1820), -(1821,1821,1821),(1822,1822,1822),(1823,1823,1823),(1824,1824,1824),(1825,1825,1825), -(1826,1826,1826),(1827,1827,1827),(1828,1828,1828),(1829,1829,1829),(1830,1830,1830), -(1831,1831,1831),(1832,1832,1832),(1833,1833,1833),(1834,1834,1834),(1835,1835,1835), -(1836,1836,1836),(1837,1837,1837),(1838,1838,1838),(1839,1839,1839),(1840,1840,1840), -(1841,1841,1841),(1842,1842,1842),(1843,1843,1843),(1844,1844,1844),(1845,1845,1845), -(1846,1846,1846),(1847,1847,1847),(1848,1848,1848),(1849,1849,1849),(1850,1850,1850), -(1851,1851,1851),(1852,1852,1852),(1853,1853,1853),(1854,1854,1854),(1855,1855,1855), -(1856,1856,1856),(1857,1857,1857),(1858,1858,1858),(1859,1859,1859),(1860,1860,1860), -(1861,1861,1861),(1862,1862,1862),(1863,1863,1863),(1864,1864,1864),(1865,1865,1865), -(1866,1866,1866),(1867,1867,1867),(1868,1868,1868),(1869,1869,1869),(1870,1870,1870), -(1871,1871,1871),(1872,1872,1872),(1873,1873,1873),(1874,1874,1874),(1875,1875,1875), -(1876,1876,1876),(1877,1877,1877),(1878,1878,1878),(1879,1879,1879),(1880,1880,1880), -(1881,1881,1881),(1882,1882,1882),(1883,1883,1883),(1884,1884,1884),(1885,1885,1885), -(1886,1886,1886),(1887,1887,1887),(1888,1888,1888),(1889,1889,1889),(1890,1890,1890), -(1891,1891,1891),(1892,1892,1892),(1893,1893,1893),(1894,1894,1894),(1895,1895,1895), -(1896,1896,1896),(1897,1897,1897),(1898,1898,1898),(1899,1899,1899),(1900,1900,1900), -(1901,1901,1901),(1902,1902,1902),(1903,1903,1903),(1904,1904,1904),(1905,1905,1905), -(1906,1906,1906),(1907,1907,1907),(1908,1908,1908),(1909,1909,1909),(1910,1910,1910), -(1911,1911,1911),(1912,1912,1912),(1913,1913,1913),(1914,1914,1914),(1915,1915,1915), -(1916,1916,1916),(1917,1917,1917),(1918,1918,1918),(1919,1919,1919),(1920,1920,1920), -(1921,1921,1921),(1922,1922,1922),(1923,1923,1923),(1924,1924,1924),(1925,1925,1925), -(1926,1926,1926),(1927,1927,1927),(1928,1928,1928),(1929,1929,1929),(1930,1930,1930), -(1931,1931,1931),(1932,1932,1932),(1933,1933,1933),(1934,1934,1934),(1935,1935,1935), -(1936,1936,1936),(1937,1937,1937),(1938,1938,1938),(1939,1939,1939),(1940,1940,1940), -(1941,1941,1941),(1942,1942,1942),(1943,1943,1943),(1944,1944,1944),(1945,1945,1945), -(1946,1946,1946),(1947,1947,1947),(1948,1948,1948),(1949,1949,1949),(1950,1950,1950), -(1951,1951,1951),(1952,1952,1952),(1953,1953,1953),(1954,1954,1954),(1955,1955,1955), -(1956,1956,1956),(1957,1957,1957),(1958,1958,1958),(1959,1959,1959),(1960,1960,1960), -(1961,1961,1961),(1962,1962,1962),(1963,1963,1963),(1964,1964,1964),(1965,1965,1965), -(1966,1966,1966),(1967,1967,1967),(1968,1968,1968),(1969,1969,1969),(1970,1970,1970), -(1971,1971,1971),(1972,1972,1972),(1973,1973,1973),(1974,1974,1974),(1975,1975,1975), -(1976,1976,1976),(1977,1977,1977),(1978,1978,1978),(1979,1979,1979),(1980,1980,1980), -(1981,1981,1981),(1982,1982,1982),(1983,1983,1983),(1984,1984,1984),(1985,1985,1985), -(1986,1986,1986),(1987,1987,1987),(1988,1988,1988),(1989,1989,1989),(1990,1990,1990), -(1991,1991,1991),(1992,1992,1992),(1993,1993,1993),(1994,1994,1994),(1995,1995,1995), -(1996,1996,1996),(1997,1997,1997),(1998,1998,1998),(1999,1999,1999); - -SELECT COUNT(*) FROM t1; - - -# -# Insert duplicate rows -# ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (1,1,1); - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - -select count(*) from t1; - - -# -# Test that select count(*) can see inserts made in the same transaction -# -begin; -SELECT COUNT(*) FROM t1; -INSERT INTO t1 VALUES -(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005); -SELECT COUNT(*) FROM t1; -rollback; - -# -# Insert duplicate rows, inside transaction -# try to commit -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -commit; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# rollback -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to select, finally rollback -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to select, finally commit -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - ---error 1296 -SELECT * FROM t1 WHERE pk1=10; - ---error 1296 -commit; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - - -# -# Insert duplicate rows, inside transaction -# then try to do another insert -# -begin; - ---error 1022 -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); - ---error 1296 -INSERT INTO t1 values (4000, 40, 44); - -rollback; - -select * from t1 where pk1=1; -select * from t1 where pk1=10; -select count(*) from t1 where pk1 <= 10 order by pk1; -select count(*) from t1; - -# -# Insert duplicate rows using "insert .. select" - -# ---error 1022 -insert into t1 select * from t1 where b < 10 order by pk1; - -DELETE FROM t1 WHERE pk1=2; - -begin; -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; -rollback; - -INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4); -select * from t1 where pk1 < 3 order by pk1; - -REPLACE INTO t1 values(1, 78, 3); -select * from t1 where pk1=1; - -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79; -select * from t1 where pk1 < 4 order by pk1; - -INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c; -select * from t1 where pk1 < 4 order by pk1; - -DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6; -INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b; -select * from t1 where pk1 = b and b != c order by pk1; - -# Test handling of duplicate unique -DELETE FROM t1; -CREATE UNIQUE INDEX bi ON t1(b); -INSERT INTO t1 VALUES -(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5), -(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10); -INSERT INTO t1 VALUES(0,1,0),(21,21,21) ON DUPLICATE KEY UPDATE pk1=b+10,b=b+10; -select * from t1 order by pk1; - -DROP TABLE t1; - -# -# Bug #6331: problem with 'insert ignore' -# - -CREATE TABLE t1(a INT) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 SELECT a FROM t1; -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -SELECT * FROM t1 ORDER BY a; -DELETE FROM t1; -CREATE UNIQUE INDEX ai ON t1(a); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (1); -INSERT IGNORE INTO t1 VALUES (NULL),(2); -SELECT * FROM t1 ORDER BY a; -DROP TABLE t1; - -# Ignore and NULL values -CREATE TABLE t1(pk INT NOT NULL PRIMARY KEY, a INT, UNIQUE (a)) ENGINE=ndb; -INSERT IGNORE INTO t1 VALUES (1,1),(2,2),(3,3); -INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4); -SELECT * FROM t1 ORDER BY pk; -DROP TABLE t1; - -# -# Bug #27980 INSERT IGNORE wrongly ignores NULLs in unique index -# - -create table t1(a int primary key, b int, unique key(b)) engine=ndb; -insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); -select * from t1 order by a; -drop table t1; - -# Bug#26342 auto_increment_increment AND auto_increment_offset REALLY REALLY anger NDB cluster - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM; - -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_offset=5; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t1 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (pk,b,c) VALUES (27,4,3),(NULL,5,4),(99,6,5),(NULL,7,6); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -TRUNCATE t1; -TRUNCATE t2; -SET @@session.auto_increment_increment=2; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; - -SET @@session.auto_increment_offset=1; -SET @@session.auto_increment_increment=1; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 3; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 3; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 7; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 7; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 5; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 5; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -CREATE TABLE t1 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=NDBCLUSTER AUTO_INCREMENT = 100; - -CREATE TABLE t2 ( - pk INT NOT NULL PRIMARY KEY AUTO_INCREMENT, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=MYISAM AUTO_INCREMENT = 100; - -SET @@session.auto_increment_offset=5; -SET @@session.auto_increment_increment=10; -INSERT INTO t1 (b,c) VALUES (1,0),(2,1),(3,2); -INSERT INTO t2 (b,c) VALUES (1,0),(2,1),(3,2); -SELECT * FROM t1 ORDER BY pk; -SELECT COUNT(t1.pk) FROM t1, t2 WHERE t1.pk = t2.pk AND t1.b = t2.b AND t1.c = t1.c; -DROP TABLE t1, t2; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_limit.test b/mysql-test/t/ndb_limit.test deleted file mode 100644 index 01613606d66..00000000000 --- a/mysql-test/t/ndb_limit.test +++ /dev/null @@ -1,85 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t2; ---enable_warnings - - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - - -# -# insert records into table -# -let $1=1000; -disable_query_log; -while ($1) -{ - eval insert into t2 values($1*10, $1+9, 5*$1), ($1*10+1, $1+10, 7),($1*10+2, $1+10, 7*$1), ($1*10+3, $1+10, 10+$1), ($1*10+4, $1+10, 70*$1), ($1*10+5, $1+10, 7), ($1*10+6, $1+10, 9), ($1*10+7, $1+299, 899), ($1*10+8, $1+10, 12), ($1*10+9, $1+10, 14*$1); - dec $1; -} -enable_query_log; - -select count(*) from t2; - -delete from t2 limit 1; -select count(*) from t2; - -delete from t2 limit 100; -select count(*) from t2; - -delete from t2 limit 1000; -select count(*) from t2; - -update t2 set c=12345678 limit 100; -select count(*) from t2 where c=12345678; -select count(*) from t2 where c=12345678 limit 1000; - -select * from t2 limit 0; - -drop table t2; - -CREATE TABLE `t2` ( - `views` int(11) NOT NULL default '0', - `clicks` int(11) NOT NULL default '0', - `day` date NOT NULL default '0000-00-00', - `hour` tinyint(4) NOT NULL default '0', - `bannerid` smallint(6) NOT NULL default '0', - `zoneid` smallint(6) NOT NULL default '0', - `source` varchar(50) NOT NULL default '', - PRIMARY KEY (`day`,`hour`,`bannerid`,`zoneid`,`source`), - KEY `bannerid_day` (`bannerid`,`day`), - KEY `zoneid` (`zoneid`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO `t2` VALUES -( 1,0,'2004-09-17', 5,100,100,''), -( 1,0,'2004-09-18', 7,100,100,''), -( 17,0,'2004-09-27',20,132,100,''), -( 4,0,'2004-09-16',23,132,100,''), -( 86,0,'2004-09-18', 7,196,196,''), -( 11,0,'2004-09-16',16,132,100,''), -(140,0,'2004-09-18', 0,100,164,''), -( 2,0,'2004-09-17', 7,132,100,''), -(846,0,'2004-09-27',11,132,164,''), -( 1,0,'2004-09-18', 8,132,100,''), -( 22,0,'2004-09-27', 9,164,132,''), -(711,0,'2004-09-27', 9,100,164,''), -( 11,0,'2004-09-18', 0,196,132,''), -( 41,0,'2004-09-27',15,196,132,''), -( 57,0,'2004-09-18', 2,164,196,''); - -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC; - -SELECT DATE_FORMAT(day, '%Y%m%d') as date, DATE_FORMAT(day, '%d-%m-%Y') -as date_formatted FROM t2 GROUP BY day ORDER BY day DESC LIMIT 2; - -drop table t2; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_load.test b/mysql-test/t/ndb_load.test deleted file mode 100644 index af2df70b74e..00000000000 --- a/mysql-test/t/ndb_load.test +++ /dev/null @@ -1,24 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test for different types of loading data -# - -# should give duplicate key -CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=NDB; ---error 1022 -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ; -DROP TABLE t1; - -# now without a primary key we should be ok -CREATE TABLE t1 (word CHAR(20) NOT NULL) ENGINE=NDB; -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1 ; -SELECT * FROM t1 ORDER BY word; -DROP TABLE t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_loaddatalocal.test b/mysql-test/t/ndb_loaddatalocal.test deleted file mode 100644 index 3eae3891f43..00000000000 --- a/mysql-test/t/ndb_loaddatalocal.test +++ /dev/null @@ -1,70 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -create table t1(a int) engine=myisam; -let $1=10000; -disable_query_log; -set SQL_LOG_BIN=0; -while ($1) -{ - insert into t1 values(1); - dec $1; -} -set SQL_LOG_BIN=1; -enable_query_log; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -#This will generate a 20KB file, now test LOAD DATA LOCAL -drop table t1; - -create table t1(a int) engine=ndb; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; -select count(*) from t1; ---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (2), (3); ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (1), (2), (3); ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -create table t1(a int) engine=myisam; -insert into t1 values (1), (2), (3), (3); ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1; -drop table t1; - -create table t1(a int primary key) engine=ndb; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile -select * from t1 order by a; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_lock.test b/mysql-test/t/ndb_lock.test deleted file mode 100644 index b6cd1ca7eb4..00000000000 --- a/mysql-test/t/ndb_lock.test +++ /dev/null @@ -1,269 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; ---enable_warnings - -# -# Transaction lock test to show that the NDB -# table handler is working properly with -# transaction locks -# - -# -# Testing of scan isolation -# -connection con1; -create table t1 (x integer not null primary key, y varchar(32)) engine = ndb; -insert into t1 values (1,'one'), (2,'two'); -select * from t1 order by x; - -connection con2; -select * from t1 order by x; - -connection con1; -start transaction; -insert into t1 values (3,'three'); -select * from t1 order by x; - -connection con2; -start transaction; -select * from t1 order by x; - -connection con1; -commit; - -connection con2; -select * from t1 order by x; -commit; - -drop table t1; - -### -# Bug#6020 -create table t1 (pk integer not null primary key, u int not null, o int not null, - unique(u), key(o)) engine = ndb; -insert into t1 values (1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5); - -lock tables t1 write; -delete from t1 where pk = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -lock tables t1 write; -delete from t1 where u = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -lock tables t1 write; -delete from t1 where o = 1; -unlock tables; -select * from t1 order by pk; -insert into t1 values (1,1,1); - -drop table t1; - -# Lock for update - -create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb; - -insert into t1 values (1,'one',1); - -# PK access -connection con1; -begin; -select * from t1 where x = 1 for update; - -connection con2; -begin; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -rollback; -insert into t1 values (2,'two',2),(3,"three",3); -begin; -select * from t1 where x = 1 for update; - -connection con2; ---error 1205 -select * from t1 where x = 1 for update; -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -# table scan -# -# Note that there are two distinct execution paths in which we unlock -# non-matching rows inspected during table scan - one that is used in -# case of filesort and one that used in rest of cases. Below we cover -# the latter (Bug #20390 "SELECT FOR UPDATE does not release locks of -# untouched rows in full table scans"). -connection con1; -begin; -# We can't use "order by x" here as it will cause filesort ---replace_column 1 # 2 # 3 # -select * from t1 where y = 'one' or y = 'three' for update; - -connection con2; -begin; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# And now the test for case with filesort -begin; -select * from t1 where y = 'one' or y = 'three' order by x for update; -connection con2; -begin; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# index scan -connection con1; -begin; -select * from t1 where z > 1 and z < 3 for update; - -connection con2; -begin; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 1 for update; ---error 1105,1205 -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -# share locking - -# PK access -connection con1; -begin; -select * from t1 where x = 1 lock in share mode; - -connection con2; -begin; -select * from t1 where x = 1 lock in share mode; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# table scan -connection con1; -begin; -# We can't use "order by x" here as it will cause filesort ---replace_column 1 # 2 # 3 # -select * from t1 where y = 'one' or y = 'three' lock in share mode; - -connection con2; -begin; -select * from t1 where y = 'one' lock in share mode; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# And the same test for case with filesort -connection con1; -begin; -select * from t1 where y = 'one' or y = 'three' order by x lock in share mode; - -connection con2; -begin; -select * from t1 where y = 'one' lock in share mode; -select * from t1 where x = 2 for update; ---error 1205 -select * from t1 where x = 1 for update; -rollback; - -connection con1; -commit; - -# index scan -connection con1; -begin; -select * from t1 where z > 1 and z < 3 lock in share mode; - -connection con2; -begin; -select * from t1 where z = 1 lock in share mode; -# Have to check with pk access here since scans take locks on -# all rows and then release them in chunks -select * from t1 where x = 1 for update; ---error 1205 -select * from t1 where x = 2 for update; -rollback; - -connection con1; -commit; - -drop table t1; - -# End of 4.1 tests - -# -# Bug #17812 Previous lock table for write causes "stray" lock -# although table is recreated -# -# this creating, locking, and dropping causes a subsequent hang -# on the delete below waiting for table t2 the locking in the -# "other" connection is relevant, as without it there is no problem -# -connection con1; -create table t3 (id2 int) engine=ndb; - -connection con2; -lock tables t3 write; -unlock tables; - -connection con1; -drop table t3; - -connection con1; -create table t2 (id int, j int) engine=ndb; -insert into t2 values (2, 2); -create table t3 (id int) engine=ndb; - -connection con2; -lock tables t3 read; - -connection con1; -# here we get a hang before bugfix although we shouldn't -delete t2 from t2, t3 where t2.id = t3.id; - -connection con2; -unlock tables; - -connection con1; -drop table t2, t3; diff --git a/mysql-test/t/ndb_minmax.test b/mysql-test/t/ndb_minmax.test deleted file mode 100644 index a3ac677cd2a..00000000000 --- a/mysql-test/t/ndb_minmax.test +++ /dev/null @@ -1,65 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2; ---enable_warnings - -CREATE TABLE t1 ( - a int PRIMARY KEY -) engine = ndb; - -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -INSERT INTO t1 VALUES (6); - -select MAX(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select MIN(a) from t1; -select MIN(a) from t1; -select MIN(a) from t1; -select * from t1 order by a; -select MIN(a) from t1; -select MAX(a) from t1; -select MAX(a) from t1; -select * from t1 order by a; -drop table t1; - - -CREATE TABLE t2 ( - a int PRIMARY KEY, - b int not null, - c int not null, - KEY(b), - UNIQUE(c) -) engine = ndb; - -INSERT INTO t2 VALUES (1, 5, 1); -INSERT INTO t2 VALUES (2, 2, 7); -INSERT INTO t2 VALUES (3, 3, 3); -INSERT INTO t2 VALUES (4, 4, 4); -INSERT INTO t2 VALUES (5, 5, 5); -INSERT INTO t2 VALUES (6, 6, 6); -INSERT INTO t2 VALUES (7, 2, 10); -INSERT INTO t2 VALUES (8, 10, 2); - - -select MAX(a) from t2; -select MAX(b) from t2; -select MAX(c) from t2; -select MIN(a) from t2; -select MIN(b) from t2; -select MIN(c) from t2; -select * from t2 order by a; -select MIN(b) from t2; -select MAX(a) from t2; -select MAX(c) from t2; -select * from t2 order by a; -drop table t2; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_multi.test b/mysql-test/t/ndb_multi.test deleted file mode 100644 index 3482db1d1b2..00000000000 --- a/mysql-test/t/ndb_multi.test +++ /dev/null @@ -1,126 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -connection server2; -drop table if exists t1, t2, t3, t4; -connection server1; -drop table if exists t1, t2, t3, t4; ---enable_warnings - -flush status; - -# Create test tables on server1 -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like 'handler_discover%'; - -# Check dropping and recreating table on same server -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connection con1; -select * from t1; -connection con2; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection con1; -select * from t1; - -# Check dropping and recreating table on different server -connection server2; -show status like 'handler_discover%'; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection server1; -select * from t1; -select * from t1; - -# Connect to server2 and use the tables from there -connection server2; -flush status; -select * from t1; -update t1 set a=3 where a=2; -show status like 'handler_discover%'; - -# Create a new table on server2 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; - -# Check that the tables are accessible from server1 -connection server1; -select * from t1; -select * from t3; -show tables like 't4'; -show tables; - -drop table t1, t2, t3, t4; -# bug#21378 -connection server1; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(1),(3),(5); -select * from t1 order by c1; - -connection server2; -show tables; -create table t1(c1 int key)ENGINE=MyISAM; -insert into t1 values(100),(344),(533); -select * from t1 order by c1; - -connection server1; -alter table t1 engine=ndb; - -connection server2; -show tables; -select * from t1 order by c1; -drop table t1; - -connection server1; -select * from t1 order by c1; -drop table t1; -# End of 4.1 tests - -# Check distributed drop of database in 5.1 -create database db; -use db; -create table t1(x int) engine=ndb; - -connection server2; -use db; -show tables; - -connection server1; -drop database db; - -connection server2; ---error 1049 -show tables; - -connection server1; - -# bug#21495 -create database db; -use db; -create table t1(x int) engine=ndb; - -connection server2; -use db; -create table t2(x int) engine=myisam; -show tables; - -connection server1; -drop database db; - -connection server2; -show tables; -drop database db; - -connection server1; diff --git a/mysql-test/t/ndb_multi_row.test b/mysql-test/t/ndb_multi_row.test deleted file mode 100644 index 632a9fda89a..00000000000 --- a/mysql-test/t/ndb_multi_row.test +++ /dev/null @@ -1,76 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/not_embedded.inc --- source include/have_binlog_format_row.inc - - ---disable_warnings -connection server2; -drop table if exists t1, t2, t3, t4; -connection server1; -drop table if exists t1, t2, t3, t4; ---enable_warnings - -flush status; - -# Create test tables on server1 -create table t1 (a int) engine=ndbcluster; -create table t2 (a int) engine=ndbcluster; -insert into t1 value (2); -insert into t2 value (3); -select * from t1; -select * from t2; -show status like 'handler_discover%'; - -# Check dropping and recreating table on same server -connect (con1,localhost,root,,test); -connect (con2,localhost,root,,test); -connection con1; -select * from t1; -connection con2; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection con1; -select * from t1; - -# Check dropping and recreating table on different server -connection server2; -show status like 'handler_discover%'; -drop table t1; -create table t1 (a int) engine=ndbcluster; -insert into t1 value (2); -connection server1; -## Currently a retry is required remotely -#--error 1412 -#select * from t1; -#show warnings; -#flush table t1; -# Table definition change should be propagated automatically -select * from t1; - -# Connect to server2 and use the tables from there -connection server2; -flush status; -select * from t1; -update t1 set a=3 where a=2; -show status like 'handler_discover%'; - -# Create a new table on server2 -create table t3 (a int not null primary key, b varchar(22), -c int, last_col text) engine=ndb; -insert into t3 values(1, 'Hi!', 89, 'Longtext column'); -create table t4 (pk int primary key, b int) engine=ndb; - -# Check that the tables are accessible from server1 -connection server1; -select * from t1; -select * from t3; -show tables like 't4'; -show tables; - -drop table t1, t2, t3, t4; -connection server2; -drop table if exists t1, t3, t4; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_partition_error.test b/mysql-test/t/ndb_partition_error.test deleted file mode 100644 index 9db2a6a6f6d..00000000000 --- a/mysql-test/t/ndb_partition_error.test +++ /dev/null @@ -1,74 +0,0 @@ --- source include/have_ndb.inc -#--disable_abort_on_error -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - ---disable_query_log -set new=on; ---enable_query_log -# -# Partition by range, generate node group error -# ---error 1005 -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5) nodegroup 12, - partition x2 values less than (10) nodegroup 13, - partition x3 values less than (20) nodegroup 14); -show warnings; - -# -# Partition by range, create normal valid table -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -drop table t1; - -# -# Bug #17763 mysqld cores with list partitioning if update to missing partition -# -CREATE TABLE t1 (id INT) ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); -INSERT INTO t1 VALUES (2); ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -UPDATE t1 SET id=5 WHERE id=2; -DROP TABLE t1; - -# -# NULL for LIST partition -# -create table t1 (a int,b int, c int) -engine = ndb -partition by list(a) -partitions 2 -(partition x123 values in (11, 12), - partition x234 values in (5, 1)); ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -insert into t1 values (NULL,1,1); -drop table t1; diff --git a/mysql-test/t/ndb_partition_error2-master.opt b/mysql-test/t/ndb_partition_error2-master.opt deleted file mode 100644 index 955f7692c8b..00000000000 --- a/mysql-test/t/ndb_partition_error2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---ndbcluster diff --git a/mysql-test/t/ndb_partition_error2.test b/mysql-test/t/ndb_partition_error2.test deleted file mode 100644 index afedd0e3c5c..00000000000 --- a/mysql-test/t/ndb_partition_error2.test +++ /dev/null @@ -1,14 +0,0 @@ -disable_query_log; ---require r/true.require -select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; -enable_query_log; - ---disable_warnings -drop table if exists t1; ---enable_warnings -# -# Bug #27359 Partitions: memory allocation error message -# ---error ER_PARTITION_NOT_DEFINED_ERROR -create table t1 (s1 int) engine=ndbcluster; - diff --git a/mysql-test/t/ndb_partition_key.test b/mysql-test/t/ndb_partition_key.test deleted file mode 100644 index 78e2c9d15c2..00000000000 --- a/mysql-test/t/ndb_partition_key.test +++ /dev/null @@ -1,229 +0,0 @@ --- source include/have_ndb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic syntax test -# - -# Support for partition key verified -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b,c)) - ENGINE = NDB - PARTITION BY KEY (a,b); - -insert into t1 values (1,1,1,1); -select * from t1; -update t1 set d = 2 where a = 1 and b = 1 and c = 1; -select * from t1; -delete from t1; -select * from t1; - -drop table t1; - -# only support for partition key on primary key ---error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF -CREATE TABLE t1 (a int, b int, c int, d int, PRIMARY KEY(a,b)) - ENGINE = NDB - PARTITION BY KEY (c); - -CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY(a,b)) - ENGINE = NDB - PARTITION BY KEY (a); - -insert into t1 values - (1,1,3),(1,2,3),(1,3,3),(1,4,3),(1,5,3),(1,6,3), - (1,7,3),(1,8,3),(1,9,3),(1,10,3),(1,11,3),(1,12,3); - -select * from t1 order by b; - -DROP TABLE t1; - -# -# Test partition and char support -# - -CREATE TABLE t1 (a INT, b CHAR(10) COLLATE latin1_bin, c INT, d INT, - PRIMARY KEY (a,b,c) USING HASH) - ENGINE=NDB - DEFAULT CHARSET=latin1 - PARTITION BY KEY (b); - -insert into t1 values (1,"a",1,1),(2,"a",1,1),(3,"a",1,1); - -# should show only one attribute with DISTRIBUTION KEY ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | sed 's/Version: [0-9]*//' | sed 's/\(Length of frm data: \)[0-9]*/\1#/' - -# -# Test that explicit partition info is not shown in show create table -# result should not contain (PARTITION P0 ... etc) since this is what shows up in -# mysqldump, and we don't want that info there -# -show create table t1; - -DROP TABLE t1; - -# -# Bug #13155: Problem in Create Table using SHOW CREATE TABLE syntax -# -CREATE TABLE t1 (a int not null primary key) -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -drop table t1; - -CREATE TABLE t1 (a int not null primary key); -ALTER TABLE t1 -PARTITION BY KEY(a) -(PARTITION p0 ENGINE = NDB, PARTITION p1 ENGINE = NDB); - -drop table t1; - -# -# Bug #17754 Improper handling of removal of partitioning in ALTER TABLE -# Also added a number of general test cases in the same area -# -create table t1 (a int) -engine=ndb -partition by key(a) -(partition p0, partition p1); -show create table t1; - -alter table t1 engine=heap; -show create table t1; - -alter table t1 engine=ndb; -show create table t1; - -alter table t1 engine=heap remove partitioning; -show create table t1; - -alter table t1 engine=ndb -partition by key(a) -(partition p0, partition p1 engine = ndb); -show create table t1; - -alter table t1 -partition by key (a) -(partition p0 engine=ndb, partition p1 engine=ndb); -show create table t1; - -alter table t1 remove partitioning; -show create table t1; - ---error ER_MIX_HANDLER_ERROR -alter table t1 -partition by key(a) -(partition p0 engine=ndb, partition p1); - -alter table t1 -engine=ndb -partition by key(a) -(partition p0 engine=ndb, partition p1 engine = ndb); -show create table t1; - -drop table t1; - -# -# BUG 16810 Out of memory when coalesce partition -# -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - c4 BIT NOT NULL, - c5 FLOAT, - c6 VARCHAR(255), - c7 TIMESTAMP, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) PARTITIONS 5; - -let $j= 11; ---disable_query_log -while ($j) -{ - eval INSERT INTO t1 VALUES (NULL, "Tested Remotely from Texas, USA", $j, -b'0', - $j.00,"By JBM $j","2006-01-26"); - dec $j; -} ---enable_query_log -ALTER TABLE t1 COALESCE PARTITION 4; - -DROP TABLE t1; - -# -# Bug 16822: OPTIMIZE TABLE hangs test -# -CREATE TABLE t1 (a int primary key) -ENGINE=NDB -PARTITION BY KEY(a); ---error 1031 -ALTER TABLE t1 OPTIMIZE PARTITION p0; ---error 1031 -ALTER TABLE t1 CHECK PARTITION p0; ---error 1031 -ALTER TABLE t1 REPAIR PARTITION p0; ---error 1031 -ALTER TABLE t1 ANALYZE PARTITION p0; ---error 1031 -ALTER TABLE t1 REBUILD PARTITION p0; -DROP TABLE t1; - -# -# BUG 16806: ALTER TABLE fails -# -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) PARTITIONS 5; - -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -DROP TABLE t1; - -CREATE TABLE t1 ( - c1 MEDIUMINT NOT NULL AUTO_INCREMENT, - c2 TEXT NOT NULL, - c3 INT NOT NULL, - PRIMARY KEY(c1,c3)) - ENGINE=NDB - PARTITION BY KEY(c3) - (PARTITION p0 NODEGROUP 0, PARTITION p1 NODEGROUP 0); - -ALTER TABLE t1 ADD COLUMN c4 INT AFTER c1; -SELECT NODEGROUP,PARTITION_NAME FROM information_schema.partitions WHERE -table_name = "t1"; -DROP TABLE t1; - -# bug#25587 - -CREATE TABLE t1 ( -a tinyint unsigned NOT NULL, -b bigint(20) unsigned NOT NULL, -c char(12), -PRIMARY KEY (a,b) -) ENGINE ndb DEFAULT CHARSET=latin1 PARTITION BY KEY (a); - -insert into t1 values(1,1,'1'), (2,2,'2'), (3,3,'3'), (4,4,'4'), (5,5,'5'); -select * from t1 where a = 1; -select * from t1 where a = 2; -select * from t1 where a = 3; -select * from t1 where a = 4; -select * from t1 where a = 5; -delete from t1 where a = 1; -select * from t1 order by 1; -delete from t1 where a = 2; -select * from t1 order by 1; -delete from t1 where a = 3; -select * from t1 order by 1; -delete from t1 where a = 4; -select * from t1 order by 1; -delete from t1 where a = 5; -select * from t1 order by 1; - -drop table t1; diff --git a/mysql-test/t/ndb_partition_list.test b/mysql-test/t/ndb_partition_list.test deleted file mode 100644 index ccfcdbc84f4..00000000000 --- a/mysql-test/t/ndb_partition_list.test +++ /dev/null @@ -1,68 +0,0 @@ ---source include/have_ndb.inc -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Partition by list, basic -# - -CREATE TABLE t1 ( f_int1 INTEGER NOT NULL, f_int2 INTEGER NOT NULL, - f_char1 CHAR(10), - f_char2 CHAR(10), f_charbig VARCHAR(1000), -PRIMARY KEY (f_int1,f_int2)) -ENGINE = NDB -PARTITION BY LIST(MOD(f_int1 + f_int2,4)) -(PARTITION part_3 VALUES IN (-3), - PARTITION part_2 VALUES IN (-2), - PARTITION part_1 VALUES IN (-1), - PARTITION part0 VALUES IN (0), - PARTITION part1 VALUES IN (1), - PARTITION part2 VALUES IN (2), - PARTITION part3 VALUES IN (3,4,5)); - -INSERT INTO t1 SET f_int1 = -2, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 3, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 4, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 5, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; - -SELECT * FROM t1 ORDER BY f_int1; - -DROP TABLE t1; - -# -# Partition by list, no pk -# - -CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10), - f_char2 CHAR(10), f_charbig VARCHAR(1000)) -ENGINE = NDB -PARTITION BY LIST(f_int1) -(PARTITION part_1 VALUES IN (-1), - PARTITION part0 VALUES IN (0,1), - PARTITION part1 VALUES IN (2)); - -INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_charbig = '===20==='; -INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; -INSERT INTO t1 SET f_int1 = 2, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; ---error ER_NO_PARTITION_FOR_GIVEN_VALUE -INSERT INTO t1 SET f_int1 = 20, f_int2 = 1, f_char1 = '1', f_char2 = '1', f_charbig = '===1==='; - -SELECT * FROM t1 ORDER BY f_int1; - -DROP TABLE t1; - diff --git a/mysql-test/t/ndb_partition_range.test b/mysql-test/t/ndb_partition_range.test deleted file mode 100644 index 7952ba502d2..00000000000 --- a/mysql-test/t/ndb_partition_range.test +++ /dev/null @@ -1,264 +0,0 @@ --- source include/have_ndb.inc -#--disable_abort_on_error -# -# Simple test for the partition storage engine -# Focuses on range partitioning tests -# -#-- source include/have_partition.inc - ---disable_query_log -set new=on; ---enable_query_log - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Partition by range, basic -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(a,b), -index (a)) -engine = ndb -partition by range (a) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -# Simple insert and verify test -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (6, 1, 1); -INSERT into t1 values (10, 1, 1); -INSERT into t1 values (15, 1, 1); - ---replace_column 16 # 19 # 20 # -select * from information_schema.partitions where table_name= 't1'; - -select * from t1 order by a; - -select * from t1 where a=1 order by a; -select * from t1 where a=15 and b=1 order by a; -select * from t1 where a=21 and b=1 order by a; -select * from t1 where a=21 order by a; -select * from t1 where a in (1,6,10,21) order by a; -select * from t1 where b=1 and a in (1,6,10,21) order by a; - -drop table t1; - -# -# Partition by range, basic -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null, -primary key(b), -unique (a)) -engine = ndb -partition by range (b) -partitions 3 -(partition x1 values less than (5), - partition x2 values less than (10), - partition x3 values less than (20)); - -# Simple insert and verify test -INSERT into t1 values (1, 1, 1); -INSERT into t1 values (2, 6, 1); -INSERT into t1 values (3, 10, 1); -INSERT into t1 values (4, 15, 1); - -select * from t1 order by a; -UPDATE t1 set a = 5 WHERE b = 15; -select * from t1 order by a; -UPDATE t1 set a = 6 WHERE a = 5; -select * from t1 order by a; - -select * from t1 where b=1 order by b; -select * from t1 where b=15 and a=1 order by b; -select * from t1 where b=21 and a=1 order by b; -select * from t1 where b=21 order by b; -select * from t1 where b in (1,6,10,21) order by b; -select * from t1 where a in (1,2,5,6) order by b; -select * from t1 where a=1 and b in (1,6,10,21) order by b; - -DELETE from t1 WHERE b = 6; -DELETE from t1 WHERE a = 6; - -# -# Test that explicit partition info _is_ shown in show create table -# result _should_ contain (PARTITION x1 ... etc) -# -show create table t1; - -drop table t1; - -# -# Bug #17499, #17687 -# Alter partitioned NDB table causes mysqld to core -# - -CREATE TABLE t1 - (id MEDIUMINT NOT NULL, - b1 BIT(8), - vc VARCHAR(255), - bc CHAR(255), - d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, - total BIGINT UNSIGNED, - y YEAR, - t DATE) ENGINE=NDB - PARTITION BY RANGE (YEAR(t)) - (PARTITION p0 VALUES LESS THAN (1901), - PARTITION p1 VALUES LESS THAN (1946), - PARTITION p2 VALUES LESS THAN (1966), - PARTITION p3 VALUES LESS THAN (1986), - PARTITION p4 VALUES LESS THAN (2005), - PARTITION p5 VALUES LESS THAN MAXVALUE); - -INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -ALTER TABLE t1 ENGINE=MYISAM; -SELECT * FROM t1; -DROP TABLE t1; - -CREATE LOGFILE GROUP lg1 - ADD UNDOFILE 'undofile.dat' - INITIAL_SIZE 16M - UNDO_BUFFER_SIZE=1M - ENGINE=NDB; - -CREATE TABLESPACE ts1 - ADD DATAFILE 'datafile.dat' - USE LOGFILE GROUP lg1 - INITIAL_SIZE 12M - ENGINE NDB; - -CREATE TABLE test.t1 ( - a1 INT, - a2 TEXT NOT NULL, - a3 BIT NOT NULL, - a4 DECIMAL(8,3), - a5 INT NOT NULL, - a6 INT, - PRIMARY KEY(a1)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB - PARTITION BY LIST (a1) - (PARTITION p0 VALUES IN (1,2,3,4,5), - PARTITION p1 VALUES IN (6,7,8,9, 10), - PARTITION p2 VALUES IN (11, 12, 13, 14, 15)); - -# Alter table directly without any statements inbetween -ALTER TABLE test.t1 DROP COLUMN a6; -ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255); - -let $j= 15; ---disable_query_log -while ($j) -{ -eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA", -b'1',$j.00,$j+1,"By NIK $j"); -dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; - -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; - -DROP TABLE t1; - -CREATE TABLE test.t1 ( - a1 INT, - a2 TEXT NOT NULL, - a3 BIT NOT NULL, - a4 DECIMAL(8,3), - a5 INT NOT NULL, - a6 VARCHAR(255), - PRIMARY KEY(a1)) - TABLESPACE ts1 STORAGE DISK ENGINE=NDB - PARTITION BY HASH(a1) - PARTITIONS 4; - -let $j= 15; ---disable_query_log -while ($j) -{ -eval INSERT INTO test.t1 VALUES ($j, "Tested Remotely from Texas, USA", -b'1',$j.00,$j+1,"By NIK $j"); -dec $j; -} ---enable_query_log -SELECT COUNT(*) FROM test.t1; - -ALTER TABLE test.t1 DROP COLUMN a4; -SELECT COUNT(*) FROM test.t1; - -DROP TABLE t1; - -ALTER TABLESPACE ts1 - DROP DATAFILE 'datafile.dat' - ENGINE=NDB; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; - - -# -# Bug #17701 ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test -# - -CREATE TABLE t1 - (id MEDIUMINT NOT NULL, - b1 BIT(8), - vc VARCHAR(255), - bc CHAR(255), - d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, - total BIGINT UNSIGNED, - y YEAR, - t DATE) ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); - -INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); -SELECT * FROM t1; -ALTER TABLE t1 ADD PARTITION - (PARTITION p2 VALUES IN (412)); -SELECT * FROM t1; -DROP TABLE t1; - -# -# Bug #17806 Update on NDB table with list partition causes mysqld to core -# Bug #16385 Partitions: crash when updating a range partitioned NDB table -# -CREATE TABLE t1 ( -a int not null, -b int not null, -c int not null) -partition by list(a) -partitions 2 -(partition x123 values in (1,5,6), - partition x234 values in (4,7,8)); -INSERT into t1 VALUES (5,1,1); -select * from t1; -UPDATE t1 SET a=8 WHERE a=5 AND b=1; -select * from t1; -drop table t1; - -CREATE TABLE t1 ( f1 INTEGER, f2 char(20)) engine=ndb -PARTITION BY RANGE(f1) -( PARTITION part1 VALUES LESS THAN (2), -PARTITION part2 VALUES LESS THAN (1000)); -INSERT INTO t1 VALUES(1, '---1---'); -INSERT INTO t1 VALUES(2, '---2---'); -select * from t1 order by f1; -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2; -select * from t1 order by f1; -UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1; -select * from t1 order by f1; -drop table t1; diff --git a/mysql-test/t/ndb_read_multi_range.test b/mysql-test/t/ndb_read_multi_range.test deleted file mode 100644 index b490eeb68a3..00000000000 --- a/mysql-test/t/ndb_read_multi_range.test +++ /dev/null @@ -1,319 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2, r1; ---enable_warnings - -# -# Basic test to see that batching is working -# - -create table t1 ( - a int primary key, - b int not null, - c int not null, - index(b), unique index using hash(c) -) engine = ndb; -insert into t1 values - (1,2,1),(2,3,2),(3,4,3),(4,5,4), - (5,2,12),(6,3,11),(7,4,10),(8,5,9), - (9,2,8),(10,3,7),(11,4,6),(12,5,5); - -# batch on primary key -create table r1 as select * from t1 where a in (2,8,12); -select * from r1 order by a; -drop table r1; - -# batch on ordered index -create table r1 as select * from t1 where b in (1,2,5); -select * from r1 order by a; -drop table r1; - -# batch on unique hash index -create table r1 as select * from t1 where c in (2,8,12); -select * from r1 order by a; -drop table r1; - -# batch mixed -create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1); -select * from r1 order by a; -drop table r1; - -# batch on primary key, missing values -create table r1 as select * from t1 where a in (33,8,12); -select * from r1 order by a; -drop table r1; -create table r1 as select * from t1 where a in (2,33,8,12,34); -select * from r1 order by a; -drop table r1; - -# batch on ordered index, missing values -create table r1 as select * from t1 where b in (1,33,5); -select * from r1 order by a; -drop table r1; -select * from t1 where b in (1,33,5) order by a; -create table r1 as select * from t1 where b in (45,1,33,5,44); -select * from r1 order by a; -drop table r1; -select * from t1 where b in (45,22) order by a; - -# batch on unique hash index, missing values -create table r1 as select * from t1 where c in (2,8,33); -select * from r1 order by a; -drop table r1; -create table r1 as select * from t1 where c in (13,2,8,33,12); -select * from r1 order by a; -drop table r1; - -select * from t1 where a in (33,8,12) order by a; -select * from t1 where a in (33,34,35) order by a; -select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a; -select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a; -select * from t1 where c in (13,2,8,33,12) order by c,a; -drop table t1; - -# -# Somewhat more complicated -# - -create table t1 ( - a int not null, - b int not null, - c int not null, - d int not null, - e int not null, - primary key (a,b,c,d), index (d) -) engine = ndb; - -insert into t1 values - (1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1), - (5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1), - (9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1), - (1,2,1,2,1), - (1,2,1,3,1), - (1,2,1,4,1), - (1,2,1,5,1); - -# batch on primary key -create table r1 as select * from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2); -select * from r1 order by a,b,c,d; -drop table r1; - -# batched update ordered index, one value for all -update t1 set e = 100 - where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; -select * from t1 where d not in (12,6,7) and e = 100; - -# batched update primary key, one value for all -update t1 - set e = 101 - where a=1 and - b=2 and - c=1 and - d in (1,4,3,2); -select * - from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2) - order by a,b,c,d; -select * - from t1 - where not (a=1 and b=2 and c=1 and d in (1,4,3,2)) - and e=101; - - -# batched update ordered index, different values -update t1 - set e = - (case d - when 12 then 112 - when 6 then 106 - when 7 then 107 - end) - where d in (12,6,7); -select * from t1 where d in (12,6,7) order by a,b,c,d; - -# batched update primary key, different values -update t1 - set e = - (case d - when 1 then 111 - when 4 then 444 - when 3 then 333 - when 2 then 222 - end) - where a=1 and - b=2 and - c=1 and - d in (1,4,3,2); -select * - from t1 - where a=1 and b=2 and c=1 and d in (1,4,3,2) - order by a,b,c,d; - -# batched delete -delete from t1 where d in (12,6,7); -select * from t1 where d in (12,6,7); - -drop table t1; - -# null handling -create table t1 ( - a int not null primary key, - b int, - c int, - d int, - unique index (b), - index(c) -) engine = ndb; - -insert into t1 values - (1,null,1,1), - (2,2,2,2), - (3,null,null,3), - (4,4,null,4), - (5,null,5,null), - (6,6,6,null), - (7,null,null,null), - (8,8,null,null), - (9,null,9,9), - (10,10,10,10), - (11,null,null,11), - (12,12,null,12), - (13,null,13,null), - (14,14,14,null), - (15,null,null,null), - (16,16,null,null); - -create table t2 as select * from t1 where a in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -create table t2 as select * from t1 where b in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -create table t2 as select * from t1 where c in (5,6,7,8,9,10); -select * from t2 order by a; -drop table t2; - -drop table t1; - -# bug17729 - -CREATE TABLE t1 ( - a int(11) NOT NULL, - b int(11) NOT NULL, - c datetime default NULL, - PRIMARY KEY (a), - KEY idx_bc (b,c) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES -(406989,67,'2006-02-23 17:08:46'), (150078,67,'2005-10-26 11:17:45'), -(406993,67,'2006-02-27 11:20:57'), (245655,67,'2005-12-08 15:59:08'), -(406994,67,'2006-02-27 11:26:46'), (256,67,NULL), -(398341,67,'2006-02-20 04:48:44'), (254,67,NULL),(1120,67,NULL), -(406988,67,'2006-02-23 17:07:22'), (255,67,NULL), -(398340,67,'2006-02-20 04:38:53'),(406631,67,'2006-02-23 10:49:42'), -(245653,67,'2005-12-08 15:59:07'),(406992,67,'2006-02-24 16:47:18'), -(245654,67,'2005-12-08 15:59:08'),(406995,67,'2006-02-28 11:55:00'), -(127261,67,'2005-10-13 12:17:58'),(406991,67,'2006-02-24 16:42:32'), -(245652,67,'2005-12-08 15:58:27'),(398545,67,'2006-02-20 04:53:13'), -(154504,67,'2005-10-28 11:53:01'),(9199,67,NULL),(1,67,'2006-02-23 15:01:35'), -(223456,67,NULL),(4101,67,NULL),(1133,67,NULL), -(406990,67,'2006-02-23 18:01:45'),(148815,67,'2005-10-25 15:34:17'), -(148812,67,'2005-10-25 15:30:01'),(245651,67,'2005-12-08 15:58:27'), -(154503,67,'2005-10-28 11:52:38'); - -create table t11 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 asc; -create table t12 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > NOW()) order by 3 desc; -create table t21 select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 asc; -create table t22 engine = ndbcluster select * from t1 where b = 67 AND (c IS NULL OR c > '2005-12-08') order by 3 desc; - -select * from t11 order by 1,2,3; -select * from t12 order by 1,2,3; -select * from t21 order by 1,2,3; -select * from t22 order by 1,2,3; - -# join tests -select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null order by t12.a; - -update t22 set c = '2005-12-08 15:58:27' where a = 255; -select * from t22 order by 1,2,3; -select t21.* from t21,t22 where t21.a = t22.a and -t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a; - -delete from t22 where a > 245651; -update t22 set b = a + 1; -select * from t22 order by 1,2,3; -select t21.c, count(*) -from t21 -inner join t22 using (a) -where t22.b in (2,256,257,1121,1134,4102,9200,223457,245652) -group by t21.c -order by t21.c; - -DROP TABLE t1, t11, t12, t21, t22; - -# bug#19956 -CREATE TABLE t1 (id varchar(255) NOT NULL, - tag int(11) NOT NULL, - doc text NOT NULL, - type varchar(150) NOT NULL, - modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (id) - ) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); -SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); - -DROP TABLE t1; - -#bug#25522 -CREATE TABLE t1 ( - var1 int(2) NOT NULL, - var2 int(2) NOT NULL, - PRIMARY KEY (var1) - ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; - - -CREATE TABLE t2 ( - var1 int(2) NOT NULL, - var2 int(2) NOT NULL, - PRIMARY KEY (var1) - ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; - - -DELIMITER |; -CREATE TRIGGER testtrigger - AFTER UPDATE ON t1 FOR EACH ROW BEGIN - REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| -DELIMITER ;| - -INSERT INTO t1 VALUES (1,1),(2,2),(3,3); - -UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); - -DROP TRIGGER testtrigger; - -DROP TABLE t1, t2; - -#bug#25821 -create table t1 (a int, b int, primary key (a), key ab (a,b)) engine=ndbcluster; - -insert into t1 values (1,1), (10,10); - -select * from t1 use index (ab) where a in(1,10) order by a; - -create table t2 (a int, b int, primary key (a,b)) engine=ndbcluster -partition by key(a); - -insert into t2 values (1,1), (10,10); - -select * from t2 where a in (1,10) order by a; - -drop table t1, t2; diff --git a/mysql-test/t/ndb_rename.test b/mysql-test/t/ndb_rename.test deleted file mode 100644 index 7f9fd0e6984..00000000000 --- a/mysql-test/t/ndb_rename.test +++ /dev/null @@ -1,36 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2; -drop database if exists mysqltest; ---enable_warnings - -# -# Table rename tests -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL, - attr2 INT, - attr3 VARCHAR(10), - INDEX i1(attr1) -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0,0,0,"zero"),(1,1,1,"one"),(2,2,2,"two"); -SELECT * FROM t1 WHERE attr1 = 1; -alter table t1 rename t2; -SELECT * FROM t2 WHERE attr1 = 1; - -create database ndbtest; -alter table t2 rename ndbtest.t2; -SELECT * FROM ndbtest.t2 WHERE attr1 = 1; - -drop table ndbtest.t2; -drop database ndbtest; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_replace.test b/mysql-test/t/ndb_replace.test deleted file mode 100644 index aa2072b98dd..00000000000 --- a/mysql-test/t/ndb_replace.test +++ /dev/null @@ -1,104 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - -# -# Test of REPLACE with NDB -# - ---disable_warnings -drop table if exists t1,t2; ---enable_warnings - -CREATE TABLE t1 ( - gesuchnr int(11) DEFAULT '0' NOT NULL, - benutzer_id int(11) DEFAULT '0' NOT NULL, - PRIMARY KEY (gesuchnr,benutzer_id) -) engine=ndbcluster; - -replace into t1 (gesuchnr,benutzer_id) values (2,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -insert into t1 (gesuchnr, benutzer_id) value (3,2); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); ---error ER_DUP_ENTRY -insert into t1 (gesuchnr,benutzer_id) values (1,1); -replace into t1 (gesuchnr,benutzer_id) values (1,1); -select * from t1 order by gesuchnr; -drop table t1; - -# End of 4.1 tests - -# bug#17431 -CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT, - j INT, - k INT, - UNIQUE INDEX(j) - ) ENGINE = ndb; -INSERT INTO t1 VALUES (1,1,23),(2,2,24); -REPLACE INTO t1 (j,k) VALUES (1,42); -REPLACE INTO t1 (i,j) VALUES (17,2); -SELECT * from t1 ORDER BY i; -DROP TABLE t1; - -# bug#19906 -CREATE TABLE t2 (a INT(11) NOT NULL, - b INT(11) NOT NULL, - c INT(11) NOT NULL, - x TEXT, - y TEXT, - z TEXT, - id INT(10) unsigned NOT NULL AUTO_INCREMENT, - i INT(11) DEFAULT NULL, - PRIMARY KEY (id), - UNIQUE KEY a (a,b,c) -) ENGINE=ndbcluster; - -REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3); - -SELECT * FROM t2 ORDER BY id; - -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1); -REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2); - -SELECT * FROM t2 ORDER BY id; - -DROP TABLE t2; - -# -# Bug #20728 "REPLACE does not work correctly for NDB table with PK and -# unique index" -# ---disable_warnings -drop table if exists t1; ---enable_warnings -create table t1 (pk int primary key, apk int unique, data int) engine=ndbcluster; -# Test for plain replace which updates pk -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (4, 1), (5, 2); -select * from t1 order by pk; -delete from t1; -# Another test for plain replace which doesn't touch pk -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) values (1, 4), (2, 5); -select * from t1 order by pk; -delete from t1; -# Test for load data replace which updates pk -insert into t1 values (1, 1, 1), (4, 4, 4), (6, 6, 6); -load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -delete from t1; -# Now test for load data replace which doesn't touch pk -insert into t1 values (1, 1, 1), (3, 3, 3), (5, 5, 5); -load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (pk, apk); -select * from t1 order by pk; -delete from t1; -# Finally test for both types of replace ... select -insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3); -replace into t1 (pk, apk) select 4, 1; -replace into t1 (pk, apk) select 2, 4; -select * from t1 order by pk; -# Clean-up -drop table t1; - ---echo End of 5.0 tests. diff --git a/mysql-test/t/ndb_restore.test b/mysql-test/t/ndb_restore.test deleted file mode 100644 index 7f0cafdfd77..00000000000 --- a/mysql-test/t/ndb_restore.test +++ /dev/null @@ -1,403 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---enable_warnings - -# Bug #27775 - mediumint auto inc not restored correctly -# - check mediumint -CREATE TABLE `t1_c` ( - `capgoaledatta` mediumint(5) unsigned NOT NULL auto_increment, - `goaledatta` char(2) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(400,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3000,'20','threetrees.qt'); -# -# Bug #27758 Restoring NDB backups makes table usable in SQL nodes -# - space in key made table unusable after restore -# -# Bug #27775 - mediumint auto inc not restored correctly -# - check smallint -CREATE TABLE `t2_c` ( - `capgotod` smallint(5) unsigned NOT NULL auto_increment, - `gotod` smallint(5) unsigned NOT NULL default '0', - `goaledatta` char(2) default NULL, - `maturegarbagefa` varchar(32) default NULL, - `descrpooppo` varchar(64) default NULL, - `svcutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capgotod`), - KEY `i quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'),(5,0,'',NULL,NULL,''); - -# Added ROW_FORMAT=FIXED to use below to see that setting is preserved -# by restore -CREATE TABLE `t3_c` ( - `CapGoaledatta` smallint(5) unsigned NOT NULL default '0', - `capgotod` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); - -# Bug #27775 - mediumint auto inc not restored correctly -# - check bigint -CREATE TABLE `t4_c` ( - `capfa` bigint(20) unsigned NOT NULL auto_increment, - `realm` varchar(32) NOT NULL default '', - `authpwchap` varchar(32) default NULL, - `fa` varchar(32) NOT NULL default '', - `payyingatta` tinyint(4) NOT NULL default '0', - `status` char(1) default NULL, - PRIMARY KEY (`fa`,`realm`), - KEY `capfa` (`capfa`), - KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(2200,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32000,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(290000000,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); - -CREATE TABLE `t5_c` ( - `capfa` bigint(20) unsigned NOT NULL default '0', - `gotod` smallint(5) unsigned NOT NULL default '0', - `orderutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); - -CREATE TABLE `t6_c` ( - `capfa_parent` bigint(20) unsigned NOT NULL default '0', - `capfa_child` bigint(20) unsigned NOT NULL default '0', - `relatta` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); - -# Bug #27775 - mediumint auto inc not restored correctly -# - check tinyint -CREATE TABLE `t7_c` ( - `dardpo` char(15) NOT NULL default '', - `dardtestard` tinyint(3) unsigned NOT NULL auto_increment, - `FastFA` char(5) NOT NULL default '', - `FastCode` char(6) NOT NULL default '', - `Fastca` char(1) NOT NULL default '', - `Fastmag` char(1) NOT NULL default '', - `Beareratta` char(2) NOT NULL default '', - PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); - -CREATE TABLE `t8_c` ( - `kattjame` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `aaaproxysessfa` varchar(255) default NULL, - `autologonallowed` char(1) default NULL, - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `acctoutputoctets` bigint(20) unsigned default NULL, - `acctinputoctets` bigint(20) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), - KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); - -CREATE TABLE `t9_c` ( - `kattjame` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `actcoutpuocttets` bigint(20) unsigned default NULL, - `actinputocctets` bigint(20) unsigned default NULL, - `terminateraste` tinyint(3) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); - -# Bug #20820 -# auto inc table not handled correctly when restored from cluster backup -# - before fix ndb_restore would not set auto inc value correct, -# seen by select below -CREATE TABLE t10_c (a INT AUTO_INCREMENT KEY) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t10_c VALUES (1),(2),(3); -# Bug #27775 - mediumint auto inc not restored correctly -# - check int -insert into t10_c values (10000),(2000),(3000); - -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; -create table t10 engine=myisam as select * from t10_c; - -# check that force varpart is preserved by ndb_restore -# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0 ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT -# check that force varpart is preserved by ndb_restore -# t3_c has ROW_FORMAT=FIXED i.e. ForceVarPart=0 ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t3_c | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t2_c | grep ForceVarPart - -# random output order?? -#show tables; - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# Bug #20820 cont'd -select * from t10_c order by a; -# Bug #27775 cont'd -# - auto inc info should be correct ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't1_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't2_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't4_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't7_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't10_c'; - -# -# Try Partitioned tables as well -# -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Drop all table except t2_c -# This to make sure that error returned from ndb_restore above is -# guaranteed to be from t2_c, this since order of tables in backup -# is none deterministic -# -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ---source include/ndb_backup.inc ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true - -# -# Cleanup -# - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; -drop table if exists t2_c; ---enable_warnings - -# -# Test BUG#10287 -# - ---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,/" - -# End of 5.0 tests (4.1 test intermixed to save test time) diff --git a/mysql-test/t/ndb_restore_compat.test b/mysql-test/t/ndb_restore_compat.test deleted file mode 100644 index 2622aec1d50..00000000000 --- a/mysql-test/t/ndb_restore_compat.test +++ /dev/null @@ -1,61 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc --- source include/have_case_sensitive_file_system.inc - -# This test currently requires case sensitive file system as the tables -# are originally stored with uppercase - -# -# Bug #18594 ndb_restore log boken in 5.1 -# - ---disable_warnings -DROP DATABASE IF EXISTS BANK; ---enable_warnings -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -m -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT -USE BANK; -SHOW TABLES; -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -SELECT COUNT(*) FROM TRANSACTION; -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; - -# Check that force varpart is set by ndb_restore ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart - -# -# verify restore of 5.0 backup -# here we must use the already created tables as restoring the old -# table definitions will not work -# -TRUNCATE GL; -TRUNCATE ACCOUNT; -TRUNCATE TRANSACTION; -TRUNCATE SYSTEM_VALUES; -TRUNCATE ACCOUNT_TYPE; - -# Check that force varpart is not changed by truncate ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK GL | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK TRANSACTION | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK SYSTEM_VALUES | grep ForceVarPart ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d BANK ACCOUNT_TYPE | grep ForceVarPart - -# Restore data ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -e -b 1 -n 2 -p 1 -r $MYSQL_TEST_DIR/std_data/ndb_backup50 >> $NDB_TOOLS_OUTPUT - -# Check data -SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; -SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; -SELECT COUNT(*) FROM TRANSACTION; -SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; -SELECT * FROM mysql.ndb_apply_status WHERE server_id=0; -DROP DATABASE BANK; diff --git a/mysql-test/t/ndb_restore_partition-master.opt b/mysql-test/t/ndb_restore_partition-master.opt deleted file mode 100644 index 075c6392dde..00000000000 --- a/mysql-test/t/ndb_restore_partition-master.opt +++ /dev/null @@ -1 +0,0 @@ ---new diff --git a/mysql-test/t/ndb_restore_partition.test b/mysql-test/t/ndb_restore_partition.test deleted file mode 100644 index f11324492c2..00000000000 --- a/mysql-test/t/ndb_restore_partition.test +++ /dev/null @@ -1,375 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---enable_warnings - -CREATE TABLE `t1_c` ( - `capgoaledatta` smallint(5) unsigned NOT NULL auto_increment, - `goaledatta` char(2) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt'); - -CREATE TABLE `t2_c` ( - `capgotod` smallint(5) unsigned NOT NULL auto_increment, - `gotod` smallint(5) unsigned NOT NULL default '0', - `goaledatta` char(2) default NULL, - `maturegarbagefa` varchar(32) default NULL, - `descrpooppo` varchar(64) default NULL, - `svcutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capgotod`), - KEY `i_quadaddsvr` (`gotod`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST'); - -CREATE TABLE `t3_c` ( - `CapGoaledatta` smallint(5) unsigned NOT NULL default '0', - `capgotod` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capgotod`,`CapGoaledatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3); - -CREATE TABLE `t4_c` ( - `capfa` bigint(20) unsigned NOT NULL auto_increment, - `realm` varchar(32) NOT NULL default '', - `authpwchap` varchar(32) default NULL, - `fa` varchar(32) NOT NULL default '', - `payyingatta` tinyint(4) NOT NULL default '0', - `status` char(1) default NULL, - PRIMARY KEY (`fa`,`realm`), - KEY `capfa` (`capfa`), - KEY `i_quadentity` (`fa`,`realm`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL); - -CREATE TABLE `t5_c` ( - `capfa` bigint(20) unsigned NOT NULL default '0', - `gotod` smallint(5) unsigned NOT NULL default '0', - `orderutonsa` varchar(64) NOT NULL default '', - PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,''); - -CREATE TABLE `t6_c` ( - `capfa_parent` bigint(20) unsigned NOT NULL default '0', - `capfa_child` bigint(20) unsigned NOT NULL default '0', - `relatta` smallint(5) unsigned NOT NULL default '0', - PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0); - -CREATE TABLE `t7_c` ( - `dardpo` char(15) NOT NULL default '', - `dardtestard` tinyint(3) unsigned NOT NULL default '0', - `FastFA` char(5) NOT NULL default '', - `FastCode` char(6) NOT NULL default '', - `Fastca` char(1) NOT NULL default '', - `Fastmag` char(1) NOT NULL default '', - `Beareratta` char(2) NOT NULL default '', - PRIMARY KEY (`dardpo`,`dardtestard`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3'); - -CREATE TABLE `t8_c` ( - `kattjame` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `aaaproxysessfa` varchar(255) default NULL, - `autologonallowed` char(1) default NULL, - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `acctoutputoctets` bigint(20) unsigned default NULL, - `acctinputoctets` bigint(20) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`), - KEY `squardporoot` (`squardporoot`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565); - -CREATE TABLE `t9_c` ( - `kattjame` varchar(32) NOT NULL default '', - `kattjame_entered` varchar(32) NOT NULL default '', - `realm` varchar(32) NOT NULL default '', - `realm_entered` varchar(32) NOT NULL default '', - `maturegarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa` varchar(32) NOT NULL default '', - `hunderaaarbagefa_parent` varchar(32) NOT NULL default '', - `gest` varchar(16) default NULL, - `hassetino` varchar(16) NOT NULL default '', - `squardporoot` varchar(15) NOT NULL default '', - `naspo` varchar(15) default NULL, - `beareratta` char(2) default NULL, - `fastCode` varchar(6) default NULL, - `fastFA` varchar(5) default NULL, - `fastca` char(1) default NULL, - `fastmag` char(1) default NULL, - `lastupdate` datetime default NULL, - `hassetistart` datetime NOT NULL default '0000-00-00 00:00:00', - `accthassetitime` int(10) unsigned default NULL, - `actcoutpuocttets` bigint(20) unsigned default NULL, - `actinputocctets` bigint(20) unsigned default NULL, - `terminateraste` tinyint(3) unsigned default NULL, - PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3); - -create table t1 engine=myisam as select * from t1_c; -create table t2 engine=myisam as select * from t2_c; -create table t3 engine=myisam as select * from t3_c; -create table t4 engine=myisam as select * from t4_c; -create table t5 engine=myisam as select * from t5_c; -create table t6 engine=myisam as select * from t6_c; -create table t7 engine=myisam as select * from t7_c; -create table t8 engine=myisam as select * from t8_c; -create table t9 engine=myisam as select * from t9_c; - - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# random output order?? -#show tables; - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Try Partitioned tables as well -# -ALTER TABLE t1_c -PARTITION BY RANGE (`capgoaledatta`) -(PARTITION p0 VALUES LESS THAN MAXVALUE); - -ALTER TABLE t2_c -PARTITION BY LIST(`capgotod`) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6)); - -ALTER TABLE t3_c -PARTITION BY HASH (`CapGoaledatta`); - -ALTER TABLE t5_c -PARTITION BY HASH (`capfa`) -PARTITIONS 4; - -ALTER TABLE t6_c -PARTITION BY LINEAR HASH (`relatta`) -PARTITIONS 4; - -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); - ---source include/ndb_backup.inc -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -select count(*) from t1; -select count(*) from t1_c; -select count(*) - from (select * from t1 union - select * from t1_c) a; - -select count(*) from t2; -select count(*) from t2_c; -select count(*) - from (select * from t2 union - select * from t2_c) a; - -select count(*) from t3; -select count(*) from t3_c; -select count(*) - from (select * from t3 union - select * from t3_c) a; - -select count(*) from t4; -select count(*) from t4_c; -select count(*) - from (select * from t4 union - select * from t4_c) a; - -select count(*) from t5; -select count(*) from t5_c; -select count(*) - from (select * from t5 union - select * from t5_c) a; - -select count(*) from t6; -select count(*) from t6_c; -select count(*) - from (select * from t6 union - select * from t6_c) a; - -select count(*) from t7; -select count(*) from t7_c; -select count(*) - from (select * from t7 union - select * from t7_c) a; - -select count(*) from t8; -select count(*) from t8_c; -select count(*) - from (select * from t8 union - select * from t8_c) a; - -select count(*) from t9; -select count(*) from t9_c; -select count(*) - from (select * from t9 union - select * from t9_c) a; - -# -# Drop all table except t2_c -# This to make sure that error returned from ndb_restore above is -# guaranteed to be from t2_c, this since order of tables in backup -# is none deterministic -# -drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; ---source include/ndb_backup.inc ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true - -# -# Cleanup -# - ---disable_warnings -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -drop table if exists t2_c; ---enable_warnings - -# -# Test BUG#10287 -# - ---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,/" - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_restore_print.test b/mysql-test/t/ndb_restore_print.test deleted file mode 100644 index 6dbbfdf5933..00000000000 --- a/mysql-test/t/ndb_restore_print.test +++ /dev/null @@ -1,189 +0,0 @@ --- source include/have_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -# basic datatypes -create table t1 - (pk int key - ,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64) - ,b1 TINYINT, b2 TINYINT UNSIGNED - ,c1 SMALLINT, c2 SMALLINT UNSIGNED - ,d1 INT, d2 INT UNSIGNED - ,e1 BIGINT, e2 BIGINT UNSIGNED - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine myisam; - -# max values -insert into t1 values - (1 - ,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001 - ,127, 255 - ,32767, 65535 - ,2147483647, 4294967295 - ,9223372036854775807, 18446744073709551615 - ,'1','12345678901234567890123456789012','123456789' - ,'1','12345678901234567890123456789012','123456789' - ,0x12,0x123456789abcdef0, 0x012345 - ,0x12,0x123456789abcdef0, 0x00123450 - ); - -# min values -insert into t1 values - (2 - ,0, 0, 0, 0, 0 - ,-128, 0 - ,-32768, 0 - ,-2147483648, 0 - ,-9223372036854775808, 0 - ,'','','' - ,'','','' - ,0x0,0x0,0x0 - ,0x0,0x0,0x0 - ); - -# null values -insert into t1 values - (3 - ,NULL,NULL,NULL,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ,NULL,NULL,NULL - ); - ---vertical_results -select pk - ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) - ,b1, b2 - ,c1 , c2 - ,d1 , d2 - ,e1 , e2 - ,f1 , f2, f3 - ,g1 , g2, g3 - ,hex(h1), hex(h2), hex(h3) - ,hex(i1), hex(i2), hex(i3) - from t1 order by pk; - -alter table t1 engine ndb; - -select pk - ,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5) - ,b1, b2 - ,c1 , c2 - ,d1 , d2 - ,e1 , e2 - ,f1 , f2, f3 - ,g1 , g2, g3 - ,hex(h1), hex(h2), hex(h3) - ,hex(i1), hex(i2), hex(i3) - from t1 order by pk; ---horizontal_results - ---source include/ndb_backup.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";" ---source include/ndb_backup_print.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by="," --fields-optionally-enclosed-by="'" ---source include/ndb_backup_print.inc - - -drop table t1; - -# some binary char tests with trailing spaces -create table t1 - (pk int key - ,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY - ,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY - ,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255) - ,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000) - ) engine ndb; - -insert into t1 values - (1 - ,'1','12345678901234567890123456789012','123456789 ' - ,'1 ','12345678901234567890123456789012 ','123456789 ' - ,0x20,0x123456789abcdef020, 0x012345000020 - ,0x1200000020,0x123456789abcdef000000020, 0x00123450000020 - ); - -create table t2 (pk int key, a int) engine ndb; -create table t3 (pk int key, a int) engine ndb; -create table t4 (pk int key, a int) engine ndb; - -insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15); -insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25); -insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); - ---source include/ndb_backup.inc ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-enclosed-by="'" --fields-optionally-enclosed-by="X" ---let ndb_restore_filter=test t1 ---source include/ndb_backup_print.inc - ---exec rm -f $MYSQLTEST_VARDIR/tmp/t1.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t2.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t3.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t4.txt - ---let ndb_restore_opts=--verbose=0 --print_data --hex --tab $MYSQLTEST_VARDIR/tmp --append ---let ndb_restore_filter=test ---source include/ndb_backup_print.inc - ---let $message= t1 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t1.txt ---let $message= t2 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t2.txt ---let $message= t3 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t3.txt ---let $message= t4 ---source include/show_msg.inc ---exec sort $MYSQLTEST_VARDIR/tmp/t4.txt - ---exec rm -f $MYSQLTEST_VARDIR/tmp/t1.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t2.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t3.txt ---exec rm -f $MYSQLTEST_VARDIR/tmp/t4.txt - -# now test some other datatypes -drop table t1; -create table t1 - (pk int key - ,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED - ) engine ndb; - -# max values -insert into t1 values(1, 8388607, 16777215); -# min values -insert into t1 values(2, -8388608, 0); -# small values -insert into t1 values(3, -1, 1); - -# backup and print ---source include/ndb_backup.inc - ---let ndb_restore_filter=test t1 ---let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";" ---source include/ndb_backup_print.inc - -# clean up -drop table t1; -drop table t2; -drop table t3; -drop table t4; diff --git a/mysql-test/t/ndb_row_format.test b/mysql-test/t/ndb_row_format.test deleted file mode 100644 index b1582cbe339..00000000000 --- a/mysql-test/t/ndb_row_format.test +++ /dev/null @@ -1,86 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# -# some negative tests -# - -# cannot have ROW_FORMAT=FIXED and var attrs mixed ---error 1005 -CREATE TABLE t1 - ( a INT KEY, - b VARCHAR(10) ) - ROW_FORMAT=FIXED - ENGINE=NDB; - -# warnings give more detail on the error -SHOW WARNINGS; - - -# -# Check force var part for different ROW_FORMAT -# - -# default => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# explicit DEFAULT => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=DEFAULT - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# FIXED => ForceVarPart: 0 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=FIXED - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# DYNAMIC => ForceVarPart: 1 -CREATE TABLE t1 - ( a INT KEY, - b INT ) - ROW_FORMAT=DYNAMIC - ENGINE=NDB; ---exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart -DROP TABLE t1; - -# test of bug -create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; -insert into t1(b) values ('0123456789'); -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -select count(*) from t1; -begin; -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -update t1 set b = concat(b,b); -rollback; -select count(*),b from t1 group by b; -drop table t1; diff --git a/mysql-test/t/ndb_single_user.test b/mysql-test/t/ndb_single_user.test deleted file mode 100644 index 3c6656be9f9..00000000000 --- a/mysql-test/t/ndb_single_user.test +++ /dev/null @@ -1,174 +0,0 @@ --- source include/have_ndb.inc --- source include/have_multi_ndb.inc --- source include/ndb_default_cluster.inc --- source include/not_embedded.inc - ---disable_warnings -use test; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; ---enable_warnings - -# operations allowed while cluster is in single user mode - ---connection server1 ---let $node_id= `SHOW STATUS LIKE 'Ndb_cluster_node_id'` ---disable_query_log ---eval set @node_id= SUBSTRING('$node_id', 20)+0 ---enable_query_log ---let $node_id= `SELECT @node_id` ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" --single-user >> $NDB_TOOLS_OUTPUT - -# verify that we are indeed in single user mode -# and test that some operations give correct errors ---connection server2 ---error 1005 -create table t1 (a int key, b int unique, c int) engine ndb; -# Bug #27712 Single user mode. Creating logfile group and tablespace is allowed -# - before bug fix these would succeed ---error 1516 -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; -show warnings; - -# test some sql on first mysqld ---connection server1 -create table t1 (a int key, b int unique, c int) engine ndb; -# Check that we can create logfile group -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; ---connection server2 ---error ER_CREATE_FILEGROUP_FAILED -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; -show warnings; ---error ER_DROP_FILEGROUP_FAILED -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -show warnings; ---connection server1 -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; ---connection server2 ---error ER_ALTER_FILEGROUP_FAILED -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; -show warnings; ---connection server1 -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE NDB; ---connection server2 ---error ER_DROP_FILEGROUP_FAILED -DROP TABLESPACE ts1 -ENGINE NDB; -show warnings; ---connection server1 -DROP TABLESPACE ts1 -ENGINE NDB; -DROP LOGFILE GROUP lg1 -ENGINE =NDB; -insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0); -create table t2 as select * from t1; -# read with pk -select * from t1 where a = 1; -# read with unique index -select * from t1 where b = 4; -# read with ordered index -select * from t1 where a > 4 order by a; -# update with pk -update t1 set b=102 where a = 2; -# update with unique index -update t1 set b=103 where b = 3; -# update with full table scan -update t1 set b=b+100; -# update with ordered insex scan -update t1 set b=b+100 where a > 7; -# delete with full table scan -delete from t1; -insert into t1 select * from t2; -# Bug #27710 Creating unique index fails during single user mode -# - prior to bugfix this would fail -create unique index new_index on t1 (b,c); - -# test some sql on other mysqld ---connection server2 ---error 1051 -drop table t1; ---error 1296 -create index new_index_fail on t1 (c); ---error 1296 -insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0); ---error 1296 -select * from t1 where a = 1; ---error 1296 -select * from t1 where b = 4; ---error 1296 -update t1 set b=102 where a = 2; ---error 1296 -update t1 set b=103 where b = 3; ---error 1296 -update t1 set b=b+100; ---error 1296 -update t1 set b=b+100 where a > 7; - ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT - -# -# we should be able to run transaction while in single user mode -# ---connection server1 -BEGIN; -update t1 set b=b+100 where a=1; - ---connection server2 -BEGIN; -update t1 set b=b+100 where a=2; - -# enter single user mode ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "enter single user mode $node_id" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" --single-user >> $NDB_TOOLS_OUTPUT - ---connection server1 -update t1 set b=b+100 where a=3; -COMMIT; - -# while on other mysqld it should be aborted ---connection server2 ---error 1296 -update t1 set b=b+100 where a=4; ---error 1296 -COMMIT; - -# Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb -# tables for other mysqld nodes ---connection server2 -create table t2 (a int) engine myisam; -alter table t2 add column (b int); - -# exit single user mode ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "exit single user mode" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT - -# cleanup ---connection server2 -drop table t2; ---connection server1 -drop table t1; - -# End of 5.0 tests - diff --git a/mysql-test/t/ndb_sp.test b/mysql-test/t/ndb_sp.test deleted file mode 100644 index b833869cad0..00000000000 --- a/mysql-test/t/ndb_sp.test +++ /dev/null @@ -1,42 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 ( - a int not null primary key, - b int not null -) engine=ndb; -insert into t1 values (1,10), (2,20), (3,100), (4, 100); - -delimiter //; -create procedure test_proc1 (in var_in int) -begin - select * from t1 where a = var_in; -end; -create procedure test_proc2 (out var_out int) -begin - select b from t1 where a = 1 into var_out; -end; -create procedure test_proc3 (inout var_inout int) -begin - select b from t1 where a = var_inout into var_inout; -end; -// -delimiter ;// -call test_proc1(1); -call test_proc2(@test_var); -select @test_var; -set @test_var = 1; -call test_proc3(@test_var); -select @test_var; -alter procedure test_proc1 comment 'new comment'; -show create procedure test_proc1; -drop procedure test_proc1; -drop procedure test_proc2; -drop procedure test_proc3; -drop table t1; - ---echo End of 5.1 tests diff --git a/mysql-test/t/ndb_subquery.test b/mysql-test/t/ndb_subquery.test deleted file mode 100644 index 6282c31c922..00000000000 --- a/mysql-test/t/ndb_subquery.test +++ /dev/null @@ -1,79 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings - -########## -# bug#5367 -create table t1 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; - -create table t2 (p int not null primary key, u int not null, o int not null, -unique (u), key(o)) engine=ndb; - -create table t3 (a int not null primary key, b int not null) engine=ndb; -create table t4 (c int not null primary key, d int not null) engine=ndb; - -insert into t1 values (1,1,1),(2,2,2),(3,3,3); -insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5); -insert into t3 values (1,10), (2,10), (3,30), (4, 30); -insert into t4 values (1,10), (2,10), (3,30), (4, 30); - -# Use pk ---replace_column 9 # -explain select * from t2 where p NOT IN (select p from t1); -select * from t2 where p NOT IN (select p from t1) order by p; - -# Use unique index ---replace_column 9 # -explain select * from t2 where p NOT IN (select u from t1); -select * from t2 where p NOT IN (select u from t1) order by p; - -# Use ordered index ---replace_column 9 # -explain select * from t2 where p NOT IN (select o from t1); -select * from t2 where p NOT IN (select o from t1) order by p; - -# Use scan ---replace_column 9 # -explain select * from t2 where p NOT IN (select p+0 from t1); -select * from t2 where p NOT IN (select p+0 from t1) order by p; - -drop table t1; -drop table t2; -# bug#5367 -########## - -# End of 4.1 tests - -# -# bug#11205 -# -create table t1 (p int not null primary key, u int not null) engine=ndb; -insert into t1 values (1,1),(2,2),(3,3); - -create table t2 as -select t1.* -from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8 -where t1.u = t2.u - and t2.u = t3.u - and t3.u = t4.u - and t4.u = t5.u - and t5.u = t6.u - and t6.u = t7.u - and t7.u = t8.u; - -select * from t2 order by 1; - -select * from t3 where a = any (select c from t4 where c = 1) order by a; -select * from t3 where a in (select c from t4 where c = 1) order by a; -select * from t3 where a <> some (select c from t4 where c = 1) order by a; -select * from t3 where a > all (select c from t4 where c = 1) order by a; -select * from t3 where row(1,10) = (select c,d from t4 where c = 1) order by a; -select * from t3 where exists (select * from t4 where c = 1) order by a; - -drop table if exists t1, t2, t3, t4; - ---echo End of 5.1 tests diff --git a/mysql-test/t/ndb_temporary.test b/mysql-test/t/ndb_temporary.test deleted file mode 100644 index 7f6902bf745..00000000000 --- a/mysql-test/t/ndb_temporary.test +++ /dev/null @@ -1,38 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# creating a temporary table with engine=ndb should give an error -# ---error ER_ILLEGAL_HA_CREATE_OPTION -create temporary table t1 (a int key) engine=ndb; - - -# -# alter temporary table to engine=ndb should give an error -# -create temporary table t1 (a int key) engine=myisam; ---error ER_ILLEGAL_HA_CREATE_OPTION -alter table t1 engine=ndb; -drop table t1; - - -# -# if default storage engine=ndb, temporary tables -# without explicit engine= should be created as myisam -# -SET SESSION storage_engine=NDBCLUSTER; -create table t1 (a int key); - -# verify that we have a ndb table -select engine from information_schema.tables where table_name = 't1'; -drop table t1; - -# verify that we have a myisam table -create temporary table t1 (a int key); -show create table t1; -drop table t1; diff --git a/mysql-test/t/ndb_transaction.test b/mysql-test/t/ndb_transaction.test deleted file mode 100644 index d3ebadb1a78..00000000000 --- a/mysql-test/t/ndb_transaction.test +++ /dev/null @@ -1,298 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -drop database if exists mysqltest; ---enable_warnings - -# -# Transactionc test to show that the NDB -# table handler is working properly with -# transactions -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=ndbcluster; - -# insert -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; - -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select t1.attr1 from t1, t1 as t1x where t1.pk1 = t1x.pk1 + 1; - -# update -begin; -update t1 set attr1 = attr1 * 2; -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -begin; -update t1 set attr1 = attr1 * 2; -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -# delete -begin; -delete from t1 where attr1 = 2; -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; -rollback; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -begin; -delete from t1 where attr1 = 2; -commit; - -select count(*) from t1; -select * from t1 where pk1 = 1; -select * from t1, t1 as t1x where t1x.attr1 = t1.attr1 - 2; - -DROP TABLE t1; - -# -# Create table without primary key -# a hidden primary key column is created by handler -# -CREATE TABLE t1 (id INT, id2 int) engine=ndbcluster; - -# insert -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; -rollback; - -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; - -begin; -insert into t1 values(1,1); -insert into t1 values(2,2); -commit; - -select sum(id) from t1; -select * from t1 where id = 1; -select t1.id from t1, t1 as t1x where t1.id2 = t1x.id2 + 1; - -# update -begin; -update t1 set id = id * 2; -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; -rollback; - -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; - -begin; -update t1 set id = id * 2; -commit; - -select sum(id) from t1; -select * from t1 where id = 2; -select * from t1, t1 as t1x where t1x.id = t1.id - 2; - -# delete - -DROP TABLE t1; - -# -# A more extensive test with a lot more records -# - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -CREATE TABLE t3 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned, - PRIMARY KEY(a) -) engine=ndbcluster; - -CREATE TABLE t4 ( - a bigint unsigned NOT NULL, - b bigint unsigned not null, - c bigint unsigned NOT NULL, - d int unsigned, - PRIMARY KEY(a, b, c) -) engine=ndbcluster; - - -# -# insert records into tables and rollback -# -let $1=100; -disable_query_log; -begin; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -rollback; -enable_query_log; - -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; - -# -# insert records into tables and commit; -# -let $1=100; -disable_query_log; -begin; -while ($1) -{ - eval insert into t2 values($1, $1+9, 5); - eval insert into t3 values($1, $1+9, 5); - eval insert into t4 values($1, $1+9, 5, $1+26000); - dec $1; -} -commit; -enable_query_log; - -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; - -# -# delete every other record in the tables -# -let $1=100; -disable_query_log; -while ($1) -{ - eval delete from t2 where a=$1; - eval delete from t3 where a=$1; - eval delete from t4 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -enable_query_log; - -# -# update records and rollback -# -begin; -let $1=100; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -rollback; -enable_query_log; - -# -# update records and commit -# -begin; -let $1=100; -disable_query_log; -while ($1) -{ - eval update t2 set c=$1 where a=$1; - eval update t3 set c=7 where a=$1 and b=$1+9 and c=5; - eval update t4 set d=$1+21987 where a=$1 and b=$1+9 and c=5; - dec $1; - dec $1; -} -rollback; -enable_query_log; - -drop table t2; -drop table t3; -drop table t4; - -# -# Test multiple databases in one transaction -# - -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - attr1 INT NOT NULL -) ENGINE=ndbcluster; - -create database mysqltest; -use mysqltest; - -CREATE TABLE t2 ( - a bigint unsigned NOT NULL PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - -begin; -insert into test.t1 values(1,1); -insert into t2 values(1,1,1); -insert into test.t1 values(2,2); -insert into t2 values(2,2,2); -select count(*) from test.t1; -select count(*) from t2; -select * from test.t1 where pk1 = 1; -select * from t2 where a = 1; -select test.t1.attr1 -from test.t1, test.t1 as t1x where test.t1.pk1 = t1x.pk1 + 1; -select t2.a -from t2, t2 as t2x where t2.a = t2x.a + 1; -select test.t1.pk1, a from test.t1,t2 where b > test.t1.attr1; -rollback; - -select count(*) from test.t1; -select count(*) from t2; - -drop table test.t1, t2; -drop database mysqltest; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_trigger.test b/mysql-test/t/ndb_trigger.test deleted file mode 100644 index 586fdc0ac97..00000000000 --- a/mysql-test/t/ndb_trigger.test +++ /dev/null @@ -1,221 +0,0 @@ -# Tests which involve triggers and NDB storage engine ---source include/have_ndb.inc ---source include/not_embedded.inc - -# -# Test for bug#18437 "Wrong values inserted with a before update -# trigger on NDB table". SQL-layer didn't properly inform handler -# about fields which were read and set in triggers. In some cases -# this resulted in incorrect (garbage) values of OLD variables and -# lost changes to NEW variables. -# You can find similar tests for ON INSERT triggers in federated.test -# since this engine so far is the only engine in MySQL which cares -# about field mark-up during handler::write_row() operation. -# - ---disable_warnings -drop table if exists t1, t2, t3, t4, t5; ---enable_warnings - -create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; -create table t2 (op char(1), a int not null, b decimal (63,30)); -create table t3 select 1 as i; -create table t4 (a int not null primary key, b int) engine=ndb; -create table t5 (a int not null primary key, b int) engine=ndb; - -delimiter //; -create trigger t1_bu before update on t1 for each row -begin - insert into t2 values ("u", old.a, old.b); - set new.b = old.b + 10; -end;// -create trigger t1_bd before delete on t1 for each row -begin - insert into t2 values ("d", old.a, old.b); -end;// -create trigger t4_au after update on t4 - for each row begin - update t5 set b = b+1; - end; -// -create trigger t4_ad after delete on t4 - for each row begin - update t5 set b = b+1; - end; -// -delimiter ;// - -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (3, 3, 3.05), (4, 4, 4.05); -insert into t4 values (1,1), (2,2), (3,3), (4, 4); -insert into t5 values (1,0); - -# Check that usual update works as it should -update t1 set a=5 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check that everything works for multi-update -update t1, t3 set a=6 where a = 5; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for delete -delete from t1 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for multi-delete -insert into t1 values (1, 1, 1.05), (2, 2, 2.05), (4, 4, 4.05); -delete t1 from t1, t3 where a != 3; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for insert ... on duplicate key update -insert into t1 values (4, 4, 4.05); -insert into t1 (id, a) values (4, 1), (3, 1) on duplicate key update a= a + 1; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for insert ... select ... on duplicate key update -delete from t3; -insert into t3 values (4), (3); -insert into t1 (id, a) (select i, 1 from t3) on duplicate key update a= a + 1; -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t2; -# Check for replace -replace into t1 (id, a) values (4, 1), (3, 1); -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t1; -delete from t2; -# Check for replace ... select ... -insert into t1 values (3, 1, 1.05), (4, 1, 2.05); -replace into t1 (id, a) (select i, 2 from t3); -select * from t1 order by id; -select * from t2 order by op, a, b; -delete from t1; -delete from t2; -# Check for load data replace -insert into t1 values (3, 1, 1.05), (5, 2, 2.05); -load data infile '../std_data_ln/loaddata5.dat' replace into table t1 fields terminated by '' enclosed by '' ignore 1 lines (id, a); -select * from t1 order by id; -select * from t2 order by op, a, b; -update t4 set b = 10 where a = 1; -select * from t5 order by a; -update t5 set b = 0; -delete from t4 where a = 1; -select * from t5 order by a; -drop trigger t4_au; -drop trigger t4_ad; - -drop table t1, t2, t3, t4, t5; -# Test for bug#26242 -# Verify that AFTER UPDATE/DELETE triggers are executed -# after the change has actually taken place - -CREATE TABLE t1 ( - id INT NOT NULL PRIMARY KEY, - xy INT -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (1, 0); - -DELIMITER //; -CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // -DELIMITER ;// - -CREATE TABLE t2 ( - id INT NOT NULL PRIMARY KEY, - xy INT -) ENGINE=ndbcluster; - -INSERT INTO t2 VALUES (2, 0); - -CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; - -INSERT INTO t3 VALUES (1); - -CREATE TABLE t4 LIKE t1; - -DELIMITER //; -CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // -DELIMITER ;// - -CREATE TABLE t5 LIKE t2; - -UPDATE t1 SET xy = 3 WHERE id = 1; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -INSERT INTO t4 SELECT * FROM t1; -INSERT INTO t5 SELECT * FROM t2; -UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; -SELECT xy FROM t4 where id = 1; -SELECT xy FROM t5 where id = 1; - -UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; -SELECT xy FROM t4 where id = 1; -SELECT xy FROM t5 where id = 1; - -INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; -SELECT xy FROM t1 where id = 1; -SELECT xy FROM t2 where id = 1; - -DROP TRIGGER t1_update; -DROP TRIGGER t4_update; - -DELIMITER //; -CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // -DELIMITER ;// - -DELIMITER //; -CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // -DELIMITER ;// - -INSERT INTO t1 VALUES (5, 0),(6,0); -INSERT INTO t2 VALUES (5, 1),(6,1); -INSERT INTO t3 VALUES (5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; - -INSERT INTO t1 VALUES (5,0); -UPDATE t2 SET xy = 1 WHERE id = 6; -TRUNCATE t4; -INSERT INTO t4 SELECT * FROM t1; -TRUNCATE t5; -INSERT INTO t5 SELECT * FROM t2; -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -SELECT * FROM t4 order by id; -SELECT * FROM t5 order by id; -DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -SELECT * FROM t4 order by id; -SELECT * FROM t5 order by id; - -INSERT INTO t1 VALUES (5, 0); -REPLACE INTO t2 VALUES (6,1); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; -REPLACE INTO t1 VALUES (5, 1); -SELECT * FROM t1 order by id; -SELECT * FROM t2 order by id; - -DROP TRIGGER t1_delete; -DROP TRIGGER t4_delete; -DROP TABLE t1, t2, t3, t4, t5; - ---echo End of 5.1 tests diff --git a/mysql-test/t/ndb_truncate.test b/mysql-test/t/ndb_truncate.test deleted file mode 100644 index a1ef4be0d48..00000000000 --- a/mysql-test/t/ndb_truncate.test +++ /dev/null @@ -1,41 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; ---enable_warnings - -CREATE TABLE t1 ( - a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, - b int unsigned not null, - c int unsigned -) engine=ndbcluster; - - -# -# insert records into table -# -let $1=500; -disable_query_log; -while ($1) -{ - eval insert into t1 values(NULL, $1+9, 5*$1), (NULL, $1+10, 7),(NULL, $1+10, 7*$1), (NULL, $1+10, 10+$1), (NULL, $1+10, 70*$1), (NULL, $1+10, 7), (NULL, $1+10, 9), (NULL, $1+299, 899), (NULL, $1+10, 12), (NULL, $1+10, 14*$1); - dec $1; -} -enable_query_log; - -select count(*) from t1; - -select * from t1 order by a limit 2; - -truncate table t1; - -select count(*) from t1; - -insert into t1 values(NULL,1,1),(NULL,2,2); - -select * from t1 order by a; - -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_types.test b/mysql-test/t/ndb_types.test deleted file mode 100644 index ab18817132e..00000000000 --- a/mysql-test/t/ndb_types.test +++ /dev/null @@ -1,85 +0,0 @@ ---source include/have_ndb.inc ---source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Test creation of different column types in NDB -# -CREATE TABLE t1 ( - auto int(5) unsigned NOT NULL auto_increment, - string char(10) default "hello", - vstring varchar(10) default "hello", - bin binary(2), - vbin varbinary(7), - tiny tinyint(4) DEFAULT '0' NOT NULL , - short smallint(6) DEFAULT '1' NOT NULL , - medium mediumint(8) DEFAULT '0' NOT NULL, - long_int int(11) DEFAULT '0' NOT NULL, - longlong bigint(13) DEFAULT '0' NOT NULL, - real_float float(13,1) DEFAULT 0.0 NOT NULL, - real_double double(16,4), - real_decimal decimal(16,4), - utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, - ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, - umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, - ulong int(11) unsigned DEFAULT '0' NOT NULL, - ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, - bits bit(3), - options enum('one','two','tree') not null, - flags set('one','two','tree') not null, - date_field date, - year_field year, - time_field time, - date_time datetime, - time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - PRIMARY KEY (auto), - KEY (utiny), - KEY (tiny), - KEY (short), - KEY any_name (medium), - KEY (longlong), - KEY (real_float), - KEY (ushort), - KEY (umedium), - KEY (ulong), - KEY (ulonglong,ulong), - KEY (options,flags) -); - -set @now = now(); ---sleep 1.5 -insert into t1 -(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time) -values -("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, - b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); - -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time -from t1; -select time_stamp>@now from t1; - -set @now = now(); ---sleep 1.5 -update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB, -tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2, -real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2, -ulonglong=2, bits=b'010', -options='one',flags='one', date_field='1902-02-02',year_field='1902', -time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1; - -select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, - real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, - bits,options,flags,date_field,year_field,time_field,date_time -from t1; -select time_stamp>@now from t1; - -drop table t1; - ---echo End of 4.1 tests diff --git a/mysql-test/t/ndb_update.test b/mysql-test/t/ndb_update.test deleted file mode 100644 index 73a0ebc69cb..00000000000 --- a/mysql-test/t/ndb_update.test +++ /dev/null @@ -1,41 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test of INSERT in NDB -# - -# -# Create a normal table with primary key -# -CREATE TABLE t1 ( - pk1 INT NOT NULL PRIMARY KEY, - b INT NOT NULL, - c INT NOT NULL UNIQUE -) ENGINE=ndbcluster; - -INSERT INTO t1 VALUES (0, 1, 0),(1,2,1),(2,3,2); -UPDATE t1 set b = c; -select * from t1 order by pk1; -UPDATE t1 set pk1 = 4 where pk1 = 1; -select * from t1 order by pk1; ---error ER_DUP_ENTRY -UPDATE t1 set pk1 = 4 where pk1 = 2; -UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2; -select * from t1 order by pk1; ---error ER_DUP_ENTRY -UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4; -UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4; -select * from t1 order by pk1; -UPDATE t1 set pk1 = pk1 + 10; -select * from t1 order by pk1; - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# End of 4.1 tests diff --git a/mysql-test/t/ndb_view.test b/mysql-test/t/ndb_view.test deleted file mode 100644 index 3b8fc330b40..00000000000 --- a/mysql-test/t/ndb_view.test +++ /dev/null @@ -1,29 +0,0 @@ --- source include/have_ndb.inc --- source include/not_embedded.inc - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3; -DROP VIEW IF EXISTS v1,v2,v3; ---enable_warnings - -# -# simple operations via view -# - -create table t1 (a int, b int, c int, d int) engine=ndb; -insert into t1 values (1,2,3,4),(5,6,7,8); - -create view v1 as select t1.c as a, t1.a as b, t1.d as c, t1.a+t1.b+t1.c as d from t1; -select * from v1 order by a,b,c; - -update v1 set a=a+100 where b=1; -select * from v1 order by a,b,c; - -drop view v1; - -create view v1 as select t1.c as a from t1; -insert into v1 values (200); -select * from t1 order by a,b,c,d; - -drop view v1; -drop table t1; diff --git a/mysql-test/t/ndbapi.test b/mysql-test/t/ndbapi.test deleted file mode 100644 index 3424513f8af..00000000000 --- a/mysql-test/t/ndbapi.test +++ /dev/null @@ -1,44 +0,0 @@ --- source include/have_ndb.inc --- source include/have_ndbapi_examples.inc - ---disable_warnings -DROP TABLE IF EXISTS t0; -drop database if exists mysqltest; ---enable_warnings - ---exec echo Running ndbapi_simple ---exec $NDB_EXAMPLES_DIR/ndbapi_simple/ndbapi_simple $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_simple_index ---exec $NDB_EXAMPLES_DIR/ndbapi_simple_index/ndbapi_simple_index $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_scan ---exec $NDB_EXAMPLES_DIR/ndbapi_scan/ndbapi_scan $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_retries ---exec $NDB_EXAMPLES_DIR/ndbapi_retries/ndbapi_retries $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_async ---exec $NDB_EXAMPLES_DIR/ndbapi_async/ndbapi_async $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running ndbapi_async1 ---exec $NDB_EXAMPLES_DIR/ndbapi_async1/ndbapi_async1 $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" >> $NDB_EXAMPLES_OUTPUT - -use TEST_DB; -create table t0(c0 int, c1 int, c2 char(4), c3 char(4), c4 text, - primary key(c0, c2)) engine ndb charset latin1; -#--exec echo Running ndbapi_event -#--exec $NDB_EXAMPLES_DIR/ndbapi_event/ndbapi_event "localhost:$NDBCLUSTER_PORT" 1 >> $NDB_EXAMPLES_OUTPUT -insert into t0 values (1, 2, 'a', 'b', null); -insert into t0 values (3, 4, 'c', 'd', null); -update t0 set c3 = 'e' where c0 = 1 and c2 = 'a'; -- use pk -update t0 set c3 = 'f'; -- use scan -update t0 set c3 = 'F'; -- use scan update to 'same' -update t0 set c2 = 'g' where c0 = 1; -- update pk part -update t0 set c2 = 'G' where c0 = 1; -- update pk part to 'same' -update t0 set c0 = 5, c2 = 'H' where c0 = 3; -- update full PK -delete from t0; -drop table t0; - ---exec echo Running mgmapi_logevent ---exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "localhost:$NDBCLUSTER_PORT" 1 >> $NDB_EXAMPLES_OUTPUT diff --git a/mysql-test/t/partition_03ndb.test b/mysql-test/t/partition_03ndb.test deleted file mode 100644 index 3190ab9dfc7..00000000000 --- a/mysql-test/t/partition_03ndb.test +++ /dev/null @@ -1,26 +0,0 @@ -############################################### -# # -# Partition tests NDB tables # -# # -############################################### - -# -# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE ! -# NON STORAGE SPECIFIC TESTCASES SHOULD BE ADDED IN -# THE SOURCED FIELS ONLY. -# - -# Storage engine to be tested -let $engine= 'NDB' ; --- source include/have_ndb.inc -eval SET SESSION storage_engine=$engine; - - -# Other storage engine <> storage engine to be tested -let $engine_other= 'MEMORY'; -# number of rows for the INSERT/UPDATE/DELETE/SELECT experiments -# on partioned tables -# Attention: In the moment the result files fit to @max_row = 200 only -SET @max_row = 200; - --- source include/partition_1.inc diff --git a/mysql-test/t/ps_7ndb.test b/mysql-test/t/ps_7ndb.test deleted file mode 100644 index e3f65ec2c4e..00000000000 --- a/mysql-test/t/ps_7ndb.test +++ /dev/null @@ -1,25 +0,0 @@ -############################################### -# # -# Prepared Statements test on NDB tables # -# # -############################################### - -# -# NOTE: PLEASE SEE ps_1general.test (bottom) -# BEFORE ADDING NEW TEST CASES HERE !!! - -use test; - --- source include/have_ndb.inc -let $type= 'NDB' ; --- source include/ps_create.inc --- source include/ps_renew.inc - --- source include/ps_query.inc --- source include/ps_modify.inc --- source include/ps_modify1.inc --- source include/ps_conv.inc - -drop table t1, t9; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl000010-slave.opt b/mysql-test/t/rpl000010-slave.opt deleted file mode 100644 index 0dbfb311e33..00000000000 --- a/mysql-test/t/rpl000010-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---disconnect-slave-event-count=2 diff --git a/mysql-test/t/rpl000010.test b/mysql-test/t/rpl000010.test deleted file mode 100644 index 261b9148774..00000000000 --- a/mysql-test/t/rpl000010.test +++ /dev/null @@ -1,19 +0,0 @@ -# This tests the offset off by 22 mystery bug -# Must run slave with --disconnect-slave-event-count=1 --master-connect-retry=1 - -source include/master-slave.inc; - -create table t1 (n int not null auto_increment primary key); -insert into t1 values(NULL); -insert into t1 values(2); -save_master_pos; -connection slave; -sync_with_master; -select n from t1; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl000011.test b/mysql-test/t/rpl000011.test deleted file mode 100644 index 32f6227f7c5..00000000000 --- a/mysql-test/t/rpl000011.test +++ /dev/null @@ -1,17 +0,0 @@ -source include/master-slave.inc; - -create table t1 (n int); -insert into t1 values(1); -sync_slave_with_master; -stop slave; -start slave; -connection master; -insert into t1 values(2); -#let slave catch up -sync_slave_with_master; -select * from t1; -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl000013.test b/mysql-test/t/rpl000013.test deleted file mode 100644 index 69a102e84ce..00000000000 --- a/mysql-test/t/rpl000013.test +++ /dev/null @@ -1,53 +0,0 @@ -# This test is to verify that DROP TEMPORARY TABLE -# is automatically binlogged and sent to slave -# when a temp table is dropped by disconnection -# of a master's conection. -# So it does not apply to row-based, where we neither need -# nor do this automatic binlogging. And if we run this test -# in row-based, it hangs waiting for an offset which is never -# reached (the "sync_with_master 1"), logically. - ---source include/have_binlog_format_mixed_or_statement.inc -source include/master-slave.inc; -save_master_pos; -connection slave; -sync_with_master; -connection master; - -create table t2(n int); -create temporary table t1 (n int); -insert into t1 values(1),(2),(3); -insert into t2 select * from t1; -connection master1; -create temporary table t1 (n int); -insert into t1 values (4),(5); -insert into t2 select * from t1 as t10; -save_master_pos; -disconnect master; -connection slave; -#add 1 to catch drop table -sync_with_master 1; -connection master1; -insert into t2 values(6); -save_master_pos; -disconnect master1; -connection slave; -# same trick to go one more event -sync_with_master 1; -select * from t2; -show status like 'Slave_open_temp_tables'; -# -# Clean up -# -connect (master2,localhost,root,,); -connection master2; - -# We will get a warning for t1 as this is a temporary table that doesn't -# exist in this connection. - -drop table if exists t1,t2; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl000017-slave.opt b/mysql-test/t/rpl000017-slave.opt deleted file mode 100644 index 58a964c90d0..00000000000 --- a/mysql-test/t/rpl000017-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-slave-start diff --git a/mysql-test/t/rpl000017-slave.sh b/mysql-test/t/rpl000017-slave.sh deleted file mode 100755 index 17188aba0db..00000000000 --- a/mysql-test/t/rpl000017-slave.sh +++ /dev/null @@ -1,12 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/log/*relay* -rm -f $MYSQLTEST_VARDIR/slave-data/relay-log.info -cat > $MYSQLTEST_VARDIR/slave-data/master.info <_binary'' from mysql.user where user=_binary'rpl_do_grant'; - -# -# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES -# -connection master; -update mysql.user set password='' where user='rpl_do_grant'; -flush privileges; -select password<>'' from mysql.user where user='rpl_do_grant'; -set sql_mode='ANSI_QUOTES'; -set password for rpl_do_grant@localhost=password('does it work?'); -set sql_mode=''; -save_master_pos; -connection slave; -sync_with_master; -select password<>'' from mysql.user where user='rpl_do_grant'; - - -# clear what we have done, to not influence other tests. -connection master; -delete from mysql.user where user=_binary'rpl_do_grant'; -delete from mysql.db where user=_binary'rpl_do_grant'; -flush privileges; -sync_slave_with_master; -# The mysql database is not replicated, so we have to do the deletes -# manually on the slave as well. -delete from mysql.user where user=_binary'rpl_do_grant'; -delete from mysql.db where user=_binary'rpl_do_grant'; -flush privileges; - -# End of 4.1 tests - -connection master; ---error 1141 -show grants for rpl_do_grant@localhost; -connection slave; ---error 1141 -show grants for rpl_do_grant@localhost; - -connection master; -create user rpl_do_grant@localhost; -show grants for rpl_do_grant@localhost; ---error 1141 -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; -show grants for rpl_do_grant@localhost; ---error 1141 -show grants for rpl_do_grant2@localhost; - -connection master; -rename user rpl_do_grant@localhost to rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; -show grants for rpl_do_grant2@localhost; - -connection master; -grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; -show grants for rpl_do_grant2@localhost; - -connection master; -revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; -show grants for rpl_do_grant2@localhost; - -connection master; -revoke all privileges, grant option from rpl_do_grant2@localhost; -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; -show grants for rpl_do_grant2@localhost; - -connection master; -drop user rpl_do_grant2@localhost; ---error 1141 -show grants for rpl_do_grant2@localhost; -sync_slave_with_master; ---error 1141 -show grants for rpl_do_grant2@localhost; diff --git a/mysql-test/t/rpl_drop.test b/mysql-test/t/rpl_drop.test deleted file mode 100644 index b38007a755f..00000000000 --- a/mysql-test/t/rpl_drop.test +++ /dev/null @@ -1,16 +0,0 @@ -# Testcase for BUG#4552 (DROP on two tables, one of which does not -# exist, must be binlogged with a non-zero error code) -source include/master-slave.inc; ---disable_warnings -drop table if exists t1, t2; ---enable_warnings -create table t1 (a int); ---error 1051 -drop table t1, t2; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests - - diff --git a/mysql-test/t/rpl_drop_db.test b/mysql-test/t/rpl_drop_db.test deleted file mode 100644 index 7f4a7843c4a..00000000000 --- a/mysql-test/t/rpl_drop_db.test +++ /dev/null @@ -1,61 +0,0 @@ -# test case for BUG#4680 -- if there are extra files in the db directory -# dropping the db on the master causes replication problems - --- source include/master-slave.inc -connection master; - ---disable_warnings -drop database if exists mysqltest1; ---enable_warnings -create database mysqltest1; -create table mysqltest1.t1 (n int); -insert into mysqltest1.t1 values (1); -select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; -create table mysqltest1.t2 (n int); -create table mysqltest1.t3 (n int); ---replace_result \\ / ---error 1010 -drop database mysqltest1; -use mysqltest1; -show tables; - -# test the branch of the code that deals with the query buffer overflow - ---disable_query_log -let $1=50; -while ($1) -{ - eval create table mysqltest1.mysqltest_long_table_name$1 (n int); - dec $1; -} ---enable_query_log - ---replace_result \\ / ---error 1010 -drop database mysqltest1; -use mysqltest1; -show tables; -use test; -create table t1 (n int); -insert into t1 values (1234); -sync_slave_with_master; - -connection slave; -use mysqltest1; -show tables; -use test; -select * from t1; - -#cleanup -connection slave; -stop slave; -drop database mysqltest1; - -connection master; -# Remove the "extra" file created above ---remove_file $MYSQLTEST_VARDIR/master-data/mysqltest1/f1.txt -drop database mysqltest1; - -use test; -drop table t1; - diff --git a/mysql-test/t/rpl_drop_temp-slave.opt b/mysql-test/t/rpl_drop_temp-slave.opt deleted file mode 100644 index 2f9244c65ff..00000000000 --- a/mysql-test/t/rpl_drop_temp-slave.opt +++ /dev/null @@ -1,2 +0,0 @@ ---replicate-ignore-table=mysqltest.t2 - diff --git a/mysql-test/t/rpl_drop_temp.test b/mysql-test/t/rpl_drop_temp.test deleted file mode 100644 index 305c78d3f06..00000000000 --- a/mysql-test/t/rpl_drop_temp.test +++ /dev/null @@ -1,27 +0,0 @@ -############################################## -# Change Author: JBM -# Change Date: 2006-02-07 -# Change: Added ENGINE=MyISAM -# Purpose: According to TU in 16552 This is how -# to work around NDB's issue with temp tables -############################################## -source include/master-slave.inc; ---disable_warnings -create database if not exists mysqltest; ---enable_warnings - -create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; -create temporary table mysqltest.t2 (n int)ENGINE=MyISAM; -sync_slave_with_master; -connection master; -disconnect master; -connection slave; ---real_sleep 3 # time for DROP to be written -show status like 'Slave_open_temp_tables'; - -# Cleanup -connection default; -drop database mysqltest; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_dual_pos_advance-master.opt b/mysql-test/t/rpl_dual_pos_advance-master.opt deleted file mode 100644 index cef79bc8585..00000000000 --- a/mysql-test/t/rpl_dual_pos_advance-master.opt +++ /dev/null @@ -1 +0,0 @@ ---force-restart diff --git a/mysql-test/t/rpl_dual_pos_advance.test b/mysql-test/t/rpl_dual_pos_advance.test deleted file mode 100644 index 27c920a3186..00000000000 --- a/mysql-test/t/rpl_dual_pos_advance.test +++ /dev/null @@ -1,114 +0,0 @@ -# This test checks that in a dual-head setup -# A->B->A, where A has --log-slave-updates (why would it? -# assume that there is a C as slave of A), -# then the Exec_master_log_pos of SHOW SLAVE STATUS does -# not stay too low on B(BUG#13023 due to events ignored because -# of their server id). -# It also will test BUG#13861. - -source include/master-slave.inc; - - -# set up "dual head" - -connection slave; -reset master; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root"; - -start slave; - -# now we test it - -connection slave; - -create table t1 (n int); - -save_master_pos; -connection master; -sync_with_master; - -# Now test BUG#13861. This will be enabled when Guilhem fixes this -# bug. - -# stop slave - -# create table t2 (n int); # create one ignored event - -# save_master_pos; -# connection slave; -# sync_with_master; - -# connection slave; - -# show tables; - -# save_master_pos; - -# create table t3 (n int); - -# connection master; - -# bug is that START SLAVE UNTIL may stop too late, we test that by -# asking it to stop before creation of t3. - -# start slave until master_log_file="slave-bin.000001",master_log_pos=195; - -# wait until it's started (the position below is the start of "CREATE -# TABLE t2") (otherwise wait_for_slave_to_stop may return at once) - -# select master_pos_wait("slave-bin.000001",137); - -# --source include/wait_for_slave_to_stop.inc - -# then BUG#13861 causes t3 to show up below (because stopped too -# late). - -# show tables; - -# start slave; - -# BUG#13023 is that Exec_master_log_pos may stay too low "forever": - -connection master; - -create table t4 (n int); # create 3 ignored events -create table t5 (n int); -create table t6 (n int); - -save_master_pos; -connection slave; -sync_with_master; - -connection slave; - -save_master_pos; - -connection master; - -# then BUG#13023 caused hang below ("master" looks behind, while it's -# not in terms of updates done). - -sync_with_master; - -show tables; - -# cleanup - -stop slave; -reset slave; -drop table t1,t4,t5,t6; # add t2 and t3 later - -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests - -# Cleanup -# The A->B->A replication causes the master to start writing relay logs -# in var/run, remove them -remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.000001; -remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.index; diff --git a/mysql-test/t/rpl_empty_master_crash-master.opt b/mysql-test/t/rpl_empty_master_crash-master.opt deleted file mode 100644 index cef79bc8585..00000000000 --- a/mysql-test/t/rpl_empty_master_crash-master.opt +++ /dev/null @@ -1 +0,0 @@ ---force-restart diff --git a/mysql-test/t/rpl_empty_master_crash.test b/mysql-test/t/rpl_empty_master_crash.test deleted file mode 100644 index 707d1eca8c2..00000000000 --- a/mysql-test/t/rpl_empty_master_crash.test +++ /dev/null @@ -1,15 +0,0 @@ -source include/master-slave.inc; - ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; - -# -# Load table should not succeed on the master as this is not a slave -# ---error 1218 -load table t1 from master; -connection slave; ---error 1188 -load table t1 from master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_err_ignoredtable-slave.opt b/mysql-test/t/rpl_err_ignoredtable-slave.opt deleted file mode 100644 index cb49119bfcb..00000000000 --- a/mysql-test/t/rpl_err_ignoredtable-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.t1 --replicate-ignore-table=test.t2 --replicate-ignore-table=test.t3 diff --git a/mysql-test/t/rpl_err_ignoredtable.test b/mysql-test/t/rpl_err_ignoredtable.test deleted file mode 100644 index 4e06a6a7096..00000000000 --- a/mysql-test/t/rpl_err_ignoredtable.test +++ /dev/null @@ -1,66 +0,0 @@ -# Test for -# Bug #797: If a query is ignored on slave (replicate-ignore-table) the slave -# still checks that it has the same error as on the master. -########################################################################## -# 2006-02-07 JBM Added error code 1022 for NDB Engine + ORDER BY -########################################################################## - --- source include/master-slave.inc - -connection master; -create table t1 (a int primary key); -create table t4 (a int primary key); -# generate an error that goes to the binlog ---error 1022, ER_DUP_ENTRY -insert into t1 values (1),(1); -insert into t4 values (1),(2); -save_master_pos; -connection slave; -# as the t1 table is ignored on the slave, the slave should be able to sync -sync_with_master; -# check that the table has been ignored, because otherwise the test is nonsense -show tables like 't1'; -show tables like 't4'; -SELECT * FROM test.t4 ORDER BY a; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -# Now test that even critical errors (connection killed) -# are ignored if rules allow it. -# The "kill" idea was copied from rpl000001.test. - -connection master1; -select get_lock('crash_lock%20C', 10); - -connection master; -create table t2 (a int primary key); -insert into t2 values(1); -create table t3 (id int); -insert into t3 values(connection_id()); -send update t2 set a = a + 1 + get_lock('crash_lock%20C', 10); - -connection master1; -real_sleep 2; -select (@id := id) - id from t3; -kill @id; -drop table t2,t3; -insert into t4 values (3),(4); -connection master; ---error 0,1053,2013 -reap; -connection master1; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t4 ORDER BY a; - -connection master1; -DROP TABLE test.t4; -save_master_pos; -connection slave; -sync_with_master; -# End of 4.1 tests -# Adding comment for force manual merge 5.0 -> wl1012. delete me if needed diff --git a/mysql-test/t/rpl_events.test b/mysql-test/t/rpl_events.test deleted file mode 100644 index 62ffead7dcb..00000000000 --- a/mysql-test/t/rpl_events.test +++ /dev/null @@ -1,47 +0,0 @@ -################################################################## -# Author: Giuseppe # -# Date: 2006-12-20 # -# Purpose: To test that event effects are replicated # -# in both row based and statement based format # -################################################################## - -set global event_scheduler=1; - ---source include/not_embedded.inc ---source include/master-slave.inc - -let $engine_type= MyISAM; - -set binlog_format=row; - -# Embedded server doesn't support binlogging ---source include/rpl_events.inc - -set binlog_format=statement; - -# Embedded server doesn't support binlogging ---source include/rpl_events.inc - -# -# Bug #28953 Using events in a replication let the slave crash. -# - -connection master; - -DELIMITER |; -CREATE EVENT event1 ON SCHEDULE EVERY 1 YEAR -DO BEGIN - select * from t1; -END;| -DELIMITER ;| - -ALTER EVENT event1 RENAME TO event2; - -sync_slave_with_master; - -connection master; - -DROP EVENT event2; - -sync_slave_with_master; - diff --git a/mysql-test/t/rpl_extraCol_innodb-master.opt b/mysql-test/t/rpl_extraCol_innodb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_extraCol_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_extraCol_innodb-slave.opt b/mysql-test/t/rpl_extraCol_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_extraCol_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_extraCol_innodb.test b/mysql-test/t/rpl_extraCol_innodb.test deleted file mode 100644 index e9685baf01b..00000000000 --- a/mysql-test/t/rpl_extraCol_innodb.test +++ /dev/null @@ -1,13 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-08 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using innodb -########################################### --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc --- source include/master-slave.inc -let $engine_type = 'InnoDB'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/t/rpl_extraCol_myisam.test b/mysql-test/t/rpl_extraCol_myisam.test deleted file mode 100644 index d56df394ccf..00000000000 --- a/mysql-test/t/rpl_extraCol_myisam.test +++ /dev/null @@ -1,12 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-07 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using MyISAM -########################################### --- source include/have_binlog_format_row.inc --- source include/master-slave.inc -let $engine_type = 'MyISAM'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/t/rpl_failed_optimize-master.opt b/mysql-test/t/rpl_failed_optimize-master.opt deleted file mode 100644 index 3f82baff598..00000000000 --- a/mysql-test/t/rpl_failed_optimize-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb-lock-wait-timeout=1 diff --git a/mysql-test/t/rpl_failed_optimize.test b/mysql-test/t/rpl_failed_optimize.test deleted file mode 100644 index 81e8342b5c0..00000000000 --- a/mysql-test/t/rpl_failed_optimize.test +++ /dev/null @@ -1,11 +0,0 @@ -####################################### -# Wrapper for rpl_failed_optimize.test# -####################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=InnoDB; --- source extra/rpl_tests/rpl_failed_optimize.test diff --git a/mysql-test/t/rpl_flushlog_loop-master.opt b/mysql-test/t/rpl_flushlog_loop-master.opt deleted file mode 100644 index a4d1d403dc9..00000000000 --- a/mysql-test/t/rpl_flushlog_loop-master.opt +++ /dev/null @@ -1 +0,0 @@ --O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/master-data/relay-log diff --git a/mysql-test/t/rpl_flushlog_loop-master.sh b/mysql-test/t/rpl_flushlog_loop-master.sh deleted file mode 100755 index a321dd690cd..00000000000 --- a/mysql-test/t/rpl_flushlog_loop-master.sh +++ /dev/null @@ -1,5 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/slave-data/*-bin.* -rm -f $MYSQLTEST_VARDIR/slave-data/master.info -rm -f $MYSQLTEST_VARDIR/slave-data/*.index - - diff --git a/mysql-test/t/rpl_flushlog_loop-slave.opt b/mysql-test/t/rpl_flushlog_loop-slave.opt deleted file mode 100644 index 95839c831c9..00000000000 --- a/mysql-test/t/rpl_flushlog_loop-slave.opt +++ /dev/null @@ -1 +0,0 @@ --O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/slave-data/relay-log diff --git a/mysql-test/t/rpl_flushlog_loop-slave.sh b/mysql-test/t/rpl_flushlog_loop-slave.sh deleted file mode 100755 index e46ea6d400b..00000000000 --- a/mysql-test/t/rpl_flushlog_loop-slave.sh +++ /dev/null @@ -1,4 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/master-data/master.info -rm -f $MYSQLTEST_VARDIR/master-data/*-bin.* -rm -f $MYSQLTEST_VARDIR/master-data/*.index - diff --git a/mysql-test/t/rpl_flushlog_loop.test b/mysql-test/t/rpl_flushlog_loop.test deleted file mode 100644 index 471c45a1aa3..00000000000 --- a/mysql-test/t/rpl_flushlog_loop.test +++ /dev/null @@ -1,50 +0,0 @@ -# Testing if "flush logs" command bouncing resulting in logs created in a loop -# in case of bi-directional replication --- source include/master-slave.inc - -# -# Start replication master -> slave -# -# We have to sync with master, to ensure slave had time to start properly -# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log. -sync_slave_with_master; -connection slave; ---disable_warnings -stop slave; ---enable_warnings ---replace_result $MASTER_MYPORT MASTER_PORT -eval change master to master_host='127.0.0.1',master_user='root', - master_password='',master_port=$MASTER_MYPORT; -start slave; - -# -# Start replication slave -> master -# -connection master; ---disable_warnings -stop slave; ---enable_warnings ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_host='127.0.0.1',master_user='root', - master_password='',master_port=$SLAVE_MYPORT; -start slave; - -# -# Wait for start of slave IO and SQL threads -# -let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%'; ---source include/wait_slave_status.inc - -# -# Flush logs of slave -# -flush logs; -sleep 5; - -# -# Show status of slave -# ---replace_result $SLAVE_MYPORT SLAVE_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # ---vertical_results -SHOW SLAVE STATUS; diff --git a/mysql-test/t/rpl_foreign_key_innodb-slave.opt b/mysql-test/t/rpl_foreign_key_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_foreign_key_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_foreign_key_innodb.test b/mysql-test/t/rpl_foreign_key_innodb.test deleted file mode 100644 index d085bff2012..00000000000 --- a/mysql-test/t/rpl_foreign_key_innodb.test +++ /dev/null @@ -1,11 +0,0 @@ -################################### -# Wrapper for rpl_foreign_key.test# -################################### -# Change Author: JBM -# Change Date: 2006-01-17 -# Change: FK not supported, skip test when NDB is forced -#################################### --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_foreign_key.test diff --git a/mysql-test/t/rpl_free_items-slave.opt b/mysql-test/t/rpl_free_items-slave.opt deleted file mode 100644 index b828d03fafb..00000000000 --- a/mysql-test/t/rpl_free_items-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-ignore-table=test.% diff --git a/mysql-test/t/rpl_free_items.test b/mysql-test/t/rpl_free_items.test deleted file mode 100644 index 043e84160b8..00000000000 --- a/mysql-test/t/rpl_free_items.test +++ /dev/null @@ -1,22 +0,0 @@ -source include/master-slave.inc; -create table t1 (a int); -create table t2 (a int); -disable_query_log; -SET @query="INSERT INTO t2 SELECT * FROM t1 WHERE a REGEXP \"0\""; -let $1 = 2000; -while ($1) -{ - eval SET @query=concat(@query, " OR a REGEXP '$1'"); - dec $1; -} -let $1=`select @query`; -eval $1; -enable_query_log; -# I have seen the slave crash either now or at shutdown -sync_slave_with_master; -connection master; -drop table t1; -drop table t2; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_get_lock.test b/mysql-test/t/rpl_get_lock.test deleted file mode 100644 index 945bd98c993..00000000000 --- a/mysql-test/t/rpl_get_lock.test +++ /dev/null @@ -1,43 +0,0 @@ -source include/master-slave.inc; - -create table t1(n int); -insert into t1 values(get_lock("lock",2)); -dirty_close master; -connection master1; -select get_lock("lock",2); - -select release_lock("lock"); -#ignore -disable_query_log; -let $1=2000; -while ($1) -{ - do get_lock("lock",2); - do release_lock("lock"); - dec $1; -} -enable_query_log; -save_master_pos; -connection slave; -sync_with_master; -select get_lock("lock",3); -select * from t1; -# There is no point in testing REPLICATIION of the IS_*_LOCK -# functions; slave does not run with the same concurrency context as -# master (generally in slave we can't know that on master this lock -# was already held by another connection and so that the the -# get_lock() we're replicating timed out on master hence returned 0, -# or that the is_free_lock() we're playing returned 0 etc. -# But here all we do is test these functions outside of replication. -select is_free_lock("lock"), is_used_lock("lock") = connection_id(); -explain extended select is_free_lock("lock"), is_used_lock("lock"); -# Check lock functions -select is_free_lock("lock2"); -select is_free_lock(NULL); -connection master1; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_ignore_grant-slave.opt b/mysql-test/t/rpl_ignore_grant-slave.opt deleted file mode 100644 index e931bfbd37e..00000000000 --- a/mysql-test/t/rpl_ignore_grant-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-ignore-table=mysql.% diff --git a/mysql-test/t/rpl_ignore_grant.test b/mysql-test/t/rpl_ignore_grant.test deleted file mode 100644 index 2e6e2ce9a31..00000000000 --- a/mysql-test/t/rpl_ignore_grant.test +++ /dev/null @@ -1,59 +0,0 @@ -# Test that GRANT is not replicated to the slave -# when --replicate-wild-ignore-table=mysql.% -# In BUG#980, this test would _randomly_ fail. - -source include/master-slave.inc; - -# do not be influenced by other tests. -connection master; -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; -save_master_pos; -connection slave; -sync_with_master; -# as these DELETE were not replicated, we need to do them manually on the -# slave. -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; - -# test non-replication of GRANT -connection master; -grant select on *.* to rpl_ignore_grant@localhost; -grant drop on test.* to rpl_ignore_grant@localhost; -show grants for rpl_ignore_grant@localhost; -save_master_pos; -connection slave; -sync_with_master; ---error 1141 #("no such grant for user") -show grants for rpl_ignore_grant@localhost; -# check it another way -select count(*) from mysql.user where user=_binary'rpl_ignore_grant'; -select count(*) from mysql.db where user=_binary'rpl_ignore_grant'; - -# test non-replication of SET PASSWORD -# first force creation of the user on slave (because as the user does not exist -# on slave, the SET PASSWORD may be replicated but silently do nothing; this is -# not what we want; we want it to be not-replicated). -grant select on *.* to rpl_ignore_grant@localhost; -connection master; -set password for rpl_ignore_grant@localhost=password("does it work?"); -save_master_pos; -connection slave; -sync_with_master; -select password<>_binary'' from mysql.user where user=_binary'rpl_ignore_grant'; - -# clear what we have done, to not influence other tests. -connection master; -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; -save_master_pos; -connection slave; -sync_with_master; -delete from mysql.user where user=_binary'rpl_ignore_grant'; -delete from mysql.db where user=_binary'rpl_ignore_grant'; -flush privileges; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_ignore_revoke-slave.opt b/mysql-test/t/rpl_ignore_revoke-slave.opt deleted file mode 100644 index e931bfbd37e..00000000000 --- a/mysql-test/t/rpl_ignore_revoke-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-ignore-table=mysql.% diff --git a/mysql-test/t/rpl_ignore_revoke.test b/mysql-test/t/rpl_ignore_revoke.test deleted file mode 100644 index 00171605a92..00000000000 --- a/mysql-test/t/rpl_ignore_revoke.test +++ /dev/null @@ -1,51 +0,0 @@ -# test verifies that REVOKE must not be replicated when -# slave server starts with --replicate-wild-ignore-table=mysql.% -# the option is set in rpl_ignore_revoke-slave.opt -# The first part of BUG#9483 for GRANT is checked by -# existed specific rpl_ignore_grant test case (BUG#980) - - -source include/master-slave.inc; - -### CLEAN-UP: create an account and manually duplicate it on the slave - -connection master; -grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; -revoke select on *.* from 'user_foo'@'%'; -select select_priv from mysql.user where user='user_foo' /* master:must be N */; - -sync_slave_with_master; -#connection slave; -grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; -revoke select on *.* from 'user_foo'@'%'; -select select_priv from mysql.user where user='user_foo' /* slave:must be N */; - - -### TEST - -#connection slave; -grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; -select select_priv from mysql.user where user='user_foo' /* slave:must be Y */; - -connection master; -revoke select on *.* from 'user_foo'; -select select_priv from mysql.user where user='user_foo' /* master:must be N */; - -sync_slave_with_master; -#connection slave; -select select_priv from mysql.user where user='user_foo' /* slave:must get Y */; - -### CLEAN-UP - -connection slave; ---disable_abort_on_error -revoke select on *.* FROM 'user_foo'; ---enable_abort_on_error - -connection master; -delete from mysql.user where user="user_foo"; -sync_slave_with_master; - -# Since changes to mysql.* are ignored, the revoke need to -# be done on slave as well -delete from mysql.user where user="user_foo"; diff --git a/mysql-test/t/rpl_ignore_table-slave.opt b/mysql-test/t/rpl_ignore_table-slave.opt deleted file mode 100644 index 3aabbb2e0f5..00000000000 --- a/mysql-test/t/rpl_ignore_table-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.t1 --replicate-ignore-table=test.t2 --replicate-ignore-table=test.t3 --replicate-wild-ignore-table=%.tmptbl% diff --git a/mysql-test/t/rpl_ignore_table.test b/mysql-test/t/rpl_ignore_table.test deleted file mode 100644 index fd4ae64165a..00000000000 --- a/mysql-test/t/rpl_ignore_table.test +++ /dev/null @@ -1,164 +0,0 @@ -source include/master-slave.inc; - -# -# BUG#16487 -# -# Requirement: -# Multi-updates on ignored tables should not fail even if the slave does -# not have the ignored tables. -# -# Note table t1, t2, and t3 are ignored in the option file to this test. -# - ---echo **** Test case for BUG#16487 **** ---echo **** Master **** -connection master; -CREATE TABLE test.t4 (a int); -CREATE TABLE test.t1 (a int); - -# Expect: The row must *not* by updated on slave, since t1 is ignored -UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5; - ---echo **** Slave **** -sync_slave_with_master; -SELECT * FROM t4; - -# Cleanup -connection master; -DROP TABLE t1; -DROP TABLE t4; - -sync_slave_with_master; - - -# -# Bug#25482 GRANT statements are not replicated if -# you use "replicate-ignore-table" -# - ---echo **** Test case for BUG#25482 **** ---echo **** Adding GRANTS on master **** - -connection master; -create table test.t1(a int); -create table test.t4(a int); - -# Simple user that should not replicate -GRANT SELECT ON test.t1 TO mysqltest1@localhost; - -# Partial replicate -GRANT INSERT ON test.t4 TO mysqltest2@localhost; -GRANT select, update, insert, references on t1 - to mysqltest2@localhost; - -# Partial replicate 2 -GRANT SELECT ON test.* TO mysqltest3@localhost; -GRANT INSERT ON test.t4 TO mysqltest3@localhost; -GRANT select(a), update(a), insert(a), references(a) on t4 - to mysqltest3@localhost; - -# Create another database and table -create database mysqltest2; -create table mysqltest2.t2 (id int); -# Create a grant that should replicate -GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; - -# Create a grant manually -insert into mysql.user (user, host) values ("mysqltest5", "somehost"); - -# Partial replicate 3 with *.* -GRANT SELECT ON *.* TO mysqltest6@localhost; -GRANT INSERT ON *.* TO mysqltest6@localhost; -GRANT INSERT ON test.* TO mysqltest6@localhost; -GRANT INSERT ON test.t1 TO mysqltest6@localhost; - -show grants for mysqltest1@localhost; -show grants for mysqltest2@localhost; -show grants for mysqltest3@localhost; -show grants for mysqltest4@localhost; -show grants for mysqltest6@localhost; - -flush privileges; -show grants for mysqltest5@somehost; - - -sync_slave_with_master; - ---echo **** Checking grants on slave **** - -# Check that grants are replicated to slave -show grants for mysqltest2@localhost; -show grants for mysqltest3@localhost; -show grants for mysqltest4@localhost; -show grants for mysqltest5@somehost; -show grants for mysqltest6@localhost; - -# mysqltest1 should not be on slave ---error 1141 -show grants for mysqltest1@localhost; - ---echo **** Revoking grants on master **** -connection master; -REVOKE SELECT ON test.t1 FROM mysqltest1@localhost; -REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost; -REVOKE select(a) on t4 - from mysqltest3@localhost; - -show grants for mysqltest1@localhost; -show grants for mysqltest3@localhost; -show grants for mysqltest4@localhost; - -sync_slave_with_master; - ---echo **** Checking grants on slave **** - -# mysqltest1 should not be on slave ---error 1141 -show grants for mysqltest1@localhost; -show grants for mysqltest3@localhost; -show grants for mysqltest4@localhost; - -# Cleanup -connection master; -drop table t1, t4, mysqltest2.t2; -drop database mysqltest2; -delete from mysql.user where user like "mysqltest%"; -delete from mysql.db where user like "mysqltest%"; -# -# BUG 27606 causes failure to replicate this statement -# move it to slave instead -#delete from mysql.tables_priv where user like "mysqltest%"; -delete from mysql.columns_priv where user like "mysqltest%"; -sync_slave_with_master; - -#BUG27606 -delete from mysql.tables_priv where user like "mysqltest%"; - -connection master; - -#BUG27606 -delete from mysql.tables_priv where user like "mysqltest%"; - -# -# bug#22877 replication character sets get out of sync -# using replicate-wild-ignore-table -# -connection master; ---disable_warnings -DROP TABLE IF EXISTS t5; ---enable_warnings -CREATE TABLE t5 ( - word varchar(50) collate utf8_unicode_ci NOT NULL default '' -) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -SET @@session.character_set_client=33,@@session.collation_connection=192; -CREATE TEMPORARY TABLE tmptbl504451f4258$1 (id INT NOT NULL) ENGINE=MEMORY; -INSERT INTO t5 (word) VALUES ('TEST’'); -SELECT HEX(word) FROM t5; -sync_slave_with_master; -connection slave; -SELECT HEX(word) FROM t5; ---error 1146 -SELECT * FROM tmptbl504451f4258$1; -connection master; -DROP TABLE t5; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_ignore_table_update-slave.opt b/mysql-test/t/rpl_ignore_table_update-slave.opt deleted file mode 100644 index 177f89e0910..00000000000 --- a/mysql-test/t/rpl_ignore_table_update-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.mysqltest_foo diff --git a/mysql-test/t/rpl_ignore_table_update.test b/mysql-test/t/rpl_ignore_table_update.test deleted file mode 100644 index fe030f90411..00000000000 --- a/mysql-test/t/rpl_ignore_table_update.test +++ /dev/null @@ -1,38 +0,0 @@ -# This one assumes we are ignoring updates on table mysqltest_foo, but doing -# the ones on all other tables - -source include/master-slave.inc; -connection slave; - -# -# For this test we must be in the test database -# -use test; - ---disable_warnings -drop table if exists mysqltest_foo; -drop table if exists mysqltest_bar; ---enable_warnings - -create table mysqltest_foo (n int); -insert into mysqltest_foo values(4); -connection master; -use test; -create table mysqltest_foo (n int); -insert into mysqltest_foo values(5); -create table mysqltest_bar (m int); -insert into mysqltest_bar values(15); -create table t1 (k int); -insert into t1 values(55); -save_master_pos; -connection slave; -sync_with_master; -select mysqltest_foo.n,mysqltest_bar.m,t1.k from mysqltest_foo,mysqltest_bar,t1; -connection master; -drop table mysqltest_foo,mysqltest_bar,t1; -save_master_pos; -connection slave; -sync_with_master; -drop table mysqltest_foo,mysqltest_bar,t1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_incident-master.opt b/mysql-test/t/rpl_incident-master.opt deleted file mode 100644 index 912801debc4..00000000000 --- a/mysql-test/t/rpl_incident-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-debug=+d,incident_database_resync_on_replace diff --git a/mysql-test/t/rpl_incident.test b/mysql-test/t/rpl_incident.test deleted file mode 100644 index 507cd0e0798..00000000000 --- a/mysql-test/t/rpl_incident.test +++ /dev/null @@ -1,42 +0,0 @@ ---source include/master-slave.inc ---source include/have_debug.inc - ---echo **** On Master **** -CREATE TABLE t1 (a INT); - -INSERT INTO t1 VALUES (1),(2),(3); -SELECT * FROM t1; - -# This will generate an incident log event and store it in the binary -# log before the replace statement. -REPLACE INTO t1 VALUES (4); ---save_master_pos -SELECT * FROM t1; - -connection slave; ---wait_for_slave_to_stop - -# The 4 should not be inserted into the table, since the incident log -# event should have stop the slave. ---echo **** On Slave **** -SELECT * FROM t1; - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; ---sync_with_master - -# Now, we should have inserted the row into the table and the slave -# should be running. We should also have rotated to a new binary log. - -SELECT * FROM t1; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -connection master; -DROP TABLE t1; ---sync_slave_with_master diff --git a/mysql-test/t/rpl_init_slave-slave.opt b/mysql-test/t/rpl_init_slave-slave.opt deleted file mode 100644 index 337e8a60d97..00000000000 --- a/mysql-test/t/rpl_init_slave-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---init-slave="set global max_connections=500" diff --git a/mysql-test/t/rpl_init_slave.test b/mysql-test/t/rpl_init_slave.test deleted file mode 100644 index 139b4902e12..00000000000 --- a/mysql-test/t/rpl_init_slave.test +++ /dev/null @@ -1,34 +0,0 @@ -source include/master-slave.inc; - -# -# Test of init_slave variable -# - -save_master_pos; -connection slave; -sleep 1; -show variables like 'init_slave'; -show variables like 'max_connections'; -sync_with_master; -reset master; -connection master; -show variables like 'init_slave'; -show variables like 'max_connections'; -save_master_pos; -connection slave; -sync_with_master; -# Save variable value -set @my_global_init_connect= @@global.init_connect; -set global init_connect="set @c=1"; -show variables like 'init_connect'; -connection master; -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -# Restore changed global variable -set global init_connect= @my_global_init_connect; -set global max_connections= default; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_innodb.test b/mysql-test/t/rpl_innodb.test deleted file mode 100644 index b88276e2107..00000000000 --- a/mysql-test/t/rpl_innodb.test +++ /dev/null @@ -1,48 +0,0 @@ -# File for specialities regarding replication from or to InnoDB -# tables. - -source include/master-slave.inc; -source include/have_innodb.inc; - -# -# Bug#11401: Load data infile 'REPLACE INTO' fails on slave. -# -connection master; -CREATE TABLE t4 ( - id INT(5) unsigned NOT NULL auto_increment, - name varchar(15) NOT NULL default '', - number varchar(35) NOT NULL default 'default', - PRIMARY KEY (id), - UNIQUE KEY unique_rec (name,number) -) ENGINE=InnoDB; - ---disable_warnings -LOAD DATA - INFILE '../std_data_ln/loaddata_pair.dat' - REPLACE INTO TABLE t4 - (name,number); ---enable_warnings -SELECT * FROM t4; - -sync_slave_with_master; -SELECT * FROM t4; - -connection master; ---disable_warnings -LOAD DATA - INFILE '../std_data_ln/loaddata_pair.dat' - REPLACE INTO TABLE t4 - (name,number); ---enable_warnings -SELECT * FROM t4; - -sync_slave_with_master; -SELECT * FROM t4; - -connection master; ---disable_query_log -DROP TABLE t4; ---enable_query_log -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_insert.test b/mysql-test/t/rpl_insert.test deleted file mode 100644 index 0d471a0e0a9..00000000000 --- a/mysql-test/t/rpl_insert.test +++ /dev/null @@ -1,44 +0,0 @@ ---echo # ---echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog ---echo # - ---source include/master-slave.inc ---source include/not_embedded.inc ---source include/not_windows.inc - ---disable_warnings -CREATE SCHEMA IF NOT EXISTS mysqlslap; -USE mysqlslap; ---enable_warnings - -CREATE TABLE t1 (id INT, name VARCHAR(64)); - -let $query = "INSERT DELAYED INTO t1 VALUES (1, 'Dr. No'), (2, 'From Russia With Love'), (3, 'Goldfinger'), (4, 'Thunderball'), (5, 'You Only Live Twice')"; ---exec $MYSQL_SLAP --silent --concurrency=5 --iterations=200 --query=$query --delimiter=";" - -# Wait until all the 5000 inserts has been inserted into the table ---disable_query_log -let $counter= 300; # Max 30 seconds wait -while (`select count(*)!=5000 from mysqlslap.t1`) -{ - sleep 0.1; - dec $counter; - if (!$counter) - { - Number of records in t1 didnt reach 5000; - } -} ---enable_query_log - -SELECT COUNT(*) FROM mysqlslap.t1; -sync_slave_with_master; -SELECT COUNT(*) FROM mysqlslap.t1; - ---echo # ---echo # Cleanup ---echo # - -connection master; -USE test; -DROP SCHEMA mysqlslap; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_insert_id-slave.opt b/mysql-test/t/rpl_insert_id-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_insert_id-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_insert_id.test b/mysql-test/t/rpl_insert_id.test deleted file mode 100644 index bfd66431d3c..00000000000 --- a/mysql-test/t/rpl_insert_id.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_insert_id.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=innodb; --- source extra/rpl_tests/rpl_insert_id.test diff --git a/mysql-test/t/rpl_insert_id_pk-slave.opt b/mysql-test/t/rpl_insert_id_pk-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_insert_id_pk-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_insert_id_pk.test b/mysql-test/t/rpl_insert_id_pk.test deleted file mode 100644 index 01f30b78ac5..00000000000 --- a/mysql-test/t/rpl_insert_id_pk.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_insert_id.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=innodb; --- source extra/rpl_tests/rpl_insert_id_pk.test diff --git a/mysql-test/t/rpl_insert_ignore-slave.opt b/mysql-test/t/rpl_insert_ignore-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_insert_ignore-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_insert_ignore.test b/mysql-test/t/rpl_insert_ignore.test deleted file mode 100644 index dc8994b82f3..00000000000 --- a/mysql-test/t/rpl_insert_ignore.test +++ /dev/null @@ -1,8 +0,0 @@ -##################################### -# Wrapper for rpl_insert_ignore.test# -##################################### --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=innodb; -let $engine_type2=myisam; --- source extra/rpl_tests/rpl_insert_ignore.test diff --git a/mysql-test/t/rpl_insert_select.test b/mysql-test/t/rpl_insert_select.test deleted file mode 100644 index 677be526982..00000000000 --- a/mysql-test/t/rpl_insert_select.test +++ /dev/null @@ -1,19 +0,0 @@ -# Testcase for BUG#10456 - INSERT INTO ... SELECT violating a primary key -# breaks replication - --- source include/master-slave.inc -connection master; - -create table t1 (n int not null primary key); -insert into t1 values (1); -create table t2 (n int); -insert into t2 values (1); -insert ignore into t1 select * from t2; -insert into t1 values (2); -sync_slave_with_master; -connection slave; -select * from t1; - -connection master; -drop table t1,t2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_known_bugs_detection-master.opt b/mysql-test/t/rpl_known_bugs_detection-master.opt deleted file mode 100644 index d4ba386a1a0..00000000000 --- a/mysql-test/t/rpl_known_bugs_detection-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-debug=d,pretend_version_50034_in_binlog diff --git a/mysql-test/t/rpl_known_bugs_detection.test b/mysql-test/t/rpl_known_bugs_detection.test deleted file mode 100644 index b300603f454..00000000000 --- a/mysql-test/t/rpl_known_bugs_detection.test +++ /dev/null @@ -1,93 +0,0 @@ -# Test to see if slave can detect certain known bugs present -# on the master, and appropriately decides to stop -# (assuming the bug is fixed in the slave, slave cannot of course -# imitate the bug, so it has to stop). - -source include/have_debug.inc; -source include/master-slave.inc; - -# Currently only statement-based-specific bugs are here --- source include/have_binlog_format_mixed_or_statement.inc - -# -# This is to test that slave properly detects if -# master may suffer from: -# BUG#24432 "INSERT... ON DUPLICATE KEY UPDATE skips auto_increment values" -# (i.e. on master, INSERT ON DUPLICATE KEY UPDATE is used and manipulates -# an auto_increment column, and is binlogged statement-based). -# - -# testcase with INSERT VALUES -CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, -UNIQUE(b)); -sync_slave_with_master; -connection master; -INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; -SELECT * FROM t1; -connection slave; ---source include/wait_for_slave_sql_to_stop.inc -# show the error message ---replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 # ---query_vertical show slave status; -# show that it was not replicated -SELECT * FROM t1; - -# restart replication for the next testcase -stop slave; -reset slave; -connection master; -reset master; -drop table t1; -connection slave; -start slave; - -# testcase with INSERT SELECT -connection master; -CREATE TABLE t1 ( - id bigint(20) unsigned NOT NULL auto_increment, - field_1 int(10) unsigned NOT NULL, - field_2 varchar(255) NOT NULL, - field_3 varchar(255) NOT NULL, - PRIMARY KEY (id), - UNIQUE KEY field_1 (field_1, field_2) -); -CREATE TABLE t2 ( - field_a int(10) unsigned NOT NULL, - field_b varchar(255) NOT NULL, - field_c varchar(255) NOT NULL -); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (1, 'a', '1a'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (2, 'b', '2b'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d'); -INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e'); -sync_slave_with_master; -connection master; -# Updating table t1 based on values from table t2 -INSERT INTO t1 (field_1, field_2, field_3) -SELECT t2.field_a, t2.field_b, t2.field_c -FROM t2 -ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c; -# Inserting new record into t2 -INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f'); -# Updating t1 again -INSERT INTO t1 (field_1, field_2, field_3) -SELECT t2.field_a, t2.field_b, t2.field_c -FROM t2 -ON DUPLICATE KEY UPDATE -t1.field_3 = t2.field_c; -SELECT * FROM t1; -connection slave; ---source include/wait_for_slave_sql_to_stop.inc -# show the error message ---replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 # ---query_vertical show slave status; -# show that it was not replicated -SELECT * FROM t1; -connection master; -drop table t1, t2; -connection slave; -drop table t1, t2; - -# End of 5.0 tests diff --git a/mysql-test/t/rpl_load_from_master-slave.opt b/mysql-test/t/rpl_load_from_master-slave.opt deleted file mode 100644 index c015c02ba78..00000000000 --- a/mysql-test/t/rpl_load_from_master-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-do-table=mysqltest.% diff --git a/mysql-test/t/rpl_load_from_master.test b/mysql-test/t/rpl_load_from_master.test deleted file mode 100644 index 9bab7d5696e..00000000000 --- a/mysql-test/t/rpl_load_from_master.test +++ /dev/null @@ -1,180 +0,0 @@ -# This one assumes we are ignoring updates on tables in database mysqltest2, -# but doing the ones in database mysqltest -################################################################# -# Change Author: JBM -# Change Date: 2006-02-02 -# Change: Added ENGINE=MyISAM -# Reason: LOAD from master is only supported by MyISAM -################################################################# - -source include/master-slave.inc; ---disable_warnings -drop database if exists mysqltest; -drop database if exists mysqltest2; -drop database if exists mysqltest3; -connection slave; -drop database if exists mysqltest; -drop database if exists mysqltest2; -drop database if exists mysqltest3; -connection master; -create database mysqltest2; -create database mysqltest; ---enable_warnings - -save_master_pos; -connection slave; -sync_with_master; -create database mysqltest2; -create table mysqltest2.foo (n int)ENGINE=MyISAM; -insert into mysqltest2.foo values(4); -connection master; -create table mysqltest2.foo (n int)ENGINE=MyISAM; -insert into mysqltest2.foo values(5); -create table mysqltest.bar (m int)ENGINE=MyISAM; -insert into mysqltest.bar values(15); -save_master_pos; -connection slave; -sync_with_master; -select mysqltest2.foo.n,mysqltest.bar.m from mysqltest2.foo,mysqltest.bar; -connection master; -drop database mysqltest; -drop database if exists mysqltest2; -save_master_pos; -connection slave; -sync_with_master; ---error 1008 -drop database mysqltest; -drop database mysqltest2; - -# Now let's test load data from master - -# First create some databases and tables on the master - -connection master; -set sql_log_bin = 0; -create database mysqltest2; -create database mysqltest; -show databases; -create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; -create table mysqltest2.t2(n int, s text)ENGINE=MyISAM; -insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three'); -insert into mysqltest2.t2 values (11, 'eleven'), (12, 'twelve'), (13, 'thirteen'); - -create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; -create table mysqltest.t2(n int, s text)ENGINE=MyISAM; -insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three test'); -insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'), - (13, 'thirteen test'); -set sql_log_bin = 1; -save_master_pos; -connection slave; -sync_with_master; - -# This should show that the slave is empty at this point -show databases; -# Create mysqltest2 and mysqltest3 on slave; we expect that LOAD DATA FROM -# MASTER will neither touch database mysqltest nor mysqltest3 -create database mysqltest2; -create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest2.t1 values (1, 'original foo.t1'); -create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest2.t3 values (1, 'original foo.t3'); -create database mysqltest3; -create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest3.t1 values (1, 'original foo2.t1'); - -# Create mysqltest, and mysqltest.t1, to check that it gets replaced, -# and mysqltest.t3 to check that it is not touched (there is no -# mysqltest.t3 on master) -create database mysqltest; -create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest.t1 values (1, 'original bar.t1'); -create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM; -insert into mysqltest.t3 values (1, 'original bar.t3'); - -load data from master; - -# Now let's check if we have the right tables and the right data in them -show databases; -use mysqltest2; - -# LOAD DATA FROM MASTER uses only replicate_*_db rules to decide which -# databases have to be copied. So it thinks "mysqltest" has to be -# copied. Before 4.0.16 it would first drop "mysqltest", then create -# "mysqltest". This "drop" is a bug; in that case t3 would disappear. So -# here the effect of this bug (BUG#1248) would be to leave an empty -# "mysqltest" on the slave. - -show tables; # should be t1 & t3 -select * from t1; # should be slave's original -use mysqltest3; -show tables; # should be t1 -select * from t1; # should be slave's original -use mysqltest; -show tables; # should contain master's copied t1&t2, slave's original t3 -select * from mysqltest.t1; -select * from mysqltest.t2; -select * from mysqltest.t3; - -# Now let's see if replication works -connection master; -insert into mysqltest.t1 values (4, 'four test'); -save_master_pos; -connection slave; -sync_with_master; -select * from mysqltest.t1; - -# Check that LOAD DATA FROM MASTER is able to create master.info -# if needed (if RESET SLAVE was used before), before writing to it (BUG#2922). - -stop slave; -reset slave; -load data from master; -start slave; -# see if replication coordinates were restored fine -connection master; -insert into mysqltest.t1 values (5, 'five bar'); -save_master_pos; -connection slave; -sync_with_master; -select * from mysqltest.t1; - -# Check that LOAD DATA FROM MASTER reports the error if it can't drop a -# table to be overwritten. -# DISABLED FOR NOW AS chmod IS NOT PORTABLE ON NON-UNIX -# insert into mysqltest.t1 values(10, 'should be there'); -# flush tables; -# system chmod 500 $MYSQLTEST_VARDIR/slave-data/mysqltest/; -# --error 6 -# load data from master; # should fail (errno 13) -# system chmod 700 $MYSQLTEST_VARDIR/slave-data/mysqltest/; -# select * from mysqltest.t1; # should contain the row (10, ...) - - -# Check that LOAD TABLE FROM MASTER fails if the table exists on slave ---error 1050 -load table mysqltest.t1 from master; -drop table mysqltest.t1; -load table mysqltest.t1 from master; - -# Check what happens when requestion not existing table -# ---error 1188 -load table bar.t1 from master; - -# as LOAD DATA FROM MASTER failed it did not restart slave threads -# DISABLED FOR NOW -# start slave; - -# Now time for cleanup -connection master; -drop database mysqltest; -drop database mysqltest2; -save_master_pos; -connection slave; -sync_with_master; -# These have to be dropped on slave because they are not replicated -drop database mysqltest2; -drop database mysqltest3; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_load_table_from_master.test b/mysql-test/t/rpl_load_table_from_master.test deleted file mode 100644 index b9cec3858a9..00000000000 --- a/mysql-test/t/rpl_load_table_from_master.test +++ /dev/null @@ -1,98 +0,0 @@ -########################################################### -# Change Author: JBM -# Change Date: 2006-2-2 -# Change: Added ENGINE=$engine_type for first create table -# Reason: Only MyISAM supports load from master no need to -# run test case for other engines, in addition test will -# fail if other engines are set as default engine -########################################################### -# Change Author: JBM -# Change Date: 2006-2-3 -# Change: removed ENGINE=$engine_type for first create table -# and renamed test file to rpl_load_table_from_master.test. -# In addition added test requirements. -# Reason: Request from review. -############################################################ -# REQUIREMENT TEST 1: -# LOAD TABLE FROM MASTER must work with a forced timestamp. -############################################################ -# -# Test forced timestamp -# --- source include/master-slave.inc - --- echo "******************** Test Requirment 1 *************" - -# Don't log table creating to the slave as we want to test LOAD TABLE -SET SQL_LOG_BIN=0,timestamp=200006; -eval CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM; -INSERT INTO t1 ( a) VALUE ('F'); -select unix_timestamp(t) from t1; -connection slave; -load table t1 from master; -select unix_timestamp(t) from t1; - -# Delete the created table on master and slave -connection master; -set SQL_LOG_BIN=1,timestamp=default; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; -connection master; - -# -# Test copying table with checksum -# - -# Don't log table creating to the slave as we want to test LOAD TABLE -set SQL_LOG_BIN=0; - -####################################################### -# REQUIREMENTi TEST 2: -#LOAD TABLE FROM MASTER must work with table checksum -####################################################### --- echo "******************** Test Requirment 2 *************" - -eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1; -INSERT INTO t1 VALUES (1); -save_master_pos; -connection slave; -sync_with_master; -load table t1 from master; -check table t1; -drop table t1; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -connection master; -set SQL_LOG_BIN=0; -create table t1 (word char(20) not null, index(word))ENGINE=MyISAM; -load data infile '../std_data_ln/words.dat' into table t1; -create table t2 (word char(20) not null)ENGINE=MyISAM; -load data infile '../std_data_ln/words.dat' into table t2; -create table t3 (word char(20) not null primary key)ENGINE=MyISAM; -connection slave; -load table t1 from master; -load table t2 from master; -load table t3 from master; -check table t1; -select count(*) from t2; -select count(*) from t3; -connection master; -set SQL_LOG_BIN=1; -drop table if exists t1,t2,t3; -save_master_pos; -connection slave; -sync_with_master; -create table t1(n int); -drop table t1; - - - - - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test deleted file mode 100644 index 6f9ee4ef80a..00000000000 --- a/mysql-test/t/rpl_loaddata.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_loaddata.test diff --git a/mysql-test/t/rpl_loaddata_charset.test b/mysql-test/t/rpl_loaddata_charset.test deleted file mode 100644 index 7f2389cb9f6..00000000000 --- a/mysql-test/t/rpl_loaddata_charset.test +++ /dev/null @@ -1,33 +0,0 @@ -# -# Check LOAD DATA + character sets + replication -# -source include/master-slave.inc; - -# -# Bug#15126 character_set_database is not replicated -# (LOAD DATA INFILE need it) -# -connection master; -create table t1 (a varchar(10) character set utf8); -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=koi8r; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=DEFAULT; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=koi8r; -load data infile '../std_data_ln/loaddata6.dat' into table t1; -set @@character_set_database=DEFAULT; -load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8r; - -select hex(a) from t1; - -save_master_pos; -connection slave; -sync_with_master; - -select hex(a) from t1; -connection master; -drop table t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_loaddata_m-master.opt b/mysql-test/t/rpl_loaddata_m-master.opt deleted file mode 100644 index 9d4a8f0b95e..00000000000 --- a/mysql-test/t/rpl_loaddata_m-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog_ignore_db=test diff --git a/mysql-test/t/rpl_loaddata_m.test b/mysql-test/t/rpl_loaddata_m.test deleted file mode 100644 index 537d4c163ef..00000000000 --- a/mysql-test/t/rpl_loaddata_m.test +++ /dev/null @@ -1,52 +0,0 @@ -# See if the master logs LOAD DATA INFILE correctly when binlog_*_db rules -# exist. -# This is for BUG#1100 (LOAD DATA INFILE was half-logged). -###################################################### -# Change Author: JBM -# Change Date: 2005-12-22 -# Change: Test rewritten to remove show binlog events -# and to test the option better + Cleanup -###################################################### --- source include/master-slave.inc - ---disable_warnings -drop database if exists mysqltest; ---enable_warnings - -connection master; -# 'test' database should be ignored by the slave -USE test; -CREATE TABLE t1(a INT, b INT, UNIQUE(b)); -LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE test.t1; -SELECT COUNT(*) FROM test.t1; - -# 'mysqltest' database should NOT be ignored by the slave -CREATE DATABASE mysqltest; -USE mysqltest; -CREATE TABLE t1(a INT, b INT, UNIQUE(b)); -LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE mysqltest.t1; -SELECT COUNT(*) FROM mysqltest.t1; - -# Now lets check the slave to see what we have :-) -save_master_pos; -connection slave; -sync_with_master; - -SHOW DATABASES; - -USE test; -SHOW TABLES; - -USE mysqltest; -SHOW TABLES; -SELECT COUNT(*) FROM mysqltest.t1; - -#show binlog events; - -# Cleanup -connection master; -DROP DATABASE mysqltest; -DROP TABLE test.t1; -sync_slave_with_master; - -# End of test diff --git a/mysql-test/t/rpl_loaddata_s-slave.opt b/mysql-test/t/rpl_loaddata_s-slave.opt deleted file mode 100644 index 9d4a8f0b95e..00000000000 --- a/mysql-test/t/rpl_loaddata_s-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog_ignore_db=test diff --git a/mysql-test/t/rpl_loaddata_s.test b/mysql-test/t/rpl_loaddata_s.test deleted file mode 100644 index f397d741310..00000000000 --- a/mysql-test/t/rpl_loaddata_s.test +++ /dev/null @@ -1,28 +0,0 @@ -# See if the slave logs (in its own binlog, with --log-slave-updates) a -# replicated LOAD DATA INFILE correctly when it has binlog_*_db rules. -# This is for BUG#1100 (LOAD DATA INFILE was half-logged). - --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - -connection slave; -# Not sure why we connect to slave and then try to reset master, but I will leave it [JBM] -reset master; - -connection master; -# 'test' is the current database -create table test.t1(a int, b int, unique(b)); -load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1; - -# Test logging on slave; - -save_master_pos; -connection slave; -sync_with_master; -select count(*) from test.t1; # check that LOAD was replicated -source include/show_binlog_events.inc; - -# Cleanup -connection master; -drop table test.t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_loaddata_simple.test b/mysql-test/t/rpl_loaddata_simple.test deleted file mode 100644 index 9e908cac677..00000000000 --- a/mysql-test/t/rpl_loaddata_simple.test +++ /dev/null @@ -1,14 +0,0 @@ ---source include/master-slave.inc - -CREATE TABLE t1 (word CHAR(20) NOT NULL); -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; -SELECT * FROM t1 ORDER BY word; -sync_slave_with_master; - -# Check -SELECT * FROM t1 ORDER BY word; - -# Cleanup -connection master; -drop table t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_loaddatalocal.test b/mysql-test/t/rpl_loaddatalocal.test deleted file mode 100644 index b10603e7195..00000000000 --- a/mysql-test/t/rpl_loaddatalocal.test +++ /dev/null @@ -1,65 +0,0 @@ -# See if "LOAD DATA LOCAL INFILE" is well replicated -# (LOAD DATA LOCAL INFILE is not written to the binlog -# the same way as LOAD DATA INFILE : Append_blocks are smaller). -# In MySQL 4.0 <4.0.12 there were 2 bugs with LOAD DATA LOCAL INFILE : -# - the loaded file was not written entirely to the master's binlog, -# only the first 4KB, 8KB or 16KB usually. -# - the loaded file's first line was not written entirely to the -# master's binlog (1st char was absent) -source include/master-slave.inc; - -create table t1(a int); -let $1=10000; -disable_query_log; -set SQL_LOG_BIN=0; -while ($1) -{ - insert into t1 values(1); - dec $1; -} -set SQL_LOG_BIN=1; -enable_query_log; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; -#This will generate a 20KB file, now test LOAD DATA LOCAL -truncate table t1; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile -save_master_pos; -connection slave; -sync_with_master; -select a,count(*) from t1 group by a; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests - -# -# Now let us test how well we replicate LOAD DATA LOCAL in situation when -# we met duplicates in tables to which we are adding rows. -# (It supposed that LOAD DATA LOCAL ignores such errors) -# -connection master; -create table t1(a int); -insert into t1 values (1), (2), (2), (3); ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1; -drop table t1; -create table t1(a int primary key); ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1; ---remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile -SELECT * FROM t1 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM t1 ORDER BY a; -connection master; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; diff --git a/mysql-test/t/rpl_loadfile.test b/mysql-test/t/rpl_loadfile.test deleted file mode 100644 index a671bab15bb..00000000000 --- a/mysql-test/t/rpl_loadfile.test +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -############################################################################# -# TEST: To test the LOAD_FILE() in rbr # -############################################################################# -# Change Author: JBM -# Change Date: 2006-01-16 -# Change: Added Order by for NDB -########## - -# Includes --- source include/master-slave.inc - - -# Begin clean up test section ---disable_warnings -connection master; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; ---enable_warnings - -# Section 1 test - -CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES(1,'test'); -UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=1; -delimiter |; -create procedure test.p1() -begin - INSERT INTO test.t1 VALUES(2,'test'); - UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=2; -end| -delimiter ;| - -CALL test.p1(); -SELECT * FROM test.t1 ORDER BY blob_column; -save_master_pos; -# Need to allow some time when NDB engine is used for -# the injector thread to have time to populate binlog -sleep 10; -sync_slave_with_master; -connection slave; -SELECT * FROM test.t1 ORDER BY blob_column; - -# Cleanup -connection master; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE test.t1; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_locale.test b/mysql-test/t/rpl_locale.test deleted file mode 100644 index 2f2d637e1b4..00000000000 --- a/mysql-test/t/rpl_locale.test +++ /dev/null @@ -1,24 +0,0 @@ -# Replication of locale variables - -source include/master-slave.inc; - -# -# Bug#22645 LC_TIME_NAMES: Statement not replicated -# -connection master; -create table t1 (s1 char(10)); -set lc_time_names= 'de_DE'; -insert into t1 values (date_format('2001-01-01','%W')); -set lc_time_names= 'en_US'; -insert into t1 values (date_format('2001-01-01','%W')); -select * from t1; -sync_slave_with_master; -connection slave; -select * from t1; -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests - - diff --git a/mysql-test/t/rpl_log_pos.test b/mysql-test/t/rpl_log_pos.test deleted file mode 100644 index 2c6c1d9868d..00000000000 --- a/mysql-test/t/rpl_log_pos.test +++ /dev/null @@ -1,57 +0,0 @@ -########## -# Change Author: JBM -# Change Date: 2006-01-16 -# Change: Added Order by for NDB -########## - -# -# Testing of setting slave to wrong log position with master_log_pos -# - -# Passes with rbr no problem, removed statement include [jbm] - -source include/master-slave.inc; ---replace_column 3 -show master status; -sync_slave_with_master; - -stop slave; ---source include/wait_for_slave_to_stop.inc - -change master to master_log_pos=75; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # -query_vertical show slave status; - -start slave; -let $slave_param= Slave_SQL_Running; -let $slave_param_value= Yes; ---source include/wait_for_slave_param.inc -let $slave_param= Slave_IO_Running; -let $slave_param_value= No; ---source include/wait_for_slave_param.inc -stop slave; ---source include/wait_for_slave_to_stop.inc - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # -query_vertical show slave status; - -connection master; ---replace_column 3 -show master status; -create table if not exists t1 (n int); -drop table if exists t1; -create table t1 (n int); -insert into t1 values (1),(2),(3); -save_master_pos; -connection slave; -change master to master_log_pos=106; -start slave; -sync_with_master; -select * from t1 ORDER BY n; -connection master; -drop table t1; -sync_slave_with_master; - ---echo End of 5.0 tests diff --git a/mysql-test/t/rpl_many_optimize.test b/mysql-test/t/rpl_many_optimize.test deleted file mode 100644 index 91fab0b27a8..00000000000 --- a/mysql-test/t/rpl_many_optimize.test +++ /dev/null @@ -1,22 +0,0 @@ -# Test for BUG#7658 "optimize crashes slave thread (1 in 1000)]" - -source include/master-slave.inc; - -create table t1 (a int not null auto_increment primary key, b int, key(b)); -INSERT INTO t1 (a) VALUES (1),(2); -# Now many OPTIMIZE to test if we crash (BUG#7658) -let $1=300; -disable_query_log; -disable_result_log; -while ($1) -{ - eval OPTIMIZE TABLE t1; - dec $1; -} -enable_result_log; -enable_query_log; -drop table t1; -# Bug was that slave segfaulted after ~ a hundred of OPTIMIZE (or ANALYZE) -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_master_pos_wait.test b/mysql-test/t/rpl_master_pos_wait.test deleted file mode 100644 index 893c8746efc..00000000000 --- a/mysql-test/t/rpl_master_pos_wait.test +++ /dev/null @@ -1,18 +0,0 @@ -# See if master_pos_wait(,,timeout) -# Terminates with "timeout expired" (-1) -source include/master-slave.inc; -save_master_pos; -connection slave; -sync_with_master; -# Ask for a master log that has certainly not been reached yet -# timeout= 2 seconds -select master_pos_wait('master-bin.999999',0,2); -explain extended select master_pos_wait('master-bin.999999',0,2); -# Testcase for bug 651 (master_pos_wait() hangs if slave idle and STOP SLAVE). -send select master_pos_wait('master-bin.999999',0); -connection slave1; -stop slave sql_thread; -connection slave; -reap; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_misc_functions-slave.sh b/mysql-test/t/rpl_misc_functions-slave.sh deleted file mode 100755 index 8ce79797822..00000000000 --- a/mysql-test/t/rpl_misc_functions-slave.sh +++ /dev/null @@ -1 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile diff --git a/mysql-test/t/rpl_misc_functions.test b/mysql-test/t/rpl_misc_functions.test deleted file mode 100644 index db9b557baad..00000000000 --- a/mysql-test/t/rpl_misc_functions.test +++ /dev/null @@ -1,103 +0,0 @@ -# -# Test of replicating some difficult functions -# -source include/master-slave.inc; - -create table t1(id int, i int, r1 int, r2 int, p varchar(100)); -insert into t1 values(1, connection_id(), 0, 0, ""); -# don't put rand and password in the same query, to see if they replicate -# independently -# Pure rand test -insert into t1 values(2, 0, rand()*1000, rand()*1000, ""); -# change the rand suite on the master (we do this because otherwise password() -# benefits from the fact that the above rand() is well replicated : -# it picks the same sequence element, which hides a possible bug in password() replication. -set sql_log_bin=0; -insert into t1 values(6, 0, rand(), rand(), ""); -delete from t1 where id=6; -set sql_log_bin=1; -# Pure password test -insert into t1 values(3, 0, 0, 0, password('does_this_work?')); -# "altogether now" -insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?')); -select * into outfile 'rpl_misc_functions.outfile' from t1; -sync_slave_with_master; -create table t2 like t1; -# read the values from the master table ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -eval load data local infile '$MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2; -# compare them with the replica; the SELECT below should return no row -select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p); - -connection master; -drop table t1; - -# End of 4.1 tests - -# -# BUG#25543 test calling rand() multiple times on the master in -# a stored procedure. -# - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -CREATE TABLE t1 (col_a double default NULL); - -DELIMITER |; - -# Use a SP that calls rand() multiple times -CREATE PROCEDURE test_replication_sp1() -BEGIN - INSERT INTO t1 VALUES (rand()), (rand()); - INSERT INTO t1 VALUES (rand()); -END| - -# Use a SP that calls another SP to call rand() multiple times -CREATE PROCEDURE test_replication_sp2() -BEGIN - CALL test_replication_sp1(); - CALL test_replication_sp1(); -END| - -# Use a SF that calls rand() multiple times -CREATE FUNCTION test_replication_sf() RETURNS DOUBLE DETERMINISTIC -BEGIN - RETURN (rand() + rand()); -END| - -DELIMITER ;| - -# Exercise the functions and procedures then compare the results on -# the master to those on the slave. -CALL test_replication_sp1(); -CALL test_replication_sp2(); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); - -# Record the results of the query on the master ---exec $MYSQL --port=$MASTER_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql - ---sync_slave_with_master - -# Record the results of the query on the slave ---exec $MYSQL --port=$SLAVE_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql - -# Compare the results from the master to the slave. ---exec diff $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql - -# Cleanup -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test_replication_sp1; -DROP PROCEDURE IF EXISTS test_replication_sp2; -DROP FUNCTION IF EXISTS test_replication_sf; -DROP TABLE IF EXISTS t1; ---enable_warnings ---sync_slave_with_master - -# If all is good, when can cleanup our dump files. ---remove_file $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql ---remove_file $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql diff --git a/mysql-test/t/rpl_mixed_ddl_dml.test b/mysql-test/t/rpl_mixed_ddl_dml.test deleted file mode 100644 index 6a1f81abed3..00000000000 --- a/mysql-test/t/rpl_mixed_ddl_dml.test +++ /dev/null @@ -1,46 +0,0 @@ -# Mixed DDL-DML (CREATE ... SELECT ...) statements can only be -# replicated properly in statement-based replication. -# Currently statement based due to bug 12345 ---source include/have_binlog_format_mixed_or_statement.inc - -source include/master-slave.inc; - -# Test replication of auto_increment - -create table t1 (n int auto_increment primary key); -set insert_id = 2000; -insert into t1 values (NULL),(NULL),(NULL); -sync_slave_with_master; -select * from t1; -connection master; ---replace_result $SLAVE_MYPORT 9999 -show slave hosts; -drop table t1; -sync_slave_with_master; -stop slave; -connection master; - -# Test replication of timestamp - -create table t2(id int auto_increment primary key, created datetime); -set timestamp=12345; -insert into t2 set created=now(); -select * from t2; - -# Test replication of CREATE .. LIKE (Bug #2557) - -create table t3 like t2; -create temporary table t4 like t2; -create table t5 select * from t4; -save_master_pos; -connection slave; -start slave; -sync_with_master; -select * from t2; -show create table t3; -show create table t5; -connection master; -drop table t2,t3,t5; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_multi_delete-slave.opt b/mysql-test/t/rpl_multi_delete-slave.opt deleted file mode 100644 index c98fe0b0a46..00000000000 --- a/mysql-test/t/rpl_multi_delete-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-do-table=test.% diff --git a/mysql-test/t/rpl_multi_delete.test b/mysql-test/t/rpl_multi_delete.test deleted file mode 100644 index a251cbf8833..00000000000 --- a/mysql-test/t/rpl_multi_delete.test +++ /dev/null @@ -1,26 +0,0 @@ -source include/master-slave.inc; -create table t1 (a int primary key); -create table t2 (a int); - -insert into t1 values (1); -insert into t2 values (1); - - -delete t1.* from t1, t2 where t1.a = t2.a; - -save_master_pos; -select * from t1; -select * from t2; - -connection slave; -sync_with_master; -select * from t1; -select * from t2; - -connection master; -drop table t1,t2; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_multi_delete2-slave.opt b/mysql-test/t/rpl_multi_delete2-slave.opt deleted file mode 100644 index 0febb2891b1..00000000000 --- a/mysql-test/t/rpl_multi_delete2-slave.opt +++ /dev/null @@ -1 +0,0 @@ -"--replicate-rewrite-db=mysqltest_from->mysqltest_to" --replicate-do-table=mysqltest_to.a diff --git a/mysql-test/t/rpl_multi_delete2.test b/mysql-test/t/rpl_multi_delete2.test deleted file mode 100644 index 81379d4056b..00000000000 --- a/mysql-test/t/rpl_multi_delete2.test +++ /dev/null @@ -1,68 +0,0 @@ -#multi delete replication bugs - - -source include/master-slave.inc; - -#BUG#11139 - improper wild-table and table rules -#checking for multi deletes with an alias - -connection master; -set sql_log_bin=0; -create database mysqltest_from; -set sql_log_bin=1; - -connection slave; -create database mysqltest_to; - - -connection master; -use mysqltest_from; ---disable_warnings -drop table if exists a; ---enable_warnings -CREATE TABLE a (i INT); -INSERT INTO a VALUES(1); -DELETE alias FROM a alias WHERE alias.i=1; -SELECT * FROM a; -insert into a values(2),(3); -delete a alias FROM a alias where alias.i=2; -select * from a; -save_master_pos; -connection slave; - -use mysqltest_to; -sync_with_master; -select * from a; - -# BUG#3461 -connection master; -create table t1 (a int primary key); -create table t2 (a int); - -insert into t1 values (1); -insert into t2 values (1); - -delete t1.* from t1, t2 where t1.a = t2.a; - -save_master_pos; -select * from t1; -select * from t2; - -connection slave; -# BUG#3461 would cause sync to fail -sync_with_master; -error 1146; -select * from t1; -error 1146; -select * from t2; - -# cleanup -connection master; -set sql_log_bin=0; -drop database mysqltest_from; -set sql_log_bin=1; -connection slave; -drop database mysqltest_to; - -# End of 4.1 tests - diff --git a/mysql-test/t/rpl_multi_engine-slave.opt b/mysql-test/t/rpl_multi_engine-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_multi_engine-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_multi_engine.test b/mysql-test/t/rpl_multi_engine.test deleted file mode 100644 index 10780c765f7..00000000000 --- a/mysql-test/t/rpl_multi_engine.test +++ /dev/null @@ -1,108 +0,0 @@ -# See if replication between MyISAM, MEMORY and InnoDB works. - -#This test case is not written for NDB, result files do not -#match when NDB is the default engine --- source include/not_ndb_default.inc - --- source include/master-slave.inc - -connection slave; --- source include/have_innodb.inc - -connection master; --- source include/have_innodb.inc ---disable_warnings -create database if not exists mysqltest1; -use mysqltest1; -drop table if exists t1; - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc -VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT -0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); - -sync_slave_with_master; -use mysqltest1; - -# MyISAM to MyISAM then InnoDB then MEMORY - -connection master; -alter table t1 engine=myisam; -show create table t1; -sync_slave_with_master; - -connection slave; -alter table t1 engine=myisam; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=innodb; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=memory; -show create table t1; - ---source include/rpl_multi_engine.inc - -# MEMORY to ... - -connection master; -alter table t1 engine=memory; -show create table t1; -sync_slave_with_master; - -connection slave; -alter table t1 engine=myisam; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=innodb; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=memory; -show create table t1; - ---source include/rpl_multi_engine.inc - -# InnoDB to ... - -connection master; -alter table t1 engine=innodb; -show create table t1; -sync_slave_with_master; - -connection slave; -alter table t1 engine=myisam; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=innodb; -show create table t1; - ---source include/rpl_multi_engine.inc - -connection slave; -alter table t1 engine=memory; -show create table t1; - ---source include/rpl_multi_engine.inc - -# cleanup -connection master; -DROP TABLE t1; -# Need to drop mysqltest1 as well so other test will pass. -DROP DATABASE mysqltest1; -sync_slave_with_master; - -# End of 5.1 test case diff --git a/mysql-test/t/rpl_multi_update.test b/mysql-test/t/rpl_multi_update.test deleted file mode 100644 index a6111455d16..00000000000 --- a/mysql-test/t/rpl_multi_update.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_multi_update.test diff --git a/mysql-test/t/rpl_multi_update2-slave.opt b/mysql-test/t/rpl_multi_update2-slave.opt deleted file mode 100644 index 17d4171af0e..00000000000 --- a/mysql-test/t/rpl_multi_update2-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=nothing.sensible diff --git a/mysql-test/t/rpl_multi_update2.test b/mysql-test/t/rpl_multi_update2.test deleted file mode 100644 index 7401786501e..00000000000 --- a/mysql-test/t/rpl_multi_update2.test +++ /dev/null @@ -1,9 +0,0 @@ -####################################################### -# Wrapper for rpl_multi_update2.test to allow multi # -# Engines to reuse test code. By JBM 2006-02-15 # -# Added comments section and to skip when ndb is # -# Default engine. # -####################################################### ---source include/not_ndb_default.inc -let $engine_type=MyISAM; ---source extra/rpl_tests/rpl_multi_update2.test diff --git a/mysql-test/t/rpl_multi_update3.test b/mysql-test/t/rpl_multi_update3.test deleted file mode 100644 index 438a644729c..00000000000 --- a/mysql-test/t/rpl_multi_update3.test +++ /dev/null @@ -1,9 +0,0 @@ -####################################################### -# Wrapper for rpl_multi_update3.test to allow multi # -# Engines to reuse test code. By JBM 2006-02-15 # -# Added comments section and to skip when ndb is # -# Default engine. # -####################################################### ---source include/not_ndb_default.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_multi_update3.test diff --git a/mysql-test/t/rpl_multi_update4-slave.opt b/mysql-test/t/rpl_multi_update4-slave.opt deleted file mode 100644 index fea27db43ee..00000000000 --- a/mysql-test/t/rpl_multi_update4-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-wild-do-table=d1.% diff --git a/mysql-test/t/rpl_multi_update4.test b/mysql-test/t/rpl_multi_update4.test deleted file mode 100644 index 4991a385f6f..00000000000 --- a/mysql-test/t/rpl_multi_update4.test +++ /dev/null @@ -1,45 +0,0 @@ -# Let's verify that multi-update is not always skipped by slave if -# some replicate-* rules exist. -# (BUG#15699) - -source include/master-slave.inc; - -### Clean-up - -connection master; ---disable_warnings -drop database if exists d1; -drop database if exists d2; - -connection slave; -drop database if exists d2; ---enable_warnings - -### Do on master - -connection master; -create database d1; # accepted by slave -create table d1.t0 (id int); -create database d2; # ignored by slave -use d2; -create table t1 (id int); -create table t2 (id int); -insert into t1 values (1), (2), (3), (4), (5); -insert into t2 select id + 3 from t1; -# a problematic query which must be filter out by slave -update t1 join t2 using (id) set t1.id = 0; -insert into d1.t0 values (0); # replication works - -### Check on slave - -sync_slave_with_master; -use d1; -select * from t0 where id=0; # must find - -### Clean-up -connection master; -drop database d1; -drop database d2; -sync_slave_with_master; - -# End of test diff --git a/mysql-test/t/rpl_ndb_2innodb-master.opt b/mysql-test/t/rpl_ndb_2innodb-master.opt deleted file mode 100644 index 701dddb075b..00000000000 --- a/mysql-test/t/rpl_ndb_2innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=ndbcluster diff --git a/mysql-test/t/rpl_ndb_2innodb-slave.opt b/mysql-test/t/rpl_ndb_2innodb-slave.opt deleted file mode 100644 index d8857e54be2..00000000000 --- a/mysql-test/t/rpl_ndb_2innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --default-storage-engine=innodb diff --git a/mysql-test/t/rpl_ndb_2innodb.test b/mysql-test/t/rpl_ndb_2innodb.test deleted file mode 100644 index e09d8b6685b..00000000000 --- a/mysql-test/t/rpl_ndb_2innodb.test +++ /dev/null @@ -1,16 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_ndb.inc --- source include/master-slave.inc -connection slave; --- source include/have_innodb.inc -connection master; -SET storage_engine=ndb; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/t/rpl_ndb_2myisam-master.opt b/mysql-test/t/rpl_ndb_2myisam-master.opt deleted file mode 100644 index 701dddb075b..00000000000 --- a/mysql-test/t/rpl_ndb_2myisam-master.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=ndbcluster diff --git a/mysql-test/t/rpl_ndb_2myisam-slave.opt b/mysql-test/t/rpl_ndb_2myisam-slave.opt deleted file mode 100644 index 6035ce27c46..00000000000 --- a/mysql-test/t/rpl_ndb_2myisam-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=myisam diff --git a/mysql-test/t/rpl_ndb_2myisam.test b/mysql-test/t/rpl_ndb_2myisam.test deleted file mode 100644 index abbe419bc02..00000000000 --- a/mysql-test/t/rpl_ndb_2myisam.test +++ /dev/null @@ -1,13 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_ndb.inc --- source include/master-slave.inc -SET storage_engine=ndb; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/t/rpl_ndb_UUID.test b/mysql-test/t/rpl_ndb_UUID.test deleted file mode 100644 index c6fc218beed..00000000000 --- a/mysql-test/t/rpl_ndb_UUID.test +++ /dev/null @@ -1,6 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -######################################################## ---source include/have_ndb.inc -let $engine_type=NDB; ---source extra/rpl_tests/rpl_row_UUID.test diff --git a/mysql-test/t/rpl_ndb_auto_inc.test b/mysql-test/t/rpl_ndb_auto_inc.test deleted file mode 100644 index 53bb7e764f1..00000000000 --- a/mysql-test/t/rpl_ndb_auto_inc.test +++ /dev/null @@ -1,118 +0,0 @@ -# -# Test of auto_increment in CRBR -# -##################################### -# By: JBM -# Date: 2006-02-10 -# Change: Augmented test to use with cluster -##################################### ---source include/have_ndb.inc ---source include/master-slave.inc ---source include/have_binlog_format_mixed_or_row.inc - ---echo ***************** Test 1 ************************ ---echo -CREATE TABLE t1 (a INT NOT NULL auto_increment,b INT, PRIMARY KEY (a)) ENGINE=NDB auto_increment=3; -insert into t1 values (NULL,1),(NULL,2),(NULL,3); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -create table t1 (a int not null auto_increment,b int, primary key (a)) engine=NDB; -insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); -delete from t1 where b=4; -insert into t1 values (NULL,5),(NULL,6); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; - -drop table t1; - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -# Insert with 2 insert statements to get better testing of logging -insert into t1 values (NULL),(5),(NULL); -insert into t1 values (250),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; -insert into t1 values (1000); -set @@insert_id=400; -insert into t1 values(NULL),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; -# Insert with 2 insert statements to get better testing of logging -insert into t1 values (NULL),(5),(NULL),(NULL); -insert into t1 values (500),(NULL),(502),(NULL),(600); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; -set @@insert_id=600; -# We expect a duplicate key error that we will ignore below ---error 1022 -insert into t1 values(600),(NULL),(NULL); -set @@insert_id=600; -insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo -select * from t1 ORDER BY a; -connection master; -drop table t1; - -# -# Test that auto-increment works when slave has rows in the table -# - -create table t1 (a int not null auto_increment, primary key (a)) engine=NDB; - -sync_slave_with_master; -insert into t1 values(2),(12),(22),(32),(42); -connection master; - -insert into t1 values (NULL),(NULL); -insert into t1 values (3),(NULL),(NULL); ---echo ******* Select from Master ************* ---echo -select * from t1 ORDER BY a; - -sync_slave_with_master; ---echo ******* Select from Slave ************* ---echo ---echo ** Slave should have 2, 12, 22, 32, 42 ** ---echo ** Master will have 2 but not 12, 22, 32, 42 ** ---echo -select * from t1 ORDER BY a; -connection master; - -drop table t1; - -# End cleanup -sync_slave_with_master; diff --git a/mysql-test/t/rpl_ndb_bank.test b/mysql-test/t/rpl_ndb_bank.test deleted file mode 100644 index c1448573f5b..00000000000 --- a/mysql-test/t/rpl_ndb_bank.test +++ /dev/null @@ -1,181 +0,0 @@ -# -# Currently this test only runs in the source tree with the -# ndb/test programs compiled. -# invoke with: ./mysql-test-run --ndb-extra-test --do-test=rpl_ndb_bank -# -# 1. start a "bank" application running on the master cluster -# 2. perform online sync of slave -# 3. periodically check consistency of slave -# 4. stop the bank application -# 5. check that the slave and master BANK databases are the same -# - ---source include/have_ndb.inc ---source include/have_ndb_extra.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# kill any trailing processes ---system killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL || true - ---disable_warnings -# initialize master ---connection master -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin; ---enable_warnings - -# -# These tables should correspond to the table definitions in -# storage/ndb/test/src/NDBT_Tables.cpp -# ---connection master -USE BANK; -CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - BALANCE INT UNSIGNED NOT NULL, - DEPOSIT_COUNT INT UNSIGNED NOT NULL, - DEPOSIT_SUM INT UNSIGNED NOT NULL, - WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, - WITHDRAWAL_SUM INT UNSIGNED NOT NULL, - PURGED INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) - ENGINE = NDB; - -CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, - OWNER INT UNSIGNED NOT NULL, - BALANCE INT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (ACCOUNT_ID)) - ENGINE = NDB; - -CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, - ACCOUNT INT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - OTHER_ACCOUNT INT UNSIGNED NOT NULL, - TRANSACTION_TYPE INT UNSIGNED NOT NULL, - TIME BIGINT UNSIGNED NOT NULL, - AMOUNT INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) - ENGINE = NDB; - -CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, - VALUE BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) - ENGINE = NDB; - -CREATE TABLE ACCOUNT_TYPE ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, - DESCRIPTION CHAR(64) NOT NULL, - PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) - ENGINE = NDB; - -# -# create "BANK" application -# ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankCreator >> $NDB_TOOLS_OUTPUT - -# -# start main loop -# repeat backup-restore-check -# - -# set this high if testing to run many syncs in loop ---let $2=1 -while ($2) -{ - -# -# start "BANK" application -# ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankTimer -w 5 >> $NDB_TOOLS_OUTPUT & ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankMakeGL >> $NDB_TOOLS_OUTPUT & ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/bank/bankTransactionMaker >> $NDB_TOOLS_OUTPUT & - -# -# let the "BANK" run for a while -# ---sleep 5 - ---disable_warnings -# initialize slave for sync ---connection slave -STOP SLAVE; -RESET SLAVE; -# to make sure we drop any ndbcluster tables -CREATE DATABASE IF NOT EXISTS BANK; -DROP DATABASE BANK; -# create database -CREATE DATABASE BANK; ---enable_warnings - -# -# Time to sync the slave: -# start by taking a backup on master ---connection master -RESET MASTER; ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT - -# there is no neat way to find the backupid, this is a hack to find it... ---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat -CREATE TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM mysql.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; ---exec rm $MYSQLTEST_VARDIR/tmp.dat || true ---replace_column 1 -SELECT @the_backup_id:=backup_id FROM mysql.backup_info; -let the_backup_id=`select @the_backup_id`; - -# restore on slave, first check that nothing is there ---connection slave ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -p 8 -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# -# now setup replication to continue from last epoch ---source include/ndb_setup_slave.inc ---connection slave -START SLAVE; - - -# -# Now loop and check consistency every 2 seconds on slave -# ---connection slave ---let $1=10 -while ($1) -{ - --sleep 2 - --replace_result $MASTER_MYPORT MASTER_PORT - --replace_column 1 7 8 9 16 22 23 33 - SHOW SLAVE STATUS; - STOP SLAVE; - --exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT_SLAVE ../storage/ndb/test/ndbapi/bank/bankValidateAllGLs >> $NDB_TOOLS_OUTPUT - START SLAVE; - --dec $1 -} - -# -# Stop transactions -# ---exec killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL - -# -# Check that the databases are the same on slave and master -# 1. dump database BANK on both master and slave -# 2. compare, there should be no difference -# ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info BANK ACCOUNT_TYPE ACCOUNT GL TRANSACTION > $MYSQLTEST_VARDIR/tmp/master_BANK.sql ---connection master -use test; -create table t1 (a int primary key) engine=ndb; -insert into t1 values (1); ---sync_slave_with_master ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info BANK ACCOUNT_TYPE ACCOUNT GL TRANSACTION > $MYSQLTEST_VARDIR/tmp/slave_BANK.sql ---connection master -drop table t1; - -diff_files $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BANK.sql; - - --dec $2 -} diff --git a/mysql-test/t/rpl_ndb_basic.test b/mysql-test/t/rpl_ndb_basic.test deleted file mode 100644 index e485b1d1bde..00000000000 --- a/mysql-test/t/rpl_ndb_basic.test +++ /dev/null @@ -1,261 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - - - -# -# Bug #11087 -# -# connect to the master and create tabe t1 in gotoslave database ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY (`nid`)) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; - ---sync_slave_with_master -# connect to slave and ensure data it there. ---connection slave -select * from t1 order by nid; - ---connection master -delete from t1; -INSERT INTO t1 VALUES(1,"XYZ2","ABC2"); -# Make sure all rows are on the master -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -# Bug #11087 would have row with nid 2 missing -select * from t1 order by nid; - ---connection master -delete from t1; -insert into t1 values(1,"AA", "AA"); -insert into t1 values(2,"BB", "BB"); -insert into t1 values(3,"CC", "CC"); -insert into t1 values(4,"DD", "DD"); - -begin; -# delete+insert = update -delete from t1 where nid = 1; -insert into t1 values (1,"A2", "A2"); - -# update+delete = delete -update t1 set nom="B2" where nid = 2; -delete from t1 where nid = 2; - -# multi-update -update t1 set nom = "D2" where nid = 4; -delete from t1 where nid = 4; -insert into t1 values (4, "D3", "D3"); -update t1 set nom = "D4" where nid = 4; - -# insert+delete = nothing -insert into t1 values (5, "EE", "EE"); -delete from t1 where nid = 5; - -commit; -select * from t1 order by 1; ---sync_slave_with_master ---connection slave -select * from t1 order by 1; ---connection master -DROP table t1; - -# -# Test replication of table with no primary key -# ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"),(2,"AAA","BBB"),(3,"CCC","DDD"); -select * from t1 order by nid; - ---sync_slave_with_master -# connect to slave and ensure data it there. ---connection slave -select * from t1 order by nid; - ---connection master -delete from t1 where nid = 2; -INSERT INTO t1 VALUES(4,"EEE","FFF"); -# Make sure all rows are on the master -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - ---connection master -UPDATE t1 set nid=nid+1; -UPDATE t1 set nom="CCP" where nid = 4; -select * from t1 order by nid; - -# make sure all rows are on the slave. ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - ---connection master -DROP table t1; - -# -# Bug #27378 update becomes delete on slave -# - ---connection master -CREATE TABLE `t1` ( - `prid` int(10) unsigned NOT NULL, - `id_type` enum('IMSI','SIP') NOT NULL, - `fkimssub` varchar(50) NOT NULL, - `user_id` varchar(20) DEFAULT NULL, - `password` varchar(20) DEFAULT NULL, - `ptg_nbr` varchar(20) DEFAULT NULL, - `old_tmsi` int(10) unsigned DEFAULT NULL, - `new_tmsi` int(10) unsigned DEFAULT NULL, - `dev_capability` int(10) unsigned DEFAULT NULL, - `dev_oid` bigint(20) unsigned DEFAULT NULL, - `lac_cell_id` bigint(20) unsigned DEFAULT NULL, - `ms_classmark1` int(10) unsigned DEFAULT NULL, - `cipher_key` int(10) unsigned DEFAULT NULL, - `priid_master` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`prid`), - UNIQUE KEY `fkimssub` (`fkimssub`,`ptg_nbr`) USING HASH -) ENGINE=ndbcluster DEFAULT CHARSET=latin1; - -INSERT INTO `t1` VALUES (183342,'IMSI','config3_sub_2Privates_3Publics_imssub_36668','user_id_73336','user_id_73336','73336',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(47617,'IMSI','config3_sub_2Privates_3Publics_imssub_9523','user_id_19046','user_id_19046','19046',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(200332,'IMSI','config3_sub_2Privates_3Publics_imssub_40066','user_id_80132','user_id_80132','80132',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(478882,'IMSI','config3_sub_2Privates_3Publics_imssub_95776','user_id_191552','user_id_191552','191552',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(490146,'IMSI','config3_sub_2Privates_3Publics_imssub_98029','user_id_196057','user_id_196057','196057',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(499301,'IMSI','config3_sub_2Privates_3Publics_imssub_99860','user_id_199719','user_id_199719','199719',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(506101,'IMSI','config3_sub_2Privates_3Publics_imssub_101220','user_id_202439','user_id_202439','202439',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(510142,'IMSI','config3_sub_2Privates_3Publics_imssub_102028','user_id_204056','user_id_204056','204056',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(515871,'IMSI','config3_sub_2Privates_3Publics_imssub_103174','user_id_206347','user_id_206347','206347',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(209842,'IMSI','config3_sub_2Privates_3Publics_imssub_41968','user_id_83936','user_id_83936','83936',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(365902,'IMSI','config3_sub_2Privates_3Publics_imssub_73180','user_id_146360','user_id_146360','146360',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(11892,'IMSI','config3_sub_2Privates_3Publics_imssub_2378','user_id_4756','user_id_4756','4756',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL); - -select count(*) from t1; - ---sync_slave_with_master ---connection slave -select count(*) from t1; - ---connection master -update t1 set dev_oid=dev_oid+1; -select count(*) from t1; - ---sync_slave_with_master ---connection slave -select count(*) from t1; - ---connection master -DROP table t1; - -################################################################## -# -# Check that retries are made on the slave on some temporary errors -# - -# -# 1. Deadlock -# ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY USING HASH (`nid`)) - ENGINE=ndbcluster DEFAULT CHARSET=latin1; -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); - -# cause a lock on that row on the slave ---sync_slave_with_master ---connection slave ---echo **** On Slave **** -BEGIN; -UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1; - -# set number of retries low so we fail the retries -set GLOBAL slave_transaction_retries=1; - -# now do a change to this row on the master -# will deadlock on the slave because of lock above ---connection master ---echo **** On Master **** -UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1; - -# wait for deadlock to be detected -# sleep longer than dead lock detection timeout in config -# we do this 2 times, once with few retries to verify that we -# get a failure with the set sleep, and once with the _same_ -# sleep, but with more retries to get it to succeed ---sleep 5 - -# replication should have stopped, since max retries where not enough -# verify with show slave status ---connection slave ---echo **** On Slave **** ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 7 8 9 16 19 20 22 23 33 ---query_vertical SHOW SLAVE STATUS; - -# now set max retries high enough to succeed, and start slave again -set GLOBAL slave_transaction_retries=10; -START SLAVE; -# wait for deadlock to be detected and retried -# should be the same sleep as above for test to be valid ---sleep 5 - -# commit transaction to release lock on row and let replication succeed -select * from t1 order by nid; -COMMIT; - -# verify that the row succeded to be applied on the slave ---connection master ---sync_slave_with_master ---connection slave -select * from t1 order by nid; - -# cleanup ---connection master -DROP TABLE t1; - - -# -# BUG#18094 -# Slave caches invalid table definition after atlters causes select failure -# ---connection master -CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB; - -INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); - -ALTER TABLE t1 ADD c2 INT; - ---sync_slave_with_master -connection slave; -SELECT * FROM t1 ORDER BY c1; - -connection master; -ALTER TABLE t1 CHANGE c2 c2 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c2 c2 BLOB; - ---sync_slave_with_master -connection slave; -# here we would get error 1412 prior to bug -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---connection master -TRUNCATE t1; -SELECT count(*) FROM t1; -INSERT INTO t1 VALUES (101,NULL),(102,NULL),(103,NULL),(104,NULL),(105,NULL),(106,NULL),(107,NULL),(108,NULL),(109,NULL),(1010,NULL); ---sync_slave_with_master -connection slave; -SELECT count(*) FROM t1; -SELECT c1 FROM t1 ORDER BY c1 LIMIT 5; - -# cleanup ---connection master -DROP TABLE t1; --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_ndb_blob.test b/mysql-test/t/rpl_ndb_blob.test deleted file mode 100644 index 94af986b222..00000000000 --- a/mysql-test/t/rpl_ndb_blob.test +++ /dev/null @@ -1,142 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# -# basic test of blob replication for NDB -# - -# easy test - ---connection master -create table t1 ( - a int not null primary key, - b text not null -) engine=ndb; - -insert into t1 values(1, repeat('abc',10)); -insert into t1 values(2, repeat('def',200)); -insert into t1 values(3, repeat('ghi',3000)); - -select 'M', a, sha1(b) from t1 -order by a; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', a, sha1(b) from t1 -order by a; - ---connection master -drop table t1; ---sync_slave_with_master - -# hard test - ---connection master -create table t1 ( - a int not null primary key, - b text not null, - c int, - d longblob, - e tinyblob -) engine=ndbcluster; - ---disable_query_log -# length 61 -set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau'; -set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz'; -set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah'; ---enable_query_log - -insert into t1 values ( - 0, repeat(@s2,454), 100, repeat(@s2,345), NULL); -insert into t1 values ( - 1, repeat(@s0,504), NULL, repeat(@s1,732), repeat(@s1,1)); -insert into t1 values ( - 2, '', 102, '', repeat(@s2,1)); -insert into t1 values ( - 3, repeat(@s0,545), 103, repeat(@s2,788), repeat(@s0,1)); -insert into t1 values ( - 4, repeat(@s1,38), 104, repeat(@s0,260), repeat(@s0,1)); -insert into t1 values ( - 5, repeat(@s2,12), 105, repeat(@s2,40), repeat(@s1,1)); -insert into t1 values ( - 6, repeat(@s1,242), 106, NULL, repeat(@s1,1)); -insert into t1 values ( - 7, repeat(@s1,30), 107, repeat(@s0,161), ''); -insert into t1 values ( - 8, repeat(@s1,719), 108, repeat(@s2,104), NULL); -insert into t1 values ( - 9, repeat(@s2,427), NULL, NULL, NULL); - -select 'M', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', a, sha1(b), c, sha1(d), sha1(e) -from t1 order by a; - ---connection master -drop table t1; ---sync_slave_with_master - -# table with varsize key (future cluster/schema) - -# sql/ha_ndbcluster_binlog.cc ---connection master -CREATE TABLE IF NOT EXISTS t1 ( - db VARBINARY(63) NOT NULL, - name VARBINARY(63) NOT NULL, - slock BINARY(32) NOT NULL, - query BLOB NOT NULL, - node_id INT UNSIGNED NOT NULL, - epoch BIGINT UNSIGNED NOT NULL, - id INT UNSIGNED NOT NULL, - version INT UNSIGNED NOT NULL, - type INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (db,name)) -ENGINE=NDB; - -insert into t1 values ('test','t1', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('test','t2', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('test','t3', - 'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('testtttttttttt','t1', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('testttttttttttt','t1', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('testtttttttttttt','t1', - 'ghi',repeat(@s2,1000),31,32,33,34,35); -insert into t1 values ('t','t11111111111', - 'abc',repeat(@s0,10), 11,12,13,14,15); -insert into t1 values ('t','t111111111111', - 'def',repeat(@s1,100), 21,22,23,24,25); -insert into t1 values ('t','t1111111111111', - 'ghi',repeat(@s2,1000),31,32,33,34,35); - -select 'M', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; - ---sync_slave_with_master ---sleep 5 ---connection slave -select 'S', db, name, sha1(query), node_id, epoch, id, version, type -from t1 order by db, name; - ---connection master -drop table t1; ---sync_slave_with_master - -# -# view the binlog - not deterministic (mats) -# - -#--connection master -#let $VERSION=`select version()`; -#--replace_result $VERSION VERSION -#show binlog events; diff --git a/mysql-test/t/rpl_ndb_blob2.test b/mysql-test/t/rpl_ndb_blob2.test deleted file mode 100644 index 2e8f02eaf75..00000000000 --- a/mysql-test/t/rpl_ndb_blob2.test +++ /dev/null @@ -1,9 +0,0 @@ -################################# -# Wrapper for rpl_row_blob.test # -# Using wrapper to share test # -# code between engine tests # -################################# --- source include/have_ndb.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_blob.test - diff --git a/mysql-test/t/rpl_ndb_charset.test b/mysql-test/t/rpl_ndb_charset.test deleted file mode 100644 index eb412a0349a..00000000000 --- a/mysql-test/t/rpl_ndb_charset.test +++ /dev/null @@ -1,6 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -######################################################## ---source include/have_ndb.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_row_charset.test diff --git a/mysql-test/t/rpl_ndb_circular.test b/mysql-test/t/rpl_ndb_circular.test deleted file mode 100644 index 88b5808160b..00000000000 --- a/mysql-test/t/rpl_ndb_circular.test +++ /dev/null @@ -1,57 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# set up circular replication - ---connection slave -RESET MASTER; ---connection master ---replace_result $SLAVE_MYPORT SLAVE_PORT ---eval CHANGE MASTER TO master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root" -START SLAVE; - -# create the table on the "slave" ---connection slave -CREATE TABLE t1 (a int key, b int) ENGINE=ndb; -#CREATE TABLE t2 (a int key, b int) ENGINE=ndb; ---save_master_pos ---connection master ---sync_with_master -# now we should have a table on the master as well -SHOW TABLES; - -# insert some values on the slave and master ---connection master -INSERT INTO t1 VALUES (1,2); ---connection slave -INSERT INTO t1 VALUES (2,3); - -# ensure data has propagated both ways ---connection slave ---save_master_pos ---connection master ---sync_with_master ---sync_slave_with_master - -# connect to slave and ensure data it there. ---connection slave -SELECT * FROM t1 ORDER BY a; -#SELECT * FROM t2 ORDER BY a; ---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # ---query_vertical show slave status; -# connect to master and ensure data it there. ---connection master -SELECT * FROM t1 ORDER BY a; -#SELECT * FROM t2 ORDER BY a; ---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # ---query_vertical show slave status; - -# stop replication on "master" as not to replicate -# shutdown circularly, eg drop table ---connection master -STOP SLAVE; - -# cleanup ---connection master -DROP TABLE t1; diff --git a/mysql-test/t/rpl_ndb_circular_simplex.test b/mysql-test/t/rpl_ndb_circular_simplex.test deleted file mode 100644 index 2ea60beaba2..00000000000 --- a/mysql-test/t/rpl_ndb_circular_simplex.test +++ /dev/null @@ -1,82 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -connection master; -CREATE TABLE t1 (a int key, b int) ENGINE=NDB; -sync_slave_with_master; -SHOW TABLES; - -# Lose the events from the slave binary log: there is no -# need to re-create the table on the master. -connection slave; -RESET MASTER; - -# Insert some values on the slave and master -connection master; -INSERT INTO t1 VALUES (1,2); -# Switch to slave once event is applied and insert a row -sync_slave_with_master; -connection slave; -INSERT INTO t1 VALUES (2,3); - -# ... it is now very probable that we have a mixed event in the binary -# log. If we don't, the test should still pass, but will not test the -# mixed event situation. - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# Replicate back to the master to test this mixed event on the master -STOP SLAVE; - -connection master; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=$SLAVE_MYPORT,MASTER_USER="root"; - -RESET MASTER; -START SLAVE; - -connection slave; -save_master_pos; -connection master; -sync_with_master; - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# Check that there is no error in replication ---replace_result $SLAVE_MYPORT SLAVE_PORT ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # -query_vertical SHOW SLAVE STATUS; - -# Check that we have the data on the master -SELECT * FROM t1 ORDER BY a; - -# We should now have another mixed event, likely with "slave" server -# id last, and with the STMT_END_F flag set. - -# The statement is disabled since it cannot reliably show the same -# info all the time. Use it for debug purposes. - -#SHOW BINLOG EVENTS; - -# now lets see that this data is applied correctly on the slave -STOP SLAVE; -save_master_pos; - -connection slave; -START SLAVE; - -# check that we have the data on the slave -sync_with_master; -SELECT * FROM t1 ORDER BY a; - -# Check that there is no error in replication ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # -query_vertical SHOW SLAVE STATUS; diff --git a/mysql-test/t/rpl_ndb_commit_afterflush.test b/mysql-test/t/rpl_ndb_commit_afterflush.test deleted file mode 100644 index ce2a4d9506c..00000000000 --- a/mysql-test/t/rpl_ndb_commit_afterflush.test +++ /dev/null @@ -1,9 +0,0 @@ -##################################### -# Wrapper for rpl_commit_after_flush# -# Wrapped to reuse test code on # -# Different engines # -# By JBM 2004-02-15 # -##################################### --- source include/have_ndb.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_commit_after_flush.test diff --git a/mysql-test/t/rpl_ndb_dd_advance.test b/mysql-test/t/rpl_ndb_dd_advance.test deleted file mode 100644 index 0a1ab37cdad..00000000000 --- a/mysql-test/t/rpl_ndb_dd_advance.test +++ /dev/null @@ -1,581 +0,0 @@ -############################################### -# Author: JBM # -# Date: 2006-03-07 # -# Purpose: To test advance DD and replication # -############################################### - -#### Include Section #### ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/ndb_default_cluster.inc ---source include/not_embedded.inc ---source include/big_test.inc -#--source include/have_ndb_extra.inc ---source include/master-slave.inc - -#### Test start cleanup section ##### ---disable_warnings -DROP TABLE IF EXISTS t1, t2, t3; ---enable_warnings - -###################################################### -# Requirment: Cluster DD and replication must be able# -# to handle ALTER tables and indexes and must rpl # -# to the slave correctly # -###################################################### - -## Test #1 replication of CDD and Alter Tables ##### ---echo ***** Test 1 RPL of CDD and Alter ***** ---echo ***** Test 1 setup ***** - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE 4M -ENGINE=NDB; - -CREATE TABLE t1 - (c1 INT NOT NULL PRIMARY KEY, - c2 INT NOT NULL, - c3 INT NOT NULL) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB; - ---echo ***** insert some data ***** - -let $j= 900; ---disable_query_log -while ($j) -{ - eval INSERT INTO t1 VALUES($j,$j*2,$j+3); - dec $j; -} ---enable_query_log - ---echo ***** Select from Master ***** - -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---echo ***** Select from Slave ***** ---sync_slave_with_master -connection slave; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - -################################### -# Just to some File Schema check # -################################### - ---disable_query_log -SELECT DISTINCT FILE_NAME, FILE_TYPE, TABLESPACE_NAME, LOGFILE_GROUP_NAME - FROM INFORMATION_SCHEMA.FILES - WHERE ENGINE="ndbcluster" ORDER BY FILE_NAME; ---enable_query_log - ---echo **** Do First Set of ALTERs in the master table **** -################################################### -# On this first set of alters I expect: -# 1. To be able to create and index on 2 columns -# 2. To be able to create a unique index -# 3. To be able to add two columns and have -# it all replicated correctly to the slave cluster. -################################################### -connection master; -CREATE INDEX t1_i ON t1(c2, c3); -#Bug 18039 -#CREATE UNIQUE INDEX t1_i2 ON t1(c2); -ALTER TABLE t1 ADD c4 TIMESTAMP; -ALTER TABLE t1 ADD c5 DOUBLE; -ALTER TABLE t1 ADD INDEX (c5); -SHOW CREATE TABLE t1; - ---echo **** Show first set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; - ---echo **** Second set of alters test 1 **** -############################################ -# With this next set of alters we have had -# Some issues with renames of tables. So this -# test renames our main table, drop and index off -# of it, creates another table with then name -# of the orginal table, inserts a row, drops -# the table and renames the orginal table back. -# I want to make sure that 1) the cluster does -# okay with this and 2) that it is replicated -# correctly. -############################################# -connection master; -ALTER TABLE t1 RENAME t2; -ALTER TABLE t2 DROP INDEX c5; -CREATE TABLE t1(c1 INT)ENGINE=NDB; -INSERT INTO t1 VALUES(1); -DROP TABLE t1; -ALTER TABLE t2 RENAME t1; - ---echo **** Show second set of ALTERs on MASTER **** - -SHOW CREATE TABLE t1; - ---echo **** Show second set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; - ---echo **** Third and last set of alters for test1 **** -######################################################### -# In this last set of alters, we are messing with the -# cluster ability to rebuild indexes, drop a column that make up -# an index with another column and change types several times in -# a row. I have choosen the BLOB as it seems to have had many -# issues in this release. I want to make sure that the cluster -# deals with these radical changes and that the replication to -# the slave cluster is dones correctly. -########################################################### -connection master; -ALTER TABLE t1 CHANGE c1 c1 DOUBLE; -ALTER TABLE t1 CHANGE c2 c2 DECIMAL(10,2); -ALTER TABLE t1 DROP COLUMN c3; -ALTER TABLE t1 CHANGE c4 c4 TEXT CHARACTER SET utf8; -ALTER TABLE t1 CHANGE c4 c4 BLOB; -ALTER TABLE t1 CHANGE c4 c3 BLOB; -set @b1 = 'b1'; -set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1); -UPDATE t1 SET c3=@b1 where c1 = 1; -UPDATE t1 SET c3=@b1 where c1 = 2; - ---echo **** Show last set of ALTERs on MASTER **** - -SHOW CREATE TABLE t1; -SELECT * FROM t1 ORDER BY c1 LIMIT 5; - ---echo **** Show last set of ALTERs on SLAVE **** ---sync_slave_with_master -connection slave; -SHOW CREATE TABLE t1; -# Bug 18094 -#SELECT * FROM t1 ORDER BY c1 LIMIT 5; -SELECT * FROM t1 where c1 = 1; - -connection master; -DROP TABLE t1; ---sync_slave_with_master -connection slave; -STOP SLAVE; -RESET SLAVE; -connection master; -RESET MASTER; -connection slave; -START SLAVE; - -################### TEST 2 TPCB for disk data ########################### -# Requirement: To have Stored Procedures and Functions that are used to # -# populate and post transactions to the data base using CDD that span # -# 2 tables spaces and also use a memory only cluster tables. In addition# -# The slave is to be stopped, cleaned and restored and synced with the # -# Master cluster # -######################################################################### - ---echo ******** Create additional TABLESPACE test 2 ************** - -connection master; -CREATE TABLESPACE ts2 -ADD DATAFILE 'datafile03.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE=NDB; - -ALTER TABLESPACE ts2 -ADD DATAFILE 'datafile04.dat' -INITIAL_SIZE 12M -ENGINE=NDB; - -###### CLEAN UP SECTION ############## -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; -######## Creat Table Section ######### ---echo *********** Create TPCB Tables ***************** -CREATE TABLE tpcb.account - (id INT, bid INT, balance DECIMAL(10,2), - filler CHAR(255), PRIMARY KEY(id)) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB; - -CREATE TABLE tpcb.branch - (bid INT, balance DECIMAL(10,2), filler VARCHAR(255), - PRIMARY KEY(bid)) - ENGINE=NDB; - -CREATE TABLE tpcb.teller - (tid INT, balance DECIMAL(10,2), filler VARCHAR(255), - PRIMARY KEY(tid)) - TABLESPACE ts2 STORAGE DISK - ENGINE=NDB; - -CREATE TABLE tpcb.history - (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, - tid INT, bid INT, amount DECIMAL(10,2), - tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, - filler CHAR(80),PRIMARY KEY (id)) - TABLESPACE ts2 STORAGE DISK - ENGINE=NDB; - ---echo ********* Create Procedures and Functions ************ -delimiter |; -CREATE PROCEDURE tpcb.load() -BEGIN - DECLARE acct INT DEFAULT 1000; - DECLARE brch INT DEFAULT 100; - DECLARE tell INT DEFAULT 1000; - DECLARE tmp INT DEFAULT 100; - WHILE brch > 0 DO - SET tmp = 100; - WHILE tmp > 0 DO - INSERT INTO tpcb.account VALUES (acct, brch, 0.0, "FRESH ACCOUNT"); - SET acct = acct - 1; - SET tmp = tmp -1; - END WHILE; - INSERT INTO tpcb.branch VALUES (brch, 0.0, "FRESH BRANCH"); - SET brch = brch - 1; - END WHILE; - WHILE tell > 0 DO - INSERT INTO tpcb.teller VALUES (tell, 0.0, "FRESH TELLER"); - SET tell = tell - 1; - END WHILE; -END| - -CREATE FUNCTION tpcb.account_id () RETURNS INT -BEGIN - DECLARE num INT; - DECLARE ran INT; - SELECT RAND() * 10 INTO ran; - IF (ran < 2) - THEN - SELECT RAND() * 10 INTO num; - ELSEIF (ran < 4) - THEN - SELECT RAND() * 100 INTO num; - ELSE - SELECT RAND() * 1000 INTO num; - END IF; - IF (num < 1) - THEN - RETURN 1; - END IF; - RETURN num; -END| - -CREATE FUNCTION tpcb.teller_id () RETURNS INT -BEGIN - DECLARE num INT; - DECLARE ran INT; - SELECT RAND() * 10 INTO ran; - IF (ran < 2) - THEN - SELECT RAND() * 10 INTO num; - ELSEIF (ran < 5) - THEN - SELECT RAND() * 100 INTO num; - ELSE - SELECT RAND() * 1000 INTO num; - END IF; - IF (num < 1) - THEN - RETURN 1; - END IF; - RETURN num; -END| - -CREATE PROCEDURE tpcb.trans() -BEGIN - DECLARE acct INT DEFAULT 0; - DECLARE brch INT DEFAULT 0; - DECLARE tell INT DEFAULT 0; - DECLARE bal DECIMAL(10,2) DEFAULT 0.0; - DECLARE amount DECIMAL(10,2) DEFAULT 1.00; - DECLARE test INT DEFAULT 0; - DECLARE bbal DECIMAL(10,2) DEFAULT 0.0; - DECLARE tbal DECIMAL(10,2) DEFAULT 0.0; - DECLARE local_uuid VARCHAR(255); - DECLARE local_user VARCHAR(255); - DECLARE local_time TIMESTAMP; - - SELECT RAND() * 10 INTO test; - SELECT tpcb.account_id() INTO acct; - SELECT tpcb.teller_id() INTO tell; - - SELECT account.balance INTO bal FROM tpcb.account WHERE id = acct; - SELECT account.bid INTO brch FROM tpcb.account WHERE id = acct; - SELECT teller.balance INTO tbal FROM tpcb.teller WHERE tid = tell; - SELECT branch.balance INTO bbal FROM tpcb.branch WHERE bid = brch; - - IF (test < 5) - THEN - SET bal = bal + amount; - SET bbal = bbal + amount; - SET tbal = tbal + amount; - UPDATE tpcb.account SET balance = bal, filler = 'account updated' - WHERE id = acct; - UPDATE tpcb.branch SET balance = bbal, filler = 'branch updated' - WHERE bid = brch; - UPDATE tpcb.teller SET balance = tbal, filler = 'teller updated' - WHERE tid = tell; - ELSE - SET bal = bal - amount; - SET bbal = bbal - amount; - SET tbal = tbal - amount; - UPDATE tpcb.account SET balance = bal, filler = 'account updated' - WHERE id = acct; - UPDATE tpcb.branch SET balance = bbal, filler = 'branch updated' - WHERE bid = brch; - UPDATE tpcb.teller SET balance = tbal, filler = 'teller updated' - WHERE tid = tell; - END IF; - - SET local_uuid=UUID(); - SET local_user=USER(); - SET local_time= NOW(); - INSERT INTO tpcb.history VALUES(NULL,acct,tell,brch,amount, local_time,local_user, - local_uuid,'completed trans'); -END| -delimiter ;| - ---echo ****** TEST 2 test time ********************************* -USE tpcb; - ---echo *********** Load up the database ****************** -CALL tpcb.load(); - ---echo ********** Check load master and slave ************** -SELECT COUNT(*) FROM account; ---sync_slave_with_master -connection slave; -USE tpcb; -SELECT COUNT(*) FROM account; - ---echo ******** Run in some transactions *************** - -connection master; -let $j= 1000; ---disable_query_log -while ($j) -{ - CALL tpcb.trans(); - dec $j; -} ---enable_query_log - ---echo ***** Time to try slave sync *********** ---echo **** Must make sure slave is clean ***** ---connection slave -STOP SLAVE; -RESET SLAVE; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE IF EXISTS tpcb.account; -DROP TABLE IF EXISTS tpcb.teller; -DROP TABLE IF EXISTS tpcb.branch; -DROP TABLE IF EXISTS tpcb.history; -DROP DATABASE tpcb; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; - -DROP TABLESPACE ts2 ENGINE=NDB; - -DROP LOGFILE GROUP lg1 ENGINE=NDB; - ---echo ********** Take a backup of the Master ************* -connection master; - -SELECT COUNT(*) FROM history; - -let $j= 1000; ---disable_query_log -while ($j) -{ - CALL tpcb.trans(); - dec $j; -} ---enable_query_log - -SELECT COUNT(*) FROM history; - -#RESET MASTER; ---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT - ---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat - -CREATE TEMPORARY TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP; - -DELETE FROM mysql.backup_info; - -LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ','; ---exec rm $MYSQLTEST_VARDIR/tmp.dat || true ---replace_column 1 - -SELECT @the_backup_id:=backup_id FROM mysql.backup_info; - -let the_backup_id=`select @the_backup_id`; - -DROP TABLE IF EXISTS mysql.backup_info; -#RESET MASTER; - ---echo ************ Restore the slave ************************ -connection slave; -CREATE DATABASE tpcb; ---source include/ndb_restore_slave_eoption.inc - ---echo ***** Check a few slave restore values *************** -connection slave; -USE tpcb; -SELECT COUNT(*) FROM account; - ---echo ***** Add some more records to master ********* -connection master; -let $j= 1000; ---disable_query_log -while ($j) -{ - CALL tpcb.trans(); - dec $j; -} ---enable_query_log - -# -# now setup replication to continue from last epoch -# 1. get apply_status epoch from slave -# 2. get corresponding _next_ binlog postition from master -# 3. change master on slave -# 4. add some transaction for slave to process -# 5. start the replication - ---echo ***** Finsh the slave sync process ******* ---disable_query_log -# 1. 2. 3. ---source include/ndb_setup_slave.inc ---enable_query_log - -# 4. ---echo * 4. * -connection master; -let $j= 1000; ---disable_query_log -while ($j) -{ - CALL tpcb.trans(); - dec $j; -} ---enable_query_log - -# 5. ---echo * 5. * -connection slave; -START SLAVE; - ---echo **** We should be ready to continue on ************* - -connection master; -let $j= 50; ---disable_query_log -while ($j) -{ - CALL tpcb.trans(); - dec $j; -} ---enable_query_log - ---echo ****** Let's make sure we match ******* ---echo ***** MASTER ******* -USE tpcb; -SELECT COUNT(*) FROM history; - ---echo ****** SLAVE ******** ---sync_slave_with_master -connection slave; -USE tpcb; -SELECT COUNT(*) FROM history; - ---echo *** DUMP MASTER & SLAVE FOR COMPARE ******** - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql - ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql - ---echo *************** TEST 2 CLEANUP SECTION ******************** -connection master; -DROP PROCEDURE IF EXISTS tpcb.load; -DROP PROCEDURE IF EXISTS tpcb.trans; -DROP TABLE tpcb.account; -DROP TABLE tpcb.teller; -DROP TABLE tpcb.branch; -DROP TABLE tpcb.history; -DROP DATABASE tpcb; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts1 -DROP DATAFILE 'datafile02.dat' -ENGINE=NDB; - -DROP TABLESPACE ts1 ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile03.dat' -ENGINE=NDB; - -ALTER TABLESPACE ts2 -DROP DATAFILE 'datafile04.dat' -ENGINE=NDB; - -DROP TABLESPACE ts2 ENGINE=NDB; - -DROP LOGFILE GROUP lg1 ENGINE=NDB; - ---sync_slave_with_master - -connection master; - ---echo ****** Do dumps compare ************ - -diff_files $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql; - -## Note: Ths files should only get removed, if the above diff succeeds. - ---exec rm $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql ---exec rm $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql - -# End 5.1 test case diff --git a/mysql-test/t/rpl_ndb_dd_basic.test b/mysql-test/t/rpl_ndb_dd_basic.test deleted file mode 100644 index 7387d39db87..00000000000 --- a/mysql-test/t/rpl_ndb_dd_basic.test +++ /dev/null @@ -1,85 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -# -# Basic test of disk tables for NDB -# - -# -# Start by creating a logfile group -# - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -alter logfile group lg1 -add undofile 'undofile02.dat' -initial_size 4M engine=ndb; - -# -# Create a tablespace connected to the logfile group -# - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -alter tablespace ts1 -add datafile 'datafile02.dat' -initial_size 4M engine=ndb; - -# -# Create a table using this tablespace -# - -CREATE TABLE t1 -(pk1 int not null primary key, b int not null, c int not null) -tablespace ts1 storage disk -engine ndb; - -# -# insert some data -# - -insert into t1 values (1,2,3); -select * from t1 order by pk1; - -# -# check that the data is also on the slave -# - ---sync_slave_with_master ---connection slave -select * from t1 order by pk1; - -# -# view the binlog -# - ---connection master --- source include/show_binlog_events2.inc - -# -# cleanup -# - -drop table t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_ndb_dd_partitions.test b/mysql-test/t/rpl_ndb_dd_partitions.test deleted file mode 100644 index 9291f38e8db..00000000000 --- a/mysql-test/t/rpl_ndb_dd_partitions.test +++ /dev/null @@ -1,310 +0,0 @@ -####################################### -# Author: JBM # -# Date: 2006-03-09 # -# Purpose: To test the replication of # -# Cluster Disk Data using partitions # -####################################### - ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---echo --- Doing pre test cleanup --- - -connection master; ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_query_log - - -# Start by creating a logfile group -################################## - -CREATE LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile.dat' -INITIAL_SIZE 16M -UNDO_BUFFER_SIZE = 1M -ENGINE=NDB; - -ALTER LOGFILE GROUP lg1 -ADD UNDOFILE 'undofile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################### -# Create a tablespace connected to the logfile group -################################################### - -CREATE TABLESPACE ts1 -ADD DATAFILE 'datafile.dat' -USE LOGFILE GROUP lg1 -INITIAL_SIZE 12M -ENGINE NDB; - -ALTER TABLESPACE ts1 -ADD DATAFILE 'datafile02.dat' -INITIAL_SIZE = 4M -ENGINE=NDB; - -################################################################# - ---echo --- Start test 2 partition RANGE testing -- ---echo --- Do setup -- - - -################################################# -# Requirment: Create table that is partitioned # -# by range on year i.e. year(t) and replicate # -# basice operations such at insert, update # -# delete between 2 different storage engines # -# Alter table and ensure table is handled # -# Correctly on the slave # -################################################# - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY RANGE (YEAR(t)) - (PARTITION p0 VALUES LESS THAN (1901), - PARTITION p1 VALUES LESS THAN (1946), - PARTITION p2 VALUES LESS THAN (1966), - PARTITION p3 VALUES LESS THAN (1986), - PARTITION p4 VALUES LESS THAN (2005), - PARTITION p5 VALUES LESS THAN MAXVALUE); - ---echo --- Show table on master --- - -SHOW CREATE TABLE t1; - ---echo --- Show table on slave -- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---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; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- ---enable_query_log - ---source include/rpl_multi_engine3.inc - ---echo --- End test 2 partition RANGE testing --- ---echo --- Do Cleanup --- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 3 partition LIST testing --- ---echo --- Do setup --- -################################################# - - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142)); - ---echo --- Test 3 Alter to add partition --- - -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); - ---echo --- Show table on master --- - -SHOW CREATE TABLE t1; - ---echo --- Show table on slave --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---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; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 3 partition LIST testing --- ---echo --- Do Cleanup -- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 4 partition HASH testing --- ---echo --- Do setup --- -################################################# - - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY HASH( YEAR(t) ) - PARTITIONS 4; - ---echo --- show that tables have been created correctly --- - -SHOW CREATE TABLE t1; -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---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; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 4 partition HASH testing --- ---echo --- Do Cleanup -- - -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo --- Start test 5 partition by key testing --- ---echo --- Create Table Section --- - -################################################# - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(63), - bc CHAR(63), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE,PRIMARY KEY(id)) - TABLESPACE ts1 STORAGE DISK - ENGINE=NDB - PARTITION BY KEY() - PARTITIONS 4; - ---echo --- Show that tables on master are ndbcluster tables --- - -SHOW CREATE TABLE t1; - ---echo --- Show that tables on slave --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.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, ADD PRIMARY KEY(id, total); - ---echo --- Show the new improved table on the master --- - -SHOW CREATE TABLE t1; - ---echo --- Make sure that our tables on slave are still right type --- ---echo --- and that the alter statements replicated correctly --- - -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- Check that simple Alter statements are replicated correctly --- - -ALTER TABLE t1 MODIFY vc VARCHAR(255); - ---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; - ---echo --- Perform basic operation on master --- ---echo --- and ensure replicated correctly --- - ---source include/rpl_multi_engine3.inc - ---echo --- End test 5 key partition testing --- ---echo --- Do Cleanup --- - -DROP TABLE IF EXISTS t1; -alter tablespace ts1 -drop datafile 'datafile.dat' -engine=ndb; -alter tablespace ts1 -drop datafile 'datafile02.dat' -engine=ndb; -DROP TABLESPACE ts1 ENGINE=NDB; -DROP LOGFILE GROUP lg1 ENGINE=NDB; ---sync_slave_with_master - -# End of 5.1 test case diff --git a/mysql-test/t/rpl_ndb_ddl.test b/mysql-test/t/rpl_ndb_ddl.test deleted file mode 100644 index 66db755de15..00000000000 --- a/mysql-test/t/rpl_ndb_ddl.test +++ /dev/null @@ -1,33 +0,0 @@ -#################### rpl_ndb_ddl.test ######################## -# # -# DDL statements (sometimes with implicit COMMIT) executed # -# by the master and it's propagation into the slave # -# # -############################################################## - -# -# NOTE, PLEASE BE CAREFUL, WHEN MODIFYING THE TESTS !! -# -# 1. !All! objects to be dropped, renamed, altered ... must be created -# in AUTOCOMMIT= 1 mode before AUTOCOMMIT is set to 0 and the test -# sequences start. -# -# 2. Never use a test object, which was direct or indirect affected by a -# preceeding test sequence again. -# Except table d1.t1 where ONLY DML is allowed. -# -# If one preceeding test sequence hits a (sometimes not good visible, -# because the sql error code of the statement might be 0) bug -# and these rules are ignored, a following test sequence might earn ugly -# effects like failing 'sync_slave_with_master', crashes of the slave or -# abort of the test case etc.. -# - ---source include/master-slave.inc ---source include/have_binlog_format_row.inc ---source include/have_ndb.inc -let $engine_type= NDB; -let $temp_engine_type= MEMORY; -let $show_binlog = 0; -let $manipulate = 0; --- source extra/rpl_tests/rpl_ddl.test diff --git a/mysql-test/t/rpl_ndb_delete_nowhere.test b/mysql-test/t/rpl_ndb_delete_nowhere.test deleted file mode 100644 index 92ceddf7f5c..00000000000 --- a/mysql-test/t/rpl_ndb_delete_nowhere.test +++ /dev/null @@ -1,8 +0,0 @@ -######################################### -# By JBM 2006-02-14 Test wrapping to # -# Share test code between engine tests # -######################################### ---source include/have_ndb.inc --- source include/have_binlog_format_row.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_delete_no_where.test diff --git a/mysql-test/t/rpl_ndb_do_db-slave.opt b/mysql-test/t/rpl_ndb_do_db-slave.opt deleted file mode 100644 index fb5e378b65f..00000000000 --- a/mysql-test/t/rpl_ndb_do_db-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-db=replica diff --git a/mysql-test/t/rpl_ndb_do_db.test b/mysql-test/t/rpl_ndb_do_db.test deleted file mode 100644 index 9b65d43f244..00000000000 --- a/mysql-test/t/rpl_ndb_do_db.test +++ /dev/null @@ -1,57 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 14-12-2006 -# Purpose: To test --replicate-do-database=db_name -# using cluster. Only replica should replicate. -########################################################## - ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---disable_warnings -DROP DATABASE IF EXISTS replica; ---enable_warnings - -# Create database and tables for the test. -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -# Insert data into db that should not be picked up by slave -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Insert data into db that should be replicated -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Check results on slave ---sync_slave_with_master -SHOW TABLES; -USE replica; -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -USE test; -SHOW TABLES; - -# Cleanup from testing -connection master; -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; ---sync_slave_with_master - -# End 5.1 test case diff --git a/mysql-test/t/rpl_ndb_do_table-slave.opt b/mysql-test/t/rpl_ndb_do_table-slave.opt deleted file mode 100644 index da345474216..00000000000 --- a/mysql-test/t/rpl_ndb_do_table-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-table=test.t1 diff --git a/mysql-test/t/rpl_ndb_do_table.test b/mysql-test/t/rpl_ndb_do_table.test deleted file mode 100644 index 55a40d85172..00000000000 --- a/mysql-test/t/rpl_ndb_do_table.test +++ /dev/null @@ -1,46 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 14-12-2006 -# Purpose: To test --replicate-do-table=db_name.tbl_name -# using cluster. Only t1 should replicate. -########################################################## - ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1, t2; ---enable_warnings - -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t1 VALUES(2, repeat('def',200)); -INSERT INTO t1 VALUES(3, repeat('ghi',3000)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(2, repeat('def',200)); -INSERT INTO t2 VALUES(3, repeat('ghi',3000)); - ---sync_slave_with_master -SHOW TABLES; -SELECT COUNT(*) FROM t1; - -# -# Bug #27044 replicated with unique field ndb table allows dup key inserts -# -connection master; - ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (3, repeat('bad',1)); - -connection slave; ---error ER_DUP_ENTRY -INSERT INTO t1 VALUES (3, repeat('bad too',1)); - -# cleanup - -connection master; -DROP TABLE IF EXISTS t1, t2; ---sync_slave_with_master diff --git a/mysql-test/t/rpl_ndb_extraCol.test b/mysql-test/t/rpl_ndb_extraCol.test deleted file mode 100644 index cf0501c490a..00000000000 --- a/mysql-test/t/rpl_ndb_extraCol.test +++ /dev/null @@ -1,13 +0,0 @@ -########################################### -# Author: Jeb -# Date: 2006-09-08 -# Purpose: Wapper for rpl_extraSlave_Col.test -# Using NDB -########################################### --- source include/have_binlog_format_row.inc ---source include/have_ndb.inc --- source include/master-slave.inc -let $engine_type = 'NDB'; --- source extra/rpl_tests/rpl_extraSlave_Col.test - - diff --git a/mysql-test/t/rpl_ndb_func003.test b/mysql-test/t/rpl_ndb_func003.test deleted file mode 100644 index a19de7d3d6b..00000000000 --- a/mysql-test/t/rpl_ndb_func003.test +++ /dev/null @@ -1,12 +0,0 @@ -################################### -# Wrapper for rpl_row_func003.test# -# This test was orginally designed# -# To test InnoDB using RBR, but # -# It can also be used to test NDB # -# So this wrapper is being used to# -# reduce test case code # -################################### --- source include/have_ndb.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_row_func003.test --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_ndb_idempotent.test b/mysql-test/t/rpl_ndb_idempotent.test deleted file mode 100644 index f2bfe745523..00000000000 --- a/mysql-test/t/rpl_ndb_idempotent.test +++ /dev/null @@ -1,117 +0,0 @@ ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# create a table with one row -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; - -# sync slave and retrieve epoch -sync_slave_with_master; ---replace_column 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -let $the_epoch= `select @the_epoch` ; -SELECT * FROM t1 ORDER BY c3; - -# get the master binlog pos from the epoch -connection master; ---replace_result $the_epoch ---replace_column 1 -eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) - FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ; -let $the_pos= `SELECT @the_pos` ; -let $the_file= `SELECT @the_file` ; - -# insert some more values -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; - -SELECT * FROM t1 ORDER BY c3; - -# check that we have it on the slave ---sync_slave_with_master ---connection slave -SELECT * FROM t1 ORDER BY c3; - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 7 8 9 16 22 23 33 -SHOW SLAVE STATUS; - -# stop slave and reset position to before the last changes -STOP SLAVE; ---replace_result $the_pos -eval CHANGE MASTER TO - master_log_file = '$the_file', - master_log_pos = $the_pos ; - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 7 8 9 16 22 23 33 -SHOW SLAVE STATUS; - -# start the slave again -# -> same events should have been applied again -# e.g. inserting rows that already there -# deleting a row which is not there -# updating a row which is not there -START SLAVE; - ---connection master -SELECT * FROM t1 ORDER BY c3; ---sync_slave_with_master ---connection slave -SELECT * FROM t1 ORDER BY c3; - -STOP SLAVE; - -# -# cleanup -# ---connection master -DROP TABLE t1; -RESET master; ---connection slave -DROP TABLE t1; -RESET slave; - -START SLAVE; - -# -# Test that we can handle update of a row that does not exist on the slave -# will trigger usage of AO_IgnoreError on slave side so that the INSERT -# still succeeds even if the replication of the UPDATE generates an error. -# ---connection master -CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES ("row1","remove on slave",1); - ---sync_slave_with_master ---connection slave -DELETE FROM t1; - ---connection master -BEGIN; -UPDATE t1 SET c2="does not exist" WHERE c3=1; -INSERT INTO t1 VALUES ("row2","new on slave",2); -COMMIT; - ---sync_slave_with_master ---connection slave -SELECT * FROM t1; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 7 8 9 16 22 23 33 -SHOW SLAVE STATUS; - -connection master; -DROP TABLE IF EXISTS t1; - -# End of 5.1 Test --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_ndb_innodb2ndb-master.opt b/mysql-test/t/rpl_ndb_innodb2ndb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_ndb_innodb2ndb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt b/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt deleted file mode 100644 index 7f9eb96dff1..00000000000 --- a/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=ndbcluster diff --git a/mysql-test/t/rpl_ndb_innodb2ndb.test b/mysql-test/t/rpl_ndb_innodb2ndb.test deleted file mode 100644 index 229ee11353b..00000000000 --- a/mysql-test/t/rpl_ndb_innodb2ndb.test +++ /dev/null @@ -1,16 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/have_innodb.inc --- source include/master-slave.inc -connection slave; --- source include/have_ndb.inc -connection master; -SET storage_engine=innodb; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/t/rpl_ndb_innodb_trans-slave.opt b/mysql-test/t/rpl_ndb_innodb_trans-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_ndb_innodb_trans-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_ndb_innodb_trans.test b/mysql-test/t/rpl_ndb_innodb_trans.test deleted file mode 100644 index 127c2464570..00000000000 --- a/mysql-test/t/rpl_ndb_innodb_trans.test +++ /dev/null @@ -1,66 +0,0 @@ -# Test of a transaction mixing the two engines - --- source include/have_ndb.inc --- source include/have_innodb.inc --- source include/master-slave.inc - -create table t1 (a int, unique(a)) engine=ndbcluster; -create table t2 (a int, unique(a)) engine=innodb; - - -begin; -insert into t1 values(1); -insert into t2 values(1); -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -begin; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -delete from t1; -delete from t2; -begin; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -delete from t1; -delete from t2; -begin; -insert into t2 values(3),(4); -insert into t1 values(3),(4); -load data infile '../std_data_ln/rpl_loaddata.dat' into table t2; -load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; -rollback; - -select count(*) from t1; -select count(*) from t2; -sync_slave_with_master; -select count(*) from t1; -select count(*) from t2; -connection master; - -drop table t1,t2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_ndb_insert_ignore.test b/mysql-test/t/rpl_ndb_insert_ignore.test deleted file mode 100644 index 17acb5983f4..00000000000 --- a/mysql-test/t/rpl_ndb_insert_ignore.test +++ /dev/null @@ -1,8 +0,0 @@ -##################################### -# Wrapper for rpl_insert_ignore.test# -##################################### --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc -let $engine_type=NDB; -let $engine_type2=myisam; --- source extra/rpl_tests/rpl_insert_ignore.test diff --git a/mysql-test/t/rpl_ndb_load.test b/mysql-test/t/rpl_ndb_load.test deleted file mode 100644 index 2ee540afd18..00000000000 --- a/mysql-test/t/rpl_ndb_load.test +++ /dev/null @@ -1,66 +0,0 @@ -# -# Currently this test only runs in the source tree with the -# ndb/test programs compiled. -# invoke with: ./mysql-test-run --ndb-extra-test --do-test=rpl_ndb_load -# - ---source include/have_ndb.inc ---source include/have_ndb_extra.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---disable_warnings -# reset master -connection master; -DROP DATABASE IF EXISTS TEST_DB; -CREATE DATABASE TEST_DB; ---enable_warnings - -# -# These tables should correspond to the table definitions in -# storage/ndb/test/ndbapi/bench/ -# -connection master; -USE TEST_DB; -CREATE TABLE SUBSCRIBER - ( NUMBER CHAR(12) BINARY NOT NULL, - NAME CHAR(32) BINARY NOT NULL, - GROUP_ID INT UNSIGNED NOT NULL, - LOCATION INT UNSIGNED NOT NULL, - SESSIONS INT UNSIGNED NOT NULL, - CHANGED_BY CHAR(32) BINARY NOT NULL, - CHANGED_TIME CHAR(32) BINARY NOT NULL, - PRIMARY KEY USING HASH (NUMBER)) - ENGINE = NDB; - -CREATE TABLE GROUP_T - ( GROUP_ID INT UNSIGNED NOT NULL, - GROUP_NAME CHAR(32) BINARY NOT NULL, - ALLOW_READ CHAR(1) BINARY NOT NULL, - ALLOW_INSERT INT UNSIGNED NOT NULL, - ALLOW_DELETE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (GROUP_ID)) - ENGINE = NDB; - -CREATE TABLE SESSION - ( NUMBER CHAR(12) BINARY NOT NULL, - SERVER_ID INT UNSIGNED NOT NULL, - DATA VARBINARY(1998) NOT NULL, - PRIMARY KEY USING HASH (NUMBER,SERVER_ID)) - ENGINE = NDB; - -CREATE TABLE SERVER - ( SUFFIX CHAR(2) BINARY NOT NULL, - SERVER_ID INT UNSIGNED NOT NULL, - NAME CHAR(32) BINARY NOT NULL, - NO_OF_READ INT UNSIGNED NOT NULL, - NO_OF_INSERT INT UNSIGNED NOT NULL, - NO_OF_DELETE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (SUFFIX, SERVER_ID)) - ENGINE = NDB; - -# -# start "load" application -# ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/DbCreate >> $NDB_TOOLS_OUTPUT ---exec NDB_CONNECTSTRING=localhost:$NDBCLUSTER_PORT ../storage/ndb/test/ndbapi/DbAsyncGenerator >> $NDB_TOOLS_OUTPUT diff --git a/mysql-test/t/rpl_ndb_log-master.opt b/mysql-test/t/rpl_ndb_log-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/t/rpl_ndb_log-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/t/rpl_ndb_log.test b/mysql-test/t/rpl_ndb_log.test deleted file mode 100644 index e883d24b977..00000000000 --- a/mysql-test/t/rpl_ndb_log.test +++ /dev/null @@ -1,12 +0,0 @@ -################################### -# Wrapper for rpl_row_log.test # -# Added wrapper so that MyISAM & # -# Innodb and NDB could all use the# -# Same test. NDB produced a diff # -# bin-log # -################################### --- source include/have_binlog_format_row.inc --- source include/have_ndb.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_log.test - diff --git a/mysql-test/t/rpl_ndb_multi.test b/mysql-test/t/rpl_ndb_multi.test deleted file mode 100644 index 196d0a5ed6f..00000000000 --- a/mysql-test/t/rpl_ndb_multi.test +++ /dev/null @@ -1,71 +0,0 @@ ---source include/have_ndb.inc ---source include/have_multi_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# note: server2 is another "master" connected to the master cluster - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# create a table with one row, and make sure the other "master" gets it -CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; -connection server2; -reset master; -SHOW TABLES; -connection master; -INSERT INTO t1 VALUES ("row1","will go away",1); -SELECT * FROM t1 ORDER BY c3; -connection server2; -SELECT * FROM t1 ORDER BY c3; - -# sync slave and retrieve epoch and stop the slave -connection master; -sync_slave_with_master; ---replace_column 1 -SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; -let $the_epoch= `select @the_epoch` ; -SELECT * FROM t1 ORDER BY c3; -stop slave; - -# get the master binlog pos from the epoch, from the _other_ "master", server2 -connection server2; ---replace_result $the_epoch -eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) - FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ; -let $the_pos= `SELECT @the_pos` ; -let $the_file= `SELECT @the_file` ; - -# now connect the slave to the _other_ "master" -connection slave; ---replace_result $MASTER_MYPORT1 -eval CHANGE MASTER TO - master_port=$MASTER_MYPORT1, - master_log_file = '$the_file', - master_log_pos = $the_pos ; -start slave; - -# insert some more values on the first master -connection master; -INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); -DELETE FROM t1 WHERE c3 = 1; -UPDATE t1 SET c2="should go away" WHERE c3 = 2; -UPDATE t1 SET c2="C" WHERE c3 = 3; -DELETE FROM t1 WHERE c3 = 2; - -SELECT * FROM t1 ORDER BY c3; - -save_master_pos; - -# insert another row, and check that we have it on the slave -connection server2; -INSERT INTO t1 VALUES ("row5","E",5); -SELECT * FROM t1 ORDER BY c3; -#sync_slave_with_master; -connection slave; ---sleep 2 -SELECT * FROM t1 ORDER BY c3; - -STOP SLAVE; diff --git a/mysql-test/t/rpl_ndb_multi_update2-slave.opt b/mysql-test/t/rpl_ndb_multi_update2-slave.opt deleted file mode 100644 index 17d4171af0e..00000000000 --- a/mysql-test/t/rpl_ndb_multi_update2-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=nothing.sensible diff --git a/mysql-test/t/rpl_ndb_multi_update2.test b/mysql-test/t/rpl_ndb_multi_update2.test deleted file mode 100644 index df4f0eec39d..00000000000 --- a/mysql-test/t/rpl_ndb_multi_update2.test +++ /dev/null @@ -1,12 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_multi_update2.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc - -# Run this only for row based replication, as replication of -# auto_increment values are not supported with NDB as storage engine --- source include/have_binlog_format_row.inc - -let $engine_type=NDB; ---source extra/rpl_tests/rpl_multi_update2.test diff --git a/mysql-test/t/rpl_ndb_multi_update3.test b/mysql-test/t/rpl_ndb_multi_update3.test deleted file mode 100644 index 008e2143987..00000000000 --- a/mysql-test/t/rpl_ndb_multi_update3.test +++ /dev/null @@ -1,8 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_multi_update3.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_multi_update3.test diff --git a/mysql-test/t/rpl_ndb_myisam2ndb-master.opt b/mysql-test/t/rpl_ndb_myisam2ndb-master.opt deleted file mode 100644 index 83ed8522e72..00000000000 --- a/mysql-test/t/rpl_ndb_myisam2ndb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=row diff --git a/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt b/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt deleted file mode 100644 index 7f9eb96dff1..00000000000 --- a/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-storage-engine=ndbcluster diff --git a/mysql-test/t/rpl_ndb_myisam2ndb.test b/mysql-test/t/rpl_ndb_myisam2ndb.test deleted file mode 100644 index 0c2df6441cb..00000000000 --- a/mysql-test/t/rpl_ndb_myisam2ndb.test +++ /dev/null @@ -1,15 +0,0 @@ -############################################################# -# Author: JBM -# Date: 2006-02-24 -# Purpose: Trying to test ability to replicate from cluster -# to innodb, or myisam, or replicate from innodb/myisam to -# cluster slave. Due to limitations I have created wrappers -# to be able to use the same code for all these different -# test and to have control over the tests. -############################################################## --- source include/master-slave.inc -connection slave; ---source include/have_ndb.inc -connection master; -SET storage_engine=myisam; ---source extra/rpl_tests/rpl_ndb_2multi_eng.test diff --git a/mysql-test/t/rpl_ndb_relayrotate-slave.opt b/mysql-test/t/rpl_ndb_relayrotate-slave.opt deleted file mode 100644 index cf4319f2b40..00000000000 --- a/mysql-test/t/rpl_ndb_relayrotate-slave.opt +++ /dev/null @@ -1,3 +0,0 @@ --O max_relay_log_size=16384 ---loose-innodb ---log-warnings diff --git a/mysql-test/t/rpl_ndb_relayrotate.test b/mysql-test/t/rpl_ndb_relayrotate.test deleted file mode 100644 index c5ec0e1d21b..00000000000 --- a/mysql-test/t/rpl_ndb_relayrotate.test +++ /dev/null @@ -1,8 +0,0 @@ -############################################################ -# By JBM 2006-02-15 Wrapper for rpl_relayrotate.test # -# to reuse test code between engine runs # -############################################################ --- source include/have_ndb.inc --- source include/have_ndb_extra.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_relayrotate.test diff --git a/mysql-test/t/rpl_ndb_rep_ignore-slave.opt b/mysql-test/t/rpl_ndb_rep_ignore-slave.opt deleted file mode 100644 index 6262cf451a6..00000000000 --- a/mysql-test/t/rpl_ndb_rep_ignore-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-db=test --replicate-ignore-table=replica.t1 diff --git a/mysql-test/t/rpl_ndb_rep_ignore.test b/mysql-test/t/rpl_ndb_rep_ignore.test deleted file mode 100644 index 47f5bce5527..00000000000 --- a/mysql-test/t/rpl_ndb_rep_ignore.test +++ /dev/null @@ -1,58 +0,0 @@ -########################################################### -# Author: Jeb -# Date: 15-12-2006 -# Purpose: To test --replicate-ignore-table=db_name.tbl_name -# and --replicate-ignore-db=db_name -# using cluster. Only replica should replicate. -########################################################## - ---source include/have_ndb.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - ---disable_warnings -DROP DATABASE IF EXISTS replica; ---enable_warnings - -# Create database and tables for the test. -CREATE DATABASE replica; -CREATE TABLE t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -USE replica; -CREATE TABLE replica.t1 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; -CREATE TABLE replica.t2 (a INT NOT NULL KEY, b text NOT NULL)ENGINE=NDB; - -# Insert data into db that should not be picked up by slave -USE test; -INSERT INTO t1 VALUES(1, repeat('abc',10)); -INSERT INTO t2 VALUES(1, repeat('abc',10)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Insert data into db that should be replicated -USE replica; -INSERT INTO replica.t1 VALUES(2, repeat('def',200)); -INSERT INTO replica.t2 VALUES(2, repeat('def',200)); -SHOW TABLES; -SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; - -# Check results on slave ---sync_slave_with_master -SHOW TABLES; -USE replica; -SHOW TABLES; -#SELECT COUNT(*) FROM t1; -SELECT COUNT(*) FROM t2; -USE test; -SHOW TABLES; - -# Cleanup from testing -connection master; -USE test; -DROP TABLE t1, t2; -DROP DATABASE IF EXISTS replica; ---sync_slave_with_master - -# End 5.1 test case diff --git a/mysql-test/t/rpl_ndb_row_001.test b/mysql-test/t/rpl_ndb_row_001.test deleted file mode 100644 index 1e2a4ec02df..00000000000 --- a/mysql-test/t/rpl_ndb_row_001.test +++ /dev/null @@ -1,6 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -######################################################## ---source include/have_ndb.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_row_001.test diff --git a/mysql-test/t/rpl_ndb_sp003.test b/mysql-test/t/rpl_ndb_sp003.test deleted file mode 100644 index 75ad9f0a488..00000000000 --- a/mysql-test/t/rpl_ndb_sp003.test +++ /dev/null @@ -1,9 +0,0 @@ -################################# -# Wrapper for rpl_row_sp003.test# -# These tests have been wrapped # -# so the same code can be used # -# For different engines # -################################# --- source include/have_ndb.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_sp003.test diff --git a/mysql-test/t/rpl_ndb_sp006.test b/mysql-test/t/rpl_ndb_sp006.test deleted file mode 100644 index 590facc3648..00000000000 --- a/mysql-test/t/rpl_ndb_sp006.test +++ /dev/null @@ -1,9 +0,0 @@ -################################# -# Wrapper for rpl_row_sp006.test# -# These tests have been wrapped # -# so the same code can be used # -# For different engines # -################################# --- source include/have_ndb.inc -let $engine_type=NDBCLUSTER; --- source extra/rpl_tests/rpl_row_sp006.test diff --git a/mysql-test/t/rpl_ndb_stm_innodb-master.opt b/mysql-test/t/rpl_ndb_stm_innodb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_ndb_stm_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_ndb_stm_innodb.test b/mysql-test/t/rpl_ndb_stm_innodb.test deleted file mode 100644 index b92fbbcfce6..00000000000 --- a/mysql-test/t/rpl_ndb_stm_innodb.test +++ /dev/null @@ -1,62 +0,0 @@ ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/have_binlog_format_mixed_or_statement.inc ---source include/master-slave.inc - ---connection master -create table t1 (a int key, b int) engine innodb; -create table t2 (a int key, b int) engine innodb; - ---sync_slave_with_master ---connection slave -alter table t1 engine ndb; -alter table t2 engine ndb; - -# check binlog position without begin ---connection master -insert into t1 values (1,2); - ---sync_slave_with_master ---connection slave ---replace_column 1 2 -select @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status; ---let $start_pos = `select @start_pos` ---let $end_pos = `select @end_pos` - ---connection master -# here is actually a bug, since there is no begin statement, the -# query is autocommitted, and end_pos shows end of the insert and not -# end of the commit ---replace_result $start_pos ---replace_column 5 # ---eval show binlog events from $start_pos limit 1 ---replace_result $start_pos $end_pos ---replace_column 2 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ ---eval show binlog events from $start_pos limit 1,1 - -# check binlog position with begin ---connection master -begin; -insert into t1 values (2,3); -insert into t2 values (3,4); -commit; - ---sync_slave_with_master ---connection slave ---replace_column 1 2 -select @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status; ---let $start_pos = `select @start_pos` ---let $end_pos = `select @end_pos` - ---connection master ---replace_result $start_pos ---replace_column 5 # ---eval show binlog events from $start_pos limit 1 ---replace_result $start_pos ---replace_column 2 # 4 # 5 # ---eval show binlog events from $start_pos limit 1,2 ---replace_result $start_pos $end_pos ---replace_column 2 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ ---eval show binlog events from $start_pos limit 3,1 diff --git a/mysql-test/t/rpl_ndb_sync.test b/mysql-test/t/rpl_ndb_sync.test deleted file mode 100644 index 14e2b36b588..00000000000 --- a/mysql-test/t/rpl_ndb_sync.test +++ /dev/null @@ -1,104 +0,0 @@ ---source include/have_ndb.inc ---source include/ndb_default_cluster.inc ---source include/not_embedded.inc ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -# -# Currently test only works with ndb since it retrieves "old" -# binlog positions with mysql.ndb_binlog_index and ndb_apply_status; -# - -# stop the save ---connection slave -STOP SLAVE; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; - -# get some data on the master ---connection master -CREATE DATABASE ndbsynctest; -USE ndbsynctest; -CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ; -INSERT INTO t1 VALUES (1,1,"row1"),(0,1,"row2"),(1,0,"row3"),(0,0,"row4"); -CREATE TABLE t2 (c1 CHAR(15), c2 BIT(1) NOT NULL, c3 BIT(1) NOT NULL, PRIMARY KEY(c1)) ENGINE = NDB ; -INSERT INTO t2 VALUES ("ABC",1,1),("BCDEF",0,1),("CD",1,0),("DEFGHIJKL",0,0); -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# take a backup on master ---source include/ndb_backup.inc - -# update a row -UPDATE t1 SET c2=0 WHERE c3="row2"; -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; - -# restore on slave, first check that nothing is there ---connection slave - -# we should have no tables -SHOW TABLES; - ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# -# BUG#11960 -# prior to bugfix "DROP DATABASE" would give a warning since -# the events were not created by ndb_restore -# -DROP DATABASE ndbsynctest; -CREATE DATABASE ndbsynctest; -USE ndbsynctest; ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT_SLAVE" -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT - -# continue test -SHOW TABLES; - -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# -# now setup replication to continue from last epoch ---source include/ndb_setup_slave.inc ---connection slave -START SLAVE; - -# -# -# ---connection master ---sync_slave_with_master ---connection slave ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 7 8 9 16 22 23 33 -SHOW SLAVE STATUS; - -SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; -SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1; - -# -# Cleanup -# - ---connection master -DROP DATABASE ndbsynctest; ---sync_slave_with_master ---connection slave -STOP SLAVE; - -# -# Test some replication commands -# ---connection master -reset master; -# should now contain nothing -select * from mysql.ndb_binlog_index; - ---connection slave -reset slave; -# should now contain nothing -select * from mysql.ndb_apply_status; - -# End 5.1 Test diff --git a/mysql-test/t/rpl_ndb_trig004.test b/mysql-test/t/rpl_ndb_trig004.test deleted file mode 100644 index 7439da563a6..00000000000 --- a/mysql-test/t/rpl_ndb_trig004.test +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: 2006-02-14 # -############################################################################# -# TEST: Use before insert triggers and has the second insert fail # -# Test is wrapped to save code and share between engines # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/have_ndb.inc --- source include/master-slave.inc -let $engine_type=NDB; --- source extra/rpl_tests/rpl_trig004.test - diff --git a/mysql-test/t/rpl_ndbapi_multi.test b/mysql-test/t/rpl_ndbapi_multi.test deleted file mode 100644 index 62b83f0557a..00000000000 --- a/mysql-test/t/rpl_ndbapi_multi.test +++ /dev/null @@ -1,11 +0,0 @@ --- source include/have_ndb.inc --- source include/have_binlog_format_row.inc --- source include/master-slave.inc --- source include/have_ndbapi_examples.inc - ---exec echo Running ndbapi_simple_dual ---exec $NDB_EXAMPLES_DIR/ndbapi_simple_dual/ndbapi_simple_dual $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" $SLAVE_MYSOCK "localhost:$NDBCLUSTER_PORT_SLAVE" >> $NDB_EXAMPLES_OUTPUT - ---exec echo Running mgmapi_logevent ---exec $NDB_EXAMPLES_DIR/mgmapi_logevent/mgmapi_logevent "localhost:$NDBCLUSTER_PORT" "localhost:$NDBCLUSTER_PORT_SLAVE" 1 >> $NDB_EXAMPLES_OUTPUT - diff --git a/mysql-test/t/rpl_optimize.test b/mysql-test/t/rpl_optimize.test deleted file mode 100644 index 80f0c052fc8..00000000000 --- a/mysql-test/t/rpl_optimize.test +++ /dev/null @@ -1,54 +0,0 @@ -# Test for BUG#1858 "OPTIMIZE TABLE done by a client -# thread stops the slave SQL thread". -# You can replace OPTIMIZE by REPAIR. -##################################### -# Change Author: JBM -# Change Date: 2006-02-09 -# Change: NDB does not and will not support -# OPTIMIZE for memory tables. If and when -# it does support for Disk Data, a new -# version of this test will be need. -# Skipping this test if default engine = ndb -##################################### --- source include/not_ndb_default.inc --- source include/master-slave.inc - -create table t1 (a int not null auto_increment primary key, b int, key(b)); -INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -save_master_pos; -# a few updates to force OPTIMIZE to do something -update t1 set b=(a/2*rand()); -delete from t1 order by b limit 10000; - -connection slave; -sync_with_master; -optimize table t1; -connection master; -save_master_pos; -connection slave; -# Bug was that when the INSERT terminated on slave, -# the slave SQL thread got killed by OPTIMIZE. -sync_with_master; # won't work if slave SQL thread stopped - -connection master; # cleanup -drop table t1; -connection slave; -sync_with_master; - -# If the machine is so fast that slave syncs before OPTIMIZE -# starts, this test wil demonstrate nothing but will pass. - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_packet-master.opt b/mysql-test/t/rpl_packet-master.opt deleted file mode 100644 index 42d4f94c999..00000000000 --- a/mysql-test/t/rpl_packet-master.opt +++ /dev/null @@ -1 +0,0 @@ --O max_allowed_packet=1024 -O net_buffer_length=1024 diff --git a/mysql-test/t/rpl_packet-slave.opt b/mysql-test/t/rpl_packet-slave.opt deleted file mode 100644 index 42d4f94c999..00000000000 --- a/mysql-test/t/rpl_packet-slave.opt +++ /dev/null @@ -1 +0,0 @@ --O max_allowed_packet=1024 -O net_buffer_length=1024 diff --git a/mysql-test/t/rpl_packet.test b/mysql-test/t/rpl_packet.test deleted file mode 100644 index 26fe36d8c40..00000000000 --- a/mysql-test/t/rpl_packet.test +++ /dev/null @@ -1,80 +0,0 @@ -# -# Check replication protocol packet size handling -# Bug#19402 SQL close to the size of the max_allowed_packet fails on slave -# - -# max-out size db name -source include/master-slave.inc; - -let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; -disable_warnings; -eval drop database if exists $db; -enable_warnings; -eval create database $db; - -connection master; -select @@net_buffer_length, @@max_allowed_packet; -disconnect master; - -# alas, can't use eval here; if db name changed apply the change here -connect (master,localhost,root,,DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________); - -connection master; -create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM; - -INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023'); -save_master_pos; - -connection slave; -sync_with_master; -eval select count(*) from `$db`.`t1` /* must be 1 */; - -SHOW STATUS LIKE 'Slave_running'; -select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; -connection master; -eval drop database $db; -save_master_pos; - -connection slave; -sync_with_master; - -# -# Bug #23755: Replicated event larger that max_allowed_packet infinitely re-transmits -# -# Check that a situation when the size of event on the master is greater than -# max_allowed_packet on the slave does not lead to infinite re-transmits. - -connection master; - -# Change the max packet size on master - -SET @@global.max_allowed_packet=4096; -SET @@global.net_buffer_length=4096; - -# Restart slave for new setting to take effect -connection slave; -STOP SLAVE; -START SLAVE; - -# Reconnect to master for new setting to take effect -disconnect master; -connect (master, localhost, root); -connection master; - -CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM; - -INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); - -# The slave I/O thread must stop after trying to read the above event -connection slave; -sleep 2; -SHOW STATUS LIKE 'Slave_running'; - -# cleanup -#connection master; -#drop table t1; -#connection slave; -#drop table t1; - - -# End of tests diff --git a/mysql-test/t/rpl_ps.test b/mysql-test/t/rpl_ps.test deleted file mode 100644 index b8792722192..00000000000 --- a/mysql-test/t/rpl_ps.test +++ /dev/null @@ -1,51 +0,0 @@ -# -# Test of replicating user variables -# -########################################################### -# 2006-02-08 By JBM added order by for use w/ NDB engine -########################################################### -source include/master-slave.inc; - -#save_master_pos; -#connection slave; -#sync_with_master; -#reset master; -#connection master; - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1(n char(30)); - -prepare stmt1 from 'insert into t1 values (?)'; -set @var1= "from-master-1"; -execute stmt1 using @var1; -set @var1= "from-master-2-'',"; -execute stmt1 using @var1; -SELECT * FROM t1 ORDER BY n; - -set @var2= 'insert into t1 values (concat("from-var-", ?))'; -prepare stmt2 from @var2; -set @var1='from-master-3'; -execute stmt2 using @var1; - -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM t1 ORDER BY n; - -connection master; - -drop table t1; - -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -# End of 4.1 tests - -reset master; -reset slave; -disconnect master; diff --git a/mysql-test/t/rpl_rbr_to_sbr.test b/mysql-test/t/rpl_rbr_to_sbr.test deleted file mode 100644 index 4f72996671d..00000000000 --- a/mysql-test/t/rpl_rbr_to_sbr.test +++ /dev/null @@ -1,47 +0,0 @@ --- source include/have_binlog_format_mixed_or_statement.inc --- source include/not_ndb_default.inc --- source include/master-slave.inc - -# Test that the slave temporarily switches to ROW when seeing binrow -# events when it is in STATEMENT or MIXED mode - -SET BINLOG_FORMAT=MIXED; -SET GLOBAL BINLOG_FORMAT=MIXED; -SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT; - ---echo **** On Master **** -CREATE TABLE t1 (a INT, b LONG); -INSERT INTO t1 VALUES (1,1), (2,2); -INSERT INTO t1 VALUES (3,UUID()), (4,UUID()); -let $VERSION=`select version()`; ---replace_result $VERSION VERSION ---replace_column 2 # 5 # ---replace_regex /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; -sync_slave_with_master; ---echo **** On Slave **** ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS ---replace_result $VERSION VERSION ---replace_column 2 # 5 # ---replace_regex /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql - -connection master; -DROP TABLE IF EXISTS t1; - -# Let's compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching - -diff_files $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql; - -# If all is good, we can remove the files - ---remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql ---remove_file $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql diff --git a/mysql-test/t/rpl_read_only-slave.opt b/mysql-test/t/rpl_read_only-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_read_only-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_read_only.test b/mysql-test/t/rpl_read_only.test deleted file mode 100644 index 62864b62a28..00000000000 --- a/mysql-test/t/rpl_read_only.test +++ /dev/null @@ -1,113 +0,0 @@ -# Test case for BUG #11733 --- source include/master-slave.inc --- source include/have_innodb.inc - -# Create a test and replicate it to slave -connection master; -create user test; -sync_slave_with_master; - -# Setting the master readonly : -# - the variable @@readonly is not replicated on the slave - -connect (master2,127.0.0.1,test,,test,$MASTER_MYPORT,); -connect (slave2,127.0.0.1,test,,test,$SLAVE_MYPORT,); - -connection master1; - -create table t1(a int) engine=InnoDB; -create table t2(a int) engine=MyISAM; -insert into t1 values(1001); -insert into t2 values(2001); - -connection master; -set global read_only=1; - -connection master1; -select @@read_only; -select * from t1; -select * from t2; - -sync_slave_with_master; -select @@read_only; -select * from t1; -select * from t2; - -# - replication of transactions -connection master; -set global read_only=0; - -connection master1; -BEGIN; -insert into t1 values(1002); -insert into t2 values(2002); - -connection master2; -BEGIN; -insert into t1 values(1003); -insert into t2 values(2003); - -connection master; -set global read_only=1; - -connection master1; -## works even with read_only=1, because master1 is root -COMMIT; - -connection master2; ---error ER_OPTION_PREVENTS_STATEMENT -COMMIT; - -connection master; -set global read_only=0; - -connection master1; -insert into t1 values(1004); -insert into t2 values(2004); - -select * from t1; -select * from t2; - -sync_slave_with_master; -select * from t1; -select * from t2; - -# Setting the slave readonly : replication will pass -# -connection slave1; -set global read_only=1; - -connection slave; -select @@read_only; -# Make sure the replicated table is also transactional -show create table t1; -# Make sure the replicated table is not transactional -show create table t2; - -connection master; -insert into t1 values(1005); -insert into t2 values(2005); -select * from t1; -select * from t2; - -sync_slave_with_master; -connection slave; -select * from t1; -select * from t2; - -# Non root user can not write on the slave -connection slave2; ---error ER_OPTION_PREVENTS_STATEMENT -insert into t1 values(1006); ---error ER_OPTION_PREVENTS_STATEMENT -insert into t2 values(2006); - -## Cleanup -connection master; -drop user test; -drop table t1; -drop table t2; -sync_slave_with_master; -set global read_only=0; - - diff --git a/mysql-test/t/rpl_redirect.test b/mysql-test/t/rpl_redirect.test deleted file mode 100644 index 078d1048794..00000000000 --- a/mysql-test/t/rpl_redirect.test +++ /dev/null @@ -1,47 +0,0 @@ -# -# Test of automatic redirection of queries to master/slave. -# - -source include/master-slave.inc; -# We disable this for now as PS doesn't handle redirection ---disable_ps_protocol - -#first, make sure the slave has had enough time to register -save_master_pos; -connection slave; -sync_with_master; - -#discover slaves -connection master; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # -SHOW SLAVE STATUS; ---replace_result $SLAVE_MYPORT SLAVE_PORT -SHOW SLAVE HOSTS; -rpl_probe; - -#turn on master/slave query direction auto-magic -enable_rpl_parse; -create table t1 ( n int); -insert into t1 values (1),(2),(3),(4); -disable_rpl_parse; -save_master_pos; -connection slave; -sync_with_master; -insert into t1 values(5); -connection master; -enable_rpl_parse; -# The first of the queries will be sent to the slave, the second to the master. -SELECT * FROM t1 ORDER BY n; -SELECT * FROM t1 ORDER BY n; -disable_rpl_parse; -SELECT * FROM t1 ORDER BY n; -connection slave; -SELECT * FROM t1 ORDER BY n; - -# Cleanup -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_relay_space_innodb-master.opt b/mysql-test/t/rpl_relay_space_innodb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_relay_space_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_relay_space_innodb-slave.opt b/mysql-test/t/rpl_relay_space_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_relay_space_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_relay_space_innodb.test b/mysql-test/t/rpl_relay_space_innodb.test deleted file mode 100644 index 156d53ef856..00000000000 --- a/mysql-test/t/rpl_relay_space_innodb.test +++ /dev/null @@ -1,22 +0,0 @@ -################################### -# Wrapper rpl_sv_relay_space.test # -# This test has to be wrapped as # -# It tests ndb, innodb and MyISAM.# -# By Wrapping we are saving some # -# space and making the test more # -# Maintainable by only having one # -# test file and reusing the code # -# In Addition, INNODB has to have # -# Option files during this test # -# to force innodb on the slave # -# else the test will fail # -################################### -#Change Author: JBM # -#Change Date: 2006-02-03 # -#Change: Added Comments # -################################### --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=InnoDB; --- source extra/rpl_tests/rpl_sv_relay_space.test - diff --git a/mysql-test/t/rpl_relay_space_myisam.test b/mysql-test/t/rpl_relay_space_myisam.test deleted file mode 100644 index 1d8563e7fd9..00000000000 --- a/mysql-test/t/rpl_relay_space_myisam.test +++ /dev/null @@ -1,21 +0,0 @@ -################################### -# Wrapper rpl_sv_relay_space.test # -# This test has to be wrapped as # -# It tests ndb, innodb and MyISAM.# -# By Wrapping we are saving some # -# space and making the test more # -# Maintainable by only having one # -# test file and reusing the code # -# In Addition, INNODB has to have # -# Option files during this test # -# to force innodb on the slave # -# else the test will fail # -################################### -#Change Author: JBM # -#Change Date: 2006-02-03 # -#Change: Added Comments # -################################### --- source include/not_ndb_default.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_sv_relay_space.test - diff --git a/mysql-test/t/rpl_relayrotate-slave.opt b/mysql-test/t/rpl_relayrotate-slave.opt deleted file mode 100644 index cf4319f2b40..00000000000 --- a/mysql-test/t/rpl_relayrotate-slave.opt +++ /dev/null @@ -1,3 +0,0 @@ --O max_relay_log_size=16384 ---loose-innodb ---log-warnings diff --git a/mysql-test/t/rpl_relayrotate.test b/mysql-test/t/rpl_relayrotate.test deleted file mode 100644 index 46d54aea1d2..00000000000 --- a/mysql-test/t/rpl_relayrotate.test +++ /dev/null @@ -1,10 +0,0 @@ -####################################################### -# Wrapper for rpl_relayrotate.test to allow multi # -# Engines to reuse test code. By JBM 2006-02-15 # -# Added comments section and to skip when ndb is # -# Default engine. # -####################################################### --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=innodb; --- source extra/rpl_tests/rpl_relayrotate.test diff --git a/mysql-test/t/rpl_relayspace-slave.opt b/mysql-test/t/rpl_relayspace-slave.opt deleted file mode 100644 index 06d96aa3b9a..00000000000 --- a/mysql-test/t/rpl_relayspace-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---relay_log_space_limit=10 diff --git a/mysql-test/t/rpl_relayspace.test b/mysql-test/t/rpl_relayspace.test deleted file mode 100644 index 70315c14f34..00000000000 --- a/mysql-test/t/rpl_relayspace.test +++ /dev/null @@ -1,34 +0,0 @@ -# The slave is started with relay_log_space_limit=10 bytes, -# to force the deadlock after one event. - -source include/master-slave.inc; -connection slave; -stop slave; -connection master; -# This will generate a master's binlog > 10 bytes -create table t1 (a int); -drop table t1; -create table t1 (a int); -drop table t1; -connection slave; -reset slave; -start slave io_thread; -# Give the I/O thread time to block. -sleep 2; -# A bug caused the I/O thread to refuse stopping. -stop slave io_thread; -reset slave; -start slave; -# The I/O thread stops filling the relay log when -# it's >10b. And the SQL thread cannot purge this relay log -# as purge is done only when the SQL thread switches to another -# relay log, which does not exist here. -# So we should have a deadlock. -# if it is not resolved automatically we'll detect -# it with master_pos_wait that waits for farther than 1Ob; -# it will timeout after 10 seconds; -# also the slave will probably not cooperate to shutdown -# (as 2 threads are locked) -select master_pos_wait('master-bin.001',200,6)=-1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_replicate_do-slave.opt b/mysql-test/t/rpl_replicate_do-slave.opt deleted file mode 100644 index da345474216..00000000000 --- a/mysql-test/t/rpl_replicate_do-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-table=test.t1 diff --git a/mysql-test/t/rpl_replicate_do.test b/mysql-test/t/rpl_replicate_do.test deleted file mode 100644 index 600840a2828..00000000000 --- a/mysql-test/t/rpl_replicate_do.test +++ /dev/null @@ -1,92 +0,0 @@ -# This test assumes we are ignoring updates on table t2, but doing -# updates on t1 -source include/master-slave.inc; ---disable_warnings -drop table if exists t11; -connection slave; -drop table if exists t11; ---enable_warnings - -create table t2 (n int); -insert into t2 values(4); -connection master; -create table t2 (s char(20)); -load data infile '../std_data_ln/words.dat' into table t2; -insert into t2 values('five'); -create table t1 (m int); -insert into t1 values(15),(16),(17); -update t1 set m=20 where m=16; -delete from t1 where m=17; -create table t11 select * from t1; -save_master_pos; -connection slave; -sync_with_master; -select * from t1 ORDER BY m; -select * from t2; ---error 1146 -select * from t11; -connection master; -drop table if exists t1,t2,t11; -save_master_pos; -connection slave; -sync_with_master; -# show slave status, just to see of it prints replicate-do-table ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # -show slave status; - -# -# BUG#12542 -# TEST: "SET ONE_SHOT should always be executed on slave" -# -# We could use any timezone different than server default in this test -# -connection master; -create table t1 (ts timestamp); -set one_shot time_zone='met'; -insert into t1 values('2005-08-12 00:00:00'); -set one_shot time_zone='met'; -select * from t1; -sync_slave_with_master; - -connection slave; -set one_shot time_zone='met'; -select * from t1; - -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests - -# -# Bug#24478 DROP TRIGGER is not caught by replicate-*-table filters -# ---echo *** master *** -connection master; -create table t1 (a int, b int); -create trigger trg1 before insert on t1 for each row set new.b=2; -create table t2 (a int, b int); -create trigger trg2 before insert on t2 for each row set new.b=2; -show tables; -show triggers; -sync_slave_with_master; ---echo *** slave *** -connection slave; -show tables; -show triggers; ---echo *** master *** -connection master; -drop trigger trg1; -drop trigger trg2; -show triggers; -sync_slave_with_master; ---echo *** slave *** -connection slave; -show tables; -show triggers; ---echo *** master *** -connection master; -drop table t1; -drop table t2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_replicate_ignore_db-slave.opt b/mysql-test/t/rpl_replicate_ignore_db-slave.opt deleted file mode 100644 index 6e3aed44f78..00000000000 --- a/mysql-test/t/rpl_replicate_ignore_db-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate_ignore_db=mysqltest1 diff --git a/mysql-test/t/rpl_replicate_ignore_db.test b/mysql-test/t/rpl_replicate_ignore_db.test deleted file mode 100644 index bcfef919fad..00000000000 --- a/mysql-test/t/rpl_replicate_ignore_db.test +++ /dev/null @@ -1,30 +0,0 @@ -# see if --replicate-ignore-db works - ---source include/master-slave.inc - ---disable_warnings -drop database if exists mysqltest1; -drop database if exists mysqltest2; ---enable_warnings -create database mysqltest1; -create database mysqltest2; - -use mysqltest1; -create table t1 (a int); -insert into t1 values(1); -sync_slave_with_master; ---error 1146 -select * from mysqltest1.t1; - -connection master; -use mysqltest2; -create table t1 (a int); -insert into t1 values(1); -sync_slave_with_master; -select * from mysqltest2.t1; - -# cleanup -connection master; -drop database mysqltest1; -drop database mysqltest2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_rewrt_db-slave.opt b/mysql-test/t/rpl_rewrt_db-slave.opt deleted file mode 100644 index a462ad19ba0..00000000000 --- a/mysql-test/t/rpl_rewrt_db-slave.opt +++ /dev/null @@ -1 +0,0 @@ -"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1->test" diff --git a/mysql-test/t/rpl_rewrt_db.test b/mysql-test/t/rpl_rewrt_db.test deleted file mode 100644 index 52f04e073dd..00000000000 --- a/mysql-test/t/rpl_rewrt_db.test +++ /dev/null @@ -1,84 +0,0 @@ -# TBF - difference in row level logging --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - ---disable_warnings -drop database if exists mysqltest1; ---enable_warnings -create database mysqltest1; - -use mysqltest1; -create table t1 (a int); -insert into t1 values(9); -select * from mysqltest1.t1; -sync_slave_with_master; -show databases like 'mysqltest1'; # should be empty -select * from test.t1; -# cleanup -connection master; -drop table t1; -drop database mysqltest1; -sync_slave_with_master; - -# -# BUG#6353: -# Option --replicate-rewrite-db should work together with LOAD DATA INFILE -# - -connection slave; ---disable_warnings -drop database if exists rewrite; ---enable_warnings -create database rewrite; - -connection master; -use test; -create table t1 (a date, b date, c date not null, d date); -load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ','; -load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; -sync_slave_with_master; - -connection slave; -select * from rewrite.t1; - -connection master; -truncate table t1; -load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); -sync_slave_with_master; - -connection slave; -select * from rewrite.t1; - -connection master; -drop table t1; -create table t1 (a text, b text); -load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; -sync_slave_with_master; - -connection slave; -select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1; - -connection master; -drop table t1; -create table t1 (a int, b char(10)); -load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; -sync_slave_with_master; - -connection slave; -select * from rewrite.t1; - -connection master; -truncate table t1; -load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; -sync_slave_with_master; - -connection slave; -# The empty line last comes from the end line field in the file -select * from rewrite.t1; - -drop database rewrite; - -connection master; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_rotate_logs-master.opt b/mysql-test/t/rpl_rotate_logs-master.opt deleted file mode 100644 index ad2c6a647b5..00000000000 --- a/mysql-test/t/rpl_rotate_logs-master.opt +++ /dev/null @@ -1 +0,0 @@ --O max_binlog_size=4096 diff --git a/mysql-test/t/rpl_rotate_logs-slave.sh b/mysql-test/t/rpl_rotate_logs-slave.sh deleted file mode 100755 index 81490a54b4b..00000000000 --- a/mysql-test/t/rpl_rotate_logs-slave.sh +++ /dev/null @@ -1,2 +0,0 @@ -rm -f $MYSQLTEST_VARDIR/slave-data/master.info -rm -f $MYSQLTEST_VARDIR/slave-data/*relay* diff --git a/mysql-test/t/rpl_rotate_logs.slave-mi b/mysql-test/t/rpl_rotate_logs.slave-mi deleted file mode 100644 index 80190bf6d29..00000000000 --- a/mysql-test/t/rpl_rotate_logs.slave-mi +++ /dev/null @@ -1 +0,0 @@ ---server-id=2 diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test deleted file mode 100644 index 155f9f4b6e0..00000000000 --- a/mysql-test/t/rpl_rotate_logs.test +++ /dev/null @@ -1,175 +0,0 @@ -# This test uses chmod, can't be run with root permissions --- source include/not_as_root.inc - --- source include/have_log_bin.inc - -# -# Test is run with max_binlog_size=2048 to force automatic rotation of the -# binary log -# Tests done: -# - Check that slaves reports correct failures if master.info has strange -# modes/information -# - Automatic binary log rotation -# - Ensure that temporary tables works over flush logs and binary log -# changes -# - Test creating a duplicate key error and recover from it - -# Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc - -connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings -connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK); -# Create empty file -write_file $MYSQLTEST_VARDIR/slave-data/master.info; -EOF -chmod 0000 $MYSQLTEST_VARDIR/slave-data/master.info; -connection slave; ---disable_warnings -drop table if exists t1, t2, t3, t4; ---enable_warnings - -# START SLAVE will fail because it can't read the file (mode 000) -# (system error 13) ---replace_result $MYSQL_TEST_DIR TESTDIR ---error 1105,1105,29 -start slave; -chmod 0600 $MYSQLTEST_VARDIR/slave-data/master.info; -# It will fail again because the file is empty so the slave cannot get valuable -# info about how to connect to the master from it (failure in -# init_strvar_from_file() in init_master_info()). ---error 1201 -start slave; ---replace_result $MASTER_MYPORT MASTER_PORT - -# CHANGE MASTER will fail because it first parses master.info before changing -# it (so when master.info is bad, people have to use RESET SLAVE first). ---error 1201 -eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root'; -reset slave; ---replace_result $MASTER_MYPORT MASTER_PORT -eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root'; -connection master; -reset master; -connection slave; -start slave; -connection master; - -# -# Test FLUSH LOGS -# -create temporary table temp_table (a char(80) not null); -insert into temp_table values ("testing temporary tables"); -create table t1 (s text); -insert into t1 values('Could not break slave'),('Tried hard'); -sync_slave_with_master; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; -select * from t1; -connection master; -flush logs; -create table t2(m int not null auto_increment primary key); -insert into t2 values (34),(67),(123); -flush logs; -show binary logs; -create table t3 select * from temp_table; - -sync_slave_with_master; - -select * from t3; -connection master; -drop table temp_table, t3; - -# -# Now lets make some duplicate key mess and see if we can recover from it -# - -# First insert a value on the slave -connection slave; -insert into t2 values(1234); - -#same value on the master -connection master; -set insert_id=1234; -insert into t2 values(NULL); -connection slave; ---source include/wait_for_slave_sql_to_stop.inc - -#restart slave skipping one event -set global sql_slave_skip_counter=1; -start slave; - -connection master; - -#let slave catch up -sync_slave_with_master; -connection master; -purge master logs to 'master-bin.000002'; -show master logs; -# we just tests if synonyms are accepted -purge binary logs to 'master-bin.000002'; -show binary logs; - -# Calculate time to use in "purge master logs before" by taking -# last modification time of t2 and adding 1 second -# This is donw in order to handle the case where file system -# time differs from mysqld's time ---disable_result_log -select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND) - from information_schema.tables - where TABLE_SCHEMA="test" and TABLE_NAME="t2"; ---enable_result_log - -purge master logs before (@time_for_purge); -show binary logs; -insert into t2 values (65); -sync_slave_with_master; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; -select * from t2; - -# -# Test forcing the replication log to rotate -# - -connection master; -create temporary table temp_table (a char(80) not null); -insert into temp_table values ("testing temporary tables part 2"); -let $1=100; - -create table t3 (n int); -disable_query_log; -while ($1) -{ -#eval means expand $ expressions - eval insert into t3 values($1 + 4); - dec $1; -} -enable_query_log; -select count(*) from t3 where n >= 4; -create table t4 select * from temp_table; -show binary logs; -show master status; -save_master_pos; -connection slave; -sync_with_master; -select * from t4; - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; -# because of concurrent insert, the table may not be up to date -# if we do not lock -lock tables t3 read; -select count(*) from t3 where n >= 4; -unlock tables; -#clean up -connection master; -drop table if exists t1,t2,t3,t4; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_row_001.test b/mysql-test/t/rpl_row_001.test deleted file mode 100644 index 639c55362a5..00000000000 --- a/mysql-test/t/rpl_row_001.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=MYISAM; --- source extra/rpl_tests/rpl_row_001.test diff --git a/mysql-test/t/rpl_row_4_bytes-master.opt b/mysql-test/t/rpl_row_4_bytes-master.opt deleted file mode 100644 index 0e1929507f7..00000000000 --- a/mysql-test/t/rpl_row_4_bytes-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-debug=d,"old_row_based_repl_4_byte_map_id_master" diff --git a/mysql-test/t/rpl_row_4_bytes.test b/mysql-test/t/rpl_row_4_bytes.test deleted file mode 100644 index 73ef6dd2345..00000000000 --- a/mysql-test/t/rpl_row_4_bytes.test +++ /dev/null @@ -1,33 +0,0 @@ -# This test is to make sure that slaves can read a binlog containining -# table map ids stored in 4 bytes, even though we now store them in 6 -# bytes. This is for backward-compatibility. -# If the slave does not detect that the master stores the table map id -# in 4 bytes, slave will read 6 bytes, and so will read the 2 bytes of -# flags at the place where there actually is data, so the test should -# fail. - --- source include/have_binlog_format_row.inc --- source include/have_debug.inc --- source include/master-slave.inc - -connection master; ---disable_warnings -drop database if exists mysqltest1; -create database mysqltest1; ---enable_warnings -use mysqltest1; -CREATE TABLE t1 (a char(3)); -CREATE TABLE t2 (a char(3)); -insert into t1 values("ANN"); -insert into t1 values("GUI"); -insert into t2 values("LIL"); -insert into t2 values("ABE"); -insert into t2 values("ANG"); -sync_slave_with_master; -use mysqltest1; -select * from t1 order by a; -select * from t2 order by a; - -connection master; -DROP DATABASE mysqltest1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_row_NOW.test b/mysql-test/t/rpl_row_NOW.test deleted file mode 100644 index c28b714277e..00000000000 --- a/mysql-test/t/rpl_row_NOW.test +++ /dev/null @@ -1,74 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -# Updated 08/30/2005 Added dumps and diff # -############################################################################# -#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=12480 # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -create database if not exists mysqltest1; -DROP TABLE IF EXISTS mysqltest1.t1; ---enable_warnings - - -# Begin test section 1 -CREATE TABLE mysqltest1.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, - a TIMESTAMP DEFAULT '2005-05-05 01:01:01', - b TIMESTAMP DEFAULT '2005-05-05 01:01:01', - PRIMARY KEY(n)); -delimiter |; -CREATE FUNCTION mysqltest1.f1() RETURNS TIMESTAMP -BEGIN - DECLARE v1 INT DEFAULT 300; - WHILE v1 > 0 DO - SET v1 = v1 - 1; - END WHILE; - RETURN NOW(); -END| -delimiter ;| - -INSERT INTO mysqltest1.t1 VALUES(NULL,NOW(),mysqltest1.f1()); - -delimiter |; -CREATE TRIGGER mysqltest1.trig1 BEFORE INSERT ON mysqltest1.t1 -FOR EACH ROW BEGIN - SET new.b = mysqltest1.f1(); -END| -delimiter ;| - -INSERT INTO mysqltest1.t1 SET n = NULL, a = now(); - -sync_slave_with_master; - -connection master; - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/NOW_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/NOW_slave.sql - -# lets cleanup -DROP TABLE IF EXISTS mysqltest1.t1; -DROP FUNCTION mysqltest1.f1; -DROP DATABASE mysqltest1; - -# Lets compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching :-) The failed dump -# files will be located in $MYSQLTEST_VARDIR/tmp - -diff_files $MYSQLTEST_VARDIR/tmp/NOW_master.sql $MYSQLTEST_VARDIR/tmp/NOW_slave.sql; - -# If all is good, when can cleanup our dump files. ---remove_file $MYSQLTEST_VARDIR/tmp/NOW_master.sql ---remove_file $MYSQLTEST_VARDIR/tmp/NOW_slave.sql - -sync_slave_with_master; -# End of 5.1 test case diff --git a/mysql-test/t/rpl_row_USER.test b/mysql-test/t/rpl_row_USER.test deleted file mode 100644 index 7b13ebc50ee..00000000000 --- a/mysql-test/t/rpl_row_USER.test +++ /dev/null @@ -1,60 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -############################################################################# -# TEST: To test the USER() and CURRENT_USER() in rbr # -############################################################################# -# Change Author: JBM -# Change Date: 2006-01-16 -# Change: Added Order by for NDB -########## - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# Begin clean up test section -connection master; ---disable_warnings -DROP DATABASE IF EXISTS mysqltest1; -CREATE DATABASE mysqltest1; ---enable_warnings - -# Section 1 test -CREATE USER tester IDENTIFIED BY 'test'; -GRANT ALL ON mysqltest1.* TO 'tester'@'%' IDENTIFIED BY 'test'; -GRANT ALL ON mysqltest1.* TO ''@'localhost%'; -FLUSH PRIVILEGES; -connect (m_1,localhost,tester,,mysqltest1); - -connection m_1; -CREATE TABLE mysqltest1.t1 (a INT, users VARCHAR(255), PRIMARY KEY(a)); -INSERT INTO mysqltest1.t1 VALUES(1,USER()); -INSERT INTO mysqltest1.t1 VALUES(2,CURRENT_USER()); -delimiter |; -create procedure mysqltest1.p1() -begin - INSERT INTO mysqltest1.t1 VALUES(3,USER()); - INSERT INTO mysqltest1.t1 VALUES(4,CURRENT_USER()); -end| -delimiter ;| - -CALL mysqltest1.p1(); -connection master; -SELECT * FROM mysqltest1.t1 ORDER BY a; -sync_slave_with_master; -SELECT * FROM mysqltest1.t1 ORDER BY a; - -connection master; -# Lets cleanup -#show binlog events; - -DROP DATABASE mysqltest1; -REVOKE ALL ON mysqltest1.* FROM 'tester'@'%'; -REVOKE ALL ON mysqltest1.* FROM ''@'localhost%'; -DROP USER tester@'%'; -DROP USER ''@'localhost%'; - -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_UUID.test b/mysql-test/t/rpl_row_UUID.test deleted file mode 100644 index 6ead7c2ee9b..00000000000 --- a/mysql-test/t/rpl_row_UUID.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=myisam; ---source extra/rpl_tests/rpl_row_UUID.test diff --git a/mysql-test/t/rpl_row_basic_11bugs-master.opt b/mysql-test/t/rpl_row_basic_11bugs-master.opt deleted file mode 100644 index ed7656c1f99..00000000000 --- a/mysql-test/t/rpl_row_basic_11bugs-master.opt +++ /dev/null @@ -1,2 +0,0 @@ ---binlog_ignore_db=test_ignore --loose-innodb - diff --git a/mysql-test/t/rpl_row_basic_11bugs-slave.opt b/mysql-test/t/rpl_row_basic_11bugs-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_row_basic_11bugs-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_row_basic_11bugs.test b/mysql-test/t/rpl_row_basic_11bugs.test deleted file mode 100644 index 0109edf4264..00000000000 --- a/mysql-test/t/rpl_row_basic_11bugs.test +++ /dev/null @@ -1,186 +0,0 @@ ---source include/have_binlog_format_row.inc - -let $SERVER_VERSION=`select version()`; - -#This test case is not written for NDB, the result files -#will not match when NDB is the default engine --- source include/not_ndb_default.inc - ---source include/master-slave.inc - -# Bug#15942 (RBR ignores --binlog_ignore_db and tries to map to table -# on slave for writes) - -CREATE DATABASE test_ignore; # --binlog_ignore_db=mysqltest_ignore - ---echo **** On Master **** -SHOW DATABASES; -USE test; -CREATE TABLE t1 (a INT, b INT); -SHOW TABLES; -INSERT INTO t1 VALUES (1,1), (2,2); -USE test_ignore; -CREATE TABLE t2 (a INT, b INT); -SHOW TABLES; -INSERT INTO t2 VALUES (3,3), (4,4); -source include/show_binlog_events.inc; -sync_slave_with_master; ---echo **** On Slave **** -SHOW DATABASES; -USE test; -SHOW TABLES; ---error 1049 -USE test_ignore; - -connection master; -DROP DATABASE test_ignore; -sync_slave_with_master; - -# Bug#19995: Extreneous table maps generated for statements that does -# not generate rows ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log - -connection master; -CREATE TABLE t1 (a INT); -DELETE FROM t1; -INSERT INTO t1 VALUES (1),(2); -DELETE FROM t1 WHERE a = 0; -UPDATE t1 SET a=99 WHERE a = 0; ---replace_result $SERVER_VERSION SERVER_VERSION ---replace_regex /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; - -DROP TABLE t1; - -# BUG#17620: Replicate (Row Based) Fails when Query Cache enabled on -# slave ---echo ================ Test for BUG#17620 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log - ---echo **** On Slave **** -connection slave; -SET GLOBAL QUERY_CACHE_SIZE=0; - ---echo **** On Master **** -connection master; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3); - ---echo **** On Slave **** -sync_slave_with_master; -SET GLOBAL QUERY_CACHE_SIZE=16*1024*1024; - ---echo **** On Master **** -connection master; -INSERT INTO t1 VALUES (4),(5),(6); - ---echo **** On Slave **** -sync_slave_with_master; -SELECT * FROM t1; - ---echo **** On Master **** -connection master; -INSERT INTO t1 VALUES (7),(8),(9); - ---echo **** On Slave **** -sync_slave_with_master; -SELECT * FROM t1; - -SET GLOBAL QUERY_CACHE_SIZE=0; - -# Bug#22550: Replication of BIT columns failing ---echo ================ Test for BUG#22550 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log - -connection master; -CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM; -sync_slave_with_master; - -connection master; -INSERT INTO t1 VALUES(1,2); -SELECT HEX(a),b FROM t1; -sync_slave_with_master; -SELECT HEX(a),b FROM t1; - -connection master; -UPDATE t1 SET a=0 WHERE b=2; -SELECT HEX(a),b FROM t1; -sync_slave_with_master; -SELECT HEX(a),b FROM t1; - -connection master; -DROP TABLE IF EXISTS t1; -sync_slave_with_master; - -# BUG#22583: RBR between MyISAM and non-MyISAM tables containing a BIT -# field does not work - ---echo ================ Test for BUG#22583 ================ ---disable_query_log ---source include/master-slave-reset.inc ---enable_query_log - -# disabling warnings temporarily for ENGINE=INNODB to work without InnoDB ---disable_warnings ---echo **** On Master **** -connection master; -CREATE TABLE t1_myisam (k INT, a BIT(1), b BIT(9)) ENGINE=MYISAM; -CREATE TABLE t1_innodb (k INT, a BIT(1), b BIT(9)) ENGINE=INNODB; -CREATE TABLE t2_myisam (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=MYISAM; -CREATE TABLE t2_innodb (k INT, a BIT(1) NOT NULL, b BIT(4) NOT NULL) ENGINE=INNODB; ---echo **** On Slave **** -sync_slave_with_master; -ALTER TABLE t1_myisam ENGINE=INNODB; -ALTER TABLE t1_innodb ENGINE=MYISAM; -ALTER TABLE t2_myisam ENGINE=INNODB; -ALTER TABLE t2_innodb ENGINE=MYISAM; ---enable_warnings - ---echo **** On Master **** -connection master; -INSERT INTO t1_myisam VALUES(1, b'0', 257); -INSERT INTO t1_myisam VALUES(2, b'1', 256); -INSERT INTO t1_innodb VALUES(1, b'0', 257); -INSERT INTO t1_innodb VALUES(2, b'1', 256); -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -INSERT INTO t2_myisam VALUES(1, b'0', 9); -INSERT INTO t2_myisam VALUES(2, b'1', 8); -INSERT INTO t2_innodb VALUES(1, b'0', 9); -INSERT INTO t2_innodb VALUES(2, b'1', 8); -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -SELECT k, HEX(a),HEX(b) FROM t2_innodb; ---echo **** On Slave **** -sync_slave_with_master; -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -SELECT k, HEX(a),HEX(b) FROM t2_innodb; - ---echo **** On Master **** -connection master; -UPDATE t1_myisam SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -UPDATE t1_innodb SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -UPDATE t2_myisam SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -UPDATE t2_innodb SET a=0 WHERE k=2; -SELECT k, HEX(a),HEX(b) FROM t2_innodb; ---echo **** On Slave **** -sync_slave_with_master; -SELECT k, HEX(a),HEX(b) FROM t1_myisam; -SELECT k, HEX(a),HEX(b) FROM t1_innodb; -SELECT k, HEX(a),HEX(b) FROM t2_myisam; -SELECT k, HEX(a),HEX(b) FROM t2_innodb; - ---echo **** On Master **** -connection master; -DROP TABLE IF EXISTS t1_myisam, t1_innodb, t2_myisam, t2_innodb; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_row_basic_2myisam.test b/mysql-test/t/rpl_row_basic_2myisam.test deleted file mode 100644 index c2cef800ec8..00000000000 --- a/mysql-test/t/rpl_row_basic_2myisam.test +++ /dev/null @@ -1,3 +0,0 @@ -let $type= 'MYISAM' ; -let $extra_index= ; --- source extra/rpl_tests/rpl_row_basic.test diff --git a/mysql-test/t/rpl_row_basic_3innodb-slave.opt b/mysql-test/t/rpl_row_basic_3innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_basic_3innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_basic_3innodb.test b/mysql-test/t/rpl_row_basic_3innodb.test deleted file mode 100644 index 89effc4b3bb..00000000000 --- a/mysql-test/t/rpl_row_basic_3innodb.test +++ /dev/null @@ -1,6 +0,0 @@ --- source include/have_innodb.inc - -let $type= 'INNODB' ; -let $extra_index= ; --- source extra/rpl_tests/rpl_row_basic.test - diff --git a/mysql-test/t/rpl_row_basic_7ndb.test b/mysql-test/t/rpl_row_basic_7ndb.test deleted file mode 100644 index 1ec2fb333ae..00000000000 --- a/mysql-test/t/rpl_row_basic_7ndb.test +++ /dev/null @@ -1,5 +0,0 @@ --- source include/have_ndb.inc -let $type= 'NDB' ; -let $extra_index= ; --- source extra/rpl_tests/rpl_row_basic.test --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_row_basic_8partition.test b/mysql-test/t/rpl_row_basic_8partition.test deleted file mode 100644 index 687b3bc785d..00000000000 --- a/mysql-test/t/rpl_row_basic_8partition.test +++ /dev/null @@ -1,210 +0,0 @@ -############################################################ -# Author: MATZ # -# Date: 2006-03-22 # -# Purpose: See if replication of partition tables work # -# Most of this test is copied from the rpl_xxx2yyy tests, # -# but here we just test some simple basic replication of # -# partition tables with same engine (MyISAM) in both ends. # -############################################################ - ---source include/have_binlog_format_row.inc ---source include/have_partition.inc ---source include/not_ndb_default.inc ---source include/master-slave.inc -connection master; ---disable_warnings -DROP TABLE IF EXISTS t1; - -let $maybe_ro_var = @@BINLOG_FORMAT; -let $val4var = ROW; ---source include/safe_set_to_maybe_ro_var.inc - ---echo **** Partition RANGE testing **** - -# Create table that is partitioned by range on year i.e. year(t) and -# replicate basice operations such at insert, update delete between 2 -# different storage engines Alter table and ensure table is handled -# Correctly on the slave -# Note that the storage engine should not be explicit: the default -# storage engine is used on master and slave. - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), - bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - PARTITION BY RANGE (YEAR(t)) - (PARTITION p0 VALUES LESS THAN (1901), - PARTITION p1 VALUES LESS THAN (1946), - PARTITION p2 VALUES LESS THAN (1966), - PARTITION p3 VALUES LESS THAN (1986), - PARTITION p4 VALUES LESS THAN (2005), - PARTITION p5 VALUES LESS THAN MAXVALUE); - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave -- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -connection master; -# Check that simple Alter statements are replicated correctly -ALTER TABLE t1 MODIFY vc TEXT; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - -# Perform basic operation on master and ensure replicated correctly ---source include/rpl_multi_engine3.inc - -connection master; -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo **** Partition LIST testing **** - -# Create table that is partitioned by list on id i.e. (2,4). Pretend -# that we missed one and alter to add. Then replicate basice -# operations such at insert, update delete between 2 different storage -# engines Alter table and ensure table is handled Correctly on the -# slave. - - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), - bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - PARTITION BY LIST(id) - (PARTITION p0 VALUES IN (2, 4), - PARTITION p1 VALUES IN (42, 142), - PARTITION p2 VALUES IN (412)); - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - -# Perform basic operation on master and ensure replicated correctly ---source include/rpl_multi_engine3.inc - -connection master; -# Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - -# Perform basic operation on master and ensure replicated correctly ---source include/rpl_multi_engine3.inc - -connection master; -DROP TABLE IF EXISTS t1; - -######################################################## - ---echo **** Partition HASH testing **** - -# Create table that is partitioned by hash on year i.e. YEAR(t). Then -# replicate basice operations such at insert, update delete between 2 -# different storage engines Alter table and ensure table is handled -# Correctly on the slave - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), - bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, - f FLOAT DEFAULT 0, total BIGINT UNSIGNED, - y YEAR, t DATE) - PARTITION BY HASH( YEAR(t) ) - PARTITIONS 4; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -# Check that simple Alter statements are replicated correctly -ALTER TABLE t1 MODIFY vc TEXT; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -connection master; -DROP TABLE IF EXISTS t1; - -######################################################## - -# This part does not work ---echo **** Partition by KEY **** - -# Create table that is partitioned by key on id with 4 parts. Then -# replicate basice operations such at insert, update delete between 2 -# different storage engines Alter table and ensure table is handled -# Correctly on the slave - -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), 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)) - PARTITION BY KEY() - PARTITIONS 4; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -connection master; -# Check that simple Alter statements are replicated correctly -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -connection master; -# Check that simple Alter statements are replicated correctly -ALTER TABLE t1 MODIFY vc TEXT; - ---echo --- On master --- -SHOW CREATE TABLE t1; - ---echo --- On slave --- -sync_slave_with_master; -SHOW CREATE TABLE t1; - ---source include/rpl_multi_engine3.inc - -DROP TABLE IF EXISTS t1; - -# End of 5.1 test case diff --git a/mysql-test/t/rpl_row_blob_innodb-slave.opt b/mysql-test/t/rpl_row_blob_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_blob_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_blob_innodb.test b/mysql-test/t/rpl_row_blob_innodb.test deleted file mode 100644 index 0bce657f9f9..00000000000 --- a/mysql-test/t/rpl_row_blob_innodb.test +++ /dev/null @@ -1,12 +0,0 @@ -################################# -# Wrapper for rpl_row_blob.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=InnoDB; --- source extra/rpl_tests/rpl_row_blob.test - diff --git a/mysql-test/t/rpl_row_blob_myisam.test b/mysql-test/t/rpl_row_blob_myisam.test deleted file mode 100644 index a470c36f9f8..00000000000 --- a/mysql-test/t/rpl_row_blob_myisam.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_row_blob.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=myisam; --- source extra/rpl_tests/rpl_row_blob.test - diff --git a/mysql-test/t/rpl_row_charset.test b/mysql-test/t/rpl_row_charset.test deleted file mode 100644 index 9737c52c70f..00000000000 --- a/mysql-test/t/rpl_row_charset.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=myisam; --- source extra/rpl_tests/rpl_row_charset.test diff --git a/mysql-test/t/rpl_row_create_table-slave.opt b/mysql-test/t/rpl_row_create_table-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_row_create_table-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_row_create_table.test b/mysql-test/t/rpl_row_create_table.test deleted file mode 100644 index be10d48b757..00000000000 --- a/mysql-test/t/rpl_row_create_table.test +++ /dev/null @@ -1,236 +0,0 @@ -# Testing table creations for row-based replication. - ---source include/have_binlog_format_row.inc ---source include/master-slave.inc ---source include/have_innodb.inc -connection slave; ---source include/have_innodb.inc -connection master; - -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. ---disable_ps_protocol - ---disable_query_log ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; ---enable_warnings ---enable_query_log - -# Set the default storage engine to different values on master and -# slave. We need to stop the slave for the server variable to take -# effect, since the variable is only read on start-up. -sync_slave_with_master; ---disable_query_log -set @storage_engine = @@global.storage_engine; -STOP SLAVE; -SET GLOBAL storage_engine=memory; -START SLAVE; ---enable_query_log - -connection master; -CREATE TABLE t1 (a INT, b INT); -CREATE TABLE t2 (a INT, b INT) ENGINE=Merge; -CREATE TABLE t3 (a INT, b INT) CHARSET=utf8; -CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8; ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ ---query_vertical SHOW BINLOG EVENTS FROM 216 ---echo **** On Master **** ---query_vertical SHOW CREATE TABLE t1 ---query_vertical SHOW CREATE TABLE t2 ---query_vertical SHOW CREATE TABLE t3 -sync_slave_with_master; ---echo **** On Slave **** ---query_vertical SHOW CREATE TABLE t1 ---query_vertical SHOW CREATE TABLE t2 ---query_vertical SHOW CREATE TABLE t3 - -connection master; -CREATE TABLE t5 (b INT, c INT) SELECT * FROM t3; - -CREATE TEMPORARY TABLE tt3 (a INT, b INT); -INSERT INTO tt3 VALUES (1,2), (2,4), (3,6), (4,2), (5,10), (6,12); -CREATE TABLE t6 (b INT, c INT) SELECT * FROM tt3; ---echo **** On Master **** ---query_vertical SHOW CREATE TABLE t5 -SELECT * FROM t5 ORDER BY a,b,c; ---query_vertical SHOW CREATE TABLE t6 -SELECT * FROM t6 ORDER BY a,b,c; -sync_slave_with_master; ---echo **** On Slave **** ---query_vertical SHOW CREATE TABLE t5 -SELECT * FROM t5 ORDER BY a,b,c; ---query_vertical SHOW CREATE TABLE t6 -SELECT * FROM t6 ORDER BY a,b,c; - -connection master; -# Test for erroneous constructions ---error ER_DUP_ENTRY -CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; -# Shouldn't be written to the binary log ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1098; - -# Test that INSERT-SELECT works the same way as for SBR. -CREATE TABLE t7 (a INT, b INT UNIQUE); ---error ER_DUP_ENTRY -INSERT INTO t7 SELECT a,b FROM tt3; -SELECT * FROM t7 ORDER BY a,b; -# Should be written to the binary log ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1098; -sync_slave_with_master; -SELECT * FROM t7 ORDER BY a,b; - -connection master; -CREATE TEMPORARY TABLE tt4 (a INT, b INT); -INSERT INTO tt4 VALUES (4,8), (5,10), (6,12); -BEGIN; -INSERT INTO t7 SELECT a,b FROM tt4; -ROLLBACK; ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1294; -SELECT * FROM t7 ORDER BY a,b; -sync_slave_with_master; -SELECT * FROM t7 ORDER BY a,b; - -connection master; -CREATE TABLE t8 LIKE t4; -CREATE TABLE t9 LIKE tt4; -CREATE TEMPORARY TABLE tt5 LIKE t4; -CREATE TEMPORARY TABLE tt6 LIKE tt4; -CREATE TEMPORARY TABLE tt7 SELECT 1; ---echo **** On Master **** ---query_vertical SHOW CREATE TABLE t8 ---query_vertical SHOW CREATE TABLE t9 ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1390; -sync_slave_with_master; ---echo **** On Slave **** ---query_vertical SHOW CREATE TABLE t8 ---query_vertical SHOW CREATE TABLE t9 - -connection master; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; -sync_slave_with_master; -# Here we reset the value of the default storage engine -STOP SLAVE; -SET GLOBAL storage_engine=@storage_engine; -START SLAVE; ---enable_ps_protocol - -# BUG#22864 (Rollback following CREATE ... SELECT discards 'CREATE -# table' from log): ---echo ================ BUG#22864 ================ -connection slave; -STOP SLAVE; -RESET SLAVE; -connection master; -RESET MASTER; -connection slave; -START SLAVE; -connection master; -SET AUTOCOMMIT=0; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3); - -CREATE TABLE t2 ENGINE=INNODB SELECT * FROM t1; -ROLLBACK; - -CREATE TABLE t3 ENGINE=INNODB SELECT * FROM t1; -INSERT INTO t3 VALUES (4),(5),(6); -ROLLBACK; - -CREATE TABLE t4 ENGINE=INNODB SELECT * FROM t1; -INSERT INTO t1 VALUES (4),(5),(6); -ROLLBACK; - -SHOW TABLES; -SELECT TABLE_NAME,ENGINE - FROM INFORMATION_SCHEMA.TABLES - WHERE TABLE_NAME LIKE 't_' -ORDER BY TABLE_NAME; -SELECT * FROM t1 ORDER BY a; -SELECT * FROM t2 ORDER BY a; -SELECT * FROM t3 ORDER BY a; -SELECT * FROM t4 ORDER BY a; ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; -sync_slave_with_master; -SHOW TABLES; -SELECT TABLE_NAME,ENGINE - FROM INFORMATION_SCHEMA.TABLES - WHERE TABLE_NAME LIKE 't_' -ORDER BY TABLE_NAME; -SELECT * FROM t1 ORDER BY a; -SELECT * FROM t2 ORDER BY a; -SELECT * FROM t3 ORDER BY a; -SELECT * FROM t4 ORDER BY a; - -connection master; -DROP TABLE IF EXISTS t1,t2,t3,t4; -SET AUTOCOMMIT=1; -sync_slave_with_master; - -# Some tests with temporary tables -connection slave; -STOP SLAVE; -RESET SLAVE; - -connection master; -RESET MASTER; - -connection slave; -START SLAVE; - -connection master; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3); - -CREATE TABLE t2 (a INT) ENGINE=INNODB; - -BEGIN; -INSERT INTO t2 SELECT a*a FROM t1; -CREATE TEMPORARY TABLE tt1 -SELECT a+1 AS a - FROM t1 - WHERE a MOD 2 = 1; -INSERT INTO t2 SELECT a+2 FROM tt1; -COMMIT; - -SELECT * FROM t2 ORDER BY a; ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; -sync_slave_with_master; -SELECT * FROM t2 ORDER BY a; - -connection master; -TRUNCATE TABLE t2; - -BEGIN; -INSERT INTO t2 SELECT a*a FROM t1; -CREATE TEMPORARY TABLE tt2 -SELECT a+1 AS a - FROM t1 - WHERE a MOD 2 = 1; -INSERT INTO t2 SELECT a+2 FROM tt2; -ROLLBACK; - -SELECT * FROM t2 ORDER BY a; ---replace_column 1 # 4 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 631; -sync_slave_with_master; -SELECT * FROM t2 ORDER BY a; - -connection master; -DROP TABLE t1,t2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_row_delayed_ins.test b/mysql-test/t/rpl_row_delayed_ins.test deleted file mode 100644 index a0e74567349..00000000000 --- a/mysql-test/t/rpl_row_delayed_ins.test +++ /dev/null @@ -1,7 +0,0 @@ -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc -let $engine_type=myisam; --- source extra/rpl_tests/rpl_row_delayed_ins.test diff --git a/mysql-test/t/rpl_row_drop.test b/mysql-test/t/rpl_row_drop.test deleted file mode 100644 index 20c217a7c3a..00000000000 --- a/mysql-test/t/rpl_row_drop.test +++ /dev/null @@ -1,48 +0,0 @@ --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# Bug#12415: DROP of temporary table on master stops slave -connection master; ---echo **** On Master **** -CREATE TABLE t1 (a int); -CREATE TABLE t2 (a int); -CREATE TEMPORARY TABLE t2 (a int, b int); -SHOW TABLES; -sync_slave_with_master; ---echo **** On Slave **** -SHOW TABLES; -connection master; ---echo **** On Master **** -DROP TABLE t2; # Dropping the temporary table -SHOW TABLES; -sync_slave_with_master; ---echo **** On Slave **** -SHOW TABLES; # There should be two tables on the slave - -connection master; ---echo **** On Master **** -CREATE TEMPORARY TABLE t2 (a int, b int); -SHOW TABLES; -sync_slave_with_master; ---echo **** On Slave **** -SHOW TABLES; -connection master; ---echo **** On Master **** -# Should drop the non-temporary table t1 and the temporary table t2 -DROP TABLE t1,t2; -let $VERSION=`select version()`; ---replace_result $VERSION VERSION ---replace_regex /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS; -SHOW TABLES; -sync_slave_with_master; ---echo **** On Slave **** -SHOW TABLES; - ---disable_query_log ---disable_warnings -connection master; -DROP TABLE IF EXISTS t2; -sync_slave_with_master; ---enable_warnings ---enable_query_log diff --git a/mysql-test/t/rpl_row_err_daisychain-master.opt b/mysql-test/t/rpl_row_err_daisychain-master.opt deleted file mode 100644 index 83ed8522e72..00000000000 --- a/mysql-test/t/rpl_row_err_daisychain-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=row diff --git a/mysql-test/t/rpl_row_err_daisychain-slave.opt b/mysql-test/t/rpl_row_err_daisychain-slave.opt deleted file mode 100644 index 4cb7a31da81..00000000000 --- a/mysql-test/t/rpl_row_err_daisychain-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=statement --log-slave-updates diff --git a/mysql-test/t/rpl_row_flsh_tbls.test b/mysql-test/t/rpl_row_flsh_tbls.test deleted file mode 100644 index a2f9e31fc5d..00000000000 --- a/mysql-test/t/rpl_row_flsh_tbls.test +++ /dev/null @@ -1,17 +0,0 @@ -# depends on the binlog output --- source include/have_binlog_format_row.inc - -let $rename_event_pos= 619; - -# Bug#18326: Do not lock table for writing during prepare of statement -# The use of the ps protocol causes extra table maps in the binlog, so -# we disable the ps-protocol for this statement. - -# Merge tables are not supported in NDB --- source include/not_ndb_default.inc - - ---disable_ps_protocol --- source extra/rpl_tests/rpl_flsh_tbls.test ---enable_ps_protocol - diff --git a/mysql-test/t/rpl_row_func001.test b/mysql-test/t/rpl_row_func001.test deleted file mode 100644 index 53fb55118e6..00000000000 --- a/mysql-test/t/rpl_row_func001.test +++ /dev/null @@ -1,57 +0,0 @@ -############################################################################# -# This test is being created to test out the non deterministic items with # -# row based replication. # -# Original Author: JBM # -# Original Date: Aug/10/2005 # -# Update: 08/29/2005 change name to initails # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings ---error 0,1305 -DROP FUNCTION test.f1; -DROP TABLE IF EXISTS test.t1; - - ---enable_warnings - -# Section 1 test from bug #12487 Uses stored function to insert rows to see what is replicated. - -create table test.t1 (a int, PRIMARY KEY(a)); - -delimiter //; -create function test.f1(i int) returns int -begin -insert into test.t1 values(i); -return 0; -end// -delimiter ;// - -select test.f1(1); -select test.f1(2); -select * from test.t1; - -save_master_pos; -sync_slave_with_master; -connection slave; -#show create table test.t1; -select * from test.t1; - -connection master; - -#Used for debugging -#show binlog events; - -# Cleanup - -DROP FUNCTION test.f1; -DROP TABLE test.t1; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_func002.test b/mysql-test/t/rpl_row_func002.test deleted file mode 100644 index 44a704bfbc5..00000000000 --- a/mysql-test/t/rpl_row_func002.test +++ /dev/null @@ -1,104 +0,0 @@ -############################################################################# -# This test is being created to test out the non deterministic items with # -# row based replication. # -# Original Author: JBM # -# Original Date: Aug/10/2005 # -# Update: 08/29/2005 Turn on diff # -############################################################################# -# Note: Many lines are commented out in this test case. These were used for # -# creating the test case and debugging and are being left for # -# debugging, but they can not be used for the regular testing as the # -# Time changes and is not deteministic, so instead we dump both the # -# master and slave and diff the dumps. If the dumps differ then the # -# test case will fail. To run during diff failuers, comment out the # -# diff. # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings ---error 0,1305 -DROP FUNCTION test.f1; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; - ---enable_warnings - -# Section 1 test from Peter G. This test changes uses a stored function to update rows and return the timestamp. We change the value of the time stamp on the master to see what is replicated. - -CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a)); -CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a)); - -delimiter //; -create function test.f1() RETURNS TIMESTAMP -BEGIN -UPDATE test.t1 SET t = CURRENT_TIMESTAMP; -RETURN CURRENT_TIMESTAMP; -END// -delimiter ;// - -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); -#select * from test.t1; -#save_master_pos; -#sync_slave_with_master; -#connection slave; -#select * from test.t1; -#connection master; - - -SET TIMESTAMP=2; -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); -#select * from test.t1; -#save_master_pos; -#sync_slave_with_master; -#connection slave; -#select * from test.t1; -#connection master; - -#sleep 3; -SET TIMESTAMP=1; -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); -#select * from test.t1; -#save_master_pos; -#sync_slave_with_master; -#connection slave; -#select * from test.t1; -#connection master; - - -SET TIMESTAMP=333300000; -INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP); - -# We need a sync to ensure that the slave has caught up before -# dumping the database. -sync_slave_with_master; - -connection master; -#Used for debugging -#show binlog events; - -# time to dump the databases and so we can see if they match - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func002_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func002_slave.sql - -# Cleanup -DROP FUNCTION test.f1; -DROP TABLE test.t1; -DROP TABLE test.t2; -sync_slave_with_master; - -# the test will show that the diff statement failed and no reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching :-). The files are located -# in mysql-test/var/tmp - -diff_files $MYSQLTEST_VARDIR/tmp/func002_master.sql $MYSQLTEST_VARDIR/tmp/func002_slave.sql; - -# End of 5.0 test case - diff --git a/mysql-test/t/rpl_row_func003-slave.opt b/mysql-test/t/rpl_row_func003-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_row_func003-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_row_func003.test b/mysql-test/t/rpl_row_func003.test deleted file mode 100644 index abfadfe1a1a..00000000000 --- a/mysql-test/t/rpl_row_func003.test +++ /dev/null @@ -1,11 +0,0 @@ -################################### -# Wrapper for rpl_row_func003.test# -################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_row_func003.test diff --git a/mysql-test/t/rpl_row_inexist_tbl-slave.opt b/mysql-test/t/rpl_row_inexist_tbl-slave.opt deleted file mode 100644 index abd717f8222..00000000000 --- a/mysql-test/t/rpl_row_inexist_tbl-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.t2 diff --git a/mysql-test/t/rpl_row_inexist_tbl.test b/mysql-test/t/rpl_row_inexist_tbl.test deleted file mode 100644 index 803c214b6c5..00000000000 --- a/mysql-test/t/rpl_row_inexist_tbl.test +++ /dev/null @@ -1,35 +0,0 @@ -# Test to see what slave says when master is updating a table it does -# not have ---source include/have_binlog_format_row.inc - -source include/master-slave.inc; - -connection master; -create table t1 (a int not null primary key); -insert into t1 values (1); -create table t2 (a int); -insert into t2 values (1); -update t1, t2 set t1.a = 0 where t1.a = t2.a; - -sync_slave_with_master; -# t2 should not have been replicated -# t1 should have been properly updated -show tables; -select * from t1; -drop table t1; - -connection master; -insert into t1 values (1); - -connection slave; -# slave should have stopped because can't find table t1 ---source include/wait_for_slave_sql_to_stop.inc -# see if we have a good error message: ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 7 # 8 # 9 # 23 # 33 # ---vertical_results -show slave status; - -# cleanup -connection master; -drop table t1, t2; diff --git a/mysql-test/t/rpl_row_insert_delayed.test b/mysql-test/t/rpl_row_insert_delayed.test deleted file mode 100644 index 9aeb57c4fa2..00000000000 --- a/mysql-test/t/rpl_row_insert_delayed.test +++ /dev/null @@ -1,14 +0,0 @@ ---source include/have_binlog_format_row.inc ---source include/master-slave.inc ---source include/not_embedded.inc ---source include/not_windows.inc - -connection master; -set @old_global_binlog_format = @@global.binlog_format; - -let $binlog_format_statement=0; -set @@global.binlog_format = row; ---source extra/rpl_tests/rpl_insert_delayed.test - -connection master; -set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/t/rpl_row_log-master.opt b/mysql-test/t/rpl_row_log-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/t/rpl_row_log-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/t/rpl_row_log-slave.opt b/mysql-test/t/rpl_row_log-slave.opt deleted file mode 100644 index 8b137891791..00000000000 --- a/mysql-test/t/rpl_row_log-slave.opt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/mysql-test/t/rpl_row_log.test b/mysql-test/t/rpl_row_log.test deleted file mode 100644 index 3253ae9ecba..00000000000 --- a/mysql-test/t/rpl_row_log.test +++ /dev/null @@ -1,16 +0,0 @@ -################################### -# Wrapper for rpl_row_log.test # -# Added wrapper so that MyISAM & # -# Innodb and NDB could all use the# -# Same test. NDB produced a diff # -# bin-log # -################################### -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_binlog_format_row.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_log.test - diff --git a/mysql-test/t/rpl_row_log_innodb-master.opt b/mysql-test/t/rpl_row_log_innodb-master.opt deleted file mode 100644 index e0d075c3fbd..00000000000 --- a/mysql-test/t/rpl_row_log_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-external-locking diff --git a/mysql-test/t/rpl_row_log_innodb-slave.opt b/mysql-test/t/rpl_row_log_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_log_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_log_innodb.test b/mysql-test/t/rpl_row_log_innodb.test deleted file mode 100644 index 5e5182e3519..00000000000 --- a/mysql-test/t/rpl_row_log_innodb.test +++ /dev/null @@ -1,13 +0,0 @@ -################################### -# Wrapper for rpl_row_log.test # -# Added wrapper so that MyISAM & # -# Innodb and NDB could all use the# -# Same test. NDB produced a diff # -# bin-log # -################################### --- source include/not_ndb_default.inc --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc -let $engine_type=InnoDB; --- source extra/rpl_tests/rpl_log.test - diff --git a/mysql-test/t/rpl_row_max_relay_size.test b/mysql-test/t/rpl_row_max_relay_size.test deleted file mode 100644 index a0be59e44a7..00000000000 --- a/mysql-test/t/rpl_row_max_relay_size.test +++ /dev/null @@ -1,11 +0,0 @@ -# Test of options max_binlog_size and max_relay_log_size and -# how they act (if max_relay_log_size == 0, use max_binlog_size -# for relay logs too). -# Test of manual relay log rotation with FLUSH LOGS. - -# Requires statement logging --- source include/not_ndb_default.inc -SET SESSION BINLOG_FORMAT=ROW; -SET GLOBAL BINLOG_FORMAT=ROW; --- source extra/rpl_tests/rpl_max_relay_size.test - diff --git a/mysql-test/t/rpl_row_mysqlbinlog-master.opt b/mysql-test/t/rpl_row_mysqlbinlog-master.opt deleted file mode 100644 index 07d12817f5f..00000000000 --- a/mysql-test/t/rpl_row_mysqlbinlog-master.opt +++ /dev/null @@ -1 +0,0 @@ ---max-binlog-size=1040384 diff --git a/mysql-test/t/rpl_row_mysqlbinlog.test b/mysql-test/t/rpl_row_mysqlbinlog.test deleted file mode 100644 index dd46d64f684..00000000000 --- a/mysql-test/t/rpl_row_mysqlbinlog.test +++ /dev/null @@ -1,348 +0,0 @@ -################################################################## -# Author: JBM # -# Date: 2006-02-22 # -# Purpose: To test changes to mysqlbinlog for row based bin logs # -# We are using .opt file since we need small binlog size # -################################################################## -# Include Section -# Make sure that we have row based bin log --- source include/have_binlog_format_row.inc -# Embedded server doesn't support binlogging --- source include/not_embedded.inc --- source include/master-slave.inc -# This test requires the cp932 charset compiled in --- source include/have_cp932.inc - -# Setup Section -# we need this for getting fixed timestamps inside of this test - ---disable_query_log -select "---Setup Section --" as ""; ---enable_query_log - -set timestamp=1000000000; - ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3; ---enable_warnings - -connection master; -CREATE TABLE t1(word VARCHAR(20)); -CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY); -CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT); - - -# Test Section -# Lets start by putting some data into the tables. - ---disable_query_log -INSERT INTO t1 VALUES ("abirvalg"); -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; -LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1; - -# d1 length 3000 -set @d1 = 'dd1'; -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); -set @d1 = concat(@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1,@d1); - -let $count=500; -while ($count) -{ - INSERT INTO t2 VALUES (NULL); - eval INSERT INTO t3 VALUES ($count,@d1,'20060222000000','Tested in Texas',$count*2.2); - dec $count; -} ---enable_query_log - - ---disable_query_log -select "---Test1 check table load --" as ""; ---enable_query_log - -# Lets Check the tables on the Master -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; - -# Should have the same on the slave; - -sync_slave_with_master; -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; - -# Okay time to get busy, back to master - -connection master; - -# simple query to show more in second binlog -insert into t1 values ("Alas"); -flush logs; - -# delimiters are for easier debugging in future ---disable_query_log -select "--- Test 1 Dump binlog to file --" as ""; ---enable_query_log - -# -# Prepare local temporary file to recreate what we have currently. - ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/master.sql - ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/master.sql - -# Now that we have our file, lets get rid of the current database. -# Cleanup the master and the slave and try to recreate. ---disable_query_log -select "--- Test 1 delete tables, clean master and slave --" as ""; ---enable_query_log - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -sync_slave_with_master; -#we expect STOP SLAVE to produce a warning as the slave is stopped -#(the server was started with skip-slave-start) ---disable_warnings -stop slave; ---enable_warnings ---require r/slave-stopped.result -show status like 'Slave_running'; -connection master; -reset master; -connection slave; -reset slave; -start slave; ---require r/slave-running.result -show status like 'Slave_running'; -connection master; - -# We should be clean at this point, now we will run in the file from above. ---disable_query_log -select "--- Test 1 Load from Dump binlog file --" as ""; ---enable_query_log - ---exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/master.sql" - ---disable_query_log -select "--- Test 1 Check Load Results --" as ""; ---enable_query_log - -# Lets Check the tables on the Master -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; - -# Should have the same on the slave; - -sync_slave_with_master; -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; -connection master; - -# We should be gold by the time, so I will get rid of our file. - ---exec rm $MYSQLTEST_VARDIR/tmp/master.sql - - -# this test for position option -# By setting this position to 413, we should only get the create of t3 ---disable_query_log -select "--- Test 2 position test --" as ""; ---enable_query_log ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 $MYSQLTEST_VARDIR/log/master-bin.000001 - -# These are tests for remote binlog. -# They should return the same as previous test. - ---disable_query_log -select "--- Test 3 First Remote test --" as ""; ---enable_query_log - -# This is broken now ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 - -# This part is disabled due to bug #17654 - ---disable_query_log -select "--- Test 4 Second Remote test --" as ""; ---enable_query_log ---exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql - ---exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/remote.sql - -# Now that we have our file, lets get rid of the current database. -# Cleanup the master and the slave and try to recreate. - -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; - -sync_slave_with_master; - -#we expect STOP SLAVE to produce a warning as the slave is stopped -#(the server was started with skip-slave-start) - ---disable_warnings -stop slave; ---enable_warnings ---require r/slave-stopped.result -show status like 'Slave_running'; -connection master; -reset master; -connection slave; -reset slave; -start slave; ---require r/slave-running.result -show status like 'Slave_running'; -connection master; - -# We should be clean at this point, now we will run in the file from above. - ---exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/remote.sql" - -# Lets Check the tables on the Master - -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; - -# Should have the same on the slave; - -sync_slave_with_master; -SELECT COUNT(*) from t1; -SELECT COUNT(*) from t2; -SELECT COUNT(*) from t3; -SELECT * FROM t1 ORDER BY word LIMIT 5; -SELECT * FROM t2 ORDER BY id LIMIT 5; -SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5; -connection master; - -# We should be gold by the time, so I will get rid of our file. - ---exec rm $MYSQLTEST_VARDIR/tmp/remote.sql -################### End Bug 17654 ###################### - -# LOAD DATA ---disable_query_log -select "--- Test 5 LOAD DATA --" as ""; ---enable_query_log ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 - -# Bug#7853 (mysqlbinlog does not accept input from stdin) - ---disable_query_log -select "--- Test 6 reading stdin --" as ""; ---enable_query_log ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form - < $MYSQLTEST_VARDIR/log/master-bin.000001 - ---disable_query_log -select "--- Test 7 reading stdin w/position --" as ""; ---enable_query_log ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --position=416 - < $MYSQLTEST_VARDIR/log/master-bin.000001 - -# Bug#16217 (mysql client did not know how not switch its internal charset) ---disable_query_log -select "--- Test 8 switch internal charset --" as ""; ---enable_query_log -sync_slave_with_master; - -#we expect STOP SLAVE to produce a warning as the slave is stopped -#(the server was started with skip-slave-start) - ---disable_warnings -stop slave; ---enable_warnings ---require r/slave-stopped.result -show status like 'Slave_running'; -connection master; -reset master; -connection slave; -reset slave; -start slave; ---require r/slave-running.result -show status like 'Slave_running'; -connection master; - -create table t4 (f text character set utf8); -create table t5 (f text character set cp932); ---exec $MYSQL --default-character-set=utf8 test -e "insert into t4 values(_utf8'ソ')" ---exec $MYSQL --default-character-set=cp932 test -e "insert into t5 values(_cp932'ƒ\');" -flush logs; -rename table t4 to t04, t5 to t05; ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 | $MYSQL --default-character-set=utf8 -# original and recovered data must be equal -select HEX(f) from t04; -select HEX(f) from t4; -select HEX(f) from t05; -select HEX(f) from t5; - -# slave should have same -sync_slave_with_master; -select HEX(f) from t04; -select HEX(f) from t4; -select HEX(f) from t05; -select HEX(f) from t5; - ---disable_query_log -select "--- Test cleanup --" as ""; ---enable_query_log -# clean up -connection master; -sync_slave_with_master; - -connection master; - -# BUG#17654 also test mysqlbinlog to ensure it can read the binlog from a remote server -# and ensure that the results are the same as if read from a file (the same file). - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -CREATE TABLE t1 (a INT NOT NULL KEY, b INT); - -INSERT INTO t1 VALUES(1,1); - -SELECT * FROM t1; - -FLUSH LOGS; - ---exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/local.sql - ---diff_files $MYSQLTEST_VARDIR/tmp/local.sql $MYSQLTEST_VARDIR/tmp/remote.sql - ---exec rm $MYSQLTEST_VARDIR/tmp/remote.sql - ---exec rm $MYSQLTEST_VARDIR/tmp/local.sql - -DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_row_mystery22.test b/mysql-test/t/rpl_row_mystery22.test deleted file mode 100644 index 9933fec22fc..00000000000 --- a/mysql-test/t/rpl_row_mystery22.test +++ /dev/null @@ -1,45 +0,0 @@ -# Originally taken from rpl_mystery22.test, -# but this row-based-replication test has a totally different spirit: -# slave will not stop because of dup key, -# instead we test if it does overwrite the dup key -# as expected. --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# first, cause a duplicate key problem on the slave -create table t1(n int auto_increment primary key, s char(10)); -sync_slave_with_master; -insert into t1 values (2,'old'); -connection master; -insert into t1 values(NULL,'new'); -insert into t1 values(NULL,'new'); -save_master_pos; -connection slave; -sync_with_master; -select * from t1 order by n; -delete from t1 where n = 2; ---disable_warnings -start slave; ---enable_warnings -sync_with_master; -stop slave; -connection master; -create table t2(n int); -drop table t2; -insert into t1 values(NULL,'new'); -# what happens when we delete a row which does not exist on slave? -set sql_log_bin=0; -insert into t1 values(NULL,'new'); -set sql_log_bin=1; -delete from t1 where n=4; -save_master_pos; -connection slave; ---disable_warnings -start slave; ---enable_warnings -sync_with_master; -select * from t1 order by n; -#clean up -connection master; -drop table t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_row_reset_slave.test b/mysql-test/t/rpl_row_reset_slave.test deleted file mode 100644 index a970c161153..00000000000 --- a/mysql-test/t/rpl_row_reset_slave.test +++ /dev/null @@ -1,5 +0,0 @@ -# TBF - difference in row level logging -# Temp tables are not replicated in rbr, but it is still good to hit rbr with everthing --- source include/have_binlog_format_row.inc --- source extra/rpl_tests/rpl_reset_slave.test - diff --git a/mysql-test/t/rpl_row_sp001.test b/mysql-test/t/rpl_row_sp001.test deleted file mode 100644 index c12e73b6861..00000000000 --- a/mysql-test/t/rpl_row_sp001.test +++ /dev/null @@ -1,146 +0,0 @@ -############################################################################# -# This test is being created to test out the non deterministic items with # -# row based replication. # -# Original Author: JBM # -# Original Date: Aug/09/2005 # -# Updated: Aug/29/2005 -############################################################################# -# Test: Includes two stored procedure tests. First test uses SP to insert # -# values from RAND() and NOW() into a table. # -# The second test uses SP with CASE structure to decide what to text # -# to update a given table with. # -############################################################################ - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - --- disable_query_log --- disable_result_log - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; - --- enable_query_log --- enable_result_log - -# Begin test section 1 for non deterministic SP -let $message=; ---source include/show_msg.inc - -create table test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); - -delimiter //; -create procedure test.p1() -begin - INSERT INTO test.t1 (f,d) VALUES (RAND(),NOW()); -end// -delimiter ;// - -# show binlog events; - --- disable_query_log --- disable_result_log -let $1=10; -while ($1) -{ - call test.p1(); - sleep 1; - dec $1; -} --- enable_result_log --- enable_query_log - -## Used for debugging -#show binlog events; -#select * from test.t1; -#sync_slave_with_master; -#select * from test.t1; -#connection master; - -let $message=; ---source include/show_msg.inc - - -CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t CHAR(4), PRIMARY KEY(a)); - -delimiter //; -CREATE PROCEDURE test.p2(n int) -begin -CASE n -WHEN 1 THEN - UPDATE test.t2 set t ='Tex'; -WHEN 2 THEN - UPDATE test.t2 set t ='SQL'; -ELSE - UPDATE test.t2 set t ='NONE'; -END CASE; -end// -delimiter ;// - -INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'); - -SELECT * FROM t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM t2 ORDER BY a; - -connection master; -call test.p2(1); -SELECT * FROM t2 ORDER BY a; -sync_slave_with_master; -SELECT * FROM t2 ORDER BY a; - - -connection master; -call test.p2(2); -SELECT * FROM t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM t2 ORDER BY a; - -connection master; -call test.p2(3); -SELECT * FROM t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM t2 ORDER BY a; - -##Used for debugging -#show binlog events; - -# time to dump the databases and so we can see if they match - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp001_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp001_slave.sql - -# First lets cleanup - -connection master; -DROP PROCEDURE test.p1; -DROP PROCEDURE test.p2; -DROP TABLE test.t1; -DROP TABLE test.t2; -sync_slave_with_master; - -# Lets compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching :-) Failed dump files -# will be located in $MYSQLTEST_VARDIR/tmp - -diff_files $MYSQLTEST_VARDIR/tmp/sp001_master.sql $MYSQLTEST_VARDIR/tmp/sp001_slave.sql; - -# If all is good, when can cleanup our dump files. ---remove_file $MYSQLTEST_VARDIR/tmp/sp001_master.sql ---remove_file $MYSQLTEST_VARDIR/tmp/sp001_slave.sql - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp002_innodb-master.opt b/mysql-test/t/rpl_row_sp002_innodb-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_sp002_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_sp002_innodb-slave.opt b/mysql-test/t/rpl_row_sp002_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_sp002_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_sp002_innodb.test b/mysql-test/t/rpl_row_sp002_innodb.test deleted file mode 100644 index e272e34e715..00000000000 --- a/mysql-test/t/rpl_row_sp002_innodb.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_row_sp002.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_row_sp002.test diff --git a/mysql-test/t/rpl_row_sp003-master.opt b/mysql-test/t/rpl_row_sp003-master.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_row_sp003-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_row_sp003-slave.opt b/mysql-test/t/rpl_row_sp003-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_row_sp003-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_row_sp003.test b/mysql-test/t/rpl_row_sp003.test deleted file mode 100644 index 99b30253c8a..00000000000 --- a/mysql-test/t/rpl_row_sp003.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_row_sp003.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_row_sp003.test diff --git a/mysql-test/t/rpl_row_sp005.test b/mysql-test/t/rpl_row_sp005.test deleted file mode 100644 index 054fa02f514..00000000000 --- a/mysql-test/t/rpl_row_sp005.test +++ /dev/null @@ -1,110 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/15/2005 # -# Updated: Aug/29/2005: Removed sleeps # -############################################################################# -# Test: Tests SPs with cursors, flow logic, and alter sp. In addition the # -# tests SPs with insert and update operations. # -############################################################################# -# 2006-02-08 By JBM added ORDER BY for use with NDB engine -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t3; ---enable_warnings -# End of cleanup - -# Begin test section 1 -CREATE TABLE IF NOT EXISTS test.t1(id INT, data CHAR(16),PRIMARY KEY(id)); -CREATE TABLE IF NOT EXISTS test.t2(id2 INT,PRIMARY KEY(id2)); -CREATE TABLE IF NOT EXISTS test.t3(id3 INT,PRIMARY KEY(id3), c CHAR(16)); - -delimiter |; -CREATE PROCEDURE test.p1() -BEGIN -DECLARE done INT DEFAULT 0; - DECLARE spa CHAR(16); - DECLARE spb,spc INT; - DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1 ORDER BY id; - DECLARE cur2 CURSOR FOR SELECT id2 FROM test.t2 ORDER BY id2; - DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; - - OPEN cur1; - OPEN cur2; - - REPEAT - FETCH cur1 INTO spb, spa; - FETCH cur2 INTO spc; - IF NOT done THEN - IF spb < spc THEN - INSERT INTO test.t3 VALUES (spb,spa); - ELSE - INSERT INTO test.t3 VALUES (spc,spa); - END IF; - END IF; - UNTIL done END REPEAT; - - CLOSE cur1; - CLOSE cur2; -END| -CREATE PROCEDURE test.p2() -BEGIN - INSERT INTO test.t1 VALUES (4,'MySQL'),(20,'ROCKS'),(11,'Texas'),(10,'kyle'); - INSERT INTO test.t2 VALUES (4),(2),(1),(3); - UPDATE test.t1 SET id=id+4 WHERE id=4; -END| -delimiter ;| - -let $message=< ---- Master selects-- >; ---source include/show_msg.inc -CALL test.p2(); -SELECT * FROM test.t1 ORDER BY id; -SELECT * FROM test.t2 ORDER BY id2; - -let $message=< ---- Slave selects-- >; ---source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t1 ORDER BY id; -SELECT * FROM test.t2 ORDER BY id2; - -let $message=< ---- Master selects-- >; ---source include/show_msg.inc -connection master; -CALL test.p1(); -sleep 6; -SELECT * FROM test.t3 ORDER BY id3; - -let $message=< ---- Slave selects-- >; ---source include/show_msg.inc -connection slave; -SELECT * FROM test.t3 ORDER BY id3; - -connection master; - -ALTER PROCEDURE test.p1 MODIFIES SQL DATA; -#show binlog events; - -# Cleanup - -connection master; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp006_InnoDB-slave.opt b/mysql-test/t/rpl_row_sp006_InnoDB-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_sp006_InnoDB-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_sp006_InnoDB.test b/mysql-test/t/rpl_row_sp006_InnoDB.test deleted file mode 100644 index f7e59440027..00000000000 --- a/mysql-test/t/rpl_row_sp006_InnoDB.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_row_sp006.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=InnoDB; --- source extra/rpl_tests/rpl_row_sp006.test diff --git a/mysql-test/t/rpl_row_sp007_innodb-slave.opt b/mysql-test/t/rpl_row_sp007_innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_sp007_innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_sp007_innodb.test b/mysql-test/t/rpl_row_sp007_innodb.test deleted file mode 100644 index 41af5a5f997..00000000000 --- a/mysql-test/t/rpl_row_sp007_innodb.test +++ /dev/null @@ -1,11 +0,0 @@ -################################# -# Wrapper for rpl_row_sp007.test# -################################# -######################################################## -# By JBM 2005-02-15 Wrapped to allow reuse of test code# -# Added to skip if ndb is default # -######################################################## --- source include/not_ndb_default.inc --- source include/have_innodb.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_row_sp007.test diff --git a/mysql-test/t/rpl_row_sp008.test b/mysql-test/t/rpl_row_sp008.test deleted file mode 100644 index b1295820c99..00000000000 --- a/mysql-test/t/rpl_row_sp008.test +++ /dev/null @@ -1,57 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/15/2005 # -# Update: 08/29/2005 Remove sleep # -############################################################################# -# TEST: Use SQL_CALC_FOUND_ROWS and insert results into a table inside a sp # -############################################################################# - - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t2; ---enable_warnings -# End of cleanup - - - -# Begin test section 1 -CREATE TABLE test.t1 (a INT,PRIMARY KEY(a)); -CREATE TABLE test.t2 (a INT,PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES(1),(2); - -delimiter |; -CREATE PROCEDURE test.p1() -BEGIN - SELECT SQL_CALC_FOUND_ROWS * FROM test.t1 LIMIT 1; - INSERT INTO test.t2 VALUES(FOUND_ROWS()); -END| -delimiter ;| - -let $message=< ---- Master selects-- >; ---source include/show_msg.inc -CALL test.p1(); -SELECT * FROM test.t2; - -let $message=< ---- Slave selects-- >; ---source include/show_msg.inc -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t2; - -# Cleanup - -connection master; -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp009.test b/mysql-test/t/rpl_row_sp009.test deleted file mode 100644 index 92d47c6f50f..00000000000 --- a/mysql-test/t/rpl_row_sp009.test +++ /dev/null @@ -1,105 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -# Updated: 08/29/2005 removed sleeps and added master pos save and snyc # -############################################################################# -#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=12168 # -############################################################################# -# 2006-02-08 By JBM : Added order by for ndb engine use -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; - - -# Begin test section 1 -CREATE TABLE test.t1 (a INT, PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES (1),(2),(3),(4); -CREATE TABLE test.t2 (a INT, PRIMARY KEY(a)); - -delimiter |; -CREATE PROCEDURE test.p1 (arg1 CHAR(1)) -BEGIN - DECLARE b, c INT; - IF arg1 = 'a' THEN - BEGIN - DECLARE cur1 CURSOR FOR SELECT A FROM test.t1 WHERE a % 2; - DECLARE continue handler for not found set b = 1; - SET b = 0; - OPEN cur1; - c1_repeat: REPEAT - FETCH cur1 INTO c; - IF (b = 1) THEN - LEAVE c1_repeat; - END IF; - - INSERT INTO test.t2 VALUES (c); - UNTIL b = 1 - END REPEAT; - CLOSE cur1; - END; - END IF; - IF arg1 = 'b' THEN - BEGIN - DECLARE cur2 CURSOR FOR SELECT a FROM test.t1 WHERE NOT a % 2; - DECLARE continue handler for not found set b = 1; - SET b = 0; - OPEN cur2; - c2_repeat: REPEAT - FETCH cur2 INTO c; - IF (b = 1) THEN - LEAVE c2_repeat; - END IF; - - INSERT INTO test.t2 VALUES (c); - UNTIL b = 1 - END REPEAT; - CLOSE cur2; - END; - END IF; -END| -delimiter ;| - -CALL test.p1('a'); -SELECT * FROM test.t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t2 ORDER BY a; -connection master; -truncate test.t2; - -# this next call fails, but should not -call test.p1('b'); -select * from test.t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t2 ORDER BY a; - -connection master; -truncate test.t2; -SELECT * FROM test.t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t2 ORDER BY a; - -# Cleanup -connection master; -#show binlog events; -DROP PROCEDURE test.p1; -DROP TABLE test.t1; -DROP TABLE test.t2; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp010.test b/mysql-test/t/rpl_row_sp010.test deleted file mode 100644 index 28b82217517..00000000000 --- a/mysql-test/t/rpl_row_sp010.test +++ /dev/null @@ -1,80 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -# Update: 08/29/2005 remove sleep added master pos save and sync # -############################################################################# -#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=11126 # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; - - -# Begin test section 1 -delimiter |; -CREATE PROCEDURE test.p1() -BEGIN - INSERT INTO test.t1 VALUES(2); -END| -CREATE PROCEDURE test.p2() -BEGIN - DROP TEMPORARY TABLE IF EXISTS test.t1; - CREATE TEMPORARY TABLE test.t1 (a int, PRIMARY KEY(a)); - INSERT INTO test.t1 VALUES(1); - CALL test.p1(); -END| -delimiter ;| -CALL test.p2(); -SELECT * FROM test.t1 ORDER BY a; - -save_master_pos; -connection slave; -sync_with_master; -show tables; - -connection master; -delimiter |; -CREATE PROCEDURE test.p3() -BEGIN - INSERT INTO test.t2 VALUES(7); -END| -CREATE PROCEDURE test.p4() -BEGIN - DROP TABLE IF EXISTS test.t2; - CREATE TABLE test.t2 (a int, PRIMARY KEY(a)); - INSERT INTO test.t2 VALUES(6); - CALL test.p3(); -END| -delimiter ;| -CALL test.p4(); -SELECT * FROM test.t2 ORDER BY a; - -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t2 ORDER BY a; - -# Cleanup -connection master; -#show binlog events; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp011.test b/mysql-test/t/rpl_row_sp011.test deleted file mode 100644 index 25c2fc9ad26..00000000000 --- a/mysql-test/t/rpl_row_sp011.test +++ /dev/null @@ -1,111 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/18/2005 # -# Updated: 08/29/2005 turned on diff and commented out debug SQL statements# -############################################################################# -#TEST: SP to test alter table and nested SP calls # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP PROCEDURE IF EXISTS test.p5; -DROP PROCEDURE IF EXISTS test.p6; -DROP PROCEDURE IF EXISTS test.p7; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; - - -# Begin test section 1 -CREATE TABLE test.t1 (a int, PRIMARY KEY(a)); -INSERT INTO test.t1 VALUES (1); - -delimiter |; -CREATE PROCEDURE test.p1() -BEGIN - ALTER TABLE test.t1 ADD COLUMN b CHAR(4) AFTER a; - UPDATE test.t1 SET b = 'rbr' WHERE a = 1; - CALL test.p2(); -END| -CREATE PROCEDURE test.p2() -BEGIN - ALTER TABLE test.t1 ADD COLUMN f FLOAT AFTER b; - UPDATE test.t1 SET f = RAND() WHERE a = 1; - CALL test.p3(); -END| -CREATE PROCEDURE test.p3() -BEGIN - ALTER TABLE test.t1 RENAME test.t2; - CALL test.p4(); -END| -CREATE PROCEDURE test.p4() -BEGIN - ALTER TABLE test.t2 ADD INDEX (f); - ALTER TABLE test.t2 CHANGE a a INT UNSIGNED NOT NULL AUTO_INCREMENT; - INSERT INTO test.t2 VALUES (NULL,'TEST',RAND()); - CALL test.p5(); -END| -CREATE PROCEDURE test.p5() -BEGIN - ALTER TABLE test.t2 ORDER BY f; - INSERT INTO test.t2 VALUES (NULL,'STM',RAND()); - CALL test.p6(); -END| -CREATE PROCEDURE test.p6() -BEGIN - ALTER TABLE test.t2 ADD COLUMN b2 CHAR(4) FIRST; - ALTER TABLE test.t2 ADD COLUMN to_drop BIT(8) AFTER b2; - INSERT INTO test.t2 VALUES ('new',1,NULL,'STM',RAND()); - CALL test.p7(); -END| -CREATE PROCEDURE test.p7() -BEGIN - ALTER TABLE test.t2 DROP COLUMN to_drop; - INSERT INTO test.t2 VALUES ('gone',NULL,'STM',RAND()); -END| -delimiter ;| -CALL test.p1(); - -#SELECT * FROM test.t2; -sync_slave_with_master; -#SELECT * FROM test.t2; - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp011_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp011_slave.sql - -# Cleanup -connection master; -#show binlog events; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p4; -DROP PROCEDURE IF EXISTS test.p5; -DROP PROCEDURE IF EXISTS test.p6; -DROP PROCEDURE IF EXISTS test.p7; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -sync_slave_with_master; - -# Lets compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching :-) Failed test -# Will leave dump files in $MYSQLTEST_VARDIR/tmp - -diff_files $MYSQLTEST_VARDIR/tmp/sp011_master.sql $MYSQLTEST_VARDIR/tmp/sp011_slave.sql; - -# If all is good, when can cleanup our dump files. ---remove_file $MYSQLTEST_VARDIR/tmp/sp011_master.sql ---remove_file $MYSQLTEST_VARDIR/tmp/sp011_slave.sql - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_sp012.test b/mysql-test/t/rpl_row_sp012.test deleted file mode 100644 index 3a8d295121c..00000000000 --- a/mysql-test/t/rpl_row_sp012.test +++ /dev/null @@ -1,75 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/22/2005 # -# Update: 08/29/2005 Added save pos and sync # -############################################################################# -#TEST: SP to test security and current_user and user # -############################################################################# - - -# Includes --- source include/have_binlog_format_row.inc --- source include/not_embedded.inc --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; - - -# Begin test section 1 -# Create user user1 with no particular access rights -grant usage on *.* to user1@localhost; -flush privileges; - -SELECT CURRENT_USER(); -SELECT USER(); -CREATE PROCEDURE test.p1 () SQL SECURITY INVOKER SELECT CURRENT_USER(), USER(); -CREATE PROCEDURE test.p2 () SQL SECURITY DEFINER CALL test.p1(); -CREATE PROCEDURE test.p3 () SQL SECURITY INVOKER CALL test.p1(); -GRANT EXECUTE ON PROCEDURE p1 TO user1@localhost; -GRANT EXECUTE ON PROCEDURE p2 TO user1@localhost; -GRANT EXECUTE ON PROCEDURE p3 TO user1@localhost; - -# Need to wait for the rights to be applied at the slave -sync_slave_with_master; - -let $message=<******** Master user1 p3 & p2 calls *******>; ---source include/show_msg.inc -connect (muser1,localhost,user1,,); -connection muser1; -SELECT CURRENT_USER(); -SELECT USER(); -CALL test.p3(); -CALL test.p2(); - -let $message=<******** Slave user1 p3 & p2 calls *******>; ---source include/show_msg.inc -connect (suser1,127.0.0.1,user1,,test,$SLAVE_MYPORT,); - -connection master; -save_master_pos; -connection suser1; -sync_with_master; - -SELECT CURRENT_USER(); -SELECT USER(); -CALL test.p3(); -CALL test.p2(); - -# Cleanup -connection master; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p3; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP USER user1@localhost; -sync_slave_with_master; - -# End of 5.0 test case - diff --git a/mysql-test/t/rpl_row_stop_middle.test b/mysql-test/t/rpl_row_stop_middle.test deleted file mode 100644 index da363736100..00000000000 --- a/mysql-test/t/rpl_row_stop_middle.test +++ /dev/null @@ -1,44 +0,0 @@ -# Test for BUG#11729: see if, when STOP SLAVE occurs while the slave -# SQL thread has processed a Table_map_log_event but has not processed -# the last Rows_log_event associated to it, the slave thread does not -# forget to close its tables. - -# Can be run with statement-based but no interest (and long test) ---source include/have_binlog_format_row.inc ---source include/master-slave.inc - -connection master; -create table t1 (a int not null auto_increment primary key, b int, key(b)); -sync_slave_with_master; -stop slave; -connection master; -INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; -INSERT INTO t1 (a) SELECT null FROM t1; - -connection slave; -start slave; - -# hope one second is not enough for slave to reach the last -# Rows_log_event, so that test actually tests something. - -real_sleep 1; -stop slave; - -# see if slave hangs on DROP TABLE - -drop table t1; - -connection master; # cleanup -drop table t1; diff --git a/mysql-test/t/rpl_row_stop_middle_update-master.opt b/mysql-test/t/rpl_row_stop_middle_update-master.opt deleted file mode 100644 index b7db8f97bdd..00000000000 --- a/mysql-test/t/rpl_row_stop_middle_update-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-binlog-row-event-max-size=256 diff --git a/mysql-test/t/rpl_row_stop_middle_update-slave.opt b/mysql-test/t/rpl_row_stop_middle_update-slave.opt deleted file mode 100644 index ea49a27adf4..00000000000 --- a/mysql-test/t/rpl_row_stop_middle_update-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-debug=d,STOP_SLAVE_after_first_Rows_event diff --git a/mysql-test/t/rpl_row_stop_middle_update.test b/mysql-test/t/rpl_row_stop_middle_update.test deleted file mode 100644 index 29b3008e822..00000000000 --- a/mysql-test/t/rpl_row_stop_middle_update.test +++ /dev/null @@ -1,31 +0,0 @@ --- source include/have_binlog_format_row.inc --- source include/have_debug.inc --- source include/master-slave.inc - -# master is asked to create small Rows events: if only one event is -# created, stopping slave at the end of that one will show no bug, we -# need at least two (and stop after first); in this test we use three. - -connection master; -create table t1 (words varchar(20)) engine=myisam; - -load data infile '../std_data_ln/words.dat' into table t1 (words); -select count(*) from t1; -save_master_pos; - -connection slave; - -# slave will automatically tell itself to stop thanks to the .opt -# file; it will initiate the stop request after the first -# Rows_log_event (out of 3) but should wait until the last one is -# executed before stopping. - -wait_for_slave_to_stop; - -# check that we inserted all rows (waited until the last Rows event) -select count(*) from t1; - -connection master; -drop table t1; -connection slave; # slave SQL thread is stopped -drop table t1; diff --git a/mysql-test/t/rpl_row_tabledefs_2myisam.test b/mysql-test/t/rpl_row_tabledefs_2myisam.test deleted file mode 100644 index ab4914e15fa..00000000000 --- a/mysql-test/t/rpl_row_tabledefs_2myisam.test +++ /dev/null @@ -1,8 +0,0 @@ - --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -let $engine_type = 'MyISAM'; --- source extra/rpl_tests/rpl_row_tabledefs.test - - diff --git a/mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt b/mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_row_tabledefs_3innodb.test b/mysql-test/t/rpl_row_tabledefs_3innodb.test deleted file mode 100644 index 7824fbfb663..00000000000 --- a/mysql-test/t/rpl_row_tabledefs_3innodb.test +++ /dev/null @@ -1,9 +0,0 @@ - --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc --- source include/master-slave.inc - -let $engine_type = 'InnoDB'; --- source extra/rpl_tests/rpl_row_tabledefs.test - - diff --git a/mysql-test/t/rpl_row_trig001.test b/mysql-test/t/rpl_row_trig001.test deleted file mode 100644 index 7b1fca2d6a1..00000000000 --- a/mysql-test/t/rpl_row_trig001.test +++ /dev/null @@ -1,100 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/09/2005 # -############################################################################# -# TEST: Use after insert and before inset triggers and stored procdures to # -# Update and insert data # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - --- disable_query_log --- disable_result_log - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p2; -DROP PROCEDURE IF EXISTS test.p3; ---error 0,1360 -DROP TRIGGER test.t2_ai; ---error 0,1360 -DROP TRIGGER test.t3_bi_t2; ---error 0,1360 -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; - - -# test section 1, lets add a trigger to the mix. Taken from bug #12280 -let $message=; ---source include/show_msg.inc - -CREATE TABLE test.t1 (n MEDIUMINT NOT NULL, d DATETIME, PRIMARY KEY(n)); -CREATE TABLE test.t2 (n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); -CREATE TABLE test.t3 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d DATETIME, PRIMARY KEY(n)); - -INSERT INTO test.t1 VALUES (1,NOW()); - -delimiter //; -CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t1 SET d=NOW() where n = 1;// -CREATE PROCEDURE test.p3() -BEGIN - INSERT INTO test.t3 (d) VALUES (NOW()); -END// -CREATE TRIGGER test.t3_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW CALL test.p3()// -CREATE PROCEDURE test.p2() -BEGIN - INSERT INTO test.t2 (f,d) VALUES (RAND(),NOW()); -END// -delimiter ;// - --- disable_query_log --- disable_result_log -let $1=10; -while ($1) -{ - CALL test.p2(); - sleep 1; - dec $1; -} --- enable_result_log --- enable_query_log - -#show binlog events; -#select * from test.t2; -#select * from test.t3; -#connection slave; -#select * from test.t2; -#select * from test.t3; - -let $message=; ---source include/show_msg.inc - -# time to dump the databases and so we can see if they match - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trig001_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trig001_slave.sql - -# Cleanup -connection master; -DROP PROCEDURE test.p2; -DROP PROCEDURE test.p3; -DROP TRIGGER test.t2_ai; -DROP TRIGGER test.t3_bi_t2; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -sync_slave_with_master; - -# Lets compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching :-) Failed tests -# will leave dump files in $MYSQLTEST_VARDIR/tmp - -diff_files $MYSQLTEST_VARDIR/tmp/trig001_master.sql $MYSQLTEST_VARDIR/tmp/trig001_slave.sql; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_trig002.test b/mysql-test/t/rpl_row_trig002.test deleted file mode 100644 index 7ca8a68f060..00000000000 --- a/mysql-test/t/rpl_row_trig002.test +++ /dev/null @@ -1,80 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/14/2005 # -# Updated: 08/29/2005 added save master pos and sync with master # -############################################################################# -# TEST: Taken and modified from BUG#12048 After Insert updates replication # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -#-- disable_query_log -#-- disable_result_log - -# Begin clean up test section -connection master; ---disable_warnings ---error 0,1360 -DROP TRIGGER test.t2_ai; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; ---enable_warnings - -# test section 1, Taken from bug #12408 - -CREATE TABLE test.t2 (value CHAR(30),domain_id INT, mailaccount_id INT, program CHAR(30),keey CHAR(30),PRIMARY KEY(domain_id)); - -CREATE TABLE test.t3 (value CHAR(30),domain_id INT, mailaccount_id INT, program CHAR(30),keey CHAR(30),PRIMARY KEY(domain_id)); - -CREATE TABLE test.t1 (id INT,domain CHAR(30),PRIMARY KEY(id)); - -delimiter |; -CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW UPDATE test.t3 ms, test.t1 d SET ms.value='No' WHERE ms.domain_id = (SELECT max(id) FROM test.t1 WHERE domain='example.com') AND ms.mailaccount_id IS NULL AND ms.program='spamfilter' AND ms.keey='scan_incoming'| -delimiter ;| - -INSERT INTO test.t1 VALUES (1, 'example.com'),(2, 'mysql.com'),(3, 'earthmotherwear.com'), (4, 'yahoo.com'),(5, 'example.com'); - -SELECT * FROM test.t1 ORDER BY id; -#show binlog events; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t1 ORDER BY id; -connection master; - -INSERT INTO test.t3 VALUES ('Yes', 5, NULL, 'spamfilter','scan_incoming'); -INSERT INTO test.t3 VALUES ('Yes', 1, NULL, 'spamfilter','scan_incoming'); -INSERT INTO test.t2 VALUES ('Yes', 1, NULL, 'spamfilter','scan_incoming'); - -select * from test.t2; -select * from test.t3; -save_master_pos; -connection slave; -sync_with_master; -select * from test.t2; -select * from test.t3; -connection master; - -DELETE FROM test.t1 WHERE id = 1; - -SELECT * FROM test.t1 ORDER BY id; -connection master; -SELECT * FROM test.t1 ORDER BY id; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t1 ORDER BY id; - -# Cleanup -connection master; -#show binlog events; -DROP TRIGGER test.t2_ai; -DROP TABLE test.t1; -DROP TABLE test.t2; -DROP TABLE test.t3; -sync_slave_with_master; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_trig003.test b/mysql-test/t/rpl_row_trig003.test deleted file mode 100644 index 4a1bbc5ca89..00000000000 --- a/mysql-test/t/rpl_row_trig003.test +++ /dev/null @@ -1,152 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/16/2005 # -# Updated: 8/29/2005 Remove sleep calls add dump and diff # -############################################################################# -# TEST: This test includes all trigger types. BEFORE/AFTER INSERT, UPDATE & # -# DELETE. In addition, includes cursor, bit, varchar, flow control, # -# looping, ROUND(), NOW(), YEAR(), TIMESTAMP # -############################################################################# - -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -#-- disable_query_log -#-- disable_result_log - -# Begin clean up test section -connection master; ---disable_warnings ---error 0,1360 -DROP TRIGGER test.t1_bi; ---error 0,1360 -DROP TRIGGER test.t2_ai; ---error 0,1360 -DROP TRIGGER test.t1_bu; ---error 0,1360 -DROP TRIGGER test.t2_au; ---error 0,1360 -DROP TRIGGER test.t1_bd; ---error 0,1360 -DROP TRIGGER test.t2_ad; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; ---enable_warnings - -# test section 1 - -CREATE TABLE test.t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); -CREATE TABLE test.t2 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); -CREATE TABLE test.t3 (id MEDIUMINT NOT NULL AUTO_INCREMENT, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t TIMESTAMP,PRIMARY KEY(id)); - -# Note Most of these cause the slave to core or do not produce desired results. Currently commenting out the ones not working until they are fixed. - -delimiter |; -CREATE TRIGGER test.t1_bi BEFORE INSERT ON test.t1 FOR EACH ROW UPDATE test.t3 SET b1=1 and y=YEAR(NOW())| -CREATE TRIGGER test.t2_ai AFTER INSERT ON test.t2 FOR EACH ROW BEGIN - INSERT INTO test.t3 VALUES(NULL,0,'MySQL Replication team rocks!', 'Dark beer in prague is #1',12345.34,12.51,0,1965,NOW()); - UPDATE test.t3 SET f = ROUND(f); -END| -CREATE TRIGGER test.t1_bu BEFORE UPDATE on test.t1 FOR EACH ROW BEGIN - UPDATE test.t3 SET y = '2000'; - INSERT INTO test.t3 VALUES(NULL,1,'Testing MySQL databases before update ', 'Insert should work',621.43, 0105.21,0,1974,NOW()); -END| -CREATE TRIGGER test.t2_au AFTER UPDATE on test.t2 FOR EACH ROW BEGIN - DECLARE done INT DEFAULT 0; - DECLARE a DECIMAL(10,4); - DECLARE b FLOAT; - DECLARE num MEDIUMINT; - DECLARE cur1 CURSOR FOR SELECT t2.id, t2.d, t2.f FROM test.t2; - DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; - - OPEN cur1; - - REPEAT - FETCH cur1 INTO num, a, b; - IF NOT done THEN - UPDATE test.t3 SET total =(a*b) WHERE ID = num; - END IF; - UNTIL done END REPEAT; - CLOSE cur1; -END| -CREATE TRIGGER test.t1_bd BEFORE DELETE on test.t1 FOR EACH ROW BEGIN - DECLARE done INT DEFAULT 0; - DECLARE a BIT(8); - DECLARE b VARCHAR(255); - DECLARE c CHAR(255); - DECLARE d DECIMAL(10,4); - DECLARE e FLOAT; - DECLARE f BIGINT UNSIGNED; - DECLARE g YEAR; - DECLARE h TIMESTAMP; - DECLARE cur1 CURSOR FOR SELECT t1.b1, t1.vc, t1.bc, t1.d, t1.f, t1.total, t1.y, t1.t FROM test.t1; - DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; - - OPEN cur1; - - REPEAT - FETCH cur1 INTO a, b, c, d, e, f, g, h; - IF NOT done THEN - INSERT INTO test.t3 VALUES(NULL, a, b, c, d, e, f, g, h); - END IF; - UNTIL done END REPEAT; - CLOSE cur1; -END| -CREATE TRIGGER test.t2_ad AFTER DELETE ON test.t2 FOR EACH ROW - DELETE FROM test.t1| -delimiter ;| - -INSERT INTO test.t1 VALUES(NULL,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer',654321.4321,15.21,0,1965,NOW()); -INSERT INTO test.t2 VALUES(NULL,0,'Testing MySQL databases is a cool ', 'MySQL Customers ROCK!',654321.4321,1.24521,0,YEAR(NOW()),NOW()); - -UPDATE test.t1 SET b1 = 0 WHERE b1 = 1; - -INSERT INTO test.t2 VALUES(NULL,1,'This is an after update test.', 'If this works, total will not be zero on the master or slave',1.4321,5.221,0,YEAR(NOW()),NOW()); -UPDATE test.t2 SET b1 = 0 WHERE b1 = 1; - -INSERT INTO test.t1 VALUES(NULL,1,'add some more test data test.', 'and hope for the best', 3.321,5.221,0,YEAR(NOW()),NOW()); - -# To make sure BUG#14698 is gone, we sleep 2 seconds before calling trigger -# (with the bug in, that caused differences in TIMESTAMP columns). -# We just need to let the machine's clock advance, it's not -# to do synchronization, so real_sleep is good. -real_sleep 2; - -DELETE FROM test.t1 WHERE id = 1; - -DELETE FROM test.t2 WHERE id = 1; - -save_master_pos; -connection slave; -sync_with_master; -connection master; - -# time to dump the databases and so we can see if they match - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trg003_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/trg003_slave.sql - -# cleanup ---disable_warnings ---error 0,1360 -DROP TRIGGER test.t1_bi; ---error 0,1360 -DROP TRIGGER test.t2_ai; ---error 0,1360 -DROP TRIGGER test.t1_bu; ---error 0,1360 -DROP TRIGGER test.t2_au; ---error 0,1360 -DROP TRIGGER test.t1_bd; ---error 0,1360 -DROP TRIGGER test.t2_ad; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; ---enable_warnings - -diff_files $MYSQLTEST_VARDIR/tmp/trg003_master.sql $MYSQLTEST_VARDIR/tmp/trg003_slave.sql; - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_row_trig004.test b/mysql-test/t/rpl_row_trig004.test deleted file mode 100644 index a918c602d56..00000000000 --- a/mysql-test/t/rpl_row_trig004.test +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Oct/18/2005 # -############################################################################# -# TEST: Use before insert triggers and has the second insert fail # -############################################################################# -# Change by JBM 2006-02-14 added to skip when NDB default engine # -# This test has been wrapped to allow multipal engines to use same code # -############################################################################# - -# Includes --- source include/not_ndb_default.inc --- source include/have_binlog_format_row.inc --- source include/have_innodb.inc --- source include/master-slave.inc -let $engine_type=INNODB; --- source extra/rpl_tests/rpl_trig004.test - diff --git a/mysql-test/t/rpl_row_until.test b/mysql-test/t/rpl_row_until.test deleted file mode 100644 index f1d21e65a4c..00000000000 --- a/mysql-test/t/rpl_row_until.test +++ /dev/null @@ -1,87 +0,0 @@ --- source include/not_ndb_default.inc --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# Test is dependent on binlog positions - -# prepare version for substitutions -let $VERSION=`select version()`; - -# stop slave before he will start replication also sync with master -# for avoiding undetermenistic behaviour -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -connection master; -# create some events on master -create table t1(n int not null auto_increment primary key); -insert into t1 values (1),(2),(3),(4); -drop table t1; -create table t2(n int not null auto_increment primary key); -insert into t2 values (1),(2); -insert into t2 values (3),(4); -drop table t2; - -# try to replicate all queries until drop of t1 -connection slave; -start slave until master_log_file='master-bin.000001', master_log_pos=311; -sleep 2; -wait_for_slave_to_stop; -# here table should be still not deleted -select * from t1; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS; - -# this should fail right after start -start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; -# again this table should be still not deleted -select * from t1; -sleep 2; -wait_for_slave_to_stop; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS; - -# try replicate all up to and not including the second insert to t2; -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; -sleep 2; -wait_for_slave_to_stop; -select * from t2; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS; - -# clean up -start slave; -connection master; -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -# this should stop immediately as we are already there -start slave until master_log_file='master-bin.000001', master_log_pos=740; -sleep 2; -wait_for_slave_to_stop; -# here the sql slave thread should be stopped ---replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 ---replace_column 1 # 9 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS; - -#testing various error conditions ---error 1277 -start slave until master_log_file='master-bin', master_log_pos=561; ---error 1277 -start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; ---error 1277 -start slave until master_log_file='master-bin.000001'; ---error 1277 -start slave until relay_log_file='slave-relay-bin.000002'; ---error 1277 -start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; -# Warning should be given for second command -start slave sql_thread; -start slave until master_log_file='master-bin.000001', master_log_pos=740; diff --git a/mysql-test/t/rpl_row_view01.test b/mysql-test/t/rpl_row_view01.test deleted file mode 100644 index 634e3c30cc6..00000000000 --- a/mysql-test/t/rpl_row_view01.test +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/19/2005 # -# Updated: 08/29/2005 Remove sleeps # -############################################################################# -#TEST: row based replication of views # -############################################################################# -# 2006-02-08 By JBM added order by and sleep for use with ndb engine -############################################################################# -# Includes --- source include/have_binlog_format_row.inc --- source include/master-slave.inc - -# Begin clean up test section -connection master; ---disable_warnings -create database if not exists mysqltest1; -DROP VIEW IF EXISTS mysqltest1.v1; -DROP VIEW IF EXISTS mysqltest1.v2; -DROP VIEW IF EXISTS mysqltest1.v3; -DROP VIEW IF EXISTS mysqltest1.v4; -DROP TABLE IF EXISTS mysqltest1.t3; -DROP TABLE IF EXISTS mysqltest1.t1; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t4; - -# Begin test section 1 -CREATE TABLE mysqltest1.t1 (a INT, c CHAR(6),PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t2 (a INT, c CHAR(6),PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t3 (a INT, c CHAR(6), c2 CHAR(6), PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t4 (a INT, qty INT, price INT,PRIMARY KEY(a)); -CREATE TABLE mysqltest1.t5 (qty INT, price INT, total INT, PRIMARY KEY(qty)); -INSERT INTO mysqltest1.t1 VALUES (1,'Thank'),(2,'it'),(3,'Friday'); -INSERT INTO mysqltest1.t2 VALUES (1,'GOD'),(2,'is'),(3,'TGIF'); -INSERT INTO mysqltest1.t4 VALUES(1, 3, 50),(2, 18, 3),(4, 4, 4); - - -CREATE VIEW mysqltest1.v2 AS SELECT qty, price, qty*price AS value FROM mysqltest1.t4 ORDER BY qty; -CREATE VIEW mysqltest1.v1 AS SELECT t1.a, t1.c, t2.c as c2 FROM mysqltest1.t1 as t1, mysqltest1.t2 AS t2 WHERE mysqltest1.t1.a = mysqltest1.t2.a ORDER BY a; -CREATE VIEW mysqltest1.v3 AS SELECT * FROM mysqltest1.t1; -CREATE VIEW mysqltest1.v4 AS SELECT * FROM mysqltest1.v3 WHERE a > 1 WITH LOCAL CHECK OPTION; - - -SELECT * FROM mysqltest1.v2; -SELECT * FROM mysqltest1.v1; -# Had to add a sleep for use with NDB -# engine. Injector thread would have not -# populated biblog and data would not be on -# the slave. -sleep 10; -sync_slave_with_master; -SELECT * FROM mysqltest1.v2; -SELECT * FROM mysqltest1.v1; -connection master; - -INSERT INTO mysqltest1.t5 SELECT * FROM mysqltest1.v2; -INSERT INTO mysqltest1.t3 SELECT * FROM mysqltest1.v1; - -SELECT * FROM mysqltest1.t5 ORDER BY qty; -SELECT * FROM mysqltest1.t3 ORDER BY a; -sync_slave_with_master; -SELECT * FROM mysqltest1.t5 ORDER BY qty; -SELECT * FROM mysqltest1.t3 ORDER BY a; -connection master; - -INSERT INTO mysqltest1.v4 VALUES (4,'TEST'); - -SELECT * FROM mysqltest1.t1 ORDER BY a; -SELECT * FROM mysqltest1.v4 ORDER BY a; -sync_slave_with_master; -SELECT * FROM mysqltest1.t1 ORDER BY a; -SELECT * FROM mysqltest1.v4 ORDER BY a; - -connection master; - -# lets cleanup -DROP VIEW IF EXISTS mysqltest1.v1; -DROP VIEW IF EXISTS mysqltest1.v2; -DROP VIEW IF EXISTS mysqltest1.v3; -DROP VIEW IF EXISTS mysqltest1.v4; -DROP TABLE IF EXISTS mysqltest1.t3; -DROP TABLE IF EXISTS mysqltest1.t1; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t4; -DROP DATABASE mysqltest1; -sync_slave_with_master; - -# End of 5.1 test case - diff --git a/mysql-test/t/rpl_server_id1.test b/mysql-test/t/rpl_server_id1.test deleted file mode 100644 index 71310750b60..00000000000 --- a/mysql-test/t/rpl_server_id1.test +++ /dev/null @@ -1,26 +0,0 @@ -# This test checks that the slave I/O thread refuses to start if slave -# and master have the same server id (because this is a useless setup, -# and otherwise SHOW SLAVE STATUS shows progress but all queries are -# ignored, which has caught our customers), unless -# --replicate-same-server-id. - -source include/master-slave.inc; -connection slave; -create table t1 (n int); -reset master; -# replicate ourselves -stop slave; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_port=$SLAVE_MYPORT; ---replace_result $SLAVE_MYPORT SLAVE_PORT ---replace_column 16 # 18 # -show slave status; -start slave; -insert into t1 values (1); -# can't MASTER_POS_WAIT(), it does not work in this weird setup -# (when slave is its own master without --replicate-same-server-id) -sleep 2; # enough time for the event to be replicated (it should not) -show status like "slave_running"; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_server_id2-slave.opt b/mysql-test/t/rpl_server_id2-slave.opt deleted file mode 100644 index 302889525dd..00000000000 --- a/mysql-test/t/rpl_server_id2-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---disable-log-slave-updates --replicate-same-server-id diff --git a/mysql-test/t/rpl_server_id2.test b/mysql-test/t/rpl_server_id2.test deleted file mode 100644 index 0f2eb560d18..00000000000 --- a/mysql-test/t/rpl_server_id2.test +++ /dev/null @@ -1,26 +0,0 @@ -# This test checks that a slave DOES execute queries originating -# from itself, if running with --replicate-same-server-id. - -source include/master-slave.inc; -connection slave; -create table t1 (n int); -reset master; -# replicate ourselves -stop slave; ---replace_result $SLAVE_MYPORT SLAVE_PORT -eval change master to master_port=$SLAVE_MYPORT; ---replace_result $SLAVE_MYPORT SLAVE_PORT ---replace_column 18 # -show slave status; -start slave; -insert into t1 values (1); -save_master_pos; -sync_with_master; -select * from t1; # check that indeed 2 were inserted -# We stop the slave before cleaning up otherwise we'll get -# 'drop table t1' executed twice, so an error in the slave.err -# (not critical). -stop slave; -drop table t1; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_session_var.test b/mysql-test/t/rpl_session_var.test deleted file mode 100644 index a6f4b496a23..00000000000 --- a/mysql-test/t/rpl_session_var.test +++ /dev/null @@ -1,42 +0,0 @@ -# Replication of session variables. -# FOREIGN_KEY_CHECKS is tested in rpl_insert_id.test - -source include/master-slave.inc; -drop table if exists t1; -create table t1(a varchar(100),b int); -set @@session.sql_mode=pipes_as_concat; -insert into t1 values('My'||'SQL', 1); -set @@session.sql_mode=default; -insert into t1 values('1'||'2', 2); -select * from t1 where b<3 order by a; -save_master_pos; -connection slave; -sync_with_master; -select * from t1 where b<3 order by a; -connection master; -# if the slave does the next sync_with_master fine, then it means it accepts the -# two lines of ANSI syntax below, which is what we want to check. -set @@session.sql_mode=ignore_space; -insert into t1 values(password ('MySQL'), 3); -set @@session.sql_mode=ansi_quotes; -create table "t2" ("a" int); -drop table t1, t2; -set @@session.sql_mode=default; -create table t1(a int auto_increment primary key); -create table t2(b int, a int); -set @@session.sql_auto_is_null=1; -insert into t1 values(null); -insert into t2 select 1,a from t1 where a is null; -set @@session.sql_auto_is_null=0; -insert into t1 values(null); -insert into t2 select 2,a from t1 where a is null; -select * from t2 order by b; -save_master_pos; -connection slave; -sync_with_master; -select * from t2 order by b; -connection master; -drop table t1,t2; -save_master_pos; -connection slave; -sync_with_master; diff --git a/mysql-test/t/rpl_set_charset.test b/mysql-test/t/rpl_set_charset.test deleted file mode 100644 index c70eb2681f5..00000000000 --- a/mysql-test/t/rpl_set_charset.test +++ /dev/null @@ -1,35 +0,0 @@ -source include/master-slave.inc; ---disable_warnings -drop database if exists mysqltest1; -# 4.1 bases its conversion on the db's charset, -# while 4.0 uses the part of "SET CHARACTER SET" after "_". -# So for 4.1 we add a clause to CREATE DATABASE. -create database mysqltest1 /*!40100 character set latin2 */; -use mysqltest1; -drop table if exists t1; ---enable_warnings -create table t1 (a varchar(255) character set latin2, b varchar(4)); -SET CHARACTER SET cp1250_latin2; -INSERT INTO t1 VALUES ('ŠŒŽ','80'); -INSERT INTO t1 VALUES ('šœžŸ','90'); -INSERT INTO t1 VALUES ('£¥ª¯','A0'); -INSERT INTO t1 VALUES ('³¹º¼¾¿','B0'); -INSERT INTO t1 VALUES ('ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ','C0'); -INSERT INTO t1 VALUES ('ÐÑÒÓÔÕÖרÙÚÛÜÝÞß','D0'); -INSERT INTO t1 VALUES ('àáâãäåæçèéêëìíîï','E0'); -INSERT INTO t1 VALUES ('ðñòóôõö÷øùúûüýþÿ','F0'); -select "--- on master ---"; -select hex(a),b from t1 order by b; -save_master_pos; -connection slave; -sync_with_master; -use mysqltest1; -select "--- on slave ---"; -select hex(a),b from t1 order by b; -connection master; -drop database mysqltest1; -save_master_pos; -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_sf.test b/mysql-test/t/rpl_sf.test deleted file mode 100644 index ecf91a723fa..00000000000 --- a/mysql-test/t/rpl_sf.test +++ /dev/null @@ -1,70 +0,0 @@ --- source include/have_log_bin.inc - -# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR - -# save status - -let $oblf=`select @@SESSION.BINLOG_FORMAT`; -let $otfc=`select @@log_bin_trust_function_creators`; - -set global log_bin_trust_function_creators=0; - - - -# fail *on definition* - -set binlog_format=STATEMENT; - -delimiter |; ---error ER_BINLOG_UNSAFE_ROUTINE -create function fn16456() - returns int -begin - return unix_timestamp(); -end| -delimiter ;| - - - -# force in definition, so we can see whether we fail on call - -set global log_bin_trust_function_creators=1; - -delimiter |; -create function fn16456() - returns int -begin - return unix_timestamp(); -end| -delimiter ;| - -set global log_bin_trust_function_creators=0; - - - -# allow funcall in RBR - -set binlog_format=ROW; - ---replace_column 1 timestamp -select fn16456(); - - - -# fail funcall in SBR - -set binlog_format=STATEMENT; - ---error ER_BINLOG_ROW_RBR_TO_SBR -select fn16456(); - - - -# restore status - -drop function fn16456; - ---disable_query_log -eval set binlog_format=$oblf; -eval set global log_bin_trust_function_creators=$otfc; ---enable_query_log diff --git a/mysql-test/t/rpl_skip_error-slave.opt b/mysql-test/t/rpl_skip_error-slave.opt deleted file mode 100644 index 982362d93a5..00000000000 --- a/mysql-test/t/rpl_skip_error-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---slave-skip-error=1053,1582 diff --git a/mysql-test/t/rpl_skip_error.test b/mysql-test/t/rpl_skip_error.test deleted file mode 100644 index ff81e2f010e..00000000000 --- a/mysql-test/t/rpl_skip_error.test +++ /dev/null @@ -1,29 +0,0 @@ -########################################## -# 2006-02-07 By JBM: Added order by -######################################### -# Note that errors are ignored by opt file. -source include/master-slave.inc; - -create table t1 (n int not null primary key); -save_master_pos; -connection slave; -sync_with_master; -insert into t1 values (1); -connection master; -# Here we expect (ignored) error, since 1 is already in slave table -insert into t1 values (1); - -# These should work fine -insert into t1 values (2),(3); - -save_master_pos; -connection slave; -sync_with_master; -select * from t1 ORDER BY n; - -# Cleanup -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_slave_status.test b/mysql-test/t/rpl_slave_status.test deleted file mode 100644 index 32320a50656..00000000000 --- a/mysql-test/t/rpl_slave_status.test +++ /dev/null @@ -1,58 +0,0 @@ ---source include/master-slave.inc - -############################################################################ -# Test case for BUG#10780 -# -# REQUIREMENT -# A slave without replication privileges should have Slave_IO_Running = No - -# 1. Create new replication user -connection master; -grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; - -connection slave; -stop slave; -change master to master_user='rpl',master_password='rpl'; -start slave; - -# 2. Do replication as new user -connection master; ---disable_warnings -drop table if exists t1; ---enable_warnings -create table t1 (n int); -insert into t1 values (1); -save_master_pos; -connection slave; -sync_with_master; -select * from t1; - -# 3. Delete new replication user -connection master; -delete from mysql.user where user='rpl'; -flush privileges; -connection slave; - -# 4. Restart slave without privileges -# (slave.err will contain access denied error for this START SLAVE command) -stop slave; -start slave; - -# 5. Make sure Slave_IO_Running = No ---replace_result $MASTER_MYPORT MASTER_MYPORT -# Column 1 is replaced, since the output can be either -# "Connecting to master" or "Waiting for master update" ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # ---vertical_results -show slave status; - -# Cleanup (Note that slave IO thread is not running) -connection slave; -drop table t1; -delete from mysql.user where user='rpl'; -connection master; -drop table t1; - -# end of test case for BUG#10780 - -# end of 4.1 tests diff --git a/mysql-test/t/rpl_sp-master.opt b/mysql-test/t/rpl_sp-master.opt deleted file mode 100644 index 709a224fd92..00000000000 --- a/mysql-test/t/rpl_sp-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log_bin_trust_routine_creators=0 diff --git a/mysql-test/t/rpl_sp-slave.opt b/mysql-test/t/rpl_sp-slave.opt deleted file mode 100644 index 709a224fd92..00000000000 --- a/mysql-test/t/rpl_sp-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---log_bin_trust_routine_creators=0 diff --git a/mysql-test/t/rpl_sp.test b/mysql-test/t/rpl_sp.test deleted file mode 100644 index f363b64558a..00000000000 --- a/mysql-test/t/rpl_sp.test +++ /dev/null @@ -1,585 +0,0 @@ -# row-based and statement have expected binlog difference in result files - -# Test of replication of stored procedures (WL#2146 for MySQL 5.0) -# Modified by WL#2971. - -# Note that in the .opt files we still use the old variable name -# log-bin-trust-routine-creators so that this test checks that it's -# still accepted (this test also checks that the new name is -# accepted). The old name could be removed in 5.1 or 6.0. - -source include/have_binlog_format_mixed.inc; -source include/master-slave.inc; - -# we need a db != test, where we don't have automatic grants ---disable_warnings -drop database if exists mysqltest1; ---enable_warnings -create database mysqltest1; -use mysqltest1; -create table t1 (a varchar(100)); -sync_slave_with_master; -use mysqltest1; - -# ********************** PART 1 : STORED PROCEDURES *************** - -# Does the same proc as on master get inserted into mysql.proc ? -# (same definer, same properties...) - -connection master; - -delimiter |; - -# Stored procedures don't have the limitations that functions have -# regarding binlogging: it's ok to create a procedure as not -# deterministic and updating data, while it's not ok to create such a -# function. We test this. - -create procedure foo() -begin - declare b int; - set b = 8; - insert into t1 values (b); - insert into t1 values (unix_timestamp()); -end| -delimiter ;| - -# we replace columns having times -# (even with fixed timestamp displayed time may changed based on TZ) ---replace_result localhost.localdomain localhost 127.0.0.1 localhost ---replace_column 13 # 14 # -select * from mysql.proc where name='foo' and db='mysqltest1'; -sync_slave_with_master; -# You will notice in the result that the definer does not match what -# it is on master, it is a known bug on which Alik is working ---replace_result localhost.localdomain localhost 127.0.0.1 localhost ---replace_column 13 # 14 # -select * from mysql.proc where name='foo' and db='mysqltest1'; - -connection master; -# see if timestamp used in SP on slave is same as on master -set timestamp=1000000000; -call foo(); -select * from t1; -sync_slave_with_master; -select * from t1; - -# Now a SP which is not updating tables - -connection master; -delete from t1; -create procedure foo2() - select * from mysqltest1.t1; -call foo2(); - -# check that this is allowed (it's not for functions): -alter procedure foo2 contains sql; - -# SP with definer's right - -drop table t1; -create table t1 (a int); -create table t2 like t1; - -create procedure foo3() - deterministic - insert into t1 values (15); - -# let's create a non-privileged user -grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1; -grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1; -grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; - -# ToDo: BUG#14931: There is a race between the last grant binlogging, and -# the binlogging in the new connection made below, causing sporadic test -# failures due to switched statement order in binlog. To fix this we do -# SELECT 1 in the first connection before starting the second, ensuring -# that binlogging is done in the expected order. -# Please remove this SELECT 1 when BUG#14931 is fixed. -SELECT 1; - -connect (con1,127.0.0.1,zedjzlcsjhd,,mysqltest1,$MASTER_MYPORT,); -connection con1; - -# this routine will fail in the second INSERT because of privileges -delimiter |; -create procedure foo4() - deterministic - begin - insert into t2 values(3); - insert into t1 values (5); - end| - -delimiter ;| - -# I add ,0 so that it does not print the error in the test output, -# because this error is hostname-dependent ---error 1142,0 -call foo4(); # invoker has no INSERT grant on table t1 => failure - -connection master; -call foo3(); # success (definer == root) -show warnings; - ---error 1142,0 -call foo4(); # definer's rights => failure - -# we test replication of ALTER PROCEDURE -alter procedure foo4 sql security invoker; -call foo4(); # invoker's rights => success -show warnings; - -# Note that half-failed procedure calls are ok with binlogging; -# if we compare t2 on master and slave we see they are identical: - -select * from t1; -select * from t2; -sync_slave_with_master; -select * from t1; -select * from t2; - -# Let's check another failing-in-the-middle procedure -connection master; -delete from t2; -alter table t2 add unique (a); - -drop procedure foo4; -delimiter |; -create procedure foo4() - deterministic - begin - insert into t2 values(20),(20); - end| - -delimiter ;| - ---error ER_DUP_ENTRY -call foo4(); -show warnings; - -select * from t2; -sync_slave_with_master; -# check that this failed-in-the-middle replicated right: -select * from t2; - -# Test of DROP PROCEDURE - ---replace_result localhost.localdomain localhost 127.0.0.1 localhost ---replace_column 13 # 14 # -select * from mysql.proc where name="foo4" and db='mysqltest1'; -connection master; -drop procedure foo4; -select * from mysql.proc where name="foo4" and db='mysqltest1'; -sync_slave_with_master; -select * from mysql.proc where name="foo4" and db='mysqltest1'; - -# ********************** PART 2 : FUNCTIONS *************** - -connection master; -drop procedure foo; -drop procedure foo2; -drop procedure foo3; - -delimiter |; -# check that needs "deterministic" ---error 1418 -create function fn1(x int) - returns int -begin - insert into t1 values (x); - return x+2; -end| -create function fn1(x int) - returns int - deterministic -begin - insert into t1 values (x); - return x+2; -end| - -delimiter ;| -delete t1,t2 from t1,t2; -select fn1(20); -insert into t2 values(fn1(21)); -select * from t1; -select * from t2; -sync_slave_with_master; -select * from t1; -select * from t2; - -connection master; -delimiter |; - -drop function fn1; - -create function fn1() - returns int - no sql -begin - return unix_timestamp(); -end| - -delimiter ;| -# check that needs "deterministic" ---error 1418 -alter function fn1 contains sql; - -delete from t1; -set timestamp=1000000000; -insert into t1 values(fn1()); - -connection con1; - -delimiter |; ---error 1419 # only full-global-privs user can create a function -create function fn2() - returns int - no sql -begin - return unix_timestamp(); -end| -delimiter ;| -connection master; -# test old variable name: -set global log_bin_trust_routine_creators=1; -# now use new name: -set global log_bin_trust_function_creators=0; -set global log_bin_trust_function_creators=1; -# slave needs it too otherwise will not execute what master allowed: -connection slave; -set global log_bin_trust_function_creators=1; - -connection con1; - -delimiter |; -create function fn2() - returns int - no sql -begin - return unix_timestamp(); -end| -delimiter ;| - -connection master; - -# Now a function which is supposed to not update tables -# as it's "reads sql data", so should not give error even if -# non-deterministic. - -delimiter |; -create function fn3() - returns int - not deterministic - reads sql data -begin - return 0; -end| -delimiter ;| - -select fn3(); ---replace_result localhost.localdomain localhost 127.0.0.1 localhost ---replace_column 13 # 14 # -select * from mysql.proc where db='mysqltest1'; -select * from t1; - -sync_slave_with_master; -use mysqltest1; -select * from t1; ---replace_result localhost.localdomain localhost 127.0.0.1 localhost ---replace_column 13 # 14 # -select * from mysql.proc where db='mysqltest1'; - -# Let's check a failing-in-the-middle function -connection master; -delete from t2; -alter table t2 add unique (a); - -drop function fn1; - -delimiter |; -create function fn1(x int) - returns int -begin - insert into t2 values(x),(x); - return 10; -end| - -delimiter ;| - -do fn1(100); - ---error ER_DUP_ENTRY -select fn1(20); - -select * from t2; -sync_slave_with_master; - -# check that this failed-in-the-middle replicated right: -select * from t2; - -# ********************** PART 3 : TRIGGERS *************** - -connection con1; -# now fails due to missing trigger grant (err 1142 i/o 1227) due to new -# check in sql_trigger.cc (v1.44) by anozdrin on 2006/02/01 --azundris ---error ER_TABLEACCESS_DENIED_ERROR -create trigger trg before insert on t1 for each row set new.a= 10; - -connection master; -delete from t1; -# TODO: when triggers can contain an update, test that this update -# does not go into binlog. -# I'm not setting user vars in the trigger, because replication of user vars -# would take care of propagating the user var's value to slave, so even if -# the trigger was not executed on slave it would not be discovered. -create trigger trg before insert on t1 for each row set new.a= 10; -insert into t1 values (1); -select * from t1; -sync_slave_with_master; -select * from t1; - -connection master; -delete from t1; -drop trigger trg; -insert into t1 values (1); -select * from t1; -sync_slave_with_master; -select * from t1; - - -# ********************** PART 4 : RELATED FIXED BUGS *************** - - -# -# Test for bug #13969 "Routines which are replicated from master can't be -# executed on slave". -# -connection master; -create procedure foo() - not deterministic - reads sql data - select * from t1; -sync_slave_with_master; -# This should not fail -call foo(); -connection master; -drop procedure foo; -sync_slave_with_master; - - -# Clean up -connection master; -drop function fn1; -drop database mysqltest1; -drop user "zedjzlcsjhd"@127.0.0.1; -use test; -sync_slave_with_master; -use test; - -# -# Bug#14077 "Failure to replicate a stored function with a cursor": -# verify that stored routines with cursors work on slave. -# -connection master; ---disable_warnings -drop function if exists f1; ---enable_warnings -delimiter |; -create function f1() returns int reads sql data -begin - declare var integer; - declare c cursor for select a from v1; - open c; - fetch c into var; - close c; - return var; -end| -delimiter ;| -create view v1 as select 1 as a; -create table t1 (a int); -insert into t1 (a) values (f1()); -select * from t1; -drop view v1; -drop function f1; -sync_slave_with_master; -connection slave; -select * from t1; - -# -# Bug#16621 "INSERTs in Stored Procedures causes data corruption in the Binary -# Log for 5.0.18" -# - -# Prepare environment. - -connection master; - ---disable_warnings -DROP PROCEDURE IF EXISTS p1; -DROP TABLE IF EXISTS t1; ---enable_warnings - -# Test case. - -CREATE TABLE t1(col VARCHAR(10)); - -CREATE PROCEDURE p1(arg VARCHAR(10)) - INSERT INTO t1 VALUES(arg); - -CALL p1('test'); - -SELECT * FROM t1; - -sync_slave_with_master; -SELECT * FROM t1; - -# Cleanup -connection master; -DROP PROCEDURE p1; - - -# -# BUG#20438: CREATE statements for views, stored routines and triggers can be -# not replicable. -# - ---echo ---echo ---> Test for BUG#20438 - -# Prepare environment. - ---echo ---echo ---> Preparing environment... ---echo ---> connection: master ---connection master - ---disable_warnings -DROP PROCEDURE IF EXISTS p1; -DROP FUNCTION IF EXISTS f1; ---enable_warnings - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---echo ---> connection: master ---connection master - -# Test. - ---echo ---echo ---> Creating procedure... - -/*!50003 CREATE PROCEDURE p1() SET @a = 1 */; - -/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */; - ---echo ---echo ---> Checking on master... - -SHOW CREATE PROCEDURE p1; -SHOW CREATE FUNCTION f1; - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---> connection: master - ---echo ---echo ---> Checking on slave... - -SHOW CREATE PROCEDURE p1; -SHOW CREATE FUNCTION f1; - -# Cleanup. - ---echo ---echo ---> connection: master ---connection master - ---echo ---echo ---> Cleaning up... - -DROP PROCEDURE p1; -DROP FUNCTION f1; - ---save_master_pos ---connection slave ---sync_with_master ---connection master - - -# cleanup -connection master; -drop table t1; -sync_slave_with_master; - -# -# Bug22043: MySQL don't add "USE " before "DROP PROCEDURE IF EXISTS" -# - -connection master; ---disable_warnings -drop database if exists mysqltest; -drop database if exists mysqltest2; ---enable_warnings -create database mysqltest; -create database mysqltest2; -use mysqltest2; -create table t ( t integer ); -create procedure mysqltest.test() begin end; -insert into t values ( 1 ); ---error ER_BAD_DB_ERROR -create procedure `\\`.test() begin end; - -# -# BUG#19725: Calls to stored function in other database are not -# replicated correctly in some cases -# - -connection master; -delimiter |; -create function f1 () returns int -begin - insert into t values (1); - return 0; -end| -delimiter ;| -sync_slave_with_master; -# Let us test if we don't forget to binlog the function's database -connection master; -use mysqltest; -set @a:= mysqltest2.f1(); -sync_slave_with_master; -connection master; - - -# Final inspection which verifies how all statements of this test file -# were written to the binary log. ---replace_column 2 # 5 # ---replace_regex /table_id: [0-9]+/table_id: #/ -show binlog events in 'master-bin.000001' from 106; - - -# Restore log_bin_trust_function_creators to its original value. -# This is a cleanup for all parts above where we tested stored -# functions and triggers. -set global log_bin_trust_function_creators=0; -connection master; -set global log_bin_trust_function_creators=0; - -# Clean up -drop database mysqltest; -drop database mysqltest2; - ---echo End of 5.0 tests ---echo End of 5.1 tests - diff --git a/mysql-test/t/rpl_sp004.test b/mysql-test/t/rpl_sp004.test deleted file mode 100644 index 967e7007c15..00000000000 --- a/mysql-test/t/rpl_sp004.test +++ /dev/null @@ -1,97 +0,0 @@ -############################################################################# -# Original Author: JBM # -# Original Date: Aug/14/2005 # -############################################################################# -# Test: This test contains two sp that create and drop tables, insert and # -# updated data and uses the NOW() function. # -############################################################################# - - -# Includes --- source include/master-slave.inc - - -# Begin clean up test section -connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t3; ---enable_warnings -# End of cleanup - -# Begin test section 1 - -delimiter |; -CREATE PROCEDURE test.p1() -BEGIN - CREATE TABLE IF NOT EXISTS test.t1(a INT,PRIMARY KEY(a)); - CREATE TABLE IF NOT EXISTS test.t2(a INT,PRIMARY KEY(a)); - INSERT INTO test.t1 VALUES (4),(2),(1),(3); - UPDATE test.t1 SET a=a+4 WHERE a=4; - INSERT INTO test.t2 (a) SELECT t1.a FROM test.t1; - UPDATE test.t1 SET a=a+4 WHERE a=8; - CREATE TABLE IF NOT EXISTS test.t3(n MEDIUMINT NOT NULL AUTO_INCREMENT, f FLOAT, d DATETIME, PRIMARY KEY(n)); -END| -CREATE PROCEDURE test.p2() -BEGIN - DROP TABLE IF EXISTS test.t1; - DROP TABLE IF EXISTS test.t2; - INSERT INTO test.t3 VALUES(NULL,11111111.233333,NOW()); -END| -delimiter ;| - -CALL test.p1(); -SELECT * FROM test.t1 ORDER BY a; -SELECT * FROM test.t2 ORDER BY a; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t1 ORDER BY a; -SELECT * FROM test.t2 ORDER BY a; - -connection master; -CALL test.p2(); -USE test; -SHOW TABLES; -#SELECT * FROM test.t3; -save_master_pos; -connection slave; -sync_with_master; -USE test; -SHOW TABLES; -#SELECT * FROM test.t3; - -connection master; -CALL test.p1(); -SELECT * FROM test.t1 ORDER BY a; -SELECT * FROM test.t2 ORDER BY a; -#SELECT * FROM test.t3; -save_master_pos; -connection slave; -sync_with_master; -SELECT * FROM test.t1 ORDER BY a; -SELECT * FROM test.t2 ORDER BY a; -#SELECT * FROM test.t3; - ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp004_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp004_slave.sql - -# Cleanup -connection master; -#show binlog events; -DROP PROCEDURE IF EXISTS test.p1; -DROP PROCEDURE IF EXISTS test.p2; -DROP TABLE IF EXISTS test.t1; -DROP TABLE IF EXISTS test.t2; -DROP TABLE IF EXISTS test.t3; -sync_slave_with_master; - -# If the test fails, you will need to diff the dumps to see why. - -diff_files $MYSQLTEST_VARDIR/tmp/sp004_master.sql $MYSQLTEST_VARDIR/tmp/sp004_slave.sql; - - -# End of 5.0 test case diff --git a/mysql-test/t/rpl_sp_effects-master.opt b/mysql-test/t/rpl_sp_effects-master.opt deleted file mode 100644 index 61dd7a6ad0e..00000000000 --- a/mysql-test/t/rpl_sp_effects-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log_bin_trust_routine_creators=1 diff --git a/mysql-test/t/rpl_sp_effects-slave.opt b/mysql-test/t/rpl_sp_effects-slave.opt deleted file mode 100644 index 61dd7a6ad0e..00000000000 --- a/mysql-test/t/rpl_sp_effects-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---log_bin_trust_routine_creators=1 diff --git a/mysql-test/t/rpl_sp_effects.test b/mysql-test/t/rpl_sp_effects.test deleted file mode 100644 index 027bfd69f36..00000000000 --- a/mysql-test/t/rpl_sp_effects.test +++ /dev/null @@ -1,211 +0,0 @@ -########################################## -# Change Author: JBM -# Change Date: 2006-05-02 -# Change: Added Order By for NDB testing -########################################## - -# Test of replication of stored procedures (WL#2146 for MySQL 5.0) --- source include/master-slave.inc - -# **************************************************************** -connection master; - -# cleanup ---disable_warnings -drop procedure if exists p1; -drop procedure if exists p2; -drop function if exists f1; -drop table if exists t1,t2; -drop view if exists v1; ---enable_warnings -create table t1 (a int); - -SET GLOBAL log_bin_trust_function_creators = 1; - -# 1. Test simple variables use. -delimiter //; -create procedure p1() -begin - declare spv int default 0; - while spv < 5 do - insert into t1 values(spv+1); - set spv=spv+1; - end while; -end// -delimiter ;// - -call p1(); - -sync_slave_with_master; -connection slave; -SELECT * FROM t1 ORDER BY a; -connection master; -SELECT * FROM t1 ORDER BY a; - -# 2. Test SP variable name -delimiter //; -create procedure p2() -begin - declare a int default 4; - create table t2 as select a; -end// -delimiter ;// - -call p2(); -SELECT * FROM t2 ORDER BY a; -sync_slave_with_master; -connection slave; -SELECT * FROM t2 ORDER BY a; - -connection master; -drop procedure p1; -drop procedure p2; -drop table t2; - -# 3. Test FUNCTIONs in various places - -delimiter //; -create function f1(x int) returns int -begin - insert into t1 values(x); - return x+1; -end// - -create procedure p1(a int, b int) -begin - declare v int default f1(5); - if (f1(6)) then - select 'yes'; - end if; - set v = f1(7); - while f1(8) < 1 do - select 'this cant be'; - end while; - -end// -delimiter ;// - -call p1(f1(1), f1(2)); -SELECT * FROM t1 ORDER BY a; - -create table t2(a int); -insert into t2 values (10),(11); -SELECT a,f1(a) FROM t2 ORDER BY a; - -# This shouldn't put separate 'call f1(3)' into binlog: -insert into t2 select f1(3); -SELECT 'master:',a FROM t1 ORDER BY a; - -sync_slave_with_master; -connection slave; -SELECT 'slave:',a FROM t1 ORDER BY a; - -connection master; -drop procedure p1; -delete from t1; -delete from t2; - -# 4. VIEWs -delete from t1; -insert into t2 values(1),(2); -create view v1 as select f1(a) as f from t2; -select * from v1 order by f; -SELECT 'master:',a FROM t1 ORDER BY a; - -sync_slave_with_master; -connection slave; -SELECT 'slave:',a FROM t1 ORDER BY a; - -connection master; -drop view v1; -delete from t1; - -# 5. Prepared statements. -prepare s1 from 'select f1(?)'; -set @xx=123; -execute s1 using @xx; -SELECT 'master:',a FROM t1 ORDER BY a; - -sync_slave_with_master; -connection slave; -SELECT 'slave:',a FROM t1 ORDER BY a; - -connection master; -delete from t1; - -# 5. Cursors. -# t2 has (1),(2); -delimiter //; -create procedure p1(spv int) -begin - declare c cursor for select f1(spv) from t2; - while (spv > 2) do - open c; - fetch c into spv; - close c; - set spv= spv - 10; - end while; -end// -delimiter ;// -call p1(15); -SELECT 'master:',a FROM t1 ORDER BY a; -sync_slave_with_master; -connection slave; -SELECT 'slave:',a FROM t1 ORDER BY a; - -connection master; -drop procedure p1; -drop function f1; -drop table t1,t2; - -# BUG#12637: User variables + SPs replication -create table t1 (a int); -delimiter //; -create procedure p1() -begin - insert into t1 values(@x); - set @x=@x+1; - insert into t1 values(@x); - if (f2()) then - insert into t1 values(1243); - end if; -end// - -create function f2() returns int -begin - insert into t1 values(@z); - set @z=@z+1; - insert into t1 values(@z); - return 0; -end// - -create function f1() returns int -begin - insert into t1 values(@y); - call p1(); - return 0; -end// - -delimiter ;// - -set @x=10; -set @y=20; -set @z=100; -select f1(); - -set @x=30; -call p1(); - -SELECT 'master', a FROM t1 ORDER BY a; -sync_slave_with_master; -connection slave; -SELECT 'slave', a FROM t1 ORDER BY a; - -connection master; -drop table t1; -drop function f1; -drop function f2; -drop procedure p1; -sync_slave_with_master; - -SET GLOBAL log_bin_trust_function_creators = 0; diff --git a/mysql-test/t/rpl_sporadic_master-master.opt b/mysql-test/t/rpl_sporadic_master-master.opt deleted file mode 100644 index 6d5b66bed61..00000000000 --- a/mysql-test/t/rpl_sporadic_master-master.opt +++ /dev/null @@ -1 +0,0 @@ ---sporadic-binlog-dump-fail --max-binlog-dump-events=2 diff --git a/mysql-test/t/rpl_sporadic_master.test b/mysql-test/t/rpl_sporadic_master.test deleted file mode 100644 index 824f7abc9f5..00000000000 --- a/mysql-test/t/rpl_sporadic_master.test +++ /dev/null @@ -1,29 +0,0 @@ -############################################################# -# 2006-02-07 By JBM added order by -############################################################# -# test to see if replication can continue when master sporadically fails on -# COM_BINLOG_DUMP and additionally limits the number of events per dump - -source include/master-slave.inc; - -create table t2(n int); -create table t1(n int not null auto_increment primary key); -insert into t1 values (NULL),(NULL); -truncate table t1; -# We have to use 4 in the following to make this test work with all table types -insert into t1 values (4),(NULL); -sync_slave_with_master; -stop slave; -start slave; -connection master; -insert into t1 values (NULL),(NULL); -flush logs; -truncate table t1; -insert into t1 values (10),(NULL),(NULL),(NULL),(NULL),(NULL); -sync_slave_with_master; -select * from t1 ORDER BY n; -connection master; -drop table t1,t2; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_ssl.test b/mysql-test/t/rpl_ssl.test deleted file mode 100644 index a0317028557..00000000000 --- a/mysql-test/t/rpl_ssl.test +++ /dev/null @@ -1,71 +0,0 @@ -source include/have_ssl.inc; -source include/master-slave.inc; - -# create a user for replication that requires ssl encryption -connection master; -grant replication slave on *.* to replssl@localhost require ssl; -create table t1 (t int auto_increment, KEY(t)); - -sync_slave_with_master; - -# Set slave to use SSL for connection to master -stop slave; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval change master to - master_user='replssl', - master_password='', - master_ssl=1, - master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', - master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', - master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem'; -start slave; - -# Switch to master and insert one record, then sync it to slave -connection master; -insert into t1 values(1); -sync_slave_with_master; - -# The record should now be on slave -select * from t1; - -# The slave is synced and waiting/reading from master -# SHOW SLAVE STATUS will show "Waiting for master to send event" ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # -query_vertical show slave status; - -# Stop the slave, as reported in bug#21871 it would hang -STOP SLAVE; - -select * from t1; - -# Do the same thing a number of times -disable_query_log; -let $i= 100; -while ($i) -{ - start slave; - connection master; - insert into t1 values (NULL); - connection slave; - stop slave; - dec $i; -} -start slave; -enable_query_log; -connection master; -# INSERT one more record to make sure -# the sync has something to do -insert into t1 values (NULL); -sync_slave_with_master; ---source include/wait_for_slave_to_start.inc ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # -query_vertical show slave status; - -connection master; -drop user replssl@localhost; -drop table t1; -sync_slave_with_master; - ---echo End of 5.0 tests diff --git a/mysql-test/t/rpl_ssl1.test b/mysql-test/t/rpl_ssl1.test deleted file mode 100644 index 6ca1484bb17..00000000000 --- a/mysql-test/t/rpl_ssl1.test +++ /dev/null @@ -1,97 +0,0 @@ -source include/have_ssl.inc; -source include/master-slave.inc; - -# We don't test all types of ssl auth params here since it's a bit hard -# until problems with OpenSSL 0.9.7 are unresolved - -# creating replication user for whom ssl auth is required -# preparing playground -connection master; -grant replication slave on *.* to replssl@localhost require ssl; -create table t1 (t int); -save_master_pos; - -#syncing with master -connection slave; -sync_with_master; - -#trying to use this user without ssl -stop slave; -change master to master_user='replssl',master_password=''; -start slave; - -#showing that replication don't work -connection master; -insert into t1 values (1); -#reasonable timeout for changes to propagate to slave -sleep 3; -connection slave; -select * from t1; - -#showing that replication could work with ssl params -stop slave; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval change master to master_ssl=1 , master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem'; -start slave; - -#avoiding unneeded sleeps -connection master; -save_master_pos; -connection slave; -sync_with_master; - -#checking that replication is ok -select * from t1; - -#checking show slave status ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -query_vertical show slave status; - -#checking if replication works without ssl also performing clean up -stop slave; -change master to master_user='root',master_password='', master_ssl=0; -start slave; -connection master; -drop user replssl@localhost; -drop table t1; -save_master_pos; -connection slave; -sync_with_master; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -query_vertical show slave status; - -# End of 4.1 tests - -# Start replication with ssl_verify_server_cert turned on -connection slave; -stop slave; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval change master to - master_host="localhost", - master_ssl=1 , - master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', - master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', - master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem', - master_ssl_verify_server_cert=1; -start slave; - -connection master; -create table t1 (t int); -insert into t1 values (1); - -sync_slave_with_master; - -echo on slave; -#checking that replication is ok -select * from t1; - -#checking show slave status ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -query_vertical show slave status; - -connection master; -drop table t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_start_stop_slave.test b/mysql-test/t/rpl_start_stop_slave.test deleted file mode 100644 index 19988cf902a..00000000000 --- a/mysql-test/t/rpl_start_stop_slave.test +++ /dev/null @@ -1,36 +0,0 @@ -source include/master-slave.inc; - -# -# Bug#6148 () -# -connection slave; -stop slave; - -# Let the master do lots of insertions -connection master; -create table t1(n int); -let $1=5000; -disable_query_log; -while ($1) -{ - eval insert into t1 values($1); - dec $1; -} -enable_query_log; -save_master_pos; - -connection slave; -start slave; -sleep 1; -stop slave io_thread; -start slave io_thread; -sync_with_master; - -connection master; -drop table t1; -save_master_pos; - -connection slave; -sync_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_stm_000001-slave.opt b/mysql-test/t/rpl_stm_000001-slave.opt deleted file mode 100644 index 48457b17309..00000000000 --- a/mysql-test/t/rpl_stm_000001-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb diff --git a/mysql-test/t/rpl_stm_000001.test b/mysql-test/t/rpl_stm_000001.test deleted file mode 100644 index aee067b2d4a..00000000000 --- a/mysql-test/t/rpl_stm_000001.test +++ /dev/null @@ -1,2 +0,0 @@ -let $engine_type=myisam; --- source extra/rpl_tests/rpl_stm_000001.test diff --git a/mysql-test/t/rpl_stm_EE_err2.test b/mysql-test/t/rpl_stm_EE_err2.test deleted file mode 100644 index face651b9a1..00000000000 --- a/mysql-test/t/rpl_stm_EE_err2.test +++ /dev/null @@ -1,8 +0,0 @@ -############################# -# Author: JBM -# Date: 2006-01-11 -# Purpose: Engine Wrapper for rpl_stm_EE_err2.test -############################## --- source include/have_binlog_format_mixed_or_statement.inc -let $engine_type=myisam; --- source extra/rpl_tests/rpl_stm_EE_err2.test diff --git a/mysql-test/t/rpl_stm_charset.test b/mysql-test/t/rpl_stm_charset.test deleted file mode 100644 index b103a47d78c..00000000000 --- a/mysql-test/t/rpl_stm_charset.test +++ /dev/null @@ -1,2 +0,0 @@ -let $engine_type=myisam; --- source extra/rpl_tests/rpl_stm_charset.test diff --git a/mysql-test/t/rpl_stm_flsh_tbls.test b/mysql-test/t/rpl_stm_flsh_tbls.test deleted file mode 100644 index a8a33d05e8b..00000000000 --- a/mysql-test/t/rpl_stm_flsh_tbls.test +++ /dev/null @@ -1,8 +0,0 @@ -# depends on the binlog output ---source include/have_binlog_format_mixed_or_statement.inc - -let $rename_event_pos= 656; --- source extra/rpl_tests/rpl_flsh_tbls.test - -# End of 4.1 tests -# Adding comment for force manual merge 5.0 -> wl1012. Delete me if needed. diff --git a/mysql-test/t/rpl_stm_insert_delayed.test b/mysql-test/t/rpl_stm_insert_delayed.test deleted file mode 100644 index d55e3a4da2c..00000000000 --- a/mysql-test/t/rpl_stm_insert_delayed.test +++ /dev/null @@ -1,20 +0,0 @@ -# we run first in statement-based then in mixed binlogging - ---source include/have_binlog_format_mixed_or_statement.inc ---source include/master-slave.inc ---source include/not_embedded.inc ---source include/not_windows.inc - -connection master; -set @old_global_binlog_format = @@global.binlog_format; - -let $binlog_format_statement=1; -set @@global.binlog_format = statement; ---source extra/rpl_tests/rpl_insert_delayed.test - -let $binlog_format_statement=0; -set @@global.binlog_format = mixed; ---source extra/rpl_tests/rpl_insert_delayed.test - -connection master; -set @@global.binlog_format = @old_global_binlog_format; diff --git a/mysql-test/t/rpl_stm_log-master.opt b/mysql-test/t/rpl_stm_log-master.opt deleted file mode 100644 index cef79bc8585..00000000000 --- a/mysql-test/t/rpl_stm_log-master.opt +++ /dev/null @@ -1 +0,0 @@ ---force-restart diff --git a/mysql-test/t/rpl_stm_log-slave.opt b/mysql-test/t/rpl_stm_log-slave.opt deleted file mode 100644 index 8b137891791..00000000000 --- a/mysql-test/t/rpl_stm_log-slave.opt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/mysql-test/t/rpl_stm_log.test b/mysql-test/t/rpl_stm_log.test deleted file mode 100644 index 5a1e0facc83..00000000000 --- a/mysql-test/t/rpl_stm_log.test +++ /dev/null @@ -1,8 +0,0 @@ -# Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc -let $engine_type=MyISAM; --- source extra/rpl_tests/rpl_log.test - - -# End of 4.1 tests -# Adding comment for force manual merge 5.0 -> wl1012: Delete me diff --git a/mysql-test/t/rpl_stm_max_relay_size.test b/mysql-test/t/rpl_stm_max_relay_size.test deleted file mode 100644 index 950aa8b322a..00000000000 --- a/mysql-test/t/rpl_stm_max_relay_size.test +++ /dev/null @@ -1,11 +0,0 @@ -# Test of options max_binlog_size and max_relay_log_size and -# how they act (if max_relay_log_size == 0, use max_binlog_size -# for relay logs too). -# Test of manual relay log rotation with FLUSH LOGS. - -# Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/rpl_tests/rpl_max_relay_size.test - -# End of 4.1 tests -# diff --git a/mysql-test/t/rpl_stm_multi_query.test b/mysql-test/t/rpl_stm_multi_query.test deleted file mode 100644 index c39d1fad015..00000000000 --- a/mysql-test/t/rpl_stm_multi_query.test +++ /dev/null @@ -1,12 +0,0 @@ -# Test for BUG#8436: verify that a multi-query (i.e. one query -# containing several queries (assuming client has -# CLIENT_MULTI_STATEMENTS) will be binlogged ONE-query-per-event (not -# one binlog event containing all queries) - -# Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/rpl_tests/rpl_multi_query.test - - -# End of 4.1 tests -# diff --git a/mysql-test/t/rpl_stm_mystery22.test b/mysql-test/t/rpl_stm_mystery22.test deleted file mode 100644 index 017593fdfba..00000000000 --- a/mysql-test/t/rpl_stm_mystery22.test +++ /dev/null @@ -1,66 +0,0 @@ -################################ -# Change Author: JBM -# Change Date: 2006-01-12 -# Change: Added back have stm binlog -# and added requirments comments -################################ -# test case to make slave thread get ahead by 22 bytes -################################ -#REQUIREMENT: If there is a faked slave duplicate key insert -#error and the slave is restarted, the replication should -#proceed in a correct way. -################################ -#REQUIREMENT: If there is a faked slave non-existing record -#delete error and the slave is restarted, then the replication -#should proceed in a correct way. -################################# - --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - -# first, cause a duplicate key problem on the slave -create table t1(n int auto_increment primary key, s char(10)); -sync_slave_with_master; -insert into t1 values (2,'old'); -connection master; -insert into t1 values(NULL,'new'); -insert into t1 values(NULL,'new'); -save_master_pos; -connection slave; -# wait until the slave tries to run the query, fails and aborts slave thread -wait_for_slave_to_stop; -select * from t1 order by n; -delete from t1 where n = 2; ---disable_warnings -start slave; ---enable_warnings -sync_with_master; -#now the buggy slave would be confused on the offset but it can replicate -#in order to make it break, we need to stop/start the slave one more time -stop slave; -connection master; -# to be able to really confuse the slave, we need some non-auto-increment -# events in the log -create table t2(n int); -drop table t2; -insert into t1 values(NULL,'new'); -# what happens when we delete a row which does not exist on slave? -set sql_log_bin=0; -insert into t1 values(NULL,'new'); -set sql_log_bin=1; -delete from t1 where n=4; -save_master_pos; -connection slave; ---disable_warnings -start slave; ---enable_warnings -#now the truth comes out - if the slave is buggy, it will never sync because -#the slave thread is not able to read events -sync_with_master; -select * from t1 order by n; -#clean up -connection master; -drop table t1; -sync_slave_with_master; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_stm_no_op.test b/mysql-test/t/rpl_stm_no_op.test deleted file mode 100644 index 66dc89bd712..00000000000 --- a/mysql-test/t/rpl_stm_no_op.test +++ /dev/null @@ -1,93 +0,0 @@ -# It's true only in statement-based replication that a statement which -# updates no rows (UPDATE/DELETE) is binlogged; in row-based -# replication, as we log modified rows, nothing is binlogged in this -# case. So this test is meaningul only in statement-based (and if it was -# enabled in row-based, it would fail as expected). - --- source include/have_binlog_format_mixed_or_statement.inc - -source include/master-slave.inc; - -# see if DROP DATABASE is binlogged even if no effect -connection slave; -create database mysqltest; -connection master; -drop database if exists mysqltest; -sync_slave_with_master; -# can't read dir ---replace_result "Errcode: 1" "Errcode: X" "Errcode: 2" "Errcode: X" \\ / ---error 1049 -show tables from mysqltest; - -# see if DROP TABLE is binlogged even if no effect -connection slave; -create table t1 (a int); -connection master; -drop table if exists t1; -sync_slave_with_master; -# table does not exist ---error 1146 -select * from t1; - -# see if single-table DELETE is binlogged even if no effect -connection master; -create table t1 (a int, b int); -sync_slave_with_master; -insert into t1 values(1,1); -connection master; -delete from t1; -sync_slave_with_master; -select * from t1; - -# see if single-table UPDATE is binlogged even if no effect -insert into t1 values(1,1); -connection master; -insert into t1 values(2,1); -update t1 set a=2; -sync_slave_with_master; -select * from t1; - -# End of 4.1 tests - -# see if multi-table UPDATE is binlogged even if no effect (BUG#13348) - -connection master; -create table t2 (a int, b int); -delete from t1; -insert into t1 values(1,1); -insert into t2 values(1,1); - -sync_slave_with_master; -# force a difference to see if master's multi-UPDATE will correct it -update t1 set a=2; - -connection master; -UPDATE t1, t2 SET t1.a = t2.a; - -sync_slave_with_master; -select * from t1; -select * from t2; - -# See if multi-table DELETE is binlogged even if no effect - -connection master; -delete from t1; -delete from t2; - -sync_slave_with_master; -# force a difference to see if master's multi-DELETE will correct it -insert into t1 values(1,1); -insert into t2 values(1,1); - -connection master; -DELETE t1.*, t2.* from t1, t2; - -sync_slave_with_master; -select * from t1; -select * from t2; - - -# cleanup -connection master; -drop table t1, t2; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_stm_reset_slave.test b/mysql-test/t/rpl_stm_reset_slave.test deleted file mode 100644 index 6a99d4e1613..00000000000 --- a/mysql-test/t/rpl_stm_reset_slave.test +++ /dev/null @@ -1,6 +0,0 @@ -# TBF - difference in row level logging --- source include/have_binlog_format_mixed_or_statement.inc --- source extra/rpl_tests/rpl_reset_slave.test - -# End of 4.1 tests -# diff --git a/mysql-test/t/rpl_stm_until.test b/mysql-test/t/rpl_stm_until.test deleted file mode 100644 index f42965c0eb0..00000000000 --- a/mysql-test/t/rpl_stm_until.test +++ /dev/null @@ -1,88 +0,0 @@ --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - -# Test is dependent on binlog positions - -# prepare version for substitutions -let $VERSION=`select version()`; - -# stop slave before he will start replication also sync with master -# for avoiding undetermenistic behaviour -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -connection master; -# create some events on master -create table t1(n int not null auto_increment primary key); -insert into t1 values (1),(2),(3),(4); -drop table t1; -create table t2(n int not null auto_increment primary key); -insert into t2 values (1),(2); -insert into t2 values (3),(4); -drop table t2; - -# try to replicate all queries until drop of t1 -connection slave; -start slave until master_log_file='master-bin.000001', master_log_pos=323; -sleep 2; -wait_for_slave_to_stop; -# here table should be still not deleted -select * from t1; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -# this should fail right after start -start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; -# again this table should be still not deleted -select * from t1; -sleep 2; -wait_for_slave_to_stop; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -# try replicate all up to and not including the second insert to t2; -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; -sleep 2; -wait_for_slave_to_stop; -select * from t2; ---replace_result $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 9 # 11 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -# clean up -start slave; -connection master; -save_master_pos; -connection slave; -sync_with_master; -stop slave; - -# this should stop immediately as we are already there -start slave until master_log_file='master-bin.000001', master_log_pos=776; -sleep 2; -wait_for_slave_to_stop; -# here the sql slave thread should be stopped ---replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 ---replace_column 1 # 9 # 23 # 33 # ---query_vertical SHOW SLAVE STATUS - -#testing various error conditions ---error 1277 -start slave until master_log_file='master-bin', master_log_pos=561; ---error 1277 -start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; ---error 1277 -start slave until master_log_file='master-bin.000001'; ---error 1277 -start slave until relay_log_file='slave-relay-bin.000002'; ---error 1277 -start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; -# Warning should be given for second command -start slave sql_thread; -start slave until master_log_file='master-bin.000001', master_log_pos=776; - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_switch_stm_row_mixed.test b/mysql-test/t/rpl_switch_stm_row_mixed.test deleted file mode 100644 index b0012827db8..00000000000 --- a/mysql-test/t/rpl_switch_stm_row_mixed.test +++ /dev/null @@ -1,568 +0,0 @@ -# -# rpl_switch_stm_row_mixed tests covers -# -# - switching explicitly between STATEMENT, ROW, and MIXED binlog format -# showing when it is possible and when not. -# - switching from MIXED to RBR implicitly listing all use cases, -# e.g a query invokes UUID(), thereafter to serve as the definition -# of MIXED binlog format -# - correctness of execution - - --- source include/not_ndb_default.inc --- source include/master-slave.inc - -connection master; ---disable_warnings -drop database if exists mysqltest1; -create database mysqltest1; ---enable_warnings -use mysqltest1; - -# Save binlog format -set @my_binlog_format= @@global.binlog_format; - -# play with switching -set session binlog_format=mixed; -show session variables like "binlog_format%"; -set session binlog_format=statement; -show session variables like "binlog_format%"; -set session binlog_format=row; -show session variables like "binlog_format%"; - -set global binlog_format=DEFAULT; -show global variables like "binlog_format%"; -set global binlog_format=MIXED; -show global variables like "binlog_format%"; -set global binlog_format=STATEMENT; -show global variables like "binlog_format%"; -set global binlog_format=ROW; -show global variables like "binlog_format%"; -show session variables like "binlog_format%"; -select @@global.binlog_format, @@session.binlog_format; - -CREATE TABLE t1 (a varchar(100)); - -prepare stmt1 from 'insert into t1 select concat(UUID(),?)'; -set @string="emergency_1_"; -insert into t1 values("work_2_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values(concat(UUID(),"work_3_")); -execute stmt1 using @string; -deallocate prepare stmt1; - -insert into t1 values(concat("for_4_",UUID())); -insert into t1 select "yesterday_5_"; - -# verify that temp tables prevent a switch to SBR -create temporary table tmp(a char(100)); -insert into tmp values("see_6_"); ---error ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR -set binlog_format=statement; -insert into t1 select * from tmp; -drop temporary table tmp; - -# Now we go to SBR -set binlog_format=statement; -show global variables like "binlog_format%"; -show session variables like "binlog_format%"; -select @@global.binlog_format, @@session.binlog_format; -set global binlog_format=statement; -show global variables like "binlog_format%"; -show session variables like "binlog_format%"; -select @@global.binlog_format, @@session.binlog_format; - -prepare stmt1 from 'insert into t1 select ?'; -set @string="emergency_7_"; -insert into t1 values("work_8_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values("work_9_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -insert into t1 values("for_10_"); -insert into t1 select "yesterday_11_"; - -# test statement (is not default after wl#3368) -set binlog_format=statement; -select @@global.binlog_format, @@session.binlog_format; -set global binlog_format=statement; -select @@global.binlog_format, @@session.binlog_format; - -prepare stmt1 from 'insert into t1 select ?'; -set @string="emergency_12_"; -insert into t1 values("work_13_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values("work_14_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -insert into t1 values("for_15_"); -insert into t1 select "yesterday_16_"; - -# and now the mixed mode - -set global binlog_format=mixed; -select @@global.binlog_format, @@session.binlog_format; -set binlog_format=default; -select @@global.binlog_format, @@session.binlog_format; - -prepare stmt1 from 'insert into t1 select concat(UUID(),?)'; -set @string="emergency_17_"; -insert into t1 values("work_18_"); -execute stmt1 using @string; -deallocate prepare stmt1; - -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values(concat(UUID(),"work_19_")); -execute stmt1 using @string; -deallocate prepare stmt1; - -insert into t1 values(concat("for_20_",UUID())); -insert into t1 select "yesterday_21_"; - -prepare stmt1 from 'insert into t1 select ?'; -insert into t1 values(concat(UUID(),"work_22_")); -execute stmt1 using @string; -deallocate prepare stmt1; - -insert into t1 values(concat("for_23_",UUID())); -insert into t1 select "yesterday_24_"; - -# Test of CREATE TABLE SELECT - -create table t2 select rpad(UUID(),100,' '); -create table t3 select 1 union select UUID(); -create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3); -create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); -# what if UUID() is first: -insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4); - -# inside a stored procedure - -delimiter |; -create procedure foo() -begin -insert into t1 values("work_25_"); -insert into t1 values(concat("for_26_",UUID())); -insert into t1 select "yesterday_27_"; -end| -create procedure foo2() -begin -insert into t1 values(concat("emergency_28_",UUID())); -insert into t1 values("work_29_"); -insert into t1 values(concat("for_30_",UUID())); -set session binlog_format=row; # accepted for stored procs -insert into t1 values("more work_31_"); -set session binlog_format=mixed; -end| -create function foo3() returns bigint unsigned -begin - set session binlog_format=row; # rejected for stored funcs - insert into t1 values("alarm"); - return 100; -end| -create procedure foo4(x varchar(100)) -begin -insert into t1 values(concat("work_250_",x)); -insert into t1 select "yesterday_270_"; -end| -delimiter ;| -call foo(); -call foo2(); -call foo4("hello"); -call foo4(UUID()); -call foo4("world"); - -# test that can't SET in a stored function ---error ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT -select foo3(); -select * from t1 where a="alarm"; - -# Tests of stored functions/triggers/views for BUG#20930 "Mixed -# binlogging mode does not work with stored functions, triggers, -# views" - -# Function which calls procedure -drop function foo3; -delimiter |; -create function foo3() returns bigint unsigned -begin - insert into t1 values("foo3_32_"); - call foo(); - return 100; -end| -delimiter ;| -insert into t2 select foo3(); - -prepare stmt1 from 'insert into t2 select foo3()'; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; - -# Test if stored function calls stored function which calls procedure -# which requires row-based. - -delimiter |; -create function foo4() returns bigint unsigned -begin - insert into t2 select foo3(); - return 100; -end| -delimiter ;| -select foo4(); - -prepare stmt1 from 'select foo4()'; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; - -# A simple stored function -delimiter |; -create function foo5() returns bigint unsigned -begin - insert into t2 select UUID(); - return 100; -end| -delimiter ;| -select foo5(); - -prepare stmt1 from 'select foo5()'; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; - -# A simple stored function where UUID() is in the argument -delimiter |; -create function foo6(x varchar(100)) returns bigint unsigned -begin - insert into t2 select x; - return 100; -end| -delimiter ;| -select foo6("foo6_1_"); -select foo6(concat("foo6_2_",UUID())); - -prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))'; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; - - -# Test of views using UUID() - -create view v1 as select uuid(); -create table t11 (data varchar(255)); -insert into t11 select * from v1; -# Test of querying INFORMATION_SCHEMA which parses the view's body, -# to verify that it binlogs statement-based (is not polluted by -# the parsing of the view's body). -insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11'); -prepare stmt1 from "insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')"; -execute stmt1; -execute stmt1; -deallocate prepare stmt1; - -# Test of triggers with UUID() -delimiter |; -create trigger t11_bi before insert on t11 for each row -begin - set NEW.data = concat(NEW.data,UUID()); -end| -delimiter ;| -insert into t11 values("try_560_"); - -# Test that INSERT DELAYED works in mixed mode (BUG#20649) -insert delayed into t2 values("delay_1_"); -insert delayed into t2 values(concat("delay_2_",UUID())); -insert delayed into t2 values("delay_6_"); - -# Test for BUG#20633 (INSERT DELAYED RAND()/user_variable does not -# replicate fine in statement-based ; we test that in mixed mode it -# works). -insert delayed into t2 values(rand()); -set @a=2.345; -insert delayed into t2 values(@a); - -sleep 4; # time for the delayed inserts to reach disk - -# If you want to do manual testing of the mixed mode regarding UDFs (not -# testable automatically as quite platform- and compiler-dependent), -# you just need to set the variable below to 1, and to -# "make udf_example.so" in sql/, and to copy sql/udf_example.so to -# MYSQL_TEST_DIR/lib/mysql. -let $you_want_to_test_UDF=0; -if ($you_want_to_test_UDF) -{ - CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so'; - prepare stmt1 from 'insert into t1 select metaphon(?)'; - set @string="emergency_133_"; - insert into t1 values("work_134_"); - execute stmt1 using @string; - deallocate prepare stmt1; - prepare stmt1 from 'insert into t1 select ?'; - insert into t1 values(metaphon("work_135_")); - execute stmt1 using @string; - deallocate prepare stmt1; - insert into t1 values(metaphon("for_136_")); - insert into t1 select "yesterday_137_"; - create table t6 select metaphon("for_138_"); - create table t7 select 1 union select metaphon("for_139_"); - create table t8 select * from t1 where 3 in (select 1 union select 2 union select metaphon("for_140_") union select 3); - create table t9 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3); -} - -create table t20 select * from t1; # save for comparing later -create table t21 select * from t2; -create table t22 select * from t3; -drop table t1,t2,t3; - -# This tests the fix to -# BUG#19630 stored function inserting into two auto_increment breaks statement-based binlog -# We verify that under the mixed binlog mode, a stored function -# modifying at least two tables having an auto_increment column, -# is binlogged row-based. Indeed in statement-based binlogging, -# only the auto_increment value generated for the first table -# is recorded in the binlog, the value generated for the 2nd table -# lacking. - -create table t1 (a int primary key auto_increment, b varchar(100)); -create table t2 (a int primary key auto_increment, b varchar(100)); -create table t3 (b varchar(100)); -delimiter |; -create function f (x varchar(100)) returns int deterministic -begin - insert into t1 values(null,x); - insert into t2 values(null,x); - return 1; -end| -delimiter ;| -select f("try_41_"); -# Two operations which compensate each other except that their net -# effect is that they advance the auto_increment counter of t2 on slave: -sync_slave_with_master; -use mysqltest1; -insert into t2 values(2,null),(3,null),(4,null); -delete from t2 where a>=2; - -connection master; -# this is the call which didn't replicate well -select f("try_42_"); -sync_slave_with_master; - -# now use prepared statement and test again, just to see that the RBB -# mode isn't set at PREPARE but at EXECUTE. - -insert into t2 values(3,null),(4,null); -delete from t2 where a>=3; - -connection master; -prepare stmt1 from 'select f(?)'; -set @string="try_43_"; -insert into t1 values(null,"try_44_"); # should be SBB -execute stmt1 using @string; # should be RBB -deallocate prepare stmt1; -sync_slave_with_master; - -# verify that if only one table has auto_inc, it does not trigger RBB -# (we'll check in binlog further below) - -connection master; -create table t12 select * from t1; # save for comparing later -drop table t1; -create table t1 (a int, b varchar(100), key(a)); -select f("try_45_"); - -# restore table's key -create table t13 select * from t1; -drop table t1; -create table t1 (a int primary key auto_increment, b varchar(100)); - -# now test if it's two functions, each of them inserts in one table - -drop function f; -# we need a unique key to have sorting of rows by mysqldump -create table t14 (unique (a)) select * from t2; -truncate table t2; -delimiter |; -create function f1 (x varchar(100)) returns int deterministic -begin - insert into t1 values(null,x); - return 1; -end| -create function f2 (x varchar(100)) returns int deterministic -begin - insert into t2 values(null,x); - return 1; -end| -delimiter ;| -select f1("try_46_"),f2("try_47_"); - -sync_slave_with_master; -insert into t2 values(2,null),(3,null),(4,null); -delete from t2 where a>=2; - -connection master; -# Test with SELECT and INSERT -select f1("try_48_"),f2("try_49_"); -insert into t3 values(concat("try_50_",f1("try_51_"),f2("try_52_"))); -sync_slave_with_master; - -# verify that if f2 does only read on an auto_inc table, this does not -# switch to RBB -connection master; -drop function f2; -delimiter |; -create function f2 (x varchar(100)) returns int deterministic -begin - declare y int; - insert into t1 values(null,x); - set y = (select count(*) from t2); - return y; -end| -delimiter ;| -select f1("try_53_"),f2("try_54_"); -sync_slave_with_master; - -# And now, a normal statement with a trigger (no stored functions) - -connection master; -drop function f2; -delimiter |; -create trigger t1_bi before insert on t1 for each row -begin - insert into t2 values(null,"try_55_"); -end| -delimiter ;| -insert into t1 values(null,"try_56_"); -# and now remove one auto_increment and verify SBB -alter table t1 modify a int, drop primary key; -insert into t1 values(null,"try_57_"); -sync_slave_with_master; - -# Test for BUG#20499 "mixed mode with temporary table breaks binlog" -# Slave used to have only 2 rows instead of 3. -connection master; -CREATE TEMPORARY TABLE t15 SELECT UUID(); -create table t16 like t15; -INSERT INTO t16 SELECT * FROM t15; -# we'll verify that this one is done RBB -insert into t16 values("try_65_"); -drop table t15; -# we'll verify that this one is done SBB -insert into t16 values("try_66_"); -sync_slave_with_master; - -# and now compare: - -connection master; - -# first check that data on master is sensible -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; -select count(*) from t11; -select count(*) from t20; -select count(*) from t21; -select count(*) from t22; -select count(*) from t12; -select count(*) from t13; -select count(*) from t14; -select count(*) from t16; -if ($you_want_to_test_UDF) -{ - select count(*) from t6; - select count(*) from t7; - select count(*) from t8; - select count(*) from t9; -} - -sync_slave_with_master; - -# -# Bug#20863 If binlog format is changed between update and unlock of -# tables, wrong binlog -# - -connection master; -DROP TABLE IF EXISTS t11; -SET SESSION BINLOG_FORMAT=STATEMENT; -CREATE TABLE t11 (song VARCHAR(255)); -LOCK TABLES t11 WRITE; -SET SESSION BINLOG_FORMAT=ROW; -INSERT INTO t11 VALUES('Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict'); -SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t11 VALUES('Careful With That Axe, Eugene'); -UNLOCK TABLES; - ---query_vertical SELECT * FROM t11 -sync_slave_with_master; -USE mysqltest1; ---query_vertical SELECT * FROM t11 - -connection master; -DROP TABLE IF EXISTS t12; -SET SESSION BINLOG_FORMAT=MIXED; -CREATE TABLE t12 (data LONG); -LOCK TABLES t12 WRITE; -INSERT INTO t12 VALUES(UUID()); -UNLOCK TABLES; - -source include/show_binlog_events.inc; -sync_slave_with_master; - -# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql - -# Let's compare. Note: If they match test will pass, if they do not match -# the test will show that the diff statement failed and not reject file -# will be created. You will need to go to the mysql-test dir and diff -# the files your self to see what is not matching - -diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql; - -connection master; -source include/show_binlog_events.inc; - -# Now test that mysqlbinlog works fine on a binlog generated by the -# mixed mode - -# BUG#11312 "DELIMITER is not written to the binary log that causes -# syntax error" makes that mysqlbinlog will fail if we pass it the -# text of queries; this forces us to use --base64-output here. - -# BUG#20929 "BINLOG command causes invalid free plus assertion -# failure" makes mysqld segfault when receiving --base64-output - -# So I can't enable this piece of test -# SIGH - -if ($enable_when_11312_or_20929_fixed) -{ ---exec $MYSQL_BINLOG --base64-output $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_mixed.sql -drop database mysqltest1; ---exec $MYSQL < $MYSQLTEST_VARDIR/tmp/mysqlbinlog_mixed.sql ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql -# the old mysqldump output on slave is the same as what it was on -# master before restoring on master. -diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql; -} - -drop database mysqltest1; -sync_slave_with_master; - -connection master; -# Restore binlog format setting -set global binlog_format =@my_binlog_format; diff --git a/mysql-test/t/rpl_temp_table.test b/mysql-test/t/rpl_temp_table.test deleted file mode 100644 index 9b73961aeea..00000000000 --- a/mysql-test/t/rpl_temp_table.test +++ /dev/null @@ -1,59 +0,0 @@ -# drop table t1 t2 t3 are included int master-slave.inc -# meaningful only in statement-based: - --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - - -create table t2 (n int, PRIMARY KEY(n)); -create temporary table t1 (n int); -create temporary table t3 (n int not null); - -insert into t1 values(1),(2),(3),(100),(25),(26),(200),(300); -insert into t2 select * from t1; -alter table t3 add primary key(n); - -flush logs; -insert into t3 values (1010); -insert into t2 select * from t3; - -drop table if exists t3; -insert into t2 values (1012); - -connection master1; -create temporary table t1 (n int); -insert into t1 values (4),(5); -insert into t2 select * from t1; - -save_master_pos; -disconnect master; - -connection slave; -#add 1 to the saved position, so we will catch drop table on disconnect -#for sure -sync_with_master 1; - -connection master1; -insert into t2 values(61); - -save_master_pos; -disconnect master1; - -connection slave; -#same trick - make sure we catch drop of temporary table on disconnect -sync_with_master 1; - -select * from t2; -select count(*) from t2; -select sum(n) from t2; -show status like 'Slave_open_temp_tables'; - -# -# Clean up -# -connect (master2,localhost,root,,); -connection master2; -drop table if exists t1,t2; -save_master_pos; -connection slave; -sync_with_master; diff --git a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test deleted file mode 100644 index 09b8b83f25f..00000000000 --- a/mysql-test/t/rpl_temporary.test +++ /dev/null @@ -1,215 +0,0 @@ -# Test need anonymous user when connection are made as "zedjzlcsjhd" -source include/add_anonymous_users.inc; - --- source include/master-slave.inc - -# Clean up old slave's binlogs. -# The slave is started with --log-slave-updates -# and this test does SHOW BINLOG EVENTS on the slave's -# binlog. But previous tests can influence the current test's -# binlog (e.g. a temporary table in the previous test has not -# been explicitly deleted, or it has but the slave hasn't had -# enough time to catch it before STOP SLAVE, -# and at the beginning of the current -# test the slave immediately writes DROP TEMPORARY TABLE this_old_table). -# We wait for the slave to have written all he wants to the binlog -# (otherwise RESET MASTER may come too early). -save_master_pos; -connection slave; -sync_with_master; -reset master; -connection master; - -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); -# We want to connect as an unprivileged user. But if we use user="" then this -# will pick the Unix login, which will cause problems if you're running the test -# as root. -connect (con3,localhost,zedjzlcsjhd,,); - -# We are going to use SET PSEUDO_THREAD_ID in this test; -# check that it requires the SUPER privilege. - -connection con3; -SET @save_select_limit=@@session.sql_select_limit; ---error 1227 -SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100; -SELECT @@session.sql_select_limit = @save_select_limit; #shouldn't have changed -# While we are here we also test that SQL_LOG_BIN can't be set ---error 1227 -SET @@session.sql_select_limit=10, @@session.sql_log_bin=0; -SELECT @@session.sql_select_limit = @save_select_limit; #shouldn't have changed -# Now as root, to be sure it works -connection con2; -SET @@session.pseudo_thread_id=100; -SET @@session.pseudo_thread_id=connection_id(); -SET @@session.sql_log_bin=0; -SET @@session.sql_log_bin=1; - -connection con3; -let $VERSION=`select version()`; - ---disable_warnings -drop table if exists t1,t2; ---enable_warnings - -create table t1(f int); -create table t2(f int); -insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); - -connection con1; -create temporary table t3(f int); -insert into t3 select * from t1 where f<6; -sleep 1; - -connection con2; -create temporary table t3(f int); -sleep 1; - -connection con1; -insert into t2 select count(*) from t3; -sleep 1; - -connection con2; -insert into t3 select * from t1 where f>=4; -sleep 1; - -connection con1; -drop temporary table t3; -sleep 1; - -connection con2; -insert into t2 select count(*) from t3; -drop temporary table t3; - -select * from t2 ORDER BY f; - -# Commented out 8/30/2005 to make compatable with both sbr and rbr -#--replace_result $VERSION VERSION -#--replace_column 2 # 5 # -#show binlog events; - -drop table t1, t2; - -use test; -SET TIMESTAMP=1040323920; -create table t1(f int); -SET TIMESTAMP=1040323931; -create table t2(f int); -SET TIMESTAMP=1040323938; -insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); - -SET TIMESTAMP=1040323945; -SET @@session.pseudo_thread_id=1; -create temporary table t3(f int); -SET TIMESTAMP=1040323952; -SET @@session.pseudo_thread_id=1; -insert into t3 select * from t1 where f<6; -SET TIMESTAMP=1040324145; -SET @@session.pseudo_thread_id=2; -create temporary table t3(f int); -SET TIMESTAMP=1040324186; -SET @@session.pseudo_thread_id=1; -insert into t2 select count(*) from t3; -SET TIMESTAMP=1040324200; -SET @@session.pseudo_thread_id=2; -insert into t3 select * from t1 where f>=4; -SET TIMESTAMP=1040324211; -SET @@session.pseudo_thread_id=1; -drop temporary table t3; -SET TIMESTAMP=1040324219; -SET @@session.pseudo_thread_id=2; -insert into t2 select count(*) from t3; -SET TIMESTAMP=1040324224; -SET @@session.pseudo_thread_id=2; -drop temporary table t3; - -select * from t2 ORDER BY f; -drop table t1,t2; - -# Create last a temporary table that is not dropped at end to ensure that we -# don't get any memory leaks for this - -create temporary table t3 (f int); -sync_with_master; - -# The server will now close done - -# -# Bug#17284 erroneous temp table cleanup on slave -# - -connection master; -create temporary table t4 (f int); -create table t5 (f int); -sync_with_master; -# find dumper's $id -select id from information_schema.processlist where command='Binlog Dump' into @id; -kill @id; # to stimulate reconnection by slave w/o timeout -insert into t5 select * from t4; -save_master_pos; - -connection slave; -sync_with_master; -select * from t5 /* must be 1 after reconnection */; - -connection master; -drop temporary table t4; -drop table t5; - -# -# BUG#17263 incorrect generation DROP temp tables -# Temporary tables of connection are dropped in batches -# where a batch correspond to pseudo_thread_id -# value was set up at the moment of temp table creation -# -connection con1; -set @@session.pseudo_thread_id=100; -create temporary table t101 (id int); -create temporary table t102 (id int); -set @@session.pseudo_thread_id=200; -create temporary table t201 (id int); -create temporary table `t``201` (id int); -# emulate internal temp table not to come to binlog -create temporary table `#sql_not_user_table202` (id int); -set @@session.pseudo_thread_id=300; -create temporary table t301 (id int); -create temporary table t302 (id int); -create temporary table `#sql_not_user_table303` (id int); -disconnect con1; - -#now do something to show that slave is ok after DROP temp tables -connection master; -create table t1(f int); -insert into t1 values (1); - -sync_slave_with_master; -#connection slave; -select * from t1 /* must be 1 */; - -connection master; -drop table t1; - -# -#14157: utf8 encoding in binlog without set character_set_client -# ---write_file $MYSQLTEST_VARDIR/tmp/bug14157.sql -create table t1 (a int); -set names latin1; -create temporary table `äöüÄÖÜ` (a int); -insert into `äöüÄÖÜ` values (1); -insert into t1 select * from `äöüÄÖÜ` -EOF ---exec $MYSQL --character-sets-dir=../sql/share/charsets/ --default-character-set=latin1 test < $MYSQLTEST_VARDIR/tmp/bug14157.sql - -sync_slave_with_master; -#connection slave; -select * from t1; - -connection master; -drop table t1; - -# Delete the anonymous users -source include/delete_anonymous_users.inc; - -# End of 5.1 tests diff --git a/mysql-test/t/rpl_timezone-master.opt b/mysql-test/t/rpl_timezone-master.opt deleted file mode 100644 index 8e43bfbbb7e..00000000000 --- a/mysql-test/t/rpl_timezone-master.opt +++ /dev/null @@ -1 +0,0 @@ ---default-time-zone=Europe/Moscow diff --git a/mysql-test/t/rpl_timezone-slave.opt b/mysql-test/t/rpl_timezone-slave.opt deleted file mode 100644 index 191182c329c..00000000000 --- a/mysql-test/t/rpl_timezone-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---default-time-zone=Japan diff --git a/mysql-test/t/rpl_timezone.test b/mysql-test/t/rpl_timezone.test deleted file mode 100644 index 4b8c8152c82..00000000000 --- a/mysql-test/t/rpl_timezone.test +++ /dev/null @@ -1,142 +0,0 @@ -####################################### -# Change Author: JBM -# Change Date: 2006-01-17 -# Change: Added order by -####################################### -# Test of replication of time zones. -###################################### -# There is currently some bug possibly in prepared statements (this -# test fails with --ps-protocol): sys_var_thd_time_zone::value_ptr() -# is called only at prepare time, not at execution time. So, -# thd->time_zone_used is not equal to 1 (it is back to 0, because of -# reset_thd_for_next_command called at execution time), so the -# timezone used in CONVERT_TZ is not binlogged. To debug (by Guilhem -# and possibly Konstantin). - ---disable_ps_protocol - -source include/master-slave.inc; - -# Save original timezone -set @my_time_zone= @@global.time_zone; - -# Some preparations -let $VERSION=`select version()`; -set timestamp=100000000; # for fixed output of mysqlbinlog -create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n)); -create table t2 (t char(32), n int not null auto_increment, PRIMARY KEY(n)); - -connection slave; -select @@time_zone; -#set time_zone='UTC'; -#select @@time_zone; -# -# Let us check how well replication works when we are saving datetime -# value in TIMESTAMP field. -# -connection master; -select @@time_zone; -#set time_zone='UTC'; -#select @@time_zone; -insert into t1 values ('20050101000000', NULL), ('20050611093902',NULL); -insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); -SELECT * FROM t1 ORDER BY n; -sync_slave_with_master; -#set time_zone='UTC'; -SELECT * FROM t1 ORDER BY n; - -# Let us check also that setting of time_zone back to default also works -# well -connection master; -delete from t1; -set time_zone='Europe/Moscow'; -insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); -SELECT * FROM t1 ORDER BY n; -sync_slave_with_master; -set time_zone='Europe/Moscow'; -SELECT * FROM t1 ORDER BY n; -connection master; -# Change Author: JBM -# Change Date: 2005-12-22 -# Change: Comment out the exec of the binlog so test works for both SBR and RBR -#--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -#--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 - -# Let us check with LOAD DATA INFILE -# (we do it after mysqlbinlog because the temp files names are not constant) -connection master; -delete from t1; -set time_zone='UTC'; -load data infile '../std_data_ln/rpl_timezone2.dat' into table t1; -SELECT * FROM t1 ORDER BY n; -sync_slave_with_master; -set time_zone='UTC'; -SELECT * FROM t1 ORDER BY n; -set time_zone='Europe/Moscow'; - -# Put back values of before the LOAD -connection master; -set time_zone='Europe/Moscow'; -delete from t1; -insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL); - -# -# Now let us check how well we replicate statments reading TIMESTAMP fields -# (We should see the same data on master and on slave but it should differ -# from originally inserted) -# -set time_zone='MET'; -insert into t2 (select * from t1); -SELECT * FROM t1 ORDER BY n; -sync_slave_with_master; -SELECT * FROM t2 ORDER BY n; - -# -# Now let us check how well we replicate various CURRENT_* functions -# -connection master; -delete from t2; -set timestamp=1000072000; -insert into t2 values (current_timestamp,NULL), (current_date,NULL), (current_time,NULL); -sync_slave_with_master; -SELECT * FROM t2 ORDER BY n; - -# -# At last let us check replication of FROM_UNIXTIME/UNIX_TIMESTAMP functions. -# -connection master; -delete from t2; -insert into t2 values (from_unixtime(1000000000),NULL), - (unix_timestamp('2001-09-09 03:46:40'),NULL); -SELECT * FROM t2 ORDER BY n; -sync_slave_with_master; -# We should get same result on slave as on master -SELECT * FROM t2 ORDER BY n; - -# -# Let us check that we are allowing to set global time_zone with -# replication -# -connection master; -set global time_zone='MET'; - -# -# Let us see if CONVERT_TZ(@@time_zone) replicates -# -delete from t2; -set time_zone='UTC'; -insert into t2 values(convert_tz('2004-01-01 00:00:00','MET',@@time_zone),NULL); -insert into t2 values(convert_tz('2005-01-01 00:00:00','MET','Japan'),NULL); -SELECT * FROM t2 ORDER BY n; -sync_slave_with_master; -SELECT * FROM t2 ORDER BY n; - -# Clean up -connection master; -drop table t1, t2; -sync_slave_with_master; - - -# Restore original timezone -connection master; -set global time_zone= @my_time_zone; diff --git a/mysql-test/t/rpl_trigger.test b/mysql-test/t/rpl_trigger.test deleted file mode 100644 index 9f5f6fc9b4c..00000000000 --- a/mysql-test/t/rpl_trigger.test +++ /dev/null @@ -1,477 +0,0 @@ -# -# Test of triggers with replication -# Adding statement include due to Bug 12574 -# TODO: Remove statement include once 12574 is patched ---source include/have_binlog_format_mixed_or_statement.inc ---source include/master-slave.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -DROP TABLE IF EXISTS t3; - ---enable_warnings - -# -# #12482: Triggers has side effects with auto_increment values -# - -create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null); -create table t2 (a int auto_increment, primary key (a), b int); -create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null); - -delimiter |; -create trigger t1 before insert on t1 for each row -begin - insert into t3 values (NULL, "t1", new.a, new.b, rand()); -end| - -create trigger t2 after insert on t2 for each row -begin - insert into t3 values (NULL, "t2", new.a, new.b, rand()); -end| -delimiter ;| - -insert into t3 values(100,"log",0,0,0); - -# Ensure we always have same random numbers -SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186; - -# Emulate that we have rows 2-9 deleted on the slave -insert into t1 values(1,1,rand()),(NULL,2,rand()); -insert into t2 (b) values(last_insert_id()); -insert into t2 values(3,0),(NULL,0); -insert into t2 values(NULL,0),(500,0); - -select a,b, truncate(rand_value,4) from t1; -select * from t2; -select a,name, old_a, old_b, truncate(rand_value,4) from t3; -save_master_pos; -connection slave; -sync_with_master; ---disable_query_log -select "--- On slave --" as ""; ---enable_query_log -select a,b, truncate(rand_value,4) from t1; -select * from t2; -select a,name, old_a, old_b, truncate(rand_value,4) from t3; -connection master; -drop table t1,t2,t3; - -# -# #12480: NOW() is not constant in a trigger -# #12481: Using NOW() in a stored function breaks statement based replication -# - -# Start by getting a lock on 'bug12480' to be able to use get_lock() as sleep() -connect (con2,localhost,root,,); -connection con2; -select get_lock("bug12480",2); -connection default; - -create table t1 (a datetime,b datetime, c datetime); ---disable_warnings -drop function if exists bug12480; ---enable_warnings - -delimiter |; - -create function bug12480() returns datetime -begin - set @a=get_lock("bug12480",2); - return now(); -end| - -create trigger t1_first before insert on t1 -for each row begin - set @a=get_lock("bug12480",2); - set new.b= now(); - set new.c= bug12480(); -end -| - -delimiter ;| -insert into t1 set a = now(); -select a=b && a=c from t1; -let $time=`select a from t1`; - -# Check that definer attribute is replicated properly: -# - dump definers on the master; -# - wait for the slave to synchronize with the master; -# - dump definers on the slave; - -SELECT routine_name, definer -FROM information_schema.routines; - -SELECT trigger_name, definer -FROM information_schema.triggers; - -save_master_pos; -connection slave; -sync_with_master; ---disable_query_log -select "--- On slave --" as ""; ---enable_query_log - -# XXX: Definers of stored procedures and functions are not replicated. WL#2897 -# (Complete definer support in the stored routines) addresses this issue. So, -# the result file is expected to be changed after implementation of this WL -# item. - -SELECT routine_name, definer -FROM information_schema.routines; - -SELECT trigger_name, definer -FROM information_schema.triggers; - -select a=b && a=c from t1; ---disable_query_log -eval select a='$time' as 'test' from t1; ---enable_query_log - -connection master; -disconnect con2; - -truncate table t1; -drop trigger t1_first; - -insert into t1 values ("2003-03-03","2003-03-03","2003-03-03"),(bug12480(),bug12480(),bug12480()),(now(),now(),now()); -select a=b && a=c from t1; - -drop function bug12480; -drop table t1; - -# -# #14614: Replication of tables with trigger generates error message if databases is changed -# Note. The error message is emitted by _myfree() using fprintf() to the stderr -# and because of that does not fall into the .result file. -# - -create table t1 (i int); -create table t2 (i int); - -delimiter |; -create trigger tr1 before insert on t1 for each row -begin - insert into t2 values (1); -end| -delimiter ;| - -create database other; -use other; -insert into test.t1 values (1); - -save_master_pos; -connection slave; -sync_with_master; - -connection master; -use test; -drop table t1,t2; -drop database other; - - -# -# Test specific triggers including SELECT into var with replication -# BUG#13227: -# slave performs an update to the replicatable table, t1, -# and modifies its local data, t3, by mean of its local trigger that uses -# another local table t2. -# Expected values are commented into queries. -# -# Body of the test executes in a loop since the problem occurred randomly. -# - -let $max_rows=5; -let $rnd=10; - ---echo test case for BUG#13227 -while ($rnd) -{ - --echo ------------------- - echo $rnd; - --echo ------------------- - -### SETUP - ---disable_warnings - connection master; - eval drop table if exists t1$rnd; - connection slave; - eval drop table if exists t2$rnd,t3$rnd; ---enable_warnings - - connection master; - eval create table t1$rnd (f1 int) /* 2 replicate */; - let $i=$max_rows; - while ($i) - { - eval insert into t1$rnd values (-$i); - dec $i; - } - - sync_slave_with_master; -#connection slave; - eval select * from t1$rnd; - delimiter |; - eval create trigger trg1$rnd before update on t1$rnd /* slave local */ - for each row - begin - DECLARE r integer; - SELECT f2 INTO r FROM t2$rnd where f1=NEW.f1; - INSERT INTO t3$rnd values (r); - end| - delimiter ;| - eval create table t2$rnd (f1 int, f2 int) /* slave local */; - eval create table t3$rnd (f3 int) /* slave local */; - let $i=$max_rows; - while ($i) - { - eval insert into t2$rnd values ($i, $i*100); - dec $i; - } - -### Test - -#connection slave; - -# trigger works as specified when updates from slave - eval select * from t2$rnd; - eval UPDATE t1$rnd SET f1=$max_rows where f1=-$max_rows; - eval SELECT * from t1$rnd /* must be f1 $max_rows, 1 - $max_rows 2 - $max_rows ... -1 */; - eval SELECT * from t3$rnd /* must be f3 $max_rows*100 */; - - connection master; - let $i=$max_rows; - while ($i) - { - eval UPDATE t1$rnd SET f1=$i where f1=-$i; - dec $i; - } - - sync_slave_with_master; -#connection slave; - eval SELECT * from t1$rnd /* must be f1 $max_rows ... 1 */; - eval SELECT * from t3$rnd /* must be f3 $max_rows * 100 ... 100 */; - -### CLEANUP -#connection slave; - eval drop trigger trg1$rnd; - eval drop table t2$rnd,t3$rnd; - - connection master; - eval drop table t1$rnd; - - dec $rnd; -} - - -# -# BUG#16266: Definer is not fully qualified error during replication. -# -# The idea of this test is to emulate replication of a trigger from the old -# master (master w/o "DEFINER in triggers" support) to the new slave and check -# that: -# 1. the trigger on the slave will be replicated w/o errors; -# 2. the trigger on the slave will be non-SUID (will have no DEFINER); -# 3. the trigger can be activated later on the slave w/o errors. -# -# In order to emulate this kind of replication, we make the slave playing the binlog, -# recorded by 5.0.16 master. This binlog contains the following statements: -# CREATE TABLE t1(c INT); -# CREATE TABLE t2(s CHAR(200)); -# CREATE TRIGGER trg1 AFTER INSERT ON t1 -# FOR EACH ROW -# INSERT INTO t2 VALUES(CURRENT_USER()); -# INSERT INTO t1 VALUES(1); -# - -# 1. Check that the trigger's replication is succeeded. - -# Stop the slave. - -connection slave; -STOP SLAVE; - -# Replace master's binlog. - -connection master; -FLUSH LOGS; -exec cp $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLTEST_VARDIR/log/master-bin.000001; - -# Make the slave to replay the new binlog. - -connection slave; -RESET SLAVE; -START SLAVE; - -SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0; - -# Check that the replication succeeded. - -SHOW TABLES LIKE 't_'; -SHOW TRIGGERS; -SELECT * FROM t1; -SELECT * FROM t2; - -# 2. Check that the trigger is non-SUID on the slave; -# 3. Check that the trigger can be activated on the slave. - -INSERT INTO t1 VALUES(2); - -SELECT * FROM t1; -SELECT * FROM t2; - -# That's all, cleanup. - -DROP TRIGGER trg1; -DROP TABLE t1; -DROP TABLE t2; - -STOP SLAVE; -RESET SLAVE; - -# The master should be clean. - -connection master; -SHOW TABLES LIKE 't_'; -SHOW TRIGGERS; - -RESET MASTER; - -# Restart slave. - -connection slave; -START SLAVE; - - -# -# BUG#20438: CREATE statements for views, stored routines and triggers can be -# not replicable. -# - ---echo ---echo ---> Test for BUG#20438 - -# Prepare environment. - ---echo ---echo ---> Preparing environment... ---echo ---> connection: master ---connection master - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; ---enable_warnings - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---echo ---> connection: master ---connection master - -# Test. - ---echo ---echo ---> Creating objects... - -CREATE TABLE t1(c INT); -CREATE TABLE t2(c INT); - -/*!50003 CREATE TRIGGER t1_bi BEFORE INSERT ON t1 - FOR EACH ROW - INSERT INTO t2 VALUES(NEW.c * 10) */; - ---echo ---echo ---> Inserting value... - -INSERT INTO t1 VALUES(1); - ---echo ---echo ---> Checking on master... - -SELECT * FROM t1; -SELECT * FROM t2; - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---> connection: master - ---echo ---echo ---> Checking on slave... - -SELECT * FROM t1; -SELECT * FROM t2; - -# Cleanup. - ---echo ---echo ---> connection: master ---connection master - ---echo ---echo ---> Cleaning up... - -DROP TABLE t1; -DROP TABLE t2; - ---save_master_pos ---connection slave ---sync_with_master ---connection master - -# -# BUG#23703: DROP TRIGGER needs an IF EXISTS -# - -connection master; - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1(a int, b varchar(50)); - --- error ER_TRG_DOES_NOT_EXIST -drop trigger not_a_trigger; - -drop trigger if exists not_a_trigger; - -create trigger t1_bi before insert on t1 -for each row set NEW.b := "In trigger t1_bi"; - -insert into t1 values (1, "a"); -drop trigger if exists t1_bi; -insert into t1 values (2, "b"); -drop trigger if exists t1_bi; -insert into t1 values (3, "c"); - -select * from t1; - -save_master_pos; -connection slave; -sync_with_master; - -select * from t1; - -connection master; - -drop table t1; - -# -# End of tests -# -save_master_pos; -connection slave; -sync_with_master; diff --git a/mysql-test/t/rpl_trunc_temp.test b/mysql-test/t/rpl_trunc_temp.test deleted file mode 100644 index 28bcb0c06c3..00000000000 --- a/mysql-test/t/rpl_trunc_temp.test +++ /dev/null @@ -1,35 +0,0 @@ -# Requires statement logging --- source include/have_binlog_format_mixed_or_statement.inc - -source include/master-slave.inc; - -# -# Bug#17137 Running "truncate table" on temporary table -# leaves the table open on a slave -# - -create temporary table t1 (n int); -insert into t1 values(1); -sync_slave_with_master; -show status like 'Slave_open_temp_tables'; - -# Perform a delete from temp table -connection master; -delete from t1; -sync_slave_with_master; -show status like 'Slave_open_temp_tables'; - -# Perform truncate on temp table -connection master; -truncate t1; -sync_slave_with_master; -show status like 'Slave_open_temp_tables'; - -# Disconnect the master, temp table on slave should dissapear -disconnect master; ---real_sleep 3 # time for DROP to be read by slave -connection slave; -show status like 'Slave_open_temp_tables'; - - -# End of 4.1 tests diff --git a/mysql-test/t/rpl_truncate_2myisam.test b/mysql-test/t/rpl_truncate_2myisam.test deleted file mode 100644 index a0f0ea04f44..00000000000 --- a/mysql-test/t/rpl_truncate_2myisam.test +++ /dev/null @@ -1,4 +0,0 @@ ---source include/not_ndb_default.inc -let $engine=MyISAM; ---source extra/rpl_tests/rpl_truncate.test - diff --git a/mysql-test/t/rpl_truncate_3innodb.test b/mysql-test/t/rpl_truncate_3innodb.test deleted file mode 100644 index a31fd62a29a..00000000000 --- a/mysql-test/t/rpl_truncate_3innodb.test +++ /dev/null @@ -1,6 +0,0 @@ - ---source include/have_innodb.inc ---source include/not_ndb_default.inc - -let $engine=InnoDB; ---source extra/rpl_tests/rpl_truncate.test diff --git a/mysql-test/t/rpl_truncate_7ndb.test b/mysql-test/t/rpl_truncate_7ndb.test deleted file mode 100644 index 1d69eee5dd0..00000000000 --- a/mysql-test/t/rpl_truncate_7ndb.test +++ /dev/null @@ -1,71 +0,0 @@ - ---source include/have_ndb.inc ---source include/master-slave.inc ---source include/have_binlog_format_mixed_or_row.inc - ---disable_query_log ---disable_warnings -connection slave; -STOP SLAVE; -connection master; -DROP TABLE IF EXISTS t1; -RESET MASTER; -connection slave; -DROP TABLE IF EXISTS t1; -RESET SLAVE; -START SLAVE; ---enable_warnings ---enable_query_log - ---echo **** On Master **** -connection master; -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -# This is silly, but NDB doesn't add to the binlog fast enough ---real_sleep 10 -sync_slave_with_master; -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -TRUNCATE TABLE t1; -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -# Should be empty -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DROP TABLE t1; -let SERVER_VERSION=`select version()`; ---replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/ ---replace_result $SERVER_VERSION SERVER_VERSION -SHOW BINLOG EVENTS; - ---echo **** On Master **** -connection master; -CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; -INSERT INTO t1 VALUES (1,1), (2,2); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -INSERT INTO t1 VALUE (3,3); -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DELETE FROM t1; -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Slave **** -sync_slave_with_master; -# Should be empty -SELECT * FROM t1 ORDER BY a,b; ---echo **** On Master **** -connection master; -DROP TABLE t1; ---replace_regex /table_id: [0-9]+/table_id: #/ ---replace_result $SERVER_VERSION SERVER_VERSION -SHOW BINLOG EVENTS; - --- source include/master-slave-end.inc diff --git a/mysql-test/t/rpl_truncate_7ndb_2-master.opt b/mysql-test/t/rpl_truncate_7ndb_2-master.opt deleted file mode 100644 index 01cf3e0520f..00000000000 --- a/mysql-test/t/rpl_truncate_7ndb_2-master.opt +++ /dev/null @@ -1 +0,0 @@ ---binlog-format=mixed diff --git a/mysql-test/t/rpl_truncate_7ndb_2.test b/mysql-test/t/rpl_truncate_7ndb_2.test deleted file mode 100644 index 4ee6c98d463..00000000000 --- a/mysql-test/t/rpl_truncate_7ndb_2.test +++ /dev/null @@ -1,6 +0,0 @@ -# Same test as rpl_truncate_7ndb.test, but with mixed mode -# This is marked with 'big_test' just because the rpl_truncate_7ndb test is -# so slow... - ---source include/big_test.inc ---source t/rpl_truncate_7ndb.test diff --git a/mysql-test/t/rpl_udf-master.opt b/mysql-test/t/rpl_udf-master.opt deleted file mode 100644 index 7d8786c156a..00000000000 --- a/mysql-test/t/rpl_udf-master.opt +++ /dev/null @@ -1 +0,0 @@ -$UDF_EXAMPLE_LIB_OPT diff --git a/mysql-test/t/rpl_udf-slave.opt b/mysql-test/t/rpl_udf-slave.opt deleted file mode 100644 index 7d8786c156a..00000000000 --- a/mysql-test/t/rpl_udf-slave.opt +++ /dev/null @@ -1 +0,0 @@ -$UDF_EXAMPLE_LIB_OPT diff --git a/mysql-test/t/rpl_udf.test b/mysql-test/t/rpl_udf.test deleted file mode 100644 index 262ad04630c..00000000000 --- a/mysql-test/t/rpl_udf.test +++ /dev/null @@ -1,22 +0,0 @@ -################################################################### -# Author: Chuck Bell # -# Date: 2006-12-21 # -# Purpose: To test that UDFs are replicated in both row based and # -# statement based format. This tests work completed in WL#3629. # -################################################################### - ---source include/not_embedded.inc ---source include/master-slave.inc - -let $engine_type= MyISAM; - -set binlog_format=row; - -# Embedded server doesn't support binlogging ---source include/rpl_udf.inc - -set binlog_format=statement; - -# Embedded server doesn't support binlogging ---source include/rpl_udf.inc - diff --git a/mysql-test/t/rpl_user_variables.test b/mysql-test/t/rpl_user_variables.test deleted file mode 100644 index 539f9c88e0d..00000000000 --- a/mysql-test/t/rpl_user_variables.test +++ /dev/null @@ -1,362 +0,0 @@ -################################### -# -# Test of replicating user variables -# -################################### - --- source include/master-slave.inc -# Disable PS as the log positions differs ---disable_ps_protocol - - -# Clean up old slave's binlogs. -# The slave is started with --log-slave-updates -# and this test does SHOW BINLOG EVENTS on the slave's -# binlog. But previous tests can influence the current test's -# binlog (e.g. a temporary table in the previous test has not -# been explicitly deleted, or it has but the slave hasn't had -# enough time to catch it before STOP SLAVE, -# and at the beginning of the current -# test the slave immediately writes DROP TEMPORARY TABLE this_old_table). -# We wait for the slave to have written all he wants to the binlog -# (otherwise RESET MASTER may come too early). -save_master_pos; -connection slave; -sync_with_master; -reset master; -connection master; - -create table t1(n char(30)); -set @i1:=12345678901234, @i2:=-12345678901234, @i3:=0, @i4:=-1; -set @s1:='This is a test', @r1:=12.5, @r2:=-12.5; -set @n1:=null; -set @s2:='', @s3:='abc\'def', @s4:= 'abc\\def', @s5:= 'abc''def'; -insert into t1 values (@i1), (@i2), (@i3), (@i4); -insert into t1 values (@r1), (@r2); -insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5); -insert into t1 values (@n1); -insert into t1 values (@n2); # not explicitely set before -insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1); -insert into t1 values (@a+(@b:=@a+1)); -set @q:='abc'; -insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')); -set @a:=5; -insert into t1 values (@a),(@a); -# To flush the pending event, we add the following statement. RBR can -# concatenate the result of several statements, which SBR cannot. -select * from t1 where n = ''; -connection master1; # see if variable is reset in binlog when thread changes -insert into t1 values (@a),(@a),(@a*5); -SELECT * FROM t1 ORDER BY n; -sync_slave_with_master; -SELECT * FROM t1 ORDER BY n; -connection master; -insert into t1 select * FROM (select @var1 union select @var2) AS t2; -drop table t1; ---echo End of 4.1 tests. - -# BUG#20141 -# The following tests ensure that if user-defined variables are used in SF/Triggers -# that they are replicated correctly. These tests should be run in both SBR and RBR -# modes. - -# This test uses a procedure that inserts data values based on the value of a -# user-defined variable. It also has a trigger that inserts data based on the -# same variable. Successful test runs show that the @var is replicated -# properly and that the procedure and trigger insert the correct data on the -# slave. -# -# The test of stored procedure was included for completeness. Replication of stored -# procedures was not directly affected by BUG#20141. -# -# This test was constructed for BUG#20141 - ---disable_warnings -DROP TABLE IF EXISTS t20; -DROP TABLE IF EXISTS t21; -DROP PROCEDURE IF EXISTS test.insert; ---enable_warnings - -CREATE TABLE t20 (a VARCHAR(20)); -CREATE TABLE t21 (a VARCHAR(20)); -DELIMITER |; - -# Create a procedure that uses the @var for flow control - -CREATE PROCEDURE test.insert() -BEGIN - IF (@VAR) - THEN - INSERT INTO test.t20 VALUES ('SP_TRUE'); - ELSE - INSERT INTO test.t20 VALUES ('SP_FALSE'); - END IF; -END| - -# Create a trigger that uses the @var for flow control - -CREATE TRIGGER test.insert_bi BEFORE INSERT - ON test.t20 FOR EACH ROW - BEGIN - IF (@VAR) - THEN - INSERT INTO test.t21 VALUES ('TRIG_TRUE'); - ELSE - INSERT INTO test.t21 VALUES ('TRIG_FALSE'); - END IF; - END| -DELIMITER ;| - -sync_slave_with_master; -connection master; - -# Set @var and call the procedure, repeat with different values - -SET @VAR=0; -CALL test.insert(); -SET @VAR=1; -CALL test.insert(); - ---echo On master: Check the tables for correct data - -SELECT * FROM t20; -SELECT * FROM t21; - -sync_slave_with_master; - ---echo On slave: Check the tables for correct data and it matches master - -SELECT * FROM t20; -SELECT * FROM t21; -connection master; - -# Cleanup - -DROP TABLE t20; -DROP TABLE t21; -DROP PROCEDURE test.insert; - -# This test uses a stored function that uses user-defined variables to return data -# This test was constructed for BUG#20141 - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP FUNCTION IF EXISTS test.square; ---enable_warnings - -CREATE TABLE t1 (i INT); - -# Create function that returns a value from @var. In this case, the square function - -CREATE FUNCTION test.square() RETURNS INTEGER DETERMINISTIC RETURN -(@var * @var); - -# Set the @var to different values and insert them into a table - -SET @var = 1; -INSERT INTO t1 VALUES (square()); -SET @var = 2; -INSERT INTO t1 VALUES (square()); -SET @var = 3; -INSERT INTO t1 VALUES (square()); -SET @var = 4; -INSERT INTO t1 VALUES (square()); -SET @var = 5; -INSERT INTO t1 VALUES (square()); - ---echo On master: Retrieve the values from the table - -SELECT * FROM t1; - -sync_slave_with_master; - ---echo On slave: Retrieve the values from the table and verify they are the same as on master - -SELECT * FROM t1; - -connection master; - -# Cleanup - -DROP TABLE t1; -DROP FUNCTION test.square; - -# This test uses stored functions that uses user-defined variables to return data -# based on the use of @vars inside a function body. -# This test was constructed for BUG#14914 - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; ---enable_warnings - -CREATE TABLE t1(a int); -DELIMITER |; - -# Create a function that simply returns the value of an @var. -# Create a function that uses an @var for flow control, creates and uses another -# @var and sets its value to a value based on another @var. - -CREATE FUNCTION f1() returns int deterministic BEGIN - return @a; -END | - -CREATE FUNCTION f2() returns int deterministic BEGIN - IF (@b > 0) then - SET @c = (@a + @b); - else - SET @c = (@a - 1); - END if; - return @c; -END | -DELIMITER ;| - -sync_slave_with_master; -connection master; - -# Set an @var to a value and insert data into a table using the first function. -# Set two more @vars to some values and insert data into a table using the second function. - -SET @a=500; -INSERT INTO t1 values(f1()); -SET @b = 125; -SET @c = 1; -INSERT INTO t1 values(f2()); - ---echo On master: Retrieve the values from the table - -sync_slave_with_master; -connection master; - -SELECT * from t1; - -connection slave; - ---echo On slave: Check the tables for correct data and it matches master - -SELECT * from t1; - -connection master; - -# Cleanup - -DROP TABLE t1; -DROP FUNCTION f1; -DROP FUNCTION f2; - -# This test uses a function that changes a user-defined variable in its body. This test -# will ensure the @vars are replicated when needed and not interrupt the normal execution -# of the function on the slave. This also applies to procedures and triggers. - -# This test was constructed for BUG#25167 - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; ---enable_warnings -CREATE TABLE t1 (i int); -CREATE TABLE t2 (k int); -DELIMITER |; - -# Create a trigger that inserts data into another table, changes the @var then inserts -# another row with the modified value. - -CREATE trigger t1_bi before INSERT on t1 for each row BEGIN - INSERT INTO t2 values (@a); - SET @a:=42; - INSERT INTO t2 values (@a); -END | -DELIMITER ;| - -sync_slave_with_master; -connection master; - -# Set the @var to a value then insert data into first table. - -SET @a:=100; -INSERT INTO t1 values (5); - ---echo On master: Check to see that data was inserted correctly in both tables - -SELECT * from t1; -SELECT * from t2; - -sync_slave_with_master; - ---echo On slave: Check the tables for correct data and it matches master - -SELECT * from t1; -SELECT * from t2; - -connection master; -drop table t1, t2; - -# -# Bug #12826: Possible to get inconsistent slave using SQL syntax Prepared Statements -# -connection master; -create table t1(a int, b int); -prepare s1 from 'insert into t1 values (@x:=@x+1, ?)'; -set @x=1; execute s1 using @x; -select * from t1; -sync_slave_with_master; -connection slave; -select * from t1; -connection master; -drop table t1; - ---echo End of 5.0 tests. - -# This test uses a stored function that uses user-defined variables to return data -# The test ensures the value of the user-defined variable is replicated correctly -# and in the correct order of assignment. - -# This test was constructed for BUG#20141 - ---disable_warnings -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; ---enable_warnings - -CREATE TABLE t1 (i INT); - -# Create two functions. One simply returns the user-defined variable. The other -# returns a value based on the user-defined variable. - -CREATE FUNCTION f1() RETURNS INT RETURN @a; DELIMITER |; CREATE -FUNCTION f2() RETURNS INT BEGIN - INSERT INTO t1 VALUES (10 + @a); - RETURN 0; -END| -DELIMITER ;| - -sync_slave_with_master; -connection master; - -# Set the variable and execute the functions. - -SET @a:=123; -SELECT f1(), f2(); - ---echo On master: Check to see that data was inserted correctly - -INSERT INTO t1 VALUES(f1()); -SELECT * FROM t1; - -sync_slave_with_master; - ---echo On slave: Check the table for correct data and it matches master - -SELECT * FROM t1; - -connection master; - -# Cleanup - -DROP FUNCTION f1; -DROP FUNCTION f2; -DROP TABLE t1; - -sync_slave_with_master; -stop slave; diff --git a/mysql-test/t/rpl_variables-master.opt b/mysql-test/t/rpl_variables-master.opt deleted file mode 100644 index a668c6bfbe8..00000000000 --- a/mysql-test/t/rpl_variables-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slave-skip-errors=3,100,137,643,1752 diff --git a/mysql-test/t/rpl_variables.test b/mysql-test/t/rpl_variables.test deleted file mode 100644 index 84dc3acfe6e..00000000000 --- a/mysql-test/t/rpl_variables.test +++ /dev/null @@ -1,20 +0,0 @@ -source include/master-slave.inc; - -# Init for rstore of variable values -set @my_slave_net_timeout =@@global.slave_net_timeout; - -set global slave_net_timeout=100; -set global sql_slave_skip_counter=100; - -# End of 4.1 tests - -# BUG #7800: Add various-slave related variables to SHOW VARIABLES -show variables like 'slave_compressed_protocol'; ---replace_column 2 SLAVE_LOAD_TMPDIR -show variables like 'slave_load_tmpdir'; -# We just set some arbitrary values in variables-master.opt so we can test -# that a list of values works correctly -show variables like 'slave_skip_errors'; - -# Cleanup -set global slave_net_timeout=default; diff --git a/mysql-test/t/rpl_view-slave.opt b/mysql-test/t/rpl_view-slave.opt deleted file mode 100644 index 79b3bf6174b..00000000000 --- a/mysql-test/t/rpl_view-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-ignore-table=test.foo diff --git a/mysql-test/t/rpl_view.test b/mysql-test/t/rpl_view.test deleted file mode 100644 index 51ad319b212..00000000000 --- a/mysql-test/t/rpl_view.test +++ /dev/null @@ -1,167 +0,0 @@ -# NYI - row-based cannot use CREATE ... SELECT - -source include/master-slave.inc; ---disable_warnings -drop table if exists t1,v1; -drop view if exists t1,v1; -sync_slave_with_master; -reset master; ---enable_warnings - -# -# Check that creation drop of view is replicated, also check replication of -# updating of view -# -connection master; -create table t1 (a int); -insert into t1 values (1); -create view v1 as select a from t1; -insert into v1 values (2); -select * from v1 order by a; -sync_slave_with_master; -# view already have to be on slave -select * from v1 order by a; -connection master; -update v1 set a=3 where a=1; -select * from v1 order by a; -sync_slave_with_master; -select * from v1 order by a; -connection master; -delete from v1 where a=2; -select * from v1 order by a; -sync_slave_with_master; -select * from v1 order by a; -connection master; -# 'alter view' internally maped to creation, but still check that it works -alter view v1 as select a as b from t1; -sync_slave_with_master; -select * from v1 order by 1; -connection master; -drop view v1; -sync_slave_with_master; -#error, because view have to be removed from slave --- error 1146 -select * from v1 order by a; -connection master; -drop table t1; -sync_slave_with_master; -# Change Author: JBM -# Change Date: 2005-12-22 -# Change: Commented out binlog events to work with SBR and RBR -#--replace_column 2 # 5 # -# show binlog events limit 1,100; - -# -# BUG#20438: CREATE statements for views, stored routines and triggers can be -# not replicable. -# - ---echo ---echo ---> Test for BUG#20438 - -# Prepare environment. - ---echo ---echo ---> Preparing environment... ---echo ---> connection: master ---connection master - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP VIEW IF EXISTS v1; ---enable_warnings - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---echo ---> connection: master ---connection master - -# Test. - ---echo ---echo ---> Creating objects... - -CREATE TABLE t1(c INT); - -/*!50003 CREATE VIEW v1 AS SELECT * FROM t1 */; - ---echo ---echo ---> Inserting value... - -INSERT INTO t1 VALUES(1); - ---echo ---echo ---> Checking on master... - -SELECT * FROM t1; - ---echo ---echo ---> Synchronizing slave with master... - ---save_master_pos ---connection slave ---sync_with_master - ---echo ---> connection: master - ---echo ---echo ---> Checking on slave... - -SELECT * FROM t1; - -# Cleanup. - ---echo ---echo ---> connection: master ---connection master - ---echo ---echo ---> Cleaning up... - -DROP VIEW v1; -DROP TABLE t1; - ---save_master_pos ---connection slave ---sync_with_master ---connection master - -# -# BUG#19419: "VIEW: View that the column name is different -# by master and slave is made". -# -connection master; -create table t1(a int, b int); -insert into t1 values (1, 1), (1, 2), (1, 3); -create view v1(a, b) as select a, sum(b) from t1 group by a; - -sync_slave_with_master; -explain v1; -show create table v1; -select * from v1; - -connection master; -drop table t1; -drop view v1; - -sync_slave_with_master; - -# -# BUG#28244 CREATE VIEW breaks replication when view exists -# -connection master; -CREATE TABLE t1(a INT); -CREATE VIEW v1 AS SELECT * FROM t1; ---error ER_TABLE_EXISTS_ERROR -CREATE VIEW v1 AS SELECT * FROM t1; -DROP VIEW v1; -DROP TABLE t1; -sync_slave_with_master; - ---echo End of 5.0 tests diff --git a/mysql-test/t/strict_autoinc_5ndb.test b/mysql-test/t/strict_autoinc_5ndb.test deleted file mode 100644 index 9e2090fddef..00000000000 --- a/mysql-test/t/strict_autoinc_5ndb.test +++ /dev/null @@ -1,10 +0,0 @@ --- source include/have_ndb.inc - -# -# Bug#20573 Strict mode auto-increment -# - -let $type= 'NDB' ; ---source include/strict_autoinc.inc - -# end of test -- cgit v1.2.1 From 030d98d3971aaabbbeb37ed641629944a97186f5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jun 2007 18:10:19 +0500 Subject: BUG#29299 - repeatable myisam fulltext index corruption Fulltext index may get corrupt by certain gbk characters. The problem was that when skipping leading non-true-word-characters, we assumed that these characters are always 1 byte long. This is not the case with gbk character set, since non-true-word-characters may be 2 bytes long. Affects 5.0 only. myisam/ft_parser.c: Leading non-true-word-characters may also be multi-byte (e.g. in gbk character set). mysql-test/r/fulltext2.result: A test case for BUG#29299. mysql-test/t/fulltext2.test: A test case for BUG#29299. --- mysql-test/r/fulltext2.result | 12 ++++++++++++ mysql-test/t/fulltext2.test | 12 ++++++++++++ 2 files changed, 24 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/fulltext2.result b/mysql-test/r/fulltext2.result index f6a4b20bc22..f6bb4e4965a 100644 --- a/mysql-test/r/fulltext2.result +++ b/mysql-test/r/fulltext2.result @@ -241,3 +241,15 @@ select * from t1 where match a against('ab c' in boolean mode); a drop table t1; set names latin1; +CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); +SET NAMES utf8; +INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); +SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE); +HEX(a) +BEF361616197C22061616161 +DELETE FROM t1 LIMIT 1; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SET NAMES latin1; +DROP TABLE t1; diff --git a/mysql-test/t/fulltext2.test b/mysql-test/t/fulltext2.test index fd97f795534..99209dc8543 100644 --- a/mysql-test/t/fulltext2.test +++ b/mysql-test/t/fulltext2.test @@ -220,4 +220,16 @@ select * from t1 where match a against('ab c' in boolean mode); drop table t1; set names latin1; +# +# BUG#29299 - repeatable myisam fulltext index corruption +# +CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); +SET NAMES utf8; +INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); +SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE); +DELETE FROM t1 LIMIT 1; +CHECK TABLE t1; +SET NAMES latin1; +DROP TABLE t1; + # End of 4.1 tests -- cgit v1.2.1 From 530dc0451f2202e5f76ead17169979cfd301a5af Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jun 2007 16:49:32 +0200 Subject: Move disabling of rpl_invoked_features to suite/rpl/t/disabled.def Move tests to their respective suite mysql-test/suite/binlog/t/binlog_innodb.test: Rename: mysql-test/t/binlog_innodb.test -> mysql-test/suite/binlog/t/binlog_innodb.test mysql-test/suite/binlog/r/binlog_innodb.result: Rename: mysql-test/r/binlog_innodb.result -> mysql-test/suite/binlog/r/binlog_innodb.result mysql-test/suite/binlog/t/binlog_multi_engine.test: Rename: mysql-test/t/binlog_multi_engine.test -> mysql-test/suite/binlog/t/binlog_multi_engine.test mysql-test/suite/binlog/r/binlog_multi_engine.result: Rename: mysql-test/r/binlog_multi_engine.result -> mysql-test/suite/binlog/r/binlog_multi_engine.result mysql-test/suite/rpl/t/rpl_grant.test: Rename: mysql-test/t/rpl_grant.test -> mysql-test/suite/rpl/t/rpl_grant.test mysql-test/suite/rpl/t/rpl_invoked_features-master.opt: Rename: mysql-test/t/rpl_invoked_features-master.opt -> mysql-test/suite/rpl/t/rpl_invoked_features-master.opt mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt: Rename: mysql-test/t/rpl_invoked_features-slave.opt -> mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt mysql-test/suite/rpl/t/rpl_invoked_features.test: Rename: mysql-test/t/rpl_invoked_features.test -> mysql-test/suite/rpl/t/rpl_invoked_features.test mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt: Rename: mysql-test/t/rpl_loaddata_fatal-slave.opt -> mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt mysql-test/suite/rpl/t/rpl_loaddata_fatal.test: Rename: mysql-test/t/rpl_loaddata_fatal.test -> mysql-test/suite/rpl/t/rpl_loaddata_fatal.test mysql-test/suite/rpl/t/rpl_slave_skip.test: Rename: mysql-test/t/rpl_slave_skip.test -> mysql-test/suite/rpl/t/rpl_slave_skip.test mysql-test/suite/rpl/r/rpl_grant.result: Rename: mysql-test/r/rpl_grant.result -> mysql-test/suite/rpl/r/rpl_grant.result mysql-test/suite/rpl/r/rpl_invoked_features.result: Rename: mysql-test/r/rpl_invoked_features.result -> mysql-test/suite/rpl/r/rpl_invoked_features.result mysql-test/suite/rpl/r/rpl_loaddata_fatal.result: Rename: mysql-test/r/rpl_loaddata_fatal.result -> mysql-test/suite/rpl/r/rpl_loaddata_fatal.result mysql-test/suite/rpl/r/rpl_slave_skip.result: Rename: mysql-test/r/rpl_slave_skip.result -> mysql-test/suite/rpl/r/rpl_slave_skip.result mysql-test/suite/rpl/t/disabled.def: Move disabling of rpl_invoked_features to suite/rpl/t/disabled.def mysql-test/t/disabled.def: Move disabling of rpl_invoked_features to suite/rpl/t/disabled.def --- mysql-test/r/binlog_innodb.result | 138 ------- mysql-test/r/binlog_multi_engine.result | 86 ---- mysql-test/r/rpl_grant.result | 82 ---- mysql-test/r/rpl_invoked_features.result | 451 --------------------- mysql-test/r/rpl_loaddata_fatal.result | 90 ---- mysql-test/r/rpl_slave_skip.result | 144 ------- mysql-test/suite/binlog/r/binlog_innodb.result | 138 +++++++ .../suite/binlog/r/binlog_multi_engine.result | 86 ++++ mysql-test/suite/binlog/t/binlog_innodb.test | 133 ++++++ mysql-test/suite/binlog/t/binlog_multi_engine.test | 85 ++++ mysql-test/suite/rpl/r/rpl_grant.result | 82 ++++ mysql-test/suite/rpl/r/rpl_invoked_features.result | 451 +++++++++++++++++++++ mysql-test/suite/rpl/r/rpl_loaddata_fatal.result | 90 ++++ mysql-test/suite/rpl/r/rpl_slave_skip.result | 144 +++++++ mysql-test/suite/rpl/t/disabled.def | 1 + mysql-test/suite/rpl/t/rpl_grant.test | 42 ++ .../suite/rpl/t/rpl_invoked_features-master.opt | 1 + .../suite/rpl/t/rpl_invoked_features-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_invoked_features.test | 282 +++++++++++++ .../suite/rpl/t/rpl_loaddata_fatal-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_loaddata_fatal.test | 29 ++ mysql-test/suite/rpl/t/rpl_slave_skip.test | 71 ++++ mysql-test/t/binlog_innodb.test | 133 ------ mysql-test/t/binlog_multi_engine.test | 85 ---- mysql-test/t/disabled.def | 1 - mysql-test/t/rpl_grant.test | 42 -- mysql-test/t/rpl_invoked_features-master.opt | 1 - mysql-test/t/rpl_invoked_features-slave.opt | 1 - mysql-test/t/rpl_invoked_features.test | 282 ------------- mysql-test/t/rpl_loaddata_fatal-slave.opt | 1 - mysql-test/t/rpl_loaddata_fatal.test | 29 -- mysql-test/t/rpl_slave_skip.test | 71 ---- 32 files changed, 1637 insertions(+), 1637 deletions(-) delete mode 100644 mysql-test/r/binlog_innodb.result delete mode 100644 mysql-test/r/binlog_multi_engine.result delete mode 100644 mysql-test/r/rpl_grant.result delete mode 100644 mysql-test/r/rpl_invoked_features.result delete mode 100644 mysql-test/r/rpl_loaddata_fatal.result delete mode 100644 mysql-test/r/rpl_slave_skip.result create mode 100644 mysql-test/suite/binlog/r/binlog_innodb.result create mode 100644 mysql-test/suite/binlog/r/binlog_multi_engine.result create mode 100644 mysql-test/suite/binlog/t/binlog_innodb.test create mode 100644 mysql-test/suite/binlog/t/binlog_multi_engine.test create mode 100644 mysql-test/suite/rpl/r/rpl_grant.result create mode 100644 mysql-test/suite/rpl/r/rpl_invoked_features.result create mode 100644 mysql-test/suite/rpl/r/rpl_loaddata_fatal.result create mode 100644 mysql-test/suite/rpl/r/rpl_slave_skip.result create mode 100644 mysql-test/suite/rpl/t/rpl_grant.test create mode 100644 mysql-test/suite/rpl/t/rpl_invoked_features-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_invoked_features.test create mode 100644 mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_loaddata_fatal.test create mode 100644 mysql-test/suite/rpl/t/rpl_slave_skip.test delete mode 100644 mysql-test/t/binlog_innodb.test delete mode 100644 mysql-test/t/binlog_multi_engine.test delete mode 100644 mysql-test/t/rpl_grant.test delete mode 100644 mysql-test/t/rpl_invoked_features-master.opt delete mode 100644 mysql-test/t/rpl_invoked_features-slave.opt delete mode 100644 mysql-test/t/rpl_invoked_features.test delete mode 100644 mysql-test/t/rpl_loaddata_fatal-slave.opt delete mode 100644 mysql-test/t/rpl_loaddata_fatal.test delete mode 100644 mysql-test/t/rpl_slave_skip.test (limited to 'mysql-test') diff --git a/mysql-test/r/binlog_innodb.result b/mysql-test/r/binlog_innodb.result deleted file mode 100644 index 9dfb6544811..00000000000 --- a/mysql-test/r/binlog_innodb.result +++ /dev/null @@ -1,138 +0,0 @@ -SET BINLOG_FORMAT=MIXED; -RESET MASTER; -CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB; -INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6); -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; -UPDATE t1 SET b = 2*a WHERE a > 1; -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -UPDATE t1 SET b = a * a WHERE a > 3; -COMMIT; -SET BINLOG_FORMAT=STATEMENT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -UPDATE t1 SET b = 1*a WHERE a > 1; -ERROR HY000: Binary logging not possible. Message: Transaction level 'READ-UNCOMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT' -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -UPDATE t1 SET b = 2*a WHERE a > 2; -ERROR HY000: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT' -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; -UPDATE t1 SET b = 3*a WHERE a > 3; -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE t1 SET b = 4*a WHERE a > 4; -COMMIT; -SET BINLOG_FORMAT=MIXED; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -UPDATE t1 SET b = 1*a WHERE a > 1; -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -UPDATE t1 SET b = 2*a WHERE a > 2; -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; -UPDATE t1 SET b = 3*a WHERE a > 3; -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE t1 SET b = 4*a WHERE a > 4; -COMMIT; -SET BINLOG_FORMAT=ROW; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -UPDATE t1 SET b = 1*a WHERE a > 1; -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -UPDATE t1 SET b = 2*a WHERE a > 2; -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; -UPDATE t1 SET b = 3*a WHERE a > 3; -COMMIT; -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE t1 SET b = 4*a WHERE a > 4; -COMMIT; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6) -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 2*a WHERE a > 1 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 3*a WHERE a > 3 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 3*a WHERE a > 3 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ -DROP TABLE t1; -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 13 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 0 -create table t1 (a int) engine=innodb; -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 14 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 1 -begin; -delete from t1; -commit; -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 15 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 1 -drop table t1; -End of tests diff --git a/mysql-test/r/binlog_multi_engine.result b/mysql-test/r/binlog_multi_engine.result deleted file mode 100644 index 71b2d7b0c48..00000000000 --- a/mysql-test/r/binlog_multi_engine.result +++ /dev/null @@ -1,86 +0,0 @@ -CREATE TABLE t1m (m INT, n INT) ENGINE=MYISAM; -CREATE TABLE t1b (b INT, c INT) ENGINE=BLACKHOLE; -CREATE TABLE t1n (e INT, f INT) ENGINE=NDB; -RESET MASTER; -SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; -*** Please look in binlog_multi_engine.test if you have a diff here **** -START TRANSACTION; -INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; -UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; -COMMIT; -TRUNCATE t1m; -TRUNCATE t1b; -TRUNCATE t1n; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) -master-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2) -master-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2) -master-bin.000001 # Query # # use `test`; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f -master-bin.000001 # Query # # use `test`; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; TRUNCATE t1m -master-bin.000001 # Query # # use `test`; TRUNCATE t1b -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1n) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; TRUNCATE t1n -RESET MASTER; -SET SESSION BINLOG_FORMAT=MIXED; -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; -UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; -ERROR HY000: Binary logging not possible. Message: Statement cannot be logged to the binary log in row-based nor statement-based format -TRUNCATE t1m; -TRUNCATE t1b; -TRUNCATE t1n; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) -master-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2) -master-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c -master-bin.000001 # Query # # use `test`; TRUNCATE t1m -master-bin.000001 # Query # # use `test`; TRUNCATE t1b -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1n) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -master-bin.000001 # Query # # use `test`; TRUNCATE t1n -RESET MASTER; -SET SESSION BINLOG_FORMAT=ROW; -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); -ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines -INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; -ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines -UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; -ERROR HY000: Binary logging not possible. Message: Statement cannot be logged to the binary log in row-based nor statement-based format -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Table_map # # table_id: # (test.t1m) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1n) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -RESET MASTER; -DROP TABLE t1m, t1b, t1n; diff --git a/mysql-test/r/rpl_grant.result b/mysql-test/r/rpl_grant.result deleted file mode 100644 index 935d1ca67c7..00000000000 --- a/mysql-test/r/rpl_grant.result +++ /dev/null @@ -1,82 +0,0 @@ -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; -**** On Master **** -CREATE USER dummy@localhost; -CREATE USER dummy1@localhost, dummy2@localhost; -SELECT user, host FROM mysql.user WHERE user != 'root'; -user host -dummy localhost -dummy1 localhost -dummy2 localhost -SELECT COUNT(*) FROM mysql.user; -COUNT(*) -6 -**** On Slave **** -SELECT user,host FROM mysql.user WHERE user != 'root'; -user host -dummy localhost -dummy1 localhost -dummy2 localhost -SELECT COUNT(*) FROM mysql.user; -COUNT(*) -6 -**** On Master **** -DROP USER nonexisting@localhost; -ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost' -DROP USER nonexisting@localhost, dummy@localhost; -ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost' -DROP USER dummy1@localhost, dummy2@localhost; -SELECT user, host FROM mysql.user WHERE user != 'root'; -user host -SELECT COUNT(*) FROM mysql.user; -COUNT(*) -3 -**** On Slave **** -SELECT user,host FROM mysql.user WHERE user != 'root'; -user host -SELECT COUNT(*) FROM mysql.user; -COUNT(*) -3 -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 617 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 617 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -Last_IO_Errno 0 -Last_IO_Error -Last_SQL_Errno 0 -Last_SQL_Error diff --git a/mysql-test/r/rpl_invoked_features.result b/mysql-test/r/rpl_invoked_features.result deleted file mode 100644 index 3bcef762497..00000000000 --- a/mysql-test/r/rpl_invoked_features.result +++ /dev/null @@ -1,451 +0,0 @@ -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; -USE test; -DROP VIEW IF EXISTS v1,v11; -DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p11; -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; -DROP EVENT IF EXISTS e1; -DROP EVENT IF EXISTS e11; - -CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam; -INSERT INTO t1 VALUES (1,1,'1'); -INSERT INTO t1 VALUES (2,2,UUID()); -CREATE TABLE t2 (a INT, b INT, c VARCHAR(64)) ENGINE=myisam; -INSERT INTO t2 VALUES (1,1,'1'); -INSERT INTO t2 VALUES (2,2,UUID()); -CREATE TABLE t11 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=innodb; -INSERT INTO t11 VALUES (1,1,'1'); -INSERT INTO t11 VALUES (2,2,UUID()); -CREATE TABLE t12 (a INT, b INT, c VARCHAR(64)) ENGINE=innodb; -INSERT INTO t12 VALUES (1,1,'1'); -INSERT INTO t12 VALUES (2,2,UUID()); - -CREATE VIEW v1 AS SELECT * FROM t1; -CREATE VIEW v11 AS SELECT * FROM t11; -CREATE TRIGGER t1_tr1 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN -INSERT INTO t2 VALUES (NEW.a, NEW.b, NEW.c); -INSERT INTO t3 VALUES (NEW.a, NEW.b, NEW.c); -END| -CREATE TRIGGER t1_tr2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN -UPDATE t2 SET c = ''; -UPDATE t3 SET c = ''; -END| -CREATE TRIGGER t11_tr1 BEFORE INSERT ON t11 FOR EACH ROW -BEGIN -INSERT INTO t12 VALUES (NEW.a, NEW.b, NEW.c); -INSERT INTO t13 VALUES (NEW.a, NEW.b, NEW.c); -END| -CREATE TRIGGER t11_tr2 BEFORE UPDATE ON t11 FOR EACH ROW -BEGIN -UPDATE t12 SET c = ''; -UPDATE t13 SET c = ''; -END| -CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND ENABLE DO -BEGIN -DECLARE c INT; -SELECT a INTO c FROM t1 WHERE a < 11 ORDER BY a DESC LIMIT 1; -IF c = 7 THEN -CALL p1(10, ''); -END IF; -END| -CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND ENABLE DO -BEGIN -DECLARE c INT; -SELECT a INTO c FROM t11 WHERE a < 11 ORDER BY a DESC LIMIT 1; -IF c = 7 THEN -CALL p11(10, ''); -END IF; -END| -CREATE FUNCTION f1 (x INT) RETURNS VARCHAR(64) -BEGIN -IF x > 5 THEN -RETURN UUID(); -END IF; -RETURN ''; -END| -CREATE FUNCTION f2 (x INT) RETURNS VARCHAR(64) -BEGIN -RETURN f1(x); -END| -CREATE PROCEDURE p1 (IN x INT, IN y VARCHAR(64)) -BEGIN -INSERT INTO t1 VALUES (x,x,y); -END| -CREATE PROCEDURE p11 (IN x INT, IN y VARCHAR(64)) -BEGIN -INSERT INTO t11 VALUES (x,x,y); -END| - -CREATE TABLE t3 SELECT * FROM v1; -INSERT INTO t1 VALUES (3,3,''); -UPDATE t1 SET c='2' WHERE a = 1; -INSERT INTO t1 VALUES(4,4,f1(4)); -INSERT INTO t1 VALUES (100,100,''); -CALL p1(5, UUID()); -INSERT INTO t1 VALUES (101,101,''); -INSERT INTO t1 VALUES(6,6,f1(6)); -INSERT INTO t1 VALUES (102,102,''); -INSERT INTO t1 VALUES(7,7,f2(7)); -INSERT INTO t1 VALUES (103,103,''); - -CREATE TABLE t13 SELECT * FROM v11; -INSERT INTO t11 VALUES (3,3,''); -UPDATE t11 SET c='2' WHERE a = 1; -INSERT INTO t11 VALUES(4,4,f1(4)); -INSERT INTO t11 VALUES (100,100,''); -CALL p11(5, UUID()); -INSERT INTO t11 VALUES (101,101,''); -INSERT INTO t11 VALUES(6,6,f1(6)); -INSERT INTO t11 VALUES (102,102,''); -INSERT INTO t11 VALUES(7,7,f2(7)); -INSERT INTO t11 VALUES (103,103,''); - -SET GLOBAL EVENT_SCHEDULER = on; -SET GLOBAL EVENT_SCHEDULER = off; - -SHOW TABLES LIKE 't%'; -Tables_in_test (t%) -t1 -t11 -t12 -t13 -t2 -t3 -SELECT table_name FROM information_schema.views WHERE table_schema='test'; -table_name -v1 -v11 -SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; -trigger_name event_manipulation event_object_table -t1_tr1 INSERT t1 -t1_tr2 UPDATE t1 -t11_tr1 INSERT t11 -t11_tr2 UPDATE t11 -SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; -routine_type routine_name -FUNCTION f1 -FUNCTION f2 -PROCEDURE p1 -PROCEDURE p11 -SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; -event_name status -e1 ENABLED -e11 ENABLED - -SELECT COUNT(*) FROM t1; -COUNT(*) -12 -SELECT a,b FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT COUNT(*) FROM t2; -COUNT(*) -12 -SELECT a,b FROM t2 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT COUNT(*) FROM t3; -COUNT(*) -12 -SELECT a,b FROM t3 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT a,b FROM v1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT COUNT(*) FROM t11; -COUNT(*) -12 -SELECT a,b FROM t11 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT COUNT(*) FROM t12; -COUNT(*) -12 -SELECT a,b FROM t12 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT COUNT(*) FROM t13; -COUNT(*) -12 -SELECT a,b FROM t13 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT a,b FROM v11 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 - -SHOW TABLES LIKE 't%'; -Tables_in_test (t%) -t1 -t11 -t12 -t13 -t2 -t3 -SELECT table_name FROM information_schema.views WHERE table_schema='test'; -table_name -v1 -v11 -SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; -trigger_name event_manipulation event_object_table -t1_tr1 INSERT t1 -t1_tr2 UPDATE t1 -t11_tr1 INSERT t11 -t11_tr2 UPDATE t11 -SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; -routine_type routine_name -FUNCTION f1 -FUNCTION f2 -PROCEDURE p1 -PROCEDURE p11 -SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; -event_name status -e1 SLAVESIDE_DISABLED -e11 SLAVESIDE_DISABLED - -SELECT COUNT(*) FROM t1; -COUNT(*) -12 -SELECT a,b FROM t1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT COUNT(*) FROM t2; -COUNT(*) -12 -SELECT a,b FROM t2 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT COUNT(*) FROM t3; -COUNT(*) -12 -SELECT a,b FROM t3 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT a,b FROM v1 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT COUNT(*) FROM t11; -COUNT(*) -12 -SELECT a,b FROM t11 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT COUNT(*) FROM t12; -COUNT(*) -12 -SELECT a,b FROM t12 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT COUNT(*) FROM t13; -COUNT(*) -12 -SELECT a,b FROM t13 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 -SELECT a,b FROM v11 ORDER BY a; -a b -1 1 -2 2 -3 3 -4 4 -5 5 -6 6 -7 7 -10 10 -100 100 -101 101 -102 102 -103 103 - -UPDATE t1 SET c=''; -UPDATE t2 SET c=''; -UPDATE t3 SET c=''; -UPDATE t11 SET c=''; -UPDATE t12 SET c=''; -UPDATE t13 SET c=''; - - - -DROP VIEW IF EXISTS v1,v11; -DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p11; -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; -DROP EVENT IF EXISTS e1; -DROP EVENT IF EXISTS e11; diff --git a/mysql-test/r/rpl_loaddata_fatal.result b/mysql-test/r/rpl_loaddata_fatal.result deleted file mode 100644 index 6c73c275ff0..00000000000 --- a/mysql-test/r/rpl_loaddata_fatal.result +++ /dev/null @@ -1,90 +0,0 @@ -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; -CREATE TABLE t1 (a INT, b INT); -INSERT INTO t1 VALUES (1,10); -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 290 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 290 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -Last_IO_Errno # -Last_IO_Error # -Last_SQL_Errno 0 -Last_SQL_Error -LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1; -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 465 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 1590 -Last_Error Fatal error: Not enough memory -Skip_Counter 0 -Exec_Master_Log_Pos 325 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -Last_IO_Errno # -Last_IO_Error # -Last_SQL_Errno 1590 -Last_SQL_Error Fatal error: Not enough memory -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; -DROP TABLE t1; diff --git a/mysql-test/r/rpl_slave_skip.result b/mysql-test/r/rpl_slave_skip.result deleted file mode 100644 index b99ae3ad94a..00000000000 --- a/mysql-test/r/rpl_slave_skip.result +++ /dev/null @@ -1,144 +0,0 @@ -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; -**** On Slave **** -STOP SLAVE; -**** On Master **** -SET SESSION BINLOG_FORMAT=ROW; -CREATE TABLE t1 (a INT, b INT); -CREATE TABLE t2 (c INT, d INT); -INSERT INTO t1 VALUES (1,1),(2,4),(3,9); -INSERT INTO t2 VALUES (1,1),(2,8),(3,27); -UPDATE t1,t2 SET b = d, d = b * 2 WHERE a = c; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) -master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (c INT, d INT) -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Table_map # # table_id: # (test.t2) -master-bin.000001 # Update_rows # # table_id: # -master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F -SELECT * FROM t1; -a b -1 1 -2 8 -3 27 -SELECT * FROM t2; -c d -1 2 -2 16 -3 54 -**** On Slave **** -START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=484; -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 714 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running No -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 484 -Relay_Log_Space # -Until_Condition Master -Until_Log_File master-bin.000001 -Until_Log_Pos 484 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -Last_IO_Errno # -Last_IO_Error # -Last_SQL_Errno 0 -Last_SQL_Error -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; -SELECT * FROM t1; -a b -1 1 -2 4 -3 9 -SELECT * FROM t2; -c d -1 1 -2 8 -3 27 -STOP SLAVE; -RESET SLAVE; -RESET MASTER; -SET SESSION BINLOG_FORMAT=STATEMENT; -SET @foo = 12; -INSERT INTO t1 VALUES(@foo, 2*@foo); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # User var # # @`foo`=12 -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(@foo, 2*@foo) -START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106; -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; -SHOW SLAVE STATUS; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_PORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos 248 -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos 248 -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -Last_IO_Errno # -Last_IO_Error # -Last_SQL_Errno 0 -Last_SQL_Error -**** On Master **** -DROP TABLE t1, t2; diff --git a/mysql-test/suite/binlog/r/binlog_innodb.result b/mysql-test/suite/binlog/r/binlog_innodb.result new file mode 100644 index 00000000000..9dfb6544811 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_innodb.result @@ -0,0 +1,138 @@ +SET BINLOG_FORMAT=MIXED; +RESET MASTER; +CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB; +INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6); +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; +UPDATE t1 SET b = 2*a WHERE a > 1; +COMMIT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +UPDATE t1 SET b = a * a WHERE a > 3; +COMMIT; +SET BINLOG_FORMAT=STATEMENT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +UPDATE t1 SET b = 1*a WHERE a > 1; +ERROR HY000: Binary logging not possible. Message: Transaction level 'READ-UNCOMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT' +COMMIT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +UPDATE t1 SET b = 2*a WHERE a > 2; +ERROR HY000: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT' +COMMIT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; +UPDATE t1 SET b = 3*a WHERE a > 3; +COMMIT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; +UPDATE t1 SET b = 4*a WHERE a > 4; +COMMIT; +SET BINLOG_FORMAT=MIXED; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +UPDATE t1 SET b = 1*a WHERE a > 1; +COMMIT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +UPDATE t1 SET b = 2*a WHERE a > 2; +COMMIT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; +UPDATE t1 SET b = 3*a WHERE a > 3; +COMMIT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; +UPDATE t1 SET b = 4*a WHERE a > 4; +COMMIT; +SET BINLOG_FORMAT=ROW; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +UPDATE t1 SET b = 1*a WHERE a > 1; +COMMIT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +UPDATE t1 SET b = 2*a WHERE a > 2; +COMMIT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; +UPDATE t1 SET b = 3*a WHERE a > 3; +COMMIT; +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; +UPDATE t1 SET b = 4*a WHERE a > 4; +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 2*a WHERE a > 1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 3*a WHERE a > 3 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 3*a WHERE a > 3 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; UPDATE t1 SET b = 4*a WHERE a > 4 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Xid # # COMMIT /* XID */ +DROP TABLE t1; +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 13 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 0 +create table t1 (a int) engine=innodb; +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 14 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 1 +begin; +delete from t1; +commit; +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 15 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 1 +drop table t1; +End of tests diff --git a/mysql-test/suite/binlog/r/binlog_multi_engine.result b/mysql-test/suite/binlog/r/binlog_multi_engine.result new file mode 100644 index 00000000000..71b2d7b0c48 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_multi_engine.result @@ -0,0 +1,86 @@ +CREATE TABLE t1m (m INT, n INT) ENGINE=MYISAM; +CREATE TABLE t1b (b INT, c INT) ENGINE=BLACKHOLE; +CREATE TABLE t1n (e INT, f INT) ENGINE=NDB; +RESET MASTER; +SET SESSION BINLOG_FORMAT=STATEMENT; +INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); +UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; +*** Please look in binlog_multi_engine.test if you have a diff here **** +START TRANSACTION; +INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); +UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; +UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; +COMMIT; +TRUNCATE t1m; +TRUNCATE t1b; +TRUNCATE t1n; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) +master-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2) +master-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2) +master-bin.000001 # Query # # use `test`; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f +master-bin.000001 # Query # # use `test`; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c +master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; TRUNCATE t1m +master-bin.000001 # Query # # use `test`; TRUNCATE t1b +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1n) +master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # use `test`; TRUNCATE t1n +RESET MASTER; +SET SESSION BINLOG_FORMAT=MIXED; +INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); +UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; +UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; +ERROR HY000: Binary logging not possible. Message: Statement cannot be logged to the binary log in row-based nor statement-based format +TRUNCATE t1m; +TRUNCATE t1b; +TRUNCATE t1n; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) +master-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2) +master-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c +master-bin.000001 # Query # # use `test`; TRUNCATE t1m +master-bin.000001 # Query # # use `test`; TRUNCATE t1b +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1n) +master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # use `test`; TRUNCATE t1n +RESET MASTER; +SET SESSION BINLOG_FORMAT=ROW; +INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); +ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines +INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); +UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; +ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines +UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; +ERROR HY000: Binary logging not possible. Message: Statement cannot be logged to the binary log in row-based nor statement-based format +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Table_map # # table_id: # (test.t1m) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1n) +master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +RESET MASTER; +DROP TABLE t1m, t1b, t1n; diff --git a/mysql-test/suite/binlog/t/binlog_innodb.test b/mysql-test/suite/binlog/t/binlog_innodb.test new file mode 100644 index 00000000000..3bad61db23a --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_innodb.test @@ -0,0 +1,133 @@ +source include/have_innodb.inc; +source include/have_log_bin.inc; + +SET BINLOG_FORMAT=MIXED; + +RESET MASTER; + +CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB; +INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6); + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; +# Should be logged as statement +UPDATE t1 SET b = 2*a WHERE a > 1; +COMMIT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +# Should be logged as rows +UPDATE t1 SET b = a * a WHERE a > 3; +COMMIT; + +# Check that errors are generated when trying to use READ COMMITTED +# transaction isolation level in STATEMENT binlog mode. + +SET BINLOG_FORMAT=STATEMENT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +error ER_BINLOG_LOGGING_IMPOSSIBLE; +UPDATE t1 SET b = 1*a WHERE a > 1; +COMMIT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +error ER_BINLOG_LOGGING_IMPOSSIBLE; +UPDATE t1 SET b = 2*a WHERE a > 2; +COMMIT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; +UPDATE t1 SET b = 3*a WHERE a > 3; +COMMIT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; +UPDATE t1 SET b = 4*a WHERE a > 4; +COMMIT; + +SET BINLOG_FORMAT=MIXED; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +UPDATE t1 SET b = 1*a WHERE a > 1; +COMMIT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +UPDATE t1 SET b = 2*a WHERE a > 2; +COMMIT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; +UPDATE t1 SET b = 3*a WHERE a > 3; +COMMIT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; +UPDATE t1 SET b = 4*a WHERE a > 4; +COMMIT; + +SET BINLOG_FORMAT=ROW; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +UPDATE t1 SET b = 1*a WHERE a > 1; +COMMIT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +UPDATE t1 SET b = 2*a WHERE a > 2; +COMMIT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; +UPDATE t1 SET b = 3*a WHERE a > 3; +COMMIT; + +BEGIN; +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; +UPDATE t1 SET b = 4*a WHERE a > 4; +COMMIT; + +source include/show_binlog_events.inc; + +DROP TABLE t1; + + +# +# Let us test binlog_cache_use and binlog_cache_disk_use status vars. +# Actually this test has nothing to do with innodb per se, it just requires +# transactional table. +# +show status like "binlog_cache_use"; +show status like "binlog_cache_disk_use"; + +create table t1 (a int) engine=innodb; + +# Now we are going to create transaction which is long enough so its +# transaction binlog will be flushed to disk... +let $1=2000; +disable_query_log; +begin; +while ($1) +{ + eval insert into t1 values( $1 ); + dec $1; +} +commit; +enable_query_log; +show status like "binlog_cache_use"; +show status like "binlog_cache_disk_use"; + +# Transaction which should not be flushed to disk and so should not +# increase binlog_cache_disk_use. +begin; +delete from t1; +commit; +show status like "binlog_cache_use"; +show status like "binlog_cache_disk_use"; +drop table t1; + +--echo End of tests diff --git a/mysql-test/suite/binlog/t/binlog_multi_engine.test b/mysql-test/suite/binlog/t/binlog_multi_engine.test new file mode 100644 index 00000000000..6614b9e5d44 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_multi_engine.test @@ -0,0 +1,85 @@ +source include/have_blackhole.inc; +source include/have_ndb.inc; +source include/have_binlog_format_mixed_or_row.inc; + +CREATE TABLE t1m (m INT, n INT) ENGINE=MYISAM; +CREATE TABLE t1b (b INT, c INT) ENGINE=BLACKHOLE; +CREATE TABLE t1n (e INT, f INT) ENGINE=NDB; + +RESET MASTER; + +SET SESSION BINLOG_FORMAT=STATEMENT; + +INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); + +UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; + +# I cannot use these statements since the rows logged to the NDB table +# eventually shows up in the binary log. I use them anyway, since once +# BUG#29222 is fixed, there will be a difference here. +echo *** Please look in binlog_multi_engine.test if you have a diff here ****; +START TRANSACTION; +INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); +UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; +UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; +COMMIT; + +TRUNCATE t1m; +TRUNCATE t1b; +TRUNCATE t1n; + +source include/show_binlog_events.inc; + +RESET MASTER; + +SET SESSION BINLOG_FORMAT=MIXED; + +INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); + +UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; + +# Not possible to test this since NDB writes its own binlog, which +# might cause it to be out of sync with the results from MyISAM. +# This will generate an error once BUG#28722 is fixed. + +#UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; + +error ER_BINLOG_LOGGING_IMPOSSIBLE; +UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; + +TRUNCATE t1m; +TRUNCATE t1b; +TRUNCATE t1n; + +source include/show_binlog_events.inc; + +RESET MASTER; + +SET SESSION BINLOG_FORMAT=ROW; + +INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); +error ER_BINLOG_LOGGING_IMPOSSIBLE; +INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); + +error ER_BINLOG_LOGGING_IMPOSSIBLE; +UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; + +# Not possible to test this since NDB writes its own binlog, which +# might cause it to be out of sync with the results from MyISAM. +# This will generate an error once BUG#28722 is fixed. + +#UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; + +error ER_BINLOG_LOGGING_IMPOSSIBLE; +UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; + +source include/show_binlog_events.inc; + +RESET MASTER; + +DROP TABLE t1m, t1b, t1n; + diff --git a/mysql-test/suite/rpl/r/rpl_grant.result b/mysql-test/suite/rpl/r/rpl_grant.result new file mode 100644 index 00000000000..935d1ca67c7 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_grant.result @@ -0,0 +1,82 @@ +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; +**** On Master **** +CREATE USER dummy@localhost; +CREATE USER dummy1@localhost, dummy2@localhost; +SELECT user, host FROM mysql.user WHERE user != 'root'; +user host +dummy localhost +dummy1 localhost +dummy2 localhost +SELECT COUNT(*) FROM mysql.user; +COUNT(*) +6 +**** On Slave **** +SELECT user,host FROM mysql.user WHERE user != 'root'; +user host +dummy localhost +dummy1 localhost +dummy2 localhost +SELECT COUNT(*) FROM mysql.user; +COUNT(*) +6 +**** On Master **** +DROP USER nonexisting@localhost; +ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost' +DROP USER nonexisting@localhost, dummy@localhost; +ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost' +DROP USER dummy1@localhost, dummy2@localhost; +SELECT user, host FROM mysql.user WHERE user != 'root'; +user host +SELECT COUNT(*) FROM mysql.user; +COUNT(*) +3 +**** On Slave **** +SELECT user,host FROM mysql.user WHERE user != 'root'; +user host +SELECT COUNT(*) FROM mysql.user; +COUNT(*) +3 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 617 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 617 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 0 +Last_SQL_Error diff --git a/mysql-test/suite/rpl/r/rpl_invoked_features.result b/mysql-test/suite/rpl/r/rpl_invoked_features.result new file mode 100644 index 00000000000..3bcef762497 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_invoked_features.result @@ -0,0 +1,451 @@ +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; +USE test; +DROP VIEW IF EXISTS v1,v11; +DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p11; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +DROP EVENT IF EXISTS e1; +DROP EVENT IF EXISTS e11; + +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam; +INSERT INTO t1 VALUES (1,1,'1'); +INSERT INTO t1 VALUES (2,2,UUID()); +CREATE TABLE t2 (a INT, b INT, c VARCHAR(64)) ENGINE=myisam; +INSERT INTO t2 VALUES (1,1,'1'); +INSERT INTO t2 VALUES (2,2,UUID()); +CREATE TABLE t11 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=innodb; +INSERT INTO t11 VALUES (1,1,'1'); +INSERT INTO t11 VALUES (2,2,UUID()); +CREATE TABLE t12 (a INT, b INT, c VARCHAR(64)) ENGINE=innodb; +INSERT INTO t12 VALUES (1,1,'1'); +INSERT INTO t12 VALUES (2,2,UUID()); + +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE VIEW v11 AS SELECT * FROM t11; +CREATE TRIGGER t1_tr1 BEFORE INSERT ON t1 FOR EACH ROW +BEGIN +INSERT INTO t2 VALUES (NEW.a, NEW.b, NEW.c); +INSERT INTO t3 VALUES (NEW.a, NEW.b, NEW.c); +END| +CREATE TRIGGER t1_tr2 BEFORE UPDATE ON t1 FOR EACH ROW +BEGIN +UPDATE t2 SET c = ''; +UPDATE t3 SET c = ''; +END| +CREATE TRIGGER t11_tr1 BEFORE INSERT ON t11 FOR EACH ROW +BEGIN +INSERT INTO t12 VALUES (NEW.a, NEW.b, NEW.c); +INSERT INTO t13 VALUES (NEW.a, NEW.b, NEW.c); +END| +CREATE TRIGGER t11_tr2 BEFORE UPDATE ON t11 FOR EACH ROW +BEGIN +UPDATE t12 SET c = ''; +UPDATE t13 SET c = ''; +END| +CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND ENABLE DO +BEGIN +DECLARE c INT; +SELECT a INTO c FROM t1 WHERE a < 11 ORDER BY a DESC LIMIT 1; +IF c = 7 THEN +CALL p1(10, ''); +END IF; +END| +CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND ENABLE DO +BEGIN +DECLARE c INT; +SELECT a INTO c FROM t11 WHERE a < 11 ORDER BY a DESC LIMIT 1; +IF c = 7 THEN +CALL p11(10, ''); +END IF; +END| +CREATE FUNCTION f1 (x INT) RETURNS VARCHAR(64) +BEGIN +IF x > 5 THEN +RETURN UUID(); +END IF; +RETURN ''; +END| +CREATE FUNCTION f2 (x INT) RETURNS VARCHAR(64) +BEGIN +RETURN f1(x); +END| +CREATE PROCEDURE p1 (IN x INT, IN y VARCHAR(64)) +BEGIN +INSERT INTO t1 VALUES (x,x,y); +END| +CREATE PROCEDURE p11 (IN x INT, IN y VARCHAR(64)) +BEGIN +INSERT INTO t11 VALUES (x,x,y); +END| + +CREATE TABLE t3 SELECT * FROM v1; +INSERT INTO t1 VALUES (3,3,''); +UPDATE t1 SET c='2' WHERE a = 1; +INSERT INTO t1 VALUES(4,4,f1(4)); +INSERT INTO t1 VALUES (100,100,''); +CALL p1(5, UUID()); +INSERT INTO t1 VALUES (101,101,''); +INSERT INTO t1 VALUES(6,6,f1(6)); +INSERT INTO t1 VALUES (102,102,''); +INSERT INTO t1 VALUES(7,7,f2(7)); +INSERT INTO t1 VALUES (103,103,''); + +CREATE TABLE t13 SELECT * FROM v11; +INSERT INTO t11 VALUES (3,3,''); +UPDATE t11 SET c='2' WHERE a = 1; +INSERT INTO t11 VALUES(4,4,f1(4)); +INSERT INTO t11 VALUES (100,100,''); +CALL p11(5, UUID()); +INSERT INTO t11 VALUES (101,101,''); +INSERT INTO t11 VALUES(6,6,f1(6)); +INSERT INTO t11 VALUES (102,102,''); +INSERT INTO t11 VALUES(7,7,f2(7)); +INSERT INTO t11 VALUES (103,103,''); + +SET GLOBAL EVENT_SCHEDULER = on; +SET GLOBAL EVENT_SCHEDULER = off; + +SHOW TABLES LIKE 't%'; +Tables_in_test (t%) +t1 +t11 +t12 +t13 +t2 +t3 +SELECT table_name FROM information_schema.views WHERE table_schema='test'; +table_name +v1 +v11 +SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; +trigger_name event_manipulation event_object_table +t1_tr1 INSERT t1 +t1_tr2 UPDATE t1 +t11_tr1 INSERT t11 +t11_tr2 UPDATE t11 +SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; +routine_type routine_name +FUNCTION f1 +FUNCTION f2 +PROCEDURE p1 +PROCEDURE p11 +SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; +event_name status +e1 ENABLED +e11 ENABLED + +SELECT COUNT(*) FROM t1; +COUNT(*) +12 +SELECT a,b FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT COUNT(*) FROM t2; +COUNT(*) +12 +SELECT a,b FROM t2 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT COUNT(*) FROM t3; +COUNT(*) +12 +SELECT a,b FROM t3 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT a,b FROM v1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT COUNT(*) FROM t11; +COUNT(*) +12 +SELECT a,b FROM t11 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT COUNT(*) FROM t12; +COUNT(*) +12 +SELECT a,b FROM t12 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT COUNT(*) FROM t13; +COUNT(*) +12 +SELECT a,b FROM t13 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT a,b FROM v11 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 + +SHOW TABLES LIKE 't%'; +Tables_in_test (t%) +t1 +t11 +t12 +t13 +t2 +t3 +SELECT table_name FROM information_schema.views WHERE table_schema='test'; +table_name +v1 +v11 +SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; +trigger_name event_manipulation event_object_table +t1_tr1 INSERT t1 +t1_tr2 UPDATE t1 +t11_tr1 INSERT t11 +t11_tr2 UPDATE t11 +SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; +routine_type routine_name +FUNCTION f1 +FUNCTION f2 +PROCEDURE p1 +PROCEDURE p11 +SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; +event_name status +e1 SLAVESIDE_DISABLED +e11 SLAVESIDE_DISABLED + +SELECT COUNT(*) FROM t1; +COUNT(*) +12 +SELECT a,b FROM t1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT COUNT(*) FROM t2; +COUNT(*) +12 +SELECT a,b FROM t2 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT COUNT(*) FROM t3; +COUNT(*) +12 +SELECT a,b FROM t3 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT a,b FROM v1 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT COUNT(*) FROM t11; +COUNT(*) +12 +SELECT a,b FROM t11 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT COUNT(*) FROM t12; +COUNT(*) +12 +SELECT a,b FROM t12 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT COUNT(*) FROM t13; +COUNT(*) +12 +SELECT a,b FROM t13 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 +SELECT a,b FROM v11 ORDER BY a; +a b +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +10 10 +100 100 +101 101 +102 102 +103 103 + +UPDATE t1 SET c=''; +UPDATE t2 SET c=''; +UPDATE t3 SET c=''; +UPDATE t11 SET c=''; +UPDATE t12 SET c=''; +UPDATE t13 SET c=''; + + + +DROP VIEW IF EXISTS v1,v11; +DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p11; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +DROP EVENT IF EXISTS e1; +DROP EVENT IF EXISTS e11; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result new file mode 100644 index 00000000000..6c73c275ff0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result @@ -0,0 +1,90 @@ +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; +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,10); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 290 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 290 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 0 +Last_SQL_Error +LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 465 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1590 +Last_Error Fatal error: Not enough memory +Skip_Counter 0 +Exec_Master_Log_Pos 325 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 1590 +Last_SQL_Error Fatal error: Not enough memory +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; +DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result new file mode 100644 index 00000000000..b99ae3ad94a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -0,0 +1,144 @@ +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; +**** On Slave **** +STOP SLAVE; +**** On Master **** +SET SESSION BINLOG_FORMAT=ROW; +CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t2 (c INT, d INT); +INSERT INTO t1 VALUES (1,1),(2,4),(3,9); +INSERT INTO t2 VALUES (1,1),(2,8),(3,27); +UPDATE t1,t2 SET b = d, d = b * 2 WHERE a = c; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) +master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (c INT, d INT) +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Update_rows # # table_id: # +master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +SELECT * FROM t1; +a b +1 1 +2 8 +3 27 +SELECT * FROM t2; +c d +1 2 +2 16 +3 54 +**** On Slave **** +START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=484; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 714 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 484 +Relay_Log_Space # +Until_Condition Master +Until_Log_File master-bin.000001 +Until_Log_Pos 484 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 0 +Last_SQL_Error +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; +SELECT * FROM t1; +a b +1 1 +2 4 +3 9 +SELECT * FROM t2; +c d +1 1 +2 8 +3 27 +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +SET SESSION BINLOG_FORMAT=STATEMENT; +SET @foo = 12; +INSERT INTO t1 VALUES(@foo, 2*@foo); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # User var # # @`foo`=12 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(@foo, 2*@foo) +START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106; +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos 248 +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos 248 +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 0 +Last_SQL_Error +**** On Master **** +DROP TABLE t1, t2; diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 180a700acaf..fda40c30340 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -13,3 +13,4 @@ rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master rpl_innodb_mixed_ddl : Bug #29363 rpl.rpl_innodb_mixed_* test failures rpl_innodb_mixed_dml : Bug #29363 rpl.rpl_innodb_mixed_* test failures +rpl_invoked_features : BUG#29020 2007-06-21 Lars Non-deterministic test case diff --git a/mysql-test/suite/rpl/t/rpl_grant.test b/mysql-test/suite/rpl/t/rpl_grant.test new file mode 100644 index 00000000000..71e36342584 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_grant.test @@ -0,0 +1,42 @@ +# Tests of grants and users + +source include/master-slave.inc; +source include/not_embedded.inc; + +--echo **** On Master **** +connection master; + +CREATE USER dummy@localhost; +CREATE USER dummy1@localhost, dummy2@localhost; + +SELECT user, host FROM mysql.user WHERE user != 'root'; # root host non-determ +SELECT COUNT(*) FROM mysql.user; +sync_slave_with_master; +--echo **** On Slave **** +SELECT user,host FROM mysql.user WHERE user != 'root'; # root host non-determ +SELECT COUNT(*) FROM mysql.user; + +--echo **** On Master **** +connection master; + +# No user exists +error ER_CANNOT_USER; +DROP USER nonexisting@localhost; + +# At least one user exists, but not all +error ER_CANNOT_USER; +DROP USER nonexisting@localhost, dummy@localhost; + +# All users exist +DROP USER dummy1@localhost, dummy2@localhost; + +SELECT user, host FROM mysql.user WHERE user != 'root'; # root host non-determ +SELECT COUNT(*) FROM mysql.user; +sync_slave_with_master; +--echo **** On Slave **** +SELECT user,host FROM mysql.user WHERE user != 'root'; # root host non-determ +SELECT COUNT(*) FROM mysql.user; + +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 23 # 33 # +query_vertical SHOW SLAVE STATUS; diff --git a/mysql-test/suite/rpl/t/rpl_invoked_features-master.opt b/mysql-test/suite/rpl/t/rpl_invoked_features-master.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_invoked_features-master.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt b/mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_invoked_features.test b/mysql-test/suite/rpl/t/rpl_invoked_features.test new file mode 100644 index 00000000000..e797e0552ef --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_invoked_features.test @@ -0,0 +1,282 @@ +######################################### +# Author: Serge Kozlov skozlov@mysql.com +# Date: 04/25/2007 +# Purpose: Testing Invocation and Invoked +# Features for Replication. +######################################### + +--source include/master-slave.inc +--source include/have_innodb.inc + + +# +# Define variables used by test case +# + +# Non-transactional engine +--let $engine_type= myisam + +# Transactional engine +--let $engine_type2= innodb + + +# +# Clean up +# + +USE test; +--disable_warnings +DROP VIEW IF EXISTS v1,v11; +DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p11; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +DROP EVENT IF EXISTS e1; +DROP EVENT IF EXISTS e11; +--enable_warnings + + +# +# Prepare objects (tables etc) +# + +# Create tables + +--echo +eval CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=$engine_type; +--disable_warnings +INSERT INTO t1 VALUES (1,1,'1'); +INSERT INTO t1 VALUES (2,2,UUID()); +eval CREATE TABLE t2 (a INT, b INT, c VARCHAR(64)) ENGINE=$engine_type; +INSERT INTO t2 VALUES (1,1,'1'); +INSERT INTO t2 VALUES (2,2,UUID()); +--enable_warnings + +eval CREATE TABLE t11 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=$engine_type2; +--disable_warnings +INSERT INTO t11 VALUES (1,1,'1'); +INSERT INTO t11 VALUES (2,2,UUID()); +eval CREATE TABLE t12 (a INT, b INT, c VARCHAR(64)) ENGINE=$engine_type2; +INSERT INTO t12 VALUES (1,1,'1'); +INSERT INTO t12 VALUES (2,2,UUID()); +--enable_warnings + +# Create invoked features +--echo +# Create view for tables t1,t11 +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE VIEW v11 AS SELECT * FROM t11; + +# Create triggers for t1,t11 +DELIMITER |; + +CREATE TRIGGER t1_tr1 BEFORE INSERT ON t1 FOR EACH ROW +BEGIN + INSERT INTO t2 VALUES (NEW.a, NEW.b, NEW.c); + INSERT INTO t3 VALUES (NEW.a, NEW.b, NEW.c); +END| + +CREATE TRIGGER t1_tr2 BEFORE UPDATE ON t1 FOR EACH ROW +BEGIN + UPDATE t2 SET c = ''; + UPDATE t3 SET c = ''; +END| + +CREATE TRIGGER t11_tr1 BEFORE INSERT ON t11 FOR EACH ROW +BEGIN + INSERT INTO t12 VALUES (NEW.a, NEW.b, NEW.c); + INSERT INTO t13 VALUES (NEW.a, NEW.b, NEW.c); +END| + +CREATE TRIGGER t11_tr2 BEFORE UPDATE ON t11 FOR EACH ROW +BEGIN + UPDATE t12 SET c = ''; + UPDATE t13 SET c = ''; +END| + +# Create events which will run every 1 sec +CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND ENABLE DO +BEGIN + DECLARE c INT; + SELECT a INTO c FROM t1 WHERE a < 11 ORDER BY a DESC LIMIT 1; + IF c = 7 THEN + CALL p1(10, ''); + END IF; +END| + +CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND ENABLE DO +BEGIN + DECLARE c INT; + SELECT a INTO c FROM t11 WHERE a < 11 ORDER BY a DESC LIMIT 1; + IF c = 7 THEN + CALL p11(10, ''); + END IF; +END| + +# Create functions and procedures used for events +CREATE FUNCTION f1 (x INT) RETURNS VARCHAR(64) +BEGIN + IF x > 5 THEN + RETURN UUID(); + END IF; + RETURN ''; +END| + +CREATE FUNCTION f2 (x INT) RETURNS VARCHAR(64) +BEGIN + RETURN f1(x); +END| + +CREATE PROCEDURE p1 (IN x INT, IN y VARCHAR(64)) +BEGIN + INSERT INTO t1 VALUES (x,x,y); +END| + +CREATE PROCEDURE p11 (IN x INT, IN y VARCHAR(64)) +BEGIN + INSERT INTO t11 VALUES (x,x,y); +END| + +DELIMITER ;| + + +# +# Start test case +# + +# Do some actions for non-transactional tables +--echo +--disable_warnings +CREATE TABLE t3 SELECT * FROM v1; +INSERT INTO t1 VALUES (3,3,''); +UPDATE t1 SET c='2' WHERE a = 1; +INSERT INTO t1 VALUES(4,4,f1(4)); +INSERT INTO t1 VALUES (100,100,''); +CALL p1(5, UUID()); +INSERT INTO t1 VALUES (101,101,''); +INSERT INTO t1 VALUES(6,6,f1(6)); +INSERT INTO t1 VALUES (102,102,''); +INSERT INTO t1 VALUES(7,7,f2(7)); +INSERT INTO t1 VALUES (103,103,''); + +# Do some actions for transactional tables +--echo +CREATE TABLE t13 SELECT * FROM v11; +INSERT INTO t11 VALUES (3,3,''); +UPDATE t11 SET c='2' WHERE a = 1; +INSERT INTO t11 VALUES(4,4,f1(4)); +INSERT INTO t11 VALUES (100,100,''); +CALL p11(5, UUID()); +INSERT INTO t11 VALUES (101,101,''); +INSERT INTO t11 VALUES(6,6,f1(6)); +INSERT INTO t11 VALUES (102,102,''); +INSERT INTO t11 VALUES(7,7,f2(7)); +INSERT INTO t11 VALUES (103,103,''); +--enable_warnings + +# Scheduler is on +--echo +SET GLOBAL EVENT_SCHEDULER = on; +# Wait 2 sec while events will executed +--sleep 2 +SET GLOBAL EVENT_SCHEDULER = off; + +# Check original objects +--echo +SHOW TABLES LIKE 't%'; +SELECT table_name FROM information_schema.views WHERE table_schema='test'; +SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; +SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; +SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; + +# Check original data +--echo +SELECT COUNT(*) FROM t1; +SELECT a,b FROM t1 ORDER BY a; +SELECT COUNT(*) FROM t2; +SELECT a,b FROM t2 ORDER BY a; +SELECT COUNT(*) FROM t3; +SELECT a,b FROM t3 ORDER BY a; +SELECT a,b FROM v1 ORDER BY a; +SELECT COUNT(*) FROM t11; +SELECT a,b FROM t11 ORDER BY a; +SELECT COUNT(*) FROM t12; +SELECT a,b FROM t12 ORDER BY a; +SELECT COUNT(*) FROM t13; +SELECT a,b FROM t13 ORDER BY a; +SELECT a,b FROM v11 ORDER BY a; + +--sync_slave_with_master slave + +# Check replicated objects +--echo +SHOW TABLES LIKE 't%'; +SELECT table_name FROM information_schema.views WHERE table_schema='test'; +SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; +SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; +SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; + +# Check replicated data +--echo +SELECT COUNT(*) FROM t1; +SELECT a,b FROM t1 ORDER BY a; +SELECT COUNT(*) FROM t2; +SELECT a,b FROM t2 ORDER BY a; +SELECT COUNT(*) FROM t3; +SELECT a,b FROM t3 ORDER BY a; +SELECT a,b FROM v1 ORDER BY a; +SELECT COUNT(*) FROM t11; +SELECT a,b FROM t11 ORDER BY a; +SELECT COUNT(*) FROM t12; +SELECT a,b FROM t12 ORDER BY a; +SELECT COUNT(*) FROM t13; +SELECT a,b FROM t13 ORDER BY a; +SELECT a,b FROM v11 ORDER BY a; + +# Remove UUID() before comparing + +--connection master +--echo +UPDATE t1 SET c=''; +UPDATE t2 SET c=''; +UPDATE t3 SET c=''; +UPDATE t11 SET c=''; +UPDATE t12 SET c=''; +UPDATE t13 SET c=''; + +--sync_slave_with_master slave + +# Compare a data from master and slave +--echo +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql +--diff_files $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql + + +# +# Clean up +# + +# Remove dumps +--echo +--exec rm $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql +--exec rm $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql + +# Remove tables,views,procedures,functions +--connection master +--echo +--disable_warnings +DROP VIEW IF EXISTS v1,v11; +DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p11; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +DROP EVENT IF EXISTS e1; +DROP EVENT IF EXISTS e11; +--enable_warnings + +--sync_slave_with_master slave + +# End 5.1 test case diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt b/mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt new file mode 100644 index 00000000000..9c846c799f3 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt @@ -0,0 +1 @@ +--loose-debug=+d,LOAD_DATA_INFILE_has_fatal_error diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test new file mode 100644 index 00000000000..dceee7a65af --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test @@ -0,0 +1,29 @@ +source include/have_binlog_format_mixed_or_statement.inc; +source include/have_debug.inc; +source include/master-slave.inc; + +# We do this little stunt to make sure that the slave has started +# before we stop it again. +connection master; +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,10); +sync_slave_with_master; +source include/show_slave_status.inc; + +# Now we feed it a load data infile, which should make it stop with a +# fatal error. +connection master; +LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1; + +connection slave; +wait_for_slave_to_stop; +source include/show_slave_status.inc; + +connection slave; +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; + +connection master; +DROP TABLE t1; +sync_slave_with_master; + diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test new file mode 100644 index 00000000000..b19d6a2730b --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test @@ -0,0 +1,71 @@ +source include/master-slave.inc; + +--echo **** On Slave **** +connection slave; +STOP SLAVE; + +--echo **** On Master **** +connection master; +SET SESSION BINLOG_FORMAT=ROW; + +CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t2 (c INT, d INT); +INSERT INTO t1 VALUES (1,1),(2,4),(3,9); +INSERT INTO t2 VALUES (1,1),(2,8),(3,27); +UPDATE t1,t2 SET b = d, d = b * 2 WHERE a = c; +source include/show_binlog_events.inc; + +# These tables should be changed +SELECT * FROM t1; +SELECT * FROM t2; +save_master_pos; + +--echo **** On Slave **** +connection slave; + +# Stop when reaching the the first table map event. +START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=484; +wait_for_slave_to_stop; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 # +query_vertical SHOW SLAVE STATUS; + +# Now we skip *one* table map event. If the execution starts right +# after that table map event, *one* of the involved tables will be +# changed. +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; +sync_with_master; + +# These values should be what was inserted, not what was +# updated. Since we are skipping the first table map of the group +# representing the UPDATE statement above, we should skip the entire +# group and not start executing at the first table map. +SELECT * FROM t1; +SELECT * FROM t2; + +STOP SLAVE; +RESET SLAVE; +connection master; +RESET MASTER; + +SET SESSION BINLOG_FORMAT=STATEMENT; +SET @foo = 12; +INSERT INTO t1 VALUES(@foo, 2*@foo); +save_master_pos; +source include/show_binlog_events.inc; + +connection slave; +START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106; +wait_for_slave_to_stop; +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; +sync_with_master; +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 # +query_vertical SHOW SLAVE STATUS; + +--echo **** On Master **** +connection master; +DROP TABLE t1, t2; +sync_slave_with_master; diff --git a/mysql-test/t/binlog_innodb.test b/mysql-test/t/binlog_innodb.test deleted file mode 100644 index 3bad61db23a..00000000000 --- a/mysql-test/t/binlog_innodb.test +++ /dev/null @@ -1,133 +0,0 @@ -source include/have_innodb.inc; -source include/have_log_bin.inc; - -SET BINLOG_FORMAT=MIXED; - -RESET MASTER; - -CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=INNODB; -INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6); - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; -# Should be logged as statement -UPDATE t1 SET b = 2*a WHERE a > 1; -COMMIT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -# Should be logged as rows -UPDATE t1 SET b = a * a WHERE a > 3; -COMMIT; - -# Check that errors are generated when trying to use READ COMMITTED -# transaction isolation level in STATEMENT binlog mode. - -SET BINLOG_FORMAT=STATEMENT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -error ER_BINLOG_LOGGING_IMPOSSIBLE; -UPDATE t1 SET b = 1*a WHERE a > 1; -COMMIT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -error ER_BINLOG_LOGGING_IMPOSSIBLE; -UPDATE t1 SET b = 2*a WHERE a > 2; -COMMIT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; -UPDATE t1 SET b = 3*a WHERE a > 3; -COMMIT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE t1 SET b = 4*a WHERE a > 4; -COMMIT; - -SET BINLOG_FORMAT=MIXED; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -UPDATE t1 SET b = 1*a WHERE a > 1; -COMMIT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -UPDATE t1 SET b = 2*a WHERE a > 2; -COMMIT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; -UPDATE t1 SET b = 3*a WHERE a > 3; -COMMIT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE t1 SET b = 4*a WHERE a > 4; -COMMIT; - -SET BINLOG_FORMAT=ROW; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -UPDATE t1 SET b = 1*a WHERE a > 1; -COMMIT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; -UPDATE t1 SET b = 2*a WHERE a > 2; -COMMIT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; -UPDATE t1 SET b = 3*a WHERE a > 3; -COMMIT; - -BEGIN; -SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; -UPDATE t1 SET b = 4*a WHERE a > 4; -COMMIT; - -source include/show_binlog_events.inc; - -DROP TABLE t1; - - -# -# Let us test binlog_cache_use and binlog_cache_disk_use status vars. -# Actually this test has nothing to do with innodb per se, it just requires -# transactional table. -# -show status like "binlog_cache_use"; -show status like "binlog_cache_disk_use"; - -create table t1 (a int) engine=innodb; - -# Now we are going to create transaction which is long enough so its -# transaction binlog will be flushed to disk... -let $1=2000; -disable_query_log; -begin; -while ($1) -{ - eval insert into t1 values( $1 ); - dec $1; -} -commit; -enable_query_log; -show status like "binlog_cache_use"; -show status like "binlog_cache_disk_use"; - -# Transaction which should not be flushed to disk and so should not -# increase binlog_cache_disk_use. -begin; -delete from t1; -commit; -show status like "binlog_cache_use"; -show status like "binlog_cache_disk_use"; -drop table t1; - ---echo End of tests diff --git a/mysql-test/t/binlog_multi_engine.test b/mysql-test/t/binlog_multi_engine.test deleted file mode 100644 index 6614b9e5d44..00000000000 --- a/mysql-test/t/binlog_multi_engine.test +++ /dev/null @@ -1,85 +0,0 @@ -source include/have_blackhole.inc; -source include/have_ndb.inc; -source include/have_binlog_format_mixed_or_row.inc; - -CREATE TABLE t1m (m INT, n INT) ENGINE=MYISAM; -CREATE TABLE t1b (b INT, c INT) ENGINE=BLACKHOLE; -CREATE TABLE t1n (e INT, f INT) ENGINE=NDB; - -RESET MASTER; - -SET SESSION BINLOG_FORMAT=STATEMENT; - -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); - -UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; - -# I cannot use these statements since the rows logged to the NDB table -# eventually shows up in the binary log. I use them anyway, since once -# BUG#29222 is fixed, there will be a difference here. -echo *** Please look in binlog_multi_engine.test if you have a diff here ****; -START TRANSACTION; -INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; -UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; -COMMIT; - -TRUNCATE t1m; -TRUNCATE t1b; -TRUNCATE t1n; - -source include/show_binlog_events.inc; - -RESET MASTER; - -SET SESSION BINLOG_FORMAT=MIXED; - -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); - -UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; - -# Not possible to test this since NDB writes its own binlog, which -# might cause it to be out of sync with the results from MyISAM. -# This will generate an error once BUG#28722 is fixed. - -#UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; - -error ER_BINLOG_LOGGING_IMPOSSIBLE; -UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; - -TRUNCATE t1m; -TRUNCATE t1b; -TRUNCATE t1n; - -source include/show_binlog_events.inc; - -RESET MASTER; - -SET SESSION BINLOG_FORMAT=ROW; - -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); -error ER_BINLOG_LOGGING_IMPOSSIBLE; -INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); - -error ER_BINLOG_LOGGING_IMPOSSIBLE; -UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; - -# Not possible to test this since NDB writes its own binlog, which -# might cause it to be out of sync with the results from MyISAM. -# This will generate an error once BUG#28722 is fixed. - -#UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; - -error ER_BINLOG_LOGGING_IMPOSSIBLE; -UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; - -source include/show_binlog_events.inc; - -RESET MASTER; - -DROP TABLE t1m, t1b, t1n; - diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 61d81811ec1..5d31a8060e8 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -21,7 +21,6 @@ im_instance_conf : BUG#28743 Instance manager generates warnings in test im_utils : BUG#28743 Instance manager generates warnings in test suite innodb : Disabling test case awaiting reply from Innobase concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences -rpl_invoked_features : BUG#29020 2007-06-21 Lars Non-deterministic test case ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Double Whopper diff --git a/mysql-test/t/rpl_grant.test b/mysql-test/t/rpl_grant.test deleted file mode 100644 index 71e36342584..00000000000 --- a/mysql-test/t/rpl_grant.test +++ /dev/null @@ -1,42 +0,0 @@ -# Tests of grants and users - -source include/master-slave.inc; -source include/not_embedded.inc; - ---echo **** On Master **** -connection master; - -CREATE USER dummy@localhost; -CREATE USER dummy1@localhost, dummy2@localhost; - -SELECT user, host FROM mysql.user WHERE user != 'root'; # root host non-determ -SELECT COUNT(*) FROM mysql.user; -sync_slave_with_master; ---echo **** On Slave **** -SELECT user,host FROM mysql.user WHERE user != 'root'; # root host non-determ -SELECT COUNT(*) FROM mysql.user; - ---echo **** On Master **** -connection master; - -# No user exists -error ER_CANNOT_USER; -DROP USER nonexisting@localhost; - -# At least one user exists, but not all -error ER_CANNOT_USER; -DROP USER nonexisting@localhost, dummy@localhost; - -# All users exist -DROP USER dummy1@localhost, dummy2@localhost; - -SELECT user, host FROM mysql.user WHERE user != 'root'; # root host non-determ -SELECT COUNT(*) FROM mysql.user; -sync_slave_with_master; ---echo **** On Slave **** -SELECT user,host FROM mysql.user WHERE user != 'root'; # root host non-determ -SELECT COUNT(*) FROM mysql.user; - ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # -query_vertical SHOW SLAVE STATUS; diff --git a/mysql-test/t/rpl_invoked_features-master.opt b/mysql-test/t/rpl_invoked_features-master.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_invoked_features-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_invoked_features-slave.opt b/mysql-test/t/rpl_invoked_features-slave.opt deleted file mode 100644 index 627becdbfb5..00000000000 --- a/mysql-test/t/rpl_invoked_features-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb diff --git a/mysql-test/t/rpl_invoked_features.test b/mysql-test/t/rpl_invoked_features.test deleted file mode 100644 index e797e0552ef..00000000000 --- a/mysql-test/t/rpl_invoked_features.test +++ /dev/null @@ -1,282 +0,0 @@ -######################################### -# Author: Serge Kozlov skozlov@mysql.com -# Date: 04/25/2007 -# Purpose: Testing Invocation and Invoked -# Features for Replication. -######################################### - ---source include/master-slave.inc ---source include/have_innodb.inc - - -# -# Define variables used by test case -# - -# Non-transactional engine ---let $engine_type= myisam - -# Transactional engine ---let $engine_type2= innodb - - -# -# Clean up -# - -USE test; ---disable_warnings -DROP VIEW IF EXISTS v1,v11; -DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p11; -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; -DROP EVENT IF EXISTS e1; -DROP EVENT IF EXISTS e11; ---enable_warnings - - -# -# Prepare objects (tables etc) -# - -# Create tables - ---echo -eval CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=$engine_type; ---disable_warnings -INSERT INTO t1 VALUES (1,1,'1'); -INSERT INTO t1 VALUES (2,2,UUID()); -eval CREATE TABLE t2 (a INT, b INT, c VARCHAR(64)) ENGINE=$engine_type; -INSERT INTO t2 VALUES (1,1,'1'); -INSERT INTO t2 VALUES (2,2,UUID()); ---enable_warnings - -eval CREATE TABLE t11 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=$engine_type2; ---disable_warnings -INSERT INTO t11 VALUES (1,1,'1'); -INSERT INTO t11 VALUES (2,2,UUID()); -eval CREATE TABLE t12 (a INT, b INT, c VARCHAR(64)) ENGINE=$engine_type2; -INSERT INTO t12 VALUES (1,1,'1'); -INSERT INTO t12 VALUES (2,2,UUID()); ---enable_warnings - -# Create invoked features ---echo -# Create view for tables t1,t11 -CREATE VIEW v1 AS SELECT * FROM t1; -CREATE VIEW v11 AS SELECT * FROM t11; - -# Create triggers for t1,t11 -DELIMITER |; - -CREATE TRIGGER t1_tr1 BEFORE INSERT ON t1 FOR EACH ROW -BEGIN - INSERT INTO t2 VALUES (NEW.a, NEW.b, NEW.c); - INSERT INTO t3 VALUES (NEW.a, NEW.b, NEW.c); -END| - -CREATE TRIGGER t1_tr2 BEFORE UPDATE ON t1 FOR EACH ROW -BEGIN - UPDATE t2 SET c = ''; - UPDATE t3 SET c = ''; -END| - -CREATE TRIGGER t11_tr1 BEFORE INSERT ON t11 FOR EACH ROW -BEGIN - INSERT INTO t12 VALUES (NEW.a, NEW.b, NEW.c); - INSERT INTO t13 VALUES (NEW.a, NEW.b, NEW.c); -END| - -CREATE TRIGGER t11_tr2 BEFORE UPDATE ON t11 FOR EACH ROW -BEGIN - UPDATE t12 SET c = ''; - UPDATE t13 SET c = ''; -END| - -# Create events which will run every 1 sec -CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND ENABLE DO -BEGIN - DECLARE c INT; - SELECT a INTO c FROM t1 WHERE a < 11 ORDER BY a DESC LIMIT 1; - IF c = 7 THEN - CALL p1(10, ''); - END IF; -END| - -CREATE EVENT e11 ON SCHEDULE EVERY 1 SECOND ENABLE DO -BEGIN - DECLARE c INT; - SELECT a INTO c FROM t11 WHERE a < 11 ORDER BY a DESC LIMIT 1; - IF c = 7 THEN - CALL p11(10, ''); - END IF; -END| - -# Create functions and procedures used for events -CREATE FUNCTION f1 (x INT) RETURNS VARCHAR(64) -BEGIN - IF x > 5 THEN - RETURN UUID(); - END IF; - RETURN ''; -END| - -CREATE FUNCTION f2 (x INT) RETURNS VARCHAR(64) -BEGIN - RETURN f1(x); -END| - -CREATE PROCEDURE p1 (IN x INT, IN y VARCHAR(64)) -BEGIN - INSERT INTO t1 VALUES (x,x,y); -END| - -CREATE PROCEDURE p11 (IN x INT, IN y VARCHAR(64)) -BEGIN - INSERT INTO t11 VALUES (x,x,y); -END| - -DELIMITER ;| - - -# -# Start test case -# - -# Do some actions for non-transactional tables ---echo ---disable_warnings -CREATE TABLE t3 SELECT * FROM v1; -INSERT INTO t1 VALUES (3,3,''); -UPDATE t1 SET c='2' WHERE a = 1; -INSERT INTO t1 VALUES(4,4,f1(4)); -INSERT INTO t1 VALUES (100,100,''); -CALL p1(5, UUID()); -INSERT INTO t1 VALUES (101,101,''); -INSERT INTO t1 VALUES(6,6,f1(6)); -INSERT INTO t1 VALUES (102,102,''); -INSERT INTO t1 VALUES(7,7,f2(7)); -INSERT INTO t1 VALUES (103,103,''); - -# Do some actions for transactional tables ---echo -CREATE TABLE t13 SELECT * FROM v11; -INSERT INTO t11 VALUES (3,3,''); -UPDATE t11 SET c='2' WHERE a = 1; -INSERT INTO t11 VALUES(4,4,f1(4)); -INSERT INTO t11 VALUES (100,100,''); -CALL p11(5, UUID()); -INSERT INTO t11 VALUES (101,101,''); -INSERT INTO t11 VALUES(6,6,f1(6)); -INSERT INTO t11 VALUES (102,102,''); -INSERT INTO t11 VALUES(7,7,f2(7)); -INSERT INTO t11 VALUES (103,103,''); ---enable_warnings - -# Scheduler is on ---echo -SET GLOBAL EVENT_SCHEDULER = on; -# Wait 2 sec while events will executed ---sleep 2 -SET GLOBAL EVENT_SCHEDULER = off; - -# Check original objects ---echo -SHOW TABLES LIKE 't%'; -SELECT table_name FROM information_schema.views WHERE table_schema='test'; -SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; -SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; -SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; - -# Check original data ---echo -SELECT COUNT(*) FROM t1; -SELECT a,b FROM t1 ORDER BY a; -SELECT COUNT(*) FROM t2; -SELECT a,b FROM t2 ORDER BY a; -SELECT COUNT(*) FROM t3; -SELECT a,b FROM t3 ORDER BY a; -SELECT a,b FROM v1 ORDER BY a; -SELECT COUNT(*) FROM t11; -SELECT a,b FROM t11 ORDER BY a; -SELECT COUNT(*) FROM t12; -SELECT a,b FROM t12 ORDER BY a; -SELECT COUNT(*) FROM t13; -SELECT a,b FROM t13 ORDER BY a; -SELECT a,b FROM v11 ORDER BY a; - ---sync_slave_with_master slave - -# Check replicated objects ---echo -SHOW TABLES LIKE 't%'; -SELECT table_name FROM information_schema.views WHERE table_schema='test'; -SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; -SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; -SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; - -# Check replicated data ---echo -SELECT COUNT(*) FROM t1; -SELECT a,b FROM t1 ORDER BY a; -SELECT COUNT(*) FROM t2; -SELECT a,b FROM t2 ORDER BY a; -SELECT COUNT(*) FROM t3; -SELECT a,b FROM t3 ORDER BY a; -SELECT a,b FROM v1 ORDER BY a; -SELECT COUNT(*) FROM t11; -SELECT a,b FROM t11 ORDER BY a; -SELECT COUNT(*) FROM t12; -SELECT a,b FROM t12 ORDER BY a; -SELECT COUNT(*) FROM t13; -SELECT a,b FROM t13 ORDER BY a; -SELECT a,b FROM v11 ORDER BY a; - -# Remove UUID() before comparing - ---connection master ---echo -UPDATE t1 SET c=''; -UPDATE t2 SET c=''; -UPDATE t3 SET c=''; -UPDATE t11 SET c=''; -UPDATE t12 SET c=''; -UPDATE t13 SET c=''; - ---sync_slave_with_master slave - -# Compare a data from master and slave ---echo ---exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql ---diff_files $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql - - -# -# Clean up -# - -# Remove dumps ---echo ---exec rm $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_master.sql ---exec rm $MYSQLTEST_VARDIR/tmp/rpl_invoked_features_slave.sql - -# Remove tables,views,procedures,functions ---connection master ---echo ---disable_warnings -DROP VIEW IF EXISTS v1,v11; -DROP TABLE IF EXISTS t1,t2,t3,t11,t12,t13; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p11; -DROP FUNCTION IF EXISTS f1; -DROP FUNCTION IF EXISTS f2; -DROP EVENT IF EXISTS e1; -DROP EVENT IF EXISTS e11; ---enable_warnings - ---sync_slave_with_master slave - -# End 5.1 test case diff --git a/mysql-test/t/rpl_loaddata_fatal-slave.opt b/mysql-test/t/rpl_loaddata_fatal-slave.opt deleted file mode 100644 index 9c846c799f3..00000000000 --- a/mysql-test/t/rpl_loaddata_fatal-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-debug=+d,LOAD_DATA_INFILE_has_fatal_error diff --git a/mysql-test/t/rpl_loaddata_fatal.test b/mysql-test/t/rpl_loaddata_fatal.test deleted file mode 100644 index dceee7a65af..00000000000 --- a/mysql-test/t/rpl_loaddata_fatal.test +++ /dev/null @@ -1,29 +0,0 @@ -source include/have_binlog_format_mixed_or_statement.inc; -source include/have_debug.inc; -source include/master-slave.inc; - -# We do this little stunt to make sure that the slave has started -# before we stop it again. -connection master; -CREATE TABLE t1 (a INT, b INT); -INSERT INTO t1 VALUES (1,10); -sync_slave_with_master; -source include/show_slave_status.inc; - -# Now we feed it a load data infile, which should make it stop with a -# fatal error. -connection master; -LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1; - -connection slave; -wait_for_slave_to_stop; -source include/show_slave_status.inc; - -connection slave; -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; - -connection master; -DROP TABLE t1; -sync_slave_with_master; - diff --git a/mysql-test/t/rpl_slave_skip.test b/mysql-test/t/rpl_slave_skip.test deleted file mode 100644 index b19d6a2730b..00000000000 --- a/mysql-test/t/rpl_slave_skip.test +++ /dev/null @@ -1,71 +0,0 @@ -source include/master-slave.inc; - ---echo **** On Slave **** -connection slave; -STOP SLAVE; - ---echo **** On Master **** -connection master; -SET SESSION BINLOG_FORMAT=ROW; - -CREATE TABLE t1 (a INT, b INT); -CREATE TABLE t2 (c INT, d INT); -INSERT INTO t1 VALUES (1,1),(2,4),(3,9); -INSERT INTO t2 VALUES (1,1),(2,8),(3,27); -UPDATE t1,t2 SET b = d, d = b * 2 WHERE a = c; -source include/show_binlog_events.inc; - -# These tables should be changed -SELECT * FROM t1; -SELECT * FROM t2; -save_master_pos; - ---echo **** On Slave **** -connection slave; - -# Stop when reaching the the first table map event. -START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=484; -wait_for_slave_to_stop; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 # -query_vertical SHOW SLAVE STATUS; - -# Now we skip *one* table map event. If the execution starts right -# after that table map event, *one* of the involved tables will be -# changed. -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; -sync_with_master; - -# These values should be what was inserted, not what was -# updated. Since we are skipping the first table map of the group -# representing the UPDATE statement above, we should skip the entire -# group and not start executing at the first table map. -SELECT * FROM t1; -SELECT * FROM t2; - -STOP SLAVE; -RESET SLAVE; -connection master; -RESET MASTER; - -SET SESSION BINLOG_FORMAT=STATEMENT; -SET @foo = 12; -INSERT INTO t1 VALUES(@foo, 2*@foo); -save_master_pos; -source include/show_binlog_events.inc; - -connection slave; -START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106; -wait_for_slave_to_stop; -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; -sync_with_master; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 # -query_vertical SHOW SLAVE STATUS; - ---echo **** On Master **** -connection master; -DROP TABLE t1, t2; -sync_slave_with_master; -- cgit v1.2.1 From 61c423a2bd186bd6488df89216238a6e81a76df6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jun 2007 18:21:20 +0200 Subject: Change "exec rm" to "remove_file" mysql-test/t/sp.test: Change "exec rm" to "remove_file" Change two "remove file if exists" to "check that file not exist" --- mysql-test/include/have_outfile.inc | 2 +- mysql-test/t/sp.test | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/have_outfile.inc b/mysql-test/include/have_outfile.inc index 10f093ec3ef..ae4a2723840 100644 --- a/mysql-test/include/have_outfile.inc +++ b/mysql-test/include/have_outfile.inc @@ -1,5 +1,5 @@ -- require r/have_outfile.require disable_query_log; select load_file(concat(@tmpdir,"/outfile.test")); ---exec rm $MYSQLTEST_VARDIR/tmp/outfile.test +--remove_file $MYSQLTEST_VARDIR/tmp/outfile.test enable_query_log; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index c94a526e10c..460c10d88d0 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -705,9 +705,11 @@ begin insert into test.t1 values (concat(x, "2"), y+2); end| ---system rm -f $MYSQLTEST_VARDIR/tmp/spout +# Check that file does not exists +--error 1 +--file_exists $MYSQLTEST_VARDIR/tmp/spout call into_outfile("ofile", 1)| ---system rm -f $MYSQLTEST_VARDIR/tmp/spout +--remove_file $MYSQLTEST_VARDIR/tmp/spout delete from t1| drop procedure into_outfile| @@ -722,9 +724,11 @@ begin insert into test.t1 values (concat(x, "2"), y+2); end| ---system rm -f $MYSQLTEST_VARDIR/tmp/spdump +# Check that file does not exists +--error 1 +--file_exists $MYSQLTEST_VARDIR/tmp/spdump call into_dumpfile("dfile", 1)| ---system rm -f $MYSQLTEST_VARDIR/tmp/spdump +--remove_file $MYSQLTEST_VARDIR/tmp/spdump delete from t1| drop procedure into_dumpfile| -- cgit v1.2.1 From 0e5e884b118baeea9d47520acc5da2caa905dca8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Jun 2007 00:23:14 -0700 Subject: Bug#29019 "REPLACE/INSERT IGNORE/UPDATE IGNORE doesn't work" Federated does not record neccessary HA_EXTRA flags in order to support REPLACE/INSERT IGNORE/UPDATE IGNORE. Implement ::extra() to capture flags neccessary for functionality. New function append_ident() to better escape identifiers consistantly. mysql-test/r/federated.result: test for bug29019 mysql-test/t/federated.test: test for bug29019 sql/ha_federated.cc: Bug29019 Federated does not record neccessary HA_EXTRA flags in order to support REPLACE/INSERT IGNORE/UPDATE IGNORE. Implement ::extra() to capture flags neccessary for functionality. New function append_ident() to better escape identifiers consistantly. sql/ha_federated.h: bug29019 add 2 member values to ha_federated class ignore_duplicates and replace_duplicates. add 1 member method to ha_federated class extra() --- mysql-test/r/federated.result | 24 ++++++++++++++++++++++++ mysql-test/t/federated.test | 27 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result index cecffbb1471..52304de7609 100644 --- a/mysql-test/r/federated.result +++ b/mysql-test/r/federated.result @@ -1843,6 +1843,30 @@ C3A4C3B6C3BCC39F D18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E drop table federated.t1; drop table federated.t1; +create table federated.t1 (a int primary key, b varchar(64)) +DEFAULT CHARSET=utf8; +create table federated.t1 (a int primary key, b varchar(64)) +ENGINE=FEDERATED +connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1' + DEFAULT CHARSET=utf8; +insert ignore into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); +select * from federated.t1; +a b +1 Larry +2 Curly +truncate federated.t1; +replace into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); +select * from federated.t1; +a b +1 Moe +2 Curly +update ignore federated.t1 set a=a+1; +select * from federated.t1; +a b +1 Moe +3 Curly +drop table federated.t1; +drop table federated.t1; DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; DROP TABLE IF EXISTS federated.t1; diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test index 894cd513914..bdd6076064a 100644 --- a/mysql-test/t/federated.test +++ b/mysql-test/t/federated.test @@ -1576,4 +1576,31 @@ connection slave; drop table federated.t1; +# +# BUG#21019 Federated Engine does not support REPLACE/INSERT IGNORE/UPDATE IGNORE +# +connection slave; +create table federated.t1 (a int primary key, b varchar(64)) + DEFAULT CHARSET=utf8; +connection master; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval create table federated.t1 (a int primary key, b varchar(64)) + ENGINE=FEDERATED + connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1' + DEFAULT CHARSET=utf8; + +insert ignore into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); +select * from federated.t1; + +truncate federated.t1; +replace into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); +select * from federated.t1; + +update ignore federated.t1 set a=a+1; +select * from federated.t1; + +drop table federated.t1; +connection slave; +drop table federated.t1; + source include/federated_cleanup.inc; -- cgit v1.2.1 From c69012d3e71a9bbf13228ae491f7ac27690f7bf8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Jun 2007 14:04:20 +0500 Subject: BUG#29207 - archive table reported as corrupt by check table After merge fix. mysql-test/r/archive.result: After merge fix. --- mysql-test/r/archive.result | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index 59462e848d2..36b013703d8 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12675,3 +12675,10 @@ select * from t1; i 1 drop table t1; +create table t1(a longblob) engine=archive; +insert into t1 set a=''; +insert into t1 set a='a'; +check table t1 extended; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; -- cgit v1.2.1 From db693e4143e6d03a71aaedc641462f98fc7e8ce7 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Jun 2007 11:18:15 +0200 Subject: WL#3933 Split main test suite to rpl, rpl_ndb and ndb - Cleaup Makefile.am in mysql-test making it easier to add new test files and suite directories mysql-test/Makefile.am: Cleanup Makefile.am in mysql-test to simplify inclusion of subdirectories without own Makefile. Add subdirs to EXTRA_DIST --- mysql-test/Makefile.am | 126 +++++++++---------------------------------------- 1 file changed, 21 insertions(+), 105 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 0a6dbc3663a..549a9b8ac7d 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -18,125 +18,41 @@ ## Process this file with automake to create Makefile.in SUBDIRS = ndb -DIST_SUBDIRS=ndb -benchdir_root= $(prefix) -testdir = $(benchdir_root)/mysql-test -EXTRA_SCRIPTS = mysql-test-run-shell.sh install_test_db.sh \ - valgrind.supp $(PRESCRIPTS) -EXTRA_DIST = $(EXTRA_SCRIPTS) suite -GENSCRIPTS = mysql-test-run-shell install_test_db mtr mysql-test-run PRESCRIPTS = mysql-test-run.pl + +GENSCRIPTS = mysql-test-run-shell \ + install_test_db \ + mtr \ + mysql-test-run + +EXTRA_SCRIPTS = mysql-test-run-shell.sh \ + install_test_db.sh \ + valgrind.supp $(PRESCRIPTS) + +EXTRA_DIST_DIRS = t r include lib std_data suite extra + +EXTRA_DIST = $(EXTRA_DIST_DIRS) $(EXTRA_SCRIPTS) README + test_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS) -test_DATA = std_data/client-key.pem std_data/client-cert.pem \ - std_data/cacert.pem std_data/server-cert.pem \ - std_data/server-key.pem + CLEANFILES = $(GENSCRIPTS) -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I.. - - -dist-hook: - mkdir -p \ - $(distdir)/t \ - $(distdir)/extra/binlog_tests \ - $(distdir)/extra/rpl_tests \ - $(distdir)/r \ - $(distdir)/include \ - $(distdir)/std_data \ - $(distdir)/std_data/ndb_backup50 \ - $(distdir)/std_data/ndb_backup51 \ - $(distdir)/lib - -$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t - $(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t - -$(INSTALL_DATA) $(srcdir)/t/*.imtest $(distdir)/t - $(INSTALL_DATA) $(srcdir)/t/*.sql $(distdir)/t - -$(INSTALL_DATA) $(srcdir)/t/*.disabled $(distdir)/t - $(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.slave-mi $(distdir)/t - $(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(distdir)/t - $(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.test $(distdir)/extra/binlog_tests - $(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.test $(distdir)/extra/rpl_tests - -$(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.opt $(distdir)/extra/binlog_tests - -$(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.opt $(distdir)/extra/rpl_tests - $(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include - $(INSTALL_DATA) $(srcdir)/include/*.test $(distdir)/include - $(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r - $(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/Index.xml $(distdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.000001 $(distdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.MY* $(distdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(distdir)/std_data/ndb_backup50 - $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(distdir)/std_data/ndb_backup51 - $(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib - -rm -rf `find $(distdir)/suite -type d -name SCCS` $(distdir)/suite/row_lock - -install-data-local: - $(mkinstalldirs) \ - $(DESTDIR)$(testdir)/t \ - $(DESTDIR)$(testdir)/extra/binlog_tests \ - $(DESTDIR)$(testdir)/extra/rpl_tests \ - $(DESTDIR)$(testdir)/r \ - $(DESTDIR)$(testdir)/include \ - $(DESTDIR)$(testdir)/std_data \ - $(DESTDIR)$(testdir)/std_data/ndb_backup50 \ - $(DESTDIR)$(testdir)/std_data/ndb_backup51 \ - $(DESTDIR)$(testdir)/lib - $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir) - -$(INSTALL_DATA) $(srcdir)/t/*.def $(DESTDIR)$(testdir)/t - $(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t - -$(INSTALL_DATA) $(srcdir)/t/*.imtest $(DESTDIR)$(testdir)/t - $(INSTALL_DATA) $(srcdir)/t/*.sql $(DESTDIR)$(testdir)/t - -$(INSTALL_DATA) $(srcdir)/t/*.disabled $(DESTDIR)$(testdir)/t - $(INSTALL_DATA) $(srcdir)/t/*.opt $(DESTDIR)$(testdir)/t - $(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t - $(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t - $(INSTALL_DATA) $(srcdir)/r/*.result $(DESTDIR)$(testdir)/r - $(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r - $(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.test $(DESTDIR)$(testdir)/extra/binlog_tests - $(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.test $(DESTDIR)$(testdir)/extra/rpl_tests - -$(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.opt $(DESTDIR)$(testdir)/extra/binlog_tests - -$(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.opt $(DESTDIR)$(testdir)/extra/rpl_tests - $(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include - $(INSTALL_DATA) $(srcdir)/include/*.test $(DESTDIR)$(testdir)/include - $(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.*001 $(DESTDIR)$(testdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(DESTDIR)$(testdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(DESTDIR)$(testdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/Index.xml $(DESTDIR)$(testdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.MY* $(DESTDIR)$(testdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data - $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup50 - $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51 - $(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib - for f in `(cd $(srcdir); find suite -type f | egrep -v 'SCCS|row_lock')`; \ - do \ - d=$(DESTDIR)$(testdir)/`dirname $$f`; \ - mkdir -p $$d ; \ - $(INSTALL_DATA) $(srcdir)/$$f $$d ; \ - done - -uninstall-local: - @RM@ -f -r $(DESTDIR)$(testdir) # mtr - a shortcut for executing mysql-test-run.pl mtr: - $(RM) -f mtr - $(LN_S) mysql-test-run.pl mtr + @RM@ -f mtr + @LN_S@ mysql-test-run.pl mtr # mysql-test-run - a shortcut for executing mysql-test-run.pl mysql-test-run: - $(RM) -f mysql-test-run - $(LN_S) mysql-test-run.pl mysql-test-run + @RM@ -f mysql-test-run + @LN_S@ mysql-test-run.pl mysql-test-run SUFFIXES = .sh +testdir = $(prefix)/mysql-test + .sh: @RM@ -f $@ $@-t @SED@ \ -- cgit v1.2.1 From dec626f4927598a2e85275b586f8c19031f40027 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Jun 2007 11:23:59 +0200 Subject: Bug#29361 mysqldump creates stray file when too long path name is passed - Move the check of too long path to 'get_one_option' client/mysqldump.c: Move the check of too long path to 'get_one_option' mysql-test/r/mysqldump.result: Update result file after changing error message --- mysql-test/r/mysqldump.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 7865148905e..8eac7c7e715 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3206,7 +3206,7 @@ DROP TABLE t1; # CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2); -mysqldump: Input filename or options too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +mysqldump: Input filename too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa DROP TABLE t1; CREATE TABLE t2 (a int); CREATE TABLE t3 (a int); -- cgit v1.2.1 From 94beb7cd8db07e816ecced8112945d9df9db67e4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Jun 2007 13:36:26 -0700 Subject: Bug#25511 "Federated INSERT failures" Federated does not correctly handle "INSERT...ON DUPLICATE KEY UPDATE" However, implementing such support is not reasonably possible without increasing complexity of the storage engine: checking that constraints on remote server match local server and parsing error messages. This patch causes 'ON DUPLICATE KEY' to fail with ER_DUP_KEY message if a conflict occurs and not to fail silently. include/my_base.h: bug25511 new storage engine hint: HA_EXTRA_INSERT_WITH_UPDATE mysql-test/r/federated.result: test for bug25511 mysql-test/t/federated.test: test for bug25511 sql/ha_federated.cc: bug25511 implement support for handling HA_EXTRA_INSERT_WITH_UPDATE hint sql/ha_federated.h: bug25511 new property: insert_dup_update sql/sql_insert.cc: bug25511 implement support for HA_EXTRA_INSERT_WITH_UPDATE When checking duplicates flag, if it is DUP_UPDATE, send hint to the storage engine. --- mysql-test/r/federated.result | 15 +++++++++++++++ mysql-test/t/federated.test | 26 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result index 52304de7609..4bef92319fb 100644 --- a/mysql-test/r/federated.result +++ b/mysql-test/r/federated.result @@ -1867,6 +1867,21 @@ a b 3 Curly drop table federated.t1; drop table federated.t1; +create table federated.t1 (a int primary key, b varchar(64)) +DEFAULT CHARSET=utf8; +create table federated.t1 (a int primary key, b varchar(64)) +ENGINE=FEDERATED +connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1' + DEFAULT CHARSET=utf8; +insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe") +on duplicate key update a=a+100; +ERROR 23000: Can't write; duplicate key in table 't1' +select * from federated.t1; +a b +1 Larry +2 Curly +drop table federated.t1; +drop table federated.t1; DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; DROP TABLE IF EXISTS federated.t1; diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test index bdd6076064a..bedb6b36d61 100644 --- a/mysql-test/t/federated.test +++ b/mysql-test/t/federated.test @@ -1603,4 +1603,30 @@ drop table federated.t1; connection slave; drop table federated.t1; +# +# BUG#25511 Federated Insert failures. +# +# When the user performs a INSERT...ON DUPLICATE KEY UPDATE, we want +# it to fail if a duplicate key exists instead of ignoring it. +# +connection slave; +create table federated.t1 (a int primary key, b varchar(64)) + DEFAULT CHARSET=utf8; +connection master; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval create table federated.t1 (a int primary key, b varchar(64)) + ENGINE=FEDERATED + connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1' + DEFAULT CHARSET=utf8; + +--error ER_DUP_KEY +insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe") +on duplicate key update a=a+100; +select * from federated.t1; + +drop table federated.t1; +connection slave; +drop table federated.t1; + + source include/federated_cleanup.inc; -- cgit v1.2.1 From dba70720a7a3d6ae7e8504cb5414124f5c5d5c60 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Jun 2007 16:03:01 -0700 Subject: Bug#25513 "Federared Transactions Failure" Bug occurs when the user performs an operation which inserts more than one row into the federated table and the federated table references a remote table stored within a transactional storage engine. When the insert operation for any one row in the statement fails due to constraint violation, the federated engine is unable to perform statement rollback and so the remote table contains a partial commit. The user would expect a statement to perform the same so a statement rollback is expected. This bug was fixed by implementing bulk-insert handling into the federated storage engine. This will relieve the bug for most common situations by enabling the generation of a multi-row insert into the remote table and thus permitting the remote table to perform statement rollback when neccessary. The multi-row insert is limited to the maximum packet size between servers and should the size overflow, more than one insert statement will be sent and this bug will reappear. Multi-row insert is disabled when an "INSERT...ON DUPLICATE KEY UPDATE" is being performed. The bulk-insert handling will offer a significant performance boost when inserting a large number of small rows. This patch builds on Bug29019 and Bug25511 sql/ha_federated.cc: bug25513 new member methods: start_bulk_insert() - initializes memory for bulk insert end_bulk_insert() - sends any remaining bulk insert and frees memory append_stmt_insert() - create the INSERT statement sql/ha_federated.h: bug25513 new member value: bulk_insert new member methods: start_bulk_insert(), end_bulk_insert(), append_stmt_insert() make member methods private: read_next(), index_read_idx_with_result_set() mysql-test/r/federated_innodb.result: New BitKeeper file ``mysql-test/r/federated_innodb.result'' mysql-test/t/federated_innodb-slave.opt: New BitKeeper file ``mysql-test/t/federated_innodb-slave.opt'' mysql-test/t/federated_innodb.test: New BitKeeper file ``mysql-test/t/federated_innodb.test'' --- mysql-test/r/federated_innodb.result | 34 +++++++++++++++++++++++++++++++++ mysql-test/t/federated_innodb-slave.opt | 1 + mysql-test/t/federated_innodb.test | 34 +++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 mysql-test/r/federated_innodb.result create mode 100644 mysql-test/t/federated_innodb-slave.opt create mode 100644 mysql-test/t/federated_innodb.test (limited to 'mysql-test') diff --git a/mysql-test/r/federated_innodb.result b/mysql-test/r/federated_innodb.result new file mode 100644 index 00000000000..70ba3acb279 --- /dev/null +++ b/mysql-test/r/federated_innodb.result @@ -0,0 +1,34 @@ +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; +stop slave; +DROP DATABASE IF EXISTS federated; +CREATE DATABASE federated; +DROP DATABASE IF EXISTS federated; +CREATE DATABASE federated; +create table federated.t1 (a int primary key, b varchar(64)) +engine=myisam; +create table federated.t1 (a int primary key, b varchar(64)) +engine=federated +connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); +ERROR 23000: Can't write; duplicate key in table 't1' +select * from federated.t1; +a b +1 Larry +2 Curly +truncate federated.t1; +alter table federated.t1 engine=innodb; +insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); +ERROR 23000: Can't write; duplicate key in table 't1' +select * from federated.t1; +a b +drop table federated.t1; +drop table federated.t1; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; diff --git a/mysql-test/t/federated_innodb-slave.opt b/mysql-test/t/federated_innodb-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/t/federated_innodb-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/t/federated_innodb.test b/mysql-test/t/federated_innodb.test new file mode 100644 index 00000000000..772e37a2929 --- /dev/null +++ b/mysql-test/t/federated_innodb.test @@ -0,0 +1,34 @@ +source include/federated.inc; +source include/have_innodb.inc; + +# +# Bug#25513 Federated transaction failures +# +connection slave; +create table federated.t1 (a int primary key, b varchar(64)) + engine=myisam; +connection master; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval create table federated.t1 (a int primary key, b varchar(64)) + engine=federated + connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; + +--error ER_DUP_KEY +insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); +select * from federated.t1; + +connection slave; +truncate federated.t1; +alter table federated.t1 engine=innodb; +connection master; + +--error ER_DUP_KEY +insert into federated.t1 values (1,"Larry"), (2,"Curly"), (1,"Moe"); +select * from federated.t1; + +drop table federated.t1; +connection slave; +drop table federated.t1; + + +source include/federated_cleanup.inc; -- cgit v1.2.1 From d55aa1804370f8c7e2040282799f9b2ec553349f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Jun 2007 09:00:52 +0200 Subject: Cset exclude: msvensson@pilot.(none)|ChangeSet|20070628091815|48577 mysql-test/Makefile.am: Exclude --- mysql-test/Makefile.am | 126 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 105 insertions(+), 21 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 549a9b8ac7d..0a6dbc3663a 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -18,41 +18,125 @@ ## Process this file with automake to create Makefile.in SUBDIRS = ndb +DIST_SUBDIRS=ndb -PRESCRIPTS = mysql-test-run.pl - -GENSCRIPTS = mysql-test-run-shell \ - install_test_db \ - mtr \ - mysql-test-run - -EXTRA_SCRIPTS = mysql-test-run-shell.sh \ - install_test_db.sh \ +benchdir_root= $(prefix) +testdir = $(benchdir_root)/mysql-test +EXTRA_SCRIPTS = mysql-test-run-shell.sh install_test_db.sh \ valgrind.supp $(PRESCRIPTS) - -EXTRA_DIST_DIRS = t r include lib std_data suite extra - -EXTRA_DIST = $(EXTRA_DIST_DIRS) $(EXTRA_SCRIPTS) README - +EXTRA_DIST = $(EXTRA_SCRIPTS) suite +GENSCRIPTS = mysql-test-run-shell install_test_db mtr mysql-test-run +PRESCRIPTS = mysql-test-run.pl test_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS) - +test_DATA = std_data/client-key.pem std_data/client-cert.pem \ + std_data/cacert.pem std_data/server-cert.pem \ + std_data/server-key.pem CLEANFILES = $(GENSCRIPTS) +INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I.. + + +dist-hook: + mkdir -p \ + $(distdir)/t \ + $(distdir)/extra/binlog_tests \ + $(distdir)/extra/rpl_tests \ + $(distdir)/r \ + $(distdir)/include \ + $(distdir)/std_data \ + $(distdir)/std_data/ndb_backup50 \ + $(distdir)/std_data/ndb_backup51 \ + $(distdir)/lib + -$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t + $(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t + -$(INSTALL_DATA) $(srcdir)/t/*.imtest $(distdir)/t + $(INSTALL_DATA) $(srcdir)/t/*.sql $(distdir)/t + -$(INSTALL_DATA) $(srcdir)/t/*.disabled $(distdir)/t + $(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.slave-mi $(distdir)/t + $(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(distdir)/t + $(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.test $(distdir)/extra/binlog_tests + $(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.test $(distdir)/extra/rpl_tests + -$(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.opt $(distdir)/extra/binlog_tests + -$(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.opt $(distdir)/extra/rpl_tests + $(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include + $(INSTALL_DATA) $(srcdir)/include/*.test $(distdir)/include + $(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r + $(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/Index.xml $(distdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.000001 $(distdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.MY* $(distdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(distdir)/std_data/ndb_backup50 + $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(distdir)/std_data/ndb_backup51 + $(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib + -rm -rf `find $(distdir)/suite -type d -name SCCS` $(distdir)/suite/row_lock + +install-data-local: + $(mkinstalldirs) \ + $(DESTDIR)$(testdir)/t \ + $(DESTDIR)$(testdir)/extra/binlog_tests \ + $(DESTDIR)$(testdir)/extra/rpl_tests \ + $(DESTDIR)$(testdir)/r \ + $(DESTDIR)$(testdir)/include \ + $(DESTDIR)$(testdir)/std_data \ + $(DESTDIR)$(testdir)/std_data/ndb_backup50 \ + $(DESTDIR)$(testdir)/std_data/ndb_backup51 \ + $(DESTDIR)$(testdir)/lib + $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir) + -$(INSTALL_DATA) $(srcdir)/t/*.def $(DESTDIR)$(testdir)/t + $(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t + -$(INSTALL_DATA) $(srcdir)/t/*.imtest $(DESTDIR)$(testdir)/t + $(INSTALL_DATA) $(srcdir)/t/*.sql $(DESTDIR)$(testdir)/t + -$(INSTALL_DATA) $(srcdir)/t/*.disabled $(DESTDIR)$(testdir)/t + $(INSTALL_DATA) $(srcdir)/t/*.opt $(DESTDIR)$(testdir)/t + $(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t + $(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t + $(INSTALL_DATA) $(srcdir)/r/*.result $(DESTDIR)$(testdir)/r + $(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r + $(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.test $(DESTDIR)$(testdir)/extra/binlog_tests + $(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.test $(DESTDIR)$(testdir)/extra/rpl_tests + -$(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.opt $(DESTDIR)$(testdir)/extra/binlog_tests + -$(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.opt $(DESTDIR)$(testdir)/extra/rpl_tests + $(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include + $(INSTALL_DATA) $(srcdir)/include/*.test $(DESTDIR)$(testdir)/include + $(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.*001 $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/Index.xml $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.MY* $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data + $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup50 + $(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51 + $(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib + for f in `(cd $(srcdir); find suite -type f | egrep -v 'SCCS|row_lock')`; \ + do \ + d=$(DESTDIR)$(testdir)/`dirname $$f`; \ + mkdir -p $$d ; \ + $(INSTALL_DATA) $(srcdir)/$$f $$d ; \ + done + +uninstall-local: + @RM@ -f -r $(DESTDIR)$(testdir) # mtr - a shortcut for executing mysql-test-run.pl mtr: - @RM@ -f mtr - @LN_S@ mysql-test-run.pl mtr + $(RM) -f mtr + $(LN_S) mysql-test-run.pl mtr # mysql-test-run - a shortcut for executing mysql-test-run.pl mysql-test-run: - @RM@ -f mysql-test-run - @LN_S@ mysql-test-run.pl mysql-test-run + $(RM) -f mysql-test-run + $(LN_S) mysql-test-run.pl mysql-test-run SUFFIXES = .sh -testdir = $(prefix)/mysql-test - .sh: @RM@ -f $@ $@-t @SED@ \ -- cgit v1.2.1 From 70fecb771ab6f7c83aef3304949021af227fd9bb Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Jun 2007 09:23:42 +0200 Subject: WL3933 - Don't fail if mysql-test/t/ doesn't have some files mysql-test/Makefile.am: Don't fail if mysql-test/t/ doesn't have some files --- mysql-test/Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 0a6dbc3663a..acb9ba36bda 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -52,8 +52,8 @@ dist-hook: -$(INSTALL_DATA) $(srcdir)/t/*.imtest $(distdir)/t $(INSTALL_DATA) $(srcdir)/t/*.sql $(distdir)/t -$(INSTALL_DATA) $(srcdir)/t/*.disabled $(distdir)/t - $(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.slave-mi $(distdir)/t - $(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(distdir)/t + -$(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.slave-mi $(distdir)/t + -$(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(distdir)/t $(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.test $(distdir)/extra/binlog_tests $(INSTALL_DATA) $(srcdir)/extra/rpl_tests/*.test $(distdir)/extra/rpl_tests -$(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.opt $(distdir)/extra/binlog_tests @@ -91,9 +91,9 @@ install-data-local: -$(INSTALL_DATA) $(srcdir)/t/*.imtest $(DESTDIR)$(testdir)/t $(INSTALL_DATA) $(srcdir)/t/*.sql $(DESTDIR)$(testdir)/t -$(INSTALL_DATA) $(srcdir)/t/*.disabled $(DESTDIR)$(testdir)/t - $(INSTALL_DATA) $(srcdir)/t/*.opt $(DESTDIR)$(testdir)/t - $(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t - $(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t + -$(INSTALL_DATA) $(srcdir)/t/*.opt $(DESTDIR)$(testdir)/t + -$(INSTALL_SCRIPT) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t + -$(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t $(INSTALL_DATA) $(srcdir)/r/*.result $(DESTDIR)$(testdir)/r $(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r $(INSTALL_DATA) $(srcdir)/extra/binlog_tests/*.test $(DESTDIR)$(testdir)/extra/binlog_tests -- cgit v1.2.1 From 81f58225b4f2b7ce339e4c100f4a3cfadc715d6f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Jun 2007 09:28:51 +0200 Subject: Bug#22540 Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB - Update test results for --binlog-format=row mysql-test/suite/binlog/r/binlog_row_binlog.result: Update test result mysql-test/suite/rpl/r/rpl_row_create_table.result: Update test result --- mysql-test/suite/binlog/r/binlog_row_binlog.result | 131 +++++++++++++++++++++ mysql-test/suite/rpl/r/rpl_row_create_table.result | 28 ++--- 2 files changed, 145 insertions(+), 14 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index 6fcaad010d2..88d403c2f68 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -235,6 +235,137 @@ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 show binlog events in 'master-bin.000002' from 106; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Query 1 # use `test`; drop table t1 +set @ac = @@autocommit; +set autocommit= 0; +reset master; +create table t1(n int) engine=innodb; +begin; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb +master-bin.000001 205 Query 1 273 use `test`; BEGIN +master-bin.000001 273 Table_map 1 312 table_id: # (test.t1) +master-bin.000001 312 Write_rows 1 346 table_id: # flags: STMT_END_F +master-bin.000001 346 Table_map 1 385 table_id: # (test.t1) +master-bin.000001 385 Write_rows 1 419 table_id: # flags: STMT_END_F +master-bin.000001 419 Table_map 1 458 table_id: # (test.t1) +master-bin.000001 458 Write_rows 1 492 table_id: # flags: STMT_END_F +master-bin.000001 492 Xid 1 519 COMMIT /* XID */ +master-bin.000001 519 Query 1 595 use `test`; drop table t1 +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb +master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) +master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F +master-bin.000001 278 Xid 1 305 COMMIT /* XID */ +master-bin.000001 305 Table_map 1 344 table_id: # (test.t1) +master-bin.000001 344 Write_rows 1 378 table_id: # flags: STMT_END_F +master-bin.000001 378 Xid 1 405 COMMIT /* XID */ +master-bin.000001 405 Table_map 1 444 table_id: # (test.t1) +master-bin.000001 444 Write_rows 1 478 table_id: # flags: STMT_END_F +master-bin.000001 478 Xid 1 505 COMMIT /* XID */ +master-bin.000001 505 Query 1 581 use `test`; drop table t1 +reset master; +create table t1(n int) engine=myisam; +begin; +insert into t1 values (4); +insert into t1 values (5); +insert into t1 values (6); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=myisam +master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) +master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F +master-bin.000001 278 Table_map 1 317 table_id: # (test.t1) +master-bin.000001 317 Write_rows 1 351 table_id: # flags: STMT_END_F +master-bin.000001 351 Table_map 1 390 table_id: # (test.t1) +master-bin.000001 390 Write_rows 1 424 table_id: # flags: STMT_END_F +master-bin.000001 424 Query 1 500 use `test`; drop table t1 +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 205 +insert into t1 values (1); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 305 +insert into t1 values (2); +insert into t1 values (3); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 505 +commit; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 505 +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb +master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) +master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F +master-bin.000001 278 Xid 1 305 COMMIT /* XID */ +master-bin.000001 305 Table_map 1 344 table_id: # (test.t1) +master-bin.000001 344 Write_rows 1 378 table_id: # flags: STMT_END_F +master-bin.000001 378 Xid 1 405 COMMIT /* XID */ +master-bin.000001 405 Table_map 1 444 table_id: # (test.t1) +master-bin.000001 444 Write_rows 1 478 table_id: # flags: STMT_END_F +master-bin.000001 478 Xid 1 505 COMMIT /* XID */ +master-bin.000001 505 Query 1 581 use `test`; drop table t1 +set autocommit= 0; +reset master; +create table t1(n int) engine=myisam; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 205 +insert into t1 values (4); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 278 +insert into t1 values (5); +insert into t1 values (6); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 424 +commit; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 424 +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=myisam +master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) +master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F +master-bin.000001 278 Table_map 1 317 table_id: # (test.t1) +master-bin.000001 317 Write_rows 1 351 table_id: # flags: STMT_END_F +master-bin.000001 351 Table_map 1 390 table_id: # (test.t1) +master-bin.000001 390 Write_rows 1 424 table_id: # flags: STMT_END_F +master-bin.000001 424 Query 1 500 use `test`; drop table t1 +set session autocommit = @ac; +End of 5.0 tests reset master; create table t1 (id tinyint auto_increment primary key); set insert_id=128; diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result index e76ce5b962d..f22881bd4a9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -279,25 +279,25 @@ Log_name Pos Event_type Server_id End_log_pos Info # 192 Table_map # 231 table_id: # (test.t1) # 231 Write_rows # 275 table_id: # flags: STMT_END_F # 275 Query # 343 use `test`; BEGIN -# 343 Query # 125 use `test`; CREATE TABLE `t2` ( +# 343 Query # 468 use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 468 Table_map # 164 table_id: # (test.t2) -# 507 Write_rows # 208 table_id: # flags: STMT_END_F +# 468 Table_map # 507 table_id: # (test.t2) +# 507 Write_rows # 551 table_id: # flags: STMT_END_F # 551 Xid # 578 COMMIT /* XID */ # 578 Query # 646 use `test`; BEGIN -# 646 Query # 125 use `test`; CREATE TABLE `t3` ( +# 646 Query # 771 use `test`; CREATE TABLE `t3` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 771 Table_map # 164 table_id: # (test.t3) -# 810 Write_rows # 208 table_id: # flags: STMT_END_F +# 771 Table_map # 810 table_id: # (test.t3) +# 810 Write_rows # 854 table_id: # flags: STMT_END_F # 854 Xid # 881 COMMIT /* XID */ # 881 Query # 949 use `test`; BEGIN -# 949 Query # 125 use `test`; CREATE TABLE `t4` ( +# 949 Query # 1074 use `test`; CREATE TABLE `t4` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 1074 Table_map # 164 table_id: # (test.t4) -# 1113 Write_rows # 208 table_id: # flags: STMT_END_F +# 1074 Table_map # 1113 table_id: # (test.t4) +# 1113 Write_rows # 1157 table_id: # flags: STMT_END_F # 1157 Xid # 1184 COMMIT /* XID */ # 1184 Table_map # 1223 table_id: # (test.t1) # 1223 Write_rows # 1267 table_id: # flags: STMT_END_F @@ -371,10 +371,10 @@ Log_name Pos Event_type Server_id End_log_pos Info # 231 Write_rows # 275 table_id: # flags: STMT_END_F # 275 Query # 375 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB # 375 Query # 443 use `test`; BEGIN -# 443 Table_map # 39 table_id: # (test.t2) -# 482 Write_rows # 83 table_id: # flags: STMT_END_F -# 526 Table_map # 122 table_id: # (test.t2) -# 565 Write_rows # 161 table_id: # flags: STMT_END_F +# 443 Table_map # 482 table_id: # (test.t2) +# 482 Write_rows # 526 table_id: # flags: STMT_END_F +# 526 Table_map # 565 table_id: # (test.t2) +# 565 Write_rows # 604 table_id: # flags: STMT_END_F # 604 Xid # 631 COMMIT /* XID */ SELECT * FROM t2 ORDER BY a; a @@ -396,7 +396,7 @@ SELECT * FROM t2 ORDER BY a; a SHOW BINLOG EVENTS FROM 631; Log_name Pos Event_type Server_id End_log_pos Info -# 631 Query # 80 use `test`; TRUNCATE TABLE t2 +# 631 Query # 711 use `test`; TRUNCATE TABLE t2 # 711 Xid # 738 COMMIT /* XID */ SELECT * FROM t2 ORDER BY a; a -- cgit v1.2.1 From 0870afe37de6bac78e8099eecc175827d274c1f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Jun 2007 10:26:20 +0200 Subject: Bug#28356 Exec'ing "diff" from "mysqltest" loses the output, no information available - Use SQL for diffing master and slave mysql-test/r/rpl_misc_functions.result: Dump t1 on slave and load it back into temporary table on master to allow comapre with SQL mysql-test/t/rpl_misc_functions.test: Dump t1 on slave and load it back into temporary table on master to allow comapre with SQL --- mysql-test/r/rpl_misc_functions.result | 16 +++++++++---- mysql-test/t/rpl_misc_functions.test | 42 +++++++++++++++++++++------------- 2 files changed, 38 insertions(+), 20 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_misc_functions.result b/mysql-test/r/rpl_misc_functions.result index 526414cec9c..ca7403316b1 100644 --- a/mysql-test/r/rpl_misc_functions.result +++ b/mysql-test/r/rpl_misc_functions.result @@ -40,7 +40,15 @@ CALL test_replication_sp2(); INSERT INTO t1 VALUES (test_replication_sf()); INSERT INTO t1 VALUES (test_replication_sf()); INSERT INTO t1 VALUES (test_replication_sf()); -DROP PROCEDURE IF EXISTS test_replication_sp1; -DROP PROCEDURE IF EXISTS test_replication_sp2; -DROP FUNCTION IF EXISTS test_replication_sf; -DROP TABLE IF EXISTS t1; +select * from t1 into outfile "../tmp/t1_slave.txt"; +create temporary table t1_slave select * from t1 where 1=0; +load data infile '../tmp/t1_slave.txt' into table t1_slave; +select count(*) into @aux from t1, t1_slave +where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ; +SELECT @aux; +@aux +12 +DROP PROCEDURE test_replication_sp1; +DROP PROCEDURE test_replication_sp2; +DROP FUNCTION test_replication_sf; +DROP TABLE t1, t1_slave; diff --git a/mysql-test/t/rpl_misc_functions.test b/mysql-test/t/rpl_misc_functions.test index f00beff583a..b87fff919b2 100644 --- a/mysql-test/t/rpl_misc_functions.test +++ b/mysql-test/t/rpl_misc_functions.test @@ -77,27 +77,37 @@ INSERT INTO t1 VALUES (test_replication_sf()); INSERT INTO t1 VALUES (test_replication_sf()); INSERT INTO t1 VALUES (test_replication_sf()); -# Record the results of the query on the master ---exec $MYSQL --port=$MASTER_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql - --sync_slave_with_master -# Record the results of the query on the slave ---exec $MYSQL --port=$SLAVE_MYPORT test -e "SELECT * FROM test.t1" > $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql +# Dump table on slave +select * from t1 into outfile "../tmp/t1_slave.txt"; -# Compare the results from the master to the slave. ---exec diff $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql +# Load data from slave into temp table on master +connection master; +create temporary table t1_slave select * from t1 where 1=0; +load data infile '../tmp/t1_slave.txt' into table t1_slave; +--remove_file $MYSQLTEST_VARDIR/tmp/t1_slave.txt + +# Compare master and slave temp table, use subtraction +# for floating point comparison of "double" +select count(*) into @aux from t1, t1_slave +where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ; +SELECT @aux; +if (`SELECT @aux <> 12 OR @aux IS NULL`) +{ + --echo # ERROR: We expected to get count(*) = 12. + SELECT col_a FROM t1; + SELECT col_a FROM t1_slave; + --echo # abort + exit; +} # Cleanup connection master; ---disable_warnings -DROP PROCEDURE IF EXISTS test_replication_sp1; -DROP PROCEDURE IF EXISTS test_replication_sp2; -DROP FUNCTION IF EXISTS test_replication_sf; -DROP TABLE IF EXISTS t1; ---enable_warnings +DROP PROCEDURE test_replication_sp1; +DROP PROCEDURE test_replication_sp2; +DROP FUNCTION test_replication_sf; +DROP TABLE t1, t1_slave; --sync_slave_with_master -# If all is good, when can cleanup our dump files. ---system rm $MYSQLTEST_VARDIR/tmp/rpl_rand_master.sql ---system rm $MYSQLTEST_VARDIR/tmp/rpl_rand_slave.sql + -- cgit v1.2.1 From 4e5990481dc49c6540e6c103dbbf0e342d00c4a5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Jun 2007 14:18:20 +0200 Subject: Reduce time for mysqladmin to try to shutdown servers from 70 to 20 seconds --- mysql-test/lib/mtr_process.pl | 2 +- mysql-test/mysql-test-run.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 7ac75829a28..69026d2c72f 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -359,7 +359,7 @@ sub mtr_kill_leftovers () { "socket: '$srv->{path_sock}'; ". "port: $srv->{port})"); - my $pid= mtr_mysqladmin_start($srv, "shutdown", 70); + my $pid= mtr_mysqladmin_start($srv, "shutdown", 20); # Save the pid of the mysqladmin process $admin_pids{$pid}= 1; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 0908eda061c..6ec4045bb43 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4328,7 +4328,7 @@ sub run_testcase_stop_servers($$$) { { if ( $mysqld->{'pid'} ) { - $pid= mtr_mysqladmin_start($mysqld, "shutdown", 70); + $pid= mtr_mysqladmin_start($mysqld, "shutdown", 20); $admin_pids{$pid}= 1; @@ -4380,7 +4380,7 @@ sub run_testcase_stop_servers($$$) { { if ( $mysqld->{'pid'} ) { - $pid= mtr_mysqladmin_start($mysqld, "shutdown", 70); + $pid= mtr_mysqladmin_start($mysqld, "shutdown", 20); $admin_pids{$pid}= 1; -- cgit v1.2.1 From 59ab2d4612b74a4b03a532a760c696be7a9a0d2f Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 30 Jun 2007 02:30:42 +0200 Subject: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB previous correction didn't. make sure "tail" is fixed up when filling cache several times; rework formulae. mysql-test/r/binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary mysql-test/t/binlog.test: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary --- mysql-test/r/binlog.result | 416 +++++++++++++++++++++++++++++++++++++++++++++ mysql-test/t/binlog.test | 31 +++- 2 files changed, 446 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/binlog.result b/mysql-test/r/binlog.result index 41c75a2067b..77b015a4688 100644 --- a/mysql-test/r/binlog.result +++ b/mysql-test/r/binlog.result @@ -248,4 +248,420 @@ master-bin.000001 285 Query 1 373 use `test`; insert into t1 values (5) master-bin.000001 373 Query 1 461 use `test`; insert into t1 values (6) master-bin.000001 461 Query 1 537 use `test`; drop table t1 set session autocommit = @ac; +set @bcs = @@binlog_cache_size; +set @ac = @@autocommit; +set global binlog_cache_size=4096; +set autocommit= 0; +reset master; +create table t1 (a int) engine=innodb; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server ver: 5.0.46-debug-log, Binlog ver: 4 +master-bin.000001 98 Query 1 198 use `test`; create table t1 (a int) engine=innodb +master-bin.000001 198 Query 1 266 use `test`; BEGIN +master-bin.000001 266 Query 1 357 use `test`; insert into t1 values( 400 ) +master-bin.000001 357 Query 1 448 use `test`; insert into t1 values( 399 ) +master-bin.000001 448 Query 1 539 use `test`; insert into t1 values( 398 ) +master-bin.000001 539 Query 1 630 use `test`; insert into t1 values( 397 ) +master-bin.000001 630 Query 1 721 use `test`; insert into t1 values( 396 ) +master-bin.000001 721 Query 1 812 use `test`; insert into t1 values( 395 ) +master-bin.000001 812 Query 1 903 use `test`; insert into t1 values( 394 ) +master-bin.000001 903 Query 1 994 use `test`; insert into t1 values( 393 ) +master-bin.000001 994 Query 1 1085 use `test`; insert into t1 values( 392 ) +master-bin.000001 1085 Query 1 1176 use `test`; insert into t1 values( 391 ) +master-bin.000001 1176 Query 1 1267 use `test`; insert into t1 values( 390 ) +master-bin.000001 1267 Query 1 1358 use `test`; insert into t1 values( 389 ) +master-bin.000001 1358 Query 1 1449 use `test`; insert into t1 values( 388 ) +master-bin.000001 1449 Query 1 1540 use `test`; insert into t1 values( 387 ) +master-bin.000001 1540 Query 1 1631 use `test`; insert into t1 values( 386 ) +master-bin.000001 1631 Query 1 1722 use `test`; insert into t1 values( 385 ) +master-bin.000001 1722 Query 1 1813 use `test`; insert into t1 values( 384 ) +master-bin.000001 1813 Query 1 1904 use `test`; insert into t1 values( 383 ) +master-bin.000001 1904 Query 1 1995 use `test`; insert into t1 values( 382 ) +master-bin.000001 1995 Query 1 2086 use `test`; insert into t1 values( 381 ) +master-bin.000001 2086 Query 1 2177 use `test`; insert into t1 values( 380 ) +master-bin.000001 2177 Query 1 2268 use `test`; insert into t1 values( 379 ) +master-bin.000001 2268 Query 1 2359 use `test`; insert into t1 values( 378 ) +master-bin.000001 2359 Query 1 2450 use `test`; insert into t1 values( 377 ) +master-bin.000001 2450 Query 1 2541 use `test`; insert into t1 values( 376 ) +master-bin.000001 2541 Query 1 2632 use `test`; insert into t1 values( 375 ) +master-bin.000001 2632 Query 1 2723 use `test`; insert into t1 values( 374 ) +master-bin.000001 2723 Query 1 2814 use `test`; insert into t1 values( 373 ) +master-bin.000001 2814 Query 1 2905 use `test`; insert into t1 values( 372 ) +master-bin.000001 2905 Query 1 2996 use `test`; insert into t1 values( 371 ) +master-bin.000001 2996 Query 1 3087 use `test`; insert into t1 values( 370 ) +master-bin.000001 3087 Query 1 3178 use `test`; insert into t1 values( 369 ) +master-bin.000001 3178 Query 1 3269 use `test`; insert into t1 values( 368 ) +master-bin.000001 3269 Query 1 3360 use `test`; insert into t1 values( 367 ) +master-bin.000001 3360 Query 1 3451 use `test`; insert into t1 values( 366 ) +master-bin.000001 3451 Query 1 3542 use `test`; insert into t1 values( 365 ) +master-bin.000001 3542 Query 1 3633 use `test`; insert into t1 values( 364 ) +master-bin.000001 3633 Query 1 3724 use `test`; insert into t1 values( 363 ) +master-bin.000001 3724 Query 1 3815 use `test`; insert into t1 values( 362 ) +master-bin.000001 3815 Query 1 3906 use `test`; insert into t1 values( 361 ) +master-bin.000001 3906 Query 1 3997 use `test`; insert into t1 values( 360 ) +master-bin.000001 3997 Query 1 4088 use `test`; insert into t1 values( 359 ) +master-bin.000001 4088 Query 1 4179 use `test`; insert into t1 values( 358 ) +master-bin.000001 4179 Query 1 4270 use `test`; insert into t1 values( 357 ) +master-bin.000001 4270 Query 1 4361 use `test`; insert into t1 values( 356 ) +master-bin.000001 4361 Query 1 4452 use `test`; insert into t1 values( 355 ) +master-bin.000001 4452 Query 1 4543 use `test`; insert into t1 values( 354 ) +master-bin.000001 4543 Query 1 4634 use `test`; insert into t1 values( 353 ) +master-bin.000001 4634 Query 1 4725 use `test`; insert into t1 values( 352 ) +master-bin.000001 4725 Query 1 4816 use `test`; insert into t1 values( 351 ) +master-bin.000001 4816 Query 1 4907 use `test`; insert into t1 values( 350 ) +master-bin.000001 4907 Query 1 4998 use `test`; insert into t1 values( 349 ) +master-bin.000001 4998 Query 1 5089 use `test`; insert into t1 values( 348 ) +master-bin.000001 5089 Query 1 5180 use `test`; insert into t1 values( 347 ) +master-bin.000001 5180 Query 1 5271 use `test`; insert into t1 values( 346 ) +master-bin.000001 5271 Query 1 5362 use `test`; insert into t1 values( 345 ) +master-bin.000001 5362 Query 1 5453 use `test`; insert into t1 values( 344 ) +master-bin.000001 5453 Query 1 5544 use `test`; insert into t1 values( 343 ) +master-bin.000001 5544 Query 1 5635 use `test`; insert into t1 values( 342 ) +master-bin.000001 5635 Query 1 5726 use `test`; insert into t1 values( 341 ) +master-bin.000001 5726 Query 1 5817 use `test`; insert into t1 values( 340 ) +master-bin.000001 5817 Query 1 5908 use `test`; insert into t1 values( 339 ) +master-bin.000001 5908 Query 1 5999 use `test`; insert into t1 values( 338 ) +master-bin.000001 5999 Query 1 6090 use `test`; insert into t1 values( 337 ) +master-bin.000001 6090 Query 1 6181 use `test`; insert into t1 values( 336 ) +master-bin.000001 6181 Query 1 6272 use `test`; insert into t1 values( 335 ) +master-bin.000001 6272 Query 1 6363 use `test`; insert into t1 values( 334 ) +master-bin.000001 6363 Query 1 6454 use `test`; insert into t1 values( 333 ) +master-bin.000001 6454 Query 1 6545 use `test`; insert into t1 values( 332 ) +master-bin.000001 6545 Query 1 6636 use `test`; insert into t1 values( 331 ) +master-bin.000001 6636 Query 1 6727 use `test`; insert into t1 values( 330 ) +master-bin.000001 6727 Query 1 6818 use `test`; insert into t1 values( 329 ) +master-bin.000001 6818 Query 1 6909 use `test`; insert into t1 values( 328 ) +master-bin.000001 6909 Query 1 7000 use `test`; insert into t1 values( 327 ) +master-bin.000001 7000 Query 1 7091 use `test`; insert into t1 values( 326 ) +master-bin.000001 7091 Query 1 7182 use `test`; insert into t1 values( 325 ) +master-bin.000001 7182 Query 1 7273 use `test`; insert into t1 values( 324 ) +master-bin.000001 7273 Query 1 7364 use `test`; insert into t1 values( 323 ) +master-bin.000001 7364 Query 1 7455 use `test`; insert into t1 values( 322 ) +master-bin.000001 7455 Query 1 7546 use `test`; insert into t1 values( 321 ) +master-bin.000001 7546 Query 1 7637 use `test`; insert into t1 values( 320 ) +master-bin.000001 7637 Query 1 7728 use `test`; insert into t1 values( 319 ) +master-bin.000001 7728 Query 1 7819 use `test`; insert into t1 values( 318 ) +master-bin.000001 7819 Query 1 7910 use `test`; insert into t1 values( 317 ) +master-bin.000001 7910 Query 1 8001 use `test`; insert into t1 values( 316 ) +master-bin.000001 8001 Query 1 8092 use `test`; insert into t1 values( 315 ) +master-bin.000001 8092 Query 1 8183 use `test`; insert into t1 values( 314 ) +master-bin.000001 8183 Query 1 8274 use `test`; insert into t1 values( 313 ) +master-bin.000001 8274 Query 1 8365 use `test`; insert into t1 values( 312 ) +master-bin.000001 8365 Query 1 8456 use `test`; insert into t1 values( 311 ) +master-bin.000001 8456 Query 1 8547 use `test`; insert into t1 values( 310 ) +master-bin.000001 8547 Query 1 8638 use `test`; insert into t1 values( 309 ) +master-bin.000001 8638 Query 1 8729 use `test`; insert into t1 values( 308 ) +master-bin.000001 8729 Query 1 8820 use `test`; insert into t1 values( 307 ) +master-bin.000001 8820 Query 1 8911 use `test`; insert into t1 values( 306 ) +master-bin.000001 8911 Query 1 9002 use `test`; insert into t1 values( 305 ) +master-bin.000001 9002 Query 1 9093 use `test`; insert into t1 values( 304 ) +master-bin.000001 9093 Query 1 9184 use `test`; insert into t1 values( 303 ) +master-bin.000001 9184 Query 1 9275 use `test`; insert into t1 values( 302 ) +master-bin.000001 9275 Query 1 9366 use `test`; insert into t1 values( 301 ) +master-bin.000001 9366 Query 1 9457 use `test`; insert into t1 values( 300 ) +master-bin.000001 9457 Query 1 9548 use `test`; insert into t1 values( 299 ) +master-bin.000001 9548 Query 1 9639 use `test`; insert into t1 values( 298 ) +master-bin.000001 9639 Query 1 9730 use `test`; insert into t1 values( 297 ) +master-bin.000001 9730 Query 1 9821 use `test`; insert into t1 values( 296 ) +master-bin.000001 9821 Query 1 9912 use `test`; insert into t1 values( 295 ) +master-bin.000001 9912 Query 1 10003 use `test`; insert into t1 values( 294 ) +master-bin.000001 10003 Query 1 10094 use `test`; insert into t1 values( 293 ) +master-bin.000001 10094 Query 1 10185 use `test`; insert into t1 values( 292 ) +master-bin.000001 10185 Query 1 10276 use `test`; insert into t1 values( 291 ) +master-bin.000001 10276 Query 1 10367 use `test`; insert into t1 values( 290 ) +master-bin.000001 10367 Query 1 10458 use `test`; insert into t1 values( 289 ) +master-bin.000001 10458 Query 1 10549 use `test`; insert into t1 values( 288 ) +master-bin.000001 10549 Query 1 10640 use `test`; insert into t1 values( 287 ) +master-bin.000001 10640 Query 1 10731 use `test`; insert into t1 values( 286 ) +master-bin.000001 10731 Query 1 10822 use `test`; insert into t1 values( 285 ) +master-bin.000001 10822 Query 1 10913 use `test`; insert into t1 values( 284 ) +master-bin.000001 10913 Query 1 11004 use `test`; insert into t1 values( 283 ) +master-bin.000001 11004 Query 1 11095 use `test`; insert into t1 values( 282 ) +master-bin.000001 11095 Query 1 11186 use `test`; insert into t1 values( 281 ) +master-bin.000001 11186 Query 1 11277 use `test`; insert into t1 values( 280 ) +master-bin.000001 11277 Query 1 11368 use `test`; insert into t1 values( 279 ) +master-bin.000001 11368 Query 1 11459 use `test`; insert into t1 values( 278 ) +master-bin.000001 11459 Query 1 11550 use `test`; insert into t1 values( 277 ) +master-bin.000001 11550 Query 1 11641 use `test`; insert into t1 values( 276 ) +master-bin.000001 11641 Query 1 11732 use `test`; insert into t1 values( 275 ) +master-bin.000001 11732 Query 1 11823 use `test`; insert into t1 values( 274 ) +master-bin.000001 11823 Query 1 11914 use `test`; insert into t1 values( 273 ) +master-bin.000001 11914 Query 1 12005 use `test`; insert into t1 values( 272 ) +master-bin.000001 12005 Query 1 12096 use `test`; insert into t1 values( 271 ) +master-bin.000001 12096 Query 1 12187 use `test`; insert into t1 values( 270 ) +master-bin.000001 12187 Query 1 12278 use `test`; insert into t1 values( 269 ) +master-bin.000001 12278 Query 1 12369 use `test`; insert into t1 values( 268 ) +master-bin.000001 12369 Query 1 12460 use `test`; insert into t1 values( 267 ) +master-bin.000001 12460 Query 1 12551 use `test`; insert into t1 values( 266 ) +master-bin.000001 12551 Query 1 12642 use `test`; insert into t1 values( 265 ) +master-bin.000001 12642 Query 1 12733 use `test`; insert into t1 values( 264 ) +master-bin.000001 12733 Query 1 12824 use `test`; insert into t1 values( 263 ) +master-bin.000001 12824 Query 1 12915 use `test`; insert into t1 values( 262 ) +master-bin.000001 12915 Query 1 13006 use `test`; insert into t1 values( 261 ) +master-bin.000001 13006 Query 1 13097 use `test`; insert into t1 values( 260 ) +master-bin.000001 13097 Query 1 13188 use `test`; insert into t1 values( 259 ) +master-bin.000001 13188 Query 1 13279 use `test`; insert into t1 values( 258 ) +master-bin.000001 13279 Query 1 13370 use `test`; insert into t1 values( 257 ) +master-bin.000001 13370 Query 1 13461 use `test`; insert into t1 values( 256 ) +master-bin.000001 13461 Query 1 13552 use `test`; insert into t1 values( 255 ) +master-bin.000001 13552 Query 1 13643 use `test`; insert into t1 values( 254 ) +master-bin.000001 13643 Query 1 13734 use `test`; insert into t1 values( 253 ) +master-bin.000001 13734 Query 1 13825 use `test`; insert into t1 values( 252 ) +master-bin.000001 13825 Query 1 13916 use `test`; insert into t1 values( 251 ) +master-bin.000001 13916 Query 1 14007 use `test`; insert into t1 values( 250 ) +master-bin.000001 14007 Query 1 14098 use `test`; insert into t1 values( 249 ) +master-bin.000001 14098 Query 1 14189 use `test`; insert into t1 values( 248 ) +master-bin.000001 14189 Query 1 14280 use `test`; insert into t1 values( 247 ) +master-bin.000001 14280 Query 1 14371 use `test`; insert into t1 values( 246 ) +master-bin.000001 14371 Query 1 14462 use `test`; insert into t1 values( 245 ) +master-bin.000001 14462 Query 1 14553 use `test`; insert into t1 values( 244 ) +master-bin.000001 14553 Query 1 14644 use `test`; insert into t1 values( 243 ) +master-bin.000001 14644 Query 1 14735 use `test`; insert into t1 values( 242 ) +master-bin.000001 14735 Query 1 14826 use `test`; insert into t1 values( 241 ) +master-bin.000001 14826 Query 1 14917 use `test`; insert into t1 values( 240 ) +master-bin.000001 14917 Query 1 15008 use `test`; insert into t1 values( 239 ) +master-bin.000001 15008 Query 1 15099 use `test`; insert into t1 values( 238 ) +master-bin.000001 15099 Query 1 15190 use `test`; insert into t1 values( 237 ) +master-bin.000001 15190 Query 1 15281 use `test`; insert into t1 values( 236 ) +master-bin.000001 15281 Query 1 15372 use `test`; insert into t1 values( 235 ) +master-bin.000001 15372 Query 1 15463 use `test`; insert into t1 values( 234 ) +master-bin.000001 15463 Query 1 15554 use `test`; insert into t1 values( 233 ) +master-bin.000001 15554 Query 1 15645 use `test`; insert into t1 values( 232 ) +master-bin.000001 15645 Query 1 15736 use `test`; insert into t1 values( 231 ) +master-bin.000001 15736 Query 1 15827 use `test`; insert into t1 values( 230 ) +master-bin.000001 15827 Query 1 15918 use `test`; insert into t1 values( 229 ) +master-bin.000001 15918 Query 1 16009 use `test`; insert into t1 values( 228 ) +master-bin.000001 16009 Query 1 16100 use `test`; insert into t1 values( 227 ) +master-bin.000001 16100 Query 1 16191 use `test`; insert into t1 values( 226 ) +master-bin.000001 16191 Query 1 16282 use `test`; insert into t1 values( 225 ) +master-bin.000001 16282 Query 1 16373 use `test`; insert into t1 values( 224 ) +master-bin.000001 16373 Query 1 16464 use `test`; insert into t1 values( 223 ) +master-bin.000001 16464 Query 1 16555 use `test`; insert into t1 values( 222 ) +master-bin.000001 16555 Query 1 16646 use `test`; insert into t1 values( 221 ) +master-bin.000001 16646 Query 1 16737 use `test`; insert into t1 values( 220 ) +master-bin.000001 16737 Query 1 16828 use `test`; insert into t1 values( 219 ) +master-bin.000001 16828 Query 1 16919 use `test`; insert into t1 values( 218 ) +master-bin.000001 16919 Query 1 17010 use `test`; insert into t1 values( 217 ) +master-bin.000001 17010 Query 1 17101 use `test`; insert into t1 values( 216 ) +master-bin.000001 17101 Query 1 17192 use `test`; insert into t1 values( 215 ) +master-bin.000001 17192 Query 1 17283 use `test`; insert into t1 values( 214 ) +master-bin.000001 17283 Query 1 17374 use `test`; insert into t1 values( 213 ) +master-bin.000001 17374 Query 1 17465 use `test`; insert into t1 values( 212 ) +master-bin.000001 17465 Query 1 17556 use `test`; insert into t1 values( 211 ) +master-bin.000001 17556 Query 1 17647 use `test`; insert into t1 values( 210 ) +master-bin.000001 17647 Query 1 17738 use `test`; insert into t1 values( 209 ) +master-bin.000001 17738 Query 1 17829 use `test`; insert into t1 values( 208 ) +master-bin.000001 17829 Query 1 17920 use `test`; insert into t1 values( 207 ) +master-bin.000001 17920 Query 1 18011 use `test`; insert into t1 values( 206 ) +master-bin.000001 18011 Query 1 18102 use `test`; insert into t1 values( 205 ) +master-bin.000001 18102 Query 1 18193 use `test`; insert into t1 values( 204 ) +master-bin.000001 18193 Query 1 18284 use `test`; insert into t1 values( 203 ) +master-bin.000001 18284 Query 1 18375 use `test`; insert into t1 values( 202 ) +master-bin.000001 18375 Query 1 18466 use `test`; insert into t1 values( 201 ) +master-bin.000001 18466 Query 1 18557 use `test`; insert into t1 values( 200 ) +master-bin.000001 18557 Query 1 18648 use `test`; insert into t1 values( 199 ) +master-bin.000001 18648 Query 1 18739 use `test`; insert into t1 values( 198 ) +master-bin.000001 18739 Query 1 18830 use `test`; insert into t1 values( 197 ) +master-bin.000001 18830 Query 1 18921 use `test`; insert into t1 values( 196 ) +master-bin.000001 18921 Query 1 19012 use `test`; insert into t1 values( 195 ) +master-bin.000001 19012 Query 1 19103 use `test`; insert into t1 values( 194 ) +master-bin.000001 19103 Query 1 19194 use `test`; insert into t1 values( 193 ) +master-bin.000001 19194 Query 1 19285 use `test`; insert into t1 values( 192 ) +master-bin.000001 19285 Query 1 19376 use `test`; insert into t1 values( 191 ) +master-bin.000001 19376 Query 1 19467 use `test`; insert into t1 values( 190 ) +master-bin.000001 19467 Query 1 19558 use `test`; insert into t1 values( 189 ) +master-bin.000001 19558 Query 1 19649 use `test`; insert into t1 values( 188 ) +master-bin.000001 19649 Query 1 19740 use `test`; insert into t1 values( 187 ) +master-bin.000001 19740 Query 1 19831 use `test`; insert into t1 values( 186 ) +master-bin.000001 19831 Query 1 19922 use `test`; insert into t1 values( 185 ) +master-bin.000001 19922 Query 1 20013 use `test`; insert into t1 values( 184 ) +master-bin.000001 20013 Query 1 20104 use `test`; insert into t1 values( 183 ) +master-bin.000001 20104 Query 1 20195 use `test`; insert into t1 values( 182 ) +master-bin.000001 20195 Query 1 20286 use `test`; insert into t1 values( 181 ) +master-bin.000001 20286 Query 1 20377 use `test`; insert into t1 values( 180 ) +master-bin.000001 20377 Query 1 20468 use `test`; insert into t1 values( 179 ) +master-bin.000001 20468 Query 1 20559 use `test`; insert into t1 values( 178 ) +master-bin.000001 20559 Query 1 20650 use `test`; insert into t1 values( 177 ) +master-bin.000001 20650 Query 1 20741 use `test`; insert into t1 values( 176 ) +master-bin.000001 20741 Query 1 20832 use `test`; insert into t1 values( 175 ) +master-bin.000001 20832 Query 1 20923 use `test`; insert into t1 values( 174 ) +master-bin.000001 20923 Query 1 21014 use `test`; insert into t1 values( 173 ) +master-bin.000001 21014 Query 1 21105 use `test`; insert into t1 values( 172 ) +master-bin.000001 21105 Query 1 21196 use `test`; insert into t1 values( 171 ) +master-bin.000001 21196 Query 1 21287 use `test`; insert into t1 values( 170 ) +master-bin.000001 21287 Query 1 21378 use `test`; insert into t1 values( 169 ) +master-bin.000001 21378 Query 1 21469 use `test`; insert into t1 values( 168 ) +master-bin.000001 21469 Query 1 21560 use `test`; insert into t1 values( 167 ) +master-bin.000001 21560 Query 1 21651 use `test`; insert into t1 values( 166 ) +master-bin.000001 21651 Query 1 21742 use `test`; insert into t1 values( 165 ) +master-bin.000001 21742 Query 1 21833 use `test`; insert into t1 values( 164 ) +master-bin.000001 21833 Query 1 21924 use `test`; insert into t1 values( 163 ) +master-bin.000001 21924 Query 1 22015 use `test`; insert into t1 values( 162 ) +master-bin.000001 22015 Query 1 22106 use `test`; insert into t1 values( 161 ) +master-bin.000001 22106 Query 1 22197 use `test`; insert into t1 values( 160 ) +master-bin.000001 22197 Query 1 22288 use `test`; insert into t1 values( 159 ) +master-bin.000001 22288 Query 1 22379 use `test`; insert into t1 values( 158 ) +master-bin.000001 22379 Query 1 22470 use `test`; insert into t1 values( 157 ) +master-bin.000001 22470 Query 1 22561 use `test`; insert into t1 values( 156 ) +master-bin.000001 22561 Query 1 22652 use `test`; insert into t1 values( 155 ) +master-bin.000001 22652 Query 1 22743 use `test`; insert into t1 values( 154 ) +master-bin.000001 22743 Query 1 22834 use `test`; insert into t1 values( 153 ) +master-bin.000001 22834 Query 1 22925 use `test`; insert into t1 values( 152 ) +master-bin.000001 22925 Query 1 23016 use `test`; insert into t1 values( 151 ) +master-bin.000001 23016 Query 1 23107 use `test`; insert into t1 values( 150 ) +master-bin.000001 23107 Query 1 23198 use `test`; insert into t1 values( 149 ) +master-bin.000001 23198 Query 1 23289 use `test`; insert into t1 values( 148 ) +master-bin.000001 23289 Query 1 23380 use `test`; insert into t1 values( 147 ) +master-bin.000001 23380 Query 1 23471 use `test`; insert into t1 values( 146 ) +master-bin.000001 23471 Query 1 23562 use `test`; insert into t1 values( 145 ) +master-bin.000001 23562 Query 1 23653 use `test`; insert into t1 values( 144 ) +master-bin.000001 23653 Query 1 23744 use `test`; insert into t1 values( 143 ) +master-bin.000001 23744 Query 1 23835 use `test`; insert into t1 values( 142 ) +master-bin.000001 23835 Query 1 23926 use `test`; insert into t1 values( 141 ) +master-bin.000001 23926 Query 1 24017 use `test`; insert into t1 values( 140 ) +master-bin.000001 24017 Query 1 24108 use `test`; insert into t1 values( 139 ) +master-bin.000001 24108 Query 1 24199 use `test`; insert into t1 values( 138 ) +master-bin.000001 24199 Query 1 24290 use `test`; insert into t1 values( 137 ) +master-bin.000001 24290 Query 1 24381 use `test`; insert into t1 values( 136 ) +master-bin.000001 24381 Query 1 24472 use `test`; insert into t1 values( 135 ) +master-bin.000001 24472 Query 1 24563 use `test`; insert into t1 values( 134 ) +master-bin.000001 24563 Query 1 24654 use `test`; insert into t1 values( 133 ) +master-bin.000001 24654 Query 1 24745 use `test`; insert into t1 values( 132 ) +master-bin.000001 24745 Query 1 24836 use `test`; insert into t1 values( 131 ) +master-bin.000001 24836 Query 1 24927 use `test`; insert into t1 values( 130 ) +master-bin.000001 24927 Query 1 25018 use `test`; insert into t1 values( 129 ) +master-bin.000001 25018 Query 1 25109 use `test`; insert into t1 values( 128 ) +master-bin.000001 25109 Query 1 25200 use `test`; insert into t1 values( 127 ) +master-bin.000001 25200 Query 1 25291 use `test`; insert into t1 values( 126 ) +master-bin.000001 25291 Query 1 25382 use `test`; insert into t1 values( 125 ) +master-bin.000001 25382 Query 1 25473 use `test`; insert into t1 values( 124 ) +master-bin.000001 25473 Query 1 25564 use `test`; insert into t1 values( 123 ) +master-bin.000001 25564 Query 1 25655 use `test`; insert into t1 values( 122 ) +master-bin.000001 25655 Query 1 25746 use `test`; insert into t1 values( 121 ) +master-bin.000001 25746 Query 1 25837 use `test`; insert into t1 values( 120 ) +master-bin.000001 25837 Query 1 25928 use `test`; insert into t1 values( 119 ) +master-bin.000001 25928 Query 1 26019 use `test`; insert into t1 values( 118 ) +master-bin.000001 26019 Query 1 26110 use `test`; insert into t1 values( 117 ) +master-bin.000001 26110 Query 1 26201 use `test`; insert into t1 values( 116 ) +master-bin.000001 26201 Query 1 26292 use `test`; insert into t1 values( 115 ) +master-bin.000001 26292 Query 1 26383 use `test`; insert into t1 values( 114 ) +master-bin.000001 26383 Query 1 26474 use `test`; insert into t1 values( 113 ) +master-bin.000001 26474 Query 1 26565 use `test`; insert into t1 values( 112 ) +master-bin.000001 26565 Query 1 26656 use `test`; insert into t1 values( 111 ) +master-bin.000001 26656 Query 1 26747 use `test`; insert into t1 values( 110 ) +master-bin.000001 26747 Query 1 26838 use `test`; insert into t1 values( 109 ) +master-bin.000001 26838 Query 1 26929 use `test`; insert into t1 values( 108 ) +master-bin.000001 26929 Query 1 27020 use `test`; insert into t1 values( 107 ) +master-bin.000001 27020 Query 1 27111 use `test`; insert into t1 values( 106 ) +master-bin.000001 27111 Query 1 27202 use `test`; insert into t1 values( 105 ) +master-bin.000001 27202 Query 1 27293 use `test`; insert into t1 values( 104 ) +master-bin.000001 27293 Query 1 27384 use `test`; insert into t1 values( 103 ) +master-bin.000001 27384 Query 1 27475 use `test`; insert into t1 values( 102 ) +master-bin.000001 27475 Query 1 27566 use `test`; insert into t1 values( 101 ) +master-bin.000001 27566 Query 1 27657 use `test`; insert into t1 values( 100 ) +master-bin.000001 27657 Query 1 27747 use `test`; insert into t1 values( 99 ) +master-bin.000001 27747 Query 1 27837 use `test`; insert into t1 values( 98 ) +master-bin.000001 27837 Query 1 27927 use `test`; insert into t1 values( 97 ) +master-bin.000001 27927 Query 1 28017 use `test`; insert into t1 values( 96 ) +master-bin.000001 28017 Query 1 28107 use `test`; insert into t1 values( 95 ) +master-bin.000001 28107 Query 1 28197 use `test`; insert into t1 values( 94 ) +master-bin.000001 28197 Query 1 28287 use `test`; insert into t1 values( 93 ) +master-bin.000001 28287 Query 1 28377 use `test`; insert into t1 values( 92 ) +master-bin.000001 28377 Query 1 28467 use `test`; insert into t1 values( 91 ) +master-bin.000001 28467 Query 1 28557 use `test`; insert into t1 values( 90 ) +master-bin.000001 28557 Query 1 28647 use `test`; insert into t1 values( 89 ) +master-bin.000001 28647 Query 1 28737 use `test`; insert into t1 values( 88 ) +master-bin.000001 28737 Query 1 28827 use `test`; insert into t1 values( 87 ) +master-bin.000001 28827 Query 1 28917 use `test`; insert into t1 values( 86 ) +master-bin.000001 28917 Query 1 29007 use `test`; insert into t1 values( 85 ) +master-bin.000001 29007 Query 1 29097 use `test`; insert into t1 values( 84 ) +master-bin.000001 29097 Query 1 29187 use `test`; insert into t1 values( 83 ) +master-bin.000001 29187 Query 1 29277 use `test`; insert into t1 values( 82 ) +master-bin.000001 29277 Query 1 29367 use `test`; insert into t1 values( 81 ) +master-bin.000001 29367 Query 1 29457 use `test`; insert into t1 values( 80 ) +master-bin.000001 29457 Query 1 29547 use `test`; insert into t1 values( 79 ) +master-bin.000001 29547 Query 1 29637 use `test`; insert into t1 values( 78 ) +master-bin.000001 29637 Query 1 29727 use `test`; insert into t1 values( 77 ) +master-bin.000001 29727 Query 1 29817 use `test`; insert into t1 values( 76 ) +master-bin.000001 29817 Query 1 29907 use `test`; insert into t1 values( 75 ) +master-bin.000001 29907 Query 1 29997 use `test`; insert into t1 values( 74 ) +master-bin.000001 29997 Query 1 30087 use `test`; insert into t1 values( 73 ) +master-bin.000001 30087 Query 1 30177 use `test`; insert into t1 values( 72 ) +master-bin.000001 30177 Query 1 30267 use `test`; insert into t1 values( 71 ) +master-bin.000001 30267 Query 1 30357 use `test`; insert into t1 values( 70 ) +master-bin.000001 30357 Query 1 30447 use `test`; insert into t1 values( 69 ) +master-bin.000001 30447 Query 1 30537 use `test`; insert into t1 values( 68 ) +master-bin.000001 30537 Query 1 30627 use `test`; insert into t1 values( 67 ) +master-bin.000001 30627 Query 1 30717 use `test`; insert into t1 values( 66 ) +master-bin.000001 30717 Query 1 30807 use `test`; insert into t1 values( 65 ) +master-bin.000001 30807 Query 1 30897 use `test`; insert into t1 values( 64 ) +master-bin.000001 30897 Query 1 30987 use `test`; insert into t1 values( 63 ) +master-bin.000001 30987 Query 1 31077 use `test`; insert into t1 values( 62 ) +master-bin.000001 31077 Query 1 31167 use `test`; insert into t1 values( 61 ) +master-bin.000001 31167 Query 1 31257 use `test`; insert into t1 values( 60 ) +master-bin.000001 31257 Query 1 31347 use `test`; insert into t1 values( 59 ) +master-bin.000001 31347 Query 1 31437 use `test`; insert into t1 values( 58 ) +master-bin.000001 31437 Query 1 31527 use `test`; insert into t1 values( 57 ) +master-bin.000001 31527 Query 1 31617 use `test`; insert into t1 values( 56 ) +master-bin.000001 31617 Query 1 31707 use `test`; insert into t1 values( 55 ) +master-bin.000001 31707 Query 1 31797 use `test`; insert into t1 values( 54 ) +master-bin.000001 31797 Query 1 31887 use `test`; insert into t1 values( 53 ) +master-bin.000001 31887 Query 1 31977 use `test`; insert into t1 values( 52 ) +master-bin.000001 31977 Query 1 32067 use `test`; insert into t1 values( 51 ) +master-bin.000001 32067 Query 1 32157 use `test`; insert into t1 values( 50 ) +master-bin.000001 32157 Query 1 32247 use `test`; insert into t1 values( 49 ) +master-bin.000001 32247 Query 1 32337 use `test`; insert into t1 values( 48 ) +master-bin.000001 32337 Query 1 32427 use `test`; insert into t1 values( 47 ) +master-bin.000001 32427 Query 1 32517 use `test`; insert into t1 values( 46 ) +master-bin.000001 32517 Query 1 32607 use `test`; insert into t1 values( 45 ) +master-bin.000001 32607 Query 1 32697 use `test`; insert into t1 values( 44 ) +master-bin.000001 32697 Query 1 32787 use `test`; insert into t1 values( 43 ) +master-bin.000001 32787 Query 1 32877 use `test`; insert into t1 values( 42 ) +master-bin.000001 32877 Query 1 32967 use `test`; insert into t1 values( 41 ) +master-bin.000001 32967 Query 1 33057 use `test`; insert into t1 values( 40 ) +master-bin.000001 33057 Query 1 33147 use `test`; insert into t1 values( 39 ) +master-bin.000001 33147 Query 1 33237 use `test`; insert into t1 values( 38 ) +master-bin.000001 33237 Query 1 33327 use `test`; insert into t1 values( 37 ) +master-bin.000001 33327 Query 1 33417 use `test`; insert into t1 values( 36 ) +master-bin.000001 33417 Query 1 33507 use `test`; insert into t1 values( 35 ) +master-bin.000001 33507 Query 1 33597 use `test`; insert into t1 values( 34 ) +master-bin.000001 33597 Query 1 33687 use `test`; insert into t1 values( 33 ) +master-bin.000001 33687 Query 1 33777 use `test`; insert into t1 values( 32 ) +master-bin.000001 33777 Query 1 33867 use `test`; insert into t1 values( 31 ) +master-bin.000001 33867 Query 1 33957 use `test`; insert into t1 values( 30 ) +master-bin.000001 33957 Query 1 34047 use `test`; insert into t1 values( 29 ) +master-bin.000001 34047 Query 1 34137 use `test`; insert into t1 values( 28 ) +master-bin.000001 34137 Query 1 34227 use `test`; insert into t1 values( 27 ) +master-bin.000001 34227 Query 1 34317 use `test`; insert into t1 values( 26 ) +master-bin.000001 34317 Query 1 34407 use `test`; insert into t1 values( 25 ) +master-bin.000001 34407 Query 1 34497 use `test`; insert into t1 values( 24 ) +master-bin.000001 34497 Query 1 34587 use `test`; insert into t1 values( 23 ) +master-bin.000001 34587 Query 1 34677 use `test`; insert into t1 values( 22 ) +master-bin.000001 34677 Query 1 34767 use `test`; insert into t1 values( 21 ) +master-bin.000001 34767 Query 1 34857 use `test`; insert into t1 values( 20 ) +master-bin.000001 34857 Query 1 34947 use `test`; insert into t1 values( 19 ) +master-bin.000001 34947 Query 1 35037 use `test`; insert into t1 values( 18 ) +master-bin.000001 35037 Query 1 35127 use `test`; insert into t1 values( 17 ) +master-bin.000001 35127 Query 1 35217 use `test`; insert into t1 values( 16 ) +master-bin.000001 35217 Query 1 35307 use `test`; insert into t1 values( 15 ) +master-bin.000001 35307 Query 1 35397 use `test`; insert into t1 values( 14 ) +master-bin.000001 35397 Query 1 35487 use `test`; insert into t1 values( 13 ) +master-bin.000001 35487 Query 1 35577 use `test`; insert into t1 values( 12 ) +master-bin.000001 35577 Query 1 35667 use `test`; insert into t1 values( 11 ) +master-bin.000001 35667 Query 1 35757 use `test`; insert into t1 values( 10 ) +master-bin.000001 35757 Query 1 35846 use `test`; insert into t1 values( 9 ) +master-bin.000001 35846 Query 1 35935 use `test`; insert into t1 values( 8 ) +master-bin.000001 35935 Query 1 36024 use `test`; insert into t1 values( 7 ) +master-bin.000001 36024 Query 1 36113 use `test`; insert into t1 values( 6 ) +master-bin.000001 36113 Query 1 36202 use `test`; insert into t1 values( 5 ) +master-bin.000001 36202 Query 1 36291 use `test`; insert into t1 values( 4 ) +master-bin.000001 36291 Query 1 36380 use `test`; insert into t1 values( 3 ) +master-bin.000001 36380 Query 1 36469 use `test`; insert into t1 values( 2 ) +master-bin.000001 36469 Query 1 36558 use `test`; insert into t1 values( 1 ) +master-bin.000001 36558 Xid 1 36585 COMMIT /* xid=186 */ +master-bin.000001 36585 Rotate 1 36629 master-bin.000002;pos=4 +drop table t1; +set global binlog_cache_size=@bcs; +set session autocommit = @ac; End of 5.0 tests diff --git a/mysql-test/t/binlog.test b/mysql-test/t/binlog.test index 6271a8f95a8..d5479a45226 100644 --- a/mysql-test/t/binlog.test +++ b/mysql-test/t/binlog.test @@ -4,7 +4,6 @@ -- source include/have_log_bin.inc -- source include/not_embedded.inc -- source include/have_innodb.inc --- source include/have_log_bin.inc --disable_warnings drop table if exists t1, t2; @@ -137,4 +136,34 @@ show binlog events from 0; set session autocommit = @ac; +# now show that nothing breaks if we need to read from the cache more +# than once, resulting in split event-headers + +set @bcs = @@binlog_cache_size; +set @ac = @@autocommit; + +set global binlog_cache_size=4096; +set autocommit= 0; +reset master; + +create table t1 (a int) engine=innodb; + +let $1=400; +disable_query_log; +begin; +while ($1) +{ + eval insert into t1 values( $1 ); + dec $1; +} +commit; +enable_query_log; + +show binlog events from 0; + +drop table t1; + +set global binlog_cache_size=@bcs; +set session autocommit = @ac; + --echo End of 5.0 tests -- cgit v1.2.1 From fc17829be86d3d66baed60bdcb1e8589a036bae9 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 30 Jun 2007 03:32:33 +0200 Subject: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB previous correction didn't. make sure "tail" is fixed up when filling cache several times; rework formulae. --- Merge sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 mysql-test/extra/binlog_tests/binlog.test: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. mysql-test/r/binlog_row_binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. mysql-test/r/binlog_stm_binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. mysql-test/r/rpl_row_create_table.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB expect corrent end_log_pos in binlog sql/log.cc: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB previous correction didn't. make sure "tail" is fixed up when filling cache several times; rework formulae. --- mysql-test/extra/binlog_tests/binlog.test | 31 +- mysql-test/r/binlog_row_binlog.result | 947 ++++++++++++++++++++++++++++++ mysql-test/r/binlog_stm_binlog.result | 416 +++++++++++++ mysql-test/r/rpl_row_create_table.result | 28 +- 4 files changed, 1407 insertions(+), 15 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test index 02d5a92ea38..0a2b84e055b 100644 --- a/mysql-test/extra/binlog_tests/binlog.test +++ b/mysql-test/extra/binlog_tests/binlog.test @@ -5,7 +5,6 @@ -- source include/have_log_bin.inc -- source include/not_embedded.inc -- source include/have_innodb.inc --- source include/have_log_bin.inc -- source include/have_debug.inc --disable_warnings @@ -139,6 +138,36 @@ show binlog events from 0; set session autocommit = @ac; +# now show that nothing breaks if we need to read from the cache more +# than once, resulting in split event-headers + +set @bcs = @@binlog_cache_size; +set @ac = @@autocommit; + +set global binlog_cache_size=4096; +set autocommit= 0; +reset master; + +create table t1 (a int) engine=innodb; + +let $1=400; +disable_query_log; +begin; +while ($1) +{ + eval insert into t1 values( $1 ); + dec $1; +} +commit; +enable_query_log; + +show binlog events from 0; + +drop table t1; + +set global binlog_cache_size=@bcs; +set session autocommit = @ac; + --echo End of 5.0 tests # Test of a too big SET INSERT_ID: see if the truncated value goes diff --git a/mysql-test/r/binlog_row_binlog.result b/mysql-test/r/binlog_row_binlog.result index 6fcaad010d2..89618d37cc1 100644 --- a/mysql-test/r/binlog_row_binlog.result +++ b/mysql-test/r/binlog_row_binlog.result @@ -235,6 +235,953 @@ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 show binlog events in 'master-bin.000002' from 106; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Query 1 # use `test`; drop table t1 +set @ac = @@autocommit; +set autocommit= 0; +reset master; +create table t1(n int) engine=innodb; +begin; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb +master-bin.000001 205 Query 1 273 use `test`; BEGIN +master-bin.000001 273 Table_map 1 312 table_id: # (test.t1) +master-bin.000001 312 Write_rows 1 346 table_id: # flags: STMT_END_F +master-bin.000001 346 Table_map 1 385 table_id: # (test.t1) +master-bin.000001 385 Write_rows 1 419 table_id: # flags: STMT_END_F +master-bin.000001 419 Table_map 1 458 table_id: # (test.t1) +master-bin.000001 458 Write_rows 1 492 table_id: # flags: STMT_END_F +master-bin.000001 492 Xid 1 519 COMMIT /* XID */ +master-bin.000001 519 Query 1 595 use `test`; drop table t1 +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb +master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) +master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F +master-bin.000001 278 Xid 1 305 COMMIT /* XID */ +master-bin.000001 305 Table_map 1 344 table_id: # (test.t1) +master-bin.000001 344 Write_rows 1 378 table_id: # flags: STMT_END_F +master-bin.000001 378 Xid 1 405 COMMIT /* XID */ +master-bin.000001 405 Table_map 1 444 table_id: # (test.t1) +master-bin.000001 444 Write_rows 1 478 table_id: # flags: STMT_END_F +master-bin.000001 478 Xid 1 505 COMMIT /* XID */ +master-bin.000001 505 Query 1 581 use `test`; drop table t1 +reset master; +create table t1(n int) engine=myisam; +begin; +insert into t1 values (4); +insert into t1 values (5); +insert into t1 values (6); +commit; +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=myisam +master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) +master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F +master-bin.000001 278 Table_map 1 317 table_id: # (test.t1) +master-bin.000001 317 Write_rows 1 351 table_id: # flags: STMT_END_F +master-bin.000001 351 Table_map 1 390 table_id: # (test.t1) +master-bin.000001 390 Write_rows 1 424 table_id: # flags: STMT_END_F +master-bin.000001 424 Query 1 500 use `test`; drop table t1 +set autocommit= 1; +reset master; +create table t1(n int) engine=innodb; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 205 +insert into t1 values (1); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 305 +insert into t1 values (2); +insert into t1 values (3); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 505 +commit; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 505 +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb +master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) +master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F +master-bin.000001 278 Xid 1 305 COMMIT /* XID */ +master-bin.000001 305 Table_map 1 344 table_id: # (test.t1) +master-bin.000001 344 Write_rows 1 378 table_id: # flags: STMT_END_F +master-bin.000001 378 Xid 1 405 COMMIT /* XID */ +master-bin.000001 405 Table_map 1 444 table_id: # (test.t1) +master-bin.000001 444 Write_rows 1 478 table_id: # flags: STMT_END_F +master-bin.000001 478 Xid 1 505 COMMIT /* XID */ +master-bin.000001 505 Query 1 581 use `test`; drop table t1 +set autocommit= 0; +reset master; +create table t1(n int) engine=myisam; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 205 +insert into t1 values (4); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 278 +insert into t1 values (5); +insert into t1 values (6); +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 424 +commit; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 424 +drop table t1; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=myisam +master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) +master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F +master-bin.000001 278 Table_map 1 317 table_id: # (test.t1) +master-bin.000001 317 Write_rows 1 351 table_id: # flags: STMT_END_F +master-bin.000001 351 Table_map 1 390 table_id: # (test.t1) +master-bin.000001 390 Write_rows 1 424 table_id: # flags: STMT_END_F +master-bin.000001 424 Query 1 500 use `test`; drop table t1 +set session autocommit = @ac; +set @bcs = @@binlog_cache_size; +set @ac = @@autocommit; +set global binlog_cache_size=4096; +set autocommit= 0; +reset master; +create table t1 (a int) engine=innodb; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server ver: 5.1.21-beta-debug-log, Binlog ver: 4 +master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb +master-bin.000001 206 Query 1 274 use `test`; BEGIN +master-bin.000001 274 Table_map 1 313 table_id: 25 (test.t1) +master-bin.000001 313 Write_rows 1 347 table_id: 25 flags: STMT_END_F +master-bin.000001 347 Table_map 1 386 table_id: 25 (test.t1) +master-bin.000001 386 Write_rows 1 420 table_id: 25 flags: STMT_END_F +master-bin.000001 420 Table_map 1 459 table_id: 25 (test.t1) +master-bin.000001 459 Write_rows 1 493 table_id: 25 flags: STMT_END_F +master-bin.000001 493 Table_map 1 532 table_id: 25 (test.t1) +master-bin.000001 532 Write_rows 1 566 table_id: 25 flags: STMT_END_F +master-bin.000001 566 Table_map 1 605 table_id: 25 (test.t1) +master-bin.000001 605 Write_rows 1 639 table_id: 25 flags: STMT_END_F +master-bin.000001 639 Table_map 1 678 table_id: 25 (test.t1) +master-bin.000001 678 Write_rows 1 712 table_id: 25 flags: STMT_END_F +master-bin.000001 712 Table_map 1 751 table_id: 25 (test.t1) +master-bin.000001 751 Write_rows 1 785 table_id: 25 flags: STMT_END_F +master-bin.000001 785 Table_map 1 824 table_id: 25 (test.t1) +master-bin.000001 824 Write_rows 1 858 table_id: 25 flags: STMT_END_F +master-bin.000001 858 Table_map 1 897 table_id: 25 (test.t1) +master-bin.000001 897 Write_rows 1 931 table_id: 25 flags: STMT_END_F +master-bin.000001 931 Table_map 1 970 table_id: 25 (test.t1) +master-bin.000001 970 Write_rows 1 1004 table_id: 25 flags: STMT_END_F +master-bin.000001 1004 Table_map 1 1043 table_id: 25 (test.t1) +master-bin.000001 1043 Write_rows 1 1077 table_id: 25 flags: STMT_END_F +master-bin.000001 1077 Table_map 1 1116 table_id: 25 (test.t1) +master-bin.000001 1116 Write_rows 1 1150 table_id: 25 flags: STMT_END_F +master-bin.000001 1150 Table_map 1 1189 table_id: 25 (test.t1) +master-bin.000001 1189 Write_rows 1 1223 table_id: 25 flags: STMT_END_F +master-bin.000001 1223 Table_map 1 1262 table_id: 25 (test.t1) +master-bin.000001 1262 Write_rows 1 1296 table_id: 25 flags: STMT_END_F +master-bin.000001 1296 Table_map 1 1335 table_id: 25 (test.t1) +master-bin.000001 1335 Write_rows 1 1369 table_id: 25 flags: STMT_END_F +master-bin.000001 1369 Table_map 1 1408 table_id: 25 (test.t1) +master-bin.000001 1408 Write_rows 1 1442 table_id: 25 flags: STMT_END_F +master-bin.000001 1442 Table_map 1 1481 table_id: 25 (test.t1) +master-bin.000001 1481 Write_rows 1 1515 table_id: 25 flags: STMT_END_F +master-bin.000001 1515 Table_map 1 1554 table_id: 25 (test.t1) +master-bin.000001 1554 Write_rows 1 1588 table_id: 25 flags: STMT_END_F +master-bin.000001 1588 Table_map 1 1627 table_id: 25 (test.t1) +master-bin.000001 1627 Write_rows 1 1661 table_id: 25 flags: STMT_END_F +master-bin.000001 1661 Table_map 1 1700 table_id: 25 (test.t1) +master-bin.000001 1700 Write_rows 1 1734 table_id: 25 flags: STMT_END_F +master-bin.000001 1734 Table_map 1 1773 table_id: 25 (test.t1) +master-bin.000001 1773 Write_rows 1 1807 table_id: 25 flags: STMT_END_F +master-bin.000001 1807 Table_map 1 1846 table_id: 25 (test.t1) +master-bin.000001 1846 Write_rows 1 1880 table_id: 25 flags: STMT_END_F +master-bin.000001 1880 Table_map 1 1919 table_id: 25 (test.t1) +master-bin.000001 1919 Write_rows 1 1953 table_id: 25 flags: STMT_END_F +master-bin.000001 1953 Table_map 1 1992 table_id: 25 (test.t1) +master-bin.000001 1992 Write_rows 1 2026 table_id: 25 flags: STMT_END_F +master-bin.000001 2026 Table_map 1 2065 table_id: 25 (test.t1) +master-bin.000001 2065 Write_rows 1 2099 table_id: 25 flags: STMT_END_F +master-bin.000001 2099 Table_map 1 2138 table_id: 25 (test.t1) +master-bin.000001 2138 Write_rows 1 2172 table_id: 25 flags: STMT_END_F +master-bin.000001 2172 Table_map 1 2211 table_id: 25 (test.t1) +master-bin.000001 2211 Write_rows 1 2245 table_id: 25 flags: STMT_END_F +master-bin.000001 2245 Table_map 1 2284 table_id: 25 (test.t1) +master-bin.000001 2284 Write_rows 1 2318 table_id: 25 flags: STMT_END_F +master-bin.000001 2318 Table_map 1 2357 table_id: 25 (test.t1) +master-bin.000001 2357 Write_rows 1 2391 table_id: 25 flags: STMT_END_F +master-bin.000001 2391 Table_map 1 2430 table_id: 25 (test.t1) +master-bin.000001 2430 Write_rows 1 2464 table_id: 25 flags: STMT_END_F +master-bin.000001 2464 Table_map 1 2503 table_id: 25 (test.t1) +master-bin.000001 2503 Write_rows 1 2537 table_id: 25 flags: STMT_END_F +master-bin.000001 2537 Table_map 1 2576 table_id: 25 (test.t1) +master-bin.000001 2576 Write_rows 1 2610 table_id: 25 flags: STMT_END_F +master-bin.000001 2610 Table_map 1 2649 table_id: 25 (test.t1) +master-bin.000001 2649 Write_rows 1 2683 table_id: 25 flags: STMT_END_F +master-bin.000001 2683 Table_map 1 2722 table_id: 25 (test.t1) +master-bin.000001 2722 Write_rows 1 2756 table_id: 25 flags: STMT_END_F +master-bin.000001 2756 Table_map 1 2795 table_id: 25 (test.t1) +master-bin.000001 2795 Write_rows 1 2829 table_id: 25 flags: STMT_END_F +master-bin.000001 2829 Table_map 1 2868 table_id: 25 (test.t1) +master-bin.000001 2868 Write_rows 1 2902 table_id: 25 flags: STMT_END_F +master-bin.000001 2902 Table_map 1 2941 table_id: 25 (test.t1) +master-bin.000001 2941 Write_rows 1 2975 table_id: 25 flags: STMT_END_F +master-bin.000001 2975 Table_map 1 3014 table_id: 25 (test.t1) +master-bin.000001 3014 Write_rows 1 3048 table_id: 25 flags: STMT_END_F +master-bin.000001 3048 Table_map 1 3087 table_id: 25 (test.t1) +master-bin.000001 3087 Write_rows 1 3121 table_id: 25 flags: STMT_END_F +master-bin.000001 3121 Table_map 1 3160 table_id: 25 (test.t1) +master-bin.000001 3160 Write_rows 1 3194 table_id: 25 flags: STMT_END_F +master-bin.000001 3194 Table_map 1 3233 table_id: 25 (test.t1) +master-bin.000001 3233 Write_rows 1 3267 table_id: 25 flags: STMT_END_F +master-bin.000001 3267 Table_map 1 3306 table_id: 25 (test.t1) +master-bin.000001 3306 Write_rows 1 3340 table_id: 25 flags: STMT_END_F +master-bin.000001 3340 Table_map 1 3379 table_id: 25 (test.t1) +master-bin.000001 3379 Write_rows 1 3413 table_id: 25 flags: STMT_END_F +master-bin.000001 3413 Table_map 1 3452 table_id: 25 (test.t1) +master-bin.000001 3452 Write_rows 1 3486 table_id: 25 flags: STMT_END_F +master-bin.000001 3486 Table_map 1 3525 table_id: 25 (test.t1) +master-bin.000001 3525 Write_rows 1 3559 table_id: 25 flags: STMT_END_F +master-bin.000001 3559 Table_map 1 3598 table_id: 25 (test.t1) +master-bin.000001 3598 Write_rows 1 3632 table_id: 25 flags: STMT_END_F +master-bin.000001 3632 Table_map 1 3671 table_id: 25 (test.t1) +master-bin.000001 3671 Write_rows 1 3705 table_id: 25 flags: STMT_END_F +master-bin.000001 3705 Table_map 1 3744 table_id: 25 (test.t1) +master-bin.000001 3744 Write_rows 1 3778 table_id: 25 flags: STMT_END_F +master-bin.000001 3778 Table_map 1 3817 table_id: 25 (test.t1) +master-bin.000001 3817 Write_rows 1 3851 table_id: 25 flags: STMT_END_F +master-bin.000001 3851 Table_map 1 3890 table_id: 25 (test.t1) +master-bin.000001 3890 Write_rows 1 3924 table_id: 25 flags: STMT_END_F +master-bin.000001 3924 Table_map 1 3963 table_id: 25 (test.t1) +master-bin.000001 3963 Write_rows 1 3997 table_id: 25 flags: STMT_END_F +master-bin.000001 3997 Table_map 1 4036 table_id: 25 (test.t1) +master-bin.000001 4036 Write_rows 1 4070 table_id: 25 flags: STMT_END_F +master-bin.000001 4070 Table_map 1 4109 table_id: 25 (test.t1) +master-bin.000001 4109 Write_rows 1 4143 table_id: 25 flags: STMT_END_F +master-bin.000001 4143 Table_map 1 4182 table_id: 25 (test.t1) +master-bin.000001 4182 Write_rows 1 4216 table_id: 25 flags: STMT_END_F +master-bin.000001 4216 Table_map 1 4255 table_id: 25 (test.t1) +master-bin.000001 4255 Write_rows 1 4289 table_id: 25 flags: STMT_END_F +master-bin.000001 4289 Table_map 1 4328 table_id: 25 (test.t1) +master-bin.000001 4328 Write_rows 1 4362 table_id: 25 flags: STMT_END_F +master-bin.000001 4362 Table_map 1 4401 table_id: 25 (test.t1) +master-bin.000001 4401 Write_rows 1 4435 table_id: 25 flags: STMT_END_F +master-bin.000001 4435 Table_map 1 4474 table_id: 25 (test.t1) +master-bin.000001 4474 Write_rows 1 4508 table_id: 25 flags: STMT_END_F +master-bin.000001 4508 Table_map 1 4547 table_id: 25 (test.t1) +master-bin.000001 4547 Write_rows 1 4581 table_id: 25 flags: STMT_END_F +master-bin.000001 4581 Table_map 1 4620 table_id: 25 (test.t1) +master-bin.000001 4620 Write_rows 1 4654 table_id: 25 flags: STMT_END_F +master-bin.000001 4654 Table_map 1 4693 table_id: 25 (test.t1) +master-bin.000001 4693 Write_rows 1 4727 table_id: 25 flags: STMT_END_F +master-bin.000001 4727 Table_map 1 4766 table_id: 25 (test.t1) +master-bin.000001 4766 Write_rows 1 4800 table_id: 25 flags: STMT_END_F +master-bin.000001 4800 Table_map 1 4839 table_id: 25 (test.t1) +master-bin.000001 4839 Write_rows 1 4873 table_id: 25 flags: STMT_END_F +master-bin.000001 4873 Table_map 1 4912 table_id: 25 (test.t1) +master-bin.000001 4912 Write_rows 1 4946 table_id: 25 flags: STMT_END_F +master-bin.000001 4946 Table_map 1 4985 table_id: 25 (test.t1) +master-bin.000001 4985 Write_rows 1 5019 table_id: 25 flags: STMT_END_F +master-bin.000001 5019 Table_map 1 5058 table_id: 25 (test.t1) +master-bin.000001 5058 Write_rows 1 5092 table_id: 25 flags: STMT_END_F +master-bin.000001 5092 Table_map 1 5131 table_id: 25 (test.t1) +master-bin.000001 5131 Write_rows 1 5165 table_id: 25 flags: STMT_END_F +master-bin.000001 5165 Table_map 1 5204 table_id: 25 (test.t1) +master-bin.000001 5204 Write_rows 1 5238 table_id: 25 flags: STMT_END_F +master-bin.000001 5238 Table_map 1 5277 table_id: 25 (test.t1) +master-bin.000001 5277 Write_rows 1 5311 table_id: 25 flags: STMT_END_F +master-bin.000001 5311 Table_map 1 5350 table_id: 25 (test.t1) +master-bin.000001 5350 Write_rows 1 5384 table_id: 25 flags: STMT_END_F +master-bin.000001 5384 Table_map 1 5423 table_id: 25 (test.t1) +master-bin.000001 5423 Write_rows 1 5457 table_id: 25 flags: STMT_END_F +master-bin.000001 5457 Table_map 1 5496 table_id: 25 (test.t1) +master-bin.000001 5496 Write_rows 1 5530 table_id: 25 flags: STMT_END_F +master-bin.000001 5530 Table_map 1 5569 table_id: 25 (test.t1) +master-bin.000001 5569 Write_rows 1 5603 table_id: 25 flags: STMT_END_F +master-bin.000001 5603 Table_map 1 5642 table_id: 25 (test.t1) +master-bin.000001 5642 Write_rows 1 5676 table_id: 25 flags: STMT_END_F +master-bin.000001 5676 Table_map 1 5715 table_id: 25 (test.t1) +master-bin.000001 5715 Write_rows 1 5749 table_id: 25 flags: STMT_END_F +master-bin.000001 5749 Table_map 1 5788 table_id: 25 (test.t1) +master-bin.000001 5788 Write_rows 1 5822 table_id: 25 flags: STMT_END_F +master-bin.000001 5822 Table_map 1 5861 table_id: 25 (test.t1) +master-bin.000001 5861 Write_rows 1 5895 table_id: 25 flags: STMT_END_F +master-bin.000001 5895 Table_map 1 5934 table_id: 25 (test.t1) +master-bin.000001 5934 Write_rows 1 5968 table_id: 25 flags: STMT_END_F +master-bin.000001 5968 Table_map 1 6007 table_id: 25 (test.t1) +master-bin.000001 6007 Write_rows 1 6041 table_id: 25 flags: STMT_END_F +master-bin.000001 6041 Table_map 1 6080 table_id: 25 (test.t1) +master-bin.000001 6080 Write_rows 1 6114 table_id: 25 flags: STMT_END_F +master-bin.000001 6114 Table_map 1 6153 table_id: 25 (test.t1) +master-bin.000001 6153 Write_rows 1 6187 table_id: 25 flags: STMT_END_F +master-bin.000001 6187 Table_map 1 6226 table_id: 25 (test.t1) +master-bin.000001 6226 Write_rows 1 6260 table_id: 25 flags: STMT_END_F +master-bin.000001 6260 Table_map 1 6299 table_id: 25 (test.t1) +master-bin.000001 6299 Write_rows 1 6333 table_id: 25 flags: STMT_END_F +master-bin.000001 6333 Table_map 1 6372 table_id: 25 (test.t1) +master-bin.000001 6372 Write_rows 1 6406 table_id: 25 flags: STMT_END_F +master-bin.000001 6406 Table_map 1 6445 table_id: 25 (test.t1) +master-bin.000001 6445 Write_rows 1 6479 table_id: 25 flags: STMT_END_F +master-bin.000001 6479 Table_map 1 6518 table_id: 25 (test.t1) +master-bin.000001 6518 Write_rows 1 6552 table_id: 25 flags: STMT_END_F +master-bin.000001 6552 Table_map 1 6591 table_id: 25 (test.t1) +master-bin.000001 6591 Write_rows 1 6625 table_id: 25 flags: STMT_END_F +master-bin.000001 6625 Table_map 1 6664 table_id: 25 (test.t1) +master-bin.000001 6664 Write_rows 1 6698 table_id: 25 flags: STMT_END_F +master-bin.000001 6698 Table_map 1 6737 table_id: 25 (test.t1) +master-bin.000001 6737 Write_rows 1 6771 table_id: 25 flags: STMT_END_F +master-bin.000001 6771 Table_map 1 6810 table_id: 25 (test.t1) +master-bin.000001 6810 Write_rows 1 6844 table_id: 25 flags: STMT_END_F +master-bin.000001 6844 Table_map 1 6883 table_id: 25 (test.t1) +master-bin.000001 6883 Write_rows 1 6917 table_id: 25 flags: STMT_END_F +master-bin.000001 6917 Table_map 1 6956 table_id: 25 (test.t1) +master-bin.000001 6956 Write_rows 1 6990 table_id: 25 flags: STMT_END_F +master-bin.000001 6990 Table_map 1 7029 table_id: 25 (test.t1) +master-bin.000001 7029 Write_rows 1 7063 table_id: 25 flags: STMT_END_F +master-bin.000001 7063 Table_map 1 7102 table_id: 25 (test.t1) +master-bin.000001 7102 Write_rows 1 7136 table_id: 25 flags: STMT_END_F +master-bin.000001 7136 Table_map 1 7175 table_id: 25 (test.t1) +master-bin.000001 7175 Write_rows 1 7209 table_id: 25 flags: STMT_END_F +master-bin.000001 7209 Table_map 1 7248 table_id: 25 (test.t1) +master-bin.000001 7248 Write_rows 1 7282 table_id: 25 flags: STMT_END_F +master-bin.000001 7282 Table_map 1 7321 table_id: 25 (test.t1) +master-bin.000001 7321 Write_rows 1 7355 table_id: 25 flags: STMT_END_F +master-bin.000001 7355 Table_map 1 7394 table_id: 25 (test.t1) +master-bin.000001 7394 Write_rows 1 7428 table_id: 25 flags: STMT_END_F +master-bin.000001 7428 Table_map 1 7467 table_id: 25 (test.t1) +master-bin.000001 7467 Write_rows 1 7501 table_id: 25 flags: STMT_END_F +master-bin.000001 7501 Table_map 1 7540 table_id: 25 (test.t1) +master-bin.000001 7540 Write_rows 1 7574 table_id: 25 flags: STMT_END_F +master-bin.000001 7574 Table_map 1 7613 table_id: 25 (test.t1) +master-bin.000001 7613 Write_rows 1 7647 table_id: 25 flags: STMT_END_F +master-bin.000001 7647 Table_map 1 7686 table_id: 25 (test.t1) +master-bin.000001 7686 Write_rows 1 7720 table_id: 25 flags: STMT_END_F +master-bin.000001 7720 Table_map 1 7759 table_id: 25 (test.t1) +master-bin.000001 7759 Write_rows 1 7793 table_id: 25 flags: STMT_END_F +master-bin.000001 7793 Table_map 1 7832 table_id: 25 (test.t1) +master-bin.000001 7832 Write_rows 1 7866 table_id: 25 flags: STMT_END_F +master-bin.000001 7866 Table_map 1 7905 table_id: 25 (test.t1) +master-bin.000001 7905 Write_rows 1 7939 table_id: 25 flags: STMT_END_F +master-bin.000001 7939 Table_map 1 7978 table_id: 25 (test.t1) +master-bin.000001 7978 Write_rows 1 8012 table_id: 25 flags: STMT_END_F +master-bin.000001 8012 Table_map 1 8051 table_id: 25 (test.t1) +master-bin.000001 8051 Write_rows 1 8085 table_id: 25 flags: STMT_END_F +master-bin.000001 8085 Table_map 1 8124 table_id: 25 (test.t1) +master-bin.000001 8124 Write_rows 1 8158 table_id: 25 flags: STMT_END_F +master-bin.000001 8158 Table_map 1 8197 table_id: 25 (test.t1) +master-bin.000001 8197 Write_rows 1 8231 table_id: 25 flags: STMT_END_F +master-bin.000001 8231 Table_map 1 8270 table_id: 25 (test.t1) +master-bin.000001 8270 Write_rows 1 8304 table_id: 25 flags: STMT_END_F +master-bin.000001 8304 Table_map 1 8343 table_id: 25 (test.t1) +master-bin.000001 8343 Write_rows 1 8377 table_id: 25 flags: STMT_END_F +master-bin.000001 8377 Table_map 1 8416 table_id: 25 (test.t1) +master-bin.000001 8416 Write_rows 1 8450 table_id: 25 flags: STMT_END_F +master-bin.000001 8450 Table_map 1 8489 table_id: 25 (test.t1) +master-bin.000001 8489 Write_rows 1 8523 table_id: 25 flags: STMT_END_F +master-bin.000001 8523 Table_map 1 8562 table_id: 25 (test.t1) +master-bin.000001 8562 Write_rows 1 8596 table_id: 25 flags: STMT_END_F +master-bin.000001 8596 Table_map 1 8635 table_id: 25 (test.t1) +master-bin.000001 8635 Write_rows 1 8669 table_id: 25 flags: STMT_END_F +master-bin.000001 8669 Table_map 1 8708 table_id: 25 (test.t1) +master-bin.000001 8708 Write_rows 1 8742 table_id: 25 flags: STMT_END_F +master-bin.000001 8742 Table_map 1 8781 table_id: 25 (test.t1) +master-bin.000001 8781 Write_rows 1 8815 table_id: 25 flags: STMT_END_F +master-bin.000001 8815 Table_map 1 8854 table_id: 25 (test.t1) +master-bin.000001 8854 Write_rows 1 8888 table_id: 25 flags: STMT_END_F +master-bin.000001 8888 Table_map 1 8927 table_id: 25 (test.t1) +master-bin.000001 8927 Write_rows 1 8961 table_id: 25 flags: STMT_END_F +master-bin.000001 8961 Table_map 1 9000 table_id: 25 (test.t1) +master-bin.000001 9000 Write_rows 1 9034 table_id: 25 flags: STMT_END_F +master-bin.000001 9034 Table_map 1 9073 table_id: 25 (test.t1) +master-bin.000001 9073 Write_rows 1 9107 table_id: 25 flags: STMT_END_F +master-bin.000001 9107 Table_map 1 9146 table_id: 25 (test.t1) +master-bin.000001 9146 Write_rows 1 9180 table_id: 25 flags: STMT_END_F +master-bin.000001 9180 Table_map 1 9219 table_id: 25 (test.t1) +master-bin.000001 9219 Write_rows 1 9253 table_id: 25 flags: STMT_END_F +master-bin.000001 9253 Table_map 1 9292 table_id: 25 (test.t1) +master-bin.000001 9292 Write_rows 1 9326 table_id: 25 flags: STMT_END_F +master-bin.000001 9326 Table_map 1 9365 table_id: 25 (test.t1) +master-bin.000001 9365 Write_rows 1 9399 table_id: 25 flags: STMT_END_F +master-bin.000001 9399 Table_map 1 9438 table_id: 25 (test.t1) +master-bin.000001 9438 Write_rows 1 9472 table_id: 25 flags: STMT_END_F +master-bin.000001 9472 Table_map 1 9511 table_id: 25 (test.t1) +master-bin.000001 9511 Write_rows 1 9545 table_id: 25 flags: STMT_END_F +master-bin.000001 9545 Table_map 1 9584 table_id: 25 (test.t1) +master-bin.000001 9584 Write_rows 1 9618 table_id: 25 flags: STMT_END_F +master-bin.000001 9618 Table_map 1 9657 table_id: 25 (test.t1) +master-bin.000001 9657 Write_rows 1 9691 table_id: 25 flags: STMT_END_F +master-bin.000001 9691 Table_map 1 9730 table_id: 25 (test.t1) +master-bin.000001 9730 Write_rows 1 9764 table_id: 25 flags: STMT_END_F +master-bin.000001 9764 Table_map 1 9803 table_id: 25 (test.t1) +master-bin.000001 9803 Write_rows 1 9837 table_id: 25 flags: STMT_END_F +master-bin.000001 9837 Table_map 1 9876 table_id: 25 (test.t1) +master-bin.000001 9876 Write_rows 1 9910 table_id: 25 flags: STMT_END_F +master-bin.000001 9910 Table_map 1 9949 table_id: 25 (test.t1) +master-bin.000001 9949 Write_rows 1 9983 table_id: 25 flags: STMT_END_F +master-bin.000001 9983 Table_map 1 10022 table_id: 25 (test.t1) +master-bin.000001 10022 Write_rows 1 10056 table_id: 25 flags: STMT_END_F +master-bin.000001 10056 Table_map 1 10095 table_id: 25 (test.t1) +master-bin.000001 10095 Write_rows 1 10129 table_id: 25 flags: STMT_END_F +master-bin.000001 10129 Table_map 1 10168 table_id: 25 (test.t1) +master-bin.000001 10168 Write_rows 1 10202 table_id: 25 flags: STMT_END_F +master-bin.000001 10202 Table_map 1 10241 table_id: 25 (test.t1) +master-bin.000001 10241 Write_rows 1 10275 table_id: 25 flags: STMT_END_F +master-bin.000001 10275 Table_map 1 10314 table_id: 25 (test.t1) +master-bin.000001 10314 Write_rows 1 10348 table_id: 25 flags: STMT_END_F +master-bin.000001 10348 Table_map 1 10387 table_id: 25 (test.t1) +master-bin.000001 10387 Write_rows 1 10421 table_id: 25 flags: STMT_END_F +master-bin.000001 10421 Table_map 1 10460 table_id: 25 (test.t1) +master-bin.000001 10460 Write_rows 1 10494 table_id: 25 flags: STMT_END_F +master-bin.000001 10494 Table_map 1 10533 table_id: 25 (test.t1) +master-bin.000001 10533 Write_rows 1 10567 table_id: 25 flags: STMT_END_F +master-bin.000001 10567 Table_map 1 10606 table_id: 25 (test.t1) +master-bin.000001 10606 Write_rows 1 10640 table_id: 25 flags: STMT_END_F +master-bin.000001 10640 Table_map 1 10679 table_id: 25 (test.t1) +master-bin.000001 10679 Write_rows 1 10713 table_id: 25 flags: STMT_END_F +master-bin.000001 10713 Table_map 1 10752 table_id: 25 (test.t1) +master-bin.000001 10752 Write_rows 1 10786 table_id: 25 flags: STMT_END_F +master-bin.000001 10786 Table_map 1 10825 table_id: 25 (test.t1) +master-bin.000001 10825 Write_rows 1 10859 table_id: 25 flags: STMT_END_F +master-bin.000001 10859 Table_map 1 10898 table_id: 25 (test.t1) +master-bin.000001 10898 Write_rows 1 10932 table_id: 25 flags: STMT_END_F +master-bin.000001 10932 Table_map 1 10971 table_id: 25 (test.t1) +master-bin.000001 10971 Write_rows 1 11005 table_id: 25 flags: STMT_END_F +master-bin.000001 11005 Table_map 1 11044 table_id: 25 (test.t1) +master-bin.000001 11044 Write_rows 1 11078 table_id: 25 flags: STMT_END_F +master-bin.000001 11078 Table_map 1 11117 table_id: 25 (test.t1) +master-bin.000001 11117 Write_rows 1 11151 table_id: 25 flags: STMT_END_F +master-bin.000001 11151 Table_map 1 11190 table_id: 25 (test.t1) +master-bin.000001 11190 Write_rows 1 11224 table_id: 25 flags: STMT_END_F +master-bin.000001 11224 Table_map 1 11263 table_id: 25 (test.t1) +master-bin.000001 11263 Write_rows 1 11297 table_id: 25 flags: STMT_END_F +master-bin.000001 11297 Table_map 1 11336 table_id: 25 (test.t1) +master-bin.000001 11336 Write_rows 1 11370 table_id: 25 flags: STMT_END_F +master-bin.000001 11370 Table_map 1 11409 table_id: 25 (test.t1) +master-bin.000001 11409 Write_rows 1 11443 table_id: 25 flags: STMT_END_F +master-bin.000001 11443 Table_map 1 11482 table_id: 25 (test.t1) +master-bin.000001 11482 Write_rows 1 11516 table_id: 25 flags: STMT_END_F +master-bin.000001 11516 Table_map 1 11555 table_id: 25 (test.t1) +master-bin.000001 11555 Write_rows 1 11589 table_id: 25 flags: STMT_END_F +master-bin.000001 11589 Table_map 1 11628 table_id: 25 (test.t1) +master-bin.000001 11628 Write_rows 1 11662 table_id: 25 flags: STMT_END_F +master-bin.000001 11662 Table_map 1 11701 table_id: 25 (test.t1) +master-bin.000001 11701 Write_rows 1 11735 table_id: 25 flags: STMT_END_F +master-bin.000001 11735 Table_map 1 11774 table_id: 25 (test.t1) +master-bin.000001 11774 Write_rows 1 11808 table_id: 25 flags: STMT_END_F +master-bin.000001 11808 Table_map 1 11847 table_id: 25 (test.t1) +master-bin.000001 11847 Write_rows 1 11881 table_id: 25 flags: STMT_END_F +master-bin.000001 11881 Table_map 1 11920 table_id: 25 (test.t1) +master-bin.000001 11920 Write_rows 1 11954 table_id: 25 flags: STMT_END_F +master-bin.000001 11954 Table_map 1 11993 table_id: 25 (test.t1) +master-bin.000001 11993 Write_rows 1 12027 table_id: 25 flags: STMT_END_F +master-bin.000001 12027 Table_map 1 12066 table_id: 25 (test.t1) +master-bin.000001 12066 Write_rows 1 12100 table_id: 25 flags: STMT_END_F +master-bin.000001 12100 Table_map 1 12139 table_id: 25 (test.t1) +master-bin.000001 12139 Write_rows 1 12173 table_id: 25 flags: STMT_END_F +master-bin.000001 12173 Table_map 1 12212 table_id: 25 (test.t1) +master-bin.000001 12212 Write_rows 1 12246 table_id: 25 flags: STMT_END_F +master-bin.000001 12246 Table_map 1 12285 table_id: 25 (test.t1) +master-bin.000001 12285 Write_rows 1 12319 table_id: 25 flags: STMT_END_F +master-bin.000001 12319 Table_map 1 12358 table_id: 25 (test.t1) +master-bin.000001 12358 Write_rows 1 12392 table_id: 25 flags: STMT_END_F +master-bin.000001 12392 Table_map 1 12431 table_id: 25 (test.t1) +master-bin.000001 12431 Write_rows 1 12465 table_id: 25 flags: STMT_END_F +master-bin.000001 12465 Table_map 1 12504 table_id: 25 (test.t1) +master-bin.000001 12504 Write_rows 1 12538 table_id: 25 flags: STMT_END_F +master-bin.000001 12538 Table_map 1 12577 table_id: 25 (test.t1) +master-bin.000001 12577 Write_rows 1 12611 table_id: 25 flags: STMT_END_F +master-bin.000001 12611 Table_map 1 12650 table_id: 25 (test.t1) +master-bin.000001 12650 Write_rows 1 12684 table_id: 25 flags: STMT_END_F +master-bin.000001 12684 Table_map 1 12723 table_id: 25 (test.t1) +master-bin.000001 12723 Write_rows 1 12757 table_id: 25 flags: STMT_END_F +master-bin.000001 12757 Table_map 1 12796 table_id: 25 (test.t1) +master-bin.000001 12796 Write_rows 1 12830 table_id: 25 flags: STMT_END_F +master-bin.000001 12830 Table_map 1 12869 table_id: 25 (test.t1) +master-bin.000001 12869 Write_rows 1 12903 table_id: 25 flags: STMT_END_F +master-bin.000001 12903 Table_map 1 12942 table_id: 25 (test.t1) +master-bin.000001 12942 Write_rows 1 12976 table_id: 25 flags: STMT_END_F +master-bin.000001 12976 Table_map 1 13015 table_id: 25 (test.t1) +master-bin.000001 13015 Write_rows 1 13049 table_id: 25 flags: STMT_END_F +master-bin.000001 13049 Table_map 1 13088 table_id: 25 (test.t1) +master-bin.000001 13088 Write_rows 1 13122 table_id: 25 flags: STMT_END_F +master-bin.000001 13122 Table_map 1 13161 table_id: 25 (test.t1) +master-bin.000001 13161 Write_rows 1 13195 table_id: 25 flags: STMT_END_F +master-bin.000001 13195 Table_map 1 13234 table_id: 25 (test.t1) +master-bin.000001 13234 Write_rows 1 13268 table_id: 25 flags: STMT_END_F +master-bin.000001 13268 Table_map 1 13307 table_id: 25 (test.t1) +master-bin.000001 13307 Write_rows 1 13341 table_id: 25 flags: STMT_END_F +master-bin.000001 13341 Table_map 1 13380 table_id: 25 (test.t1) +master-bin.000001 13380 Write_rows 1 13414 table_id: 25 flags: STMT_END_F +master-bin.000001 13414 Table_map 1 13453 table_id: 25 (test.t1) +master-bin.000001 13453 Write_rows 1 13487 table_id: 25 flags: STMT_END_F +master-bin.000001 13487 Table_map 1 13526 table_id: 25 (test.t1) +master-bin.000001 13526 Write_rows 1 13560 table_id: 25 flags: STMT_END_F +master-bin.000001 13560 Table_map 1 13599 table_id: 25 (test.t1) +master-bin.000001 13599 Write_rows 1 13633 table_id: 25 flags: STMT_END_F +master-bin.000001 13633 Table_map 1 13672 table_id: 25 (test.t1) +master-bin.000001 13672 Write_rows 1 13706 table_id: 25 flags: STMT_END_F +master-bin.000001 13706 Table_map 1 13745 table_id: 25 (test.t1) +master-bin.000001 13745 Write_rows 1 13779 table_id: 25 flags: STMT_END_F +master-bin.000001 13779 Table_map 1 13818 table_id: 25 (test.t1) +master-bin.000001 13818 Write_rows 1 13852 table_id: 25 flags: STMT_END_F +master-bin.000001 13852 Table_map 1 13891 table_id: 25 (test.t1) +master-bin.000001 13891 Write_rows 1 13925 table_id: 25 flags: STMT_END_F +master-bin.000001 13925 Table_map 1 13964 table_id: 25 (test.t1) +master-bin.000001 13964 Write_rows 1 13998 table_id: 25 flags: STMT_END_F +master-bin.000001 13998 Table_map 1 14037 table_id: 25 (test.t1) +master-bin.000001 14037 Write_rows 1 14071 table_id: 25 flags: STMT_END_F +master-bin.000001 14071 Table_map 1 14110 table_id: 25 (test.t1) +master-bin.000001 14110 Write_rows 1 14144 table_id: 25 flags: STMT_END_F +master-bin.000001 14144 Table_map 1 14183 table_id: 25 (test.t1) +master-bin.000001 14183 Write_rows 1 14217 table_id: 25 flags: STMT_END_F +master-bin.000001 14217 Table_map 1 14256 table_id: 25 (test.t1) +master-bin.000001 14256 Write_rows 1 14290 table_id: 25 flags: STMT_END_F +master-bin.000001 14290 Table_map 1 14329 table_id: 25 (test.t1) +master-bin.000001 14329 Write_rows 1 14363 table_id: 25 flags: STMT_END_F +master-bin.000001 14363 Table_map 1 14402 table_id: 25 (test.t1) +master-bin.000001 14402 Write_rows 1 14436 table_id: 25 flags: STMT_END_F +master-bin.000001 14436 Table_map 1 14475 table_id: 25 (test.t1) +master-bin.000001 14475 Write_rows 1 14509 table_id: 25 flags: STMT_END_F +master-bin.000001 14509 Table_map 1 14548 table_id: 25 (test.t1) +master-bin.000001 14548 Write_rows 1 14582 table_id: 25 flags: STMT_END_F +master-bin.000001 14582 Table_map 1 14621 table_id: 25 (test.t1) +master-bin.000001 14621 Write_rows 1 14655 table_id: 25 flags: STMT_END_F +master-bin.000001 14655 Table_map 1 14694 table_id: 25 (test.t1) +master-bin.000001 14694 Write_rows 1 14728 table_id: 25 flags: STMT_END_F +master-bin.000001 14728 Table_map 1 14767 table_id: 25 (test.t1) +master-bin.000001 14767 Write_rows 1 14801 table_id: 25 flags: STMT_END_F +master-bin.000001 14801 Table_map 1 14840 table_id: 25 (test.t1) +master-bin.000001 14840 Write_rows 1 14874 table_id: 25 flags: STMT_END_F +master-bin.000001 14874 Table_map 1 14913 table_id: 25 (test.t1) +master-bin.000001 14913 Write_rows 1 14947 table_id: 25 flags: STMT_END_F +master-bin.000001 14947 Table_map 1 14986 table_id: 25 (test.t1) +master-bin.000001 14986 Write_rows 1 15020 table_id: 25 flags: STMT_END_F +master-bin.000001 15020 Table_map 1 15059 table_id: 25 (test.t1) +master-bin.000001 15059 Write_rows 1 15093 table_id: 25 flags: STMT_END_F +master-bin.000001 15093 Table_map 1 15132 table_id: 25 (test.t1) +master-bin.000001 15132 Write_rows 1 15166 table_id: 25 flags: STMT_END_F +master-bin.000001 15166 Table_map 1 15205 table_id: 25 (test.t1) +master-bin.000001 15205 Write_rows 1 15239 table_id: 25 flags: STMT_END_F +master-bin.000001 15239 Table_map 1 15278 table_id: 25 (test.t1) +master-bin.000001 15278 Write_rows 1 15312 table_id: 25 flags: STMT_END_F +master-bin.000001 15312 Table_map 1 15351 table_id: 25 (test.t1) +master-bin.000001 15351 Write_rows 1 15385 table_id: 25 flags: STMT_END_F +master-bin.000001 15385 Table_map 1 15424 table_id: 25 (test.t1) +master-bin.000001 15424 Write_rows 1 15458 table_id: 25 flags: STMT_END_F +master-bin.000001 15458 Table_map 1 15497 table_id: 25 (test.t1) +master-bin.000001 15497 Write_rows 1 15531 table_id: 25 flags: STMT_END_F +master-bin.000001 15531 Table_map 1 15570 table_id: 25 (test.t1) +master-bin.000001 15570 Write_rows 1 15604 table_id: 25 flags: STMT_END_F +master-bin.000001 15604 Table_map 1 15643 table_id: 25 (test.t1) +master-bin.000001 15643 Write_rows 1 15677 table_id: 25 flags: STMT_END_F +master-bin.000001 15677 Table_map 1 15716 table_id: 25 (test.t1) +master-bin.000001 15716 Write_rows 1 15750 table_id: 25 flags: STMT_END_F +master-bin.000001 15750 Table_map 1 15789 table_id: 25 (test.t1) +master-bin.000001 15789 Write_rows 1 15823 table_id: 25 flags: STMT_END_F +master-bin.000001 15823 Table_map 1 15862 table_id: 25 (test.t1) +master-bin.000001 15862 Write_rows 1 15896 table_id: 25 flags: STMT_END_F +master-bin.000001 15896 Table_map 1 15935 table_id: 25 (test.t1) +master-bin.000001 15935 Write_rows 1 15969 table_id: 25 flags: STMT_END_F +master-bin.000001 15969 Table_map 1 16008 table_id: 25 (test.t1) +master-bin.000001 16008 Write_rows 1 16042 table_id: 25 flags: STMT_END_F +master-bin.000001 16042 Table_map 1 16081 table_id: 25 (test.t1) +master-bin.000001 16081 Write_rows 1 16115 table_id: 25 flags: STMT_END_F +master-bin.000001 16115 Table_map 1 16154 table_id: 25 (test.t1) +master-bin.000001 16154 Write_rows 1 16188 table_id: 25 flags: STMT_END_F +master-bin.000001 16188 Table_map 1 16227 table_id: 25 (test.t1) +master-bin.000001 16227 Write_rows 1 16261 table_id: 25 flags: STMT_END_F +master-bin.000001 16261 Table_map 1 16300 table_id: 25 (test.t1) +master-bin.000001 16300 Write_rows 1 16334 table_id: 25 flags: STMT_END_F +master-bin.000001 16334 Table_map 1 16373 table_id: 25 (test.t1) +master-bin.000001 16373 Write_rows 1 16407 table_id: 25 flags: STMT_END_F +master-bin.000001 16407 Table_map 1 16446 table_id: 25 (test.t1) +master-bin.000001 16446 Write_rows 1 16480 table_id: 25 flags: STMT_END_F +master-bin.000001 16480 Table_map 1 16519 table_id: 25 (test.t1) +master-bin.000001 16519 Write_rows 1 16553 table_id: 25 flags: STMT_END_F +master-bin.000001 16553 Table_map 1 16592 table_id: 25 (test.t1) +master-bin.000001 16592 Write_rows 1 16626 table_id: 25 flags: STMT_END_F +master-bin.000001 16626 Table_map 1 16665 table_id: 25 (test.t1) +master-bin.000001 16665 Write_rows 1 16699 table_id: 25 flags: STMT_END_F +master-bin.000001 16699 Table_map 1 16738 table_id: 25 (test.t1) +master-bin.000001 16738 Write_rows 1 16772 table_id: 25 flags: STMT_END_F +master-bin.000001 16772 Table_map 1 16811 table_id: 25 (test.t1) +master-bin.000001 16811 Write_rows 1 16845 table_id: 25 flags: STMT_END_F +master-bin.000001 16845 Table_map 1 16884 table_id: 25 (test.t1) +master-bin.000001 16884 Write_rows 1 16918 table_id: 25 flags: STMT_END_F +master-bin.000001 16918 Table_map 1 16957 table_id: 25 (test.t1) +master-bin.000001 16957 Write_rows 1 16991 table_id: 25 flags: STMT_END_F +master-bin.000001 16991 Table_map 1 17030 table_id: 25 (test.t1) +master-bin.000001 17030 Write_rows 1 17064 table_id: 25 flags: STMT_END_F +master-bin.000001 17064 Table_map 1 17103 table_id: 25 (test.t1) +master-bin.000001 17103 Write_rows 1 17137 table_id: 25 flags: STMT_END_F +master-bin.000001 17137 Table_map 1 17176 table_id: 25 (test.t1) +master-bin.000001 17176 Write_rows 1 17210 table_id: 25 flags: STMT_END_F +master-bin.000001 17210 Table_map 1 17249 table_id: 25 (test.t1) +master-bin.000001 17249 Write_rows 1 17283 table_id: 25 flags: STMT_END_F +master-bin.000001 17283 Table_map 1 17322 table_id: 25 (test.t1) +master-bin.000001 17322 Write_rows 1 17356 table_id: 25 flags: STMT_END_F +master-bin.000001 17356 Table_map 1 17395 table_id: 25 (test.t1) +master-bin.000001 17395 Write_rows 1 17429 table_id: 25 flags: STMT_END_F +master-bin.000001 17429 Table_map 1 17468 table_id: 25 (test.t1) +master-bin.000001 17468 Write_rows 1 17502 table_id: 25 flags: STMT_END_F +master-bin.000001 17502 Table_map 1 17541 table_id: 25 (test.t1) +master-bin.000001 17541 Write_rows 1 17575 table_id: 25 flags: STMT_END_F +master-bin.000001 17575 Table_map 1 17614 table_id: 25 (test.t1) +master-bin.000001 17614 Write_rows 1 17648 table_id: 25 flags: STMT_END_F +master-bin.000001 17648 Table_map 1 17687 table_id: 25 (test.t1) +master-bin.000001 17687 Write_rows 1 17721 table_id: 25 flags: STMT_END_F +master-bin.000001 17721 Table_map 1 17760 table_id: 25 (test.t1) +master-bin.000001 17760 Write_rows 1 17794 table_id: 25 flags: STMT_END_F +master-bin.000001 17794 Table_map 1 17833 table_id: 25 (test.t1) +master-bin.000001 17833 Write_rows 1 17867 table_id: 25 flags: STMT_END_F +master-bin.000001 17867 Table_map 1 17906 table_id: 25 (test.t1) +master-bin.000001 17906 Write_rows 1 17940 table_id: 25 flags: STMT_END_F +master-bin.000001 17940 Table_map 1 17979 table_id: 25 (test.t1) +master-bin.000001 17979 Write_rows 1 18013 table_id: 25 flags: STMT_END_F +master-bin.000001 18013 Table_map 1 18052 table_id: 25 (test.t1) +master-bin.000001 18052 Write_rows 1 18086 table_id: 25 flags: STMT_END_F +master-bin.000001 18086 Table_map 1 18125 table_id: 25 (test.t1) +master-bin.000001 18125 Write_rows 1 18159 table_id: 25 flags: STMT_END_F +master-bin.000001 18159 Table_map 1 18198 table_id: 25 (test.t1) +master-bin.000001 18198 Write_rows 1 18232 table_id: 25 flags: STMT_END_F +master-bin.000001 18232 Table_map 1 18271 table_id: 25 (test.t1) +master-bin.000001 18271 Write_rows 1 18305 table_id: 25 flags: STMT_END_F +master-bin.000001 18305 Table_map 1 18344 table_id: 25 (test.t1) +master-bin.000001 18344 Write_rows 1 18378 table_id: 25 flags: STMT_END_F +master-bin.000001 18378 Table_map 1 18417 table_id: 25 (test.t1) +master-bin.000001 18417 Write_rows 1 18451 table_id: 25 flags: STMT_END_F +master-bin.000001 18451 Table_map 1 18490 table_id: 25 (test.t1) +master-bin.000001 18490 Write_rows 1 18524 table_id: 25 flags: STMT_END_F +master-bin.000001 18524 Table_map 1 18563 table_id: 25 (test.t1) +master-bin.000001 18563 Write_rows 1 18597 table_id: 25 flags: STMT_END_F +master-bin.000001 18597 Table_map 1 18636 table_id: 25 (test.t1) +master-bin.000001 18636 Write_rows 1 18670 table_id: 25 flags: STMT_END_F +master-bin.000001 18670 Table_map 1 18709 table_id: 25 (test.t1) +master-bin.000001 18709 Write_rows 1 18743 table_id: 25 flags: STMT_END_F +master-bin.000001 18743 Table_map 1 18782 table_id: 25 (test.t1) +master-bin.000001 18782 Write_rows 1 18816 table_id: 25 flags: STMT_END_F +master-bin.000001 18816 Table_map 1 18855 table_id: 25 (test.t1) +master-bin.000001 18855 Write_rows 1 18889 table_id: 25 flags: STMT_END_F +master-bin.000001 18889 Table_map 1 18928 table_id: 25 (test.t1) +master-bin.000001 18928 Write_rows 1 18962 table_id: 25 flags: STMT_END_F +master-bin.000001 18962 Table_map 1 19001 table_id: 25 (test.t1) +master-bin.000001 19001 Write_rows 1 19035 table_id: 25 flags: STMT_END_F +master-bin.000001 19035 Table_map 1 19074 table_id: 25 (test.t1) +master-bin.000001 19074 Write_rows 1 19108 table_id: 25 flags: STMT_END_F +master-bin.000001 19108 Table_map 1 19147 table_id: 25 (test.t1) +master-bin.000001 19147 Write_rows 1 19181 table_id: 25 flags: STMT_END_F +master-bin.000001 19181 Table_map 1 19220 table_id: 25 (test.t1) +master-bin.000001 19220 Write_rows 1 19254 table_id: 25 flags: STMT_END_F +master-bin.000001 19254 Table_map 1 19293 table_id: 25 (test.t1) +master-bin.000001 19293 Write_rows 1 19327 table_id: 25 flags: STMT_END_F +master-bin.000001 19327 Table_map 1 19366 table_id: 25 (test.t1) +master-bin.000001 19366 Write_rows 1 19400 table_id: 25 flags: STMT_END_F +master-bin.000001 19400 Table_map 1 19439 table_id: 25 (test.t1) +master-bin.000001 19439 Write_rows 1 19473 table_id: 25 flags: STMT_END_F +master-bin.000001 19473 Table_map 1 19512 table_id: 25 (test.t1) +master-bin.000001 19512 Write_rows 1 19546 table_id: 25 flags: STMT_END_F +master-bin.000001 19546 Table_map 1 19585 table_id: 25 (test.t1) +master-bin.000001 19585 Write_rows 1 19619 table_id: 25 flags: STMT_END_F +master-bin.000001 19619 Table_map 1 19658 table_id: 25 (test.t1) +master-bin.000001 19658 Write_rows 1 19692 table_id: 25 flags: STMT_END_F +master-bin.000001 19692 Table_map 1 19731 table_id: 25 (test.t1) +master-bin.000001 19731 Write_rows 1 19765 table_id: 25 flags: STMT_END_F +master-bin.000001 19765 Table_map 1 19804 table_id: 25 (test.t1) +master-bin.000001 19804 Write_rows 1 19838 table_id: 25 flags: STMT_END_F +master-bin.000001 19838 Table_map 1 19877 table_id: 25 (test.t1) +master-bin.000001 19877 Write_rows 1 19911 table_id: 25 flags: STMT_END_F +master-bin.000001 19911 Table_map 1 19950 table_id: 25 (test.t1) +master-bin.000001 19950 Write_rows 1 19984 table_id: 25 flags: STMT_END_F +master-bin.000001 19984 Table_map 1 20023 table_id: 25 (test.t1) +master-bin.000001 20023 Write_rows 1 20057 table_id: 25 flags: STMT_END_F +master-bin.000001 20057 Table_map 1 20096 table_id: 25 (test.t1) +master-bin.000001 20096 Write_rows 1 20130 table_id: 25 flags: STMT_END_F +master-bin.000001 20130 Table_map 1 20169 table_id: 25 (test.t1) +master-bin.000001 20169 Write_rows 1 20203 table_id: 25 flags: STMT_END_F +master-bin.000001 20203 Table_map 1 20242 table_id: 25 (test.t1) +master-bin.000001 20242 Write_rows 1 20276 table_id: 25 flags: STMT_END_F +master-bin.000001 20276 Table_map 1 20315 table_id: 25 (test.t1) +master-bin.000001 20315 Write_rows 1 20349 table_id: 25 flags: STMT_END_F +master-bin.000001 20349 Table_map 1 20388 table_id: 25 (test.t1) +master-bin.000001 20388 Write_rows 1 20422 table_id: 25 flags: STMT_END_F +master-bin.000001 20422 Table_map 1 20461 table_id: 25 (test.t1) +master-bin.000001 20461 Write_rows 1 20495 table_id: 25 flags: STMT_END_F +master-bin.000001 20495 Table_map 1 20534 table_id: 25 (test.t1) +master-bin.000001 20534 Write_rows 1 20568 table_id: 25 flags: STMT_END_F +master-bin.000001 20568 Table_map 1 20607 table_id: 25 (test.t1) +master-bin.000001 20607 Write_rows 1 20641 table_id: 25 flags: STMT_END_F +master-bin.000001 20641 Table_map 1 20680 table_id: 25 (test.t1) +master-bin.000001 20680 Write_rows 1 20714 table_id: 25 flags: STMT_END_F +master-bin.000001 20714 Table_map 1 20753 table_id: 25 (test.t1) +master-bin.000001 20753 Write_rows 1 20787 table_id: 25 flags: STMT_END_F +master-bin.000001 20787 Table_map 1 20826 table_id: 25 (test.t1) +master-bin.000001 20826 Write_rows 1 20860 table_id: 25 flags: STMT_END_F +master-bin.000001 20860 Table_map 1 20899 table_id: 25 (test.t1) +master-bin.000001 20899 Write_rows 1 20933 table_id: 25 flags: STMT_END_F +master-bin.000001 20933 Table_map 1 20972 table_id: 25 (test.t1) +master-bin.000001 20972 Write_rows 1 21006 table_id: 25 flags: STMT_END_F +master-bin.000001 21006 Table_map 1 21045 table_id: 25 (test.t1) +master-bin.000001 21045 Write_rows 1 21079 table_id: 25 flags: STMT_END_F +master-bin.000001 21079 Table_map 1 21118 table_id: 25 (test.t1) +master-bin.000001 21118 Write_rows 1 21152 table_id: 25 flags: STMT_END_F +master-bin.000001 21152 Table_map 1 21191 table_id: 25 (test.t1) +master-bin.000001 21191 Write_rows 1 21225 table_id: 25 flags: STMT_END_F +master-bin.000001 21225 Table_map 1 21264 table_id: 25 (test.t1) +master-bin.000001 21264 Write_rows 1 21298 table_id: 25 flags: STMT_END_F +master-bin.000001 21298 Table_map 1 21337 table_id: 25 (test.t1) +master-bin.000001 21337 Write_rows 1 21371 table_id: 25 flags: STMT_END_F +master-bin.000001 21371 Table_map 1 21410 table_id: 25 (test.t1) +master-bin.000001 21410 Write_rows 1 21444 table_id: 25 flags: STMT_END_F +master-bin.000001 21444 Table_map 1 21483 table_id: 25 (test.t1) +master-bin.000001 21483 Write_rows 1 21517 table_id: 25 flags: STMT_END_F +master-bin.000001 21517 Table_map 1 21556 table_id: 25 (test.t1) +master-bin.000001 21556 Write_rows 1 21590 table_id: 25 flags: STMT_END_F +master-bin.000001 21590 Table_map 1 21629 table_id: 25 (test.t1) +master-bin.000001 21629 Write_rows 1 21663 table_id: 25 flags: STMT_END_F +master-bin.000001 21663 Table_map 1 21702 table_id: 25 (test.t1) +master-bin.000001 21702 Write_rows 1 21736 table_id: 25 flags: STMT_END_F +master-bin.000001 21736 Table_map 1 21775 table_id: 25 (test.t1) +master-bin.000001 21775 Write_rows 1 21809 table_id: 25 flags: STMT_END_F +master-bin.000001 21809 Table_map 1 21848 table_id: 25 (test.t1) +master-bin.000001 21848 Write_rows 1 21882 table_id: 25 flags: STMT_END_F +master-bin.000001 21882 Table_map 1 21921 table_id: 25 (test.t1) +master-bin.000001 21921 Write_rows 1 21955 table_id: 25 flags: STMT_END_F +master-bin.000001 21955 Table_map 1 21994 table_id: 25 (test.t1) +master-bin.000001 21994 Write_rows 1 22028 table_id: 25 flags: STMT_END_F +master-bin.000001 22028 Table_map 1 22067 table_id: 25 (test.t1) +master-bin.000001 22067 Write_rows 1 22101 table_id: 25 flags: STMT_END_F +master-bin.000001 22101 Table_map 1 22140 table_id: 25 (test.t1) +master-bin.000001 22140 Write_rows 1 22174 table_id: 25 flags: STMT_END_F +master-bin.000001 22174 Table_map 1 22213 table_id: 25 (test.t1) +master-bin.000001 22213 Write_rows 1 22247 table_id: 25 flags: STMT_END_F +master-bin.000001 22247 Table_map 1 22286 table_id: 25 (test.t1) +master-bin.000001 22286 Write_rows 1 22320 table_id: 25 flags: STMT_END_F +master-bin.000001 22320 Table_map 1 22359 table_id: 25 (test.t1) +master-bin.000001 22359 Write_rows 1 22393 table_id: 25 flags: STMT_END_F +master-bin.000001 22393 Table_map 1 22432 table_id: 25 (test.t1) +master-bin.000001 22432 Write_rows 1 22466 table_id: 25 flags: STMT_END_F +master-bin.000001 22466 Table_map 1 22505 table_id: 25 (test.t1) +master-bin.000001 22505 Write_rows 1 22539 table_id: 25 flags: STMT_END_F +master-bin.000001 22539 Table_map 1 22578 table_id: 25 (test.t1) +master-bin.000001 22578 Write_rows 1 22612 table_id: 25 flags: STMT_END_F +master-bin.000001 22612 Table_map 1 22651 table_id: 25 (test.t1) +master-bin.000001 22651 Write_rows 1 22685 table_id: 25 flags: STMT_END_F +master-bin.000001 22685 Table_map 1 22724 table_id: 25 (test.t1) +master-bin.000001 22724 Write_rows 1 22758 table_id: 25 flags: STMT_END_F +master-bin.000001 22758 Table_map 1 22797 table_id: 25 (test.t1) +master-bin.000001 22797 Write_rows 1 22831 table_id: 25 flags: STMT_END_F +master-bin.000001 22831 Table_map 1 22870 table_id: 25 (test.t1) +master-bin.000001 22870 Write_rows 1 22904 table_id: 25 flags: STMT_END_F +master-bin.000001 22904 Table_map 1 22943 table_id: 25 (test.t1) +master-bin.000001 22943 Write_rows 1 22977 table_id: 25 flags: STMT_END_F +master-bin.000001 22977 Table_map 1 23016 table_id: 25 (test.t1) +master-bin.000001 23016 Write_rows 1 23050 table_id: 25 flags: STMT_END_F +master-bin.000001 23050 Table_map 1 23089 table_id: 25 (test.t1) +master-bin.000001 23089 Write_rows 1 23123 table_id: 25 flags: STMT_END_F +master-bin.000001 23123 Table_map 1 23162 table_id: 25 (test.t1) +master-bin.000001 23162 Write_rows 1 23196 table_id: 25 flags: STMT_END_F +master-bin.000001 23196 Table_map 1 23235 table_id: 25 (test.t1) +master-bin.000001 23235 Write_rows 1 23269 table_id: 25 flags: STMT_END_F +master-bin.000001 23269 Table_map 1 23308 table_id: 25 (test.t1) +master-bin.000001 23308 Write_rows 1 23342 table_id: 25 flags: STMT_END_F +master-bin.000001 23342 Table_map 1 23381 table_id: 25 (test.t1) +master-bin.000001 23381 Write_rows 1 23415 table_id: 25 flags: STMT_END_F +master-bin.000001 23415 Table_map 1 23454 table_id: 25 (test.t1) +master-bin.000001 23454 Write_rows 1 23488 table_id: 25 flags: STMT_END_F +master-bin.000001 23488 Table_map 1 23527 table_id: 25 (test.t1) +master-bin.000001 23527 Write_rows 1 23561 table_id: 25 flags: STMT_END_F +master-bin.000001 23561 Table_map 1 23600 table_id: 25 (test.t1) +master-bin.000001 23600 Write_rows 1 23634 table_id: 25 flags: STMT_END_F +master-bin.000001 23634 Table_map 1 23673 table_id: 25 (test.t1) +master-bin.000001 23673 Write_rows 1 23707 table_id: 25 flags: STMT_END_F +master-bin.000001 23707 Table_map 1 23746 table_id: 25 (test.t1) +master-bin.000001 23746 Write_rows 1 23780 table_id: 25 flags: STMT_END_F +master-bin.000001 23780 Table_map 1 23819 table_id: 25 (test.t1) +master-bin.000001 23819 Write_rows 1 23853 table_id: 25 flags: STMT_END_F +master-bin.000001 23853 Table_map 1 23892 table_id: 25 (test.t1) +master-bin.000001 23892 Write_rows 1 23926 table_id: 25 flags: STMT_END_F +master-bin.000001 23926 Table_map 1 23965 table_id: 25 (test.t1) +master-bin.000001 23965 Write_rows 1 23999 table_id: 25 flags: STMT_END_F +master-bin.000001 23999 Table_map 1 24038 table_id: 25 (test.t1) +master-bin.000001 24038 Write_rows 1 24072 table_id: 25 flags: STMT_END_F +master-bin.000001 24072 Table_map 1 24111 table_id: 25 (test.t1) +master-bin.000001 24111 Write_rows 1 24145 table_id: 25 flags: STMT_END_F +master-bin.000001 24145 Table_map 1 24184 table_id: 25 (test.t1) +master-bin.000001 24184 Write_rows 1 24218 table_id: 25 flags: STMT_END_F +master-bin.000001 24218 Table_map 1 24257 table_id: 25 (test.t1) +master-bin.000001 24257 Write_rows 1 24291 table_id: 25 flags: STMT_END_F +master-bin.000001 24291 Table_map 1 24330 table_id: 25 (test.t1) +master-bin.000001 24330 Write_rows 1 24364 table_id: 25 flags: STMT_END_F +master-bin.000001 24364 Table_map 1 24403 table_id: 25 (test.t1) +master-bin.000001 24403 Write_rows 1 24437 table_id: 25 flags: STMT_END_F +master-bin.000001 24437 Table_map 1 24476 table_id: 25 (test.t1) +master-bin.000001 24476 Write_rows 1 24510 table_id: 25 flags: STMT_END_F +master-bin.000001 24510 Table_map 1 24549 table_id: 25 (test.t1) +master-bin.000001 24549 Write_rows 1 24583 table_id: 25 flags: STMT_END_F +master-bin.000001 24583 Table_map 1 24622 table_id: 25 (test.t1) +master-bin.000001 24622 Write_rows 1 24656 table_id: 25 flags: STMT_END_F +master-bin.000001 24656 Table_map 1 24695 table_id: 25 (test.t1) +master-bin.000001 24695 Write_rows 1 24729 table_id: 25 flags: STMT_END_F +master-bin.000001 24729 Table_map 1 24768 table_id: 25 (test.t1) +master-bin.000001 24768 Write_rows 1 24802 table_id: 25 flags: STMT_END_F +master-bin.000001 24802 Table_map 1 24841 table_id: 25 (test.t1) +master-bin.000001 24841 Write_rows 1 24875 table_id: 25 flags: STMT_END_F +master-bin.000001 24875 Table_map 1 24914 table_id: 25 (test.t1) +master-bin.000001 24914 Write_rows 1 24948 table_id: 25 flags: STMT_END_F +master-bin.000001 24948 Table_map 1 24987 table_id: 25 (test.t1) +master-bin.000001 24987 Write_rows 1 25021 table_id: 25 flags: STMT_END_F +master-bin.000001 25021 Table_map 1 25060 table_id: 25 (test.t1) +master-bin.000001 25060 Write_rows 1 25094 table_id: 25 flags: STMT_END_F +master-bin.000001 25094 Table_map 1 25133 table_id: 25 (test.t1) +master-bin.000001 25133 Write_rows 1 25167 table_id: 25 flags: STMT_END_F +master-bin.000001 25167 Table_map 1 25206 table_id: 25 (test.t1) +master-bin.000001 25206 Write_rows 1 25240 table_id: 25 flags: STMT_END_F +master-bin.000001 25240 Table_map 1 25279 table_id: 25 (test.t1) +master-bin.000001 25279 Write_rows 1 25313 table_id: 25 flags: STMT_END_F +master-bin.000001 25313 Table_map 1 25352 table_id: 25 (test.t1) +master-bin.000001 25352 Write_rows 1 25386 table_id: 25 flags: STMT_END_F +master-bin.000001 25386 Table_map 1 25425 table_id: 25 (test.t1) +master-bin.000001 25425 Write_rows 1 25459 table_id: 25 flags: STMT_END_F +master-bin.000001 25459 Table_map 1 25498 table_id: 25 (test.t1) +master-bin.000001 25498 Write_rows 1 25532 table_id: 25 flags: STMT_END_F +master-bin.000001 25532 Table_map 1 25571 table_id: 25 (test.t1) +master-bin.000001 25571 Write_rows 1 25605 table_id: 25 flags: STMT_END_F +master-bin.000001 25605 Table_map 1 25644 table_id: 25 (test.t1) +master-bin.000001 25644 Write_rows 1 25678 table_id: 25 flags: STMT_END_F +master-bin.000001 25678 Table_map 1 25717 table_id: 25 (test.t1) +master-bin.000001 25717 Write_rows 1 25751 table_id: 25 flags: STMT_END_F +master-bin.000001 25751 Table_map 1 25790 table_id: 25 (test.t1) +master-bin.000001 25790 Write_rows 1 25824 table_id: 25 flags: STMT_END_F +master-bin.000001 25824 Table_map 1 25863 table_id: 25 (test.t1) +master-bin.000001 25863 Write_rows 1 25897 table_id: 25 flags: STMT_END_F +master-bin.000001 25897 Table_map 1 25936 table_id: 25 (test.t1) +master-bin.000001 25936 Write_rows 1 25970 table_id: 25 flags: STMT_END_F +master-bin.000001 25970 Table_map 1 26009 table_id: 25 (test.t1) +master-bin.000001 26009 Write_rows 1 26043 table_id: 25 flags: STMT_END_F +master-bin.000001 26043 Table_map 1 26082 table_id: 25 (test.t1) +master-bin.000001 26082 Write_rows 1 26116 table_id: 25 flags: STMT_END_F +master-bin.000001 26116 Table_map 1 26155 table_id: 25 (test.t1) +master-bin.000001 26155 Write_rows 1 26189 table_id: 25 flags: STMT_END_F +master-bin.000001 26189 Table_map 1 26228 table_id: 25 (test.t1) +master-bin.000001 26228 Write_rows 1 26262 table_id: 25 flags: STMT_END_F +master-bin.000001 26262 Table_map 1 26301 table_id: 25 (test.t1) +master-bin.000001 26301 Write_rows 1 26335 table_id: 25 flags: STMT_END_F +master-bin.000001 26335 Table_map 1 26374 table_id: 25 (test.t1) +master-bin.000001 26374 Write_rows 1 26408 table_id: 25 flags: STMT_END_F +master-bin.000001 26408 Table_map 1 26447 table_id: 25 (test.t1) +master-bin.000001 26447 Write_rows 1 26481 table_id: 25 flags: STMT_END_F +master-bin.000001 26481 Table_map 1 26520 table_id: 25 (test.t1) +master-bin.000001 26520 Write_rows 1 26554 table_id: 25 flags: STMT_END_F +master-bin.000001 26554 Table_map 1 26593 table_id: 25 (test.t1) +master-bin.000001 26593 Write_rows 1 26627 table_id: 25 flags: STMT_END_F +master-bin.000001 26627 Table_map 1 26666 table_id: 25 (test.t1) +master-bin.000001 26666 Write_rows 1 26700 table_id: 25 flags: STMT_END_F +master-bin.000001 26700 Table_map 1 26739 table_id: 25 (test.t1) +master-bin.000001 26739 Write_rows 1 26773 table_id: 25 flags: STMT_END_F +master-bin.000001 26773 Table_map 1 26812 table_id: 25 (test.t1) +master-bin.000001 26812 Write_rows 1 26846 table_id: 25 flags: STMT_END_F +master-bin.000001 26846 Table_map 1 26885 table_id: 25 (test.t1) +master-bin.000001 26885 Write_rows 1 26919 table_id: 25 flags: STMT_END_F +master-bin.000001 26919 Table_map 1 26958 table_id: 25 (test.t1) +master-bin.000001 26958 Write_rows 1 26992 table_id: 25 flags: STMT_END_F +master-bin.000001 26992 Table_map 1 27031 table_id: 25 (test.t1) +master-bin.000001 27031 Write_rows 1 27065 table_id: 25 flags: STMT_END_F +master-bin.000001 27065 Table_map 1 27104 table_id: 25 (test.t1) +master-bin.000001 27104 Write_rows 1 27138 table_id: 25 flags: STMT_END_F +master-bin.000001 27138 Table_map 1 27177 table_id: 25 (test.t1) +master-bin.000001 27177 Write_rows 1 27211 table_id: 25 flags: STMT_END_F +master-bin.000001 27211 Table_map 1 27250 table_id: 25 (test.t1) +master-bin.000001 27250 Write_rows 1 27284 table_id: 25 flags: STMT_END_F +master-bin.000001 27284 Table_map 1 27323 table_id: 25 (test.t1) +master-bin.000001 27323 Write_rows 1 27357 table_id: 25 flags: STMT_END_F +master-bin.000001 27357 Table_map 1 27396 table_id: 25 (test.t1) +master-bin.000001 27396 Write_rows 1 27430 table_id: 25 flags: STMT_END_F +master-bin.000001 27430 Table_map 1 27469 table_id: 25 (test.t1) +master-bin.000001 27469 Write_rows 1 27503 table_id: 25 flags: STMT_END_F +master-bin.000001 27503 Table_map 1 27542 table_id: 25 (test.t1) +master-bin.000001 27542 Write_rows 1 27576 table_id: 25 flags: STMT_END_F +master-bin.000001 27576 Table_map 1 27615 table_id: 25 (test.t1) +master-bin.000001 27615 Write_rows 1 27649 table_id: 25 flags: STMT_END_F +master-bin.000001 27649 Table_map 1 27688 table_id: 25 (test.t1) +master-bin.000001 27688 Write_rows 1 27722 table_id: 25 flags: STMT_END_F +master-bin.000001 27722 Table_map 1 27761 table_id: 25 (test.t1) +master-bin.000001 27761 Write_rows 1 27795 table_id: 25 flags: STMT_END_F +master-bin.000001 27795 Table_map 1 27834 table_id: 25 (test.t1) +master-bin.000001 27834 Write_rows 1 27868 table_id: 25 flags: STMT_END_F +master-bin.000001 27868 Table_map 1 27907 table_id: 25 (test.t1) +master-bin.000001 27907 Write_rows 1 27941 table_id: 25 flags: STMT_END_F +master-bin.000001 27941 Table_map 1 27980 table_id: 25 (test.t1) +master-bin.000001 27980 Write_rows 1 28014 table_id: 25 flags: STMT_END_F +master-bin.000001 28014 Table_map 1 28053 table_id: 25 (test.t1) +master-bin.000001 28053 Write_rows 1 28087 table_id: 25 flags: STMT_END_F +master-bin.000001 28087 Table_map 1 28126 table_id: 25 (test.t1) +master-bin.000001 28126 Write_rows 1 28160 table_id: 25 flags: STMT_END_F +master-bin.000001 28160 Table_map 1 28199 table_id: 25 (test.t1) +master-bin.000001 28199 Write_rows 1 28233 table_id: 25 flags: STMT_END_F +master-bin.000001 28233 Table_map 1 28272 table_id: 25 (test.t1) +master-bin.000001 28272 Write_rows 1 28306 table_id: 25 flags: STMT_END_F +master-bin.000001 28306 Table_map 1 28345 table_id: 25 (test.t1) +master-bin.000001 28345 Write_rows 1 28379 table_id: 25 flags: STMT_END_F +master-bin.000001 28379 Table_map 1 28418 table_id: 25 (test.t1) +master-bin.000001 28418 Write_rows 1 28452 table_id: 25 flags: STMT_END_F +master-bin.000001 28452 Table_map 1 28491 table_id: 25 (test.t1) +master-bin.000001 28491 Write_rows 1 28525 table_id: 25 flags: STMT_END_F +master-bin.000001 28525 Table_map 1 28564 table_id: 25 (test.t1) +master-bin.000001 28564 Write_rows 1 28598 table_id: 25 flags: STMT_END_F +master-bin.000001 28598 Table_map 1 28637 table_id: 25 (test.t1) +master-bin.000001 28637 Write_rows 1 28671 table_id: 25 flags: STMT_END_F +master-bin.000001 28671 Table_map 1 28710 table_id: 25 (test.t1) +master-bin.000001 28710 Write_rows 1 28744 table_id: 25 flags: STMT_END_F +master-bin.000001 28744 Table_map 1 28783 table_id: 25 (test.t1) +master-bin.000001 28783 Write_rows 1 28817 table_id: 25 flags: STMT_END_F +master-bin.000001 28817 Table_map 1 28856 table_id: 25 (test.t1) +master-bin.000001 28856 Write_rows 1 28890 table_id: 25 flags: STMT_END_F +master-bin.000001 28890 Table_map 1 28929 table_id: 25 (test.t1) +master-bin.000001 28929 Write_rows 1 28963 table_id: 25 flags: STMT_END_F +master-bin.000001 28963 Table_map 1 29002 table_id: 25 (test.t1) +master-bin.000001 29002 Write_rows 1 29036 table_id: 25 flags: STMT_END_F +master-bin.000001 29036 Table_map 1 29075 table_id: 25 (test.t1) +master-bin.000001 29075 Write_rows 1 29109 table_id: 25 flags: STMT_END_F +master-bin.000001 29109 Table_map 1 29148 table_id: 25 (test.t1) +master-bin.000001 29148 Write_rows 1 29182 table_id: 25 flags: STMT_END_F +master-bin.000001 29182 Table_map 1 29221 table_id: 25 (test.t1) +master-bin.000001 29221 Write_rows 1 29255 table_id: 25 flags: STMT_END_F +master-bin.000001 29255 Table_map 1 29294 table_id: 25 (test.t1) +master-bin.000001 29294 Write_rows 1 29328 table_id: 25 flags: STMT_END_F +master-bin.000001 29328 Table_map 1 29367 table_id: 25 (test.t1) +master-bin.000001 29367 Write_rows 1 29401 table_id: 25 flags: STMT_END_F +master-bin.000001 29401 Table_map 1 29440 table_id: 25 (test.t1) +master-bin.000001 29440 Write_rows 1 29474 table_id: 25 flags: STMT_END_F +master-bin.000001 29474 Xid 1 29501 COMMIT /* xid=189 */ +master-bin.000001 29501 Rotate 1 29545 master-bin.000002;pos=4 +drop table t1; +set global binlog_cache_size=@bcs; +set session autocommit = @ac; +End of 5.0 tests reset master; create table t1 (id tinyint auto_increment primary key); set insert_id=128; diff --git a/mysql-test/r/binlog_stm_binlog.result b/mysql-test/r/binlog_stm_binlog.result index 1bc7430fde0..45fef628357 100644 --- a/mysql-test/r/binlog_stm_binlog.result +++ b/mysql-test/r/binlog_stm_binlog.result @@ -260,6 +260,422 @@ master-bin.000001 293 Query 1 381 use `test`; insert into t1 values (5) master-bin.000001 381 Query 1 469 use `test`; insert into t1 values (6) master-bin.000001 469 Query 1 545 use `test`; drop table t1 set session autocommit = @ac; +set @bcs = @@binlog_cache_size; +set @ac = @@autocommit; +set global binlog_cache_size=4096; +set autocommit= 0; +reset master; +create table t1 (a int) engine=innodb; +show binlog events from 0; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 106 Server ver: 5.1.21-beta-debug-log, Binlog ver: 4 +master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb +master-bin.000001 206 Query 1 274 use `test`; BEGIN +master-bin.000001 274 Query 1 365 use `test`; insert into t1 values( 400 ) +master-bin.000001 365 Query 1 456 use `test`; insert into t1 values( 399 ) +master-bin.000001 456 Query 1 547 use `test`; insert into t1 values( 398 ) +master-bin.000001 547 Query 1 638 use `test`; insert into t1 values( 397 ) +master-bin.000001 638 Query 1 729 use `test`; insert into t1 values( 396 ) +master-bin.000001 729 Query 1 820 use `test`; insert into t1 values( 395 ) +master-bin.000001 820 Query 1 911 use `test`; insert into t1 values( 394 ) +master-bin.000001 911 Query 1 1002 use `test`; insert into t1 values( 393 ) +master-bin.000001 1002 Query 1 1093 use `test`; insert into t1 values( 392 ) +master-bin.000001 1093 Query 1 1184 use `test`; insert into t1 values( 391 ) +master-bin.000001 1184 Query 1 1275 use `test`; insert into t1 values( 390 ) +master-bin.000001 1275 Query 1 1366 use `test`; insert into t1 values( 389 ) +master-bin.000001 1366 Query 1 1457 use `test`; insert into t1 values( 388 ) +master-bin.000001 1457 Query 1 1548 use `test`; insert into t1 values( 387 ) +master-bin.000001 1548 Query 1 1639 use `test`; insert into t1 values( 386 ) +master-bin.000001 1639 Query 1 1730 use `test`; insert into t1 values( 385 ) +master-bin.000001 1730 Query 1 1821 use `test`; insert into t1 values( 384 ) +master-bin.000001 1821 Query 1 1912 use `test`; insert into t1 values( 383 ) +master-bin.000001 1912 Query 1 2003 use `test`; insert into t1 values( 382 ) +master-bin.000001 2003 Query 1 2094 use `test`; insert into t1 values( 381 ) +master-bin.000001 2094 Query 1 2185 use `test`; insert into t1 values( 380 ) +master-bin.000001 2185 Query 1 2276 use `test`; insert into t1 values( 379 ) +master-bin.000001 2276 Query 1 2367 use `test`; insert into t1 values( 378 ) +master-bin.000001 2367 Query 1 2458 use `test`; insert into t1 values( 377 ) +master-bin.000001 2458 Query 1 2549 use `test`; insert into t1 values( 376 ) +master-bin.000001 2549 Query 1 2640 use `test`; insert into t1 values( 375 ) +master-bin.000001 2640 Query 1 2731 use `test`; insert into t1 values( 374 ) +master-bin.000001 2731 Query 1 2822 use `test`; insert into t1 values( 373 ) +master-bin.000001 2822 Query 1 2913 use `test`; insert into t1 values( 372 ) +master-bin.000001 2913 Query 1 3004 use `test`; insert into t1 values( 371 ) +master-bin.000001 3004 Query 1 3095 use `test`; insert into t1 values( 370 ) +master-bin.000001 3095 Query 1 3186 use `test`; insert into t1 values( 369 ) +master-bin.000001 3186 Query 1 3277 use `test`; insert into t1 values( 368 ) +master-bin.000001 3277 Query 1 3368 use `test`; insert into t1 values( 367 ) +master-bin.000001 3368 Query 1 3459 use `test`; insert into t1 values( 366 ) +master-bin.000001 3459 Query 1 3550 use `test`; insert into t1 values( 365 ) +master-bin.000001 3550 Query 1 3641 use `test`; insert into t1 values( 364 ) +master-bin.000001 3641 Query 1 3732 use `test`; insert into t1 values( 363 ) +master-bin.000001 3732 Query 1 3823 use `test`; insert into t1 values( 362 ) +master-bin.000001 3823 Query 1 3914 use `test`; insert into t1 values( 361 ) +master-bin.000001 3914 Query 1 4005 use `test`; insert into t1 values( 360 ) +master-bin.000001 4005 Query 1 4096 use `test`; insert into t1 values( 359 ) +master-bin.000001 4096 Query 1 4187 use `test`; insert into t1 values( 358 ) +master-bin.000001 4187 Query 1 4278 use `test`; insert into t1 values( 357 ) +master-bin.000001 4278 Query 1 4369 use `test`; insert into t1 values( 356 ) +master-bin.000001 4369 Query 1 4460 use `test`; insert into t1 values( 355 ) +master-bin.000001 4460 Query 1 4551 use `test`; insert into t1 values( 354 ) +master-bin.000001 4551 Query 1 4642 use `test`; insert into t1 values( 353 ) +master-bin.000001 4642 Query 1 4733 use `test`; insert into t1 values( 352 ) +master-bin.000001 4733 Query 1 4824 use `test`; insert into t1 values( 351 ) +master-bin.000001 4824 Query 1 4915 use `test`; insert into t1 values( 350 ) +master-bin.000001 4915 Query 1 5006 use `test`; insert into t1 values( 349 ) +master-bin.000001 5006 Query 1 5097 use `test`; insert into t1 values( 348 ) +master-bin.000001 5097 Query 1 5188 use `test`; insert into t1 values( 347 ) +master-bin.000001 5188 Query 1 5279 use `test`; insert into t1 values( 346 ) +master-bin.000001 5279 Query 1 5370 use `test`; insert into t1 values( 345 ) +master-bin.000001 5370 Query 1 5461 use `test`; insert into t1 values( 344 ) +master-bin.000001 5461 Query 1 5552 use `test`; insert into t1 values( 343 ) +master-bin.000001 5552 Query 1 5643 use `test`; insert into t1 values( 342 ) +master-bin.000001 5643 Query 1 5734 use `test`; insert into t1 values( 341 ) +master-bin.000001 5734 Query 1 5825 use `test`; insert into t1 values( 340 ) +master-bin.000001 5825 Query 1 5916 use `test`; insert into t1 values( 339 ) +master-bin.000001 5916 Query 1 6007 use `test`; insert into t1 values( 338 ) +master-bin.000001 6007 Query 1 6098 use `test`; insert into t1 values( 337 ) +master-bin.000001 6098 Query 1 6189 use `test`; insert into t1 values( 336 ) +master-bin.000001 6189 Query 1 6280 use `test`; insert into t1 values( 335 ) +master-bin.000001 6280 Query 1 6371 use `test`; insert into t1 values( 334 ) +master-bin.000001 6371 Query 1 6462 use `test`; insert into t1 values( 333 ) +master-bin.000001 6462 Query 1 6553 use `test`; insert into t1 values( 332 ) +master-bin.000001 6553 Query 1 6644 use `test`; insert into t1 values( 331 ) +master-bin.000001 6644 Query 1 6735 use `test`; insert into t1 values( 330 ) +master-bin.000001 6735 Query 1 6826 use `test`; insert into t1 values( 329 ) +master-bin.000001 6826 Query 1 6917 use `test`; insert into t1 values( 328 ) +master-bin.000001 6917 Query 1 7008 use `test`; insert into t1 values( 327 ) +master-bin.000001 7008 Query 1 7099 use `test`; insert into t1 values( 326 ) +master-bin.000001 7099 Query 1 7190 use `test`; insert into t1 values( 325 ) +master-bin.000001 7190 Query 1 7281 use `test`; insert into t1 values( 324 ) +master-bin.000001 7281 Query 1 7372 use `test`; insert into t1 values( 323 ) +master-bin.000001 7372 Query 1 7463 use `test`; insert into t1 values( 322 ) +master-bin.000001 7463 Query 1 7554 use `test`; insert into t1 values( 321 ) +master-bin.000001 7554 Query 1 7645 use `test`; insert into t1 values( 320 ) +master-bin.000001 7645 Query 1 7736 use `test`; insert into t1 values( 319 ) +master-bin.000001 7736 Query 1 7827 use `test`; insert into t1 values( 318 ) +master-bin.000001 7827 Query 1 7918 use `test`; insert into t1 values( 317 ) +master-bin.000001 7918 Query 1 8009 use `test`; insert into t1 values( 316 ) +master-bin.000001 8009 Query 1 8100 use `test`; insert into t1 values( 315 ) +master-bin.000001 8100 Query 1 8191 use `test`; insert into t1 values( 314 ) +master-bin.000001 8191 Query 1 8282 use `test`; insert into t1 values( 313 ) +master-bin.000001 8282 Query 1 8373 use `test`; insert into t1 values( 312 ) +master-bin.000001 8373 Query 1 8464 use `test`; insert into t1 values( 311 ) +master-bin.000001 8464 Query 1 8555 use `test`; insert into t1 values( 310 ) +master-bin.000001 8555 Query 1 8646 use `test`; insert into t1 values( 309 ) +master-bin.000001 8646 Query 1 8737 use `test`; insert into t1 values( 308 ) +master-bin.000001 8737 Query 1 8828 use `test`; insert into t1 values( 307 ) +master-bin.000001 8828 Query 1 8919 use `test`; insert into t1 values( 306 ) +master-bin.000001 8919 Query 1 9010 use `test`; insert into t1 values( 305 ) +master-bin.000001 9010 Query 1 9101 use `test`; insert into t1 values( 304 ) +master-bin.000001 9101 Query 1 9192 use `test`; insert into t1 values( 303 ) +master-bin.000001 9192 Query 1 9283 use `test`; insert into t1 values( 302 ) +master-bin.000001 9283 Query 1 9374 use `test`; insert into t1 values( 301 ) +master-bin.000001 9374 Query 1 9465 use `test`; insert into t1 values( 300 ) +master-bin.000001 9465 Query 1 9556 use `test`; insert into t1 values( 299 ) +master-bin.000001 9556 Query 1 9647 use `test`; insert into t1 values( 298 ) +master-bin.000001 9647 Query 1 9738 use `test`; insert into t1 values( 297 ) +master-bin.000001 9738 Query 1 9829 use `test`; insert into t1 values( 296 ) +master-bin.000001 9829 Query 1 9920 use `test`; insert into t1 values( 295 ) +master-bin.000001 9920 Query 1 10011 use `test`; insert into t1 values( 294 ) +master-bin.000001 10011 Query 1 10102 use `test`; insert into t1 values( 293 ) +master-bin.000001 10102 Query 1 10193 use `test`; insert into t1 values( 292 ) +master-bin.000001 10193 Query 1 10284 use `test`; insert into t1 values( 291 ) +master-bin.000001 10284 Query 1 10375 use `test`; insert into t1 values( 290 ) +master-bin.000001 10375 Query 1 10466 use `test`; insert into t1 values( 289 ) +master-bin.000001 10466 Query 1 10557 use `test`; insert into t1 values( 288 ) +master-bin.000001 10557 Query 1 10648 use `test`; insert into t1 values( 287 ) +master-bin.000001 10648 Query 1 10739 use `test`; insert into t1 values( 286 ) +master-bin.000001 10739 Query 1 10830 use `test`; insert into t1 values( 285 ) +master-bin.000001 10830 Query 1 10921 use `test`; insert into t1 values( 284 ) +master-bin.000001 10921 Query 1 11012 use `test`; insert into t1 values( 283 ) +master-bin.000001 11012 Query 1 11103 use `test`; insert into t1 values( 282 ) +master-bin.000001 11103 Query 1 11194 use `test`; insert into t1 values( 281 ) +master-bin.000001 11194 Query 1 11285 use `test`; insert into t1 values( 280 ) +master-bin.000001 11285 Query 1 11376 use `test`; insert into t1 values( 279 ) +master-bin.000001 11376 Query 1 11467 use `test`; insert into t1 values( 278 ) +master-bin.000001 11467 Query 1 11558 use `test`; insert into t1 values( 277 ) +master-bin.000001 11558 Query 1 11649 use `test`; insert into t1 values( 276 ) +master-bin.000001 11649 Query 1 11740 use `test`; insert into t1 values( 275 ) +master-bin.000001 11740 Query 1 11831 use `test`; insert into t1 values( 274 ) +master-bin.000001 11831 Query 1 11922 use `test`; insert into t1 values( 273 ) +master-bin.000001 11922 Query 1 12013 use `test`; insert into t1 values( 272 ) +master-bin.000001 12013 Query 1 12104 use `test`; insert into t1 values( 271 ) +master-bin.000001 12104 Query 1 12195 use `test`; insert into t1 values( 270 ) +master-bin.000001 12195 Query 1 12286 use `test`; insert into t1 values( 269 ) +master-bin.000001 12286 Query 1 12377 use `test`; insert into t1 values( 268 ) +master-bin.000001 12377 Query 1 12468 use `test`; insert into t1 values( 267 ) +master-bin.000001 12468 Query 1 12559 use `test`; insert into t1 values( 266 ) +master-bin.000001 12559 Query 1 12650 use `test`; insert into t1 values( 265 ) +master-bin.000001 12650 Query 1 12741 use `test`; insert into t1 values( 264 ) +master-bin.000001 12741 Query 1 12832 use `test`; insert into t1 values( 263 ) +master-bin.000001 12832 Query 1 12923 use `test`; insert into t1 values( 262 ) +master-bin.000001 12923 Query 1 13014 use `test`; insert into t1 values( 261 ) +master-bin.000001 13014 Query 1 13105 use `test`; insert into t1 values( 260 ) +master-bin.000001 13105 Query 1 13196 use `test`; insert into t1 values( 259 ) +master-bin.000001 13196 Query 1 13287 use `test`; insert into t1 values( 258 ) +master-bin.000001 13287 Query 1 13378 use `test`; insert into t1 values( 257 ) +master-bin.000001 13378 Query 1 13469 use `test`; insert into t1 values( 256 ) +master-bin.000001 13469 Query 1 13560 use `test`; insert into t1 values( 255 ) +master-bin.000001 13560 Query 1 13651 use `test`; insert into t1 values( 254 ) +master-bin.000001 13651 Query 1 13742 use `test`; insert into t1 values( 253 ) +master-bin.000001 13742 Query 1 13833 use `test`; insert into t1 values( 252 ) +master-bin.000001 13833 Query 1 13924 use `test`; insert into t1 values( 251 ) +master-bin.000001 13924 Query 1 14015 use `test`; insert into t1 values( 250 ) +master-bin.000001 14015 Query 1 14106 use `test`; insert into t1 values( 249 ) +master-bin.000001 14106 Query 1 14197 use `test`; insert into t1 values( 248 ) +master-bin.000001 14197 Query 1 14288 use `test`; insert into t1 values( 247 ) +master-bin.000001 14288 Query 1 14379 use `test`; insert into t1 values( 246 ) +master-bin.000001 14379 Query 1 14470 use `test`; insert into t1 values( 245 ) +master-bin.000001 14470 Query 1 14561 use `test`; insert into t1 values( 244 ) +master-bin.000001 14561 Query 1 14652 use `test`; insert into t1 values( 243 ) +master-bin.000001 14652 Query 1 14743 use `test`; insert into t1 values( 242 ) +master-bin.000001 14743 Query 1 14834 use `test`; insert into t1 values( 241 ) +master-bin.000001 14834 Query 1 14925 use `test`; insert into t1 values( 240 ) +master-bin.000001 14925 Query 1 15016 use `test`; insert into t1 values( 239 ) +master-bin.000001 15016 Query 1 15107 use `test`; insert into t1 values( 238 ) +master-bin.000001 15107 Query 1 15198 use `test`; insert into t1 values( 237 ) +master-bin.000001 15198 Query 1 15289 use `test`; insert into t1 values( 236 ) +master-bin.000001 15289 Query 1 15380 use `test`; insert into t1 values( 235 ) +master-bin.000001 15380 Query 1 15471 use `test`; insert into t1 values( 234 ) +master-bin.000001 15471 Query 1 15562 use `test`; insert into t1 values( 233 ) +master-bin.000001 15562 Query 1 15653 use `test`; insert into t1 values( 232 ) +master-bin.000001 15653 Query 1 15744 use `test`; insert into t1 values( 231 ) +master-bin.000001 15744 Query 1 15835 use `test`; insert into t1 values( 230 ) +master-bin.000001 15835 Query 1 15926 use `test`; insert into t1 values( 229 ) +master-bin.000001 15926 Query 1 16017 use `test`; insert into t1 values( 228 ) +master-bin.000001 16017 Query 1 16108 use `test`; insert into t1 values( 227 ) +master-bin.000001 16108 Query 1 16199 use `test`; insert into t1 values( 226 ) +master-bin.000001 16199 Query 1 16290 use `test`; insert into t1 values( 225 ) +master-bin.000001 16290 Query 1 16381 use `test`; insert into t1 values( 224 ) +master-bin.000001 16381 Query 1 16472 use `test`; insert into t1 values( 223 ) +master-bin.000001 16472 Query 1 16563 use `test`; insert into t1 values( 222 ) +master-bin.000001 16563 Query 1 16654 use `test`; insert into t1 values( 221 ) +master-bin.000001 16654 Query 1 16745 use `test`; insert into t1 values( 220 ) +master-bin.000001 16745 Query 1 16836 use `test`; insert into t1 values( 219 ) +master-bin.000001 16836 Query 1 16927 use `test`; insert into t1 values( 218 ) +master-bin.000001 16927 Query 1 17018 use `test`; insert into t1 values( 217 ) +master-bin.000001 17018 Query 1 17109 use `test`; insert into t1 values( 216 ) +master-bin.000001 17109 Query 1 17200 use `test`; insert into t1 values( 215 ) +master-bin.000001 17200 Query 1 17291 use `test`; insert into t1 values( 214 ) +master-bin.000001 17291 Query 1 17382 use `test`; insert into t1 values( 213 ) +master-bin.000001 17382 Query 1 17473 use `test`; insert into t1 values( 212 ) +master-bin.000001 17473 Query 1 17564 use `test`; insert into t1 values( 211 ) +master-bin.000001 17564 Query 1 17655 use `test`; insert into t1 values( 210 ) +master-bin.000001 17655 Query 1 17746 use `test`; insert into t1 values( 209 ) +master-bin.000001 17746 Query 1 17837 use `test`; insert into t1 values( 208 ) +master-bin.000001 17837 Query 1 17928 use `test`; insert into t1 values( 207 ) +master-bin.000001 17928 Query 1 18019 use `test`; insert into t1 values( 206 ) +master-bin.000001 18019 Query 1 18110 use `test`; insert into t1 values( 205 ) +master-bin.000001 18110 Query 1 18201 use `test`; insert into t1 values( 204 ) +master-bin.000001 18201 Query 1 18292 use `test`; insert into t1 values( 203 ) +master-bin.000001 18292 Query 1 18383 use `test`; insert into t1 values( 202 ) +master-bin.000001 18383 Query 1 18474 use `test`; insert into t1 values( 201 ) +master-bin.000001 18474 Query 1 18565 use `test`; insert into t1 values( 200 ) +master-bin.000001 18565 Query 1 18656 use `test`; insert into t1 values( 199 ) +master-bin.000001 18656 Query 1 18747 use `test`; insert into t1 values( 198 ) +master-bin.000001 18747 Query 1 18838 use `test`; insert into t1 values( 197 ) +master-bin.000001 18838 Query 1 18929 use `test`; insert into t1 values( 196 ) +master-bin.000001 18929 Query 1 19020 use `test`; insert into t1 values( 195 ) +master-bin.000001 19020 Query 1 19111 use `test`; insert into t1 values( 194 ) +master-bin.000001 19111 Query 1 19202 use `test`; insert into t1 values( 193 ) +master-bin.000001 19202 Query 1 19293 use `test`; insert into t1 values( 192 ) +master-bin.000001 19293 Query 1 19384 use `test`; insert into t1 values( 191 ) +master-bin.000001 19384 Query 1 19475 use `test`; insert into t1 values( 190 ) +master-bin.000001 19475 Query 1 19566 use `test`; insert into t1 values( 189 ) +master-bin.000001 19566 Query 1 19657 use `test`; insert into t1 values( 188 ) +master-bin.000001 19657 Query 1 19748 use `test`; insert into t1 values( 187 ) +master-bin.000001 19748 Query 1 19839 use `test`; insert into t1 values( 186 ) +master-bin.000001 19839 Query 1 19930 use `test`; insert into t1 values( 185 ) +master-bin.000001 19930 Query 1 20021 use `test`; insert into t1 values( 184 ) +master-bin.000001 20021 Query 1 20112 use `test`; insert into t1 values( 183 ) +master-bin.000001 20112 Query 1 20203 use `test`; insert into t1 values( 182 ) +master-bin.000001 20203 Query 1 20294 use `test`; insert into t1 values( 181 ) +master-bin.000001 20294 Query 1 20385 use `test`; insert into t1 values( 180 ) +master-bin.000001 20385 Query 1 20476 use `test`; insert into t1 values( 179 ) +master-bin.000001 20476 Query 1 20567 use `test`; insert into t1 values( 178 ) +master-bin.000001 20567 Query 1 20658 use `test`; insert into t1 values( 177 ) +master-bin.000001 20658 Query 1 20749 use `test`; insert into t1 values( 176 ) +master-bin.000001 20749 Query 1 20840 use `test`; insert into t1 values( 175 ) +master-bin.000001 20840 Query 1 20931 use `test`; insert into t1 values( 174 ) +master-bin.000001 20931 Query 1 21022 use `test`; insert into t1 values( 173 ) +master-bin.000001 21022 Query 1 21113 use `test`; insert into t1 values( 172 ) +master-bin.000001 21113 Query 1 21204 use `test`; insert into t1 values( 171 ) +master-bin.000001 21204 Query 1 21295 use `test`; insert into t1 values( 170 ) +master-bin.000001 21295 Query 1 21386 use `test`; insert into t1 values( 169 ) +master-bin.000001 21386 Query 1 21477 use `test`; insert into t1 values( 168 ) +master-bin.000001 21477 Query 1 21568 use `test`; insert into t1 values( 167 ) +master-bin.000001 21568 Query 1 21659 use `test`; insert into t1 values( 166 ) +master-bin.000001 21659 Query 1 21750 use `test`; insert into t1 values( 165 ) +master-bin.000001 21750 Query 1 21841 use `test`; insert into t1 values( 164 ) +master-bin.000001 21841 Query 1 21932 use `test`; insert into t1 values( 163 ) +master-bin.000001 21932 Query 1 22023 use `test`; insert into t1 values( 162 ) +master-bin.000001 22023 Query 1 22114 use `test`; insert into t1 values( 161 ) +master-bin.000001 22114 Query 1 22205 use `test`; insert into t1 values( 160 ) +master-bin.000001 22205 Query 1 22296 use `test`; insert into t1 values( 159 ) +master-bin.000001 22296 Query 1 22387 use `test`; insert into t1 values( 158 ) +master-bin.000001 22387 Query 1 22478 use `test`; insert into t1 values( 157 ) +master-bin.000001 22478 Query 1 22569 use `test`; insert into t1 values( 156 ) +master-bin.000001 22569 Query 1 22660 use `test`; insert into t1 values( 155 ) +master-bin.000001 22660 Query 1 22751 use `test`; insert into t1 values( 154 ) +master-bin.000001 22751 Query 1 22842 use `test`; insert into t1 values( 153 ) +master-bin.000001 22842 Query 1 22933 use `test`; insert into t1 values( 152 ) +master-bin.000001 22933 Query 1 23024 use `test`; insert into t1 values( 151 ) +master-bin.000001 23024 Query 1 23115 use `test`; insert into t1 values( 150 ) +master-bin.000001 23115 Query 1 23206 use `test`; insert into t1 values( 149 ) +master-bin.000001 23206 Query 1 23297 use `test`; insert into t1 values( 148 ) +master-bin.000001 23297 Query 1 23388 use `test`; insert into t1 values( 147 ) +master-bin.000001 23388 Query 1 23479 use `test`; insert into t1 values( 146 ) +master-bin.000001 23479 Query 1 23570 use `test`; insert into t1 values( 145 ) +master-bin.000001 23570 Query 1 23661 use `test`; insert into t1 values( 144 ) +master-bin.000001 23661 Query 1 23752 use `test`; insert into t1 values( 143 ) +master-bin.000001 23752 Query 1 23843 use `test`; insert into t1 values( 142 ) +master-bin.000001 23843 Query 1 23934 use `test`; insert into t1 values( 141 ) +master-bin.000001 23934 Query 1 24025 use `test`; insert into t1 values( 140 ) +master-bin.000001 24025 Query 1 24116 use `test`; insert into t1 values( 139 ) +master-bin.000001 24116 Query 1 24207 use `test`; insert into t1 values( 138 ) +master-bin.000001 24207 Query 1 24298 use `test`; insert into t1 values( 137 ) +master-bin.000001 24298 Query 1 24389 use `test`; insert into t1 values( 136 ) +master-bin.000001 24389 Query 1 24480 use `test`; insert into t1 values( 135 ) +master-bin.000001 24480 Query 1 24571 use `test`; insert into t1 values( 134 ) +master-bin.000001 24571 Query 1 24662 use `test`; insert into t1 values( 133 ) +master-bin.000001 24662 Query 1 24753 use `test`; insert into t1 values( 132 ) +master-bin.000001 24753 Query 1 24844 use `test`; insert into t1 values( 131 ) +master-bin.000001 24844 Query 1 24935 use `test`; insert into t1 values( 130 ) +master-bin.000001 24935 Query 1 25026 use `test`; insert into t1 values( 129 ) +master-bin.000001 25026 Query 1 25117 use `test`; insert into t1 values( 128 ) +master-bin.000001 25117 Query 1 25208 use `test`; insert into t1 values( 127 ) +master-bin.000001 25208 Query 1 25299 use `test`; insert into t1 values( 126 ) +master-bin.000001 25299 Query 1 25390 use `test`; insert into t1 values( 125 ) +master-bin.000001 25390 Query 1 25481 use `test`; insert into t1 values( 124 ) +master-bin.000001 25481 Query 1 25572 use `test`; insert into t1 values( 123 ) +master-bin.000001 25572 Query 1 25663 use `test`; insert into t1 values( 122 ) +master-bin.000001 25663 Query 1 25754 use `test`; insert into t1 values( 121 ) +master-bin.000001 25754 Query 1 25845 use `test`; insert into t1 values( 120 ) +master-bin.000001 25845 Query 1 25936 use `test`; insert into t1 values( 119 ) +master-bin.000001 25936 Query 1 26027 use `test`; insert into t1 values( 118 ) +master-bin.000001 26027 Query 1 26118 use `test`; insert into t1 values( 117 ) +master-bin.000001 26118 Query 1 26209 use `test`; insert into t1 values( 116 ) +master-bin.000001 26209 Query 1 26300 use `test`; insert into t1 values( 115 ) +master-bin.000001 26300 Query 1 26391 use `test`; insert into t1 values( 114 ) +master-bin.000001 26391 Query 1 26482 use `test`; insert into t1 values( 113 ) +master-bin.000001 26482 Query 1 26573 use `test`; insert into t1 values( 112 ) +master-bin.000001 26573 Query 1 26664 use `test`; insert into t1 values( 111 ) +master-bin.000001 26664 Query 1 26755 use `test`; insert into t1 values( 110 ) +master-bin.000001 26755 Query 1 26846 use `test`; insert into t1 values( 109 ) +master-bin.000001 26846 Query 1 26937 use `test`; insert into t1 values( 108 ) +master-bin.000001 26937 Query 1 27028 use `test`; insert into t1 values( 107 ) +master-bin.000001 27028 Query 1 27119 use `test`; insert into t1 values( 106 ) +master-bin.000001 27119 Query 1 27210 use `test`; insert into t1 values( 105 ) +master-bin.000001 27210 Query 1 27301 use `test`; insert into t1 values( 104 ) +master-bin.000001 27301 Query 1 27392 use `test`; insert into t1 values( 103 ) +master-bin.000001 27392 Query 1 27483 use `test`; insert into t1 values( 102 ) +master-bin.000001 27483 Query 1 27574 use `test`; insert into t1 values( 101 ) +master-bin.000001 27574 Query 1 27665 use `test`; insert into t1 values( 100 ) +master-bin.000001 27665 Query 1 27755 use `test`; insert into t1 values( 99 ) +master-bin.000001 27755 Query 1 27845 use `test`; insert into t1 values( 98 ) +master-bin.000001 27845 Query 1 27935 use `test`; insert into t1 values( 97 ) +master-bin.000001 27935 Query 1 28025 use `test`; insert into t1 values( 96 ) +master-bin.000001 28025 Query 1 28115 use `test`; insert into t1 values( 95 ) +master-bin.000001 28115 Query 1 28205 use `test`; insert into t1 values( 94 ) +master-bin.000001 28205 Query 1 28295 use `test`; insert into t1 values( 93 ) +master-bin.000001 28295 Query 1 28385 use `test`; insert into t1 values( 92 ) +master-bin.000001 28385 Query 1 28475 use `test`; insert into t1 values( 91 ) +master-bin.000001 28475 Query 1 28565 use `test`; insert into t1 values( 90 ) +master-bin.000001 28565 Query 1 28655 use `test`; insert into t1 values( 89 ) +master-bin.000001 28655 Query 1 28745 use `test`; insert into t1 values( 88 ) +master-bin.000001 28745 Query 1 28835 use `test`; insert into t1 values( 87 ) +master-bin.000001 28835 Query 1 28925 use `test`; insert into t1 values( 86 ) +master-bin.000001 28925 Query 1 29015 use `test`; insert into t1 values( 85 ) +master-bin.000001 29015 Query 1 29105 use `test`; insert into t1 values( 84 ) +master-bin.000001 29105 Query 1 29195 use `test`; insert into t1 values( 83 ) +master-bin.000001 29195 Query 1 29285 use `test`; insert into t1 values( 82 ) +master-bin.000001 29285 Query 1 29375 use `test`; insert into t1 values( 81 ) +master-bin.000001 29375 Query 1 29465 use `test`; insert into t1 values( 80 ) +master-bin.000001 29465 Query 1 29555 use `test`; insert into t1 values( 79 ) +master-bin.000001 29555 Query 1 29645 use `test`; insert into t1 values( 78 ) +master-bin.000001 29645 Query 1 29735 use `test`; insert into t1 values( 77 ) +master-bin.000001 29735 Query 1 29825 use `test`; insert into t1 values( 76 ) +master-bin.000001 29825 Query 1 29915 use `test`; insert into t1 values( 75 ) +master-bin.000001 29915 Query 1 30005 use `test`; insert into t1 values( 74 ) +master-bin.000001 30005 Query 1 30095 use `test`; insert into t1 values( 73 ) +master-bin.000001 30095 Query 1 30185 use `test`; insert into t1 values( 72 ) +master-bin.000001 30185 Query 1 30275 use `test`; insert into t1 values( 71 ) +master-bin.000001 30275 Query 1 30365 use `test`; insert into t1 values( 70 ) +master-bin.000001 30365 Query 1 30455 use `test`; insert into t1 values( 69 ) +master-bin.000001 30455 Query 1 30545 use `test`; insert into t1 values( 68 ) +master-bin.000001 30545 Query 1 30635 use `test`; insert into t1 values( 67 ) +master-bin.000001 30635 Query 1 30725 use `test`; insert into t1 values( 66 ) +master-bin.000001 30725 Query 1 30815 use `test`; insert into t1 values( 65 ) +master-bin.000001 30815 Query 1 30905 use `test`; insert into t1 values( 64 ) +master-bin.000001 30905 Query 1 30995 use `test`; insert into t1 values( 63 ) +master-bin.000001 30995 Query 1 31085 use `test`; insert into t1 values( 62 ) +master-bin.000001 31085 Query 1 31175 use `test`; insert into t1 values( 61 ) +master-bin.000001 31175 Query 1 31265 use `test`; insert into t1 values( 60 ) +master-bin.000001 31265 Query 1 31355 use `test`; insert into t1 values( 59 ) +master-bin.000001 31355 Query 1 31445 use `test`; insert into t1 values( 58 ) +master-bin.000001 31445 Query 1 31535 use `test`; insert into t1 values( 57 ) +master-bin.000001 31535 Query 1 31625 use `test`; insert into t1 values( 56 ) +master-bin.000001 31625 Query 1 31715 use `test`; insert into t1 values( 55 ) +master-bin.000001 31715 Query 1 31805 use `test`; insert into t1 values( 54 ) +master-bin.000001 31805 Query 1 31895 use `test`; insert into t1 values( 53 ) +master-bin.000001 31895 Query 1 31985 use `test`; insert into t1 values( 52 ) +master-bin.000001 31985 Query 1 32075 use `test`; insert into t1 values( 51 ) +master-bin.000001 32075 Query 1 32165 use `test`; insert into t1 values( 50 ) +master-bin.000001 32165 Query 1 32255 use `test`; insert into t1 values( 49 ) +master-bin.000001 32255 Query 1 32345 use `test`; insert into t1 values( 48 ) +master-bin.000001 32345 Query 1 32435 use `test`; insert into t1 values( 47 ) +master-bin.000001 32435 Query 1 32525 use `test`; insert into t1 values( 46 ) +master-bin.000001 32525 Query 1 32615 use `test`; insert into t1 values( 45 ) +master-bin.000001 32615 Query 1 32705 use `test`; insert into t1 values( 44 ) +master-bin.000001 32705 Query 1 32795 use `test`; insert into t1 values( 43 ) +master-bin.000001 32795 Query 1 32885 use `test`; insert into t1 values( 42 ) +master-bin.000001 32885 Query 1 32975 use `test`; insert into t1 values( 41 ) +master-bin.000001 32975 Query 1 33065 use `test`; insert into t1 values( 40 ) +master-bin.000001 33065 Query 1 33155 use `test`; insert into t1 values( 39 ) +master-bin.000001 33155 Query 1 33245 use `test`; insert into t1 values( 38 ) +master-bin.000001 33245 Query 1 33335 use `test`; insert into t1 values( 37 ) +master-bin.000001 33335 Query 1 33425 use `test`; insert into t1 values( 36 ) +master-bin.000001 33425 Query 1 33515 use `test`; insert into t1 values( 35 ) +master-bin.000001 33515 Query 1 33605 use `test`; insert into t1 values( 34 ) +master-bin.000001 33605 Query 1 33695 use `test`; insert into t1 values( 33 ) +master-bin.000001 33695 Query 1 33785 use `test`; insert into t1 values( 32 ) +master-bin.000001 33785 Query 1 33875 use `test`; insert into t1 values( 31 ) +master-bin.000001 33875 Query 1 33965 use `test`; insert into t1 values( 30 ) +master-bin.000001 33965 Query 1 34055 use `test`; insert into t1 values( 29 ) +master-bin.000001 34055 Query 1 34145 use `test`; insert into t1 values( 28 ) +master-bin.000001 34145 Query 1 34235 use `test`; insert into t1 values( 27 ) +master-bin.000001 34235 Query 1 34325 use `test`; insert into t1 values( 26 ) +master-bin.000001 34325 Query 1 34415 use `test`; insert into t1 values( 25 ) +master-bin.000001 34415 Query 1 34505 use `test`; insert into t1 values( 24 ) +master-bin.000001 34505 Query 1 34595 use `test`; insert into t1 values( 23 ) +master-bin.000001 34595 Query 1 34685 use `test`; insert into t1 values( 22 ) +master-bin.000001 34685 Query 1 34775 use `test`; insert into t1 values( 21 ) +master-bin.000001 34775 Query 1 34865 use `test`; insert into t1 values( 20 ) +master-bin.000001 34865 Query 1 34955 use `test`; insert into t1 values( 19 ) +master-bin.000001 34955 Query 1 35045 use `test`; insert into t1 values( 18 ) +master-bin.000001 35045 Query 1 35135 use `test`; insert into t1 values( 17 ) +master-bin.000001 35135 Query 1 35225 use `test`; insert into t1 values( 16 ) +master-bin.000001 35225 Query 1 35315 use `test`; insert into t1 values( 15 ) +master-bin.000001 35315 Query 1 35405 use `test`; insert into t1 values( 14 ) +master-bin.000001 35405 Query 1 35495 use `test`; insert into t1 values( 13 ) +master-bin.000001 35495 Query 1 35585 use `test`; insert into t1 values( 12 ) +master-bin.000001 35585 Query 1 35675 use `test`; insert into t1 values( 11 ) +master-bin.000001 35675 Query 1 35765 use `test`; insert into t1 values( 10 ) +master-bin.000001 35765 Query 1 35854 use `test`; insert into t1 values( 9 ) +master-bin.000001 35854 Query 1 35943 use `test`; insert into t1 values( 8 ) +master-bin.000001 35943 Query 1 36032 use `test`; insert into t1 values( 7 ) +master-bin.000001 36032 Query 1 36121 use `test`; insert into t1 values( 6 ) +master-bin.000001 36121 Query 1 36210 use `test`; insert into t1 values( 5 ) +master-bin.000001 36210 Query 1 36299 use `test`; insert into t1 values( 4 ) +master-bin.000001 36299 Query 1 36388 use `test`; insert into t1 values( 3 ) +master-bin.000001 36388 Query 1 36477 use `test`; insert into t1 values( 2 ) +master-bin.000001 36477 Query 1 36566 use `test`; insert into t1 values( 1 ) +master-bin.000001 36566 Xid 1 36593 COMMIT /* xid=196 */ +master-bin.000001 36593 Rotate 1 36637 master-bin.000002;pos=4 +drop table t1; +set global binlog_cache_size=@bcs; +set session autocommit = @ac; End of 5.0 tests reset master; create table t1 (id tinyint auto_increment primary key); diff --git a/mysql-test/r/rpl_row_create_table.result b/mysql-test/r/rpl_row_create_table.result index e76ce5b962d..f22881bd4a9 100644 --- a/mysql-test/r/rpl_row_create_table.result +++ b/mysql-test/r/rpl_row_create_table.result @@ -279,25 +279,25 @@ Log_name Pos Event_type Server_id End_log_pos Info # 192 Table_map # 231 table_id: # (test.t1) # 231 Write_rows # 275 table_id: # flags: STMT_END_F # 275 Query # 343 use `test`; BEGIN -# 343 Query # 125 use `test`; CREATE TABLE `t2` ( +# 343 Query # 468 use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 468 Table_map # 164 table_id: # (test.t2) -# 507 Write_rows # 208 table_id: # flags: STMT_END_F +# 468 Table_map # 507 table_id: # (test.t2) +# 507 Write_rows # 551 table_id: # flags: STMT_END_F # 551 Xid # 578 COMMIT /* XID */ # 578 Query # 646 use `test`; BEGIN -# 646 Query # 125 use `test`; CREATE TABLE `t3` ( +# 646 Query # 771 use `test`; CREATE TABLE `t3` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 771 Table_map # 164 table_id: # (test.t3) -# 810 Write_rows # 208 table_id: # flags: STMT_END_F +# 771 Table_map # 810 table_id: # (test.t3) +# 810 Write_rows # 854 table_id: # flags: STMT_END_F # 854 Xid # 881 COMMIT /* XID */ # 881 Query # 949 use `test`; BEGIN -# 949 Query # 125 use `test`; CREATE TABLE `t4` ( +# 949 Query # 1074 use `test`; CREATE TABLE `t4` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 1074 Table_map # 164 table_id: # (test.t4) -# 1113 Write_rows # 208 table_id: # flags: STMT_END_F +# 1074 Table_map # 1113 table_id: # (test.t4) +# 1113 Write_rows # 1157 table_id: # flags: STMT_END_F # 1157 Xid # 1184 COMMIT /* XID */ # 1184 Table_map # 1223 table_id: # (test.t1) # 1223 Write_rows # 1267 table_id: # flags: STMT_END_F @@ -371,10 +371,10 @@ Log_name Pos Event_type Server_id End_log_pos Info # 231 Write_rows # 275 table_id: # flags: STMT_END_F # 275 Query # 375 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB # 375 Query # 443 use `test`; BEGIN -# 443 Table_map # 39 table_id: # (test.t2) -# 482 Write_rows # 83 table_id: # flags: STMT_END_F -# 526 Table_map # 122 table_id: # (test.t2) -# 565 Write_rows # 161 table_id: # flags: STMT_END_F +# 443 Table_map # 482 table_id: # (test.t2) +# 482 Write_rows # 526 table_id: # flags: STMT_END_F +# 526 Table_map # 565 table_id: # (test.t2) +# 565 Write_rows # 604 table_id: # flags: STMT_END_F # 604 Xid # 631 COMMIT /* XID */ SELECT * FROM t2 ORDER BY a; a @@ -396,7 +396,7 @@ SELECT * FROM t2 ORDER BY a; a SHOW BINLOG EVENTS FROM 631; Log_name Pos Event_type Server_id End_log_pos Info -# 631 Query # 80 use `test`; TRUNCATE TABLE t2 +# 631 Query # 711 use `test`; TRUNCATE TABLE t2 # 711 Xid # 738 COMMIT /* XID */ SELECT * FROM t2 ORDER BY a; a -- cgit v1.2.1 From 1cd1f7d06fdd6099d8e3378aed1f42bdfbd8c415 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Jul 2007 11:56:01 +0200 Subject: Post.merge fixes Fixed warnings Fixed error numbers mysql-test/extra/rpl_tests/rpl_loaddata.test: Fixed warnings mysql-test/r/ndb_single_user.result: Post-merge fixes Changed error numbers mysql-test/t/bigint.test: Fixed warnings mysql-test/t/ndb_single_user.test: Post-merge fixes Changed error numbers --- mysql-test/extra/rpl_tests/rpl_loaddata.test | 4 ++-- mysql-test/r/ndb_single_user.result | 10 +++++----- mysql-test/t/bigint.test | 2 +- mysql-test/t/ndb_single_user.test | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test index acd8fd48234..bb6afd73034 100644 --- a/mysql-test/extra/rpl_tests/rpl_loaddata.test +++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test @@ -164,8 +164,8 @@ CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; --error ER_DUP_ENTRY LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1; ---disable warnings +--disable_warnings DROP TABLE IF EXISTS t1; ---enable warnings +--enable_warnings # End of 4.1 tests diff --git a/mysql-test/r/ndb_single_user.result b/mysql-test/r/ndb_single_user.result index 54ae99b2f4f..f916422a509 100644 --- a/mysql-test/r/ndb_single_user.result +++ b/mysql-test/r/ndb_single_user.result @@ -11,7 +11,7 @@ ERROR HY000: Failed to create LOGFILE GROUP show warnings; Level Code Message Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1516 Failed to create LOGFILE GROUP +Error 1525 Failed to create LOGFILE GROUP create table t1 (a int key, b int unique, c int) engine ndb; CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' @@ -27,14 +27,14 @@ ERROR HY000: Failed to create TABLESPACE show warnings; Level Code Message Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1516 Failed to create TABLESPACE +Error 1525 Failed to create TABLESPACE DROP LOGFILE GROUP lg1 ENGINE =NDB; ERROR HY000: Failed to drop LOGFILE GROUP show warnings; Level Code Message Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1517 Failed to drop LOGFILE GROUP +Error 1526 Failed to drop LOGFILE GROUP CREATE TABLESPACE ts1 ADD DATAFILE 'datafile.dat' USE LOGFILE GROUP lg1 @@ -47,7 +47,7 @@ ERROR HY000: Failed to alter: DROP DATAFILE show warnings; Level Code Message Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1521 Failed to alter: DROP DATAFILE +Error 1530 Failed to alter: DROP DATAFILE ALTER TABLESPACE ts1 DROP DATAFILE 'datafile.dat' ENGINE NDB; @@ -57,7 +57,7 @@ ERROR HY000: Failed to drop TABLESPACE show warnings; Level Code Message Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB -Error 1517 Failed to drop TABLESPACE +Error 1526 Failed to drop TABLESPACE DROP TABLESPACE ts1 ENGINE NDB; DROP LOGFILE GROUP lg1 diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index 9b4fc3f39b0..da10f4efa61 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -307,7 +307,7 @@ select -(9223372036854775808); select -((9223372036854775808)); select -(-(9223372036854775808)); --disable_metadata ---endble_ps_protocol +--enable_ps_protocol select --9223372036854775808, ---9223372036854775808, ----9223372036854775808; select -(-9223372036854775808), -(-(-9223372036854775808)); diff --git a/mysql-test/t/ndb_single_user.test b/mysql-test/t/ndb_single_user.test index 5d2ee0a3a8d..eb7ebe8a971 100644 --- a/mysql-test/t/ndb_single_user.test +++ b/mysql-test/t/ndb_single_user.test @@ -27,7 +27,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; create table t1 (a int key, b int unique, c int) engine ndb; # Bug #27712 Single user mode. Creating logfile group and tablespace is allowed # - before bug fix these would succeed ---error 1516 +--error ER_CREATE_FILEGROUP_FAILED CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' INITIAL_SIZE 16M -- cgit v1.2.1 From 07dcc80023674120eb84d41a37dd748da8e00de7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Jul 2007 15:33:28 -0700 Subject: Fixed bug #25798. This bug may manifest itself not only with the queries for which the index-merge access method is chosen. It also may display itself for queries with DISTINCT. The bug was in how the Unique::get method used the merge_buffers function. To compare elements in the the queue employed by merge_buffers() it must use the buffpek_compare function rather than the function for binary comparison. mysql-test/r/innodb_mysql.result: Added a test case for bug #25798. mysql-test/t/innodb_mysql.test: Added a test case for bug #25798. sql/filesort.cc: Fixed bug #25798. The function merge_buffers() when called from the Uniques::get method must use function buffpek_compare to compare elements in the queue it employs. The pointer to buffpek_compare and the info for the function that compares sorted records are passed to merge_buffers through certain designated fields of the SORTPARAM structure. sql/sql_sort.h: Fixed bug #25798. Added fields to the SORTPARAM structure to be used in the function merge_buffers when called by the Uniques::get method. sql/uniques.cc: Fixed bug 25798. The function merge_buffers() when called from the Uniques::get method must use function buffpek_compare to compare elements in the queue it employes. --- mysql-test/r/innodb_mysql.result | 51 +++++++++++++++++++++++++++++++++++++ mysql-test/t/innodb_mysql.test | 54 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 11c7c2aedc9..df1c2165c45 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -676,4 +676,55 @@ INSERT INTO t1 VALUES (1); switch to connection default SET AUTOCOMMIT=default; DROP TABLE t1,t2; +CREATE TABLE t1 ( +id int NOT NULL auto_increment PRIMARY KEY, +b int NOT NULL, +c datetime NOT NULL, +INDEX idx_b(b), +INDEX idx_c(c) +) ENGINE=InnoDB; +CREATE TABLE t2 ( +b int NOT NULL auto_increment PRIMARY KEY, +c datetime NOT NULL +) ENGINE= MyISAM; +INSERT INTO t2(c) VALUES ('2007-01-01'); +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t1(b,c) SELECT b,c FROM t2; +UPDATE t2 SET c='2007-01-02'; +INSERT INTO t1(b,c) SELECT b,c FROM t2; +UPDATE t2 SET c='2007-01-03'; +INSERT INTO t1(b,c) SELECT b,c FROM t2; +set @@sort_buffer_size=8192; +SELECT COUNT(*) FROM t1; +COUNT(*) +3072 +EXPLAIN +SELECT COUNT(*) FROM t1 +WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL idx_b,idx_c NULL NULL NULL 3263 Using where +SELECT COUNT(*) FROM t1 +WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; +COUNT(*) +3072 +EXPLAIN +SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) +WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge idx_b,idx_c idx_c,idx_b 8,4 NULL 3262 Using sort_union(idx_c,idx_b); Using where +SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) +WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; +COUNT(*) +3072 +set @@sort_buffer_size=default; +DROP TABLE t1,t2; End of 5.0 tests diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index 25ba9a258ff..eb995a748a5 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -670,5 +670,59 @@ DISCONNECT c1; DISCONNECT c2; DROP TABLE t1,t2; +# +# Bug #25798: a query with forced index merge returns wrong result +# + +CREATE TABLE t1 ( + id int NOT NULL auto_increment PRIMARY KEY, + b int NOT NULL, + c datetime NOT NULL, + INDEX idx_b(b), + INDEX idx_c(c) +) ENGINE=InnoDB; + +CREATE TABLE t2 ( + b int NOT NULL auto_increment PRIMARY KEY, + c datetime NOT NULL +) ENGINE= MyISAM; + +INSERT INTO t2(c) VALUES ('2007-01-01'); +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; +INSERT INTO t2(c) SELECT c FROM t2; + +INSERT INTO t1(b,c) SELECT b,c FROM t2; +UPDATE t2 SET c='2007-01-02'; +INSERT INTO t1(b,c) SELECT b,c FROM t2; +UPDATE t2 SET c='2007-01-03'; +INSERT INTO t1(b,c) SELECT b,c FROM t2; + +set @@sort_buffer_size=8192; + +SELECT COUNT(*) FROM t1; + +EXPLAIN +SELECT COUNT(*) FROM t1 + WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; +SELECT COUNT(*) FROM t1 + WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; + +EXPLAIN +SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) + WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; +SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) + WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; + +set @@sort_buffer_size=default; + +DROP TABLE t1,t2; --echo End of 5.0 tests -- cgit v1.2.1 From 68e1f851ed1d41923da17b5bfafdd2ad4d94f24a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Jul 2007 07:13:40 +0200 Subject: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB minor fixes to appease pushbuild. mysql-test/r/binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB make test portable so it will work on servers with funny names. mysql-test/t/binlog.test: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB make test portable so it will work on servers with funny names. sql/log.cc: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB change type to uchar * so it's the same as in 5.1. --- mysql-test/r/binlog.result | 4 ++-- mysql-test/t/binlog.test | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/binlog.result b/mysql-test/r/binlog.result index 77b015a4688..aa5c6e88d65 100644 --- a/mysql-test/r/binlog.result +++ b/mysql-test/r/binlog.result @@ -256,7 +256,7 @@ reset master; create table t1 (a int) engine=innodb; show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 98 Server ver: 5.0.46-debug-log, Binlog ver: 4 +master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 master-bin.000001 98 Query 1 198 use `test`; create table t1 (a int) engine=innodb master-bin.000001 198 Query 1 266 use `test`; BEGIN master-bin.000001 266 Query 1 357 use `test`; insert into t1 values( 400 ) @@ -659,7 +659,7 @@ master-bin.000001 36202 Query 1 36291 use `test`; insert into t1 values( 4 ) master-bin.000001 36291 Query 1 36380 use `test`; insert into t1 values( 3 ) master-bin.000001 36380 Query 1 36469 use `test`; insert into t1 values( 2 ) master-bin.000001 36469 Query 1 36558 use `test`; insert into t1 values( 1 ) -master-bin.000001 36558 Xid 1 36585 COMMIT /* xid=186 */ +master-bin.000001 36558 Xid 1 36585 COMMIT /* XID */ master-bin.000001 36585 Rotate 1 36629 master-bin.000002;pos=4 drop table t1; set global binlog_cache_size=@bcs; diff --git a/mysql-test/t/binlog.test b/mysql-test/t/binlog.test index d5479a45226..b9996a2b380 100644 --- a/mysql-test/t/binlog.test +++ b/mysql-test/t/binlog.test @@ -159,6 +159,7 @@ while ($1) commit; enable_query_log; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ show binlog events from 0; drop table t1; -- cgit v1.2.1 From 1063bf228a1fb5679ba7db762b62fa99efd941fa Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Jul 2007 07:34:42 +0200 Subject: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB minor fixes to appease pushbuild. --- Merge sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 mysql-test/extra/binlog_tests/binlog.test: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB make test portable so it will work on servers with funny names. mysql-test/suite/binlog/r/binlog_row_binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB make test portable so it will work on servers with funny names. mysql-test/suite/binlog/r/binlog_stm_binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB make test portable so it will work on servers with funny names. --- mysql-test/extra/binlog_tests/binlog.test | 1 + mysql-test/suite/binlog/r/binlog_row_binlog.result | 1604 ++++++++++---------- mysql-test/suite/binlog/r/binlog_stm_binlog.result | 4 +- 3 files changed, 805 insertions(+), 804 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test index 0a2b84e055b..57008b6af3c 100644 --- a/mysql-test/extra/binlog_tests/binlog.test +++ b/mysql-test/extra/binlog_tests/binlog.test @@ -161,6 +161,7 @@ while ($1) commit; enable_query_log; +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ show binlog events from 0; drop table t1; diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index 89618d37cc1..37fe49e79dc 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -373,810 +373,810 @@ reset master; create table t1 (a int) engine=innodb; show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: 5.1.21-beta-debug-log, Binlog ver: 4 +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb master-bin.000001 206 Query 1 274 use `test`; BEGIN -master-bin.000001 274 Table_map 1 313 table_id: 25 (test.t1) -master-bin.000001 313 Write_rows 1 347 table_id: 25 flags: STMT_END_F -master-bin.000001 347 Table_map 1 386 table_id: 25 (test.t1) -master-bin.000001 386 Write_rows 1 420 table_id: 25 flags: STMT_END_F -master-bin.000001 420 Table_map 1 459 table_id: 25 (test.t1) -master-bin.000001 459 Write_rows 1 493 table_id: 25 flags: STMT_END_F -master-bin.000001 493 Table_map 1 532 table_id: 25 (test.t1) -master-bin.000001 532 Write_rows 1 566 table_id: 25 flags: STMT_END_F -master-bin.000001 566 Table_map 1 605 table_id: 25 (test.t1) -master-bin.000001 605 Write_rows 1 639 table_id: 25 flags: STMT_END_F -master-bin.000001 639 Table_map 1 678 table_id: 25 (test.t1) -master-bin.000001 678 Write_rows 1 712 table_id: 25 flags: STMT_END_F -master-bin.000001 712 Table_map 1 751 table_id: 25 (test.t1) -master-bin.000001 751 Write_rows 1 785 table_id: 25 flags: STMT_END_F -master-bin.000001 785 Table_map 1 824 table_id: 25 (test.t1) -master-bin.000001 824 Write_rows 1 858 table_id: 25 flags: STMT_END_F -master-bin.000001 858 Table_map 1 897 table_id: 25 (test.t1) -master-bin.000001 897 Write_rows 1 931 table_id: 25 flags: STMT_END_F -master-bin.000001 931 Table_map 1 970 table_id: 25 (test.t1) -master-bin.000001 970 Write_rows 1 1004 table_id: 25 flags: STMT_END_F -master-bin.000001 1004 Table_map 1 1043 table_id: 25 (test.t1) -master-bin.000001 1043 Write_rows 1 1077 table_id: 25 flags: STMT_END_F -master-bin.000001 1077 Table_map 1 1116 table_id: 25 (test.t1) -master-bin.000001 1116 Write_rows 1 1150 table_id: 25 flags: STMT_END_F -master-bin.000001 1150 Table_map 1 1189 table_id: 25 (test.t1) -master-bin.000001 1189 Write_rows 1 1223 table_id: 25 flags: STMT_END_F -master-bin.000001 1223 Table_map 1 1262 table_id: 25 (test.t1) -master-bin.000001 1262 Write_rows 1 1296 table_id: 25 flags: STMT_END_F -master-bin.000001 1296 Table_map 1 1335 table_id: 25 (test.t1) -master-bin.000001 1335 Write_rows 1 1369 table_id: 25 flags: STMT_END_F -master-bin.000001 1369 Table_map 1 1408 table_id: 25 (test.t1) -master-bin.000001 1408 Write_rows 1 1442 table_id: 25 flags: STMT_END_F -master-bin.000001 1442 Table_map 1 1481 table_id: 25 (test.t1) -master-bin.000001 1481 Write_rows 1 1515 table_id: 25 flags: STMT_END_F -master-bin.000001 1515 Table_map 1 1554 table_id: 25 (test.t1) -master-bin.000001 1554 Write_rows 1 1588 table_id: 25 flags: STMT_END_F -master-bin.000001 1588 Table_map 1 1627 table_id: 25 (test.t1) -master-bin.000001 1627 Write_rows 1 1661 table_id: 25 flags: STMT_END_F -master-bin.000001 1661 Table_map 1 1700 table_id: 25 (test.t1) -master-bin.000001 1700 Write_rows 1 1734 table_id: 25 flags: STMT_END_F -master-bin.000001 1734 Table_map 1 1773 table_id: 25 (test.t1) -master-bin.000001 1773 Write_rows 1 1807 table_id: 25 flags: STMT_END_F -master-bin.000001 1807 Table_map 1 1846 table_id: 25 (test.t1) -master-bin.000001 1846 Write_rows 1 1880 table_id: 25 flags: STMT_END_F -master-bin.000001 1880 Table_map 1 1919 table_id: 25 (test.t1) -master-bin.000001 1919 Write_rows 1 1953 table_id: 25 flags: STMT_END_F -master-bin.000001 1953 Table_map 1 1992 table_id: 25 (test.t1) -master-bin.000001 1992 Write_rows 1 2026 table_id: 25 flags: STMT_END_F -master-bin.000001 2026 Table_map 1 2065 table_id: 25 (test.t1) -master-bin.000001 2065 Write_rows 1 2099 table_id: 25 flags: STMT_END_F -master-bin.000001 2099 Table_map 1 2138 table_id: 25 (test.t1) -master-bin.000001 2138 Write_rows 1 2172 table_id: 25 flags: STMT_END_F -master-bin.000001 2172 Table_map 1 2211 table_id: 25 (test.t1) -master-bin.000001 2211 Write_rows 1 2245 table_id: 25 flags: STMT_END_F -master-bin.000001 2245 Table_map 1 2284 table_id: 25 (test.t1) -master-bin.000001 2284 Write_rows 1 2318 table_id: 25 flags: STMT_END_F -master-bin.000001 2318 Table_map 1 2357 table_id: 25 (test.t1) -master-bin.000001 2357 Write_rows 1 2391 table_id: 25 flags: STMT_END_F -master-bin.000001 2391 Table_map 1 2430 table_id: 25 (test.t1) -master-bin.000001 2430 Write_rows 1 2464 table_id: 25 flags: STMT_END_F -master-bin.000001 2464 Table_map 1 2503 table_id: 25 (test.t1) -master-bin.000001 2503 Write_rows 1 2537 table_id: 25 flags: STMT_END_F -master-bin.000001 2537 Table_map 1 2576 table_id: 25 (test.t1) -master-bin.000001 2576 Write_rows 1 2610 table_id: 25 flags: STMT_END_F -master-bin.000001 2610 Table_map 1 2649 table_id: 25 (test.t1) -master-bin.000001 2649 Write_rows 1 2683 table_id: 25 flags: STMT_END_F -master-bin.000001 2683 Table_map 1 2722 table_id: 25 (test.t1) -master-bin.000001 2722 Write_rows 1 2756 table_id: 25 flags: STMT_END_F -master-bin.000001 2756 Table_map 1 2795 table_id: 25 (test.t1) -master-bin.000001 2795 Write_rows 1 2829 table_id: 25 flags: STMT_END_F -master-bin.000001 2829 Table_map 1 2868 table_id: 25 (test.t1) -master-bin.000001 2868 Write_rows 1 2902 table_id: 25 flags: STMT_END_F -master-bin.000001 2902 Table_map 1 2941 table_id: 25 (test.t1) -master-bin.000001 2941 Write_rows 1 2975 table_id: 25 flags: STMT_END_F -master-bin.000001 2975 Table_map 1 3014 table_id: 25 (test.t1) -master-bin.000001 3014 Write_rows 1 3048 table_id: 25 flags: STMT_END_F -master-bin.000001 3048 Table_map 1 3087 table_id: 25 (test.t1) -master-bin.000001 3087 Write_rows 1 3121 table_id: 25 flags: STMT_END_F -master-bin.000001 3121 Table_map 1 3160 table_id: 25 (test.t1) -master-bin.000001 3160 Write_rows 1 3194 table_id: 25 flags: STMT_END_F -master-bin.000001 3194 Table_map 1 3233 table_id: 25 (test.t1) -master-bin.000001 3233 Write_rows 1 3267 table_id: 25 flags: STMT_END_F -master-bin.000001 3267 Table_map 1 3306 table_id: 25 (test.t1) -master-bin.000001 3306 Write_rows 1 3340 table_id: 25 flags: STMT_END_F -master-bin.000001 3340 Table_map 1 3379 table_id: 25 (test.t1) -master-bin.000001 3379 Write_rows 1 3413 table_id: 25 flags: STMT_END_F -master-bin.000001 3413 Table_map 1 3452 table_id: 25 (test.t1) -master-bin.000001 3452 Write_rows 1 3486 table_id: 25 flags: STMT_END_F -master-bin.000001 3486 Table_map 1 3525 table_id: 25 (test.t1) -master-bin.000001 3525 Write_rows 1 3559 table_id: 25 flags: STMT_END_F -master-bin.000001 3559 Table_map 1 3598 table_id: 25 (test.t1) -master-bin.000001 3598 Write_rows 1 3632 table_id: 25 flags: STMT_END_F -master-bin.000001 3632 Table_map 1 3671 table_id: 25 (test.t1) -master-bin.000001 3671 Write_rows 1 3705 table_id: 25 flags: STMT_END_F -master-bin.000001 3705 Table_map 1 3744 table_id: 25 (test.t1) -master-bin.000001 3744 Write_rows 1 3778 table_id: 25 flags: STMT_END_F -master-bin.000001 3778 Table_map 1 3817 table_id: 25 (test.t1) -master-bin.000001 3817 Write_rows 1 3851 table_id: 25 flags: STMT_END_F -master-bin.000001 3851 Table_map 1 3890 table_id: 25 (test.t1) -master-bin.000001 3890 Write_rows 1 3924 table_id: 25 flags: STMT_END_F -master-bin.000001 3924 Table_map 1 3963 table_id: 25 (test.t1) -master-bin.000001 3963 Write_rows 1 3997 table_id: 25 flags: STMT_END_F -master-bin.000001 3997 Table_map 1 4036 table_id: 25 (test.t1) -master-bin.000001 4036 Write_rows 1 4070 table_id: 25 flags: STMT_END_F -master-bin.000001 4070 Table_map 1 4109 table_id: 25 (test.t1) -master-bin.000001 4109 Write_rows 1 4143 table_id: 25 flags: STMT_END_F -master-bin.000001 4143 Table_map 1 4182 table_id: 25 (test.t1) -master-bin.000001 4182 Write_rows 1 4216 table_id: 25 flags: STMT_END_F -master-bin.000001 4216 Table_map 1 4255 table_id: 25 (test.t1) -master-bin.000001 4255 Write_rows 1 4289 table_id: 25 flags: STMT_END_F -master-bin.000001 4289 Table_map 1 4328 table_id: 25 (test.t1) -master-bin.000001 4328 Write_rows 1 4362 table_id: 25 flags: STMT_END_F -master-bin.000001 4362 Table_map 1 4401 table_id: 25 (test.t1) -master-bin.000001 4401 Write_rows 1 4435 table_id: 25 flags: STMT_END_F -master-bin.000001 4435 Table_map 1 4474 table_id: 25 (test.t1) -master-bin.000001 4474 Write_rows 1 4508 table_id: 25 flags: STMT_END_F -master-bin.000001 4508 Table_map 1 4547 table_id: 25 (test.t1) -master-bin.000001 4547 Write_rows 1 4581 table_id: 25 flags: STMT_END_F -master-bin.000001 4581 Table_map 1 4620 table_id: 25 (test.t1) -master-bin.000001 4620 Write_rows 1 4654 table_id: 25 flags: STMT_END_F -master-bin.000001 4654 Table_map 1 4693 table_id: 25 (test.t1) -master-bin.000001 4693 Write_rows 1 4727 table_id: 25 flags: STMT_END_F -master-bin.000001 4727 Table_map 1 4766 table_id: 25 (test.t1) -master-bin.000001 4766 Write_rows 1 4800 table_id: 25 flags: STMT_END_F -master-bin.000001 4800 Table_map 1 4839 table_id: 25 (test.t1) -master-bin.000001 4839 Write_rows 1 4873 table_id: 25 flags: STMT_END_F -master-bin.000001 4873 Table_map 1 4912 table_id: 25 (test.t1) -master-bin.000001 4912 Write_rows 1 4946 table_id: 25 flags: STMT_END_F -master-bin.000001 4946 Table_map 1 4985 table_id: 25 (test.t1) -master-bin.000001 4985 Write_rows 1 5019 table_id: 25 flags: STMT_END_F -master-bin.000001 5019 Table_map 1 5058 table_id: 25 (test.t1) -master-bin.000001 5058 Write_rows 1 5092 table_id: 25 flags: STMT_END_F -master-bin.000001 5092 Table_map 1 5131 table_id: 25 (test.t1) -master-bin.000001 5131 Write_rows 1 5165 table_id: 25 flags: STMT_END_F -master-bin.000001 5165 Table_map 1 5204 table_id: 25 (test.t1) -master-bin.000001 5204 Write_rows 1 5238 table_id: 25 flags: STMT_END_F -master-bin.000001 5238 Table_map 1 5277 table_id: 25 (test.t1) -master-bin.000001 5277 Write_rows 1 5311 table_id: 25 flags: STMT_END_F -master-bin.000001 5311 Table_map 1 5350 table_id: 25 (test.t1) -master-bin.000001 5350 Write_rows 1 5384 table_id: 25 flags: STMT_END_F -master-bin.000001 5384 Table_map 1 5423 table_id: 25 (test.t1) -master-bin.000001 5423 Write_rows 1 5457 table_id: 25 flags: STMT_END_F -master-bin.000001 5457 Table_map 1 5496 table_id: 25 (test.t1) -master-bin.000001 5496 Write_rows 1 5530 table_id: 25 flags: STMT_END_F -master-bin.000001 5530 Table_map 1 5569 table_id: 25 (test.t1) -master-bin.000001 5569 Write_rows 1 5603 table_id: 25 flags: STMT_END_F -master-bin.000001 5603 Table_map 1 5642 table_id: 25 (test.t1) -master-bin.000001 5642 Write_rows 1 5676 table_id: 25 flags: STMT_END_F -master-bin.000001 5676 Table_map 1 5715 table_id: 25 (test.t1) -master-bin.000001 5715 Write_rows 1 5749 table_id: 25 flags: STMT_END_F -master-bin.000001 5749 Table_map 1 5788 table_id: 25 (test.t1) -master-bin.000001 5788 Write_rows 1 5822 table_id: 25 flags: STMT_END_F -master-bin.000001 5822 Table_map 1 5861 table_id: 25 (test.t1) -master-bin.000001 5861 Write_rows 1 5895 table_id: 25 flags: STMT_END_F -master-bin.000001 5895 Table_map 1 5934 table_id: 25 (test.t1) -master-bin.000001 5934 Write_rows 1 5968 table_id: 25 flags: STMT_END_F -master-bin.000001 5968 Table_map 1 6007 table_id: 25 (test.t1) -master-bin.000001 6007 Write_rows 1 6041 table_id: 25 flags: STMT_END_F -master-bin.000001 6041 Table_map 1 6080 table_id: 25 (test.t1) -master-bin.000001 6080 Write_rows 1 6114 table_id: 25 flags: STMT_END_F -master-bin.000001 6114 Table_map 1 6153 table_id: 25 (test.t1) -master-bin.000001 6153 Write_rows 1 6187 table_id: 25 flags: STMT_END_F -master-bin.000001 6187 Table_map 1 6226 table_id: 25 (test.t1) -master-bin.000001 6226 Write_rows 1 6260 table_id: 25 flags: STMT_END_F -master-bin.000001 6260 Table_map 1 6299 table_id: 25 (test.t1) -master-bin.000001 6299 Write_rows 1 6333 table_id: 25 flags: STMT_END_F -master-bin.000001 6333 Table_map 1 6372 table_id: 25 (test.t1) -master-bin.000001 6372 Write_rows 1 6406 table_id: 25 flags: STMT_END_F -master-bin.000001 6406 Table_map 1 6445 table_id: 25 (test.t1) -master-bin.000001 6445 Write_rows 1 6479 table_id: 25 flags: STMT_END_F -master-bin.000001 6479 Table_map 1 6518 table_id: 25 (test.t1) -master-bin.000001 6518 Write_rows 1 6552 table_id: 25 flags: STMT_END_F -master-bin.000001 6552 Table_map 1 6591 table_id: 25 (test.t1) -master-bin.000001 6591 Write_rows 1 6625 table_id: 25 flags: STMT_END_F -master-bin.000001 6625 Table_map 1 6664 table_id: 25 (test.t1) -master-bin.000001 6664 Write_rows 1 6698 table_id: 25 flags: STMT_END_F -master-bin.000001 6698 Table_map 1 6737 table_id: 25 (test.t1) -master-bin.000001 6737 Write_rows 1 6771 table_id: 25 flags: STMT_END_F -master-bin.000001 6771 Table_map 1 6810 table_id: 25 (test.t1) -master-bin.000001 6810 Write_rows 1 6844 table_id: 25 flags: STMT_END_F -master-bin.000001 6844 Table_map 1 6883 table_id: 25 (test.t1) -master-bin.000001 6883 Write_rows 1 6917 table_id: 25 flags: STMT_END_F -master-bin.000001 6917 Table_map 1 6956 table_id: 25 (test.t1) -master-bin.000001 6956 Write_rows 1 6990 table_id: 25 flags: STMT_END_F -master-bin.000001 6990 Table_map 1 7029 table_id: 25 (test.t1) -master-bin.000001 7029 Write_rows 1 7063 table_id: 25 flags: STMT_END_F -master-bin.000001 7063 Table_map 1 7102 table_id: 25 (test.t1) -master-bin.000001 7102 Write_rows 1 7136 table_id: 25 flags: STMT_END_F -master-bin.000001 7136 Table_map 1 7175 table_id: 25 (test.t1) -master-bin.000001 7175 Write_rows 1 7209 table_id: 25 flags: STMT_END_F -master-bin.000001 7209 Table_map 1 7248 table_id: 25 (test.t1) -master-bin.000001 7248 Write_rows 1 7282 table_id: 25 flags: STMT_END_F -master-bin.000001 7282 Table_map 1 7321 table_id: 25 (test.t1) -master-bin.000001 7321 Write_rows 1 7355 table_id: 25 flags: STMT_END_F -master-bin.000001 7355 Table_map 1 7394 table_id: 25 (test.t1) -master-bin.000001 7394 Write_rows 1 7428 table_id: 25 flags: STMT_END_F -master-bin.000001 7428 Table_map 1 7467 table_id: 25 (test.t1) -master-bin.000001 7467 Write_rows 1 7501 table_id: 25 flags: STMT_END_F -master-bin.000001 7501 Table_map 1 7540 table_id: 25 (test.t1) -master-bin.000001 7540 Write_rows 1 7574 table_id: 25 flags: STMT_END_F -master-bin.000001 7574 Table_map 1 7613 table_id: 25 (test.t1) -master-bin.000001 7613 Write_rows 1 7647 table_id: 25 flags: STMT_END_F -master-bin.000001 7647 Table_map 1 7686 table_id: 25 (test.t1) -master-bin.000001 7686 Write_rows 1 7720 table_id: 25 flags: STMT_END_F -master-bin.000001 7720 Table_map 1 7759 table_id: 25 (test.t1) -master-bin.000001 7759 Write_rows 1 7793 table_id: 25 flags: STMT_END_F -master-bin.000001 7793 Table_map 1 7832 table_id: 25 (test.t1) -master-bin.000001 7832 Write_rows 1 7866 table_id: 25 flags: STMT_END_F -master-bin.000001 7866 Table_map 1 7905 table_id: 25 (test.t1) -master-bin.000001 7905 Write_rows 1 7939 table_id: 25 flags: STMT_END_F -master-bin.000001 7939 Table_map 1 7978 table_id: 25 (test.t1) -master-bin.000001 7978 Write_rows 1 8012 table_id: 25 flags: STMT_END_F -master-bin.000001 8012 Table_map 1 8051 table_id: 25 (test.t1) -master-bin.000001 8051 Write_rows 1 8085 table_id: 25 flags: STMT_END_F -master-bin.000001 8085 Table_map 1 8124 table_id: 25 (test.t1) -master-bin.000001 8124 Write_rows 1 8158 table_id: 25 flags: STMT_END_F -master-bin.000001 8158 Table_map 1 8197 table_id: 25 (test.t1) -master-bin.000001 8197 Write_rows 1 8231 table_id: 25 flags: STMT_END_F -master-bin.000001 8231 Table_map 1 8270 table_id: 25 (test.t1) -master-bin.000001 8270 Write_rows 1 8304 table_id: 25 flags: STMT_END_F -master-bin.000001 8304 Table_map 1 8343 table_id: 25 (test.t1) -master-bin.000001 8343 Write_rows 1 8377 table_id: 25 flags: STMT_END_F -master-bin.000001 8377 Table_map 1 8416 table_id: 25 (test.t1) -master-bin.000001 8416 Write_rows 1 8450 table_id: 25 flags: STMT_END_F -master-bin.000001 8450 Table_map 1 8489 table_id: 25 (test.t1) -master-bin.000001 8489 Write_rows 1 8523 table_id: 25 flags: STMT_END_F -master-bin.000001 8523 Table_map 1 8562 table_id: 25 (test.t1) -master-bin.000001 8562 Write_rows 1 8596 table_id: 25 flags: STMT_END_F -master-bin.000001 8596 Table_map 1 8635 table_id: 25 (test.t1) -master-bin.000001 8635 Write_rows 1 8669 table_id: 25 flags: STMT_END_F -master-bin.000001 8669 Table_map 1 8708 table_id: 25 (test.t1) -master-bin.000001 8708 Write_rows 1 8742 table_id: 25 flags: STMT_END_F -master-bin.000001 8742 Table_map 1 8781 table_id: 25 (test.t1) -master-bin.000001 8781 Write_rows 1 8815 table_id: 25 flags: STMT_END_F -master-bin.000001 8815 Table_map 1 8854 table_id: 25 (test.t1) -master-bin.000001 8854 Write_rows 1 8888 table_id: 25 flags: STMT_END_F -master-bin.000001 8888 Table_map 1 8927 table_id: 25 (test.t1) -master-bin.000001 8927 Write_rows 1 8961 table_id: 25 flags: STMT_END_F -master-bin.000001 8961 Table_map 1 9000 table_id: 25 (test.t1) -master-bin.000001 9000 Write_rows 1 9034 table_id: 25 flags: STMT_END_F -master-bin.000001 9034 Table_map 1 9073 table_id: 25 (test.t1) -master-bin.000001 9073 Write_rows 1 9107 table_id: 25 flags: STMT_END_F -master-bin.000001 9107 Table_map 1 9146 table_id: 25 (test.t1) -master-bin.000001 9146 Write_rows 1 9180 table_id: 25 flags: STMT_END_F -master-bin.000001 9180 Table_map 1 9219 table_id: 25 (test.t1) -master-bin.000001 9219 Write_rows 1 9253 table_id: 25 flags: STMT_END_F -master-bin.000001 9253 Table_map 1 9292 table_id: 25 (test.t1) -master-bin.000001 9292 Write_rows 1 9326 table_id: 25 flags: STMT_END_F -master-bin.000001 9326 Table_map 1 9365 table_id: 25 (test.t1) -master-bin.000001 9365 Write_rows 1 9399 table_id: 25 flags: STMT_END_F -master-bin.000001 9399 Table_map 1 9438 table_id: 25 (test.t1) -master-bin.000001 9438 Write_rows 1 9472 table_id: 25 flags: STMT_END_F -master-bin.000001 9472 Table_map 1 9511 table_id: 25 (test.t1) -master-bin.000001 9511 Write_rows 1 9545 table_id: 25 flags: STMT_END_F -master-bin.000001 9545 Table_map 1 9584 table_id: 25 (test.t1) -master-bin.000001 9584 Write_rows 1 9618 table_id: 25 flags: STMT_END_F -master-bin.000001 9618 Table_map 1 9657 table_id: 25 (test.t1) -master-bin.000001 9657 Write_rows 1 9691 table_id: 25 flags: STMT_END_F -master-bin.000001 9691 Table_map 1 9730 table_id: 25 (test.t1) -master-bin.000001 9730 Write_rows 1 9764 table_id: 25 flags: STMT_END_F -master-bin.000001 9764 Table_map 1 9803 table_id: 25 (test.t1) -master-bin.000001 9803 Write_rows 1 9837 table_id: 25 flags: STMT_END_F -master-bin.000001 9837 Table_map 1 9876 table_id: 25 (test.t1) -master-bin.000001 9876 Write_rows 1 9910 table_id: 25 flags: STMT_END_F -master-bin.000001 9910 Table_map 1 9949 table_id: 25 (test.t1) -master-bin.000001 9949 Write_rows 1 9983 table_id: 25 flags: STMT_END_F -master-bin.000001 9983 Table_map 1 10022 table_id: 25 (test.t1) -master-bin.000001 10022 Write_rows 1 10056 table_id: 25 flags: STMT_END_F -master-bin.000001 10056 Table_map 1 10095 table_id: 25 (test.t1) -master-bin.000001 10095 Write_rows 1 10129 table_id: 25 flags: STMT_END_F -master-bin.000001 10129 Table_map 1 10168 table_id: 25 (test.t1) -master-bin.000001 10168 Write_rows 1 10202 table_id: 25 flags: STMT_END_F -master-bin.000001 10202 Table_map 1 10241 table_id: 25 (test.t1) -master-bin.000001 10241 Write_rows 1 10275 table_id: 25 flags: STMT_END_F -master-bin.000001 10275 Table_map 1 10314 table_id: 25 (test.t1) -master-bin.000001 10314 Write_rows 1 10348 table_id: 25 flags: STMT_END_F -master-bin.000001 10348 Table_map 1 10387 table_id: 25 (test.t1) -master-bin.000001 10387 Write_rows 1 10421 table_id: 25 flags: STMT_END_F -master-bin.000001 10421 Table_map 1 10460 table_id: 25 (test.t1) -master-bin.000001 10460 Write_rows 1 10494 table_id: 25 flags: STMT_END_F -master-bin.000001 10494 Table_map 1 10533 table_id: 25 (test.t1) -master-bin.000001 10533 Write_rows 1 10567 table_id: 25 flags: STMT_END_F -master-bin.000001 10567 Table_map 1 10606 table_id: 25 (test.t1) -master-bin.000001 10606 Write_rows 1 10640 table_id: 25 flags: STMT_END_F -master-bin.000001 10640 Table_map 1 10679 table_id: 25 (test.t1) -master-bin.000001 10679 Write_rows 1 10713 table_id: 25 flags: STMT_END_F -master-bin.000001 10713 Table_map 1 10752 table_id: 25 (test.t1) -master-bin.000001 10752 Write_rows 1 10786 table_id: 25 flags: STMT_END_F -master-bin.000001 10786 Table_map 1 10825 table_id: 25 (test.t1) -master-bin.000001 10825 Write_rows 1 10859 table_id: 25 flags: STMT_END_F -master-bin.000001 10859 Table_map 1 10898 table_id: 25 (test.t1) -master-bin.000001 10898 Write_rows 1 10932 table_id: 25 flags: STMT_END_F -master-bin.000001 10932 Table_map 1 10971 table_id: 25 (test.t1) -master-bin.000001 10971 Write_rows 1 11005 table_id: 25 flags: STMT_END_F -master-bin.000001 11005 Table_map 1 11044 table_id: 25 (test.t1) -master-bin.000001 11044 Write_rows 1 11078 table_id: 25 flags: STMT_END_F -master-bin.000001 11078 Table_map 1 11117 table_id: 25 (test.t1) -master-bin.000001 11117 Write_rows 1 11151 table_id: 25 flags: STMT_END_F -master-bin.000001 11151 Table_map 1 11190 table_id: 25 (test.t1) -master-bin.000001 11190 Write_rows 1 11224 table_id: 25 flags: STMT_END_F -master-bin.000001 11224 Table_map 1 11263 table_id: 25 (test.t1) -master-bin.000001 11263 Write_rows 1 11297 table_id: 25 flags: STMT_END_F -master-bin.000001 11297 Table_map 1 11336 table_id: 25 (test.t1) -master-bin.000001 11336 Write_rows 1 11370 table_id: 25 flags: STMT_END_F -master-bin.000001 11370 Table_map 1 11409 table_id: 25 (test.t1) -master-bin.000001 11409 Write_rows 1 11443 table_id: 25 flags: STMT_END_F -master-bin.000001 11443 Table_map 1 11482 table_id: 25 (test.t1) -master-bin.000001 11482 Write_rows 1 11516 table_id: 25 flags: STMT_END_F -master-bin.000001 11516 Table_map 1 11555 table_id: 25 (test.t1) -master-bin.000001 11555 Write_rows 1 11589 table_id: 25 flags: STMT_END_F -master-bin.000001 11589 Table_map 1 11628 table_id: 25 (test.t1) -master-bin.000001 11628 Write_rows 1 11662 table_id: 25 flags: STMT_END_F -master-bin.000001 11662 Table_map 1 11701 table_id: 25 (test.t1) -master-bin.000001 11701 Write_rows 1 11735 table_id: 25 flags: STMT_END_F -master-bin.000001 11735 Table_map 1 11774 table_id: 25 (test.t1) -master-bin.000001 11774 Write_rows 1 11808 table_id: 25 flags: STMT_END_F -master-bin.000001 11808 Table_map 1 11847 table_id: 25 (test.t1) -master-bin.000001 11847 Write_rows 1 11881 table_id: 25 flags: STMT_END_F -master-bin.000001 11881 Table_map 1 11920 table_id: 25 (test.t1) -master-bin.000001 11920 Write_rows 1 11954 table_id: 25 flags: STMT_END_F -master-bin.000001 11954 Table_map 1 11993 table_id: 25 (test.t1) -master-bin.000001 11993 Write_rows 1 12027 table_id: 25 flags: STMT_END_F -master-bin.000001 12027 Table_map 1 12066 table_id: 25 (test.t1) -master-bin.000001 12066 Write_rows 1 12100 table_id: 25 flags: STMT_END_F -master-bin.000001 12100 Table_map 1 12139 table_id: 25 (test.t1) -master-bin.000001 12139 Write_rows 1 12173 table_id: 25 flags: STMT_END_F -master-bin.000001 12173 Table_map 1 12212 table_id: 25 (test.t1) -master-bin.000001 12212 Write_rows 1 12246 table_id: 25 flags: STMT_END_F -master-bin.000001 12246 Table_map 1 12285 table_id: 25 (test.t1) -master-bin.000001 12285 Write_rows 1 12319 table_id: 25 flags: STMT_END_F -master-bin.000001 12319 Table_map 1 12358 table_id: 25 (test.t1) -master-bin.000001 12358 Write_rows 1 12392 table_id: 25 flags: STMT_END_F -master-bin.000001 12392 Table_map 1 12431 table_id: 25 (test.t1) -master-bin.000001 12431 Write_rows 1 12465 table_id: 25 flags: STMT_END_F -master-bin.000001 12465 Table_map 1 12504 table_id: 25 (test.t1) -master-bin.000001 12504 Write_rows 1 12538 table_id: 25 flags: STMT_END_F -master-bin.000001 12538 Table_map 1 12577 table_id: 25 (test.t1) -master-bin.000001 12577 Write_rows 1 12611 table_id: 25 flags: STMT_END_F -master-bin.000001 12611 Table_map 1 12650 table_id: 25 (test.t1) -master-bin.000001 12650 Write_rows 1 12684 table_id: 25 flags: STMT_END_F -master-bin.000001 12684 Table_map 1 12723 table_id: 25 (test.t1) -master-bin.000001 12723 Write_rows 1 12757 table_id: 25 flags: STMT_END_F -master-bin.000001 12757 Table_map 1 12796 table_id: 25 (test.t1) -master-bin.000001 12796 Write_rows 1 12830 table_id: 25 flags: STMT_END_F -master-bin.000001 12830 Table_map 1 12869 table_id: 25 (test.t1) -master-bin.000001 12869 Write_rows 1 12903 table_id: 25 flags: STMT_END_F -master-bin.000001 12903 Table_map 1 12942 table_id: 25 (test.t1) -master-bin.000001 12942 Write_rows 1 12976 table_id: 25 flags: STMT_END_F -master-bin.000001 12976 Table_map 1 13015 table_id: 25 (test.t1) -master-bin.000001 13015 Write_rows 1 13049 table_id: 25 flags: STMT_END_F -master-bin.000001 13049 Table_map 1 13088 table_id: 25 (test.t1) -master-bin.000001 13088 Write_rows 1 13122 table_id: 25 flags: STMT_END_F -master-bin.000001 13122 Table_map 1 13161 table_id: 25 (test.t1) -master-bin.000001 13161 Write_rows 1 13195 table_id: 25 flags: STMT_END_F -master-bin.000001 13195 Table_map 1 13234 table_id: 25 (test.t1) -master-bin.000001 13234 Write_rows 1 13268 table_id: 25 flags: STMT_END_F -master-bin.000001 13268 Table_map 1 13307 table_id: 25 (test.t1) -master-bin.000001 13307 Write_rows 1 13341 table_id: 25 flags: STMT_END_F -master-bin.000001 13341 Table_map 1 13380 table_id: 25 (test.t1) -master-bin.000001 13380 Write_rows 1 13414 table_id: 25 flags: STMT_END_F -master-bin.000001 13414 Table_map 1 13453 table_id: 25 (test.t1) -master-bin.000001 13453 Write_rows 1 13487 table_id: 25 flags: STMT_END_F -master-bin.000001 13487 Table_map 1 13526 table_id: 25 (test.t1) -master-bin.000001 13526 Write_rows 1 13560 table_id: 25 flags: STMT_END_F -master-bin.000001 13560 Table_map 1 13599 table_id: 25 (test.t1) -master-bin.000001 13599 Write_rows 1 13633 table_id: 25 flags: STMT_END_F -master-bin.000001 13633 Table_map 1 13672 table_id: 25 (test.t1) -master-bin.000001 13672 Write_rows 1 13706 table_id: 25 flags: STMT_END_F -master-bin.000001 13706 Table_map 1 13745 table_id: 25 (test.t1) -master-bin.000001 13745 Write_rows 1 13779 table_id: 25 flags: STMT_END_F -master-bin.000001 13779 Table_map 1 13818 table_id: 25 (test.t1) -master-bin.000001 13818 Write_rows 1 13852 table_id: 25 flags: STMT_END_F -master-bin.000001 13852 Table_map 1 13891 table_id: 25 (test.t1) -master-bin.000001 13891 Write_rows 1 13925 table_id: 25 flags: STMT_END_F -master-bin.000001 13925 Table_map 1 13964 table_id: 25 (test.t1) -master-bin.000001 13964 Write_rows 1 13998 table_id: 25 flags: STMT_END_F -master-bin.000001 13998 Table_map 1 14037 table_id: 25 (test.t1) -master-bin.000001 14037 Write_rows 1 14071 table_id: 25 flags: STMT_END_F -master-bin.000001 14071 Table_map 1 14110 table_id: 25 (test.t1) -master-bin.000001 14110 Write_rows 1 14144 table_id: 25 flags: STMT_END_F -master-bin.000001 14144 Table_map 1 14183 table_id: 25 (test.t1) -master-bin.000001 14183 Write_rows 1 14217 table_id: 25 flags: STMT_END_F -master-bin.000001 14217 Table_map 1 14256 table_id: 25 (test.t1) -master-bin.000001 14256 Write_rows 1 14290 table_id: 25 flags: STMT_END_F -master-bin.000001 14290 Table_map 1 14329 table_id: 25 (test.t1) -master-bin.000001 14329 Write_rows 1 14363 table_id: 25 flags: STMT_END_F -master-bin.000001 14363 Table_map 1 14402 table_id: 25 (test.t1) -master-bin.000001 14402 Write_rows 1 14436 table_id: 25 flags: STMT_END_F -master-bin.000001 14436 Table_map 1 14475 table_id: 25 (test.t1) -master-bin.000001 14475 Write_rows 1 14509 table_id: 25 flags: STMT_END_F -master-bin.000001 14509 Table_map 1 14548 table_id: 25 (test.t1) -master-bin.000001 14548 Write_rows 1 14582 table_id: 25 flags: STMT_END_F -master-bin.000001 14582 Table_map 1 14621 table_id: 25 (test.t1) -master-bin.000001 14621 Write_rows 1 14655 table_id: 25 flags: STMT_END_F -master-bin.000001 14655 Table_map 1 14694 table_id: 25 (test.t1) -master-bin.000001 14694 Write_rows 1 14728 table_id: 25 flags: STMT_END_F -master-bin.000001 14728 Table_map 1 14767 table_id: 25 (test.t1) -master-bin.000001 14767 Write_rows 1 14801 table_id: 25 flags: STMT_END_F -master-bin.000001 14801 Table_map 1 14840 table_id: 25 (test.t1) -master-bin.000001 14840 Write_rows 1 14874 table_id: 25 flags: STMT_END_F -master-bin.000001 14874 Table_map 1 14913 table_id: 25 (test.t1) -master-bin.000001 14913 Write_rows 1 14947 table_id: 25 flags: STMT_END_F -master-bin.000001 14947 Table_map 1 14986 table_id: 25 (test.t1) -master-bin.000001 14986 Write_rows 1 15020 table_id: 25 flags: STMT_END_F -master-bin.000001 15020 Table_map 1 15059 table_id: 25 (test.t1) -master-bin.000001 15059 Write_rows 1 15093 table_id: 25 flags: STMT_END_F -master-bin.000001 15093 Table_map 1 15132 table_id: 25 (test.t1) -master-bin.000001 15132 Write_rows 1 15166 table_id: 25 flags: STMT_END_F -master-bin.000001 15166 Table_map 1 15205 table_id: 25 (test.t1) -master-bin.000001 15205 Write_rows 1 15239 table_id: 25 flags: STMT_END_F -master-bin.000001 15239 Table_map 1 15278 table_id: 25 (test.t1) -master-bin.000001 15278 Write_rows 1 15312 table_id: 25 flags: STMT_END_F -master-bin.000001 15312 Table_map 1 15351 table_id: 25 (test.t1) -master-bin.000001 15351 Write_rows 1 15385 table_id: 25 flags: STMT_END_F -master-bin.000001 15385 Table_map 1 15424 table_id: 25 (test.t1) -master-bin.000001 15424 Write_rows 1 15458 table_id: 25 flags: STMT_END_F -master-bin.000001 15458 Table_map 1 15497 table_id: 25 (test.t1) -master-bin.000001 15497 Write_rows 1 15531 table_id: 25 flags: STMT_END_F -master-bin.000001 15531 Table_map 1 15570 table_id: 25 (test.t1) -master-bin.000001 15570 Write_rows 1 15604 table_id: 25 flags: STMT_END_F -master-bin.000001 15604 Table_map 1 15643 table_id: 25 (test.t1) -master-bin.000001 15643 Write_rows 1 15677 table_id: 25 flags: STMT_END_F -master-bin.000001 15677 Table_map 1 15716 table_id: 25 (test.t1) -master-bin.000001 15716 Write_rows 1 15750 table_id: 25 flags: STMT_END_F -master-bin.000001 15750 Table_map 1 15789 table_id: 25 (test.t1) -master-bin.000001 15789 Write_rows 1 15823 table_id: 25 flags: STMT_END_F -master-bin.000001 15823 Table_map 1 15862 table_id: 25 (test.t1) -master-bin.000001 15862 Write_rows 1 15896 table_id: 25 flags: STMT_END_F -master-bin.000001 15896 Table_map 1 15935 table_id: 25 (test.t1) -master-bin.000001 15935 Write_rows 1 15969 table_id: 25 flags: STMT_END_F -master-bin.000001 15969 Table_map 1 16008 table_id: 25 (test.t1) -master-bin.000001 16008 Write_rows 1 16042 table_id: 25 flags: STMT_END_F -master-bin.000001 16042 Table_map 1 16081 table_id: 25 (test.t1) -master-bin.000001 16081 Write_rows 1 16115 table_id: 25 flags: STMT_END_F -master-bin.000001 16115 Table_map 1 16154 table_id: 25 (test.t1) -master-bin.000001 16154 Write_rows 1 16188 table_id: 25 flags: STMT_END_F -master-bin.000001 16188 Table_map 1 16227 table_id: 25 (test.t1) -master-bin.000001 16227 Write_rows 1 16261 table_id: 25 flags: STMT_END_F -master-bin.000001 16261 Table_map 1 16300 table_id: 25 (test.t1) -master-bin.000001 16300 Write_rows 1 16334 table_id: 25 flags: STMT_END_F -master-bin.000001 16334 Table_map 1 16373 table_id: 25 (test.t1) -master-bin.000001 16373 Write_rows 1 16407 table_id: 25 flags: STMT_END_F -master-bin.000001 16407 Table_map 1 16446 table_id: 25 (test.t1) -master-bin.000001 16446 Write_rows 1 16480 table_id: 25 flags: STMT_END_F -master-bin.000001 16480 Table_map 1 16519 table_id: 25 (test.t1) -master-bin.000001 16519 Write_rows 1 16553 table_id: 25 flags: STMT_END_F -master-bin.000001 16553 Table_map 1 16592 table_id: 25 (test.t1) -master-bin.000001 16592 Write_rows 1 16626 table_id: 25 flags: STMT_END_F -master-bin.000001 16626 Table_map 1 16665 table_id: 25 (test.t1) -master-bin.000001 16665 Write_rows 1 16699 table_id: 25 flags: STMT_END_F -master-bin.000001 16699 Table_map 1 16738 table_id: 25 (test.t1) -master-bin.000001 16738 Write_rows 1 16772 table_id: 25 flags: STMT_END_F -master-bin.000001 16772 Table_map 1 16811 table_id: 25 (test.t1) -master-bin.000001 16811 Write_rows 1 16845 table_id: 25 flags: STMT_END_F -master-bin.000001 16845 Table_map 1 16884 table_id: 25 (test.t1) -master-bin.000001 16884 Write_rows 1 16918 table_id: 25 flags: STMT_END_F -master-bin.000001 16918 Table_map 1 16957 table_id: 25 (test.t1) -master-bin.000001 16957 Write_rows 1 16991 table_id: 25 flags: STMT_END_F -master-bin.000001 16991 Table_map 1 17030 table_id: 25 (test.t1) -master-bin.000001 17030 Write_rows 1 17064 table_id: 25 flags: STMT_END_F -master-bin.000001 17064 Table_map 1 17103 table_id: 25 (test.t1) -master-bin.000001 17103 Write_rows 1 17137 table_id: 25 flags: STMT_END_F -master-bin.000001 17137 Table_map 1 17176 table_id: 25 (test.t1) -master-bin.000001 17176 Write_rows 1 17210 table_id: 25 flags: STMT_END_F -master-bin.000001 17210 Table_map 1 17249 table_id: 25 (test.t1) -master-bin.000001 17249 Write_rows 1 17283 table_id: 25 flags: STMT_END_F -master-bin.000001 17283 Table_map 1 17322 table_id: 25 (test.t1) -master-bin.000001 17322 Write_rows 1 17356 table_id: 25 flags: STMT_END_F -master-bin.000001 17356 Table_map 1 17395 table_id: 25 (test.t1) -master-bin.000001 17395 Write_rows 1 17429 table_id: 25 flags: STMT_END_F -master-bin.000001 17429 Table_map 1 17468 table_id: 25 (test.t1) -master-bin.000001 17468 Write_rows 1 17502 table_id: 25 flags: STMT_END_F -master-bin.000001 17502 Table_map 1 17541 table_id: 25 (test.t1) -master-bin.000001 17541 Write_rows 1 17575 table_id: 25 flags: STMT_END_F -master-bin.000001 17575 Table_map 1 17614 table_id: 25 (test.t1) -master-bin.000001 17614 Write_rows 1 17648 table_id: 25 flags: STMT_END_F -master-bin.000001 17648 Table_map 1 17687 table_id: 25 (test.t1) -master-bin.000001 17687 Write_rows 1 17721 table_id: 25 flags: STMT_END_F -master-bin.000001 17721 Table_map 1 17760 table_id: 25 (test.t1) -master-bin.000001 17760 Write_rows 1 17794 table_id: 25 flags: STMT_END_F -master-bin.000001 17794 Table_map 1 17833 table_id: 25 (test.t1) -master-bin.000001 17833 Write_rows 1 17867 table_id: 25 flags: STMT_END_F -master-bin.000001 17867 Table_map 1 17906 table_id: 25 (test.t1) -master-bin.000001 17906 Write_rows 1 17940 table_id: 25 flags: STMT_END_F -master-bin.000001 17940 Table_map 1 17979 table_id: 25 (test.t1) -master-bin.000001 17979 Write_rows 1 18013 table_id: 25 flags: STMT_END_F -master-bin.000001 18013 Table_map 1 18052 table_id: 25 (test.t1) -master-bin.000001 18052 Write_rows 1 18086 table_id: 25 flags: STMT_END_F -master-bin.000001 18086 Table_map 1 18125 table_id: 25 (test.t1) -master-bin.000001 18125 Write_rows 1 18159 table_id: 25 flags: STMT_END_F -master-bin.000001 18159 Table_map 1 18198 table_id: 25 (test.t1) -master-bin.000001 18198 Write_rows 1 18232 table_id: 25 flags: STMT_END_F -master-bin.000001 18232 Table_map 1 18271 table_id: 25 (test.t1) -master-bin.000001 18271 Write_rows 1 18305 table_id: 25 flags: STMT_END_F -master-bin.000001 18305 Table_map 1 18344 table_id: 25 (test.t1) -master-bin.000001 18344 Write_rows 1 18378 table_id: 25 flags: STMT_END_F -master-bin.000001 18378 Table_map 1 18417 table_id: 25 (test.t1) -master-bin.000001 18417 Write_rows 1 18451 table_id: 25 flags: STMT_END_F -master-bin.000001 18451 Table_map 1 18490 table_id: 25 (test.t1) -master-bin.000001 18490 Write_rows 1 18524 table_id: 25 flags: STMT_END_F -master-bin.000001 18524 Table_map 1 18563 table_id: 25 (test.t1) -master-bin.000001 18563 Write_rows 1 18597 table_id: 25 flags: STMT_END_F -master-bin.000001 18597 Table_map 1 18636 table_id: 25 (test.t1) -master-bin.000001 18636 Write_rows 1 18670 table_id: 25 flags: STMT_END_F -master-bin.000001 18670 Table_map 1 18709 table_id: 25 (test.t1) -master-bin.000001 18709 Write_rows 1 18743 table_id: 25 flags: STMT_END_F -master-bin.000001 18743 Table_map 1 18782 table_id: 25 (test.t1) -master-bin.000001 18782 Write_rows 1 18816 table_id: 25 flags: STMT_END_F -master-bin.000001 18816 Table_map 1 18855 table_id: 25 (test.t1) -master-bin.000001 18855 Write_rows 1 18889 table_id: 25 flags: STMT_END_F -master-bin.000001 18889 Table_map 1 18928 table_id: 25 (test.t1) -master-bin.000001 18928 Write_rows 1 18962 table_id: 25 flags: STMT_END_F -master-bin.000001 18962 Table_map 1 19001 table_id: 25 (test.t1) -master-bin.000001 19001 Write_rows 1 19035 table_id: 25 flags: STMT_END_F -master-bin.000001 19035 Table_map 1 19074 table_id: 25 (test.t1) -master-bin.000001 19074 Write_rows 1 19108 table_id: 25 flags: STMT_END_F -master-bin.000001 19108 Table_map 1 19147 table_id: 25 (test.t1) -master-bin.000001 19147 Write_rows 1 19181 table_id: 25 flags: STMT_END_F -master-bin.000001 19181 Table_map 1 19220 table_id: 25 (test.t1) -master-bin.000001 19220 Write_rows 1 19254 table_id: 25 flags: STMT_END_F -master-bin.000001 19254 Table_map 1 19293 table_id: 25 (test.t1) -master-bin.000001 19293 Write_rows 1 19327 table_id: 25 flags: STMT_END_F -master-bin.000001 19327 Table_map 1 19366 table_id: 25 (test.t1) -master-bin.000001 19366 Write_rows 1 19400 table_id: 25 flags: STMT_END_F -master-bin.000001 19400 Table_map 1 19439 table_id: 25 (test.t1) -master-bin.000001 19439 Write_rows 1 19473 table_id: 25 flags: STMT_END_F -master-bin.000001 19473 Table_map 1 19512 table_id: 25 (test.t1) -master-bin.000001 19512 Write_rows 1 19546 table_id: 25 flags: STMT_END_F -master-bin.000001 19546 Table_map 1 19585 table_id: 25 (test.t1) -master-bin.000001 19585 Write_rows 1 19619 table_id: 25 flags: STMT_END_F -master-bin.000001 19619 Table_map 1 19658 table_id: 25 (test.t1) -master-bin.000001 19658 Write_rows 1 19692 table_id: 25 flags: STMT_END_F -master-bin.000001 19692 Table_map 1 19731 table_id: 25 (test.t1) -master-bin.000001 19731 Write_rows 1 19765 table_id: 25 flags: STMT_END_F -master-bin.000001 19765 Table_map 1 19804 table_id: 25 (test.t1) -master-bin.000001 19804 Write_rows 1 19838 table_id: 25 flags: STMT_END_F -master-bin.000001 19838 Table_map 1 19877 table_id: 25 (test.t1) -master-bin.000001 19877 Write_rows 1 19911 table_id: 25 flags: STMT_END_F -master-bin.000001 19911 Table_map 1 19950 table_id: 25 (test.t1) -master-bin.000001 19950 Write_rows 1 19984 table_id: 25 flags: STMT_END_F -master-bin.000001 19984 Table_map 1 20023 table_id: 25 (test.t1) -master-bin.000001 20023 Write_rows 1 20057 table_id: 25 flags: STMT_END_F -master-bin.000001 20057 Table_map 1 20096 table_id: 25 (test.t1) -master-bin.000001 20096 Write_rows 1 20130 table_id: 25 flags: STMT_END_F -master-bin.000001 20130 Table_map 1 20169 table_id: 25 (test.t1) -master-bin.000001 20169 Write_rows 1 20203 table_id: 25 flags: STMT_END_F -master-bin.000001 20203 Table_map 1 20242 table_id: 25 (test.t1) -master-bin.000001 20242 Write_rows 1 20276 table_id: 25 flags: STMT_END_F -master-bin.000001 20276 Table_map 1 20315 table_id: 25 (test.t1) -master-bin.000001 20315 Write_rows 1 20349 table_id: 25 flags: STMT_END_F -master-bin.000001 20349 Table_map 1 20388 table_id: 25 (test.t1) -master-bin.000001 20388 Write_rows 1 20422 table_id: 25 flags: STMT_END_F -master-bin.000001 20422 Table_map 1 20461 table_id: 25 (test.t1) -master-bin.000001 20461 Write_rows 1 20495 table_id: 25 flags: STMT_END_F -master-bin.000001 20495 Table_map 1 20534 table_id: 25 (test.t1) -master-bin.000001 20534 Write_rows 1 20568 table_id: 25 flags: STMT_END_F -master-bin.000001 20568 Table_map 1 20607 table_id: 25 (test.t1) -master-bin.000001 20607 Write_rows 1 20641 table_id: 25 flags: STMT_END_F -master-bin.000001 20641 Table_map 1 20680 table_id: 25 (test.t1) -master-bin.000001 20680 Write_rows 1 20714 table_id: 25 flags: STMT_END_F -master-bin.000001 20714 Table_map 1 20753 table_id: 25 (test.t1) -master-bin.000001 20753 Write_rows 1 20787 table_id: 25 flags: STMT_END_F -master-bin.000001 20787 Table_map 1 20826 table_id: 25 (test.t1) -master-bin.000001 20826 Write_rows 1 20860 table_id: 25 flags: STMT_END_F -master-bin.000001 20860 Table_map 1 20899 table_id: 25 (test.t1) -master-bin.000001 20899 Write_rows 1 20933 table_id: 25 flags: STMT_END_F -master-bin.000001 20933 Table_map 1 20972 table_id: 25 (test.t1) -master-bin.000001 20972 Write_rows 1 21006 table_id: 25 flags: STMT_END_F -master-bin.000001 21006 Table_map 1 21045 table_id: 25 (test.t1) -master-bin.000001 21045 Write_rows 1 21079 table_id: 25 flags: STMT_END_F -master-bin.000001 21079 Table_map 1 21118 table_id: 25 (test.t1) -master-bin.000001 21118 Write_rows 1 21152 table_id: 25 flags: STMT_END_F -master-bin.000001 21152 Table_map 1 21191 table_id: 25 (test.t1) -master-bin.000001 21191 Write_rows 1 21225 table_id: 25 flags: STMT_END_F -master-bin.000001 21225 Table_map 1 21264 table_id: 25 (test.t1) -master-bin.000001 21264 Write_rows 1 21298 table_id: 25 flags: STMT_END_F -master-bin.000001 21298 Table_map 1 21337 table_id: 25 (test.t1) -master-bin.000001 21337 Write_rows 1 21371 table_id: 25 flags: STMT_END_F -master-bin.000001 21371 Table_map 1 21410 table_id: 25 (test.t1) -master-bin.000001 21410 Write_rows 1 21444 table_id: 25 flags: STMT_END_F -master-bin.000001 21444 Table_map 1 21483 table_id: 25 (test.t1) -master-bin.000001 21483 Write_rows 1 21517 table_id: 25 flags: STMT_END_F -master-bin.000001 21517 Table_map 1 21556 table_id: 25 (test.t1) -master-bin.000001 21556 Write_rows 1 21590 table_id: 25 flags: STMT_END_F -master-bin.000001 21590 Table_map 1 21629 table_id: 25 (test.t1) -master-bin.000001 21629 Write_rows 1 21663 table_id: 25 flags: STMT_END_F -master-bin.000001 21663 Table_map 1 21702 table_id: 25 (test.t1) -master-bin.000001 21702 Write_rows 1 21736 table_id: 25 flags: STMT_END_F -master-bin.000001 21736 Table_map 1 21775 table_id: 25 (test.t1) -master-bin.000001 21775 Write_rows 1 21809 table_id: 25 flags: STMT_END_F -master-bin.000001 21809 Table_map 1 21848 table_id: 25 (test.t1) -master-bin.000001 21848 Write_rows 1 21882 table_id: 25 flags: STMT_END_F -master-bin.000001 21882 Table_map 1 21921 table_id: 25 (test.t1) -master-bin.000001 21921 Write_rows 1 21955 table_id: 25 flags: STMT_END_F -master-bin.000001 21955 Table_map 1 21994 table_id: 25 (test.t1) -master-bin.000001 21994 Write_rows 1 22028 table_id: 25 flags: STMT_END_F -master-bin.000001 22028 Table_map 1 22067 table_id: 25 (test.t1) -master-bin.000001 22067 Write_rows 1 22101 table_id: 25 flags: STMT_END_F -master-bin.000001 22101 Table_map 1 22140 table_id: 25 (test.t1) -master-bin.000001 22140 Write_rows 1 22174 table_id: 25 flags: STMT_END_F -master-bin.000001 22174 Table_map 1 22213 table_id: 25 (test.t1) -master-bin.000001 22213 Write_rows 1 22247 table_id: 25 flags: STMT_END_F -master-bin.000001 22247 Table_map 1 22286 table_id: 25 (test.t1) -master-bin.000001 22286 Write_rows 1 22320 table_id: 25 flags: STMT_END_F -master-bin.000001 22320 Table_map 1 22359 table_id: 25 (test.t1) -master-bin.000001 22359 Write_rows 1 22393 table_id: 25 flags: STMT_END_F -master-bin.000001 22393 Table_map 1 22432 table_id: 25 (test.t1) -master-bin.000001 22432 Write_rows 1 22466 table_id: 25 flags: STMT_END_F -master-bin.000001 22466 Table_map 1 22505 table_id: 25 (test.t1) -master-bin.000001 22505 Write_rows 1 22539 table_id: 25 flags: STMT_END_F -master-bin.000001 22539 Table_map 1 22578 table_id: 25 (test.t1) -master-bin.000001 22578 Write_rows 1 22612 table_id: 25 flags: STMT_END_F -master-bin.000001 22612 Table_map 1 22651 table_id: 25 (test.t1) -master-bin.000001 22651 Write_rows 1 22685 table_id: 25 flags: STMT_END_F -master-bin.000001 22685 Table_map 1 22724 table_id: 25 (test.t1) -master-bin.000001 22724 Write_rows 1 22758 table_id: 25 flags: STMT_END_F -master-bin.000001 22758 Table_map 1 22797 table_id: 25 (test.t1) -master-bin.000001 22797 Write_rows 1 22831 table_id: 25 flags: STMT_END_F -master-bin.000001 22831 Table_map 1 22870 table_id: 25 (test.t1) -master-bin.000001 22870 Write_rows 1 22904 table_id: 25 flags: STMT_END_F -master-bin.000001 22904 Table_map 1 22943 table_id: 25 (test.t1) -master-bin.000001 22943 Write_rows 1 22977 table_id: 25 flags: STMT_END_F -master-bin.000001 22977 Table_map 1 23016 table_id: 25 (test.t1) -master-bin.000001 23016 Write_rows 1 23050 table_id: 25 flags: STMT_END_F -master-bin.000001 23050 Table_map 1 23089 table_id: 25 (test.t1) -master-bin.000001 23089 Write_rows 1 23123 table_id: 25 flags: STMT_END_F -master-bin.000001 23123 Table_map 1 23162 table_id: 25 (test.t1) -master-bin.000001 23162 Write_rows 1 23196 table_id: 25 flags: STMT_END_F -master-bin.000001 23196 Table_map 1 23235 table_id: 25 (test.t1) -master-bin.000001 23235 Write_rows 1 23269 table_id: 25 flags: STMT_END_F -master-bin.000001 23269 Table_map 1 23308 table_id: 25 (test.t1) -master-bin.000001 23308 Write_rows 1 23342 table_id: 25 flags: STMT_END_F -master-bin.000001 23342 Table_map 1 23381 table_id: 25 (test.t1) -master-bin.000001 23381 Write_rows 1 23415 table_id: 25 flags: STMT_END_F -master-bin.000001 23415 Table_map 1 23454 table_id: 25 (test.t1) -master-bin.000001 23454 Write_rows 1 23488 table_id: 25 flags: STMT_END_F -master-bin.000001 23488 Table_map 1 23527 table_id: 25 (test.t1) -master-bin.000001 23527 Write_rows 1 23561 table_id: 25 flags: STMT_END_F -master-bin.000001 23561 Table_map 1 23600 table_id: 25 (test.t1) -master-bin.000001 23600 Write_rows 1 23634 table_id: 25 flags: STMT_END_F -master-bin.000001 23634 Table_map 1 23673 table_id: 25 (test.t1) -master-bin.000001 23673 Write_rows 1 23707 table_id: 25 flags: STMT_END_F -master-bin.000001 23707 Table_map 1 23746 table_id: 25 (test.t1) -master-bin.000001 23746 Write_rows 1 23780 table_id: 25 flags: STMT_END_F -master-bin.000001 23780 Table_map 1 23819 table_id: 25 (test.t1) -master-bin.000001 23819 Write_rows 1 23853 table_id: 25 flags: STMT_END_F -master-bin.000001 23853 Table_map 1 23892 table_id: 25 (test.t1) -master-bin.000001 23892 Write_rows 1 23926 table_id: 25 flags: STMT_END_F -master-bin.000001 23926 Table_map 1 23965 table_id: 25 (test.t1) -master-bin.000001 23965 Write_rows 1 23999 table_id: 25 flags: STMT_END_F -master-bin.000001 23999 Table_map 1 24038 table_id: 25 (test.t1) -master-bin.000001 24038 Write_rows 1 24072 table_id: 25 flags: STMT_END_F -master-bin.000001 24072 Table_map 1 24111 table_id: 25 (test.t1) -master-bin.000001 24111 Write_rows 1 24145 table_id: 25 flags: STMT_END_F -master-bin.000001 24145 Table_map 1 24184 table_id: 25 (test.t1) -master-bin.000001 24184 Write_rows 1 24218 table_id: 25 flags: STMT_END_F -master-bin.000001 24218 Table_map 1 24257 table_id: 25 (test.t1) -master-bin.000001 24257 Write_rows 1 24291 table_id: 25 flags: STMT_END_F -master-bin.000001 24291 Table_map 1 24330 table_id: 25 (test.t1) -master-bin.000001 24330 Write_rows 1 24364 table_id: 25 flags: STMT_END_F -master-bin.000001 24364 Table_map 1 24403 table_id: 25 (test.t1) -master-bin.000001 24403 Write_rows 1 24437 table_id: 25 flags: STMT_END_F -master-bin.000001 24437 Table_map 1 24476 table_id: 25 (test.t1) -master-bin.000001 24476 Write_rows 1 24510 table_id: 25 flags: STMT_END_F -master-bin.000001 24510 Table_map 1 24549 table_id: 25 (test.t1) -master-bin.000001 24549 Write_rows 1 24583 table_id: 25 flags: STMT_END_F -master-bin.000001 24583 Table_map 1 24622 table_id: 25 (test.t1) -master-bin.000001 24622 Write_rows 1 24656 table_id: 25 flags: STMT_END_F -master-bin.000001 24656 Table_map 1 24695 table_id: 25 (test.t1) -master-bin.000001 24695 Write_rows 1 24729 table_id: 25 flags: STMT_END_F -master-bin.000001 24729 Table_map 1 24768 table_id: 25 (test.t1) -master-bin.000001 24768 Write_rows 1 24802 table_id: 25 flags: STMT_END_F -master-bin.000001 24802 Table_map 1 24841 table_id: 25 (test.t1) -master-bin.000001 24841 Write_rows 1 24875 table_id: 25 flags: STMT_END_F -master-bin.000001 24875 Table_map 1 24914 table_id: 25 (test.t1) -master-bin.000001 24914 Write_rows 1 24948 table_id: 25 flags: STMT_END_F -master-bin.000001 24948 Table_map 1 24987 table_id: 25 (test.t1) -master-bin.000001 24987 Write_rows 1 25021 table_id: 25 flags: STMT_END_F -master-bin.000001 25021 Table_map 1 25060 table_id: 25 (test.t1) -master-bin.000001 25060 Write_rows 1 25094 table_id: 25 flags: STMT_END_F -master-bin.000001 25094 Table_map 1 25133 table_id: 25 (test.t1) -master-bin.000001 25133 Write_rows 1 25167 table_id: 25 flags: STMT_END_F -master-bin.000001 25167 Table_map 1 25206 table_id: 25 (test.t1) -master-bin.000001 25206 Write_rows 1 25240 table_id: 25 flags: STMT_END_F -master-bin.000001 25240 Table_map 1 25279 table_id: 25 (test.t1) -master-bin.000001 25279 Write_rows 1 25313 table_id: 25 flags: STMT_END_F -master-bin.000001 25313 Table_map 1 25352 table_id: 25 (test.t1) -master-bin.000001 25352 Write_rows 1 25386 table_id: 25 flags: STMT_END_F -master-bin.000001 25386 Table_map 1 25425 table_id: 25 (test.t1) -master-bin.000001 25425 Write_rows 1 25459 table_id: 25 flags: STMT_END_F -master-bin.000001 25459 Table_map 1 25498 table_id: 25 (test.t1) -master-bin.000001 25498 Write_rows 1 25532 table_id: 25 flags: STMT_END_F -master-bin.000001 25532 Table_map 1 25571 table_id: 25 (test.t1) -master-bin.000001 25571 Write_rows 1 25605 table_id: 25 flags: STMT_END_F -master-bin.000001 25605 Table_map 1 25644 table_id: 25 (test.t1) -master-bin.000001 25644 Write_rows 1 25678 table_id: 25 flags: STMT_END_F -master-bin.000001 25678 Table_map 1 25717 table_id: 25 (test.t1) -master-bin.000001 25717 Write_rows 1 25751 table_id: 25 flags: STMT_END_F -master-bin.000001 25751 Table_map 1 25790 table_id: 25 (test.t1) -master-bin.000001 25790 Write_rows 1 25824 table_id: 25 flags: STMT_END_F -master-bin.000001 25824 Table_map 1 25863 table_id: 25 (test.t1) -master-bin.000001 25863 Write_rows 1 25897 table_id: 25 flags: STMT_END_F -master-bin.000001 25897 Table_map 1 25936 table_id: 25 (test.t1) -master-bin.000001 25936 Write_rows 1 25970 table_id: 25 flags: STMT_END_F -master-bin.000001 25970 Table_map 1 26009 table_id: 25 (test.t1) -master-bin.000001 26009 Write_rows 1 26043 table_id: 25 flags: STMT_END_F -master-bin.000001 26043 Table_map 1 26082 table_id: 25 (test.t1) -master-bin.000001 26082 Write_rows 1 26116 table_id: 25 flags: STMT_END_F -master-bin.000001 26116 Table_map 1 26155 table_id: 25 (test.t1) -master-bin.000001 26155 Write_rows 1 26189 table_id: 25 flags: STMT_END_F -master-bin.000001 26189 Table_map 1 26228 table_id: 25 (test.t1) -master-bin.000001 26228 Write_rows 1 26262 table_id: 25 flags: STMT_END_F -master-bin.000001 26262 Table_map 1 26301 table_id: 25 (test.t1) -master-bin.000001 26301 Write_rows 1 26335 table_id: 25 flags: STMT_END_F -master-bin.000001 26335 Table_map 1 26374 table_id: 25 (test.t1) -master-bin.000001 26374 Write_rows 1 26408 table_id: 25 flags: STMT_END_F -master-bin.000001 26408 Table_map 1 26447 table_id: 25 (test.t1) -master-bin.000001 26447 Write_rows 1 26481 table_id: 25 flags: STMT_END_F -master-bin.000001 26481 Table_map 1 26520 table_id: 25 (test.t1) -master-bin.000001 26520 Write_rows 1 26554 table_id: 25 flags: STMT_END_F -master-bin.000001 26554 Table_map 1 26593 table_id: 25 (test.t1) -master-bin.000001 26593 Write_rows 1 26627 table_id: 25 flags: STMT_END_F -master-bin.000001 26627 Table_map 1 26666 table_id: 25 (test.t1) -master-bin.000001 26666 Write_rows 1 26700 table_id: 25 flags: STMT_END_F -master-bin.000001 26700 Table_map 1 26739 table_id: 25 (test.t1) -master-bin.000001 26739 Write_rows 1 26773 table_id: 25 flags: STMT_END_F -master-bin.000001 26773 Table_map 1 26812 table_id: 25 (test.t1) -master-bin.000001 26812 Write_rows 1 26846 table_id: 25 flags: STMT_END_F -master-bin.000001 26846 Table_map 1 26885 table_id: 25 (test.t1) -master-bin.000001 26885 Write_rows 1 26919 table_id: 25 flags: STMT_END_F -master-bin.000001 26919 Table_map 1 26958 table_id: 25 (test.t1) -master-bin.000001 26958 Write_rows 1 26992 table_id: 25 flags: STMT_END_F -master-bin.000001 26992 Table_map 1 27031 table_id: 25 (test.t1) -master-bin.000001 27031 Write_rows 1 27065 table_id: 25 flags: STMT_END_F -master-bin.000001 27065 Table_map 1 27104 table_id: 25 (test.t1) -master-bin.000001 27104 Write_rows 1 27138 table_id: 25 flags: STMT_END_F -master-bin.000001 27138 Table_map 1 27177 table_id: 25 (test.t1) -master-bin.000001 27177 Write_rows 1 27211 table_id: 25 flags: STMT_END_F -master-bin.000001 27211 Table_map 1 27250 table_id: 25 (test.t1) -master-bin.000001 27250 Write_rows 1 27284 table_id: 25 flags: STMT_END_F -master-bin.000001 27284 Table_map 1 27323 table_id: 25 (test.t1) -master-bin.000001 27323 Write_rows 1 27357 table_id: 25 flags: STMT_END_F -master-bin.000001 27357 Table_map 1 27396 table_id: 25 (test.t1) -master-bin.000001 27396 Write_rows 1 27430 table_id: 25 flags: STMT_END_F -master-bin.000001 27430 Table_map 1 27469 table_id: 25 (test.t1) -master-bin.000001 27469 Write_rows 1 27503 table_id: 25 flags: STMT_END_F -master-bin.000001 27503 Table_map 1 27542 table_id: 25 (test.t1) -master-bin.000001 27542 Write_rows 1 27576 table_id: 25 flags: STMT_END_F -master-bin.000001 27576 Table_map 1 27615 table_id: 25 (test.t1) -master-bin.000001 27615 Write_rows 1 27649 table_id: 25 flags: STMT_END_F -master-bin.000001 27649 Table_map 1 27688 table_id: 25 (test.t1) -master-bin.000001 27688 Write_rows 1 27722 table_id: 25 flags: STMT_END_F -master-bin.000001 27722 Table_map 1 27761 table_id: 25 (test.t1) -master-bin.000001 27761 Write_rows 1 27795 table_id: 25 flags: STMT_END_F -master-bin.000001 27795 Table_map 1 27834 table_id: 25 (test.t1) -master-bin.000001 27834 Write_rows 1 27868 table_id: 25 flags: STMT_END_F -master-bin.000001 27868 Table_map 1 27907 table_id: 25 (test.t1) -master-bin.000001 27907 Write_rows 1 27941 table_id: 25 flags: STMT_END_F -master-bin.000001 27941 Table_map 1 27980 table_id: 25 (test.t1) -master-bin.000001 27980 Write_rows 1 28014 table_id: 25 flags: STMT_END_F -master-bin.000001 28014 Table_map 1 28053 table_id: 25 (test.t1) -master-bin.000001 28053 Write_rows 1 28087 table_id: 25 flags: STMT_END_F -master-bin.000001 28087 Table_map 1 28126 table_id: 25 (test.t1) -master-bin.000001 28126 Write_rows 1 28160 table_id: 25 flags: STMT_END_F -master-bin.000001 28160 Table_map 1 28199 table_id: 25 (test.t1) -master-bin.000001 28199 Write_rows 1 28233 table_id: 25 flags: STMT_END_F -master-bin.000001 28233 Table_map 1 28272 table_id: 25 (test.t1) -master-bin.000001 28272 Write_rows 1 28306 table_id: 25 flags: STMT_END_F -master-bin.000001 28306 Table_map 1 28345 table_id: 25 (test.t1) -master-bin.000001 28345 Write_rows 1 28379 table_id: 25 flags: STMT_END_F -master-bin.000001 28379 Table_map 1 28418 table_id: 25 (test.t1) -master-bin.000001 28418 Write_rows 1 28452 table_id: 25 flags: STMT_END_F -master-bin.000001 28452 Table_map 1 28491 table_id: 25 (test.t1) -master-bin.000001 28491 Write_rows 1 28525 table_id: 25 flags: STMT_END_F -master-bin.000001 28525 Table_map 1 28564 table_id: 25 (test.t1) -master-bin.000001 28564 Write_rows 1 28598 table_id: 25 flags: STMT_END_F -master-bin.000001 28598 Table_map 1 28637 table_id: 25 (test.t1) -master-bin.000001 28637 Write_rows 1 28671 table_id: 25 flags: STMT_END_F -master-bin.000001 28671 Table_map 1 28710 table_id: 25 (test.t1) -master-bin.000001 28710 Write_rows 1 28744 table_id: 25 flags: STMT_END_F -master-bin.000001 28744 Table_map 1 28783 table_id: 25 (test.t1) -master-bin.000001 28783 Write_rows 1 28817 table_id: 25 flags: STMT_END_F -master-bin.000001 28817 Table_map 1 28856 table_id: 25 (test.t1) -master-bin.000001 28856 Write_rows 1 28890 table_id: 25 flags: STMT_END_F -master-bin.000001 28890 Table_map 1 28929 table_id: 25 (test.t1) -master-bin.000001 28929 Write_rows 1 28963 table_id: 25 flags: STMT_END_F -master-bin.000001 28963 Table_map 1 29002 table_id: 25 (test.t1) -master-bin.000001 29002 Write_rows 1 29036 table_id: 25 flags: STMT_END_F -master-bin.000001 29036 Table_map 1 29075 table_id: 25 (test.t1) -master-bin.000001 29075 Write_rows 1 29109 table_id: 25 flags: STMT_END_F -master-bin.000001 29109 Table_map 1 29148 table_id: 25 (test.t1) -master-bin.000001 29148 Write_rows 1 29182 table_id: 25 flags: STMT_END_F -master-bin.000001 29182 Table_map 1 29221 table_id: 25 (test.t1) -master-bin.000001 29221 Write_rows 1 29255 table_id: 25 flags: STMT_END_F -master-bin.000001 29255 Table_map 1 29294 table_id: 25 (test.t1) -master-bin.000001 29294 Write_rows 1 29328 table_id: 25 flags: STMT_END_F -master-bin.000001 29328 Table_map 1 29367 table_id: 25 (test.t1) -master-bin.000001 29367 Write_rows 1 29401 table_id: 25 flags: STMT_END_F -master-bin.000001 29401 Table_map 1 29440 table_id: 25 (test.t1) -master-bin.000001 29440 Write_rows 1 29474 table_id: 25 flags: STMT_END_F -master-bin.000001 29474 Xid 1 29501 COMMIT /* xid=189 */ +master-bin.000001 274 Table_map 1 313 table_id: # (test.t1) +master-bin.000001 313 Write_rows 1 347 table_id: # flags: STMT_END_F +master-bin.000001 347 Table_map 1 386 table_id: # (test.t1) +master-bin.000001 386 Write_rows 1 420 table_id: # flags: STMT_END_F +master-bin.000001 420 Table_map 1 459 table_id: # (test.t1) +master-bin.000001 459 Write_rows 1 493 table_id: # flags: STMT_END_F +master-bin.000001 493 Table_map 1 532 table_id: # (test.t1) +master-bin.000001 532 Write_rows 1 566 table_id: # flags: STMT_END_F +master-bin.000001 566 Table_map 1 605 table_id: # (test.t1) +master-bin.000001 605 Write_rows 1 639 table_id: # flags: STMT_END_F +master-bin.000001 639 Table_map 1 678 table_id: # (test.t1) +master-bin.000001 678 Write_rows 1 712 table_id: # flags: STMT_END_F +master-bin.000001 712 Table_map 1 751 table_id: # (test.t1) +master-bin.000001 751 Write_rows 1 785 table_id: # flags: STMT_END_F +master-bin.000001 785 Table_map 1 824 table_id: # (test.t1) +master-bin.000001 824 Write_rows 1 858 table_id: # flags: STMT_END_F +master-bin.000001 858 Table_map 1 897 table_id: # (test.t1) +master-bin.000001 897 Write_rows 1 931 table_id: # flags: STMT_END_F +master-bin.000001 931 Table_map 1 970 table_id: # (test.t1) +master-bin.000001 970 Write_rows 1 1004 table_id: # flags: STMT_END_F +master-bin.000001 1004 Table_map 1 1043 table_id: # (test.t1) +master-bin.000001 1043 Write_rows 1 1077 table_id: # flags: STMT_END_F +master-bin.000001 1077 Table_map 1 1116 table_id: # (test.t1) +master-bin.000001 1116 Write_rows 1 1150 table_id: # flags: STMT_END_F +master-bin.000001 1150 Table_map 1 1189 table_id: # (test.t1) +master-bin.000001 1189 Write_rows 1 1223 table_id: # flags: STMT_END_F +master-bin.000001 1223 Table_map 1 1262 table_id: # (test.t1) +master-bin.000001 1262 Write_rows 1 1296 table_id: # flags: STMT_END_F +master-bin.000001 1296 Table_map 1 1335 table_id: # (test.t1) +master-bin.000001 1335 Write_rows 1 1369 table_id: # flags: STMT_END_F +master-bin.000001 1369 Table_map 1 1408 table_id: # (test.t1) +master-bin.000001 1408 Write_rows 1 1442 table_id: # flags: STMT_END_F +master-bin.000001 1442 Table_map 1 1481 table_id: # (test.t1) +master-bin.000001 1481 Write_rows 1 1515 table_id: # flags: STMT_END_F +master-bin.000001 1515 Table_map 1 1554 table_id: # (test.t1) +master-bin.000001 1554 Write_rows 1 1588 table_id: # flags: STMT_END_F +master-bin.000001 1588 Table_map 1 1627 table_id: # (test.t1) +master-bin.000001 1627 Write_rows 1 1661 table_id: # flags: STMT_END_F +master-bin.000001 1661 Table_map 1 1700 table_id: # (test.t1) +master-bin.000001 1700 Write_rows 1 1734 table_id: # flags: STMT_END_F +master-bin.000001 1734 Table_map 1 1773 table_id: # (test.t1) +master-bin.000001 1773 Write_rows 1 1807 table_id: # flags: STMT_END_F +master-bin.000001 1807 Table_map 1 1846 table_id: # (test.t1) +master-bin.000001 1846 Write_rows 1 1880 table_id: # flags: STMT_END_F +master-bin.000001 1880 Table_map 1 1919 table_id: # (test.t1) +master-bin.000001 1919 Write_rows 1 1953 table_id: # flags: STMT_END_F +master-bin.000001 1953 Table_map 1 1992 table_id: # (test.t1) +master-bin.000001 1992 Write_rows 1 2026 table_id: # flags: STMT_END_F +master-bin.000001 2026 Table_map 1 2065 table_id: # (test.t1) +master-bin.000001 2065 Write_rows 1 2099 table_id: # flags: STMT_END_F +master-bin.000001 2099 Table_map 1 2138 table_id: # (test.t1) +master-bin.000001 2138 Write_rows 1 2172 table_id: # flags: STMT_END_F +master-bin.000001 2172 Table_map 1 2211 table_id: # (test.t1) +master-bin.000001 2211 Write_rows 1 2245 table_id: # flags: STMT_END_F +master-bin.000001 2245 Table_map 1 2284 table_id: # (test.t1) +master-bin.000001 2284 Write_rows 1 2318 table_id: # flags: STMT_END_F +master-bin.000001 2318 Table_map 1 2357 table_id: # (test.t1) +master-bin.000001 2357 Write_rows 1 2391 table_id: # flags: STMT_END_F +master-bin.000001 2391 Table_map 1 2430 table_id: # (test.t1) +master-bin.000001 2430 Write_rows 1 2464 table_id: # flags: STMT_END_F +master-bin.000001 2464 Table_map 1 2503 table_id: # (test.t1) +master-bin.000001 2503 Write_rows 1 2537 table_id: # flags: STMT_END_F +master-bin.000001 2537 Table_map 1 2576 table_id: # (test.t1) +master-bin.000001 2576 Write_rows 1 2610 table_id: # flags: STMT_END_F +master-bin.000001 2610 Table_map 1 2649 table_id: # (test.t1) +master-bin.000001 2649 Write_rows 1 2683 table_id: # flags: STMT_END_F +master-bin.000001 2683 Table_map 1 2722 table_id: # (test.t1) +master-bin.000001 2722 Write_rows 1 2756 table_id: # flags: STMT_END_F +master-bin.000001 2756 Table_map 1 2795 table_id: # (test.t1) +master-bin.000001 2795 Write_rows 1 2829 table_id: # flags: STMT_END_F +master-bin.000001 2829 Table_map 1 2868 table_id: # (test.t1) +master-bin.000001 2868 Write_rows 1 2902 table_id: # flags: STMT_END_F +master-bin.000001 2902 Table_map 1 2941 table_id: # (test.t1) +master-bin.000001 2941 Write_rows 1 2975 table_id: # flags: STMT_END_F +master-bin.000001 2975 Table_map 1 3014 table_id: # (test.t1) +master-bin.000001 3014 Write_rows 1 3048 table_id: # flags: STMT_END_F +master-bin.000001 3048 Table_map 1 3087 table_id: # (test.t1) +master-bin.000001 3087 Write_rows 1 3121 table_id: # flags: STMT_END_F +master-bin.000001 3121 Table_map 1 3160 table_id: # (test.t1) +master-bin.000001 3160 Write_rows 1 3194 table_id: # flags: STMT_END_F +master-bin.000001 3194 Table_map 1 3233 table_id: # (test.t1) +master-bin.000001 3233 Write_rows 1 3267 table_id: # flags: STMT_END_F +master-bin.000001 3267 Table_map 1 3306 table_id: # (test.t1) +master-bin.000001 3306 Write_rows 1 3340 table_id: # flags: STMT_END_F +master-bin.000001 3340 Table_map 1 3379 table_id: # (test.t1) +master-bin.000001 3379 Write_rows 1 3413 table_id: # flags: STMT_END_F +master-bin.000001 3413 Table_map 1 3452 table_id: # (test.t1) +master-bin.000001 3452 Write_rows 1 3486 table_id: # flags: STMT_END_F +master-bin.000001 3486 Table_map 1 3525 table_id: # (test.t1) +master-bin.000001 3525 Write_rows 1 3559 table_id: # flags: STMT_END_F +master-bin.000001 3559 Table_map 1 3598 table_id: # (test.t1) +master-bin.000001 3598 Write_rows 1 3632 table_id: # flags: STMT_END_F +master-bin.000001 3632 Table_map 1 3671 table_id: # (test.t1) +master-bin.000001 3671 Write_rows 1 3705 table_id: # flags: STMT_END_F +master-bin.000001 3705 Table_map 1 3744 table_id: # (test.t1) +master-bin.000001 3744 Write_rows 1 3778 table_id: # flags: STMT_END_F +master-bin.000001 3778 Table_map 1 3817 table_id: # (test.t1) +master-bin.000001 3817 Write_rows 1 3851 table_id: # flags: STMT_END_F +master-bin.000001 3851 Table_map 1 3890 table_id: # (test.t1) +master-bin.000001 3890 Write_rows 1 3924 table_id: # flags: STMT_END_F +master-bin.000001 3924 Table_map 1 3963 table_id: # (test.t1) +master-bin.000001 3963 Write_rows 1 3997 table_id: # flags: STMT_END_F +master-bin.000001 3997 Table_map 1 4036 table_id: # (test.t1) +master-bin.000001 4036 Write_rows 1 4070 table_id: # flags: STMT_END_F +master-bin.000001 4070 Table_map 1 4109 table_id: # (test.t1) +master-bin.000001 4109 Write_rows 1 4143 table_id: # flags: STMT_END_F +master-bin.000001 4143 Table_map 1 4182 table_id: # (test.t1) +master-bin.000001 4182 Write_rows 1 4216 table_id: # flags: STMT_END_F +master-bin.000001 4216 Table_map 1 4255 table_id: # (test.t1) +master-bin.000001 4255 Write_rows 1 4289 table_id: # flags: STMT_END_F +master-bin.000001 4289 Table_map 1 4328 table_id: # (test.t1) +master-bin.000001 4328 Write_rows 1 4362 table_id: # flags: STMT_END_F +master-bin.000001 4362 Table_map 1 4401 table_id: # (test.t1) +master-bin.000001 4401 Write_rows 1 4435 table_id: # flags: STMT_END_F +master-bin.000001 4435 Table_map 1 4474 table_id: # (test.t1) +master-bin.000001 4474 Write_rows 1 4508 table_id: # flags: STMT_END_F +master-bin.000001 4508 Table_map 1 4547 table_id: # (test.t1) +master-bin.000001 4547 Write_rows 1 4581 table_id: # flags: STMT_END_F +master-bin.000001 4581 Table_map 1 4620 table_id: # (test.t1) +master-bin.000001 4620 Write_rows 1 4654 table_id: # flags: STMT_END_F +master-bin.000001 4654 Table_map 1 4693 table_id: # (test.t1) +master-bin.000001 4693 Write_rows 1 4727 table_id: # flags: STMT_END_F +master-bin.000001 4727 Table_map 1 4766 table_id: # (test.t1) +master-bin.000001 4766 Write_rows 1 4800 table_id: # flags: STMT_END_F +master-bin.000001 4800 Table_map 1 4839 table_id: # (test.t1) +master-bin.000001 4839 Write_rows 1 4873 table_id: # flags: STMT_END_F +master-bin.000001 4873 Table_map 1 4912 table_id: # (test.t1) +master-bin.000001 4912 Write_rows 1 4946 table_id: # flags: STMT_END_F +master-bin.000001 4946 Table_map 1 4985 table_id: # (test.t1) +master-bin.000001 4985 Write_rows 1 5019 table_id: # flags: STMT_END_F +master-bin.000001 5019 Table_map 1 5058 table_id: # (test.t1) +master-bin.000001 5058 Write_rows 1 5092 table_id: # flags: STMT_END_F +master-bin.000001 5092 Table_map 1 5131 table_id: # (test.t1) +master-bin.000001 5131 Write_rows 1 5165 table_id: # flags: STMT_END_F +master-bin.000001 5165 Table_map 1 5204 table_id: # (test.t1) +master-bin.000001 5204 Write_rows 1 5238 table_id: # flags: STMT_END_F +master-bin.000001 5238 Table_map 1 5277 table_id: # (test.t1) +master-bin.000001 5277 Write_rows 1 5311 table_id: # flags: STMT_END_F +master-bin.000001 5311 Table_map 1 5350 table_id: # (test.t1) +master-bin.000001 5350 Write_rows 1 5384 table_id: # flags: STMT_END_F +master-bin.000001 5384 Table_map 1 5423 table_id: # (test.t1) +master-bin.000001 5423 Write_rows 1 5457 table_id: # flags: STMT_END_F +master-bin.000001 5457 Table_map 1 5496 table_id: # (test.t1) +master-bin.000001 5496 Write_rows 1 5530 table_id: # flags: STMT_END_F +master-bin.000001 5530 Table_map 1 5569 table_id: # (test.t1) +master-bin.000001 5569 Write_rows 1 5603 table_id: # flags: STMT_END_F +master-bin.000001 5603 Table_map 1 5642 table_id: # (test.t1) +master-bin.000001 5642 Write_rows 1 5676 table_id: # flags: STMT_END_F +master-bin.000001 5676 Table_map 1 5715 table_id: # (test.t1) +master-bin.000001 5715 Write_rows 1 5749 table_id: # flags: STMT_END_F +master-bin.000001 5749 Table_map 1 5788 table_id: # (test.t1) +master-bin.000001 5788 Write_rows 1 5822 table_id: # flags: STMT_END_F +master-bin.000001 5822 Table_map 1 5861 table_id: # (test.t1) +master-bin.000001 5861 Write_rows 1 5895 table_id: # flags: STMT_END_F +master-bin.000001 5895 Table_map 1 5934 table_id: # (test.t1) +master-bin.000001 5934 Write_rows 1 5968 table_id: # flags: STMT_END_F +master-bin.000001 5968 Table_map 1 6007 table_id: # (test.t1) +master-bin.000001 6007 Write_rows 1 6041 table_id: # flags: STMT_END_F +master-bin.000001 6041 Table_map 1 6080 table_id: # (test.t1) +master-bin.000001 6080 Write_rows 1 6114 table_id: # flags: STMT_END_F +master-bin.000001 6114 Table_map 1 6153 table_id: # (test.t1) +master-bin.000001 6153 Write_rows 1 6187 table_id: # flags: STMT_END_F +master-bin.000001 6187 Table_map 1 6226 table_id: # (test.t1) +master-bin.000001 6226 Write_rows 1 6260 table_id: # flags: STMT_END_F +master-bin.000001 6260 Table_map 1 6299 table_id: # (test.t1) +master-bin.000001 6299 Write_rows 1 6333 table_id: # flags: STMT_END_F +master-bin.000001 6333 Table_map 1 6372 table_id: # (test.t1) +master-bin.000001 6372 Write_rows 1 6406 table_id: # flags: STMT_END_F +master-bin.000001 6406 Table_map 1 6445 table_id: # (test.t1) +master-bin.000001 6445 Write_rows 1 6479 table_id: # flags: STMT_END_F +master-bin.000001 6479 Table_map 1 6518 table_id: # (test.t1) +master-bin.000001 6518 Write_rows 1 6552 table_id: # flags: STMT_END_F +master-bin.000001 6552 Table_map 1 6591 table_id: # (test.t1) +master-bin.000001 6591 Write_rows 1 6625 table_id: # flags: STMT_END_F +master-bin.000001 6625 Table_map 1 6664 table_id: # (test.t1) +master-bin.000001 6664 Write_rows 1 6698 table_id: # flags: STMT_END_F +master-bin.000001 6698 Table_map 1 6737 table_id: # (test.t1) +master-bin.000001 6737 Write_rows 1 6771 table_id: # flags: STMT_END_F +master-bin.000001 6771 Table_map 1 6810 table_id: # (test.t1) +master-bin.000001 6810 Write_rows 1 6844 table_id: # flags: STMT_END_F +master-bin.000001 6844 Table_map 1 6883 table_id: # (test.t1) +master-bin.000001 6883 Write_rows 1 6917 table_id: # flags: STMT_END_F +master-bin.000001 6917 Table_map 1 6956 table_id: # (test.t1) +master-bin.000001 6956 Write_rows 1 6990 table_id: # flags: STMT_END_F +master-bin.000001 6990 Table_map 1 7029 table_id: # (test.t1) +master-bin.000001 7029 Write_rows 1 7063 table_id: # flags: STMT_END_F +master-bin.000001 7063 Table_map 1 7102 table_id: # (test.t1) +master-bin.000001 7102 Write_rows 1 7136 table_id: # flags: STMT_END_F +master-bin.000001 7136 Table_map 1 7175 table_id: # (test.t1) +master-bin.000001 7175 Write_rows 1 7209 table_id: # flags: STMT_END_F +master-bin.000001 7209 Table_map 1 7248 table_id: # (test.t1) +master-bin.000001 7248 Write_rows 1 7282 table_id: # flags: STMT_END_F +master-bin.000001 7282 Table_map 1 7321 table_id: # (test.t1) +master-bin.000001 7321 Write_rows 1 7355 table_id: # flags: STMT_END_F +master-bin.000001 7355 Table_map 1 7394 table_id: # (test.t1) +master-bin.000001 7394 Write_rows 1 7428 table_id: # flags: STMT_END_F +master-bin.000001 7428 Table_map 1 7467 table_id: # (test.t1) +master-bin.000001 7467 Write_rows 1 7501 table_id: # flags: STMT_END_F +master-bin.000001 7501 Table_map 1 7540 table_id: # (test.t1) +master-bin.000001 7540 Write_rows 1 7574 table_id: # flags: STMT_END_F +master-bin.000001 7574 Table_map 1 7613 table_id: # (test.t1) +master-bin.000001 7613 Write_rows 1 7647 table_id: # flags: STMT_END_F +master-bin.000001 7647 Table_map 1 7686 table_id: # (test.t1) +master-bin.000001 7686 Write_rows 1 7720 table_id: # flags: STMT_END_F +master-bin.000001 7720 Table_map 1 7759 table_id: # (test.t1) +master-bin.000001 7759 Write_rows 1 7793 table_id: # flags: STMT_END_F +master-bin.000001 7793 Table_map 1 7832 table_id: # (test.t1) +master-bin.000001 7832 Write_rows 1 7866 table_id: # flags: STMT_END_F +master-bin.000001 7866 Table_map 1 7905 table_id: # (test.t1) +master-bin.000001 7905 Write_rows 1 7939 table_id: # flags: STMT_END_F +master-bin.000001 7939 Table_map 1 7978 table_id: # (test.t1) +master-bin.000001 7978 Write_rows 1 8012 table_id: # flags: STMT_END_F +master-bin.000001 8012 Table_map 1 8051 table_id: # (test.t1) +master-bin.000001 8051 Write_rows 1 8085 table_id: # flags: STMT_END_F +master-bin.000001 8085 Table_map 1 8124 table_id: # (test.t1) +master-bin.000001 8124 Write_rows 1 8158 table_id: # flags: STMT_END_F +master-bin.000001 8158 Table_map 1 8197 table_id: # (test.t1) +master-bin.000001 8197 Write_rows 1 8231 table_id: # flags: STMT_END_F +master-bin.000001 8231 Table_map 1 8270 table_id: # (test.t1) +master-bin.000001 8270 Write_rows 1 8304 table_id: # flags: STMT_END_F +master-bin.000001 8304 Table_map 1 8343 table_id: # (test.t1) +master-bin.000001 8343 Write_rows 1 8377 table_id: # flags: STMT_END_F +master-bin.000001 8377 Table_map 1 8416 table_id: # (test.t1) +master-bin.000001 8416 Write_rows 1 8450 table_id: # flags: STMT_END_F +master-bin.000001 8450 Table_map 1 8489 table_id: # (test.t1) +master-bin.000001 8489 Write_rows 1 8523 table_id: # flags: STMT_END_F +master-bin.000001 8523 Table_map 1 8562 table_id: # (test.t1) +master-bin.000001 8562 Write_rows 1 8596 table_id: # flags: STMT_END_F +master-bin.000001 8596 Table_map 1 8635 table_id: # (test.t1) +master-bin.000001 8635 Write_rows 1 8669 table_id: # flags: STMT_END_F +master-bin.000001 8669 Table_map 1 8708 table_id: # (test.t1) +master-bin.000001 8708 Write_rows 1 8742 table_id: # flags: STMT_END_F +master-bin.000001 8742 Table_map 1 8781 table_id: # (test.t1) +master-bin.000001 8781 Write_rows 1 8815 table_id: # flags: STMT_END_F +master-bin.000001 8815 Table_map 1 8854 table_id: # (test.t1) +master-bin.000001 8854 Write_rows 1 8888 table_id: # flags: STMT_END_F +master-bin.000001 8888 Table_map 1 8927 table_id: # (test.t1) +master-bin.000001 8927 Write_rows 1 8961 table_id: # flags: STMT_END_F +master-bin.000001 8961 Table_map 1 9000 table_id: # (test.t1) +master-bin.000001 9000 Write_rows 1 9034 table_id: # flags: STMT_END_F +master-bin.000001 9034 Table_map 1 9073 table_id: # (test.t1) +master-bin.000001 9073 Write_rows 1 9107 table_id: # flags: STMT_END_F +master-bin.000001 9107 Table_map 1 9146 table_id: # (test.t1) +master-bin.000001 9146 Write_rows 1 9180 table_id: # flags: STMT_END_F +master-bin.000001 9180 Table_map 1 9219 table_id: # (test.t1) +master-bin.000001 9219 Write_rows 1 9253 table_id: # flags: STMT_END_F +master-bin.000001 9253 Table_map 1 9292 table_id: # (test.t1) +master-bin.000001 9292 Write_rows 1 9326 table_id: # flags: STMT_END_F +master-bin.000001 9326 Table_map 1 9365 table_id: # (test.t1) +master-bin.000001 9365 Write_rows 1 9399 table_id: # flags: STMT_END_F +master-bin.000001 9399 Table_map 1 9438 table_id: # (test.t1) +master-bin.000001 9438 Write_rows 1 9472 table_id: # flags: STMT_END_F +master-bin.000001 9472 Table_map 1 9511 table_id: # (test.t1) +master-bin.000001 9511 Write_rows 1 9545 table_id: # flags: STMT_END_F +master-bin.000001 9545 Table_map 1 9584 table_id: # (test.t1) +master-bin.000001 9584 Write_rows 1 9618 table_id: # flags: STMT_END_F +master-bin.000001 9618 Table_map 1 9657 table_id: # (test.t1) +master-bin.000001 9657 Write_rows 1 9691 table_id: # flags: STMT_END_F +master-bin.000001 9691 Table_map 1 9730 table_id: # (test.t1) +master-bin.000001 9730 Write_rows 1 9764 table_id: # flags: STMT_END_F +master-bin.000001 9764 Table_map 1 9803 table_id: # (test.t1) +master-bin.000001 9803 Write_rows 1 9837 table_id: # flags: STMT_END_F +master-bin.000001 9837 Table_map 1 9876 table_id: # (test.t1) +master-bin.000001 9876 Write_rows 1 9910 table_id: # flags: STMT_END_F +master-bin.000001 9910 Table_map 1 9949 table_id: # (test.t1) +master-bin.000001 9949 Write_rows 1 9983 table_id: # flags: STMT_END_F +master-bin.000001 9983 Table_map 1 10022 table_id: # (test.t1) +master-bin.000001 10022 Write_rows 1 10056 table_id: # flags: STMT_END_F +master-bin.000001 10056 Table_map 1 10095 table_id: # (test.t1) +master-bin.000001 10095 Write_rows 1 10129 table_id: # flags: STMT_END_F +master-bin.000001 10129 Table_map 1 10168 table_id: # (test.t1) +master-bin.000001 10168 Write_rows 1 10202 table_id: # flags: STMT_END_F +master-bin.000001 10202 Table_map 1 10241 table_id: # (test.t1) +master-bin.000001 10241 Write_rows 1 10275 table_id: # flags: STMT_END_F +master-bin.000001 10275 Table_map 1 10314 table_id: # (test.t1) +master-bin.000001 10314 Write_rows 1 10348 table_id: # flags: STMT_END_F +master-bin.000001 10348 Table_map 1 10387 table_id: # (test.t1) +master-bin.000001 10387 Write_rows 1 10421 table_id: # flags: STMT_END_F +master-bin.000001 10421 Table_map 1 10460 table_id: # (test.t1) +master-bin.000001 10460 Write_rows 1 10494 table_id: # flags: STMT_END_F +master-bin.000001 10494 Table_map 1 10533 table_id: # (test.t1) +master-bin.000001 10533 Write_rows 1 10567 table_id: # flags: STMT_END_F +master-bin.000001 10567 Table_map 1 10606 table_id: # (test.t1) +master-bin.000001 10606 Write_rows 1 10640 table_id: # flags: STMT_END_F +master-bin.000001 10640 Table_map 1 10679 table_id: # (test.t1) +master-bin.000001 10679 Write_rows 1 10713 table_id: # flags: STMT_END_F +master-bin.000001 10713 Table_map 1 10752 table_id: # (test.t1) +master-bin.000001 10752 Write_rows 1 10786 table_id: # flags: STMT_END_F +master-bin.000001 10786 Table_map 1 10825 table_id: # (test.t1) +master-bin.000001 10825 Write_rows 1 10859 table_id: # flags: STMT_END_F +master-bin.000001 10859 Table_map 1 10898 table_id: # (test.t1) +master-bin.000001 10898 Write_rows 1 10932 table_id: # flags: STMT_END_F +master-bin.000001 10932 Table_map 1 10971 table_id: # (test.t1) +master-bin.000001 10971 Write_rows 1 11005 table_id: # flags: STMT_END_F +master-bin.000001 11005 Table_map 1 11044 table_id: # (test.t1) +master-bin.000001 11044 Write_rows 1 11078 table_id: # flags: STMT_END_F +master-bin.000001 11078 Table_map 1 11117 table_id: # (test.t1) +master-bin.000001 11117 Write_rows 1 11151 table_id: # flags: STMT_END_F +master-bin.000001 11151 Table_map 1 11190 table_id: # (test.t1) +master-bin.000001 11190 Write_rows 1 11224 table_id: # flags: STMT_END_F +master-bin.000001 11224 Table_map 1 11263 table_id: # (test.t1) +master-bin.000001 11263 Write_rows 1 11297 table_id: # flags: STMT_END_F +master-bin.000001 11297 Table_map 1 11336 table_id: # (test.t1) +master-bin.000001 11336 Write_rows 1 11370 table_id: # flags: STMT_END_F +master-bin.000001 11370 Table_map 1 11409 table_id: # (test.t1) +master-bin.000001 11409 Write_rows 1 11443 table_id: # flags: STMT_END_F +master-bin.000001 11443 Table_map 1 11482 table_id: # (test.t1) +master-bin.000001 11482 Write_rows 1 11516 table_id: # flags: STMT_END_F +master-bin.000001 11516 Table_map 1 11555 table_id: # (test.t1) +master-bin.000001 11555 Write_rows 1 11589 table_id: # flags: STMT_END_F +master-bin.000001 11589 Table_map 1 11628 table_id: # (test.t1) +master-bin.000001 11628 Write_rows 1 11662 table_id: # flags: STMT_END_F +master-bin.000001 11662 Table_map 1 11701 table_id: # (test.t1) +master-bin.000001 11701 Write_rows 1 11735 table_id: # flags: STMT_END_F +master-bin.000001 11735 Table_map 1 11774 table_id: # (test.t1) +master-bin.000001 11774 Write_rows 1 11808 table_id: # flags: STMT_END_F +master-bin.000001 11808 Table_map 1 11847 table_id: # (test.t1) +master-bin.000001 11847 Write_rows 1 11881 table_id: # flags: STMT_END_F +master-bin.000001 11881 Table_map 1 11920 table_id: # (test.t1) +master-bin.000001 11920 Write_rows 1 11954 table_id: # flags: STMT_END_F +master-bin.000001 11954 Table_map 1 11993 table_id: # (test.t1) +master-bin.000001 11993 Write_rows 1 12027 table_id: # flags: STMT_END_F +master-bin.000001 12027 Table_map 1 12066 table_id: # (test.t1) +master-bin.000001 12066 Write_rows 1 12100 table_id: # flags: STMT_END_F +master-bin.000001 12100 Table_map 1 12139 table_id: # (test.t1) +master-bin.000001 12139 Write_rows 1 12173 table_id: # flags: STMT_END_F +master-bin.000001 12173 Table_map 1 12212 table_id: # (test.t1) +master-bin.000001 12212 Write_rows 1 12246 table_id: # flags: STMT_END_F +master-bin.000001 12246 Table_map 1 12285 table_id: # (test.t1) +master-bin.000001 12285 Write_rows 1 12319 table_id: # flags: STMT_END_F +master-bin.000001 12319 Table_map 1 12358 table_id: # (test.t1) +master-bin.000001 12358 Write_rows 1 12392 table_id: # flags: STMT_END_F +master-bin.000001 12392 Table_map 1 12431 table_id: # (test.t1) +master-bin.000001 12431 Write_rows 1 12465 table_id: # flags: STMT_END_F +master-bin.000001 12465 Table_map 1 12504 table_id: # (test.t1) +master-bin.000001 12504 Write_rows 1 12538 table_id: # flags: STMT_END_F +master-bin.000001 12538 Table_map 1 12577 table_id: # (test.t1) +master-bin.000001 12577 Write_rows 1 12611 table_id: # flags: STMT_END_F +master-bin.000001 12611 Table_map 1 12650 table_id: # (test.t1) +master-bin.000001 12650 Write_rows 1 12684 table_id: # flags: STMT_END_F +master-bin.000001 12684 Table_map 1 12723 table_id: # (test.t1) +master-bin.000001 12723 Write_rows 1 12757 table_id: # flags: STMT_END_F +master-bin.000001 12757 Table_map 1 12796 table_id: # (test.t1) +master-bin.000001 12796 Write_rows 1 12830 table_id: # flags: STMT_END_F +master-bin.000001 12830 Table_map 1 12869 table_id: # (test.t1) +master-bin.000001 12869 Write_rows 1 12903 table_id: # flags: STMT_END_F +master-bin.000001 12903 Table_map 1 12942 table_id: # (test.t1) +master-bin.000001 12942 Write_rows 1 12976 table_id: # flags: STMT_END_F +master-bin.000001 12976 Table_map 1 13015 table_id: # (test.t1) +master-bin.000001 13015 Write_rows 1 13049 table_id: # flags: STMT_END_F +master-bin.000001 13049 Table_map 1 13088 table_id: # (test.t1) +master-bin.000001 13088 Write_rows 1 13122 table_id: # flags: STMT_END_F +master-bin.000001 13122 Table_map 1 13161 table_id: # (test.t1) +master-bin.000001 13161 Write_rows 1 13195 table_id: # flags: STMT_END_F +master-bin.000001 13195 Table_map 1 13234 table_id: # (test.t1) +master-bin.000001 13234 Write_rows 1 13268 table_id: # flags: STMT_END_F +master-bin.000001 13268 Table_map 1 13307 table_id: # (test.t1) +master-bin.000001 13307 Write_rows 1 13341 table_id: # flags: STMT_END_F +master-bin.000001 13341 Table_map 1 13380 table_id: # (test.t1) +master-bin.000001 13380 Write_rows 1 13414 table_id: # flags: STMT_END_F +master-bin.000001 13414 Table_map 1 13453 table_id: # (test.t1) +master-bin.000001 13453 Write_rows 1 13487 table_id: # flags: STMT_END_F +master-bin.000001 13487 Table_map 1 13526 table_id: # (test.t1) +master-bin.000001 13526 Write_rows 1 13560 table_id: # flags: STMT_END_F +master-bin.000001 13560 Table_map 1 13599 table_id: # (test.t1) +master-bin.000001 13599 Write_rows 1 13633 table_id: # flags: STMT_END_F +master-bin.000001 13633 Table_map 1 13672 table_id: # (test.t1) +master-bin.000001 13672 Write_rows 1 13706 table_id: # flags: STMT_END_F +master-bin.000001 13706 Table_map 1 13745 table_id: # (test.t1) +master-bin.000001 13745 Write_rows 1 13779 table_id: # flags: STMT_END_F +master-bin.000001 13779 Table_map 1 13818 table_id: # (test.t1) +master-bin.000001 13818 Write_rows 1 13852 table_id: # flags: STMT_END_F +master-bin.000001 13852 Table_map 1 13891 table_id: # (test.t1) +master-bin.000001 13891 Write_rows 1 13925 table_id: # flags: STMT_END_F +master-bin.000001 13925 Table_map 1 13964 table_id: # (test.t1) +master-bin.000001 13964 Write_rows 1 13998 table_id: # flags: STMT_END_F +master-bin.000001 13998 Table_map 1 14037 table_id: # (test.t1) +master-bin.000001 14037 Write_rows 1 14071 table_id: # flags: STMT_END_F +master-bin.000001 14071 Table_map 1 14110 table_id: # (test.t1) +master-bin.000001 14110 Write_rows 1 14144 table_id: # flags: STMT_END_F +master-bin.000001 14144 Table_map 1 14183 table_id: # (test.t1) +master-bin.000001 14183 Write_rows 1 14217 table_id: # flags: STMT_END_F +master-bin.000001 14217 Table_map 1 14256 table_id: # (test.t1) +master-bin.000001 14256 Write_rows 1 14290 table_id: # flags: STMT_END_F +master-bin.000001 14290 Table_map 1 14329 table_id: # (test.t1) +master-bin.000001 14329 Write_rows 1 14363 table_id: # flags: STMT_END_F +master-bin.000001 14363 Table_map 1 14402 table_id: # (test.t1) +master-bin.000001 14402 Write_rows 1 14436 table_id: # flags: STMT_END_F +master-bin.000001 14436 Table_map 1 14475 table_id: # (test.t1) +master-bin.000001 14475 Write_rows 1 14509 table_id: # flags: STMT_END_F +master-bin.000001 14509 Table_map 1 14548 table_id: # (test.t1) +master-bin.000001 14548 Write_rows 1 14582 table_id: # flags: STMT_END_F +master-bin.000001 14582 Table_map 1 14621 table_id: # (test.t1) +master-bin.000001 14621 Write_rows 1 14655 table_id: # flags: STMT_END_F +master-bin.000001 14655 Table_map 1 14694 table_id: # (test.t1) +master-bin.000001 14694 Write_rows 1 14728 table_id: # flags: STMT_END_F +master-bin.000001 14728 Table_map 1 14767 table_id: # (test.t1) +master-bin.000001 14767 Write_rows 1 14801 table_id: # flags: STMT_END_F +master-bin.000001 14801 Table_map 1 14840 table_id: # (test.t1) +master-bin.000001 14840 Write_rows 1 14874 table_id: # flags: STMT_END_F +master-bin.000001 14874 Table_map 1 14913 table_id: # (test.t1) +master-bin.000001 14913 Write_rows 1 14947 table_id: # flags: STMT_END_F +master-bin.000001 14947 Table_map 1 14986 table_id: # (test.t1) +master-bin.000001 14986 Write_rows 1 15020 table_id: # flags: STMT_END_F +master-bin.000001 15020 Table_map 1 15059 table_id: # (test.t1) +master-bin.000001 15059 Write_rows 1 15093 table_id: # flags: STMT_END_F +master-bin.000001 15093 Table_map 1 15132 table_id: # (test.t1) +master-bin.000001 15132 Write_rows 1 15166 table_id: # flags: STMT_END_F +master-bin.000001 15166 Table_map 1 15205 table_id: # (test.t1) +master-bin.000001 15205 Write_rows 1 15239 table_id: # flags: STMT_END_F +master-bin.000001 15239 Table_map 1 15278 table_id: # (test.t1) +master-bin.000001 15278 Write_rows 1 15312 table_id: # flags: STMT_END_F +master-bin.000001 15312 Table_map 1 15351 table_id: # (test.t1) +master-bin.000001 15351 Write_rows 1 15385 table_id: # flags: STMT_END_F +master-bin.000001 15385 Table_map 1 15424 table_id: # (test.t1) +master-bin.000001 15424 Write_rows 1 15458 table_id: # flags: STMT_END_F +master-bin.000001 15458 Table_map 1 15497 table_id: # (test.t1) +master-bin.000001 15497 Write_rows 1 15531 table_id: # flags: STMT_END_F +master-bin.000001 15531 Table_map 1 15570 table_id: # (test.t1) +master-bin.000001 15570 Write_rows 1 15604 table_id: # flags: STMT_END_F +master-bin.000001 15604 Table_map 1 15643 table_id: # (test.t1) +master-bin.000001 15643 Write_rows 1 15677 table_id: # flags: STMT_END_F +master-bin.000001 15677 Table_map 1 15716 table_id: # (test.t1) +master-bin.000001 15716 Write_rows 1 15750 table_id: # flags: STMT_END_F +master-bin.000001 15750 Table_map 1 15789 table_id: # (test.t1) +master-bin.000001 15789 Write_rows 1 15823 table_id: # flags: STMT_END_F +master-bin.000001 15823 Table_map 1 15862 table_id: # (test.t1) +master-bin.000001 15862 Write_rows 1 15896 table_id: # flags: STMT_END_F +master-bin.000001 15896 Table_map 1 15935 table_id: # (test.t1) +master-bin.000001 15935 Write_rows 1 15969 table_id: # flags: STMT_END_F +master-bin.000001 15969 Table_map 1 16008 table_id: # (test.t1) +master-bin.000001 16008 Write_rows 1 16042 table_id: # flags: STMT_END_F +master-bin.000001 16042 Table_map 1 16081 table_id: # (test.t1) +master-bin.000001 16081 Write_rows 1 16115 table_id: # flags: STMT_END_F +master-bin.000001 16115 Table_map 1 16154 table_id: # (test.t1) +master-bin.000001 16154 Write_rows 1 16188 table_id: # flags: STMT_END_F +master-bin.000001 16188 Table_map 1 16227 table_id: # (test.t1) +master-bin.000001 16227 Write_rows 1 16261 table_id: # flags: STMT_END_F +master-bin.000001 16261 Table_map 1 16300 table_id: # (test.t1) +master-bin.000001 16300 Write_rows 1 16334 table_id: # flags: STMT_END_F +master-bin.000001 16334 Table_map 1 16373 table_id: # (test.t1) +master-bin.000001 16373 Write_rows 1 16407 table_id: # flags: STMT_END_F +master-bin.000001 16407 Table_map 1 16446 table_id: # (test.t1) +master-bin.000001 16446 Write_rows 1 16480 table_id: # flags: STMT_END_F +master-bin.000001 16480 Table_map 1 16519 table_id: # (test.t1) +master-bin.000001 16519 Write_rows 1 16553 table_id: # flags: STMT_END_F +master-bin.000001 16553 Table_map 1 16592 table_id: # (test.t1) +master-bin.000001 16592 Write_rows 1 16626 table_id: # flags: STMT_END_F +master-bin.000001 16626 Table_map 1 16665 table_id: # (test.t1) +master-bin.000001 16665 Write_rows 1 16699 table_id: # flags: STMT_END_F +master-bin.000001 16699 Table_map 1 16738 table_id: # (test.t1) +master-bin.000001 16738 Write_rows 1 16772 table_id: # flags: STMT_END_F +master-bin.000001 16772 Table_map 1 16811 table_id: # (test.t1) +master-bin.000001 16811 Write_rows 1 16845 table_id: # flags: STMT_END_F +master-bin.000001 16845 Table_map 1 16884 table_id: # (test.t1) +master-bin.000001 16884 Write_rows 1 16918 table_id: # flags: STMT_END_F +master-bin.000001 16918 Table_map 1 16957 table_id: # (test.t1) +master-bin.000001 16957 Write_rows 1 16991 table_id: # flags: STMT_END_F +master-bin.000001 16991 Table_map 1 17030 table_id: # (test.t1) +master-bin.000001 17030 Write_rows 1 17064 table_id: # flags: STMT_END_F +master-bin.000001 17064 Table_map 1 17103 table_id: # (test.t1) +master-bin.000001 17103 Write_rows 1 17137 table_id: # flags: STMT_END_F +master-bin.000001 17137 Table_map 1 17176 table_id: # (test.t1) +master-bin.000001 17176 Write_rows 1 17210 table_id: # flags: STMT_END_F +master-bin.000001 17210 Table_map 1 17249 table_id: # (test.t1) +master-bin.000001 17249 Write_rows 1 17283 table_id: # flags: STMT_END_F +master-bin.000001 17283 Table_map 1 17322 table_id: # (test.t1) +master-bin.000001 17322 Write_rows 1 17356 table_id: # flags: STMT_END_F +master-bin.000001 17356 Table_map 1 17395 table_id: # (test.t1) +master-bin.000001 17395 Write_rows 1 17429 table_id: # flags: STMT_END_F +master-bin.000001 17429 Table_map 1 17468 table_id: # (test.t1) +master-bin.000001 17468 Write_rows 1 17502 table_id: # flags: STMT_END_F +master-bin.000001 17502 Table_map 1 17541 table_id: # (test.t1) +master-bin.000001 17541 Write_rows 1 17575 table_id: # flags: STMT_END_F +master-bin.000001 17575 Table_map 1 17614 table_id: # (test.t1) +master-bin.000001 17614 Write_rows 1 17648 table_id: # flags: STMT_END_F +master-bin.000001 17648 Table_map 1 17687 table_id: # (test.t1) +master-bin.000001 17687 Write_rows 1 17721 table_id: # flags: STMT_END_F +master-bin.000001 17721 Table_map 1 17760 table_id: # (test.t1) +master-bin.000001 17760 Write_rows 1 17794 table_id: # flags: STMT_END_F +master-bin.000001 17794 Table_map 1 17833 table_id: # (test.t1) +master-bin.000001 17833 Write_rows 1 17867 table_id: # flags: STMT_END_F +master-bin.000001 17867 Table_map 1 17906 table_id: # (test.t1) +master-bin.000001 17906 Write_rows 1 17940 table_id: # flags: STMT_END_F +master-bin.000001 17940 Table_map 1 17979 table_id: # (test.t1) +master-bin.000001 17979 Write_rows 1 18013 table_id: # flags: STMT_END_F +master-bin.000001 18013 Table_map 1 18052 table_id: # (test.t1) +master-bin.000001 18052 Write_rows 1 18086 table_id: # flags: STMT_END_F +master-bin.000001 18086 Table_map 1 18125 table_id: # (test.t1) +master-bin.000001 18125 Write_rows 1 18159 table_id: # flags: STMT_END_F +master-bin.000001 18159 Table_map 1 18198 table_id: # (test.t1) +master-bin.000001 18198 Write_rows 1 18232 table_id: # flags: STMT_END_F +master-bin.000001 18232 Table_map 1 18271 table_id: # (test.t1) +master-bin.000001 18271 Write_rows 1 18305 table_id: # flags: STMT_END_F +master-bin.000001 18305 Table_map 1 18344 table_id: # (test.t1) +master-bin.000001 18344 Write_rows 1 18378 table_id: # flags: STMT_END_F +master-bin.000001 18378 Table_map 1 18417 table_id: # (test.t1) +master-bin.000001 18417 Write_rows 1 18451 table_id: # flags: STMT_END_F +master-bin.000001 18451 Table_map 1 18490 table_id: # (test.t1) +master-bin.000001 18490 Write_rows 1 18524 table_id: # flags: STMT_END_F +master-bin.000001 18524 Table_map 1 18563 table_id: # (test.t1) +master-bin.000001 18563 Write_rows 1 18597 table_id: # flags: STMT_END_F +master-bin.000001 18597 Table_map 1 18636 table_id: # (test.t1) +master-bin.000001 18636 Write_rows 1 18670 table_id: # flags: STMT_END_F +master-bin.000001 18670 Table_map 1 18709 table_id: # (test.t1) +master-bin.000001 18709 Write_rows 1 18743 table_id: # flags: STMT_END_F +master-bin.000001 18743 Table_map 1 18782 table_id: # (test.t1) +master-bin.000001 18782 Write_rows 1 18816 table_id: # flags: STMT_END_F +master-bin.000001 18816 Table_map 1 18855 table_id: # (test.t1) +master-bin.000001 18855 Write_rows 1 18889 table_id: # flags: STMT_END_F +master-bin.000001 18889 Table_map 1 18928 table_id: # (test.t1) +master-bin.000001 18928 Write_rows 1 18962 table_id: # flags: STMT_END_F +master-bin.000001 18962 Table_map 1 19001 table_id: # (test.t1) +master-bin.000001 19001 Write_rows 1 19035 table_id: # flags: STMT_END_F +master-bin.000001 19035 Table_map 1 19074 table_id: # (test.t1) +master-bin.000001 19074 Write_rows 1 19108 table_id: # flags: STMT_END_F +master-bin.000001 19108 Table_map 1 19147 table_id: # (test.t1) +master-bin.000001 19147 Write_rows 1 19181 table_id: # flags: STMT_END_F +master-bin.000001 19181 Table_map 1 19220 table_id: # (test.t1) +master-bin.000001 19220 Write_rows 1 19254 table_id: # flags: STMT_END_F +master-bin.000001 19254 Table_map 1 19293 table_id: # (test.t1) +master-bin.000001 19293 Write_rows 1 19327 table_id: # flags: STMT_END_F +master-bin.000001 19327 Table_map 1 19366 table_id: # (test.t1) +master-bin.000001 19366 Write_rows 1 19400 table_id: # flags: STMT_END_F +master-bin.000001 19400 Table_map 1 19439 table_id: # (test.t1) +master-bin.000001 19439 Write_rows 1 19473 table_id: # flags: STMT_END_F +master-bin.000001 19473 Table_map 1 19512 table_id: # (test.t1) +master-bin.000001 19512 Write_rows 1 19546 table_id: # flags: STMT_END_F +master-bin.000001 19546 Table_map 1 19585 table_id: # (test.t1) +master-bin.000001 19585 Write_rows 1 19619 table_id: # flags: STMT_END_F +master-bin.000001 19619 Table_map 1 19658 table_id: # (test.t1) +master-bin.000001 19658 Write_rows 1 19692 table_id: # flags: STMT_END_F +master-bin.000001 19692 Table_map 1 19731 table_id: # (test.t1) +master-bin.000001 19731 Write_rows 1 19765 table_id: # flags: STMT_END_F +master-bin.000001 19765 Table_map 1 19804 table_id: # (test.t1) +master-bin.000001 19804 Write_rows 1 19838 table_id: # flags: STMT_END_F +master-bin.000001 19838 Table_map 1 19877 table_id: # (test.t1) +master-bin.000001 19877 Write_rows 1 19911 table_id: # flags: STMT_END_F +master-bin.000001 19911 Table_map 1 19950 table_id: # (test.t1) +master-bin.000001 19950 Write_rows 1 19984 table_id: # flags: STMT_END_F +master-bin.000001 19984 Table_map 1 20023 table_id: # (test.t1) +master-bin.000001 20023 Write_rows 1 20057 table_id: # flags: STMT_END_F +master-bin.000001 20057 Table_map 1 20096 table_id: # (test.t1) +master-bin.000001 20096 Write_rows 1 20130 table_id: # flags: STMT_END_F +master-bin.000001 20130 Table_map 1 20169 table_id: # (test.t1) +master-bin.000001 20169 Write_rows 1 20203 table_id: # flags: STMT_END_F +master-bin.000001 20203 Table_map 1 20242 table_id: # (test.t1) +master-bin.000001 20242 Write_rows 1 20276 table_id: # flags: STMT_END_F +master-bin.000001 20276 Table_map 1 20315 table_id: # (test.t1) +master-bin.000001 20315 Write_rows 1 20349 table_id: # flags: STMT_END_F +master-bin.000001 20349 Table_map 1 20388 table_id: # (test.t1) +master-bin.000001 20388 Write_rows 1 20422 table_id: # flags: STMT_END_F +master-bin.000001 20422 Table_map 1 20461 table_id: # (test.t1) +master-bin.000001 20461 Write_rows 1 20495 table_id: # flags: STMT_END_F +master-bin.000001 20495 Table_map 1 20534 table_id: # (test.t1) +master-bin.000001 20534 Write_rows 1 20568 table_id: # flags: STMT_END_F +master-bin.000001 20568 Table_map 1 20607 table_id: # (test.t1) +master-bin.000001 20607 Write_rows 1 20641 table_id: # flags: STMT_END_F +master-bin.000001 20641 Table_map 1 20680 table_id: # (test.t1) +master-bin.000001 20680 Write_rows 1 20714 table_id: # flags: STMT_END_F +master-bin.000001 20714 Table_map 1 20753 table_id: # (test.t1) +master-bin.000001 20753 Write_rows 1 20787 table_id: # flags: STMT_END_F +master-bin.000001 20787 Table_map 1 20826 table_id: # (test.t1) +master-bin.000001 20826 Write_rows 1 20860 table_id: # flags: STMT_END_F +master-bin.000001 20860 Table_map 1 20899 table_id: # (test.t1) +master-bin.000001 20899 Write_rows 1 20933 table_id: # flags: STMT_END_F +master-bin.000001 20933 Table_map 1 20972 table_id: # (test.t1) +master-bin.000001 20972 Write_rows 1 21006 table_id: # flags: STMT_END_F +master-bin.000001 21006 Table_map 1 21045 table_id: # (test.t1) +master-bin.000001 21045 Write_rows 1 21079 table_id: # flags: STMT_END_F +master-bin.000001 21079 Table_map 1 21118 table_id: # (test.t1) +master-bin.000001 21118 Write_rows 1 21152 table_id: # flags: STMT_END_F +master-bin.000001 21152 Table_map 1 21191 table_id: # (test.t1) +master-bin.000001 21191 Write_rows 1 21225 table_id: # flags: STMT_END_F +master-bin.000001 21225 Table_map 1 21264 table_id: # (test.t1) +master-bin.000001 21264 Write_rows 1 21298 table_id: # flags: STMT_END_F +master-bin.000001 21298 Table_map 1 21337 table_id: # (test.t1) +master-bin.000001 21337 Write_rows 1 21371 table_id: # flags: STMT_END_F +master-bin.000001 21371 Table_map 1 21410 table_id: # (test.t1) +master-bin.000001 21410 Write_rows 1 21444 table_id: # flags: STMT_END_F +master-bin.000001 21444 Table_map 1 21483 table_id: # (test.t1) +master-bin.000001 21483 Write_rows 1 21517 table_id: # flags: STMT_END_F +master-bin.000001 21517 Table_map 1 21556 table_id: # (test.t1) +master-bin.000001 21556 Write_rows 1 21590 table_id: # flags: STMT_END_F +master-bin.000001 21590 Table_map 1 21629 table_id: # (test.t1) +master-bin.000001 21629 Write_rows 1 21663 table_id: # flags: STMT_END_F +master-bin.000001 21663 Table_map 1 21702 table_id: # (test.t1) +master-bin.000001 21702 Write_rows 1 21736 table_id: # flags: STMT_END_F +master-bin.000001 21736 Table_map 1 21775 table_id: # (test.t1) +master-bin.000001 21775 Write_rows 1 21809 table_id: # flags: STMT_END_F +master-bin.000001 21809 Table_map 1 21848 table_id: # (test.t1) +master-bin.000001 21848 Write_rows 1 21882 table_id: # flags: STMT_END_F +master-bin.000001 21882 Table_map 1 21921 table_id: # (test.t1) +master-bin.000001 21921 Write_rows 1 21955 table_id: # flags: STMT_END_F +master-bin.000001 21955 Table_map 1 21994 table_id: # (test.t1) +master-bin.000001 21994 Write_rows 1 22028 table_id: # flags: STMT_END_F +master-bin.000001 22028 Table_map 1 22067 table_id: # (test.t1) +master-bin.000001 22067 Write_rows 1 22101 table_id: # flags: STMT_END_F +master-bin.000001 22101 Table_map 1 22140 table_id: # (test.t1) +master-bin.000001 22140 Write_rows 1 22174 table_id: # flags: STMT_END_F +master-bin.000001 22174 Table_map 1 22213 table_id: # (test.t1) +master-bin.000001 22213 Write_rows 1 22247 table_id: # flags: STMT_END_F +master-bin.000001 22247 Table_map 1 22286 table_id: # (test.t1) +master-bin.000001 22286 Write_rows 1 22320 table_id: # flags: STMT_END_F +master-bin.000001 22320 Table_map 1 22359 table_id: # (test.t1) +master-bin.000001 22359 Write_rows 1 22393 table_id: # flags: STMT_END_F +master-bin.000001 22393 Table_map 1 22432 table_id: # (test.t1) +master-bin.000001 22432 Write_rows 1 22466 table_id: # flags: STMT_END_F +master-bin.000001 22466 Table_map 1 22505 table_id: # (test.t1) +master-bin.000001 22505 Write_rows 1 22539 table_id: # flags: STMT_END_F +master-bin.000001 22539 Table_map 1 22578 table_id: # (test.t1) +master-bin.000001 22578 Write_rows 1 22612 table_id: # flags: STMT_END_F +master-bin.000001 22612 Table_map 1 22651 table_id: # (test.t1) +master-bin.000001 22651 Write_rows 1 22685 table_id: # flags: STMT_END_F +master-bin.000001 22685 Table_map 1 22724 table_id: # (test.t1) +master-bin.000001 22724 Write_rows 1 22758 table_id: # flags: STMT_END_F +master-bin.000001 22758 Table_map 1 22797 table_id: # (test.t1) +master-bin.000001 22797 Write_rows 1 22831 table_id: # flags: STMT_END_F +master-bin.000001 22831 Table_map 1 22870 table_id: # (test.t1) +master-bin.000001 22870 Write_rows 1 22904 table_id: # flags: STMT_END_F +master-bin.000001 22904 Table_map 1 22943 table_id: # (test.t1) +master-bin.000001 22943 Write_rows 1 22977 table_id: # flags: STMT_END_F +master-bin.000001 22977 Table_map 1 23016 table_id: # (test.t1) +master-bin.000001 23016 Write_rows 1 23050 table_id: # flags: STMT_END_F +master-bin.000001 23050 Table_map 1 23089 table_id: # (test.t1) +master-bin.000001 23089 Write_rows 1 23123 table_id: # flags: STMT_END_F +master-bin.000001 23123 Table_map 1 23162 table_id: # (test.t1) +master-bin.000001 23162 Write_rows 1 23196 table_id: # flags: STMT_END_F +master-bin.000001 23196 Table_map 1 23235 table_id: # (test.t1) +master-bin.000001 23235 Write_rows 1 23269 table_id: # flags: STMT_END_F +master-bin.000001 23269 Table_map 1 23308 table_id: # (test.t1) +master-bin.000001 23308 Write_rows 1 23342 table_id: # flags: STMT_END_F +master-bin.000001 23342 Table_map 1 23381 table_id: # (test.t1) +master-bin.000001 23381 Write_rows 1 23415 table_id: # flags: STMT_END_F +master-bin.000001 23415 Table_map 1 23454 table_id: # (test.t1) +master-bin.000001 23454 Write_rows 1 23488 table_id: # flags: STMT_END_F +master-bin.000001 23488 Table_map 1 23527 table_id: # (test.t1) +master-bin.000001 23527 Write_rows 1 23561 table_id: # flags: STMT_END_F +master-bin.000001 23561 Table_map 1 23600 table_id: # (test.t1) +master-bin.000001 23600 Write_rows 1 23634 table_id: # flags: STMT_END_F +master-bin.000001 23634 Table_map 1 23673 table_id: # (test.t1) +master-bin.000001 23673 Write_rows 1 23707 table_id: # flags: STMT_END_F +master-bin.000001 23707 Table_map 1 23746 table_id: # (test.t1) +master-bin.000001 23746 Write_rows 1 23780 table_id: # flags: STMT_END_F +master-bin.000001 23780 Table_map 1 23819 table_id: # (test.t1) +master-bin.000001 23819 Write_rows 1 23853 table_id: # flags: STMT_END_F +master-bin.000001 23853 Table_map 1 23892 table_id: # (test.t1) +master-bin.000001 23892 Write_rows 1 23926 table_id: # flags: STMT_END_F +master-bin.000001 23926 Table_map 1 23965 table_id: # (test.t1) +master-bin.000001 23965 Write_rows 1 23999 table_id: # flags: STMT_END_F +master-bin.000001 23999 Table_map 1 24038 table_id: # (test.t1) +master-bin.000001 24038 Write_rows 1 24072 table_id: # flags: STMT_END_F +master-bin.000001 24072 Table_map 1 24111 table_id: # (test.t1) +master-bin.000001 24111 Write_rows 1 24145 table_id: # flags: STMT_END_F +master-bin.000001 24145 Table_map 1 24184 table_id: # (test.t1) +master-bin.000001 24184 Write_rows 1 24218 table_id: # flags: STMT_END_F +master-bin.000001 24218 Table_map 1 24257 table_id: # (test.t1) +master-bin.000001 24257 Write_rows 1 24291 table_id: # flags: STMT_END_F +master-bin.000001 24291 Table_map 1 24330 table_id: # (test.t1) +master-bin.000001 24330 Write_rows 1 24364 table_id: # flags: STMT_END_F +master-bin.000001 24364 Table_map 1 24403 table_id: # (test.t1) +master-bin.000001 24403 Write_rows 1 24437 table_id: # flags: STMT_END_F +master-bin.000001 24437 Table_map 1 24476 table_id: # (test.t1) +master-bin.000001 24476 Write_rows 1 24510 table_id: # flags: STMT_END_F +master-bin.000001 24510 Table_map 1 24549 table_id: # (test.t1) +master-bin.000001 24549 Write_rows 1 24583 table_id: # flags: STMT_END_F +master-bin.000001 24583 Table_map 1 24622 table_id: # (test.t1) +master-bin.000001 24622 Write_rows 1 24656 table_id: # flags: STMT_END_F +master-bin.000001 24656 Table_map 1 24695 table_id: # (test.t1) +master-bin.000001 24695 Write_rows 1 24729 table_id: # flags: STMT_END_F +master-bin.000001 24729 Table_map 1 24768 table_id: # (test.t1) +master-bin.000001 24768 Write_rows 1 24802 table_id: # flags: STMT_END_F +master-bin.000001 24802 Table_map 1 24841 table_id: # (test.t1) +master-bin.000001 24841 Write_rows 1 24875 table_id: # flags: STMT_END_F +master-bin.000001 24875 Table_map 1 24914 table_id: # (test.t1) +master-bin.000001 24914 Write_rows 1 24948 table_id: # flags: STMT_END_F +master-bin.000001 24948 Table_map 1 24987 table_id: # (test.t1) +master-bin.000001 24987 Write_rows 1 25021 table_id: # flags: STMT_END_F +master-bin.000001 25021 Table_map 1 25060 table_id: # (test.t1) +master-bin.000001 25060 Write_rows 1 25094 table_id: # flags: STMT_END_F +master-bin.000001 25094 Table_map 1 25133 table_id: # (test.t1) +master-bin.000001 25133 Write_rows 1 25167 table_id: # flags: STMT_END_F +master-bin.000001 25167 Table_map 1 25206 table_id: # (test.t1) +master-bin.000001 25206 Write_rows 1 25240 table_id: # flags: STMT_END_F +master-bin.000001 25240 Table_map 1 25279 table_id: # (test.t1) +master-bin.000001 25279 Write_rows 1 25313 table_id: # flags: STMT_END_F +master-bin.000001 25313 Table_map 1 25352 table_id: # (test.t1) +master-bin.000001 25352 Write_rows 1 25386 table_id: # flags: STMT_END_F +master-bin.000001 25386 Table_map 1 25425 table_id: # (test.t1) +master-bin.000001 25425 Write_rows 1 25459 table_id: # flags: STMT_END_F +master-bin.000001 25459 Table_map 1 25498 table_id: # (test.t1) +master-bin.000001 25498 Write_rows 1 25532 table_id: # flags: STMT_END_F +master-bin.000001 25532 Table_map 1 25571 table_id: # (test.t1) +master-bin.000001 25571 Write_rows 1 25605 table_id: # flags: STMT_END_F +master-bin.000001 25605 Table_map 1 25644 table_id: # (test.t1) +master-bin.000001 25644 Write_rows 1 25678 table_id: # flags: STMT_END_F +master-bin.000001 25678 Table_map 1 25717 table_id: # (test.t1) +master-bin.000001 25717 Write_rows 1 25751 table_id: # flags: STMT_END_F +master-bin.000001 25751 Table_map 1 25790 table_id: # (test.t1) +master-bin.000001 25790 Write_rows 1 25824 table_id: # flags: STMT_END_F +master-bin.000001 25824 Table_map 1 25863 table_id: # (test.t1) +master-bin.000001 25863 Write_rows 1 25897 table_id: # flags: STMT_END_F +master-bin.000001 25897 Table_map 1 25936 table_id: # (test.t1) +master-bin.000001 25936 Write_rows 1 25970 table_id: # flags: STMT_END_F +master-bin.000001 25970 Table_map 1 26009 table_id: # (test.t1) +master-bin.000001 26009 Write_rows 1 26043 table_id: # flags: STMT_END_F +master-bin.000001 26043 Table_map 1 26082 table_id: # (test.t1) +master-bin.000001 26082 Write_rows 1 26116 table_id: # flags: STMT_END_F +master-bin.000001 26116 Table_map 1 26155 table_id: # (test.t1) +master-bin.000001 26155 Write_rows 1 26189 table_id: # flags: STMT_END_F +master-bin.000001 26189 Table_map 1 26228 table_id: # (test.t1) +master-bin.000001 26228 Write_rows 1 26262 table_id: # flags: STMT_END_F +master-bin.000001 26262 Table_map 1 26301 table_id: # (test.t1) +master-bin.000001 26301 Write_rows 1 26335 table_id: # flags: STMT_END_F +master-bin.000001 26335 Table_map 1 26374 table_id: # (test.t1) +master-bin.000001 26374 Write_rows 1 26408 table_id: # flags: STMT_END_F +master-bin.000001 26408 Table_map 1 26447 table_id: # (test.t1) +master-bin.000001 26447 Write_rows 1 26481 table_id: # flags: STMT_END_F +master-bin.000001 26481 Table_map 1 26520 table_id: # (test.t1) +master-bin.000001 26520 Write_rows 1 26554 table_id: # flags: STMT_END_F +master-bin.000001 26554 Table_map 1 26593 table_id: # (test.t1) +master-bin.000001 26593 Write_rows 1 26627 table_id: # flags: STMT_END_F +master-bin.000001 26627 Table_map 1 26666 table_id: # (test.t1) +master-bin.000001 26666 Write_rows 1 26700 table_id: # flags: STMT_END_F +master-bin.000001 26700 Table_map 1 26739 table_id: # (test.t1) +master-bin.000001 26739 Write_rows 1 26773 table_id: # flags: STMT_END_F +master-bin.000001 26773 Table_map 1 26812 table_id: # (test.t1) +master-bin.000001 26812 Write_rows 1 26846 table_id: # flags: STMT_END_F +master-bin.000001 26846 Table_map 1 26885 table_id: # (test.t1) +master-bin.000001 26885 Write_rows 1 26919 table_id: # flags: STMT_END_F +master-bin.000001 26919 Table_map 1 26958 table_id: # (test.t1) +master-bin.000001 26958 Write_rows 1 26992 table_id: # flags: STMT_END_F +master-bin.000001 26992 Table_map 1 27031 table_id: # (test.t1) +master-bin.000001 27031 Write_rows 1 27065 table_id: # flags: STMT_END_F +master-bin.000001 27065 Table_map 1 27104 table_id: # (test.t1) +master-bin.000001 27104 Write_rows 1 27138 table_id: # flags: STMT_END_F +master-bin.000001 27138 Table_map 1 27177 table_id: # (test.t1) +master-bin.000001 27177 Write_rows 1 27211 table_id: # flags: STMT_END_F +master-bin.000001 27211 Table_map 1 27250 table_id: # (test.t1) +master-bin.000001 27250 Write_rows 1 27284 table_id: # flags: STMT_END_F +master-bin.000001 27284 Table_map 1 27323 table_id: # (test.t1) +master-bin.000001 27323 Write_rows 1 27357 table_id: # flags: STMT_END_F +master-bin.000001 27357 Table_map 1 27396 table_id: # (test.t1) +master-bin.000001 27396 Write_rows 1 27430 table_id: # flags: STMT_END_F +master-bin.000001 27430 Table_map 1 27469 table_id: # (test.t1) +master-bin.000001 27469 Write_rows 1 27503 table_id: # flags: STMT_END_F +master-bin.000001 27503 Table_map 1 27542 table_id: # (test.t1) +master-bin.000001 27542 Write_rows 1 27576 table_id: # flags: STMT_END_F +master-bin.000001 27576 Table_map 1 27615 table_id: # (test.t1) +master-bin.000001 27615 Write_rows 1 27649 table_id: # flags: STMT_END_F +master-bin.000001 27649 Table_map 1 27688 table_id: # (test.t1) +master-bin.000001 27688 Write_rows 1 27722 table_id: # flags: STMT_END_F +master-bin.000001 27722 Table_map 1 27761 table_id: # (test.t1) +master-bin.000001 27761 Write_rows 1 27795 table_id: # flags: STMT_END_F +master-bin.000001 27795 Table_map 1 27834 table_id: # (test.t1) +master-bin.000001 27834 Write_rows 1 27868 table_id: # flags: STMT_END_F +master-bin.000001 27868 Table_map 1 27907 table_id: # (test.t1) +master-bin.000001 27907 Write_rows 1 27941 table_id: # flags: STMT_END_F +master-bin.000001 27941 Table_map 1 27980 table_id: # (test.t1) +master-bin.000001 27980 Write_rows 1 28014 table_id: # flags: STMT_END_F +master-bin.000001 28014 Table_map 1 28053 table_id: # (test.t1) +master-bin.000001 28053 Write_rows 1 28087 table_id: # flags: STMT_END_F +master-bin.000001 28087 Table_map 1 28126 table_id: # (test.t1) +master-bin.000001 28126 Write_rows 1 28160 table_id: # flags: STMT_END_F +master-bin.000001 28160 Table_map 1 28199 table_id: # (test.t1) +master-bin.000001 28199 Write_rows 1 28233 table_id: # flags: STMT_END_F +master-bin.000001 28233 Table_map 1 28272 table_id: # (test.t1) +master-bin.000001 28272 Write_rows 1 28306 table_id: # flags: STMT_END_F +master-bin.000001 28306 Table_map 1 28345 table_id: # (test.t1) +master-bin.000001 28345 Write_rows 1 28379 table_id: # flags: STMT_END_F +master-bin.000001 28379 Table_map 1 28418 table_id: # (test.t1) +master-bin.000001 28418 Write_rows 1 28452 table_id: # flags: STMT_END_F +master-bin.000001 28452 Table_map 1 28491 table_id: # (test.t1) +master-bin.000001 28491 Write_rows 1 28525 table_id: # flags: STMT_END_F +master-bin.000001 28525 Table_map 1 28564 table_id: # (test.t1) +master-bin.000001 28564 Write_rows 1 28598 table_id: # flags: STMT_END_F +master-bin.000001 28598 Table_map 1 28637 table_id: # (test.t1) +master-bin.000001 28637 Write_rows 1 28671 table_id: # flags: STMT_END_F +master-bin.000001 28671 Table_map 1 28710 table_id: # (test.t1) +master-bin.000001 28710 Write_rows 1 28744 table_id: # flags: STMT_END_F +master-bin.000001 28744 Table_map 1 28783 table_id: # (test.t1) +master-bin.000001 28783 Write_rows 1 28817 table_id: # flags: STMT_END_F +master-bin.000001 28817 Table_map 1 28856 table_id: # (test.t1) +master-bin.000001 28856 Write_rows 1 28890 table_id: # flags: STMT_END_F +master-bin.000001 28890 Table_map 1 28929 table_id: # (test.t1) +master-bin.000001 28929 Write_rows 1 28963 table_id: # flags: STMT_END_F +master-bin.000001 28963 Table_map 1 29002 table_id: # (test.t1) +master-bin.000001 29002 Write_rows 1 29036 table_id: # flags: STMT_END_F +master-bin.000001 29036 Table_map 1 29075 table_id: # (test.t1) +master-bin.000001 29075 Write_rows 1 29109 table_id: # flags: STMT_END_F +master-bin.000001 29109 Table_map 1 29148 table_id: # (test.t1) +master-bin.000001 29148 Write_rows 1 29182 table_id: # flags: STMT_END_F +master-bin.000001 29182 Table_map 1 29221 table_id: # (test.t1) +master-bin.000001 29221 Write_rows 1 29255 table_id: # flags: STMT_END_F +master-bin.000001 29255 Table_map 1 29294 table_id: # (test.t1) +master-bin.000001 29294 Write_rows 1 29328 table_id: # flags: STMT_END_F +master-bin.000001 29328 Table_map 1 29367 table_id: # (test.t1) +master-bin.000001 29367 Write_rows 1 29401 table_id: # flags: STMT_END_F +master-bin.000001 29401 Table_map 1 29440 table_id: # (test.t1) +master-bin.000001 29440 Write_rows 1 29474 table_id: # flags: STMT_END_F +master-bin.000001 29474 Xid 1 29501 COMMIT /* XID */ master-bin.000001 29501 Rotate 1 29545 master-bin.000002;pos=4 drop table t1; set global binlog_cache_size=@bcs; diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index 45fef628357..238cafa6f68 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -268,7 +268,7 @@ reset master; create table t1 (a int) engine=innodb; show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server ver: 5.1.21-beta-debug-log, Binlog ver: 4 +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb master-bin.000001 206 Query 1 274 use `test`; BEGIN master-bin.000001 274 Query 1 365 use `test`; insert into t1 values( 400 ) @@ -671,7 +671,7 @@ master-bin.000001 36210 Query 1 36299 use `test`; insert into t1 values( 4 ) master-bin.000001 36299 Query 1 36388 use `test`; insert into t1 values( 3 ) master-bin.000001 36388 Query 1 36477 use `test`; insert into t1 values( 2 ) master-bin.000001 36477 Query 1 36566 use `test`; insert into t1 values( 1 ) -master-bin.000001 36566 Xid 1 36593 COMMIT /* xid=196 */ +master-bin.000001 36566 Xid 1 36593 COMMIT /* XID */ master-bin.000001 36593 Rotate 1 36637 master-bin.000002;pos=4 drop table t1; set global binlog_cache_size=@bcs; -- cgit v1.2.1 From 6097e627b43b5486564a571e7e2cf28d2c3c834a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Jul 2007 20:11:54 +0200 Subject: removed test case no longer supported --- mysql-test/r/partition.result | 10 ---------- mysql-test/t/partition.test | 12 +----------- 2 files changed, 1 insertion(+), 21 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index bf347aea196..5d985d053fc 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1267,14 +1267,4 @@ ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time)) ERROR HY000: Incorrect usage of PARTITION and log table ALTER TABLE general_log ENGINE = CSV; SET GLOBAL general_log = default; -CREATE TABLE `t1` ( `a` varchar(1)) ENGINE=MyISAM -PARTITION BY LIST (CASE a WHEN 'a' THEN 1 -WHEN 'b' THEN 2 -WHEN 'c' THEN 3 -END) ( -PARTITION a VALUES IN (1), -PARTITION b VALUES IN (2), -PARTITION c VALUES IN (3) -); -DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 1374c049431..42db23dadef 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1496,17 +1496,7 @@ SET GLOBAL general_log = default; # # Bug #27084 partitioning by list seems failing when using case +# BUG #18198: Case no longer supported, test case removed # -CREATE TABLE `t1` ( `a` varchar(1)) ENGINE=MyISAM - PARTITION BY LIST (CASE a WHEN 'a' THEN 1 - WHEN 'b' THEN 2 - WHEN 'c' THEN 3 - END) ( - PARTITION a VALUES IN (1), - PARTITION b VALUES IN (2), - PARTITION c VALUES IN (3) -); - -DROP TABLE t1; --echo End of 5.1 tests -- cgit v1.2.1 From b0696f545706255cbedf291b0e8f70aa10410b79 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Jul 2007 22:18:41 +0400 Subject: Fix testcase to be platform-independent --- mysql-test/r/innodb_mysql.result | 6 +++--- mysql-test/t/innodb_mysql.test | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index df1c2165c45..8ddd3d2f1e8 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2; +drop table if exists t1,t2,t3,t4; create table t1 ( c_id int(11) not null default '0', org_id int(11) default null, @@ -711,7 +711,7 @@ EXPLAIN SELECT COUNT(*) FROM t1 WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL idx_b,idx_c NULL NULL NULL 3263 Using where +1 SIMPLE t1 ALL idx_b,idx_c NULL NULL NULL # Using where SELECT COUNT(*) FROM t1 WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; COUNT(*) @@ -720,7 +720,7 @@ EXPLAIN SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index_merge idx_b,idx_c idx_c,idx_b 8,4 NULL 3262 Using sort_union(idx_c,idx_b); Using where +1 SIMPLE t1 index_merge idx_b,idx_c idx_c,idx_b 8,4 NULL # Using sort_union(idx_c,idx_b); Using where SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; COUNT(*) diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index eb995a748a5..148181ee443 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -1,7 +1,7 @@ -- source include/have_innodb.inc --disable_warnings -drop table if exists t1,t2; +drop table if exists t1,t2,t3,t4; --enable_warnings # BUG#16798: Uninitialized row buffer reads in ref-or-null optimizer @@ -709,12 +709,14 @@ set @@sort_buffer_size=8192; SELECT COUNT(*) FROM t1; +--replace_column 9 # EXPLAIN SELECT COUNT(*) FROM t1 WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; SELECT COUNT(*) FROM t1 WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; +--replace_column 9 # EXPLAIN SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1; -- cgit v1.2.1 From 416a49a669d80c24414225f0d5e232dd463d7e7c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Jul 2007 14:22:03 -0400 Subject: Bug#24924 shared-memory-base-name that is too long causes buffer overflow - Testcase fixup. mysql-test/t/windows_shm.test: Bug#24924 shared-memory-base-name that is too long causes buffer overflow - Pass user, port and host to mysqladmin. --- mysql-test/t/windows_shm.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/t/windows_shm.test b/mysql-test/t/windows_shm.test index 203471aac56..1c6f05f2da0 100644 --- a/mysql-test/t/windows_shm.test +++ b/mysql-test/t/windows_shm.test @@ -4,6 +4,6 @@ # # Bug #24924: shared-memory-base-name that is too long causes buffer overflow # ---exec $MYSQLADMIN --no-defaults --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ping +--exec $MYSQLADMIN --no-defaults --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ping --echo End of 5.0 tests. -- cgit v1.2.1 From 63e03007ebda036691aa8c430c894b5cc9306b38 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Jul 2007 03:56:03 -0700 Subject: fix bad merge --- mysql-test/r/fulltext2.result | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/fulltext2.result b/mysql-test/r/fulltext2.result index 783d9acd8ac..e9bee6f697e 100644 --- a/mysql-test/r/fulltext2.result +++ b/mysql-test/r/fulltext2.result @@ -241,14 +241,6 @@ select * from t1 where match a against('ab c' in boolean mode); a drop table t1; set names latin1; -SET NAMES utf8; -CREATE TABLE t1(a VARCHAR(255), FULLTEXT(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8; -INSERT INTO t1 VALUES('„MySQL“'); -SELECT a FROM t1 WHERE MATCH a AGAINST('“MySQL„' IN BOOLEAN MODE); -a -„MySQL“ -DROP TABLE t1; -SET NAMES latin1; CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); SET NAMES utf8; INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); @@ -261,3 +253,11 @@ Table Op Msg_type Msg_text test.t1 check status OK SET NAMES latin1; DROP TABLE t1; +SET NAMES utf8; +CREATE TABLE t1(a VARCHAR(255), FULLTEXT(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8; +INSERT INTO t1 VALUES('„MySQL“'); +SELECT a FROM t1 WHERE MATCH a AGAINST('“MySQL„' IN BOOLEAN MODE); +a +„MySQL“ +DROP TABLE t1; +SET NAMES latin1; -- cgit v1.2.1 From b16b2683e5a7e9b1eae9a59b477b8eb0517b6c68 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Jul 2007 17:17:58 +0500 Subject: Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption New Field::store() method implemented to explicitly set thd->count_cuted_fields before value storing, instead of (incorrectly) setting it in the CSV storage engine. Thread row counter now properly incremented during check and repair in the CSV engine. include/mysql/plugin.h: Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - thd_inc_row_count() function prototype added, which allows a storage engine to increment thread row counter. mysql-test/r/csv.result: Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - result adjusted. sql/field.cc: Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - Field::store(const char *to, uint length, CHARSET_INFO *cs, enum_check_fields check_level) method introduced in order to explicitly set count_cuted_fields before a ::store call, then reset it back after. sql/field.h: Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - Field::store(const char *to, uint length, CHARSET_INFO *cs, enum_check_fields check_level) method introduced in order to explicitly set count_cuted_fields before a ::store call, then reset it back after. sql/mysql_priv.h: Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - enum enum_check_fields moved from sql/sql_class.h to sql/mysql_priv.h as it's used now in the field.h sql/sql_class.cc: Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - implementation of the new thd_inc_row_count() function which increments thread row counter. sql/sql_class.h: Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - enum enum_check_fields moved from sql/sql_class.h to sql/mysql_priv.h as it's used now in the field.h storage/csv/ha_tina.cc: Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption - removed #define MYSQL_SERVER 1 - "a storage engine should not need internals of the server" - removed thd->count_cuted_fields= CHECK_FIELD_WARN as we are not allowed to access internals of THD. - used new Field::store() method to explicitly set thd->count_cuted_fields to CHECK_FIELD_WARN - thd_inc_row_count() calls added to ha_tina::repair() and ha_tina::check() to get proper row count values. --- mysql-test/r/csv.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result index e7cdd612a25..5076220f74b 100644 --- a/mysql-test/r/csv.result +++ b/mysql-test/r/csv.result @@ -5276,7 +5276,7 @@ drop table t1; create table t1(a int, b int) engine=csv; repair table t1; Table Op Msg_type Msg_text -test.t1 repair Warning Data truncated for column 'a' at row 1 +test.t1 repair Warning Data truncated for column 'a' at row 5 test.t1 repair status OK check table t1; Table Op Msg_type Msg_text -- cgit v1.2.1 From 166d3c9186539e4ebd738e368be453bdee119cc2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Jul 2007 19:37:46 +0500 Subject: Fixed bug #29294. The `SELECT 'r' INTO OUTFILE ... FIELDS ENCLOSED BY 'r' ' statement encoded the 'r' string to a 4 byte string of value x'725c7272' (sequence of 4 characters: r\rr). The LOAD DATA statement decoded this string to a 1 byte string of value x'0d' (ASCII Carriage Return character) instead of the original 'r' character. The same error also happened with the FIELDS ENCLOSED BY clause followed by special characters: 'n', 't', 'r', 'b', '0', 'Z' and 'N'. NOTE 1: This is a result of the undocumented feature: the LOAD DATA INFILE recognises 2-byte input sequences like \n, \t, \r and \Z in addition to documented 2-byte sequences: \0 and \N. This feature should be documented (here backspace character is a default ESCAPED BY character, in the real-life example it may be any ESCAPED BY character). NOTE 2, changed behaviour: Now the `SELECT INTO OUTFILE' statement with the `FIELDS ENCLOSED BY' clause followed by one of: 'n', 't', 'r', 'b', '0', 'Z' or 'N' characters encodes this special character itself by doubling it ('r' --> 'rr'), not by prepending it with an escape character. sql/sql_class.h: Fixed bug #29294. The ESCAPE_CHARS macro constant is defined to enumerate symbolic names of espace-sequences like '\n', '\t' etc. The select_export::is_ambiguous_field_sep field has been added to distinguish special values of the field_sep field from another values (see ESCAPE_CHARS). sql/sql_class.cc: Fixed bug #29294. The select_export::send_data method has been modified to encode special values of the field_sep field by doubling of those values instead of prepending them with a value of the escape_char field. Example: The SELECT 'r' INTO OUTFILE FIELDS ENCLOSED BY 'r' now produces the 'rr' output string instead of x'5c72' (i.e. instead of sequence of 2 bytes: \ and r). sql/sql_load.cc: Fixed bug #29294. Added commentary for the READ_INFO::unescape method. mysql-test/t/loaddata.test: Updated test case for bug #29294. mysql-test/r/loaddata.result: Updated test case for bug #29294. --- mysql-test/r/loaddata.result | 65 +++++++++++++++++++++++++++++++++++++++++++- mysql-test/t/loaddata.test | 38 +++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index e1076cd3072..0906b1708c7 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -1,4 +1,4 @@ -drop table if exists t1; +drop table if exists t1,t2; create table t1 (a date, b date, c date not null, d date); load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; Warnings: @@ -85,3 +85,66 @@ field1 field2 a"b cd"ef a"b c"d"e drop table t1; +CREATE TABLE t1 ( +id INT AUTO_INCREMENT PRIMARY KEY, +c1 VARCHAR(255) +); +CREATE TABLE t2 ( +id INT, +c2 VARCHAR(255) +); +INSERT INTO t1 (c1) VALUES +('r'), ('rr'), ('rrr'), ('rrrr'), +('.r'), ('.rr'), ('.rrr'), ('.rrrr'), +('r.'), ('rr.'), ('rrr.'), ('rrrr.'), +('.r.'), ('.rr.'), ('.rrr.'), ('.rrrr.'), +('\r'), ('\\rr'), ('\\\rr'), ('\\\\rr'); +SELECT * FROM t1; +id c1 +1 r +2 rr +3 rrr +4 rrrr +5 .r +6 .rr +7 .rrr +8 .rrrr +9 r. +10 rr. +11 rrr. +12 rrrr. +13 .r. +14 .rr. +15 .rrr. +16 .rrrr. +17 +18 \rr +19 \ r +20 \\rr +SELECT * INTO OUTFILE 'MYSQL_TEST_DIR/var/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1; +r1r rrrr +r2r rrrrrr +r3r rrrrrrrr +r4r rrrrrrrrrr +r5r r.rrr +r6r r.rrrrr +r7r r.rrrrrrr +r8r r.rrrrrrrrr +r9r rrr.r +r10r rrrrr.r +r11r rrrrrrr.r +r12r rrrrrrrrr.r +r13r r.rr.r +r14r r.rrrr.r +r15r r.rrrrrr.r +r16r r.rrrrrrrr.r +r17r r r +r18r r\\rrrrr +r19r r\\ rrr +r20r r\\\\rrrrr +LOAD DATA INFILE 'MYSQL_TEST_DIR/var/tmp/t1' INTO TABLE t2 FIELDS ENCLOSED BY 'r'; +SELECT t1.id, c1, c2 FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE c1 != c2; +id c1 c2 +SELECT t1.id, c1, c2 FROM t1 RIGHT JOIN t2 ON t1.id=t2.id WHERE c1 != c2; +id c1 c2 +DROP TABLE t1,t2; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index e989cb0b2ac..74d71985854 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -3,7 +3,7 @@ # --disable_warnings -drop table if exists t1; +drop table if exists t1,t2; --enable_warnings create table t1 (a date, b date, c date not null, d date); @@ -67,4 +67,40 @@ load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated select * from t1; drop table t1; +# +# Bug #29294 SELECT INTO OUTFILE/LOAD DATA INFILE with special +# characters in the FIELDS ENCLOSED BY clause +# + +CREATE TABLE t1 ( + id INT AUTO_INCREMENT PRIMARY KEY, + c1 VARCHAR(255) +); + +CREATE TABLE t2 ( + id INT, + c2 VARCHAR(255) +); + +INSERT INTO t1 (c1) VALUES + ('r'), ('rr'), ('rrr'), ('rrrr'), + ('.r'), ('.rr'), ('.rrr'), ('.rrrr'), + ('r.'), ('rr.'), ('rrr.'), ('rrrr.'), + ('.r.'), ('.rr.'), ('.rrr.'), ('.rrrr.'), + ('\r'), ('\\rr'), ('\\\rr'), ('\\\\rr'); +SELECT * FROM t1; + +--exec rm -f $MYSQL_TEST_DIR/var/tmp/t1 +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval SELECT * INTO OUTFILE '$MYSQL_TEST_DIR/var/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1; +--exec cat $MYSQL_TEST_DIR/var/tmp/t1 + +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval LOAD DATA INFILE '$MYSQL_TEST_DIR/var/tmp/t1' INTO TABLE t2 FIELDS ENCLOSED BY 'r'; +SELECT t1.id, c1, c2 FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE c1 != c2; +SELECT t1.id, c1, c2 FROM t1 RIGHT JOIN t2 ON t1.id=t2.id WHERE c1 != c2; + +--exec rm $MYSQL_TEST_DIR/var/tmp/t1 +DROP TABLE t1,t2; + # End of 4.1 tests -- cgit v1.2.1 From 1490e79da2448e712ed9d7be53f4b1c1e13ffc1d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Jul 2007 08:11:38 -0700 Subject: move test for bug29299 into seperate file as it requires charset gbk fixes test breakage on sles10-ia64-a which omits charset. mysql-test/r/fulltext2.result: move test for bug29299 into seperate file as it requires charset gbk mysql-test/t/fulltext2.test: move test for bug29299 into seperate file as it requires charset gbk mysql-test/r/fulltext3.result: move test for bug29299 into seperate file as it requires charset gbk mysql-test/t/fulltext3.test: move test for bug29299 into seperate file as it requires charset gbk --- mysql-test/r/fulltext2.result | 12 ------------ mysql-test/r/fulltext3.result | 13 +++++++++++++ mysql-test/t/fulltext2.test | 12 ------------ mysql-test/t/fulltext3.test | 24 ++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 24 deletions(-) create mode 100644 mysql-test/r/fulltext3.result create mode 100644 mysql-test/t/fulltext3.test (limited to 'mysql-test') diff --git a/mysql-test/r/fulltext2.result b/mysql-test/r/fulltext2.result index e9bee6f697e..7e3e25370d3 100644 --- a/mysql-test/r/fulltext2.result +++ b/mysql-test/r/fulltext2.result @@ -241,18 +241,6 @@ select * from t1 where match a against('ab c' in boolean mode); a drop table t1; set names latin1; -CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); -SET NAMES utf8; -INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); -SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE); -HEX(a) -BEF361616197C22061616161 -DELETE FROM t1 LIMIT 1; -CHECK TABLE t1; -Table Op Msg_type Msg_text -test.t1 check status OK -SET NAMES latin1; -DROP TABLE t1; SET NAMES utf8; CREATE TABLE t1(a VARCHAR(255), FULLTEXT(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO t1 VALUES('„MySQL“'); diff --git a/mysql-test/r/fulltext3.result b/mysql-test/r/fulltext3.result new file mode 100644 index 00000000000..019d5f472ed --- /dev/null +++ b/mysql-test/r/fulltext3.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); +SET NAMES utf8; +INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); +SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE); +HEX(a) +BEF361616197C22061616161 +DELETE FROM t1 LIMIT 1; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SET NAMES latin1; +DROP TABLE t1; diff --git a/mysql-test/t/fulltext2.test b/mysql-test/t/fulltext2.test index cb2e839c41f..88967a5dd04 100644 --- a/mysql-test/t/fulltext2.test +++ b/mysql-test/t/fulltext2.test @@ -220,18 +220,6 @@ select * from t1 where match a against('ab c' in boolean mode); drop table t1; set names latin1; -# -# BUG#29299 - repeatable myisam fulltext index corruption -# -CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); -SET NAMES utf8; -INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); -SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE); -DELETE FROM t1 LIMIT 1; -CHECK TABLE t1; -SET NAMES latin1; -DROP TABLE t1; - # End of 4.1 tests # diff --git a/mysql-test/t/fulltext3.test b/mysql-test/t/fulltext3.test new file mode 100644 index 00000000000..5ca068c066b --- /dev/null +++ b/mysql-test/t/fulltext3.test @@ -0,0 +1,24 @@ +--source include/have_gbk.inc +# +# test of new fulltext search features +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + + +# +# BUG#29299 - repeatable myisam fulltext index corruption +# +CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); +SET NAMES utf8; +INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); +SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE); +DELETE FROM t1 LIMIT 1; +CHECK TABLE t1; +SET NAMES latin1; +DROP TABLE t1; + +# End of 4.1 tests + -- cgit v1.2.1 From bc3e00868803009e5f4aff258bf2427e3896c255 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Jul 2007 21:45:20 +0500 Subject: loaddata.result, loaddata.test: Test case update for bug #29294. mysql-test/t/loaddata.test: Test case update for bug #29294. mysql-test/r/loaddata.result: Test case update for bug #29294. --- mysql-test/r/loaddata.result | 11 +---------- mysql-test/t/loaddata.test | 3 +-- 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 0906b1708c7..83a0788b793 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -97,8 +97,7 @@ INSERT INTO t1 (c1) VALUES ('r'), ('rr'), ('rrr'), ('rrrr'), ('.r'), ('.rr'), ('.rrr'), ('.rrrr'), ('r.'), ('rr.'), ('rrr.'), ('rrrr.'), -('.r.'), ('.rr.'), ('.rrr.'), ('.rrrr.'), -('\r'), ('\\rr'), ('\\\rr'), ('\\\\rr'); +('.r.'), ('.rr.'), ('.rrr.'), ('.rrrr.'); SELECT * FROM t1; id c1 1 r @@ -117,10 +116,6 @@ id c1 14 .rr. 15 .rrr. 16 .rrrr. -17 -18 \rr -19 \ r -20 \\rr SELECT * INTO OUTFILE 'MYSQL_TEST_DIR/var/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1; r1r rrrr r2r rrrrrr @@ -138,10 +133,6 @@ r13r r.rr.r r14r r.rrrr.r r15r r.rrrrrr.r r16r r.rrrrrrrr.r -r17r r r -r18r r\\rrrrr -r19r r\\ rrr -r20r r\\\\rrrrr LOAD DATA INFILE 'MYSQL_TEST_DIR/var/tmp/t1' INTO TABLE t2 FIELDS ENCLOSED BY 'r'; SELECT t1.id, c1, c2 FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE c1 != c2; id c1 c2 diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 74d71985854..14f33c6b396 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -86,8 +86,7 @@ INSERT INTO t1 (c1) VALUES ('r'), ('rr'), ('rrr'), ('rrrr'), ('.r'), ('.rr'), ('.rrr'), ('.rrrr'), ('r.'), ('rr.'), ('rrr.'), ('rrrr.'), - ('.r.'), ('.rr.'), ('.rrr.'), ('.rrrr.'), - ('\r'), ('\\rr'), ('\\\rr'), ('\\\\rr'); + ('.r.'), ('.rr.'), ('.rrr.'), ('.rrrr.'); SELECT * FROM t1; --exec rm -f $MYSQL_TEST_DIR/var/tmp/t1 -- cgit v1.2.1 From 8d035c57f0c5c65ecf9652bd913b3d2f988c8f6e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Jul 2007 03:15:37 +0500 Subject: loaddata.result, loaddata.test: Updated test case for bug #29294. mysql-test/t/loaddata.test: Updated test case for bug #29294. mysql-test/r/loaddata.result: Updated test case for bug #29294. --- mysql-test/r/loaddata.result | 4 ++-- mysql-test/t/loaddata.test | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 0aa95983264..031aa5c700c 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -117,7 +117,7 @@ id c1 14 .rr. 15 .rrr. 16 .rrrr. -SELECT * INTO OUTFILE 'MYSQL_TEST_DIR/var/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1; +SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1; r1r rrrr r2r rrrrrr r3r rrrrrrrr @@ -134,7 +134,7 @@ r13r r.rr.r r14r r.rrrr.r r15r r.rrrrrr.r r16r r.rrrrrrrr.r -LOAD DATA INFILE 'MYSQL_TEST_DIR/var/tmp/t1' INTO TABLE t2 FIELDS ENCLOSED BY 'r'; +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1' INTO TABLE t2 FIELDS ENCLOSED BY 'r'; SELECT t1.id, c1, c2 FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE c1 != c2; id c1 c2 SELECT t1.id, c1, c2 FROM t1 RIGHT JOIN t2 ON t1.id=t2.id WHERE c1 != c2; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index c7f16fc303b..cdd3bb80b6e 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -89,17 +89,17 @@ INSERT INTO t1 (c1) VALUES ('.r.'), ('.rr.'), ('.rrr.'), ('.rrrr.'); SELECT * FROM t1; ---exec rm -f $MYSQL_TEST_DIR/var/tmp/t1 ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval SELECT * INTO OUTFILE '$MYSQL_TEST_DIR/var/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1; ---exec cat $MYSQL_TEST_DIR/var/tmp/t1 +--exec rm -f $MYSQLTEST_VARDIR/tmp/t1 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY 'r' FROM t1; +--exec cat $MYSQLTEST_VARDIR/tmp/t1 ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval LOAD DATA INFILE '$MYSQL_TEST_DIR/var/tmp/t1' INTO TABLE t2 FIELDS ENCLOSED BY 'r'; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t1' INTO TABLE t2 FIELDS ENCLOSED BY 'r'; SELECT t1.id, c1, c2 FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE c1 != c2; SELECT t1.id, c1, c2 FROM t1 RIGHT JOIN t2 ON t1.id=t2.id WHERE c1 != c2; ---exec rm $MYSQL_TEST_DIR/var/tmp/t1 +--exec rm $MYSQLTEST_VARDIR/tmp/t1 DROP TABLE t1,t2; # End of 4.1 tests -- cgit v1.2.1 From d7282f136b898b66ca3bafcd5eeceee30aab3c0f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Jul 2007 19:51:32 -0600 Subject: rpl_misc_functions.result, rpl_misc_functions.test: work around bug 29537, which was revealed by patch for bug 28356: move DROP TABLE before DROP PROCEDURE in cleanup mysql-test/suite/rpl/r/rpl_misc_functions.result: work around bug 29537, which was revealed by patch for bug 28356: move DROP TABLE before DROP PROCEDURE in cleanup mysql-test/suite/rpl/t/rpl_misc_functions.test: work around bug 29537, which was revealed by patch for bug 28356: move DROP TABLE before DROP PROCEDURE in cleanup --- mysql-test/suite/rpl/r/rpl_misc_functions.result | 2 +- mysql-test/suite/rpl/t/rpl_misc_functions.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result index ca7403316b1..94aa1bb61a7 100644 --- a/mysql-test/suite/rpl/r/rpl_misc_functions.result +++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result @@ -48,7 +48,7 @@ where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ; SELECT @aux; @aux 12 +DROP TABLE t1, t1_slave; DROP PROCEDURE test_replication_sp1; DROP PROCEDURE test_replication_sp2; DROP FUNCTION test_replication_sf; -DROP TABLE t1, t1_slave; diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test index b87fff919b2..d56402cbe76 100644 --- a/mysql-test/suite/rpl/t/rpl_misc_functions.test +++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test @@ -104,10 +104,10 @@ if (`SELECT @aux <> 12 OR @aux IS NULL`) # Cleanup connection master; +DROP TABLE t1, t1_slave; DROP PROCEDURE test_replication_sp1; DROP PROCEDURE test_replication_sp2; DROP FUNCTION test_replication_sf; -DROP TABLE t1, t1_slave; --sync_slave_with_master -- cgit v1.2.1 From 6413db8567aff526a377606281869e9f8935d78e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Jul 2007 11:58:56 +0300 Subject: merge 5.0-opt -> 5.1-opt --- mysql-test/include/mix1.inc | 2 +- mysql-test/r/innodb_mysql.result | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index c901cea9cba..d8034e19898 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -28,7 +28,7 @@ eval SET SESSION STORAGE_ENGINE = $engine_type; --disable_warnings -drop table if exists t1,t2,t3,t4,t1m,t1i,t2m,t2i,t4; +drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4; --enable_warnings diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index cf403bddf6a..db912c650c3 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1,5 +1,5 @@ SET SESSION STORAGE_ENGINE = InnoDB; -drop table if exists t1,t2,t3,t4,t1m,t1i,t2m,t2i,t4; +drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4; create table t1 ( c_id int(11) not null default '0', org_id int(11) default null, -- cgit v1.2.1 From 793c189667c81bb61bb98b875b769665942b4935 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Jul 2007 12:26:39 -0600 Subject: rpl_misc_functions.result, rpl_misc_functions.test: Remove indeterministic behavior from a test mysql-test/suite/rpl/r/rpl_misc_functions.result: Remove indeterministic behavior from a test mysql-test/suite/rpl/t/rpl_misc_functions.test: Remove indeterministic behavior from a test --- mysql-test/suite/rpl/r/rpl_misc_functions.result | 17 +++++++++-------- mysql-test/suite/rpl/t/rpl_misc_functions.test | 21 +++++++++++---------- 2 files changed, 20 insertions(+), 18 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result index 94aa1bb61a7..a8e5520ca8f 100644 --- a/mysql-test/suite/rpl/r/rpl_misc_functions.result +++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result @@ -20,11 +20,12 @@ select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t id i r1 r2 p id i r1 r2 p drop table t1; DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (col_a double default NULL); +CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +col_a DOUBLE DEFAULT NULL); CREATE PROCEDURE test_replication_sp1() BEGIN -INSERT INTO t1 VALUES (rand()), (rand()); -INSERT INTO t1 VALUES (rand()); +INSERT INTO t1 (col_a) VALUES (rand()), (rand()); +INSERT INTO t1 (col_a) VALUES (rand()); END| CREATE PROCEDURE test_replication_sp2() BEGIN @@ -37,14 +38,14 @@ RETURN (rand() + rand()); END| CALL test_replication_sp1(); CALL test_replication_sp2(); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); select * from t1 into outfile "../tmp/t1_slave.txt"; create temporary table t1_slave select * from t1 where 1=0; load data infile '../tmp/t1_slave.txt' into table t1_slave; -select count(*) into @aux from t1, t1_slave -where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ; +select count(*) into @aux from t1 join t1_slave using (id) +where ABS(t1.col_a - t1_slave.col_a) < 0.0000001 ; SELECT @aux; @aux 12 diff --git a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test index d56402cbe76..1c94471c975 100644 --- a/mysql-test/suite/rpl/t/rpl_misc_functions.test +++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test @@ -43,15 +43,16 @@ drop table t1; DROP TABLE IF EXISTS t1; --enable_warnings -CREATE TABLE t1 (col_a double default NULL); +CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + col_a DOUBLE DEFAULT NULL); DELIMITER |; # Use a SP that calls rand() multiple times CREATE PROCEDURE test_replication_sp1() BEGIN - INSERT INTO t1 VALUES (rand()), (rand()); - INSERT INTO t1 VALUES (rand()); + INSERT INTO t1 (col_a) VALUES (rand()), (rand()); + INSERT INTO t1 (col_a) VALUES (rand()); END| # Use a SP that calls another SP to call rand() multiple times @@ -73,9 +74,9 @@ DELIMITER ;| # the master to those on the slave. CALL test_replication_sp1(); CALL test_replication_sp2(); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); --sync_slave_with_master @@ -90,14 +91,14 @@ load data infile '../tmp/t1_slave.txt' into table t1_slave; # Compare master and slave temp table, use subtraction # for floating point comparison of "double" -select count(*) into @aux from t1, t1_slave -where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ; +select count(*) into @aux from t1 join t1_slave using (id) +where ABS(t1.col_a - t1_slave.col_a) < 0.0000001 ; SELECT @aux; if (`SELECT @aux <> 12 OR @aux IS NULL`) { --echo # ERROR: We expected to get count(*) = 12. - SELECT col_a FROM t1; - SELECT col_a FROM t1_slave; + SELECT id, col_a FROM t1; + SELECT id, col_a FROM t1_slave; --echo # abort exit; } -- cgit v1.2.1 From a7489ed189cdb05cc3d021a20c18ba122d889d02 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Jul 2007 23:41:15 +0200 Subject: Many tests have been moved to suite/*. Some tests have been removed. Update the disabled.def files to reflect actual contents of the t/* directories. Also, move a few more tests into suite/*. mysql-test/suite/parts/t/rpl_partition.test: Rename: mysql-test/t/rpl_partition.test -> mysql-test/suite/parts/t/rpl_partition.test mysql-test/suite/parts/r/rpl_partition.result: Rename: mysql-test/r/rpl_partition.result -> mysql-test/suite/parts/r/rpl_partition.result mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt: Rename: mysql-test/t/rpl_ndb_ctype_ucs2_def-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test: Rename: mysql-test/t/rpl_ndb_ctype_ucs2_def.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt: Rename: mysql-test/t/rpl_ndb_mix_innodb-master.opt -> mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test: Rename: mysql-test/t/rpl_ndb_mix_innodb.test -> mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result: Rename: mysql-test/r/rpl_ndb_ctype_ucs2_def.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result: Rename: mysql-test/r/rpl_ndb_mix_innodb.result -> mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result mysql-test/suite/ndb/t/disabled.def: Some tests have moved to suite/*, and some have been removed. Update disabled.def files to be consistent with actual t/* contents. mysql-test/suite/parts/t/disabled.def: Some tests have moved to suite/*, and some have been removed. Update disabled.def files to be consistent with actual t/* contents. mysql-test/suite/rpl/t/disabled.def: Some tests have moved to suite/*, and some have been removed. Update disabled.def files to be consistent with actual t/* contents. mysql-test/suite/rpl_ndb/t/disabled.def: Some tests have moved to suite/*, and some have been removed. Update disabled.def files to be consistent with actual t/* contents. mysql-test/t/disabled.def: Some tests have moved to suite/*, and some have been removed. Update disabled.def files to be consistent with actual t/* contents. --- mysql-test/r/rpl_ndb_ctype_ucs2_def.result | 9 - mysql-test/r/rpl_ndb_mix_innodb.result | 129 -------------- mysql-test/r/rpl_partition.result | 195 --------------------- mysql-test/suite/ndb/t/disabled.def | 1 + mysql-test/suite/parts/r/rpl_partition.result | 195 +++++++++++++++++++++ mysql-test/suite/parts/t/disabled.def | 1 - mysql-test/suite/parts/t/rpl_partition.test | 160 +++++++++++++++++ mysql-test/suite/rpl/t/disabled.def | 1 + .../suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result | 9 + .../suite/rpl_ndb/r/rpl_ndb_mix_innodb.result | 129 ++++++++++++++ mysql-test/suite/rpl_ndb/t/disabled.def | 3 +- .../rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt | 1 + .../suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test | 42 +++++ .../suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test | 36 ++++ mysql-test/t/disabled.def | 6 - mysql-test/t/rpl_ndb_ctype_ucs2_def-master.opt | 1 - mysql-test/t/rpl_ndb_ctype_ucs2_def.test | 42 ----- mysql-test/t/rpl_ndb_mix_innodb-master.opt | 1 - mysql-test/t/rpl_ndb_mix_innodb.test | 36 ---- mysql-test/t/rpl_partition.test | 160 ----------------- 21 files changed, 577 insertions(+), 581 deletions(-) delete mode 100644 mysql-test/r/rpl_ndb_ctype_ucs2_def.result delete mode 100644 mysql-test/r/rpl_ndb_mix_innodb.result delete mode 100644 mysql-test/r/rpl_partition.result create mode 100644 mysql-test/suite/parts/r/rpl_partition.result create mode 100644 mysql-test/suite/parts/t/rpl_partition.test create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test delete mode 100644 mysql-test/t/rpl_ndb_ctype_ucs2_def-master.opt delete mode 100644 mysql-test/t/rpl_ndb_ctype_ucs2_def.test delete mode 100644 mysql-test/t/rpl_ndb_mix_innodb-master.opt delete mode 100644 mysql-test/t/rpl_ndb_mix_innodb.test delete mode 100644 mysql-test/t/rpl_partition.test (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_ndb_ctype_ucs2_def.result b/mysql-test/r/rpl_ndb_ctype_ucs2_def.result deleted file mode 100644 index 2f9dc4ae616..00000000000 --- a/mysql-test/r/rpl_ndb_ctype_ucs2_def.result +++ /dev/null @@ -1,9 +0,0 @@ -show variables like 'collation_server'; -Variable_name Value -collation_server ucs2_unicode_ci -show variables like "%character_set_ser%"; -Variable_name Value -character_set_server ucs2 -DROP TABLE IF EXISTS t1; -create table t1 (a int); -drop table t1; diff --git a/mysql-test/r/rpl_ndb_mix_innodb.result b/mysql-test/r/rpl_ndb_mix_innodb.result deleted file mode 100644 index 625d06de44b..00000000000 --- a/mysql-test/r/rpl_ndb_mix_innodb.result +++ /dev/null @@ -1,129 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - -*** Test 1 *** - -create table t1 (a int key, b int) engine innodb; -create table t2 (a int key, b int) engine innodb; - -alter table t1 engine ndb; -alter table t2 engine ndb; - -insert into t1 values (1,2); - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 Query 1 # use `test`; insert into t1 values (1,2) - -show binlog events from limit 1,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 445 COMMIT /* XID */ - -begin; -insert into t1 values (2,3); -insert into t2 values (3,4); -commit; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - -show binlog events from limit 1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 Query 1 # use `test`; BEGIN - -show binlog events from limit 1,2; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; insert into t1 values (2,3) -master-bin.000001 # Query # # use `test`; insert into t2 values (3,4) - -show binlog events from limit 3,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -DROP TABLE test.t1, test.t2; -SHOW TABLES; -Tables_in_test - -*** Test 2 *** - -DROP DATABASE IF EXISTS tpcb; -CREATE DATABASE tpcb; - -CREATE TABLE tpcb.account (id INT, bid INT, balance DECIMAL(10,2), -filler CHAR(255), PRIMARY KEY(id)); - -CREATE TABLE tpcb.branch (bid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(bid)); - -CREATE TABLE tpcb.teller (tid INT, balance DECIMAL(10,2), filler VARCHAR(255), -PRIMARY KEY(tid)); - -CREATE TABLE tpcb.history (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, -tid INT, bid INT, amount DECIMAL(10,2), -tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, -filler CHAR(80),PRIMARY KEY (id)); - ---- Create stored procedures & functions --- - - -*** Stored Procedures Created *** - -USE tpcb; -ALTER TABLE account ENGINE NDB; -ALTER TABLE branch ENGINE NDB; -ALTER TABLE teller ENGINE NDB; -ALTER TABLE history ENGINE NDB; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000001' from limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -** Test 3 ** - -FLUSH LOGS; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000002' from limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 # Xid 1 COMMIT /* XID */ - -** Test 4 ** - -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; - -select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos -from mysql.ndb_apply_status; -@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos - - -show binlog events in 'master-bin.000001' from limit 9,1; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Xid 1 COMMIT /* XID */ - -*** DUMP MASTER & SLAVE FOR COMPARE ******** -DROP DATABASE tpcb; -****** Do dumps compare ************ diff --git a/mysql-test/r/rpl_partition.result b/mysql-test/r/rpl_partition.result deleted file mode 100644 index cdd29919c48..00000000000 --- a/mysql-test/r/rpl_partition.result +++ /dev/null @@ -1,195 +0,0 @@ -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 GLOBAL binlog_format = 'ROW'; -SET SESSION binlog_format = 'ROW'; -select @@global.binlog_format, @@session.binlog_format; -@@global.binlog_format ROW -@@session.binlog_format ROW -DROP TABLE IF EXISTS t1, t2, t3; -Warnings: -Level Note -Code 1051 -Message Unknown table 't1' -Level Note -Code 1051 -Message Unknown table 't2' -Level Note -Code 1051 -Message Unknown table 't3' -DROP PROCEDURE IF EXISTS p1; -Warnings: -Level Note -Code 1305 -Message PROCEDURE p1 does not exist -DROP PROCEDURE IF EXISTS p2; -Warnings: -Level Note -Code 1305 -Message PROCEDURE p2 does not exist -DROP PROCEDURE IF EXISTS p3; -Warnings: -Level Note -Code 1305 -Message PROCEDURE p3 does not exist -CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, -dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, -fkid MEDIUMINT, filler VARCHAR(255), -PRIMARY KEY(id)) ENGINE='innodb'; -CREATE TABLE t2(id MEDIUMINT NOT NULL AUTO_INCREMENT, -dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, -fkid MEDIUMINT, filler VARCHAR(255), -PRIMARY KEY(id)) ENGINE='innodb' -PARTITION BY KEY(id) partitions 5; -CREATE TABLE t3(id MEDIUMINT NOT NULL AUTO_INCREMENT, -dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, -fkid MEDIUMINT, filler VARCHAR(255), -PRIMARY KEY(id)) ENGINE='innodb' -PARTITION BY RANGE(id) -SUBPARTITION BY hash(id) subpartitions 2 -(PARTITION pa1 values less than (10), -PARTITION pa2 values less than (20), -PARTITION pa3 values less than (30), -PARTITION pa4 values less than (40), -PARTITION pa5 values less than (50), -PARTITION pa6 values less than (60), -PARTITION pa7 values less than (70), -PARTITION pa8 values less than (80), -PARTITION pa9 values less than (90), -PARTITION pa10 values less than (100), -PARTITION pa11 values less than MAXVALUE); -CREATE PROCEDURE p1() -BEGIN -DECLARE ins_count INT DEFAULT 1000; -DECLARE del_count INT; -DECLARE cur_user VARCHAR(255); -DECLARE local_uuid VARCHAR(255); -DECLARE local_time TIMESTAMP; -SET local_time= NOW(); -SET cur_user= CURRENT_USER(); -SET local_uuid= UUID(); -WHILE ins_count > 0 DO -INSERT INTO t1 VALUES (NULL, NOW(), USER() , UUID(), -ins_count,'Going to test MBR for MySQL'); -SET ins_count = ins_count - 1; -END WHILE; -SELECT MAX(id) FROM t1 INTO del_count; -WHILE del_count > 0 DO -DELETE FROM t1 WHERE id = del_count; -SET del_count = del_count - 2; -END WHILE; -END| -CREATE PROCEDURE p2() -BEGIN -DECLARE ins_count INT DEFAULT 1000; -DECLARE del_count INT; -DECLARE cur_user VARCHAR(255); -DECLARE local_uuid VARCHAR(255); -DECLARE local_time TIMESTAMP; -SET local_time= NOW(); -SET cur_user= CURRENT_USER(); -SET local_uuid= UUID(); -WHILE ins_count > 0 DO -INSERT INTO t2 VALUES (NULL, NOW(), USER() , UUID(), -ins_count,'Going to test MBR for MySQL'); -SET ins_count = ins_count - 1; -END WHILE; -SELECT MAX(id) FROM t2 INTO del_count; -WHILE del_count > 0 DO -DELETE FROM t2 WHERE id = del_count; -SET del_count = del_count - 2; -END WHILE; -END| -CREATE PROCEDURE p3() -BEGIN -DECLARE ins_count INT DEFAULT 1000; -DECLARE del_count INT; -DECLARE cur_user VARCHAR(255); -DECLARE local_uuid VARCHAR(255); -DECLARE local_time TIMESTAMP; -SET local_time= NOW(); -SET cur_user = CURRENT_USER(); -SET local_uuid=UUID(); -WHILE ins_count > 0 DO -INSERT INTO t3 VALUES (NULL, NOW(), USER(), UUID(), -ins_count,'Going to test MBR for MySQL'); -SET ins_count = ins_count - 1; -END WHILE; -SELECT MAX(id) FROM t3 INTO del_count; -WHILE del_count > 0 DO -DELETE FROM t3 WHERE id = del_count; -SET del_count = del_count - 2; -END WHILE; -END| -CALL p1(); -SELECT count(*) as "Master regular" FROM t1; -Master regular 500 -CALL p2(); -SELECT count(*) as "Master bykey" FROM t2; -Master bykey 500 -CALL p3(); -SELECT count(*) as "Master byrange" FROM t3; -Master byrange 500 -show create table t3; -Table t3 -Create Table CREATE TABLE `t3` ( - `id` mediumint(9) NOT NULL AUTO_INCREMENT, - `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `user` char(255) DEFAULT NULL, - `uuidf` longblob, - `fkid` mediumint(9) DEFAULT NULL, - `filler` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa2 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (30) ENGINE = MyISAM, PARTITION pa4 VALUES LESS THAN (40) ENGINE = MyISAM, PARTITION pa5 VALUES LESS THAN (50) ENGINE = MyISAM, PARTITION pa6 VALUES LESS THAN (60) ENGINE = MyISAM, PARTITION pa7 VALUES LESS THAN (70) ENGINE = MyISAM, PARTITION pa8 VALUES LESS THAN (80) ENGINE = MyISAM, PARTITION pa9 VALUES LESS THAN (90) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ -show slave status; -Slave_IO_State # -Master_Host 127.0.0.1 -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File master-bin.000001 -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File master-bin.000001 -Slave_IO_Running Yes -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed No -Master_SSL_CA_File -Master_SSL_CA_Path -Master_SSL_Cert -Master_SSL_Cipher -Master_SSL_Key -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert No -Last_IO_Errno # -Last_IO_Error # -Last_SQL_Errno 0 -Last_SQL_Error -SELECT count(*) "Slave norm" FROM t1; -Slave norm 500 -SELECT count(*) "Slave bykey" FROM t2; -Slave bykey 500 -SELECT count(*) "Slave byrange" FROM t3; -Slave byrange 500 -DROP TABLE t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; diff --git a/mysql-test/suite/ndb/t/disabled.def b/mysql-test/suite/ndb/t/disabled.def index ec1dc26039f..96ef152f513 100644 --- a/mysql-test/suite/ndb/t/disabled.def +++ b/mysql-test/suite/ndb/t/disabled.def @@ -11,6 +11,7 @@ ############################################################################## ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog +ndb_dd_sql_features : Bug#29102 ndb_dd_sql_features fails in pushbuild ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table diff --git a/mysql-test/suite/parts/r/rpl_partition.result b/mysql-test/suite/parts/r/rpl_partition.result new file mode 100644 index 00000000000..cdd29919c48 --- /dev/null +++ b/mysql-test/suite/parts/r/rpl_partition.result @@ -0,0 +1,195 @@ +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 GLOBAL binlog_format = 'ROW'; +SET SESSION binlog_format = 'ROW'; +select @@global.binlog_format, @@session.binlog_format; +@@global.binlog_format ROW +@@session.binlog_format ROW +DROP TABLE IF EXISTS t1, t2, t3; +Warnings: +Level Note +Code 1051 +Message Unknown table 't1' +Level Note +Code 1051 +Message Unknown table 't2' +Level Note +Code 1051 +Message Unknown table 't3' +DROP PROCEDURE IF EXISTS p1; +Warnings: +Level Note +Code 1305 +Message PROCEDURE p1 does not exist +DROP PROCEDURE IF EXISTS p2; +Warnings: +Level Note +Code 1305 +Message PROCEDURE p2 does not exist +DROP PROCEDURE IF EXISTS p3; +Warnings: +Level Note +Code 1305 +Message PROCEDURE p3 does not exist +CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, +dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, +fkid MEDIUMINT, filler VARCHAR(255), +PRIMARY KEY(id)) ENGINE='innodb'; +CREATE TABLE t2(id MEDIUMINT NOT NULL AUTO_INCREMENT, +dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, +fkid MEDIUMINT, filler VARCHAR(255), +PRIMARY KEY(id)) ENGINE='innodb' +PARTITION BY KEY(id) partitions 5; +CREATE TABLE t3(id MEDIUMINT NOT NULL AUTO_INCREMENT, +dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, +fkid MEDIUMINT, filler VARCHAR(255), +PRIMARY KEY(id)) ENGINE='innodb' +PARTITION BY RANGE(id) +SUBPARTITION BY hash(id) subpartitions 2 +(PARTITION pa1 values less than (10), +PARTITION pa2 values less than (20), +PARTITION pa3 values less than (30), +PARTITION pa4 values less than (40), +PARTITION pa5 values less than (50), +PARTITION pa6 values less than (60), +PARTITION pa7 values less than (70), +PARTITION pa8 values less than (80), +PARTITION pa9 values less than (90), +PARTITION pa10 values less than (100), +PARTITION pa11 values less than MAXVALUE); +CREATE PROCEDURE p1() +BEGIN +DECLARE ins_count INT DEFAULT 1000; +DECLARE del_count INT; +DECLARE cur_user VARCHAR(255); +DECLARE local_uuid VARCHAR(255); +DECLARE local_time TIMESTAMP; +SET local_time= NOW(); +SET cur_user= CURRENT_USER(); +SET local_uuid= UUID(); +WHILE ins_count > 0 DO +INSERT INTO t1 VALUES (NULL, NOW(), USER() , UUID(), +ins_count,'Going to test MBR for MySQL'); +SET ins_count = ins_count - 1; +END WHILE; +SELECT MAX(id) FROM t1 INTO del_count; +WHILE del_count > 0 DO +DELETE FROM t1 WHERE id = del_count; +SET del_count = del_count - 2; +END WHILE; +END| +CREATE PROCEDURE p2() +BEGIN +DECLARE ins_count INT DEFAULT 1000; +DECLARE del_count INT; +DECLARE cur_user VARCHAR(255); +DECLARE local_uuid VARCHAR(255); +DECLARE local_time TIMESTAMP; +SET local_time= NOW(); +SET cur_user= CURRENT_USER(); +SET local_uuid= UUID(); +WHILE ins_count > 0 DO +INSERT INTO t2 VALUES (NULL, NOW(), USER() , UUID(), +ins_count,'Going to test MBR for MySQL'); +SET ins_count = ins_count - 1; +END WHILE; +SELECT MAX(id) FROM t2 INTO del_count; +WHILE del_count > 0 DO +DELETE FROM t2 WHERE id = del_count; +SET del_count = del_count - 2; +END WHILE; +END| +CREATE PROCEDURE p3() +BEGIN +DECLARE ins_count INT DEFAULT 1000; +DECLARE del_count INT; +DECLARE cur_user VARCHAR(255); +DECLARE local_uuid VARCHAR(255); +DECLARE local_time TIMESTAMP; +SET local_time= NOW(); +SET cur_user = CURRENT_USER(); +SET local_uuid=UUID(); +WHILE ins_count > 0 DO +INSERT INTO t3 VALUES (NULL, NOW(), USER(), UUID(), +ins_count,'Going to test MBR for MySQL'); +SET ins_count = ins_count - 1; +END WHILE; +SELECT MAX(id) FROM t3 INTO del_count; +WHILE del_count > 0 DO +DELETE FROM t3 WHERE id = del_count; +SET del_count = del_count - 2; +END WHILE; +END| +CALL p1(); +SELECT count(*) as "Master regular" FROM t1; +Master regular 500 +CALL p2(); +SELECT count(*) as "Master bykey" FROM t2; +Master bykey 500 +CALL p3(); +SELECT count(*) as "Master byrange" FROM t3; +Master byrange 500 +show create table t3; +Table t3 +Create Table CREATE TABLE `t3` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `user` char(255) DEFAULT NULL, + `uuidf` longblob, + `fkid` mediumint(9) DEFAULT NULL, + `filler` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa2 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (30) ENGINE = MyISAM, PARTITION pa4 VALUES LESS THAN (40) ENGINE = MyISAM, PARTITION pa5 VALUES LESS THAN (50) ENGINE = MyISAM, PARTITION pa6 VALUES LESS THAN (60) ENGINE = MyISAM, PARTITION pa7 VALUES LESS THAN (70) ENGINE = MyISAM, PARTITION pa8 VALUES LESS THAN (80) ENGINE = MyISAM, PARTITION pa9 VALUES LESS THAN (90) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (100) ENGINE = MyISAM, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 0 +Last_SQL_Error +SELECT count(*) "Slave norm" FROM t1; +Slave norm 500 +SELECT count(*) "Slave bykey" FROM t2; +Slave bykey 500 +SELECT count(*) "Slave byrange" FROM t3; +Slave byrange 500 +DROP TABLE t1, t2, t3; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +DROP PROCEDURE IF EXISTS p3; diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def index 212ca0206e2..36bf08e9851 100644 --- a/mysql-test/suite/parts/t/disabled.def +++ b/mysql-test/suite/parts/t/disabled.def @@ -13,4 +13,3 @@ partition_alter2_ndb : cannot create t1 partition_char_innodb : crash. Bug? More investigations partition_sessions : needs system_3_init.inc partition_engine_ndb : cannot create t1 -partition_supported_sql_func_ndb : cannot create t1 diff --git a/mysql-test/suite/parts/t/rpl_partition.test b/mysql-test/suite/parts/t/rpl_partition.test new file mode 100644 index 00000000000..7f6e05db20e --- /dev/null +++ b/mysql-test/suite/parts/t/rpl_partition.test @@ -0,0 +1,160 @@ +--source include/have_innodb.inc +--source include/master-slave.inc + +--vertical_results + +let $engine_type= 'innodb'; + +SET GLOBAL binlog_format = 'ROW'; +SET SESSION binlog_format = 'ROW'; +select @@global.binlog_format, @@session.binlog_format; + +--disable-warnings +DROP TABLE IF EXISTS t1, t2, t3; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +DROP PROCEDURE IF EXISTS p3; +--enable-warnings + +eval CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, + dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, + fkid MEDIUMINT, filler VARCHAR(255), + PRIMARY KEY(id)) ENGINE=$engine_type; + +eval CREATE TABLE t2(id MEDIUMINT NOT NULL AUTO_INCREMENT, + dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, + fkid MEDIUMINT, filler VARCHAR(255), + PRIMARY KEY(id)) ENGINE=$engine_type + PARTITION BY KEY(id) partitions 5; + +eval CREATE TABLE t3(id MEDIUMINT NOT NULL AUTO_INCREMENT, + dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, + fkid MEDIUMINT, filler VARCHAR(255), + PRIMARY KEY(id)) ENGINE=$engine_type + PARTITION BY RANGE(id) + SUBPARTITION BY hash(id) subpartitions 2 + (PARTITION pa1 values less than (10), + PARTITION pa2 values less than (20), + PARTITION pa3 values less than (30), + PARTITION pa4 values less than (40), + PARTITION pa5 values less than (50), + PARTITION pa6 values less than (60), + PARTITION pa7 values less than (70), + PARTITION pa8 values less than (80), + PARTITION pa9 values less than (90), + PARTITION pa10 values less than (100), + PARTITION pa11 values less than MAXVALUE); + +######## Create SPs, Functions, Views and Triggers Section ############## + +delimiter |; +CREATE PROCEDURE p1() +BEGIN + DECLARE ins_count INT DEFAULT 1000; + DECLARE del_count INT; + DECLARE cur_user VARCHAR(255); + DECLARE local_uuid VARCHAR(255); + DECLARE local_time TIMESTAMP; + + SET local_time= NOW(); + SET cur_user= CURRENT_USER(); + SET local_uuid= UUID(); + + WHILE ins_count > 0 DO + INSERT INTO t1 VALUES (NULL, NOW(), USER() , UUID(), + ins_count,'Going to test MBR for MySQL'); + SET ins_count = ins_count - 1; + END WHILE; + + SELECT MAX(id) FROM t1 INTO del_count; + WHILE del_count > 0 DO + DELETE FROM t1 WHERE id = del_count; + SET del_count = del_count - 2; + END WHILE; +END| + +CREATE PROCEDURE p2() +BEGIN + DECLARE ins_count INT DEFAULT 1000; + DECLARE del_count INT; + DECLARE cur_user VARCHAR(255); + DECLARE local_uuid VARCHAR(255); + DECLARE local_time TIMESTAMP; + + SET local_time= NOW(); + SET cur_user= CURRENT_USER(); + SET local_uuid= UUID(); + + WHILE ins_count > 0 DO + INSERT INTO t2 VALUES (NULL, NOW(), USER() , UUID(), + ins_count,'Going to test MBR for MySQL'); + SET ins_count = ins_count - 1; + END WHILE; + + SELECT MAX(id) FROM t2 INTO del_count; + WHILE del_count > 0 DO + DELETE FROM t2 WHERE id = del_count; + SET del_count = del_count - 2; + END WHILE; +END| + +CREATE PROCEDURE p3() +BEGIN + DECLARE ins_count INT DEFAULT 1000; + DECLARE del_count INT; + DECLARE cur_user VARCHAR(255); + DECLARE local_uuid VARCHAR(255); + DECLARE local_time TIMESTAMP; + + SET local_time= NOW(); + SET cur_user = CURRENT_USER(); + SET local_uuid=UUID(); + + WHILE ins_count > 0 DO + INSERT INTO t3 VALUES (NULL, NOW(), USER(), UUID(), + ins_count,'Going to test MBR for MySQL'); + SET ins_count = ins_count - 1; + END WHILE; + + SELECT MAX(id) FROM t3 INTO del_count; + WHILE del_count > 0 DO + DELETE FROM t3 WHERE id = del_count; + SET del_count = del_count - 2; + END WHILE; +END| + +delimiter ;| + +############ Finish Setup Section ################### + + +############ Test Section ################### + +CALL p1(); +SELECT count(*) as "Master regular" FROM t1; +CALL p2(); +SELECT count(*) as "Master bykey" FROM t2; +CALL p3(); +SELECT count(*) as "Master byrange" FROM t3; + +#--source include/master-slave-end.inc +--sync_slave_with_master +connection slave; +show create table t3; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # +show slave status; +SELECT count(*) "Slave norm" FROM t1; +SELECT count(*) "Slave bykey" FROM t2; +SELECT count(*) "Slave byrange" FROM t3; + +connection master; +DROP TABLE t1, t2, t3; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +DROP PROCEDURE IF EXISTS p3; +save_master_pos; +connection slave; +sync_with_master; + +# End of 5.1 tests diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index fda40c30340..1c72d184739 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -14,3 +14,4 @@ rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after C rpl_innodb_mixed_ddl : Bug #29363 rpl.rpl_innodb_mixed_* test failures rpl_innodb_mixed_dml : Bug #29363 rpl.rpl_innodb_mixed_* test failures rpl_invoked_features : BUG#29020 2007-06-21 Lars Non-deterministic test case +rpl_udf : Bug#28993 rpl_udf test causes server crash and valgrind warning in pushbuild diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result new file mode 100644 index 00000000000..2f9dc4ae616 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_ctype_ucs2_def.result @@ -0,0 +1,9 @@ +show variables like 'collation_server'; +Variable_name Value +collation_server ucs2_unicode_ci +show variables like "%character_set_ser%"; +Variable_name Value +character_set_server ucs2 +DROP TABLE IF EXISTS t1; +create table t1 (a int); +drop table t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result new file mode 100644 index 00000000000..625d06de44b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result @@ -0,0 +1,129 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; + +*** Test 1 *** + +create table t1 (a int key, b int) engine innodb; +create table t2 (a int key, b int) engine innodb; + +alter table t1 engine ndb; +alter table t2 engine ndb; + +insert into t1 values (1,2); + +select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos +from mysql.ndb_apply_status; +@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos + + +show binlog events from limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 Query 1 # use `test`; insert into t1 values (1,2) + +show binlog events from limit 1,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Xid 1 445 COMMIT /* XID */ + +begin; +insert into t1 values (2,3); +insert into t2 values (3,4); +commit; + +select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos +from mysql.ndb_apply_status; +@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos + +show binlog events from limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 Query 1 # use `test`; BEGIN + +show binlog events from limit 1,2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; insert into t1 values (2,3) +master-bin.000001 # Query # # use `test`; insert into t2 values (3,4) + +show binlog events from limit 3,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Xid 1 COMMIT /* XID */ + +DROP TABLE test.t1, test.t2; +SHOW TABLES; +Tables_in_test + +*** Test 2 *** + +DROP DATABASE IF EXISTS tpcb; +CREATE DATABASE tpcb; + +CREATE TABLE tpcb.account (id INT, bid INT, balance DECIMAL(10,2), +filler CHAR(255), PRIMARY KEY(id)); + +CREATE TABLE tpcb.branch (bid INT, balance DECIMAL(10,2), filler VARCHAR(255), +PRIMARY KEY(bid)); + +CREATE TABLE tpcb.teller (tid INT, balance DECIMAL(10,2), filler VARCHAR(255), +PRIMARY KEY(tid)); + +CREATE TABLE tpcb.history (id MEDIUMINT NOT NULL AUTO_INCREMENT,aid INT, +tid INT, bid INT, amount DECIMAL(10,2), +tdate DATETIME, teller CHAR(20), uuidf LONGBLOB, +filler CHAR(80),PRIMARY KEY (id)); + +--- Create stored procedures & functions --- + + +*** Stored Procedures Created *** + +USE tpcb; +ALTER TABLE account ENGINE NDB; +ALTER TABLE branch ENGINE NDB; +ALTER TABLE teller ENGINE NDB; +ALTER TABLE history ENGINE NDB; + +select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos +from mysql.ndb_apply_status; +@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos + + +show binlog events in 'master-bin.000001' from limit 9,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Xid 1 COMMIT /* XID */ + +** Test 3 ** + +FLUSH LOGS; + +select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos +from mysql.ndb_apply_status; +@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos + + +show binlog events in 'master-bin.000002' from limit 9,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Xid 1 COMMIT /* XID */ + +** Test 4 ** + +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; + +select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos +from mysql.ndb_apply_status; +@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos + + +show binlog events in 'master-bin.000001' from limit 9,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Xid 1 COMMIT /* XID */ + +*** DUMP MASTER & SLAVE FOR COMPARE ******** +DROP DATABASE tpcb; +****** Do dumps compare ************ diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def index b238c8ac9c5..f5c99129c89 100644 --- a/mysql-test/suite/rpl_ndb/t/disabled.def +++ b/mysql-test/suite/rpl_ndb/t/disabled.def @@ -15,11 +15,12 @@ rpl_ndb_circular_simplex : BUG#27972 2007-04-20 mats Slave cannot start where it rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated rpl_ndb_2myisam : BUG#19227 Seems to pass currently rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD -rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement #rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly rpl_ndb_ddl : BUG#28798 2007-05-31 lars Valgrind failure in NDB +rpl_ndb_mix_innodb : BUG#28123 rpl_ndb_mix_innodb.test casue slave to core on sol10-sparc-a +rpl_ndb_ctype_ucs2_def : BUG#27404 util thd mysql_parse sig11 when mysqld default multibyte charset # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt new file mode 100644 index 00000000000..84d2a52b639 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def-master.opt @@ -0,0 +1 @@ +--default-collation=ucs2_unicode_ci --default-character-set=ucs2,latin1 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test new file mode 100644 index 00000000000..be7fd1acd2e --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_ctype_ucs2_def.test @@ -0,0 +1,42 @@ +--source include/have_ucs2.inc +--source include/have_ndb.inc +--source include/ndb_master-slave.inc + +# +# MySQL Bug#15276: MySQL ignores collation-server +# +show variables like 'collation_server'; + +# +# Check that NDB replication doesn't explode with default charset +# being multibyte. +# +# Theorised that this could be a problem when dealing with: +# Bug #27404 util thd mysql_parse sig11 when mysqld default multibyte charset +# +# Sort of related to: +# Bug#18004 Connecting crashes server when default charset is UCS2 +# +# +show variables like "%character_set_ser%"; +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +create table t1 (a int) ENGINE=NDB; +drop table t1; + +--connection master +CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', + `nom` char(4) default NULL, + `prenom` char(4) default NULL, + PRIMARY KEY (`nid`)) + ENGINE=ndbcluster; + +INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); +select * from t1 order by nid; + +--sync_slave_with_master +# connect to slave and ensure data it there. +--connection slave +select * from t1 order by nid; + diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt new file mode 100644 index 00000000000..3596fc4d3bd --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt @@ -0,0 +1 @@ +--innodb --default-storage-engine=innodb diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test new file mode 100644 index 00000000000..b730bcc08e0 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test @@ -0,0 +1,36 @@ +############################################# +#Authors: TU and Jeb +#Date: 2007/04 +#Purpose: Generic replication to cluster +# and ensuring that the ndb_apply_status +# table is updated. +############################################# +# Notes: +# include/select_ndb_apply_status.inc +# Selects out the log name, start & end pos +# from the ndb_apply_status table +# +# include/show_binlog_using_logname.inc +# To select out 1 row from offset 1 +# from the start position in the binlog whose +# name is = log_name +# +# include/tpcb.inc +# Creates DATABASE tpcb, the tables and +# stored procedures for loading the DB +# and for running transactions against DB. +############################################## + + +## Includes ## + +--disable_query_log +--source include/have_ndb.inc +--source include/have_innodb.inc +--source include/have_binlog_format_mixed.inc +--source include/ndb_master-slave.inc +--enable_query_log +let $off_set = 9; +let $rpl_format = 'MIX'; +--source extra/rpl_tests/rpl_ndb_apply_status.test + diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index abc8e6bc0bd..88af556725e 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -23,10 +23,4 @@ concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Double Whopper -im_options_set : Bug#20294: Instance manager tests fail randomly -im_options_unset : Bug#20294: Instance manager tests fail randomly mysql_upgrade : Bug#28560 test links to /usr/local/mysql/lib libraries, causes non-determinism and failures on ABI breakage -rpl_udf : Bug#28993 rpl_udf test causes server crash and valgrind warning in pushbuild -ndb_dd_sql_features : Bug#29102 ndb_dd_sql_features fails in pushbuild -rpl_ndb_mix_innodb : BUG#28123 rpl_ndb_mix_innodb.test casue slave to core on sol10-sparc-a -rpl_ndb_ctype_ucs2_def : BUG#27404 util thd mysql_parse sig11 when mysqld default multibyte charset diff --git a/mysql-test/t/rpl_ndb_ctype_ucs2_def-master.opt b/mysql-test/t/rpl_ndb_ctype_ucs2_def-master.opt deleted file mode 100644 index 84d2a52b639..00000000000 --- a/mysql-test/t/rpl_ndb_ctype_ucs2_def-master.opt +++ /dev/null @@ -1 +0,0 @@ ---default-collation=ucs2_unicode_ci --default-character-set=ucs2,latin1 diff --git a/mysql-test/t/rpl_ndb_ctype_ucs2_def.test b/mysql-test/t/rpl_ndb_ctype_ucs2_def.test deleted file mode 100644 index be7fd1acd2e..00000000000 --- a/mysql-test/t/rpl_ndb_ctype_ucs2_def.test +++ /dev/null @@ -1,42 +0,0 @@ ---source include/have_ucs2.inc ---source include/have_ndb.inc ---source include/ndb_master-slave.inc - -# -# MySQL Bug#15276: MySQL ignores collation-server -# -show variables like 'collation_server'; - -# -# Check that NDB replication doesn't explode with default charset -# being multibyte. -# -# Theorised that this could be a problem when dealing with: -# Bug #27404 util thd mysql_parse sig11 when mysqld default multibyte charset -# -# Sort of related to: -# Bug#18004 Connecting crashes server when default charset is UCS2 -# -# -show variables like "%character_set_ser%"; ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings -create table t1 (a int) ENGINE=NDB; -drop table t1; - ---connection master -CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0', - `nom` char(4) default NULL, - `prenom` char(4) default NULL, - PRIMARY KEY (`nid`)) - ENGINE=ndbcluster; - -INSERT INTO t1 VALUES(1,"XYZ1","ABC1"); -select * from t1 order by nid; - ---sync_slave_with_master -# connect to slave and ensure data it there. ---connection slave -select * from t1 order by nid; - diff --git a/mysql-test/t/rpl_ndb_mix_innodb-master.opt b/mysql-test/t/rpl_ndb_mix_innodb-master.opt deleted file mode 100644 index 3596fc4d3bd..00000000000 --- a/mysql-test/t/rpl_ndb_mix_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb --default-storage-engine=innodb diff --git a/mysql-test/t/rpl_ndb_mix_innodb.test b/mysql-test/t/rpl_ndb_mix_innodb.test deleted file mode 100644 index b730bcc08e0..00000000000 --- a/mysql-test/t/rpl_ndb_mix_innodb.test +++ /dev/null @@ -1,36 +0,0 @@ -############################################# -#Authors: TU and Jeb -#Date: 2007/04 -#Purpose: Generic replication to cluster -# and ensuring that the ndb_apply_status -# table is updated. -############################################# -# Notes: -# include/select_ndb_apply_status.inc -# Selects out the log name, start & end pos -# from the ndb_apply_status table -# -# include/show_binlog_using_logname.inc -# To select out 1 row from offset 1 -# from the start position in the binlog whose -# name is = log_name -# -# include/tpcb.inc -# Creates DATABASE tpcb, the tables and -# stored procedures for loading the DB -# and for running transactions against DB. -############################################## - - -## Includes ## - ---disable_query_log ---source include/have_ndb.inc ---source include/have_innodb.inc ---source include/have_binlog_format_mixed.inc ---source include/ndb_master-slave.inc ---enable_query_log -let $off_set = 9; -let $rpl_format = 'MIX'; ---source extra/rpl_tests/rpl_ndb_apply_status.test - diff --git a/mysql-test/t/rpl_partition.test b/mysql-test/t/rpl_partition.test deleted file mode 100644 index 7f6e05db20e..00000000000 --- a/mysql-test/t/rpl_partition.test +++ /dev/null @@ -1,160 +0,0 @@ ---source include/have_innodb.inc ---source include/master-slave.inc - ---vertical_results - -let $engine_type= 'innodb'; - -SET GLOBAL binlog_format = 'ROW'; -SET SESSION binlog_format = 'ROW'; -select @@global.binlog_format, @@session.binlog_format; - ---disable-warnings -DROP TABLE IF EXISTS t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; ---enable-warnings - -eval CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, - dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, - fkid MEDIUMINT, filler VARCHAR(255), - PRIMARY KEY(id)) ENGINE=$engine_type; - -eval CREATE TABLE t2(id MEDIUMINT NOT NULL AUTO_INCREMENT, - dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, - fkid MEDIUMINT, filler VARCHAR(255), - PRIMARY KEY(id)) ENGINE=$engine_type - PARTITION BY KEY(id) partitions 5; - -eval CREATE TABLE t3(id MEDIUMINT NOT NULL AUTO_INCREMENT, - dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, - fkid MEDIUMINT, filler VARCHAR(255), - PRIMARY KEY(id)) ENGINE=$engine_type - PARTITION BY RANGE(id) - SUBPARTITION BY hash(id) subpartitions 2 - (PARTITION pa1 values less than (10), - PARTITION pa2 values less than (20), - PARTITION pa3 values less than (30), - PARTITION pa4 values less than (40), - PARTITION pa5 values less than (50), - PARTITION pa6 values less than (60), - PARTITION pa7 values less than (70), - PARTITION pa8 values less than (80), - PARTITION pa9 values less than (90), - PARTITION pa10 values less than (100), - PARTITION pa11 values less than MAXVALUE); - -######## Create SPs, Functions, Views and Triggers Section ############## - -delimiter |; -CREATE PROCEDURE p1() -BEGIN - DECLARE ins_count INT DEFAULT 1000; - DECLARE del_count INT; - DECLARE cur_user VARCHAR(255); - DECLARE local_uuid VARCHAR(255); - DECLARE local_time TIMESTAMP; - - SET local_time= NOW(); - SET cur_user= CURRENT_USER(); - SET local_uuid= UUID(); - - WHILE ins_count > 0 DO - INSERT INTO t1 VALUES (NULL, NOW(), USER() , UUID(), - ins_count,'Going to test MBR for MySQL'); - SET ins_count = ins_count - 1; - END WHILE; - - SELECT MAX(id) FROM t1 INTO del_count; - WHILE del_count > 0 DO - DELETE FROM t1 WHERE id = del_count; - SET del_count = del_count - 2; - END WHILE; -END| - -CREATE PROCEDURE p2() -BEGIN - DECLARE ins_count INT DEFAULT 1000; - DECLARE del_count INT; - DECLARE cur_user VARCHAR(255); - DECLARE local_uuid VARCHAR(255); - DECLARE local_time TIMESTAMP; - - SET local_time= NOW(); - SET cur_user= CURRENT_USER(); - SET local_uuid= UUID(); - - WHILE ins_count > 0 DO - INSERT INTO t2 VALUES (NULL, NOW(), USER() , UUID(), - ins_count,'Going to test MBR for MySQL'); - SET ins_count = ins_count - 1; - END WHILE; - - SELECT MAX(id) FROM t2 INTO del_count; - WHILE del_count > 0 DO - DELETE FROM t2 WHERE id = del_count; - SET del_count = del_count - 2; - END WHILE; -END| - -CREATE PROCEDURE p3() -BEGIN - DECLARE ins_count INT DEFAULT 1000; - DECLARE del_count INT; - DECLARE cur_user VARCHAR(255); - DECLARE local_uuid VARCHAR(255); - DECLARE local_time TIMESTAMP; - - SET local_time= NOW(); - SET cur_user = CURRENT_USER(); - SET local_uuid=UUID(); - - WHILE ins_count > 0 DO - INSERT INTO t3 VALUES (NULL, NOW(), USER(), UUID(), - ins_count,'Going to test MBR for MySQL'); - SET ins_count = ins_count - 1; - END WHILE; - - SELECT MAX(id) FROM t3 INTO del_count; - WHILE del_count > 0 DO - DELETE FROM t3 WHERE id = del_count; - SET del_count = del_count - 2; - END WHILE; -END| - -delimiter ;| - -############ Finish Setup Section ################### - - -############ Test Section ################### - -CALL p1(); -SELECT count(*) as "Master regular" FROM t1; -CALL p2(); -SELECT count(*) as "Master bykey" FROM t2; -CALL p3(); -SELECT count(*) as "Master byrange" FROM t3; - -#--source include/master-slave-end.inc ---sync_slave_with_master -connection slave; -show create table t3; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # -show slave status; -SELECT count(*) "Slave norm" FROM t1; -SELECT count(*) "Slave bykey" FROM t2; -SELECT count(*) "Slave byrange" FROM t3; - -connection master; -DROP TABLE t1, t2, t3; -DROP PROCEDURE IF EXISTS p1; -DROP PROCEDURE IF EXISTS p2; -DROP PROCEDURE IF EXISTS p3; -save_master_pos; -connection slave; -sync_with_master; - -# End of 5.1 tests -- cgit v1.2.1 From b1ec3b534d530807995955c1c249496b0912a906 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jul 2007 02:20:32 +0400 Subject: A fix and a teset case for Bug#28551 The warning 'No database selected' is reported when calling stored procedures Remove the offending warning introduced by the fix for Bug 25082 This minimal patch relies on the intrinsic knowledge of the fact that mysql_change_db is never called with 'force_switch' set to TRUE when such a warning may be needed: * every stored routine belongs to a database (unlike, e.g., a user defined function, which does not), so if we're activating the database of a stored routine, it can never be NULL. Therefore, this branch is never called for activation. * if we're restoring the 'old' current database after routine execution is complete, we should not issue a warning, since it's OK to call a routine without having previously selected the current database. TODO: 'force_switch' is an ambiguous flag, since we do not actually have to 'force' the switch in case of stored routines at all. When we activate the routine's database, we should perform all the checks as in case of 'use db', and so we already do (in this case 'force_switch' is unused). When we load a routine into cache, we should not use mysql_change_db at all, since there it's enough to call thd->reset_db(). We do it this way for triggers, but code for routines is different (wrongly). TODO: bugs are lurking in replication, since it bypasses mysql_change_db and calls thd->[re_]set_db to set the current database. The latter does not change thd->db_charset, thd->sctx->db_access and thd->variables.collation_database (and this may have nasty side effects). These todo items are to be addressed in a separate patch, if at all. mysql-test/r/sp.result: Update results (Bug#28551) mysql-test/t/sp.test: Add a test case (Bug#28551) sql/sp.cc: Remove an obsolete comment. Replace a check with an assert. sql/sql_db.cc: Remove the offending warning introduced by the fix for Bug 25082 This minimal patch relies on the intrinsic knowledge of the fact that mysql_change_db is never called with 'force_switch' set to TRUE when such a warning may be needed. --- mysql-test/r/sp.result | 7 +++++++ mysql-test/t/sp.test | 12 ++++++++++++ 2 files changed, 19 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index b411c65faee..5d7371b0991 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6176,4 +6176,11 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI DROP VIEW v1; DROP FUNCTION metered; DROP TABLE t1; +drop database if exists mysqltest_db1; +create database mysqltest_db1; +create procedure mysqltest_db1.sp_bug28551() begin end; +call mysqltest_db1.sp_bug28551(); +show warnings; +Level Code Message +drop database mysqltest_db1; End of 5.0 tests diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 0de416cdffa..cfc97fab777 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -7130,5 +7130,17 @@ DROP VIEW v1; DROP FUNCTION metered; DROP TABLE t1; +# +# Bug#28551 "The warning 'No database selected' is reported when calling +# stored procedures" +# +--disable_warnings +drop database if exists mysqltest_db1; +--enable_warnings +create database mysqltest_db1; +create procedure mysqltest_db1.sp_bug28551() begin end; +call mysqltest_db1.sp_bug28551(); +show warnings; +drop database mysqltest_db1; --echo End of 5.0 tests -- cgit v1.2.1 From 5d88b654ede319aa3534833500f0963eba6f9f1a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Jul 2007 21:12:07 -0700 Subject: Fixed bug #29392. This bug may manifest itself for select queries over a multi-table view that includes an ORDER BY clause in its definition. If the select list of the query contains references to the same view column with different aliases the names of the columns in the result output will be nevertheless the same, coinciding with one of the alias. The bug happened because the method Item_ref::get_tmp_table_item that was inherited by the class Item_direct_view_ref ignored the fact that the name of the view column reference must be inherited by the fields of the temporary table that was created in order to get the result rows sorted. mysql-test/r/view.result: Added a test case for bug #29392. mysql-test/t/view.test: Added a test case for bug #29392. sql/item.h: Fixed bug #29392. This bug may manifest itself for select queries over a multi-table view that includes an ORDER BY clause in its definition. If the select list of the query contains references to the same view column with different aliases the names of the columns in the result output will be nevertheless the same, coinciding with one of the alias. The bug happened because the method Item_ref::get_tmp_table_item that was inherited by the class Item_direct_view_ref ignored the fact that the name of the view column reference must be inherited by the fields of the temporary table that was created in order to get the result rows sorted. Fixed by providing a proper implementation of the get_tmp_table_item method for the Item_direct_view_ref class. --- mysql-test/r/view.result | 47 +++++++++++++++++++++++++++++++++++++++++ mysql-test/t/view.test | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 9adb3f96142..c51a4c30960 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3500,4 +3500,51 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where DROP VIEW v1; DROP TABLE t1; +CREATE TABLE t1 ( +person_id int NOT NULL PRIMARY KEY, +username varchar(40) default NULL, +status_flg char(1) NOT NULL default 'A' +); +CREATE TABLE t2 ( +person_role_id int NOT NULL auto_increment PRIMARY KEY, +role_id int NOT NULL, +person_id int NOT NULL, +INDEX idx_person_id (person_id), +INDEX idx_role_id (role_id) +); +CREATE TABLE t3 ( +role_id int NOT NULL auto_increment PRIMARY KEY, +role_name varchar(100) default NULL, +app_name varchar(40) NOT NULL, +INDEX idx_app_name(app_name) +); +CREATE VIEW v1 AS +SELECT profile.person_id AS person_id +FROM t1 profile, t2 userrole, t3 role +WHERE userrole.person_id = profile.person_id AND +role.role_id = userrole.role_id AND +profile.status_flg = 'A' + ORDER BY profile.person_id,role.app_name,role.role_name; +INSERT INTO t1 VALUES +(6,'Sw','A'), (-1136332546,'ols','e'), (0,' *\n','0'), +(-717462680,'ENTS Ta','0'), (-904346964,'ndard SQL\n','0'); +INSERT INTO t2 VALUES +(1,3,6),(2,4,7),(3,5,8),(4,6,9),(5,1,6),(6,1,7),(7,1,8),(8,1,9),(9,1,10); +INSERT INTO t3 VALUES +(1,'NUCANS_APP_USER','NUCANSAPP'),(2,'NUCANS_TRGAPP_USER','NUCANSAPP'), +(3,'IA_INTAKE_COORDINATOR','IACANS'),(4,'IA_SCREENER','IACANS'), +(5,'IA_SUPERVISOR','IACANS'),(6,'IA_READONLY','IACANS'), +(7,'SOC_USER','SOCCANS'),(8,'CAYIT_USER','CAYITCANS'), +(9,'RTOS_DCFSPOS_SUPERVISOR','RTOS'); +EXPLAIN SELECT t.person_id AS a, t.person_id AS b FROM v1 t WHERE t.person_id=6; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE profile const PRIMARY PRIMARY 4 const 1 Using temporary; Using filesort +1 SIMPLE userrole ref idx_person_id,idx_role_id idx_person_id 4 const 2 +1 SIMPLE role eq_ref PRIMARY PRIMARY 4 test.userrole.role_id 1 +SELECT t.person_id AS a, t.person_id AS b FROM v1 t WHERE t.person_id=6; +a b +6 6 +6 6 +DROP VIEW v1; +DROP TABLE t1,t2,t3; End of 5.0 tests. diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index f670ac8a49d..c7f722a18a5 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3348,4 +3348,59 @@ EXPLAIN SELECT a, SUM(b) FROM v1 WHERE a=1 GROUP BY a; DROP VIEW v1; DROP TABLE t1; +# +# Bug #29392: SELECT over a multi-table view with ORDER BY +# selecting the same view column with two different aliases +# + +CREATE TABLE t1 ( + person_id int NOT NULL PRIMARY KEY, + username varchar(40) default NULL, + status_flg char(1) NOT NULL default 'A' +); + +CREATE TABLE t2 ( + person_role_id int NOT NULL auto_increment PRIMARY KEY, + role_id int NOT NULL, + person_id int NOT NULL, + INDEX idx_person_id (person_id), + INDEX idx_role_id (role_id) +); + +CREATE TABLE t3 ( + role_id int NOT NULL auto_increment PRIMARY KEY, + role_name varchar(100) default NULL, + app_name varchar(40) NOT NULL, + INDEX idx_app_name(app_name) +); + +CREATE VIEW v1 AS +SELECT profile.person_id AS person_id + FROM t1 profile, t2 userrole, t3 role + WHERE userrole.person_id = profile.person_id AND + role.role_id = userrole.role_id AND + profile.status_flg = 'A' + ORDER BY profile.person_id,role.app_name,role.role_name; + +INSERT INTO t1 VALUES + (6,'Sw','A'), (-1136332546,'ols','e'), (0,' *\n','0'), + (-717462680,'ENTS Ta','0'), (-904346964,'ndard SQL\n','0'); + +INSERT INTO t2 VALUES + (1,3,6),(2,4,7),(3,5,8),(4,6,9),(5,1,6),(6,1,7),(7,1,8),(8,1,9),(9,1,10); + +INSERT INTO t3 VALUES + (1,'NUCANS_APP_USER','NUCANSAPP'),(2,'NUCANS_TRGAPP_USER','NUCANSAPP'), + (3,'IA_INTAKE_COORDINATOR','IACANS'),(4,'IA_SCREENER','IACANS'), + (5,'IA_SUPERVISOR','IACANS'),(6,'IA_READONLY','IACANS'), + (7,'SOC_USER','SOCCANS'),(8,'CAYIT_USER','CAYITCANS'), + (9,'RTOS_DCFSPOS_SUPERVISOR','RTOS'); + +EXPLAIN SELECT t.person_id AS a, t.person_id AS b FROM v1 t WHERE t.person_id=6; +SELECT t.person_id AS a, t.person_id AS b FROM v1 t WHERE t.person_id=6; + +DROP VIEW v1; +DROP TABLE t1,t2,t3; + --echo End of 5.0 tests. + -- cgit v1.2.1 From 558aeb0f0bfd83726ffe84f5739c0317df48980c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jul 2007 11:55:06 +0500 Subject: Fix for bug #29411: deleting from a csv table leads to the table corruption Problem: we don't adjust share->rows_recorded and local_saved_data_file_length deleting rows from a CSV table, so following table check may fail. Fix: properly adjust those values. mysql-test/r/csv.result: Fix for bug #29411: deleting from a csv table leads to the table corruption - test result. mysql-test/t/csv.test: Fix for bug #29411: deleting from a csv table leads to the table corruption - test case. storage/csv/ha_tina.cc: Fix for bug #29411: deleting from a csv table leads to the table corruption - decrement share->rows_recorded in the ha_tina::delete_row(). - set share->rows_recorded and local_saved_data_file_length to 0 in the ha_tina::delete_all_rows(). - adjust local_saved_data_file_length after cleaning up in the ha_tina::rnd_end(). --- mysql-test/r/csv.result | 18 ++++++++++++++++-- mysql-test/t/csv.test | 13 +++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result index 5076220f74b..6335d890a95 100644 --- a/mysql-test/r/csv.result +++ b/mysql-test/r/csv.result @@ -4945,8 +4945,6 @@ SELECT * FROM bug13894; val 6 6 -5 -11 DROP TABLE bug13894; DROP TABLE IF EXISTS bug14672; CREATE TABLE bug14672 (c1 integer) engine = CSV; @@ -5291,4 +5289,20 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +create table t1(a int) engine=csv; +insert into t1 values (0), (1), (2); +delete from t1 limit 2; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +select * from t1; +a +2 +delete from t1; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +select * from t1; +a +drop table t1; End of 5.1 tests diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index 6d24b38ee10..26051da24aa 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -1698,4 +1698,17 @@ select * from t1; check table t1; drop table t1; +# +# Bug #29411: deleting from a csv table leads to the table corruption +# +create table t1(a int) engine=csv; +insert into t1 values (0), (1), (2); +delete from t1 limit 2; +check table t1; +select * from t1; +delete from t1; +check table t1; +select * from t1; +drop table t1; + --echo End of 5.1 tests -- cgit v1.2.1 From e8966deecc0eda77c5b94c6f0004cc2159dbd158 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jul 2007 11:34:04 +0400 Subject: A fix and a test case for Bug#29050 Creation of a legal stored procedure fails if a database is not selected prior. The problem manifested itself when a user tried to create a routine that had non-fully-qualified identifiers in its bodies and there was no current database selected. This is a regression introduced by the fix for Bug 19022: The patch for Bug 19022 changes the code to always produce a warning if we can't resolve the current database in the parser. In this case this was not necessary, since even though the produced parsed tree was incorrect, we never re-use sphead that was obtained at first parsing of CREATE PROCEDURE. The sphead that is anyhow used is always obtained through db_load_routine, and there we change the current database to sphead->m_db before calling yyparse. The idea of the fix is to resolve the current database directly using lex->sphead->m_db member when parsing a stored routine body, when such is present. This patch removes the need to reset the current database when loading a trigger or routine definition into SP cache. The redundant code will be removed in 5.1. mysql-test/r/sp.result: Update test results (Bug#29050) mysql-test/r/trigger.result: Update results. mysql-test/t/sp.test: Add a test case for Bug#29050 mysql-test/t/trigger.test: Fix wrong behavior covered with tests. sql/sql_lex.cc: Implement st_lex::copy_db_to(). sql/sql_lex.h: Declare st_lex::copy_db_to(). sql/sql_parse.cc: Use st_lex::copy_db_to() in add_table_to_list, rather than THD::copy_db_to(). The former will use the database of the sphead, if we're parsing a stored routine, not the default database in THD. The default database is needed to initialize tables->db when the database part was not explicitly specified in the identifier. sql/sql_yacc.yy: Use st_lex::copy_db_to() in the parser, rather than THD::copy_db_to(). The former will use the database of the sphead, if we're parsing a stored routine, not the default database in THD. --- mysql-test/r/sp.result | 18 ++++++++++++++++++ mysql-test/r/trigger.result | 4 ++-- mysql-test/t/sp.test | 25 +++++++++++++++++++++++++ mysql-test/t/trigger.test | 4 ++-- 4 files changed, 47 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 5d7371b0991..7a4deb3ea5f 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6183,4 +6183,22 @@ call mysqltest_db1.sp_bug28551(); show warnings; Level Code Message drop database mysqltest_db1; +drop database if exists mysqltest_db1; +drop table if exists test.t1; +create database mysqltest_db1; +use mysqltest_db1; +drop database mysqltest_db1; +create table test.t1 (id int); +insert into test.t1 (id) values (1); +create procedure test.sp_bug29050() begin select * from t1; end// +show warnings; +Level Code Message +call test.sp_bug29050(); +id +1 +show warnings; +Level Code Message +use test; +drop procedure sp_bug29050; +drop table t1; End of 5.0 tests diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 5405a632aa4..290929d476d 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -351,7 +351,7 @@ create trigger trg1 before insert on mysqltest.t1 for each row set @a:= 1; ERROR HY000: Trigger in wrong schema use mysqltest; create trigger test.trg1 before insert on t1 for each row set @a:= 1; -ERROR HY000: Trigger in wrong schema +ERROR 42S02: Table 'test.t1' doesn't exist drop database mysqltest; use test; create table t1 (i int, j int default 10, k int not null, key (k)); @@ -842,7 +842,7 @@ drop table t1; create trigger t1_bi before insert on test.t1 for each row set @a:=0; ERROR 3D000: No database selected create trigger test.t1_bi before insert on t1 for each row set @a:=0; -ERROR 3D000: No database selected +ERROR 42S02: Table 'test.t1' doesn't exist drop trigger t1_bi; ERROR 3D000: No database selected create table t1 (id int); diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index cfc97fab777..54dc84ad19d 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -7142,5 +7142,30 @@ create procedure mysqltest_db1.sp_bug28551() begin end; call mysqltest_db1.sp_bug28551(); show warnings; drop database mysqltest_db1; +# +# Bug#29050 Creation of a legal stored procedure fails if a database is not +# selected prior +# +--disable_warnings +drop database if exists mysqltest_db1; +drop table if exists test.t1; +--enable_warnings +create database mysqltest_db1; +use mysqltest_db1; +# For the sake of its side effect +drop database mysqltest_db1; +# Now we have no current database selected. +create table test.t1 (id int); +insert into test.t1 (id) values (1); +delimiter //; +create procedure test.sp_bug29050() begin select * from t1; end// +delimiter ;// +show warnings; +call test.sp_bug29050(); +show warnings; +# Restore the old current database +use test; +drop procedure sp_bug29050; +drop table t1; --echo End of 5.0 tests diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index 7158d02956e..0fa92f33de2 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -406,7 +406,7 @@ create table mysqltest.t1 (i int); --error ER_TRG_IN_WRONG_SCHEMA create trigger trg1 before insert on mysqltest.t1 for each row set @a:= 1; use mysqltest; ---error ER_TRG_IN_WRONG_SCHEMA +--error ER_NO_SUCH_TABLE create trigger test.trg1 before insert on t1 for each row set @a:= 1; drop database mysqltest; use test; @@ -1040,7 +1040,7 @@ drop table t1; connection addconwithoutdb; --error ER_NO_DB_ERROR create trigger t1_bi before insert on test.t1 for each row set @a:=0; ---error ER_NO_DB_ERROR +--error ER_NO_SUCH_TABLE create trigger test.t1_bi before insert on t1 for each row set @a:=0; --error ER_NO_DB_ERROR drop trigger t1_bi; -- cgit v1.2.1 From e4ee2c5c08dc8d96f1519c1305416a4f17f1fcc0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jul 2007 12:48:11 +0500 Subject: BUG#27564 - Valgrind: UDF does not cleanup correctly Enabling rpl_udf test. mysql-test/t/disabled.def: Enabling rpl_udf test. --- mysql-test/t/disabled.def | 1 - 1 file changed, 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 32de2077e81..8a6a91fc169 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -51,6 +51,5 @@ ndb_partition_error2 : HF is not sure if the test can work as internded on all im_options_set : Bug#20294: Instance manager tests fail randomly im_options_unset : Bug#20294: Instance manager tests fail randomly mysql_upgrade : Bug#28560 test links to /usr/local/mysql/lib libraries, causes non-determinism and failures on ABI breakage -rpl_udf : Bug#28993 rpl_udf test causes server crash and valgrind warning in pushbuild rpl_ndb_circular : Bug#29233 rpl_ndb_circular fails randomly ndb_dd_sql_features : Bug#29102 ndb_dd_sql_features fails in pushbuild -- cgit v1.2.1 From 0d8f353b93f511b99e0f0ac79c3d48cd462186ff Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jul 2007 13:09:56 +0500 Subject: Fix for bug #29420: crash with show and purge binlogs Problem: in case of failed 'show binlog events...' we don't inform that the log is not in use anymore. That may confuse following 'purge logs...' command as it takes into account logs in use. Fix: always notify that the log is not in use anymore. mysql-test/r/rpl_rotate_logs.result: Fix for bug #29420: crash with show and purge binlogs - test result. mysql-test/t/rpl_rotate_logs.test: Fix for bug #29420: crash with show and purge binlogs - test case. sql/sql_repl.cc: Fix for bug #29420: crash with show and purge binlogs - always zero thd->current_linfo at the end of the mysql_show_binlog_events(). --- mysql-test/r/rpl_rotate_logs.result | 8 ++++++++ mysql-test/t/rpl_rotate_logs.test | 14 +++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index df42e76a0c8..8a5ae6c8983 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -95,3 +95,11 @@ count(*) 100 unlock tables; drop table if exists t1,t2,t3,t4; +End of 4.1 tests +show binlog events in 'non existing_binlog_file'; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log +purge master logs before now(); +show binlog events in ''; +ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log +purge master logs before now(); +End of 5.0 tests diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test index 69614b45693..0b7efb81f61 100644 --- a/mysql-test/t/rpl_rotate_logs.test +++ b/mysql-test/t/rpl_rotate_logs.test @@ -169,4 +169,16 @@ connection master; drop table if exists t1,t2,t3,t4; sync_slave_with_master; -# End of 4.1 tests +--echo End of 4.1 tests + +# +# Bug #29420: crash with show and purge binlogs +# +--error 1220 +show binlog events in 'non existing_binlog_file'; +purge master logs before now(); +--error 1220 +show binlog events in ''; +purge master logs before now(); + +--echo End of 5.0 tests -- cgit v1.2.1 From 3bd52b0b7b4cddc973b74af64c097033cb75e149 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jul 2007 15:17:06 +0500 Subject: BUG#29464 - load data infile into table with big5 chinese fulltext index hangs 100% cpu Fulltext parser may fall into infinite loop when it gets illegal multibyte sequence (or a sequence that doesn't have mapping to unicode). Affects 5.1 only. mysql-test/r/fulltext.result: A test case for BUG#29464. mysql-test/t/fulltext.test: A test case for BUG#29464. storage/myisam/ft_parser.c: ctype() may return negative value, which was stored in unsigned variable. Also ctype() may return negative length for correct multibyte sequence that doesn't have a mapping to unicode. These characters are skipped correctly with this patch. --- mysql-test/r/fulltext.result | 4 ++++ mysql-test/t/fulltext.test | 9 +++++++++ 2 files changed, 13 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index d8e3d53f7b1..ef8cf304743 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -476,3 +476,7 @@ ALTER TABLE t1 DISABLE KEYS; SELECT * FROM t1 WHERE MATCH(a) AGAINST('test'); ERROR HY000: Can't find FULLTEXT index matching the column list DROP TABLE t1; +CREATE TABLE t1(a VARCHAR(2) CHARACTER SET big5 COLLATE big5_chinese_ci, +FULLTEXT(a)); +INSERT INTO t1 VALUES(0xA3C2); +DROP TABLE t1; diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 537ab5888bd..749e54d218a 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -399,4 +399,13 @@ ALTER TABLE t1 DISABLE KEYS; SELECT * FROM t1 WHERE MATCH(a) AGAINST('test'); DROP TABLE t1; +# +# BUG#29464 - load data infile into table with big5 chinese fulltext index +# hangs 100% cpu +# +CREATE TABLE t1(a VARCHAR(2) CHARACTER SET big5 COLLATE big5_chinese_ci, +FULLTEXT(a)); +INSERT INTO t1 VALUES(0xA3C2); +DROP TABLE t1; + # End of 4.1 tests -- cgit v1.2.1 From 32c6341ea8df1a5a42c0b5d514a1becf10c81be2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jul 2007 15:34:12 +0500 Subject: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored Problem: logging queries not using indexes we check a special flag which is set only at the server startup and is not changing with a corresponding server variable together. Fix: check the variable value instead of the flag. mysql-test/r/show_check.result: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored - test result. mysql-test/t/show_check.test: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored - test case. sql/mysqld.cc: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored - SPECIAL_LOG_QUERIES_NOT_USING_INDEXES is not used anymore. sql/sql_parse.cc: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored - check opt_log_queries_not_using_indexes instead of SPECIAL_LOG_QUERIES_NOT_USING_INDEXES flag. sql/unireg.h: Fix for bug #28808: log_queries_not_using_indexes variable dynamic change is ignored - SPECIAL_LOG_QUERIES_NOT_USING_INDEXES is not used anymore. --- mysql-test/r/show_check.result | 30 ++++++++++++++++++++++++++++++ mysql-test/t/show_check.test | 16 ++++++++++++++++ 2 files changed, 46 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index e2450c98202..e4cdd4f183b 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1088,4 +1088,34 @@ DROP TABLE t1; DROP VIEW v1; DROP PROCEDURE p1; DROP FUNCTION f1; +flush status; +show variables like "log_queries_not_using_indexes"; +Variable_name Value +log_queries_not_using_indexes ON +select 1 from information_schema.tables limit 1; +1 +1 +show status like 'slow_queries'; +Variable_name Value +Slow_queries 1 +set global log_queries_not_using_indexes=OFF; +show variables like "log_queries_not_using_indexes"; +Variable_name Value +log_queries_not_using_indexes OFF +select 1 from information_schema.tables limit 1; +1 +1 +show status like 'slow_queries'; +Variable_name Value +Slow_queries 1 +set global log_queries_not_using_indexes=ON; +show variables like "log_queries_not_using_indexes"; +Variable_name Value +log_queries_not_using_indexes ON +select 1 from information_schema.tables limit 1; +1 +1 +show status like 'slow_queries'; +Variable_name Value +Slow_queries 2 End of 5.0 tests diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 1db40b0c17c..a58d81a414b 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -766,4 +766,20 @@ DROP VIEW v1; DROP PROCEDURE p1; DROP FUNCTION f1; +# +# Bug #28808: log_queries_not_using_indexes variable dynamic change is ignored +# +flush status; +show variables like "log_queries_not_using_indexes"; +select 1 from information_schema.tables limit 1; +show status like 'slow_queries'; +set global log_queries_not_using_indexes=OFF; +show variables like "log_queries_not_using_indexes"; +select 1 from information_schema.tables limit 1; +show status like 'slow_queries'; +set global log_queries_not_using_indexes=ON; +show variables like "log_queries_not_using_indexes"; +select 1 from information_schema.tables limit 1; +show status like 'slow_queries'; + --echo End of 5.0 tests -- cgit v1.2.1 From 6139d34c92bf9c2e1a2fe19b41c7e19f5cbe2787 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jul 2007 18:24:48 +0300 Subject: Bug #29166: AsText() needs to know the maximum number of characters a IEEE double precision value can occupy to make sure there's enough buffer space. The number was too small to hold all possible values and this caused buffer overruns. Fixed by correcting the calculation of the maximum digits in a string representation of an IEEE double precision value as printed by String::qs_append(double). mysql-test/r/gis.result: Bug #29166: test case mysql-test/t/gis.test: Bug #29166: test case sql/spatial.cc: Bug #29166: correct calculation of the maximum digits in a string representation of a double --- mysql-test/r/gis.result | 3 +++ mysql-test/t/gis.test | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index d1f292cda0c..edf017f24d4 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -885,4 +885,7 @@ AsText(a) POINT(1 1) LINESTRING(0 0,1 1,2 2) drop table t1, t2; +SELECT 1; +1 +1 End of 5.0 tests diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 95ccc6272e2..79743a0b8f4 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -570,4 +570,24 @@ create table t2 as select f2 as a from t1 union select f3 from t1; desc t2; select AsText(a) from t2; drop table t1, t2; + +# +# Bug #29166: MYsql crash when query is run +# + +# The test query itself is not logged : too large output. +# The real test is the second query : see if the first hasn't crashed the +# server +--disable_query_log +--disable_result_log +SELECT AsText(GeometryFromText(CONCAT( + 'MULTIPOLYGON(((', + REPEAT ('-0.00000000001234567890123456789012 -0.123456789012345678,', 1000), + '-0.00000000001234567890123456789012 -0.123456789012345678', + ')))' +))) AS a; +--enable_result_log +--enable_query_log +SELECT 1; + --echo End of 5.0 tests -- cgit v1.2.1 From ea2ec3d96f3b615813e82a8ba691891ce44b52f6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jul 2007 19:20:14 +0200 Subject: Post-merge fixes. Fixed typos and comment styles in tests. mysql-test/r/rpl_partition.result: Post-merge fixes. Removed warnings after fixing --disable_warnings command. mysql-test/t/ctype_uca.test: Post-merge fixes. Fixed comment style. mysql-test/t/rpl_partition.test: Post-merge fixes. Fixed typo in --disable_warnings and --enable_warnings. mysql-test/t/subselect.test: Post-merge fixes. Fixed comment style. --- mysql-test/r/rpl_partition.result | 22 ---------------------- mysql-test/t/ctype_uca.test | 2 +- mysql-test/t/rpl_partition.test | 4 ++-- mysql-test/t/subselect.test | 2 +- 4 files changed, 4 insertions(+), 26 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_partition.result b/mysql-test/r/rpl_partition.result index cdd29919c48..79a95fd613b 100644 --- a/mysql-test/r/rpl_partition.result +++ b/mysql-test/r/rpl_partition.result @@ -10,31 +10,9 @@ select @@global.binlog_format, @@session.binlog_format; @@global.binlog_format ROW @@session.binlog_format ROW DROP TABLE IF EXISTS t1, t2, t3; -Warnings: -Level Note -Code 1051 -Message Unknown table 't1' -Level Note -Code 1051 -Message Unknown table 't2' -Level Note -Code 1051 -Message Unknown table 't3' DROP PROCEDURE IF EXISTS p1; -Warnings: -Level Note -Code 1305 -Message PROCEDURE p1 does not exist DROP PROCEDURE IF EXISTS p2; -Warnings: -Level Note -Code 1305 -Message PROCEDURE p2 does not exist DROP PROCEDURE IF EXISTS p3; -Warnings: -Level Note -Code 1305 -Message PROCEDURE p3 does not exist CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, fkid MEDIUMINT, filler VARCHAR(255), diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test index 17632e7c8fc..695a21adbf5 100644 --- a/mysql-test/t/ctype_uca.test +++ b/mysql-test/t/ctype_uca.test @@ -530,7 +530,7 @@ create table t1 ( a varchar(255), key a(a) ) character set utf8 collate utf8_czech_ci; --- In Czech 'ch' is a single letter between 'h' and 'i' +# In Czech 'ch' is a single letter between 'h' and 'i' insert into t1 values ('b'),('c'),('d'),('e'),('f'),('g'),('h'),('ch'),('i'),('j'); select * from t1 where a like 'c%'; diff --git a/mysql-test/t/rpl_partition.test b/mysql-test/t/rpl_partition.test index 7f6e05db20e..ffd6d17ec6f 100644 --- a/mysql-test/t/rpl_partition.test +++ b/mysql-test/t/rpl_partition.test @@ -9,12 +9,12 @@ SET GLOBAL binlog_format = 'ROW'; SET SESSION binlog_format = 'ROW'; select @@global.binlog_format, @@session.binlog_format; ---disable-warnings +--disable_warnings DROP TABLE IF EXISTS t1, t2, t3; DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; DROP PROCEDURE IF EXISTS p3; ---enable-warnings +--enable_warnings eval CREATE TABLE t1(id MEDIUMINT NOT NULL AUTO_INCREMENT, dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB, diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 4c046dfd3c6..95514fd773e 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -2970,7 +2970,7 @@ DROP TABLE t1,t2; CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1, 2), (1,3), (1,4), (2,1), (2,2); --- returns no rows, when it should +# returns no rows, when it should SELECT a1.a, COUNT(*) FROM t1 a1 WHERE a1.a = 1 AND EXISTS( SELECT a2.a FROM t1 a2 WHERE a2.a = a1.a) GROUP BY a1.a; -- cgit v1.2.1 From 725b49716b2bfb88361f37df2fd882578998b131 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Jul 2007 03:43:23 +0500 Subject: Fixed bug #29442. The SELECT INTO OUTFILE FIELDS ENCLOSED BY digit or minus sign, followed by the same LOAD DATA INFILE statement, used wrond encoding of non-string fields contained the enclosed character in their text representation. Example: SELECT 15, 9 INTO OUTFILE 'text' FIELDS ENCLOSED BY '5'; Old encoded result in the text file: 5155 595 ^ was decoded as the 1st enclosing character of the 2nd field; ^ was skipped as garbage; ^ ^ was decoded as a pair of englosing characters of the 1st field; ^ was decoded as traling space of the first field; ^^ was decoded as a doubled enclosed character. New encoded result in the text file: 51\55 595 ^ ^ pair of enclosing characters of the 1st field; ^^ escaped enclosed character. sql/sql_class.h: Fixed bug #29442. The NUMERIC_CHARS macro constant has been defined to enumerate all possible characters of a numeric value text representation. The select_export::is_unsafe_field_sep boolean flag has been added to apply the encoding algorithm to non-string values when it is necessary. sql/sql_class.cc: Fixed bug #29442. The select_export::send_data method has been modified to encode text representation of fields of all data types like string fields. mysql-test/t/loaddata.test: Updated test case for bug #29442. mysql-test/r/loaddata.result: Updated test case for bug #29442. --- mysql-test/r/loaddata.result | 14 ++++++++++++++ mysql-test/t/loaddata.test | 25 +++++++++++++++++++++++++ 2 files changed, 39 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 031aa5c700c..7fff2700779 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -238,3 +238,17 @@ f1 1 2 drop table t1,t2; +CREATE TABLE t1 (c1 INT, c2 TIMESTAMP, c3 REAL, c4 DOUBLE); +INSERT INTO t1 (c1, c2, c3, c4) VALUES (10, '1970-02-01 01:02:03', 1.1E-100, 1.1E+100); +SELECT * FROM t1; +c1 c2 c3 c4 +10 1970-02-01 01:02:03 1.1e-100 1.1e+100 +SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1; +-10- -1970\-02\-01 01:02:03- -1.1e\-100- -1.1e+100- +EOF +TRUNCATE t1; +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1' INTO TABLE t1 FIELDS ENCLOSED BY '-'; +SELECT * FROM t1; +c1 c2 c3 c4 +10 1970-02-01 01:02:03 1.1e-100 1.1e+100 +DROP TABLE t1; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index cdd3bb80b6e..260e760e7b3 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -213,4 +213,29 @@ select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; --exec rm $MYSQLTEST_VARDIR/tmp/t2 drop table t1,t2; +# +# Bug#29442: SELECT INTO OUTFILE FIELDS ENCLOSED BY digit, minus sign etc +# corrupts non-string fields containing this character. +# + +CREATE TABLE t1 (c1 INT, c2 TIMESTAMP, c3 REAL, c4 DOUBLE); + +INSERT INTO t1 (c1, c2, c3, c4) VALUES (10, '1970-02-01 01:02:03', 1.1E-100, 1.1E+100); +SELECT * FROM t1; + +--exec rm -f $MYSQLTEST_VARDIR/tmp/t1 +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1; +--exec cat $MYSQLTEST_VARDIR/tmp/t1 +--exec echo EOF + +TRUNCATE t1; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t1' INTO TABLE t1 FIELDS ENCLOSED BY '-'; +SELECT * FROM t1; + +--exec rm $MYSQLTEST_VARDIR/tmp/t1 +DROP TABLE t1; + # End of 5.0 tests -- cgit v1.2.1 From ae23a601aed07617dc1b12bc2d1e320498750ff6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Jul 2007 16:58:56 +0800 Subject: update some description in t/disable.def for testcase rpl_ndb_innodb2ndb and rpl_ndb_myisam2ndb mysql-test/t/disabled.def: correct related bug, bug#29549 discovers more accurate reason --- mysql-test/t/disabled.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 90fd997e615..feb08c6f743 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -27,8 +27,8 @@ rpl_ndb_2myisam : BUG#19227 Seems to pass currently rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD rpl_ndb_ddl : BUG#18946 result file needs update + test needs to checked rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master -rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement -rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement +rpl_ndb_innodb2ndb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue +rpl_ndb_myisam2ndb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly synchronization : Bug#24529 Test 'synchronization' fails on Mac pushbuild; Also on Linux 64 bit. -- cgit v1.2.1 From a077186b7076fa61ab9a10be06cfc9fa3dbe5f34 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Jul 2007 11:35:10 -0700 Subject: fix test for bug29299 --- mysql-test/r/fulltext2.result | 12 ------------ mysql-test/r/fulltext3.result | 13 +++++++++++++ mysql-test/t/fulltext2.test | 12 ------------ mysql-test/t/fulltext3.test | 24 ++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 24 deletions(-) create mode 100644 mysql-test/r/fulltext3.result create mode 100644 mysql-test/t/fulltext3.test (limited to 'mysql-test') diff --git a/mysql-test/r/fulltext2.result b/mysql-test/r/fulltext2.result index f6bb4e4965a..f6a4b20bc22 100644 --- a/mysql-test/r/fulltext2.result +++ b/mysql-test/r/fulltext2.result @@ -241,15 +241,3 @@ select * from t1 where match a against('ab c' in boolean mode); a drop table t1; set names latin1; -CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); -SET NAMES utf8; -INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); -SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE); -HEX(a) -BEF361616197C22061616161 -DELETE FROM t1 LIMIT 1; -CHECK TABLE t1; -Table Op Msg_type Msg_text -test.t1 check status OK -SET NAMES latin1; -DROP TABLE t1; diff --git a/mysql-test/r/fulltext3.result b/mysql-test/r/fulltext3.result new file mode 100644 index 00000000000..019d5f472ed --- /dev/null +++ b/mysql-test/r/fulltext3.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); +SET NAMES utf8; +INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); +SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE); +HEX(a) +BEF361616197C22061616161 +DELETE FROM t1 LIMIT 1; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SET NAMES latin1; +DROP TABLE t1; diff --git a/mysql-test/t/fulltext2.test b/mysql-test/t/fulltext2.test index 99209dc8543..fd97f795534 100644 --- a/mysql-test/t/fulltext2.test +++ b/mysql-test/t/fulltext2.test @@ -220,16 +220,4 @@ select * from t1 where match a against('ab c' in boolean mode); drop table t1; set names latin1; -# -# BUG#29299 - repeatable myisam fulltext index corruption -# -CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); -SET NAMES utf8; -INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); -SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE); -DELETE FROM t1 LIMIT 1; -CHECK TABLE t1; -SET NAMES latin1; -DROP TABLE t1; - # End of 4.1 tests diff --git a/mysql-test/t/fulltext3.test b/mysql-test/t/fulltext3.test new file mode 100644 index 00000000000..a57fd48daaa --- /dev/null +++ b/mysql-test/t/fulltext3.test @@ -0,0 +1,24 @@ +--source include/have_gbk.inc +# +# test of new fulltext search features +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + + +# +# BUG#29299 - repeatable myisam fulltext index corruption +# +CREATE TABLE t1(a VARCHAR(255) CHARACTER SET gbk, FULLTEXT(a)); +SET NAMES utf8; +INSERT INTO t1 VALUES(0xF043616161),(0xBEF361616197C22061616161); +SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST(0x97C22061616161 IN BOOLEAN MODE); +DELETE FROM t1 LIMIT 1; +CHECK TABLE t1; +SET NAMES latin1; +DROP TABLE t1; + +# End of 5.0 tests + -- cgit v1.2.1 From fe00f78d809e3249e170bfce25fb4bc5030fdf71 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Jul 2007 09:28:35 -0700 Subject: disable federated_innodb test until bug29522 is fixed --- mysql-test/t/disabled.def | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test') diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 827598d0585..cca73c38831 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -53,3 +53,4 @@ im_options_set : Bug#20294: Instance manager tests fail randomly im_options_unset : Bug#20294: Instance manager tests fail randomly mysql_upgrade : Bug#28560 test links to /usr/local/mysql/lib libraries, causes non-determinism and failures on ABI breakage ndb_dd_sql_features : Bug#29102 ndb_dd_sql_features fails in pushbuild +federated_innodb : Bug#29522 failed assertion in binlog_close_connection() -- cgit v1.2.1 From 3756819e4bd548f4fd6ac8773697768435dbd129 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Jul 2007 10:33:02 -0700 Subject: Fixed bug #29415. The cast operation ignored the cases when the precision and/or the scale exceeded the limits, 65 and 30 respectively. No errors were reported in these cases. For some queries this may lead to an assertion abort. Fixed by throwing errors for such cases. mysql-test/r/type_newdecimal.result: Added a test case for bug #29415. mysql-test/t/type_newdecimal.test: Added a test case for bug #29415. --- mysql-test/r/type_newdecimal.result | 20 ++++++++++++++++++++ mysql-test/t/type_newdecimal.test | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index 9e165721033..d858c3cbdd6 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1471,4 +1471,24 @@ drop table t1; SELECT 1.000000000000 * 99.999999999998 / 100 a,1.000000000000 * (99.999999999998 / 100) b; a b 0.9999999999999800000000000000 0.9999999999999800000000000000 +SELECT CAST(1 AS decimal(65,10)); +CAST(1 AS decimal(65,10)) +1.0000000000 +SELECT CAST(1 AS decimal(66,10)); +ERROR 42000: Too big precision 66 specified for column '1'. Maximum is 65. +SELECT CAST(1 AS decimal(65,30)); +CAST(1 AS decimal(65,30)) +1.000000000000000000000000000000 +SELECT CAST(1 AS decimal(65,31)); +ERROR 42000: Too big scale 31 specified for column '1'. Maximum is 30. +CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL); +INSERT INTO t1 VALUES (3,30), (1,10), (2,10); +SELECT a+CAST(1 AS decimal(65,30)) AS aa, SUM(b) FROM t1 GROUP BY aa; +aa SUM(b) +2.000000000000000000000000000000 10 +3.000000000000000000000000000000 10 +4.000000000000000000000000000000 30 +SELECT a+CAST(1 AS decimal(65,31)) AS aa, SUM(b) FROM t1 GROUP BY aa; +ERROR 42000: Too big scale 31 specified for column '1'. Maximum is 30. +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index d2b808bd5e0..73142eb41c0 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1162,4 +1162,27 @@ drop table t1; # SELECT 1.000000000000 * 99.999999999998 / 100 a,1.000000000000 * (99.999999999998 / 100) b; + +# +# Bug #29415: CAST AS DECIMAL(P,S) with too big precision/scale +# + +SELECT CAST(1 AS decimal(65,10)); +--error ER_TOO_BIG_PRECISION +SELECT CAST(1 AS decimal(66,10)); + +SELECT CAST(1 AS decimal(65,30)); +--error ER_TOO_BIG_SCALE +SELECT CAST(1 AS decimal(65,31)); + +CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL); +INSERT INTO t1 VALUES (3,30), (1,10), (2,10); +SELECT a+CAST(1 AS decimal(65,30)) AS aa, SUM(b) FROM t1 GROUP BY aa; +--error ER_TOO_BIG_SCALE +SELECT a+CAST(1 AS decimal(65,31)) AS aa, SUM(b) FROM t1 GROUP BY aa; + +DROP TABLE t1; + --echo End of 5.0 tests + + -- cgit v1.2.1 From 0671e30ae6e4966d680c28b3d6dcc394f399831e Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Jul 2007 12:31:55 -0700 Subject: Fixed bug #29417. An assertion abort could occur for some grouping queries that employed decimal user variables with assignments to them. The problem appeared the constructors of the class Field_new_decimal because the function my_decimal_length_to_precision did not guarantee returning decimal precision not greater than DECIMAL_MAX_PRECISION. mysql-test/r/type_newdecimal.result: Added a test case for bug #29417. mysql-test/t/type_newdecimal.test: Added a test case for bug #29417. sql/field.cc: Fixed bug #29417. An assertion abort could occur for some grouping queries that employed decimal user variables with assignments to them. The problem appeared the constructors of the class Field_new_decimal because the function my_decimal_length_to_precision did not guarantee returning decimal precision not greater than DECIMAL_MAX_PRECISION. Now if the precision returned by calls to my_decimal_length_to_precision in the constructors of the class Field_new_decimal is greater than DECIMAL_MAX_PRECISION the precision is set to this value. --- mysql-test/r/type_newdecimal.result | 8 ++++++++ mysql-test/t/type_newdecimal.test | 13 +++++++++++++ 2 files changed, 21 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index 9e165721033..c580568f3d4 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1471,4 +1471,12 @@ drop table t1; SELECT 1.000000000000 * 99.999999999998 / 100 a,1.000000000000 * (99.999999999998 / 100) b; a b 0.9999999999999800000000000000 0.9999999999999800000000000000 +CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL); +INSERT INTO t1 VALUES (3,30), (1,10), (2,10); +SET @a= CAST(1 AS decimal); +SELECT 1 FROM t1 GROUP BY @b := @a, @b; +1 +1 +1 +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index d2b808bd5e0..da321cc9932 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1162,4 +1162,17 @@ drop table t1; # SELECT 1.000000000000 * 99.999999999998 / 100 a,1.000000000000 * (99.999999999998 / 100) b; + +# +# Bug #29417: assertion abort for a grouping query with decimal user variable +# + +CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL); +INSERT INTO t1 VALUES (3,30), (1,10), (2,10); + +SET @a= CAST(1 AS decimal); +SELECT 1 FROM t1 GROUP BY @b := @a, @b; + +DROP TABLE t1; + --echo End of 5.0 tests -- cgit v1.2.1 From f81865470582520615afe3cc5d95cff66fd51ad8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Jul 2007 20:03:00 -0700 Subject: Post-merge fix. --- mysql-test/r/type_newdecimal.result | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index fc6955f11d2..24be10a7a29 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1481,6 +1481,34 @@ drop table t1; SELECT 1.000000000000 * 99.999999999998 / 100 a,1.000000000000 * (99.999999999998 / 100) b; a b 0.9999999999999800000000000000 0.9999999999999800000000000000 +SELECT CAST(1 AS decimal(65,10)); +CAST(1 AS decimal(65,10)) +1.0000000000 +SELECT CAST(1 AS decimal(66,10)); +ERROR 42000: Too big precision 66 specified for column '1'. Maximum is 65. +SELECT CAST(1 AS decimal(65,30)); +CAST(1 AS decimal(65,30)) +1.000000000000000000000000000000 +SELECT CAST(1 AS decimal(65,31)); +ERROR 42000: Too big scale 31 specified for column '1'. Maximum is 30. +CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL); +INSERT INTO t1 VALUES (3,30), (1,10), (2,10); +SELECT a+CAST(1 AS decimal(65,30)) AS aa, SUM(b) FROM t1 GROUP BY aa; +aa SUM(b) +2.000000000000000000000000000000 10 +3.000000000000000000000000000000 10 +4.000000000000000000000000000000 30 +SELECT a+CAST(1 AS decimal(65,31)) AS aa, SUM(b) FROM t1 GROUP BY aa; +ERROR 42000: Too big scale 31 specified for column '1'. Maximum is 30. +DROP TABLE t1; +CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL); +INSERT INTO t1 VALUES (3,30), (1,10), (2,10); +SET @a= CAST(1 AS decimal); +SELECT 1 FROM t1 GROUP BY @b := @a, @b; +1 +1 +1 +DROP TABLE t1; End of 5.0 tests select cast(143.481 as decimal(4,1)); cast(143.481 as decimal(4,1)) -- cgit v1.2.1 From a68a457be8f7ec13fa601e1e66be2b47f6e2aafa Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 8 Jul 2007 18:13:04 +0400 Subject: Bug#29310: An InnoDB table was updated when the data wasn't actually changed. When a table is being updated it has two set of fields - fields required for checks of conditions and fields to be updated. A storage engine is allowed not to retrieve columns marked for update. Due to this fact records can't be compared to see whether the data has been changed or not. This makes the server always update records independently of data change. Now when an auto-updatable timestamp field is present and server sees that a table handle isn't going to retrieve write-only fields then all of such fields are marked as to be read to force the handler to retrieve them. mysql-test/r/innodb_mysql.result: Added a test case for the bug#29310: An InnoDB table was updated when the data wasn't actually changed. mysql-test/include/mix1.inc: Added a test case for the bug#29310: An InnoDB table was updated when the data wasn't actually changed. sql/sql_update.cc: Bug#29310: An InnoDB table was updated when the data wasn't actually changed. Now the mysql_update function when an auto-updatable timestamp field is present marks write-only fields as to be read to force the table handler to retrieve them. sql/sql_insert.cc: Bug#29310: An InnoDB table was updated when the data wasn't actually changed. Now the write_record function can compare records when fileds to be written is a subset of the fields to be read while updating a record. --- mysql-test/include/mix1.inc | 24 ++++++++++++++++++++++++ mysql-test/r/innodb_mysql.result | 28 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index d8034e19898..03df7c33a00 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -948,5 +948,29 @@ unlock tables; select * from t1; drop tables t1; +# +# Bug#29310: An InnoDB table was updated when the data wasn't actually changed. +# +create table t1(f1 varchar(5) unique, f2 timestamp NOT NULL DEFAULT + CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); +insert into t1(f1) values(1); +--replace_column 1 # +select @a:=f2 from t1; +--sleep 5 +update t1 set f1=1; +--replace_column 1 # +select @b:=f2 from t1; +select if(@a=@b,"ok","wrong"); +--sleep 5 +insert into t1(f1) values (1) on duplicate key update f1="1"; +--replace_column 1 # +select @b:=f2 from t1; +select if(@a=@b,"ok","wrong"); +--sleep 5 +insert into t1(f1) select f1 from t1 on duplicate key update f1="1"; +--replace_column 1 # +select @b:=f2 from t1; +select if(@a=@b,"ok","wrong"); +drop table t1; --echo End of 5.1 tests diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index db912c650c3..93b78143de7 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -951,4 +951,32 @@ NULL 1 Two drop tables t1; +create table t1(f1 varchar(5) unique, f2 timestamp NOT NULL DEFAULT +CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); +insert into t1(f1) values(1); +select @a:=f2 from t1; +@a:=f2 +# +update t1 set f1=1; +select @b:=f2 from t1; +@b:=f2 +# +select if(@a=@b,"ok","wrong"); +if(@a=@b,"ok","wrong") +ok +insert into t1(f1) values (1) on duplicate key update f1="1"; +select @b:=f2 from t1; +@b:=f2 +# +select if(@a=@b,"ok","wrong"); +if(@a=@b,"ok","wrong") +ok +insert into t1(f1) select f1 from t1 on duplicate key update f1="1"; +select @b:=f2 from t1; +@b:=f2 +# +select if(@a=@b,"ok","wrong"); +if(@a=@b,"ok","wrong") +ok +drop table t1; End of 5.1 tests -- cgit v1.2.1 From bfa027e72e99c2cd27df3cf3869289ddc9bff5a3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Jul 2007 01:23:33 +0400 Subject: Bug#29461: Sort order of the collation wasn't used when comparing characters with the space character. When the my_strnncollsp_simple function compares two strings and one is a prefix of another then this function compares characters in the rest of longer key with the space character to find whether the longer key is greater or less. But the sort order of the collation isn't used in this comparison. This may lead to a wrong comparison result, wrongly created index or wrong order of the result set of a query with the ORDER BY clause. Now the my_strnncollsp_simple function uses collation sort order to compare the characters in the rest of longer key with the space character. mysql-test/t/ctype_collate.test: Added a test case for the bug#29461: Sort order of the collation wasn't used when comparing characters with the space character. mysql-test/r/ctype_collate.result: Added a test case for the bug#29461: Sort order of the collation wasn't used when comparing characters with the space character. strings/ctype-simple.c: Bug#29461: Sort order of the collation wasn't used when comparing characters with the space character.Now the my_strnncollsp_simple function uses collation sort order to compare the characters in the rest of longer key with the space character. --- mysql-test/r/ctype_collate.result | 8 ++++++++ mysql-test/t/ctype_collate.test | 11 +++++++++++ 2 files changed, 19 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result index 52ee76d1948..5c9bb93103e 100644 --- a/mysql-test/r/ctype_collate.result +++ b/mysql-test/r/ctype_collate.result @@ -603,3 +603,11 @@ check table t1 extended; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +create table t1 (a varchar(2) character set latin7 collate latin7_general_ci,key(a)); +insert into t1 set a=0x4c20; +insert into t1 set a=0x6c; +insert into t1 set a=0x4c98; +check table t1 extended; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; diff --git a/mysql-test/t/ctype_collate.test b/mysql-test/t/ctype_collate.test index 4bbae42559a..cfef8dfe81a 100644 --- a/mysql-test/t/ctype_collate.test +++ b/mysql-test/t/ctype_collate.test @@ -218,3 +218,14 @@ insert into t1 set f1=0x3F3F1E563F; insert into t1 set f1=0x3F3F; check table t1 extended; drop table t1; + +# +# Bug#29461: Sort order of the collation wasn't used when comparing characters +# with the space character. +# +create table t1 (a varchar(2) character set latin7 collate latin7_general_ci,key(a)); +insert into t1 set a=0x4c20; +insert into t1 set a=0x6c; +insert into t1 set a=0x4c98; +check table t1 extended; +drop table t1; -- cgit v1.2.1 From 49bc3c26689b40516b7bbdb93b5cf6b58367c3e5 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Jul 2007 10:39:49 +0500 Subject: after-merge fix. --- mysql-test/r/show_check.result | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 9ef10865cd7..3f8e48a0069 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1148,7 +1148,37 @@ DROP TABLE t1; DROP VIEW v1; DROP PROCEDURE p1; DROP FUNCTION f1; -End of 5.0 tests. +flush status; +show variables like "log_queries_not_using_indexes"; +Variable_name Value +log_queries_not_using_indexes ON +select 1 from information_schema.tables limit 1; +1 +1 +show status like 'slow_queries'; +Variable_name Value +Slow_queries 2 +set global log_queries_not_using_indexes=OFF; +show variables like "log_queries_not_using_indexes"; +Variable_name Value +log_queries_not_using_indexes OFF +select 1 from information_schema.tables limit 1; +1 +1 +show status like 'slow_queries'; +Variable_name Value +Slow_queries 2 +set global log_queries_not_using_indexes=ON; +show variables like "log_queries_not_using_indexes"; +Variable_name Value +log_queries_not_using_indexes ON +select 1 from information_schema.tables limit 1; +1 +1 +show status like 'slow_queries'; +Variable_name Value +Slow_queries 4 +End of 5.0 tests SHOW AUTHORS; create database mysqltest; show create database mysqltest; -- cgit v1.2.1 From 82ac789172d627739541284cd1f314d4fa514a3e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Jul 2007 08:11:38 +0200 Subject: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB dollin' it up for Guilhem ;) -- test streamlined, better comments, faster code, add'l assert. mysql-test/r/binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB streamlined test mysql-test/t/binlog.test: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB streamlined test sql/log.cc: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB comment clarified --- mysql-test/r/binlog.result | 97 ---------------------------------------------- mysql-test/t/binlog.test | 61 ----------------------------- 2 files changed, 158 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/binlog.result b/mysql-test/r/binlog.result index aa5c6e88d65..0a199c87545 100644 --- a/mysql-test/r/binlog.result +++ b/mysql-test/r/binlog.result @@ -153,105 +153,8 @@ master-bin.000001 353 Query 1 441 use `test`; insert into t1 values (2) master-bin.000001 441 Query 1 529 use `test`; insert into t1 values (3) master-bin.000001 529 Xid 1 556 COMMIT /* XID */ master-bin.000001 556 Query 1 632 use `test`; drop table t1 -set autocommit= 1; -reset master; -create table t1(n int) engine=innodb; -insert into t1 values (1); -insert into t1 values (2); -insert into t1 values (3); -commit; -drop table t1; -show binlog events from 0; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 -master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=innodb -master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (1) -master-bin.000001 285 Xid 1 312 COMMIT /* XID */ -master-bin.000001 312 Query 1 400 use `test`; insert into t1 values (2) -master-bin.000001 400 Xid 1 427 COMMIT /* XID */ -master-bin.000001 427 Query 1 515 use `test`; insert into t1 values (3) -master-bin.000001 515 Xid 1 542 COMMIT /* XID */ -master-bin.000001 542 Query 1 618 use `test`; drop table t1 -reset master; -create table t1(n int) engine=myisam; -begin; -insert into t1 values (4); -insert into t1 values (5); -insert into t1 values (6); -commit; -drop table t1; -show binlog events from 0; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 -master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=myisam -master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (4) -master-bin.000001 285 Query 1 373 use `test`; insert into t1 values (5) -master-bin.000001 373 Query 1 461 use `test`; insert into t1 values (6) -master-bin.000001 461 Query 1 537 use `test`; drop table t1 -set autocommit= 1; -reset master; -create table t1(n int) engine=innodb; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 197 -insert into t1 values (1); -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 312 -insert into t1 values (2); -insert into t1 values (3); -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 542 -commit; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 542 -drop table t1; -show binlog events from 0; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 -master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=innodb -master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (1) -master-bin.000001 285 Xid 1 312 COMMIT /* XID */ -master-bin.000001 312 Query 1 400 use `test`; insert into t1 values (2) -master-bin.000001 400 Xid 1 427 COMMIT /* XID */ -master-bin.000001 427 Query 1 515 use `test`; insert into t1 values (3) -master-bin.000001 515 Xid 1 542 COMMIT /* XID */ -master-bin.000001 542 Query 1 618 use `test`; drop table t1 -set autocommit= 0; -reset master; -create table t1(n int) engine=myisam; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 197 -insert into t1 values (4); -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 285 -insert into t1 values (5); -insert into t1 values (6); -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 461 -commit; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 461 -drop table t1; -show binlog events from 0; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 -master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=myisam -master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (4) -master-bin.000001 285 Query 1 373 use `test`; insert into t1 values (5) -master-bin.000001 373 Query 1 461 use `test`; insert into t1 values (6) -master-bin.000001 461 Query 1 537 use `test`; drop table t1 -set session autocommit = @ac; set @bcs = @@binlog_cache_size; -set @ac = @@autocommit; set global binlog_cache_size=4096; -set autocommit= 0; reset master; create table t1 (a int) engine=innodb; show binlog events from 0; diff --git a/mysql-test/t/binlog.test b/mysql-test/t/binlog.test index b9996a2b380..5d1399925c3 100644 --- a/mysql-test/t/binlog.test +++ b/mysql-test/t/binlog.test @@ -78,72 +78,11 @@ drop table t1; --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ show binlog events from 0; -set autocommit= 1; -reset master; -create table t1(n int) engine=innodb; -insert into t1 values (1); -insert into t1 values (2); -insert into t1 values (3); -commit; -drop table t1; ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ -show binlog events from 0; - -reset master; -create table t1(n int) engine=myisam; -begin; -insert into t1 values (4); -insert into t1 values (5); -insert into t1 values (6); -commit; -drop table t1; ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ -show binlog events from 0; - -# now show this also works for SHOW MASTER STATUS -# as this is what "mysqldump --master-data=1" uses. - -set autocommit= 1; -reset master; -create table t1(n int) engine=innodb; -show master status; -insert into t1 values (1); -show master status; -insert into t1 values (2); -insert into t1 values (3); -show master status; -commit; -show master status; -drop table t1; ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ -show binlog events from 0; - -set autocommit= 0; -reset master; -create table t1(n int) engine=myisam; -show master status; -insert into t1 values (4); -show master status; -insert into t1 values (5); -insert into t1 values (6); - -show master status; -commit; -show master status; -drop table t1; ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/ -show binlog events from 0; - -set session autocommit = @ac; - # now show that nothing breaks if we need to read from the cache more # than once, resulting in split event-headers set @bcs = @@binlog_cache_size; -set @ac = @@autocommit; - set global binlog_cache_size=4096; -set autocommit= 0; reset master; create table t1 (a int) engine=innodb; -- cgit v1.2.1 From ba6c552b9b1dbab71c49e5c17b25bb09fb4c048f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Jul 2007 09:35:27 +0200 Subject: Bug #29570 - correct result files --- mysql-test/r/rpl_row_tabledefs_2myisam.result | 2 +- mysql-test/r/rpl_row_tabledefs_3innodb.result | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_row_tabledefs_2myisam.result b/mysql-test/r/rpl_row_tabledefs_2myisam.result index 4eca19ff098..e41f8be055b 100644 --- a/mysql-test/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/r/rpl_row_tabledefs_2myisam.result @@ -123,7 +123,7 @@ Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1105 -Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef +Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef. Unknown error Skip_Counter 0 Exec_Master_Log_Pos # Relay_Log_Space # diff --git a/mysql-test/r/rpl_row_tabledefs_3innodb.result b/mysql-test/r/rpl_row_tabledefs_3innodb.result index 687108e17e5..72c088d5a6b 100644 --- a/mysql-test/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/r/rpl_row_tabledefs_3innodb.result @@ -123,7 +123,7 @@ Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1105 -Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef +Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef. Unknown error Skip_Counter 0 Exec_Master_Log_Pos # Relay_Log_Space # -- cgit v1.2.1 From 407209c163564d5321e9cfab60d622c665ea51d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Jul 2007 03:31:27 -0600 Subject: disabled.def: post-merge fix: re-enable rpl_udf test mysql-test/suite/rpl/t/disabled.def: post-merge fix: re-enable rpl_udf test --- mysql-test/suite/rpl/t/disabled.def | 1 - 1 file changed, 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 1c72d184739..fda40c30340 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -14,4 +14,3 @@ rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after C rpl_innodb_mixed_ddl : Bug #29363 rpl.rpl_innodb_mixed_* test failures rpl_innodb_mixed_dml : Bug #29363 rpl.rpl_innodb_mixed_* test failures rpl_invoked_features : BUG#29020 2007-06-21 Lars Non-deterministic test case -rpl_udf : Bug#28993 rpl_udf test causes server crash and valgrind warning in pushbuild -- cgit v1.2.1 From 2ad26498cfc368cfed46323e05883ee736778ca6 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Jul 2007 17:41:24 +0300 Subject: Bug #29070: Error in spatial index 1. Threat MBR for a key as double[] and convert it only when about to store it on disk. 2. Remove the redundant function get_double(). myisam/sp_key.c: Bug #29070: 1. threat MBR for a key as double[] and convert it only when about to store it on disk. 2. remove the redundant function get_double() mysql-test/r/gis-rtree.result: Bug #29070: test case mysql-test/t/gis-rtree.test: Bug #29070: test case --- mysql-test/r/gis-rtree.result | 13 +++++++++++++ mysql-test/t/gis-rtree.test | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index e4b52fc0392..8476ea9e838 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -1444,3 +1444,16 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK DROP TABLE t1; +CREATE TABLE t1 (a INT, b GEOMETRY NOT NULL, SPATIAL KEY b(b)); +INSERT INTO t1 VALUES (1, GEOMFROMTEXT('LINESTRING(1102218.456 1,2000000 2)')); +INSERT INTO t1 VALUES (2, GEOMFROMTEXT('LINESTRING(1102218.456 1,2000000 2)')); +SELECT COUNT(*) FROM t1 WHERE +MBRINTERSECTS(b, GEOMFROMTEXT('LINESTRING(1 1,1102219 2)') ); +COUNT(*) +2 +SELECT COUNT(*) FROM t1 IGNORE INDEX (b) WHERE +MBRINTERSECTS(b, GEOMFROMTEXT('LINESTRING(1 1,1102219 2)') ); +COUNT(*) +2 +DROP TABLE t1; +End of 5.0 tests. diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test index 3368aea9741..74b12caca41 100644 --- a/mysql-test/t/gis-rtree.test +++ b/mysql-test/t/gis-rtree.test @@ -827,3 +827,22 @@ INSERT INTO t1 (b) SELECT b FROM t1; OPTIMIZE TABLE t1; DROP TABLE t1; + + +# +# Bug #29070: Error in spatial index +# + +CREATE TABLE t1 (a INT, b GEOMETRY NOT NULL, SPATIAL KEY b(b)); +INSERT INTO t1 VALUES (1, GEOMFROMTEXT('LINESTRING(1102218.456 1,2000000 2)')); +INSERT INTO t1 VALUES (2, GEOMFROMTEXT('LINESTRING(1102218.456 1,2000000 2)')); + +# must return the same number as the next select +SELECT COUNT(*) FROM t1 WHERE + MBRINTERSECTS(b, GEOMFROMTEXT('LINESTRING(1 1,1102219 2)') ); +SELECT COUNT(*) FROM t1 IGNORE INDEX (b) WHERE + MBRINTERSECTS(b, GEOMFROMTEXT('LINESTRING(1 1,1102219 2)') ); + +DROP TABLE t1; + +--echo End of 5.0 tests. -- cgit v1.2.1 From 0fdcf49189b0acef2e03682310141aa9609c95ec Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Jul 2007 13:18:27 -0600 Subject: rpl_misc_functions.result, rpl_misc_functions.test: Backport from 5.1 a fix to make this test deterministic mysql-test/r/rpl_misc_functions.result: Backport from 5.1 a fix to make this test deterministic mysql-test/t/rpl_misc_functions.test: Backport from 5.1 a fix to make this test deterministic --- mysql-test/r/rpl_misc_functions.result | 19 ++++++++++--------- mysql-test/t/rpl_misc_functions.test | 23 ++++++++++++----------- 2 files changed, 22 insertions(+), 20 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_misc_functions.result b/mysql-test/r/rpl_misc_functions.result index ca7403316b1..a8e5520ca8f 100644 --- a/mysql-test/r/rpl_misc_functions.result +++ b/mysql-test/r/rpl_misc_functions.result @@ -20,11 +20,12 @@ select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t id i r1 r2 p id i r1 r2 p drop table t1; DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (col_a double default NULL); +CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +col_a DOUBLE DEFAULT NULL); CREATE PROCEDURE test_replication_sp1() BEGIN -INSERT INTO t1 VALUES (rand()), (rand()); -INSERT INTO t1 VALUES (rand()); +INSERT INTO t1 (col_a) VALUES (rand()), (rand()); +INSERT INTO t1 (col_a) VALUES (rand()); END| CREATE PROCEDURE test_replication_sp2() BEGIN @@ -37,18 +38,18 @@ RETURN (rand() + rand()); END| CALL test_replication_sp1(); CALL test_replication_sp2(); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); select * from t1 into outfile "../tmp/t1_slave.txt"; create temporary table t1_slave select * from t1 where 1=0; load data infile '../tmp/t1_slave.txt' into table t1_slave; -select count(*) into @aux from t1, t1_slave -where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ; +select count(*) into @aux from t1 join t1_slave using (id) +where ABS(t1.col_a - t1_slave.col_a) < 0.0000001 ; SELECT @aux; @aux 12 +DROP TABLE t1, t1_slave; DROP PROCEDURE test_replication_sp1; DROP PROCEDURE test_replication_sp2; DROP FUNCTION test_replication_sf; -DROP TABLE t1, t1_slave; diff --git a/mysql-test/t/rpl_misc_functions.test b/mysql-test/t/rpl_misc_functions.test index b87fff919b2..1c94471c975 100644 --- a/mysql-test/t/rpl_misc_functions.test +++ b/mysql-test/t/rpl_misc_functions.test @@ -43,15 +43,16 @@ drop table t1; DROP TABLE IF EXISTS t1; --enable_warnings -CREATE TABLE t1 (col_a double default NULL); +CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + col_a DOUBLE DEFAULT NULL); DELIMITER |; # Use a SP that calls rand() multiple times CREATE PROCEDURE test_replication_sp1() BEGIN - INSERT INTO t1 VALUES (rand()), (rand()); - INSERT INTO t1 VALUES (rand()); + INSERT INTO t1 (col_a) VALUES (rand()), (rand()); + INSERT INTO t1 (col_a) VALUES (rand()); END| # Use a SP that calls another SP to call rand() multiple times @@ -73,9 +74,9 @@ DELIMITER ;| # the master to those on the slave. CALL test_replication_sp1(); CALL test_replication_sp2(); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); -INSERT INTO t1 VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); +INSERT INTO t1 (col_a) VALUES (test_replication_sf()); --sync_slave_with_master @@ -90,24 +91,24 @@ load data infile '../tmp/t1_slave.txt' into table t1_slave; # Compare master and slave temp table, use subtraction # for floating point comparison of "double" -select count(*) into @aux from t1, t1_slave -where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ; +select count(*) into @aux from t1 join t1_slave using (id) +where ABS(t1.col_a - t1_slave.col_a) < 0.0000001 ; SELECT @aux; if (`SELECT @aux <> 12 OR @aux IS NULL`) { --echo # ERROR: We expected to get count(*) = 12. - SELECT col_a FROM t1; - SELECT col_a FROM t1_slave; + SELECT id, col_a FROM t1; + SELECT id, col_a FROM t1_slave; --echo # abort exit; } # Cleanup connection master; +DROP TABLE t1, t1_slave; DROP PROCEDURE test_replication_sp1; DROP PROCEDURE test_replication_sp2; DROP FUNCTION test_replication_sf; -DROP TABLE t1, t1_slave; --sync_slave_with_master -- cgit v1.2.1 From 20beacc9e188656a436facd5bd3661c9be58142f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Jul 2007 09:00:15 +0200 Subject: Bug #29570 - correct result files --- mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result | 4 ++-- mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result index 4b0c59f97e7..1ccceb65317 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result @@ -123,7 +123,7 @@ Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1364 -Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef. Unknown error +Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef. Skip_Counter 0 Exec_Master_Log_Pos # Relay_Log_Space # @@ -141,7 +141,7 @@ Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error Last_SQL_Errno 1364 -Last_SQL_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef +Last_SQL_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef. SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (2); diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result index e94af83df3f..bec95c4370f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result @@ -123,7 +123,7 @@ Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1364 -Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef. Unknown error +Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef. Skip_Counter 0 Exec_Master_Log_Pos # Relay_Log_Space # @@ -141,7 +141,7 @@ Master_SSL_Verify_Server_Cert No Last_IO_Errno 0 Last_IO_Error Last_SQL_Errno 1364 -Last_SQL_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef +Last_SQL_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef. SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (2); -- cgit v1.2.1 From 29ca25a675aafb46ad0decd19e7ab82ead72402b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Jul 2007 13:09:07 +0500 Subject: Fix for bug #29652: csv.test failure: two changes conflict after merge Problem: we don't take into account the length of the data written to the temporary data file during update on a CSV table. Fix: properly calculate the data file length during update. mysql-test/r/csv.result: Fix for bug #29652: csv.test failure: two changes conflict after merge - test result adjusted. storage/csv/ha_tina.cc: Fix for bug #29652: csv.test failure: two changes conflict after merge - adjust local_saved_data_file_length in case of update as well. storage/csv/ha_tina.h: Fix for bug #29652: csv.test failure: two changes conflict after merge - adjust local_saved_data_file_length in case of update as well. --- mysql-test/r/csv.result | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result index 65677e75ceb..86ba5002af8 100644 --- a/mysql-test/r/csv.result +++ b/mysql-test/r/csv.result @@ -4945,6 +4945,8 @@ SELECT * FROM bug13894; val 6 6 +5 +11 DROP TABLE bug13894; DROP TABLE IF EXISTS bug14672; CREATE TABLE bug14672 (c1 integer) engine = CSV; -- cgit v1.2.1 From 3e99fbbb7f736c17e5d15a210f6726befba41330 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Jul 2007 15:37:39 +0500 Subject: BUG#29445 - match ... against () never returns Part 1: Do not perform index search for a plus-word with truncation operator in case there are other plus-words in expression. Specifically this optimization was enforced for expression like "+word1 +word2*", but wasn't enforced for expression like "+word1 word2*". mysql-test/r/fulltext.result: A test case for BUG#29445. mysql-test/t/fulltext.test: A test case for BUG#29445. storage/myisam/ft_boolean_search.c: Do not perform index search for a plus-word with truncation operator in case there are other plus-words in expression. Specifically this optimization was enforced for expression like "+word1 +word2*", but wasn't enforced for expression like "+word1 word2*". --- mysql-test/r/fulltext.result | 6 ++++++ mysql-test/t/fulltext.test | 8 ++++++++ 2 files changed, 14 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index ef8cf304743..6f6760e31bc 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -480,3 +480,9 @@ CREATE TABLE t1(a VARCHAR(2) CHARACTER SET big5 COLLATE big5_chinese_ci, FULLTEXT(a)); INSERT INTO t1 VALUES(0xA3C2); DROP TABLE t1; +CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a)); +INSERT INTO t1 VALUES('Offside'),('City Of God'); +SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE); +a +City Of God +DROP TABLE t1; diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 749e54d218a..4e0c65267c4 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -408,4 +408,12 @@ FULLTEXT(a)); INSERT INTO t1 VALUES(0xA3C2); DROP TABLE t1; +# +# BUG#29445 - match ... against () never returns +# +CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a)); +INSERT INTO t1 VALUES('Offside'),('City Of God'); +SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE); +DROP TABLE t1; + # End of 4.1 tests -- cgit v1.2.1 From 32b5fb73233422429cd1ed9629c56367e4e922fa Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Jul 2007 05:37:43 -0600 Subject: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. After applying the snapshots, ensure that code conforms to the final version of WL 3914. It is signficant that, after these changes, InnoDB does not define MYSQL_SERVER, and can be built as an independent storage engine plugin. Fixes: Bug#9709: InnoDB inconsistensy causes "Operating System Error 32/33" Bug#18828: If InnoDB runs out of undo slots, it returns misleading 'table is full' Bug#20090: InnoDB: Error: trying to declare trx to enter InnoDB Bug#20352: Make ibuf_contract_for_n_pages tunable Bug#21101: Wrong error on exceeding max row size for InnoDB table Bug#21293: Deadlock detection prefers to kill long running FOR UPDATE queries Bug#22819: SHOW INNODB STATUS crashes the server with an assertion failure under high load Bug#25078: Make the replication thread to ignore innodb_thread_concurrency Bug#25645: Assertion failure in file srv0srv.c Bug#28138: indexing column prefixes produces corruption in InnoDB BitKeeper/deleted/.del-Makefile.am~55504c43d99979e4: Delete: storage/innobase/buf/Makefile.am BitKeeper/deleted/.del-Makefile.am~79bb55303929b560: Delete: storage/innobase/dict/Makefile.am BitKeeper/deleted/.del-Makefile.am~7cd88e5f9a8d7ce8: Delete: storage/innobase/data/Makefile.am BitKeeper/deleted/.del-Makefile.am~e19a1fb29b1fe527: Delete: storage/innobase/btr/Makefile.am BitKeeper/deleted/.del-Makefile.am~4ae65b009d41d1d: Delete: storage/innobase/eval/Makefile.am BitKeeper/deleted/.del-Makefile.am~679131a02af3f6fb: Delete: storage/innobase/fsp/Makefile.am BitKeeper/deleted/.del-Makefile.am~6acac9ae30eabdb3: Delete: storage/innobase/dyn/Makefile.am BitKeeper/deleted/.del-Makefile.am~a5e6b4385717fcb7: Delete: storage/innobase/fil/Makefile.am BitKeeper/deleted/.del-Makefile.am~11d601934b49c19: Delete: storage/innobase/fut/Makefile.am BitKeeper/deleted/.del-Makefile.am~5aab37bf3b6c430: Delete: storage/innobase/ibuf/Makefile.am BitKeeper/deleted/.del-Makefile.am~af2d719bb6e66986: Delete: storage/innobase/handler/Makefile.am BitKeeper/deleted/.del-Makefile.am~f0dbbc7a78648e18: Delete: storage/innobase/ha/Makefile.am BitKeeper/deleted/.del-Makefile.am~41684e54a5b0d26a: Delete: storage/innobase/log/Makefile.am BitKeeper/deleted/.del-Makefile.am~edd95d7290ddeff3: Delete: storage/innobase/lock/Makefile.am BitKeeper/deleted/.del-Makefile.i: Delete: storage/innobase/include/Makefile.i BitKeeper/deleted/.del-Makefile.am~2a6ccdba41b591a3: Delete: storage/innobase/mach/Makefile.am BitKeeper/deleted/.del-Makefile.am~2bd35bda856342: Delete: storage/innobase/os/Makefile.am BitKeeper/deleted/.del-Makefile.am~8448688c5ab92132: Delete: storage/innobase/mem/Makefile.am BitKeeper/deleted/.del-Makefile.am~b5a7a8cfa711b6de: Delete: storage/innobase/mtr/Makefile.am BitKeeper/deleted/.del-Makefile.am~2cee8a309eb8eee2: Delete: storage/innobase/page/Makefile.am BitKeeper/deleted/.del-Makefile.am~3d0553f8aa9c456b: Delete: storage/innobase/read/Makefile.am BitKeeper/deleted/.del-Makefile.am~7b0c4abae6684f8c: Delete: storage/innobase/pars/Makefile.am BitKeeper/deleted/.del-Makefile.am~d0e0dd55cbd413f0: Delete: storage/innobase/que/Makefile.am BitKeeper/deleted/.del-Makefile.am~20a219ccf7825d65: Delete: storage/innobase/row/Makefile.am BitKeeper/deleted/.del-Makefile.am~37bdfb2973b2442b: Delete: storage/innobase/rem/Makefile.am BitKeeper/deleted/.del-Makefile.am~557098c4e5c01ee2: Delete: storage/innobase/thr/Makefile.am BitKeeper/deleted/.del-Makefile.am~fdfe12f48c2499af: Delete: storage/innobase/sync/Makefile.am BitKeeper/deleted/.del-Makefile.am~feb2280a52035d8d: Delete: storage/innobase/srv/Makefile.am BitKeeper/deleted/.del-Makefile.am~456d34c4816dbda4: Delete: storage/innobase/ut/Makefile.am BitKeeper/deleted/.del-Makefile.am~5ec2ef0d2c35e138: Delete: storage/innobase/usr/Makefile.am BitKeeper/deleted/.del-Makefile.am~d25c456e48393313: Delete: storage/innobase/trx/Makefile.am mysql-test/r/innodb.result: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1421: Fix the innodb test by shifting some of the contents of the .result file. Approved by: Marko Revision r1422: Fix for Bug#21101 - returns wrong error message when table column defs exceed the max row size. The fix returns a more appropriate error message. Add a test case to innodb.test and expected output to innodb.result. mysql-test/t/innodb.test: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1422: Fix for Bug#21101 - returns wrong error message when table column defs exceed the max row size. The fix returns a more appropriate error message. Add a test case to innodb.test and expected output to innodb.result. storage/innobase/btr/btr0btr.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1546: When buffering an insert to a prefix index of a variable-length column, do not incorrectly mark the column as fixed-length. (Bug#28138) ibuf_entry_build(): Instead of prefix_len, pass fixed_len to dtype_new_store_for_order_and_null_size(). Add debug assertions. btr_index_rec_validate(): Correct a comment about prefix indexes. rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add debug assertions and comments. dict_col_type_assert_equal(): New debug function. storage/innobase/data/data0data.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1490: Add #include . Apparently, this header is no longer included by the common headers. This may be related to WL#2936 (pluggable storage engines). storage/innobase/data/data0type.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1513: Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...]. This makes it possible to see which expression was false by looking at the error message. Approved by: Marko storage/innobase/dict/dict0crea.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1423: Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out of UNDO slots in the rollback segment. This is a partial fix since the MySQL error code requested to properly report the error condition back to the client has not yet materialized. Currently we have #ifdef'd the error code translation in ha_innodb.cc. This will have to be changed as and when MySQl add the new requested code or an equivalent code that we can then use. Given the above, currently we will get the old behaviour, not the "fixed" and intended behaviour. storage/innobase/dict/dict0dict.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1490: Add #include . Apparently, this header is no longer included by the common headers. This may be related to WL#2936 (pluggable storage engines). Revision r1513: Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...]. This makes it possible to see which expression was false by looking at the error message. Approved by: Marko Revision r1528: Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible. Revision r1529: Revert r799, which was supposed to prevent similar cases as Bug#21638. In reality, the patch breaks the handling of prefix indexes of variable-length columns in ROW_FORMAT=COMPACT. Reverting the patch is only a partial fix of Bug#28138. Revision r1535: Document that DICT_MAX_INDEX_COL_LEN must not be changed. storage/innobase/fsp/fsp0fsp.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1513: Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...]. This makes it possible to see which expression was false by looking at the error message. Approved by: Marko Revision r1528: Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible. storage/innobase/ibuf/ibuf0ibuf.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1420: Output to the error log information about the limitations of UNIV_IBUF_DEBUG. innobase_start_or_create_for_mysql(): Note that crash recovery is broken when UNIV_IBUF_DEBUG is defined. ibuf_counts[]: Make this a two-dimensional array. No need to allocate anything from the heap. Eliminate ibuf_counts_inited, as the array will be zero-filled by the runtime environment. ibuf_count_check(): New function, to print out an explanation before assertion failure. Revision r1528: Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible. Revision r1546: When buffering an insert to a prefix index of a variable-length column, do not incorrectly mark the column as fixed-length. (Bug#28138) ibuf_entry_build(): Instead of prefix_len, pass fixed_len to dtype_new_store_for_order_and_null_size(). Add debug assertions. btr_index_rec_validate(): Correct a comment about prefix indexes. rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add debug assertions and comments. dict_col_type_assert_equal(): New debug function. storage/innobase/include/db0err.h: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1423: Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out of UNDO slots in the rollback segment. This is a partial fix since the MySQL error code requested to properly report the error condition back to the client has not yet materialized. Currently we have #ifdef'd the error code translation in ha_innodb.cc. This will have to be changed as and when MySQl add the new requested code or an equivalent code that we can then use. Given the above, currently we will get the old behaviour, not the "fixed" and intended behaviour. storage/innobase/include/dict0dict.h: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1546: When buffering an insert to a prefix index of a variable-length column, do not incorrectly mark the column as fixed-length. (Bug#28138) ibuf_entry_build(): Instead of prefix_len, pass fixed_len to dtype_new_store_for_order_and_null_size(). Add debug assertions. btr_index_rec_validate(): Correct a comment about prefix indexes. rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add debug assertions and comments. dict_col_type_assert_equal(): New debug function. storage/innobase/include/dict0dict.ic: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1546: When buffering an insert to a prefix index of a variable-length column, do not incorrectly mark the column as fixed-length. (Bug#28138) ibuf_entry_build(): Instead of prefix_len, pass fixed_len to dtype_new_store_for_order_and_null_size(). Add debug assertions. btr_index_rec_validate(): Correct a comment about prefix indexes. rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add debug assertions and comments. dict_col_type_assert_equal(): New debug function. storage/innobase/include/dict0mem.h: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1535: Document that DICT_MAX_INDEX_COL_LEN must not be changed. Revision r1536: Change the comment to a more appropriate one. Discussed with Heikki on IM. Approved by: Heikki storage/innobase/include/ha_prototypes.h: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1482: Fix Bug#25078 by always letting the replication thread on the slave server to enter InnoDB. This can be made further customizable by the user if we introduce a new config parameter. This will wait until config parameters can be easily added. Approved by: Marko Revision r1501: Fix Bug#21293: Consider transactions that had edited non-transactional tables heavier than ones that had not. This helps killing the "right" transaction in case of a deadlock. Approved by: Heikki storage/innobase/include/os0file.h: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1431: Fix Bug#9709 by retrying (forever) if ERROR_SHARING_VIOLATION or ERROR_LOCK_VIOLATION is encountered during file operation. This is caused by backup software, so InnoDB should retry while the backup software is done with the file. Approved by: Heikki storage/innobase/include/rem0rec.ic: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1569: Fix some in:/out: comments. Approved by: Marko storage/innobase/include/row0mysql.h: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1422: Fix for Bug#21101 - returns wrong error message when table column defs exceed the max row size. The fix returns a more appropriate error message. Add a test case to innodb.test and expected output to innodb.result. storage/innobase/include/trx0trx.h: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1462: Fix typo in comment. Revision r1486: Improve the comment for trx_struct::undo_no. Suggested by: Heikki Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1497: Add the number of locks acquired by a transaction to its weight when choosing the lightest transaction to kill when a deadlock occurs. This fixes Bug#21293 partially. Approved by: Heikki Revision r1501: Fix Bug#21293: Consider transactions that had edited non-transactional tables heavier than ones that had not. This helps killing the "right" transaction in case of a deadlock. Approved by: Heikki storage/innobase/include/trx0undo.h: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1423: Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out of UNDO slots in the rollback segment. This is a partial fix since the MySQL error code requested to properly report the error condition back to the client has not yet materialized. Currently we have #ifdef'd the error code translation in ha_innodb.cc. This will have to be changed as and when MySQl add the new requested code or an equivalent code that we can then use. Given the above, currently we will get the old behaviour, not the "fixed" and intended behaviour. storage/innobase/include/ut0ut.h: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1528: Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible. storage/innobase/lock/lock0lock.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1457: Fix Bug#22819, remove assertion. (http://bugs.mysql.com/bug.php?id=22819) Revision r1497: Add the number of locks acquired by a transaction to its weight when choosing the lightest transaction to kill when a deadlock occurs. This fixes Bug#21293 partially. Approved by: Heikki Revision r1513: Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...]. This makes it possible to see which expression was false by looking at the error message. Approved by: Marko storage/innobase/log/log0log.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1521: Forward port r1520 from branches/5.0 Patch to allow monitor threads to stop before proceeding with normal shutdown. Also have a separate time counter for tablespace monitor. reviewed by: Heikki Revision r1524: Undo bad space formatting introduced in earlier commit r1521 spotted by: Marko Revision r1533: logs_empty_and_mark_files_at_shutdown(): Remove trailing whitespace that was added in r1521. storage/innobase/os/os0file.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1431: Fix Bug#9709 by retrying (forever) if ERROR_SHARING_VIOLATION or ERROR_LOCK_VIOLATION is encountered during file operation. This is caused by backup software, so InnoDB should retry while the backup software is done with the file. Approved by: Heikki storage/innobase/rem/rem0rec.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1528: Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible. Revision r1531: rec_get_converted_size_new(): Simplify and move a debug assertion. Revision r1546: When buffering an insert to a prefix index of a variable-length column, do not incorrectly mark the column as fixed-length. (Bug#28138) ibuf_entry_build(): Instead of prefix_len, pass fixed_len to dtype_new_store_for_order_and_null_size(). Add debug assertions. btr_index_rec_validate(): Correct a comment about prefix indexes. rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add debug assertions and comments. dict_col_type_assert_equal(): New debug function. Revision r1555: rec_get_converted_size_new(): The total size of the infimum and supremum records in ROW_FORMAT=COMPACT is REC_N_NEW_EXTRA_BYTES + 8. The REC_N_NEW_EXTRA_BYTES was accidentally omitted in r1546. This function should never be called on those records, though. Revision r1569: Fix some in:/out: comments. Approved by: Marko storage/innobase/row/row0ins.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1485: Minor cleanup. row_ins_check_foreign_constraint(), row_ins_scan_sec_index_for_duplicate(): Make use of the predicates page_rec_is_infimum() and page_rec_is_supremum(). Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1513: Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...]. This makes it possible to see which expression was false by looking at the error message. Approved by: Marko storage/innobase/row/row0mysql.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1422: Fix for Bug#21101 - returns wrong error message when table column defs exceed the max row size. The fix returns a more appropriate error message. Add a test case to innodb.test and expected output to innodb.result. Revision r1423: Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out of UNDO slots in the rollback segment. This is a partial fix since the MySQL error code requested to properly report the error condition back to the client has not yet materialized. Currently we have #ifdef'd the error code translation in ha_innodb.cc. This will have to be changed as and when MySQl add the new requested code or an equivalent code that we can then use. Given the above, currently we will get the old behaviour, not the "fixed" and intended behaviour. storage/innobase/row/row0row.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1513: Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...]. This makes it possible to see which expression was false by looking at the error message. Approved by: Marko Revision r1529: Revert r799, which was supposed to prevent similar cases as Bug#21638. In reality, the patch breaks the handling of prefix indexes of variable-length columns in ROW_FORMAT=COMPACT. Reverting the patch is only a partial fix of Bug#28138. storage/innobase/row/row0sel.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1452: Fix phantom reads (http://bugs.mysql.com/27197) following Heikki's patch in the bug followup. Approved by: Heikki Revision r1455: Reindent with tabs instead of spaces. Spotted by: Marko storage/innobase/srv/srv0srv.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1424: Bug#20352. Added variable srv_insert_buffer_batch_size. We want to make this variable settable. Since the pluggable engine interface currently doesn't provide a usable mechanism, we will add the latter functionality once it's available. Revision r1426: Fix code indentation from r1424. Revision r1459: Fix typo in the comment. Revision r1482: Fix Bug#25078 by always letting the replication thread on the slave server to enter InnoDB. This can be made further customizable by the user if we introduce a new config parameter. This will wait until config parameters can be easily added. Approved by: Marko Revision r1487: Fix typo in comment. Spotted by: Marko Revision r1521: Forward port r1520 from branches/5.0 Patch to allow monitor threads to stop before proceeding with normal shutdown. Also have a separate time counter for tablespace monitor. reviewed by: Heikki Revision r1532: srv_lock_timeout_and_monitor_thread(): Correct the indentation that was broken in r1521. Revision r1553: Fix Bug#20090 as suggested in the bug followup by Heikki. Approved by: Heikki storage/innobase/srv/srv0start.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1420: Output to the error log information about the limitations of UNIV_IBUF_DEBUG. innobase_start_or_create_for_mysql(): Note that crash recovery is broken when UNIV_IBUF_DEBUG is defined. ibuf_counts[]: Make this a two-dimensional array. No need to allocate anything from the heap. Eliminate ibuf_counts_inited, as the array will be zero-filled by the runtime environment. ibuf_count_check(): New function, to print out an explanation before assertion failure. storage/innobase/sync/sync0arr.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1513: Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...]. This makes it possible to see which expression was false by looking at the error message. Approved by: Marko storage/innobase/trx/trx0rec.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1423: Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out of UNDO slots in the rollback segment. This is a partial fix since the MySQL error code requested to properly report the error condition back to the client has not yet materialized. Currently we have #ifdef'd the error code translation in ha_innodb.cc. This will have to be changed as and when MySQl add the new requested code or an equivalent code that we can then use. Given the above, currently we will get the old behaviour, not the "fixed" and intended behaviour. storage/innobase/trx/trx0trx.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1491: Fix typo in comment. Revision r1497: Add the number of locks acquired by a transaction to its weight when choosing the lightest transaction to kill when a deadlock occurs. This fixes Bug#21293 partially. Approved by: Heikki Revision r1501: Fix Bug#21293: Consider transactions that had edited non-transactional tables heavier than ones that had not. This helps killing the "right" transaction in case of a deadlock. Approved by: Heikki Revision r1522: trx0trx.c: Add missing #include "ha_prototypes.h". storage/innobase/trx/trx0undo.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1423: Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out of UNDO slots in the rollback segment. This is a partial fix since the MySQL error code requested to properly report the error condition back to the client has not yet materialized. Currently we have #ifdef'd the error code translation in ha_innodb.cc. This will have to be changed as and when MySQl add the new requested code or an equivalent code that we can then use. Given the above, currently we will get the old behaviour, not the "fixed" and intended behaviour. storage/innobase/ut/ut0ut.c: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1490: Add #include . Apparently, this header is no longer included by the common headers. This may be related to WL#2936 (pluggable storage engines). mysql-test/r/innodb_trx_weight.result: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1498: Add a test about the behavior introduced in r1497. Revision r1501: Fix Bug#21293: Consider transactions that had edited non-transactional tables heavier than ones that had not. This helps killing the "right" transaction in case of a deadlock. Approved by: Heikki mysql-test/include/innodb_trx_weight.inc: Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569. Revision r1501: Fix Bug#21293: Consider transactions that had edited non-transactional tables heavier than ones that had not. This helps killing the "right" transaction in case of a deadlock. Approved by: Heikki Revision r1556: mysql-test/innodb_trx_weight.inc: Add username root to the "connect" statement. The Unix user running mysql-test-run usually does not have any privileges on the MySQL test database. mysql-test/t/innodb_trx_weight.test: Fixes after merging InnoDB snapshots. Revision r1498: Add a test about the behavior introduced in r1497. Revision r1501: Fix Bug#21293: Consider transactions that had edited non-transactional tables heavier than ones that had not. This helps killing the "right" transaction in case of a deadlock. Approved by: Heikki sql/sql_class.cc: Fixes after merging InnoDB snapshots. storage/innobase/Makefile.am: Fixes after merging InnoDB snapshots. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. storage/innobase/handler/ha_innodb.cc: Fixes after merging InnoDB snapshots. Revision r1422: Fix for Bug#21101 - returns wrong error message when table column defs exceed the max row size. The fix returns a more appropriate error message. Add a test case to innodb.test and expected output to innodb.result. Revision r1423: Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out of UNDO slots in the rollback segment. This is a partial fix since the MySQL error code requested to properly report the error condition back to the client has not yet materialized. Currently we have #ifdef'd the error code translation in ha_innodb.cc. This will have to be changed as and when MySQl add the new requested code or an equivalent code that we can then use. Given the above, currently we will get the old behaviour, not the "fixed" and intended behaviour. Revision r1425: Fixed a missing function decoration that slipped into r1422. Revision r1434: Fix typo. Revision r1442: Potential fix for Bug#25645: "Move innobase_release_stat_resources(trx) outside the 'if' in ha_innobase::external_lock(). That would add more safety that whatever MySQL does at a query end, there would be no risk of a hang on the btr search latch." Also call innobase_release_temporary_latches() in the beginning of ha_innobase::close(). Approved by: Heikki Revision r1453: Bugfix: only call innobase_release_temporary_latches() in case of current_thd is not NULL, otherwise we get NULL pointer dereferencing. Approved by: Heikki Revision r1474: Fix typo in comment: the exact prototype is in include/data0type.ic, not in data/data0type.ic Revision r1482: Fix Bug#25078 by always letting the replication thread on the slave server to enter InnoDB. This can be made further customizable by the user if we introduce a new config parameter. This will wait until config parameters can be easily added. Approved by: Marko Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. Revision r1489: thd_to_trx(), check_trx_exists(): Remove the handlerton parameter. It is a singleton object whose address is stored into innodb_hton_ptr. Revision r1492: Convert innobase_buffer_pool_size and innobase_log_file_size types from longlong to long long because MYSQL_SYSVAR_LONGLONG marco expects long long type. Also change ((ulint)innobase_buffer_pool_size) / 1024 to (ulint)(innobase_buffer_pool_size / 1024) and remove comment which is no longer true. Provided that innobase_buffer_pool_size is always 64bits these statements are equivalent if ulint is 64 bit (well it will screw up if innobase_buffer_pool_size is negative). And if ulint is 32 bit the later variant gives a little more chance that the value will fit. Approved by: Heikki Revision r1493: ha_innodb.cc: Remove the declarations of some global InnoDB variables whose name starts with srv_. These variables are declared in the header files that are covered by #include directives in ha_innodb.cc. Revision r1495: Introduce the function reset_template() for resetting some fields of row_prebuilt_t; currently prebuilt->read_just_key and prebuilt->keep_other_fields_on_keyread. Revision r1496: ha_innobase::extra(): Replace references to prebuilt->trx with thd_to_trx(ha_thd()), in order to avoid potential memory corruption. Revision r1501: Fix Bug#21293: Consider transactions that had edited non-transactional tables heavier than ones that had not. This helps killing the "right" transaction in case of a deadlock. Approved by: Heikki Revision r1513: Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...]. This makes it possible to see which expression was false by looking at the error message. Approved by: Marko Revision r1527: Cleanup in ha_innodb.cc: thd_is_replication_slave_thread(), thd_has_edited_nontrans_tables(): Remove blank line between the function comment and the function definition. There should be exactly one line between the return type and the function comment, and this line should be one of '', 'static', 'UNIV_INLINE', and 'extern "C"'. Revision r1538: Do not return error in ha_innobase::info if srv_force_recovery >= 4. This is to allow for normal processing of the query by MySQL instead of generating an error. Reviewed by: Heikki Revision r1551: ha_innobase::innobase_read_and_init_auto_inc(): Remember and restore prebuilt->sql_stat_start. In an ALTER TABLE statement in the innodb_gis test, an ut_ad() assertion failed, because no IX lock had been acquired on the table, because prebuilt->sql_stat_start was inadvertently reset to FALSE, by this function. This function was called via ha_innobase::info() and mysql_prepare_alter_table(). storage/innobase/plug.in: Fixes after merging InnoDB snapshots. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. storage/innobase/handler/ha_innodb.h: Fixes after merging InnoDB snapshots. Revision r1488: Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936 and adapt some things. Note that ha_innodb.cc depends on mysql_tmpfile() being declared in . Until the function is declared there, you can uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc. Remove storage/innobase/*/Makefile.am. The whole compilation is driven by storage/innobase/Makefile.am and storage/innobase/plug.in. plug.in: Declare InnoDB as a dynamic plugin. ha_innodb.h: Remove the declarations of many global variables. The variables are no longer directly referenced outside of storage/innobase. trx_t: Add the field trx->duplicates. trx_create(): Initialize the fields trx->active_trans and trx->duplicates. innobase_query_is_update(): Remove. Consult trx->duplicates instead. --- mysql-test/include/innodb_trx_weight.inc | 51 +++++++++++++++ mysql-test/r/innodb.result | 11 ++++ mysql-test/r/innodb_trx_weight.result | 1 + mysql-test/t/innodb.test | 15 +++++ mysql-test/t/innodb_trx_weight.test | 108 +++++++++++++++++++++++++++++++ 5 files changed, 186 insertions(+) create mode 100644 mysql-test/include/innodb_trx_weight.inc create mode 100644 mysql-test/r/innodb_trx_weight.result create mode 100644 mysql-test/t/innodb_trx_weight.test (limited to 'mysql-test') diff --git a/mysql-test/include/innodb_trx_weight.inc b/mysql-test/include/innodb_trx_weight.inc new file mode 100644 index 00000000000..56d3d47da36 --- /dev/null +++ b/mysql-test/include/innodb_trx_weight.inc @@ -0,0 +1,51 @@ +-- connect (con1,localhost,root,,) +-- connect (con2,localhost,root,,) + +-- connection con1 +SET autocommit=0; +SELECT * FROM t1 FOR UPDATE; +-- if ($con1_extra_sql_present) { + -- eval $con1_extra_sql +-- } + +-- connection con2 +SET autocommit=0; +SELECT * FROM t2 FOR UPDATE; +-- if ($con2_extra_sql_present) { + -- eval $con2_extra_sql +-- } + +-- if ($con1_should_be_rolledback) { + -- connection con1 + -- send + INSERT INTO t2 VALUES (0); + + -- connection con2 + INSERT INTO t1 VALUES (0); + ROLLBACK; + + -- connection con1 + -- error ER_LOCK_DEADLOCK + -- reap +-- } +# else +-- if (!$con1_should_be_rolledback) { + -- connection con2 + -- send + INSERT INTO t1 VALUES (0); + + -- connection con1 + INSERT INTO t2 VALUES (0); + ROLLBACK; + + -- connection con2 + -- error ER_LOCK_DEADLOCK + -- reap +-- } + +-- connection default + +DELETE FROM t5_nontrans; + +-- disconnect con1 +-- disconnect con2 diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index ad79a2a837a..9a96145ef06 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -3211,3 +3211,14 @@ t1 CREATE TABLE `t1` ( CONSTRAINT `t1_t2` FOREIGN KEY (`id`) REFERENCES `t2` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1 DROP TABLE t1,t2; +CREATE TABLE t1 ( +c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255), +c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255), +c09 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255), +c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255), +c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255), +c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255), +c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255), +c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255) +) ENGINE = InnoDB; +ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs diff --git a/mysql-test/r/innodb_trx_weight.result b/mysql-test/r/innodb_trx_weight.result new file mode 100644 index 00000000000..195775f74c8 --- /dev/null +++ b/mysql-test/r/innodb_trx_weight.result @@ -0,0 +1 @@ +SET storage_engine=InnoDB; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 321a1f4763a..96b2ffda7d6 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -2349,6 +2349,21 @@ SHOW CREATE TABLE t1; DROP TABLE t1,t2; +# +# Bug #21101 (Prints wrong error message if max row size is too large) +# +--error 1118 +CREATE TABLE t1 ( + c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255), + c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255), + c09 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255), + c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255), + c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255), + c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255), + c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255), + c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255) + ) ENGINE = InnoDB; + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/mysql-test/t/innodb_trx_weight.test b/mysql-test/t/innodb_trx_weight.test new file mode 100644 index 00000000000..b72eaad345f --- /dev/null +++ b/mysql-test/t/innodb_trx_weight.test @@ -0,0 +1,108 @@ +# +# Ensure that the number of locks (SELECT FOR UPDATE for example) is +# added to the number of altered rows when choosing the smallest +# transaction to kill as a victim when a deadlock is detected. +# Also transactions what had edited non-transactional tables should +# be heavier than ones that had not. +# + +-- source include/have_innodb.inc + +SET storage_engine=InnoDB; + +# we do not really care about what gets printed, we are only +# interested in getting the deadlock resolved according to our +# expectations +-- disable_query_log +-- disable_result_log + +# we want to use "-- eval statement1; statement2" which does not work with +# prepared statements. Because this test should not behave differently with +# or without prepared statements we disable them so the test does not fail +# if someone runs ./mysql-test-run.pl --ps-protocol +-- disable_ps_protocol + +-- disable_warnings +DROP TABLE IF EXISTS t1, t2, t3, t4, t5_nontrans; +-- enable_warnings + +# we will create a simple deadlock with t1, t2 and two connections +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a INT); + +# auxiliary table with a bulk of rows which will be locked by a +# transaction to increase its weight +CREATE TABLE t3 (a INT); + +# auxiliary empty table which will be inserted by a +# transaction to increase its weight +CREATE TABLE t4 (a INT); + +# auxiliary non-transactional table which will be edited by a +# transaction to tremendously increase its weight +CREATE TABLE t5_nontrans (a INT) ENGINE=MyISAM; + +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); +# insert a lot of rows in t3 +INSERT INTO t3 VALUES (1); +INSERT INTO t3 SELECT * FROM t3; +INSERT INTO t3 SELECT * FROM t3; +INSERT INTO t3 SELECT * FROM t3; +INSERT INTO t3 SELECT * FROM t3; +INSERT INTO t3 SELECT * FROM t3; +INSERT INTO t3 SELECT * FROM t3; +INSERT INTO t3 SELECT * FROM t3; +INSERT INTO t3 SELECT * FROM t3; +INSERT INTO t3 SELECT * FROM t3; +INSERT INTO t3 SELECT * FROM t3; +INSERT INTO t3 SELECT * FROM t3; + +# test locking weight + +-- let $con1_extra_sql = +-- let $con1_extra_sql_present = 0 +-- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE +-- let $con2_extra_sql_present = 1 +-- let $con1_should_be_rolledback = 1 +-- source include/innodb_trx_weight.inc + +-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1) +-- let $con1_extra_sql_present = 1 +-- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE +-- let $con2_extra_sql_present = 1 +-- let $con1_should_be_rolledback = 1 +-- source include/innodb_trx_weight.inc + +-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1), (1), (1), (1) +-- let $con1_extra_sql_present = 1 +-- let $con2_extra_sql = SELECT * FROM t3 FOR UPDATE +-- let $con2_extra_sql_present = 1 +-- let $con1_should_be_rolledback = 0 +-- source include/innodb_trx_weight.inc + +# test weight when non-transactional tables are edited + +-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1) +-- let $con1_extra_sql_present = 1 +-- let $con2_extra_sql = +-- let $con2_extra_sql_present = 0 +-- let $con1_should_be_rolledback = 0 +-- source include/innodb_trx_weight.inc + +-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1) +-- let $con1_extra_sql_present = 1 +-- let $con2_extra_sql = INSERT INTO t5_nontrans VALUES (1) +-- let $con2_extra_sql_present = 1 +-- let $con1_should_be_rolledback = 1 +-- source include/innodb_trx_weight.inc + +-- let $con1_extra_sql = INSERT INTO t4 VALUES (1), (1), (1) +-- let $con1_extra_sql = $con1_extra_sql; INSERT INTO t5_nontrans VALUES (1) +-- let $con1_extra_sql_present = 1 +-- let $con2_extra_sql = INSERT INTO t5_nontrans VALUES (1) +-- let $con2_extra_sql_present = 1 +-- let $con1_should_be_rolledback = 0 +-- source include/innodb_trx_weight.inc + +DROP TABLE t1, t2, t3, t4, t5_nontrans; -- cgit v1.2.1 From 523d4ddbd41d84dd8acbe956ae3a6a75b65c220a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Jul 2007 18:31:50 +0200 Subject: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB streamlining the test --- mysql-test/suite/binlog/r/binlog_stm_binlog.result | 826 ++++++++++----------- 1 file changed, 413 insertions(+), 413 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index c02c8f7ef8d..80908e6b450 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -157,425 +157,425 @@ commit; drop table t1; show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 -master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=innodb -master-bin.000001 197 Query 1 265 use `test`; BEGIN -master-bin.000001 265 Query 1 353 use `test`; insert into t1 values (1) -master-bin.000001 353 Query 1 441 use `test`; insert into t1 values (2) -master-bin.000001 441 Query 1 529 use `test`; insert into t1 values (3) -master-bin.000001 529 Xid 1 556 COMMIT /* XID */ -master-bin.000001 556 Query 1 632 use `test`; drop table t1 +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb +master-bin.000001 205 Query 1 273 use `test`; BEGIN +master-bin.000001 273 Query 1 361 use `test`; insert into t1 values (1) +master-bin.000001 361 Query 1 449 use `test`; insert into t1 values (2) +master-bin.000001 449 Query 1 537 use `test`; insert into t1 values (3) +master-bin.000001 537 Xid 1 564 COMMIT /* XID */ +master-bin.000001 564 Query 1 640 use `test`; drop table t1 set @bcs = @@binlog_cache_size; set global binlog_cache_size=4096; reset master; create table t1 (a int) engine=innodb; show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4 -master-bin.000001 98 Query 1 198 use `test`; create table t1 (a int) engine=innodb -master-bin.000001 198 Query 1 266 use `test`; BEGIN -master-bin.000001 266 Query 1 357 use `test`; insert into t1 values( 400 ) -master-bin.000001 357 Query 1 448 use `test`; insert into t1 values( 399 ) -master-bin.000001 448 Query 1 539 use `test`; insert into t1 values( 398 ) -master-bin.000001 539 Query 1 630 use `test`; insert into t1 values( 397 ) -master-bin.000001 630 Query 1 721 use `test`; insert into t1 values( 396 ) -master-bin.000001 721 Query 1 812 use `test`; insert into t1 values( 395 ) -master-bin.000001 812 Query 1 903 use `test`; insert into t1 values( 394 ) -master-bin.000001 903 Query 1 994 use `test`; insert into t1 values( 393 ) -master-bin.000001 994 Query 1 1085 use `test`; insert into t1 values( 392 ) -master-bin.000001 1085 Query 1 1176 use `test`; insert into t1 values( 391 ) -master-bin.000001 1176 Query 1 1267 use `test`; insert into t1 values( 390 ) -master-bin.000001 1267 Query 1 1358 use `test`; insert into t1 values( 389 ) -master-bin.000001 1358 Query 1 1449 use `test`; insert into t1 values( 388 ) -master-bin.000001 1449 Query 1 1540 use `test`; insert into t1 values( 387 ) -master-bin.000001 1540 Query 1 1631 use `test`; insert into t1 values( 386 ) -master-bin.000001 1631 Query 1 1722 use `test`; insert into t1 values( 385 ) -master-bin.000001 1722 Query 1 1813 use `test`; insert into t1 values( 384 ) -master-bin.000001 1813 Query 1 1904 use `test`; insert into t1 values( 383 ) -master-bin.000001 1904 Query 1 1995 use `test`; insert into t1 values( 382 ) -master-bin.000001 1995 Query 1 2086 use `test`; insert into t1 values( 381 ) -master-bin.000001 2086 Query 1 2177 use `test`; insert into t1 values( 380 ) -master-bin.000001 2177 Query 1 2268 use `test`; insert into t1 values( 379 ) -master-bin.000001 2268 Query 1 2359 use `test`; insert into t1 values( 378 ) -master-bin.000001 2359 Query 1 2450 use `test`; insert into t1 values( 377 ) -master-bin.000001 2450 Query 1 2541 use `test`; insert into t1 values( 376 ) -master-bin.000001 2541 Query 1 2632 use `test`; insert into t1 values( 375 ) -master-bin.000001 2632 Query 1 2723 use `test`; insert into t1 values( 374 ) -master-bin.000001 2723 Query 1 2814 use `test`; insert into t1 values( 373 ) -master-bin.000001 2814 Query 1 2905 use `test`; insert into t1 values( 372 ) -master-bin.000001 2905 Query 1 2996 use `test`; insert into t1 values( 371 ) -master-bin.000001 2996 Query 1 3087 use `test`; insert into t1 values( 370 ) -master-bin.000001 3087 Query 1 3178 use `test`; insert into t1 values( 369 ) -master-bin.000001 3178 Query 1 3269 use `test`; insert into t1 values( 368 ) -master-bin.000001 3269 Query 1 3360 use `test`; insert into t1 values( 367 ) -master-bin.000001 3360 Query 1 3451 use `test`; insert into t1 values( 366 ) -master-bin.000001 3451 Query 1 3542 use `test`; insert into t1 values( 365 ) -master-bin.000001 3542 Query 1 3633 use `test`; insert into t1 values( 364 ) -master-bin.000001 3633 Query 1 3724 use `test`; insert into t1 values( 363 ) -master-bin.000001 3724 Query 1 3815 use `test`; insert into t1 values( 362 ) -master-bin.000001 3815 Query 1 3906 use `test`; insert into t1 values( 361 ) -master-bin.000001 3906 Query 1 3997 use `test`; insert into t1 values( 360 ) -master-bin.000001 3997 Query 1 4088 use `test`; insert into t1 values( 359 ) -master-bin.000001 4088 Query 1 4179 use `test`; insert into t1 values( 358 ) -master-bin.000001 4179 Query 1 4270 use `test`; insert into t1 values( 357 ) -master-bin.000001 4270 Query 1 4361 use `test`; insert into t1 values( 356 ) -master-bin.000001 4361 Query 1 4452 use `test`; insert into t1 values( 355 ) -master-bin.000001 4452 Query 1 4543 use `test`; insert into t1 values( 354 ) -master-bin.000001 4543 Query 1 4634 use `test`; insert into t1 values( 353 ) -master-bin.000001 4634 Query 1 4725 use `test`; insert into t1 values( 352 ) -master-bin.000001 4725 Query 1 4816 use `test`; insert into t1 values( 351 ) -master-bin.000001 4816 Query 1 4907 use `test`; insert into t1 values( 350 ) -master-bin.000001 4907 Query 1 4998 use `test`; insert into t1 values( 349 ) -master-bin.000001 4998 Query 1 5089 use `test`; insert into t1 values( 348 ) -master-bin.000001 5089 Query 1 5180 use `test`; insert into t1 values( 347 ) -master-bin.000001 5180 Query 1 5271 use `test`; insert into t1 values( 346 ) -master-bin.000001 5271 Query 1 5362 use `test`; insert into t1 values( 345 ) -master-bin.000001 5362 Query 1 5453 use `test`; insert into t1 values( 344 ) -master-bin.000001 5453 Query 1 5544 use `test`; insert into t1 values( 343 ) -master-bin.000001 5544 Query 1 5635 use `test`; insert into t1 values( 342 ) -master-bin.000001 5635 Query 1 5726 use `test`; insert into t1 values( 341 ) -master-bin.000001 5726 Query 1 5817 use `test`; insert into t1 values( 340 ) -master-bin.000001 5817 Query 1 5908 use `test`; insert into t1 values( 339 ) -master-bin.000001 5908 Query 1 5999 use `test`; insert into t1 values( 338 ) -master-bin.000001 5999 Query 1 6090 use `test`; insert into t1 values( 337 ) -master-bin.000001 6090 Query 1 6181 use `test`; insert into t1 values( 336 ) -master-bin.000001 6181 Query 1 6272 use `test`; insert into t1 values( 335 ) -master-bin.000001 6272 Query 1 6363 use `test`; insert into t1 values( 334 ) -master-bin.000001 6363 Query 1 6454 use `test`; insert into t1 values( 333 ) -master-bin.000001 6454 Query 1 6545 use `test`; insert into t1 values( 332 ) -master-bin.000001 6545 Query 1 6636 use `test`; insert into t1 values( 331 ) -master-bin.000001 6636 Query 1 6727 use `test`; insert into t1 values( 330 ) -master-bin.000001 6727 Query 1 6818 use `test`; insert into t1 values( 329 ) -master-bin.000001 6818 Query 1 6909 use `test`; insert into t1 values( 328 ) -master-bin.000001 6909 Query 1 7000 use `test`; insert into t1 values( 327 ) -master-bin.000001 7000 Query 1 7091 use `test`; insert into t1 values( 326 ) -master-bin.000001 7091 Query 1 7182 use `test`; insert into t1 values( 325 ) -master-bin.000001 7182 Query 1 7273 use `test`; insert into t1 values( 324 ) -master-bin.000001 7273 Query 1 7364 use `test`; insert into t1 values( 323 ) -master-bin.000001 7364 Query 1 7455 use `test`; insert into t1 values( 322 ) -master-bin.000001 7455 Query 1 7546 use `test`; insert into t1 values( 321 ) -master-bin.000001 7546 Query 1 7637 use `test`; insert into t1 values( 320 ) -master-bin.000001 7637 Query 1 7728 use `test`; insert into t1 values( 319 ) -master-bin.000001 7728 Query 1 7819 use `test`; insert into t1 values( 318 ) -master-bin.000001 7819 Query 1 7910 use `test`; insert into t1 values( 317 ) -master-bin.000001 7910 Query 1 8001 use `test`; insert into t1 values( 316 ) -master-bin.000001 8001 Query 1 8092 use `test`; insert into t1 values( 315 ) -master-bin.000001 8092 Query 1 8183 use `test`; insert into t1 values( 314 ) -master-bin.000001 8183 Query 1 8274 use `test`; insert into t1 values( 313 ) -master-bin.000001 8274 Query 1 8365 use `test`; insert into t1 values( 312 ) -master-bin.000001 8365 Query 1 8456 use `test`; insert into t1 values( 311 ) -master-bin.000001 8456 Query 1 8547 use `test`; insert into t1 values( 310 ) -master-bin.000001 8547 Query 1 8638 use `test`; insert into t1 values( 309 ) -master-bin.000001 8638 Query 1 8729 use `test`; insert into t1 values( 308 ) -master-bin.000001 8729 Query 1 8820 use `test`; insert into t1 values( 307 ) -master-bin.000001 8820 Query 1 8911 use `test`; insert into t1 values( 306 ) -master-bin.000001 8911 Query 1 9002 use `test`; insert into t1 values( 305 ) -master-bin.000001 9002 Query 1 9093 use `test`; insert into t1 values( 304 ) -master-bin.000001 9093 Query 1 9184 use `test`; insert into t1 values( 303 ) -master-bin.000001 9184 Query 1 9275 use `test`; insert into t1 values( 302 ) -master-bin.000001 9275 Query 1 9366 use `test`; insert into t1 values( 301 ) -master-bin.000001 9366 Query 1 9457 use `test`; insert into t1 values( 300 ) -master-bin.000001 9457 Query 1 9548 use `test`; insert into t1 values( 299 ) -master-bin.000001 9548 Query 1 9639 use `test`; insert into t1 values( 298 ) -master-bin.000001 9639 Query 1 9730 use `test`; insert into t1 values( 297 ) -master-bin.000001 9730 Query 1 9821 use `test`; insert into t1 values( 296 ) -master-bin.000001 9821 Query 1 9912 use `test`; insert into t1 values( 295 ) -master-bin.000001 9912 Query 1 10003 use `test`; insert into t1 values( 294 ) -master-bin.000001 10003 Query 1 10094 use `test`; insert into t1 values( 293 ) -master-bin.000001 10094 Query 1 10185 use `test`; insert into t1 values( 292 ) -master-bin.000001 10185 Query 1 10276 use `test`; insert into t1 values( 291 ) -master-bin.000001 10276 Query 1 10367 use `test`; insert into t1 values( 290 ) -master-bin.000001 10367 Query 1 10458 use `test`; insert into t1 values( 289 ) -master-bin.000001 10458 Query 1 10549 use `test`; insert into t1 values( 288 ) -master-bin.000001 10549 Query 1 10640 use `test`; insert into t1 values( 287 ) -master-bin.000001 10640 Query 1 10731 use `test`; insert into t1 values( 286 ) -master-bin.000001 10731 Query 1 10822 use `test`; insert into t1 values( 285 ) -master-bin.000001 10822 Query 1 10913 use `test`; insert into t1 values( 284 ) -master-bin.000001 10913 Query 1 11004 use `test`; insert into t1 values( 283 ) -master-bin.000001 11004 Query 1 11095 use `test`; insert into t1 values( 282 ) -master-bin.000001 11095 Query 1 11186 use `test`; insert into t1 values( 281 ) -master-bin.000001 11186 Query 1 11277 use `test`; insert into t1 values( 280 ) -master-bin.000001 11277 Query 1 11368 use `test`; insert into t1 values( 279 ) -master-bin.000001 11368 Query 1 11459 use `test`; insert into t1 values( 278 ) -master-bin.000001 11459 Query 1 11550 use `test`; insert into t1 values( 277 ) -master-bin.000001 11550 Query 1 11641 use `test`; insert into t1 values( 276 ) -master-bin.000001 11641 Query 1 11732 use `test`; insert into t1 values( 275 ) -master-bin.000001 11732 Query 1 11823 use `test`; insert into t1 values( 274 ) -master-bin.000001 11823 Query 1 11914 use `test`; insert into t1 values( 273 ) -master-bin.000001 11914 Query 1 12005 use `test`; insert into t1 values( 272 ) -master-bin.000001 12005 Query 1 12096 use `test`; insert into t1 values( 271 ) -master-bin.000001 12096 Query 1 12187 use `test`; insert into t1 values( 270 ) -master-bin.000001 12187 Query 1 12278 use `test`; insert into t1 values( 269 ) -master-bin.000001 12278 Query 1 12369 use `test`; insert into t1 values( 268 ) -master-bin.000001 12369 Query 1 12460 use `test`; insert into t1 values( 267 ) -master-bin.000001 12460 Query 1 12551 use `test`; insert into t1 values( 266 ) -master-bin.000001 12551 Query 1 12642 use `test`; insert into t1 values( 265 ) -master-bin.000001 12642 Query 1 12733 use `test`; insert into t1 values( 264 ) -master-bin.000001 12733 Query 1 12824 use `test`; insert into t1 values( 263 ) -master-bin.000001 12824 Query 1 12915 use `test`; insert into t1 values( 262 ) -master-bin.000001 12915 Query 1 13006 use `test`; insert into t1 values( 261 ) -master-bin.000001 13006 Query 1 13097 use `test`; insert into t1 values( 260 ) -master-bin.000001 13097 Query 1 13188 use `test`; insert into t1 values( 259 ) -master-bin.000001 13188 Query 1 13279 use `test`; insert into t1 values( 258 ) -master-bin.000001 13279 Query 1 13370 use `test`; insert into t1 values( 257 ) -master-bin.000001 13370 Query 1 13461 use `test`; insert into t1 values( 256 ) -master-bin.000001 13461 Query 1 13552 use `test`; insert into t1 values( 255 ) -master-bin.000001 13552 Query 1 13643 use `test`; insert into t1 values( 254 ) -master-bin.000001 13643 Query 1 13734 use `test`; insert into t1 values( 253 ) -master-bin.000001 13734 Query 1 13825 use `test`; insert into t1 values( 252 ) -master-bin.000001 13825 Query 1 13916 use `test`; insert into t1 values( 251 ) -master-bin.000001 13916 Query 1 14007 use `test`; insert into t1 values( 250 ) -master-bin.000001 14007 Query 1 14098 use `test`; insert into t1 values( 249 ) -master-bin.000001 14098 Query 1 14189 use `test`; insert into t1 values( 248 ) -master-bin.000001 14189 Query 1 14280 use `test`; insert into t1 values( 247 ) -master-bin.000001 14280 Query 1 14371 use `test`; insert into t1 values( 246 ) -master-bin.000001 14371 Query 1 14462 use `test`; insert into t1 values( 245 ) -master-bin.000001 14462 Query 1 14553 use `test`; insert into t1 values( 244 ) -master-bin.000001 14553 Query 1 14644 use `test`; insert into t1 values( 243 ) -master-bin.000001 14644 Query 1 14735 use `test`; insert into t1 values( 242 ) -master-bin.000001 14735 Query 1 14826 use `test`; insert into t1 values( 241 ) -master-bin.000001 14826 Query 1 14917 use `test`; insert into t1 values( 240 ) -master-bin.000001 14917 Query 1 15008 use `test`; insert into t1 values( 239 ) -master-bin.000001 15008 Query 1 15099 use `test`; insert into t1 values( 238 ) -master-bin.000001 15099 Query 1 15190 use `test`; insert into t1 values( 237 ) -master-bin.000001 15190 Query 1 15281 use `test`; insert into t1 values( 236 ) -master-bin.000001 15281 Query 1 15372 use `test`; insert into t1 values( 235 ) -master-bin.000001 15372 Query 1 15463 use `test`; insert into t1 values( 234 ) -master-bin.000001 15463 Query 1 15554 use `test`; insert into t1 values( 233 ) -master-bin.000001 15554 Query 1 15645 use `test`; insert into t1 values( 232 ) -master-bin.000001 15645 Query 1 15736 use `test`; insert into t1 values( 231 ) -master-bin.000001 15736 Query 1 15827 use `test`; insert into t1 values( 230 ) -master-bin.000001 15827 Query 1 15918 use `test`; insert into t1 values( 229 ) -master-bin.000001 15918 Query 1 16009 use `test`; insert into t1 values( 228 ) -master-bin.000001 16009 Query 1 16100 use `test`; insert into t1 values( 227 ) -master-bin.000001 16100 Query 1 16191 use `test`; insert into t1 values( 226 ) -master-bin.000001 16191 Query 1 16282 use `test`; insert into t1 values( 225 ) -master-bin.000001 16282 Query 1 16373 use `test`; insert into t1 values( 224 ) -master-bin.000001 16373 Query 1 16464 use `test`; insert into t1 values( 223 ) -master-bin.000001 16464 Query 1 16555 use `test`; insert into t1 values( 222 ) -master-bin.000001 16555 Query 1 16646 use `test`; insert into t1 values( 221 ) -master-bin.000001 16646 Query 1 16737 use `test`; insert into t1 values( 220 ) -master-bin.000001 16737 Query 1 16828 use `test`; insert into t1 values( 219 ) -master-bin.000001 16828 Query 1 16919 use `test`; insert into t1 values( 218 ) -master-bin.000001 16919 Query 1 17010 use `test`; insert into t1 values( 217 ) -master-bin.000001 17010 Query 1 17101 use `test`; insert into t1 values( 216 ) -master-bin.000001 17101 Query 1 17192 use `test`; insert into t1 values( 215 ) -master-bin.000001 17192 Query 1 17283 use `test`; insert into t1 values( 214 ) -master-bin.000001 17283 Query 1 17374 use `test`; insert into t1 values( 213 ) -master-bin.000001 17374 Query 1 17465 use `test`; insert into t1 values( 212 ) -master-bin.000001 17465 Query 1 17556 use `test`; insert into t1 values( 211 ) -master-bin.000001 17556 Query 1 17647 use `test`; insert into t1 values( 210 ) -master-bin.000001 17647 Query 1 17738 use `test`; insert into t1 values( 209 ) -master-bin.000001 17738 Query 1 17829 use `test`; insert into t1 values( 208 ) -master-bin.000001 17829 Query 1 17920 use `test`; insert into t1 values( 207 ) -master-bin.000001 17920 Query 1 18011 use `test`; insert into t1 values( 206 ) -master-bin.000001 18011 Query 1 18102 use `test`; insert into t1 values( 205 ) -master-bin.000001 18102 Query 1 18193 use `test`; insert into t1 values( 204 ) -master-bin.000001 18193 Query 1 18284 use `test`; insert into t1 values( 203 ) -master-bin.000001 18284 Query 1 18375 use `test`; insert into t1 values( 202 ) -master-bin.000001 18375 Query 1 18466 use `test`; insert into t1 values( 201 ) -master-bin.000001 18466 Query 1 18557 use `test`; insert into t1 values( 200 ) -master-bin.000001 18557 Query 1 18648 use `test`; insert into t1 values( 199 ) -master-bin.000001 18648 Query 1 18739 use `test`; insert into t1 values( 198 ) -master-bin.000001 18739 Query 1 18830 use `test`; insert into t1 values( 197 ) -master-bin.000001 18830 Query 1 18921 use `test`; insert into t1 values( 196 ) -master-bin.000001 18921 Query 1 19012 use `test`; insert into t1 values( 195 ) -master-bin.000001 19012 Query 1 19103 use `test`; insert into t1 values( 194 ) -master-bin.000001 19103 Query 1 19194 use `test`; insert into t1 values( 193 ) -master-bin.000001 19194 Query 1 19285 use `test`; insert into t1 values( 192 ) -master-bin.000001 19285 Query 1 19376 use `test`; insert into t1 values( 191 ) -master-bin.000001 19376 Query 1 19467 use `test`; insert into t1 values( 190 ) -master-bin.000001 19467 Query 1 19558 use `test`; insert into t1 values( 189 ) -master-bin.000001 19558 Query 1 19649 use `test`; insert into t1 values( 188 ) -master-bin.000001 19649 Query 1 19740 use `test`; insert into t1 values( 187 ) -master-bin.000001 19740 Query 1 19831 use `test`; insert into t1 values( 186 ) -master-bin.000001 19831 Query 1 19922 use `test`; insert into t1 values( 185 ) -master-bin.000001 19922 Query 1 20013 use `test`; insert into t1 values( 184 ) -master-bin.000001 20013 Query 1 20104 use `test`; insert into t1 values( 183 ) -master-bin.000001 20104 Query 1 20195 use `test`; insert into t1 values( 182 ) -master-bin.000001 20195 Query 1 20286 use `test`; insert into t1 values( 181 ) -master-bin.000001 20286 Query 1 20377 use `test`; insert into t1 values( 180 ) -master-bin.000001 20377 Query 1 20468 use `test`; insert into t1 values( 179 ) -master-bin.000001 20468 Query 1 20559 use `test`; insert into t1 values( 178 ) -master-bin.000001 20559 Query 1 20650 use `test`; insert into t1 values( 177 ) -master-bin.000001 20650 Query 1 20741 use `test`; insert into t1 values( 176 ) -master-bin.000001 20741 Query 1 20832 use `test`; insert into t1 values( 175 ) -master-bin.000001 20832 Query 1 20923 use `test`; insert into t1 values( 174 ) -master-bin.000001 20923 Query 1 21014 use `test`; insert into t1 values( 173 ) -master-bin.000001 21014 Query 1 21105 use `test`; insert into t1 values( 172 ) -master-bin.000001 21105 Query 1 21196 use `test`; insert into t1 values( 171 ) -master-bin.000001 21196 Query 1 21287 use `test`; insert into t1 values( 170 ) -master-bin.000001 21287 Query 1 21378 use `test`; insert into t1 values( 169 ) -master-bin.000001 21378 Query 1 21469 use `test`; insert into t1 values( 168 ) -master-bin.000001 21469 Query 1 21560 use `test`; insert into t1 values( 167 ) -master-bin.000001 21560 Query 1 21651 use `test`; insert into t1 values( 166 ) -master-bin.000001 21651 Query 1 21742 use `test`; insert into t1 values( 165 ) -master-bin.000001 21742 Query 1 21833 use `test`; insert into t1 values( 164 ) -master-bin.000001 21833 Query 1 21924 use `test`; insert into t1 values( 163 ) -master-bin.000001 21924 Query 1 22015 use `test`; insert into t1 values( 162 ) -master-bin.000001 22015 Query 1 22106 use `test`; insert into t1 values( 161 ) -master-bin.000001 22106 Query 1 22197 use `test`; insert into t1 values( 160 ) -master-bin.000001 22197 Query 1 22288 use `test`; insert into t1 values( 159 ) -master-bin.000001 22288 Query 1 22379 use `test`; insert into t1 values( 158 ) -master-bin.000001 22379 Query 1 22470 use `test`; insert into t1 values( 157 ) -master-bin.000001 22470 Query 1 22561 use `test`; insert into t1 values( 156 ) -master-bin.000001 22561 Query 1 22652 use `test`; insert into t1 values( 155 ) -master-bin.000001 22652 Query 1 22743 use `test`; insert into t1 values( 154 ) -master-bin.000001 22743 Query 1 22834 use `test`; insert into t1 values( 153 ) -master-bin.000001 22834 Query 1 22925 use `test`; insert into t1 values( 152 ) -master-bin.000001 22925 Query 1 23016 use `test`; insert into t1 values( 151 ) -master-bin.000001 23016 Query 1 23107 use `test`; insert into t1 values( 150 ) -master-bin.000001 23107 Query 1 23198 use `test`; insert into t1 values( 149 ) -master-bin.000001 23198 Query 1 23289 use `test`; insert into t1 values( 148 ) -master-bin.000001 23289 Query 1 23380 use `test`; insert into t1 values( 147 ) -master-bin.000001 23380 Query 1 23471 use `test`; insert into t1 values( 146 ) -master-bin.000001 23471 Query 1 23562 use `test`; insert into t1 values( 145 ) -master-bin.000001 23562 Query 1 23653 use `test`; insert into t1 values( 144 ) -master-bin.000001 23653 Query 1 23744 use `test`; insert into t1 values( 143 ) -master-bin.000001 23744 Query 1 23835 use `test`; insert into t1 values( 142 ) -master-bin.000001 23835 Query 1 23926 use `test`; insert into t1 values( 141 ) -master-bin.000001 23926 Query 1 24017 use `test`; insert into t1 values( 140 ) -master-bin.000001 24017 Query 1 24108 use `test`; insert into t1 values( 139 ) -master-bin.000001 24108 Query 1 24199 use `test`; insert into t1 values( 138 ) -master-bin.000001 24199 Query 1 24290 use `test`; insert into t1 values( 137 ) -master-bin.000001 24290 Query 1 24381 use `test`; insert into t1 values( 136 ) -master-bin.000001 24381 Query 1 24472 use `test`; insert into t1 values( 135 ) -master-bin.000001 24472 Query 1 24563 use `test`; insert into t1 values( 134 ) -master-bin.000001 24563 Query 1 24654 use `test`; insert into t1 values( 133 ) -master-bin.000001 24654 Query 1 24745 use `test`; insert into t1 values( 132 ) -master-bin.000001 24745 Query 1 24836 use `test`; insert into t1 values( 131 ) -master-bin.000001 24836 Query 1 24927 use `test`; insert into t1 values( 130 ) -master-bin.000001 24927 Query 1 25018 use `test`; insert into t1 values( 129 ) -master-bin.000001 25018 Query 1 25109 use `test`; insert into t1 values( 128 ) -master-bin.000001 25109 Query 1 25200 use `test`; insert into t1 values( 127 ) -master-bin.000001 25200 Query 1 25291 use `test`; insert into t1 values( 126 ) -master-bin.000001 25291 Query 1 25382 use `test`; insert into t1 values( 125 ) -master-bin.000001 25382 Query 1 25473 use `test`; insert into t1 values( 124 ) -master-bin.000001 25473 Query 1 25564 use `test`; insert into t1 values( 123 ) -master-bin.000001 25564 Query 1 25655 use `test`; insert into t1 values( 122 ) -master-bin.000001 25655 Query 1 25746 use `test`; insert into t1 values( 121 ) -master-bin.000001 25746 Query 1 25837 use `test`; insert into t1 values( 120 ) -master-bin.000001 25837 Query 1 25928 use `test`; insert into t1 values( 119 ) -master-bin.000001 25928 Query 1 26019 use `test`; insert into t1 values( 118 ) -master-bin.000001 26019 Query 1 26110 use `test`; insert into t1 values( 117 ) -master-bin.000001 26110 Query 1 26201 use `test`; insert into t1 values( 116 ) -master-bin.000001 26201 Query 1 26292 use `test`; insert into t1 values( 115 ) -master-bin.000001 26292 Query 1 26383 use `test`; insert into t1 values( 114 ) -master-bin.000001 26383 Query 1 26474 use `test`; insert into t1 values( 113 ) -master-bin.000001 26474 Query 1 26565 use `test`; insert into t1 values( 112 ) -master-bin.000001 26565 Query 1 26656 use `test`; insert into t1 values( 111 ) -master-bin.000001 26656 Query 1 26747 use `test`; insert into t1 values( 110 ) -master-bin.000001 26747 Query 1 26838 use `test`; insert into t1 values( 109 ) -master-bin.000001 26838 Query 1 26929 use `test`; insert into t1 values( 108 ) -master-bin.000001 26929 Query 1 27020 use `test`; insert into t1 values( 107 ) -master-bin.000001 27020 Query 1 27111 use `test`; insert into t1 values( 106 ) -master-bin.000001 27111 Query 1 27202 use `test`; insert into t1 values( 105 ) -master-bin.000001 27202 Query 1 27293 use `test`; insert into t1 values( 104 ) -master-bin.000001 27293 Query 1 27384 use `test`; insert into t1 values( 103 ) -master-bin.000001 27384 Query 1 27475 use `test`; insert into t1 values( 102 ) -master-bin.000001 27475 Query 1 27566 use `test`; insert into t1 values( 101 ) -master-bin.000001 27566 Query 1 27657 use `test`; insert into t1 values( 100 ) -master-bin.000001 27657 Query 1 27747 use `test`; insert into t1 values( 99 ) -master-bin.000001 27747 Query 1 27837 use `test`; insert into t1 values( 98 ) -master-bin.000001 27837 Query 1 27927 use `test`; insert into t1 values( 97 ) -master-bin.000001 27927 Query 1 28017 use `test`; insert into t1 values( 96 ) -master-bin.000001 28017 Query 1 28107 use `test`; insert into t1 values( 95 ) -master-bin.000001 28107 Query 1 28197 use `test`; insert into t1 values( 94 ) -master-bin.000001 28197 Query 1 28287 use `test`; insert into t1 values( 93 ) -master-bin.000001 28287 Query 1 28377 use `test`; insert into t1 values( 92 ) -master-bin.000001 28377 Query 1 28467 use `test`; insert into t1 values( 91 ) -master-bin.000001 28467 Query 1 28557 use `test`; insert into t1 values( 90 ) -master-bin.000001 28557 Query 1 28647 use `test`; insert into t1 values( 89 ) -master-bin.000001 28647 Query 1 28737 use `test`; insert into t1 values( 88 ) -master-bin.000001 28737 Query 1 28827 use `test`; insert into t1 values( 87 ) -master-bin.000001 28827 Query 1 28917 use `test`; insert into t1 values( 86 ) -master-bin.000001 28917 Query 1 29007 use `test`; insert into t1 values( 85 ) -master-bin.000001 29007 Query 1 29097 use `test`; insert into t1 values( 84 ) -master-bin.000001 29097 Query 1 29187 use `test`; insert into t1 values( 83 ) -master-bin.000001 29187 Query 1 29277 use `test`; insert into t1 values( 82 ) -master-bin.000001 29277 Query 1 29367 use `test`; insert into t1 values( 81 ) -master-bin.000001 29367 Query 1 29457 use `test`; insert into t1 values( 80 ) -master-bin.000001 29457 Query 1 29547 use `test`; insert into t1 values( 79 ) -master-bin.000001 29547 Query 1 29637 use `test`; insert into t1 values( 78 ) -master-bin.000001 29637 Query 1 29727 use `test`; insert into t1 values( 77 ) -master-bin.000001 29727 Query 1 29817 use `test`; insert into t1 values( 76 ) -master-bin.000001 29817 Query 1 29907 use `test`; insert into t1 values( 75 ) -master-bin.000001 29907 Query 1 29997 use `test`; insert into t1 values( 74 ) -master-bin.000001 29997 Query 1 30087 use `test`; insert into t1 values( 73 ) -master-bin.000001 30087 Query 1 30177 use `test`; insert into t1 values( 72 ) -master-bin.000001 30177 Query 1 30267 use `test`; insert into t1 values( 71 ) -master-bin.000001 30267 Query 1 30357 use `test`; insert into t1 values( 70 ) -master-bin.000001 30357 Query 1 30447 use `test`; insert into t1 values( 69 ) -master-bin.000001 30447 Query 1 30537 use `test`; insert into t1 values( 68 ) -master-bin.000001 30537 Query 1 30627 use `test`; insert into t1 values( 67 ) -master-bin.000001 30627 Query 1 30717 use `test`; insert into t1 values( 66 ) -master-bin.000001 30717 Query 1 30807 use `test`; insert into t1 values( 65 ) -master-bin.000001 30807 Query 1 30897 use `test`; insert into t1 values( 64 ) -master-bin.000001 30897 Query 1 30987 use `test`; insert into t1 values( 63 ) -master-bin.000001 30987 Query 1 31077 use `test`; insert into t1 values( 62 ) -master-bin.000001 31077 Query 1 31167 use `test`; insert into t1 values( 61 ) -master-bin.000001 31167 Query 1 31257 use `test`; insert into t1 values( 60 ) -master-bin.000001 31257 Query 1 31347 use `test`; insert into t1 values( 59 ) -master-bin.000001 31347 Query 1 31437 use `test`; insert into t1 values( 58 ) -master-bin.000001 31437 Query 1 31527 use `test`; insert into t1 values( 57 ) -master-bin.000001 31527 Query 1 31617 use `test`; insert into t1 values( 56 ) -master-bin.000001 31617 Query 1 31707 use `test`; insert into t1 values( 55 ) -master-bin.000001 31707 Query 1 31797 use `test`; insert into t1 values( 54 ) -master-bin.000001 31797 Query 1 31887 use `test`; insert into t1 values( 53 ) -master-bin.000001 31887 Query 1 31977 use `test`; insert into t1 values( 52 ) -master-bin.000001 31977 Query 1 32067 use `test`; insert into t1 values( 51 ) -master-bin.000001 32067 Query 1 32157 use `test`; insert into t1 values( 50 ) -master-bin.000001 32157 Query 1 32247 use `test`; insert into t1 values( 49 ) -master-bin.000001 32247 Query 1 32337 use `test`; insert into t1 values( 48 ) -master-bin.000001 32337 Query 1 32427 use `test`; insert into t1 values( 47 ) -master-bin.000001 32427 Query 1 32517 use `test`; insert into t1 values( 46 ) -master-bin.000001 32517 Query 1 32607 use `test`; insert into t1 values( 45 ) -master-bin.000001 32607 Query 1 32697 use `test`; insert into t1 values( 44 ) -master-bin.000001 32697 Query 1 32787 use `test`; insert into t1 values( 43 ) -master-bin.000001 32787 Query 1 32877 use `test`; insert into t1 values( 42 ) -master-bin.000001 32877 Query 1 32967 use `test`; insert into t1 values( 41 ) -master-bin.000001 32967 Query 1 33057 use `test`; insert into t1 values( 40 ) -master-bin.000001 33057 Query 1 33147 use `test`; insert into t1 values( 39 ) -master-bin.000001 33147 Query 1 33237 use `test`; insert into t1 values( 38 ) -master-bin.000001 33237 Query 1 33327 use `test`; insert into t1 values( 37 ) -master-bin.000001 33327 Query 1 33417 use `test`; insert into t1 values( 36 ) -master-bin.000001 33417 Query 1 33507 use `test`; insert into t1 values( 35 ) -master-bin.000001 33507 Query 1 33597 use `test`; insert into t1 values( 34 ) -master-bin.000001 33597 Query 1 33687 use `test`; insert into t1 values( 33 ) -master-bin.000001 33687 Query 1 33777 use `test`; insert into t1 values( 32 ) -master-bin.000001 33777 Query 1 33867 use `test`; insert into t1 values( 31 ) -master-bin.000001 33867 Query 1 33957 use `test`; insert into t1 values( 30 ) -master-bin.000001 33957 Query 1 34047 use `test`; insert into t1 values( 29 ) -master-bin.000001 34047 Query 1 34137 use `test`; insert into t1 values( 28 ) -master-bin.000001 34137 Query 1 34227 use `test`; insert into t1 values( 27 ) -master-bin.000001 34227 Query 1 34317 use `test`; insert into t1 values( 26 ) -master-bin.000001 34317 Query 1 34407 use `test`; insert into t1 values( 25 ) -master-bin.000001 34407 Query 1 34497 use `test`; insert into t1 values( 24 ) -master-bin.000001 34497 Query 1 34587 use `test`; insert into t1 values( 23 ) -master-bin.000001 34587 Query 1 34677 use `test`; insert into t1 values( 22 ) -master-bin.000001 34677 Query 1 34767 use `test`; insert into t1 values( 21 ) -master-bin.000001 34767 Query 1 34857 use `test`; insert into t1 values( 20 ) -master-bin.000001 34857 Query 1 34947 use `test`; insert into t1 values( 19 ) -master-bin.000001 34947 Query 1 35037 use `test`; insert into t1 values( 18 ) -master-bin.000001 35037 Query 1 35127 use `test`; insert into t1 values( 17 ) -master-bin.000001 35127 Query 1 35217 use `test`; insert into t1 values( 16 ) -master-bin.000001 35217 Query 1 35307 use `test`; insert into t1 values( 15 ) -master-bin.000001 35307 Query 1 35397 use `test`; insert into t1 values( 14 ) -master-bin.000001 35397 Query 1 35487 use `test`; insert into t1 values( 13 ) -master-bin.000001 35487 Query 1 35577 use `test`; insert into t1 values( 12 ) -master-bin.000001 35577 Query 1 35667 use `test`; insert into t1 values( 11 ) -master-bin.000001 35667 Query 1 35757 use `test`; insert into t1 values( 10 ) -master-bin.000001 35757 Query 1 35846 use `test`; insert into t1 values( 9 ) -master-bin.000001 35846 Query 1 35935 use `test`; insert into t1 values( 8 ) -master-bin.000001 35935 Query 1 36024 use `test`; insert into t1 values( 7 ) -master-bin.000001 36024 Query 1 36113 use `test`; insert into t1 values( 6 ) -master-bin.000001 36113 Query 1 36202 use `test`; insert into t1 values( 5 ) -master-bin.000001 36202 Query 1 36291 use `test`; insert into t1 values( 4 ) -master-bin.000001 36291 Query 1 36380 use `test`; insert into t1 values( 3 ) -master-bin.000001 36380 Query 1 36469 use `test`; insert into t1 values( 2 ) -master-bin.000001 36469 Query 1 36558 use `test`; insert into t1 values( 1 ) -master-bin.000001 36558 Xid 1 36585 COMMIT /* XID */ -master-bin.000001 36585 Rotate 1 36629 master-bin.000002;pos=4 +master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 +master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb +master-bin.000001 206 Query 1 274 use `test`; BEGIN +master-bin.000001 274 Query 1 365 use `test`; insert into t1 values( 400 ) +master-bin.000001 365 Query 1 456 use `test`; insert into t1 values( 399 ) +master-bin.000001 456 Query 1 547 use `test`; insert into t1 values( 398 ) +master-bin.000001 547 Query 1 638 use `test`; insert into t1 values( 397 ) +master-bin.000001 638 Query 1 729 use `test`; insert into t1 values( 396 ) +master-bin.000001 729 Query 1 820 use `test`; insert into t1 values( 395 ) +master-bin.000001 820 Query 1 911 use `test`; insert into t1 values( 394 ) +master-bin.000001 911 Query 1 1002 use `test`; insert into t1 values( 393 ) +master-bin.000001 1002 Query 1 1093 use `test`; insert into t1 values( 392 ) +master-bin.000001 1093 Query 1 1184 use `test`; insert into t1 values( 391 ) +master-bin.000001 1184 Query 1 1275 use `test`; insert into t1 values( 390 ) +master-bin.000001 1275 Query 1 1366 use `test`; insert into t1 values( 389 ) +master-bin.000001 1366 Query 1 1457 use `test`; insert into t1 values( 388 ) +master-bin.000001 1457 Query 1 1548 use `test`; insert into t1 values( 387 ) +master-bin.000001 1548 Query 1 1639 use `test`; insert into t1 values( 386 ) +master-bin.000001 1639 Query 1 1730 use `test`; insert into t1 values( 385 ) +master-bin.000001 1730 Query 1 1821 use `test`; insert into t1 values( 384 ) +master-bin.000001 1821 Query 1 1912 use `test`; insert into t1 values( 383 ) +master-bin.000001 1912 Query 1 2003 use `test`; insert into t1 values( 382 ) +master-bin.000001 2003 Query 1 2094 use `test`; insert into t1 values( 381 ) +master-bin.000001 2094 Query 1 2185 use `test`; insert into t1 values( 380 ) +master-bin.000001 2185 Query 1 2276 use `test`; insert into t1 values( 379 ) +master-bin.000001 2276 Query 1 2367 use `test`; insert into t1 values( 378 ) +master-bin.000001 2367 Query 1 2458 use `test`; insert into t1 values( 377 ) +master-bin.000001 2458 Query 1 2549 use `test`; insert into t1 values( 376 ) +master-bin.000001 2549 Query 1 2640 use `test`; insert into t1 values( 375 ) +master-bin.000001 2640 Query 1 2731 use `test`; insert into t1 values( 374 ) +master-bin.000001 2731 Query 1 2822 use `test`; insert into t1 values( 373 ) +master-bin.000001 2822 Query 1 2913 use `test`; insert into t1 values( 372 ) +master-bin.000001 2913 Query 1 3004 use `test`; insert into t1 values( 371 ) +master-bin.000001 3004 Query 1 3095 use `test`; insert into t1 values( 370 ) +master-bin.000001 3095 Query 1 3186 use `test`; insert into t1 values( 369 ) +master-bin.000001 3186 Query 1 3277 use `test`; insert into t1 values( 368 ) +master-bin.000001 3277 Query 1 3368 use `test`; insert into t1 values( 367 ) +master-bin.000001 3368 Query 1 3459 use `test`; insert into t1 values( 366 ) +master-bin.000001 3459 Query 1 3550 use `test`; insert into t1 values( 365 ) +master-bin.000001 3550 Query 1 3641 use `test`; insert into t1 values( 364 ) +master-bin.000001 3641 Query 1 3732 use `test`; insert into t1 values( 363 ) +master-bin.000001 3732 Query 1 3823 use `test`; insert into t1 values( 362 ) +master-bin.000001 3823 Query 1 3914 use `test`; insert into t1 values( 361 ) +master-bin.000001 3914 Query 1 4005 use `test`; insert into t1 values( 360 ) +master-bin.000001 4005 Query 1 4096 use `test`; insert into t1 values( 359 ) +master-bin.000001 4096 Query 1 4187 use `test`; insert into t1 values( 358 ) +master-bin.000001 4187 Query 1 4278 use `test`; insert into t1 values( 357 ) +master-bin.000001 4278 Query 1 4369 use `test`; insert into t1 values( 356 ) +master-bin.000001 4369 Query 1 4460 use `test`; insert into t1 values( 355 ) +master-bin.000001 4460 Query 1 4551 use `test`; insert into t1 values( 354 ) +master-bin.000001 4551 Query 1 4642 use `test`; insert into t1 values( 353 ) +master-bin.000001 4642 Query 1 4733 use `test`; insert into t1 values( 352 ) +master-bin.000001 4733 Query 1 4824 use `test`; insert into t1 values( 351 ) +master-bin.000001 4824 Query 1 4915 use `test`; insert into t1 values( 350 ) +master-bin.000001 4915 Query 1 5006 use `test`; insert into t1 values( 349 ) +master-bin.000001 5006 Query 1 5097 use `test`; insert into t1 values( 348 ) +master-bin.000001 5097 Query 1 5188 use `test`; insert into t1 values( 347 ) +master-bin.000001 5188 Query 1 5279 use `test`; insert into t1 values( 346 ) +master-bin.000001 5279 Query 1 5370 use `test`; insert into t1 values( 345 ) +master-bin.000001 5370 Query 1 5461 use `test`; insert into t1 values( 344 ) +master-bin.000001 5461 Query 1 5552 use `test`; insert into t1 values( 343 ) +master-bin.000001 5552 Query 1 5643 use `test`; insert into t1 values( 342 ) +master-bin.000001 5643 Query 1 5734 use `test`; insert into t1 values( 341 ) +master-bin.000001 5734 Query 1 5825 use `test`; insert into t1 values( 340 ) +master-bin.000001 5825 Query 1 5916 use `test`; insert into t1 values( 339 ) +master-bin.000001 5916 Query 1 6007 use `test`; insert into t1 values( 338 ) +master-bin.000001 6007 Query 1 6098 use `test`; insert into t1 values( 337 ) +master-bin.000001 6098 Query 1 6189 use `test`; insert into t1 values( 336 ) +master-bin.000001 6189 Query 1 6280 use `test`; insert into t1 values( 335 ) +master-bin.000001 6280 Query 1 6371 use `test`; insert into t1 values( 334 ) +master-bin.000001 6371 Query 1 6462 use `test`; insert into t1 values( 333 ) +master-bin.000001 6462 Query 1 6553 use `test`; insert into t1 values( 332 ) +master-bin.000001 6553 Query 1 6644 use `test`; insert into t1 values( 331 ) +master-bin.000001 6644 Query 1 6735 use `test`; insert into t1 values( 330 ) +master-bin.000001 6735 Query 1 6826 use `test`; insert into t1 values( 329 ) +master-bin.000001 6826 Query 1 6917 use `test`; insert into t1 values( 328 ) +master-bin.000001 6917 Query 1 7008 use `test`; insert into t1 values( 327 ) +master-bin.000001 7008 Query 1 7099 use `test`; insert into t1 values( 326 ) +master-bin.000001 7099 Query 1 7190 use `test`; insert into t1 values( 325 ) +master-bin.000001 7190 Query 1 7281 use `test`; insert into t1 values( 324 ) +master-bin.000001 7281 Query 1 7372 use `test`; insert into t1 values( 323 ) +master-bin.000001 7372 Query 1 7463 use `test`; insert into t1 values( 322 ) +master-bin.000001 7463 Query 1 7554 use `test`; insert into t1 values( 321 ) +master-bin.000001 7554 Query 1 7645 use `test`; insert into t1 values( 320 ) +master-bin.000001 7645 Query 1 7736 use `test`; insert into t1 values( 319 ) +master-bin.000001 7736 Query 1 7827 use `test`; insert into t1 values( 318 ) +master-bin.000001 7827 Query 1 7918 use `test`; insert into t1 values( 317 ) +master-bin.000001 7918 Query 1 8009 use `test`; insert into t1 values( 316 ) +master-bin.000001 8009 Query 1 8100 use `test`; insert into t1 values( 315 ) +master-bin.000001 8100 Query 1 8191 use `test`; insert into t1 values( 314 ) +master-bin.000001 8191 Query 1 8282 use `test`; insert into t1 values( 313 ) +master-bin.000001 8282 Query 1 8373 use `test`; insert into t1 values( 312 ) +master-bin.000001 8373 Query 1 8464 use `test`; insert into t1 values( 311 ) +master-bin.000001 8464 Query 1 8555 use `test`; insert into t1 values( 310 ) +master-bin.000001 8555 Query 1 8646 use `test`; insert into t1 values( 309 ) +master-bin.000001 8646 Query 1 8737 use `test`; insert into t1 values( 308 ) +master-bin.000001 8737 Query 1 8828 use `test`; insert into t1 values( 307 ) +master-bin.000001 8828 Query 1 8919 use `test`; insert into t1 values( 306 ) +master-bin.000001 8919 Query 1 9010 use `test`; insert into t1 values( 305 ) +master-bin.000001 9010 Query 1 9101 use `test`; insert into t1 values( 304 ) +master-bin.000001 9101 Query 1 9192 use `test`; insert into t1 values( 303 ) +master-bin.000001 9192 Query 1 9283 use `test`; insert into t1 values( 302 ) +master-bin.000001 9283 Query 1 9374 use `test`; insert into t1 values( 301 ) +master-bin.000001 9374 Query 1 9465 use `test`; insert into t1 values( 300 ) +master-bin.000001 9465 Query 1 9556 use `test`; insert into t1 values( 299 ) +master-bin.000001 9556 Query 1 9647 use `test`; insert into t1 values( 298 ) +master-bin.000001 9647 Query 1 9738 use `test`; insert into t1 values( 297 ) +master-bin.000001 9738 Query 1 9829 use `test`; insert into t1 values( 296 ) +master-bin.000001 9829 Query 1 9920 use `test`; insert into t1 values( 295 ) +master-bin.000001 9920 Query 1 10011 use `test`; insert into t1 values( 294 ) +master-bin.000001 10011 Query 1 10102 use `test`; insert into t1 values( 293 ) +master-bin.000001 10102 Query 1 10193 use `test`; insert into t1 values( 292 ) +master-bin.000001 10193 Query 1 10284 use `test`; insert into t1 values( 291 ) +master-bin.000001 10284 Query 1 10375 use `test`; insert into t1 values( 290 ) +master-bin.000001 10375 Query 1 10466 use `test`; insert into t1 values( 289 ) +master-bin.000001 10466 Query 1 10557 use `test`; insert into t1 values( 288 ) +master-bin.000001 10557 Query 1 10648 use `test`; insert into t1 values( 287 ) +master-bin.000001 10648 Query 1 10739 use `test`; insert into t1 values( 286 ) +master-bin.000001 10739 Query 1 10830 use `test`; insert into t1 values( 285 ) +master-bin.000001 10830 Query 1 10921 use `test`; insert into t1 values( 284 ) +master-bin.000001 10921 Query 1 11012 use `test`; insert into t1 values( 283 ) +master-bin.000001 11012 Query 1 11103 use `test`; insert into t1 values( 282 ) +master-bin.000001 11103 Query 1 11194 use `test`; insert into t1 values( 281 ) +master-bin.000001 11194 Query 1 11285 use `test`; insert into t1 values( 280 ) +master-bin.000001 11285 Query 1 11376 use `test`; insert into t1 values( 279 ) +master-bin.000001 11376 Query 1 11467 use `test`; insert into t1 values( 278 ) +master-bin.000001 11467 Query 1 11558 use `test`; insert into t1 values( 277 ) +master-bin.000001 11558 Query 1 11649 use `test`; insert into t1 values( 276 ) +master-bin.000001 11649 Query 1 11740 use `test`; insert into t1 values( 275 ) +master-bin.000001 11740 Query 1 11831 use `test`; insert into t1 values( 274 ) +master-bin.000001 11831 Query 1 11922 use `test`; insert into t1 values( 273 ) +master-bin.000001 11922 Query 1 12013 use `test`; insert into t1 values( 272 ) +master-bin.000001 12013 Query 1 12104 use `test`; insert into t1 values( 271 ) +master-bin.000001 12104 Query 1 12195 use `test`; insert into t1 values( 270 ) +master-bin.000001 12195 Query 1 12286 use `test`; insert into t1 values( 269 ) +master-bin.000001 12286 Query 1 12377 use `test`; insert into t1 values( 268 ) +master-bin.000001 12377 Query 1 12468 use `test`; insert into t1 values( 267 ) +master-bin.000001 12468 Query 1 12559 use `test`; insert into t1 values( 266 ) +master-bin.000001 12559 Query 1 12650 use `test`; insert into t1 values( 265 ) +master-bin.000001 12650 Query 1 12741 use `test`; insert into t1 values( 264 ) +master-bin.000001 12741 Query 1 12832 use `test`; insert into t1 values( 263 ) +master-bin.000001 12832 Query 1 12923 use `test`; insert into t1 values( 262 ) +master-bin.000001 12923 Query 1 13014 use `test`; insert into t1 values( 261 ) +master-bin.000001 13014 Query 1 13105 use `test`; insert into t1 values( 260 ) +master-bin.000001 13105 Query 1 13196 use `test`; insert into t1 values( 259 ) +master-bin.000001 13196 Query 1 13287 use `test`; insert into t1 values( 258 ) +master-bin.000001 13287 Query 1 13378 use `test`; insert into t1 values( 257 ) +master-bin.000001 13378 Query 1 13469 use `test`; insert into t1 values( 256 ) +master-bin.000001 13469 Query 1 13560 use `test`; insert into t1 values( 255 ) +master-bin.000001 13560 Query 1 13651 use `test`; insert into t1 values( 254 ) +master-bin.000001 13651 Query 1 13742 use `test`; insert into t1 values( 253 ) +master-bin.000001 13742 Query 1 13833 use `test`; insert into t1 values( 252 ) +master-bin.000001 13833 Query 1 13924 use `test`; insert into t1 values( 251 ) +master-bin.000001 13924 Query 1 14015 use `test`; insert into t1 values( 250 ) +master-bin.000001 14015 Query 1 14106 use `test`; insert into t1 values( 249 ) +master-bin.000001 14106 Query 1 14197 use `test`; insert into t1 values( 248 ) +master-bin.000001 14197 Query 1 14288 use `test`; insert into t1 values( 247 ) +master-bin.000001 14288 Query 1 14379 use `test`; insert into t1 values( 246 ) +master-bin.000001 14379 Query 1 14470 use `test`; insert into t1 values( 245 ) +master-bin.000001 14470 Query 1 14561 use `test`; insert into t1 values( 244 ) +master-bin.000001 14561 Query 1 14652 use `test`; insert into t1 values( 243 ) +master-bin.000001 14652 Query 1 14743 use `test`; insert into t1 values( 242 ) +master-bin.000001 14743 Query 1 14834 use `test`; insert into t1 values( 241 ) +master-bin.000001 14834 Query 1 14925 use `test`; insert into t1 values( 240 ) +master-bin.000001 14925 Query 1 15016 use `test`; insert into t1 values( 239 ) +master-bin.000001 15016 Query 1 15107 use `test`; insert into t1 values( 238 ) +master-bin.000001 15107 Query 1 15198 use `test`; insert into t1 values( 237 ) +master-bin.000001 15198 Query 1 15289 use `test`; insert into t1 values( 236 ) +master-bin.000001 15289 Query 1 15380 use `test`; insert into t1 values( 235 ) +master-bin.000001 15380 Query 1 15471 use `test`; insert into t1 values( 234 ) +master-bin.000001 15471 Query 1 15562 use `test`; insert into t1 values( 233 ) +master-bin.000001 15562 Query 1 15653 use `test`; insert into t1 values( 232 ) +master-bin.000001 15653 Query 1 15744 use `test`; insert into t1 values( 231 ) +master-bin.000001 15744 Query 1 15835 use `test`; insert into t1 values( 230 ) +master-bin.000001 15835 Query 1 15926 use `test`; insert into t1 values( 229 ) +master-bin.000001 15926 Query 1 16017 use `test`; insert into t1 values( 228 ) +master-bin.000001 16017 Query 1 16108 use `test`; insert into t1 values( 227 ) +master-bin.000001 16108 Query 1 16199 use `test`; insert into t1 values( 226 ) +master-bin.000001 16199 Query 1 16290 use `test`; insert into t1 values( 225 ) +master-bin.000001 16290 Query 1 16381 use `test`; insert into t1 values( 224 ) +master-bin.000001 16381 Query 1 16472 use `test`; insert into t1 values( 223 ) +master-bin.000001 16472 Query 1 16563 use `test`; insert into t1 values( 222 ) +master-bin.000001 16563 Query 1 16654 use `test`; insert into t1 values( 221 ) +master-bin.000001 16654 Query 1 16745 use `test`; insert into t1 values( 220 ) +master-bin.000001 16745 Query 1 16836 use `test`; insert into t1 values( 219 ) +master-bin.000001 16836 Query 1 16927 use `test`; insert into t1 values( 218 ) +master-bin.000001 16927 Query 1 17018 use `test`; insert into t1 values( 217 ) +master-bin.000001 17018 Query 1 17109 use `test`; insert into t1 values( 216 ) +master-bin.000001 17109 Query 1 17200 use `test`; insert into t1 values( 215 ) +master-bin.000001 17200 Query 1 17291 use `test`; insert into t1 values( 214 ) +master-bin.000001 17291 Query 1 17382 use `test`; insert into t1 values( 213 ) +master-bin.000001 17382 Query 1 17473 use `test`; insert into t1 values( 212 ) +master-bin.000001 17473 Query 1 17564 use `test`; insert into t1 values( 211 ) +master-bin.000001 17564 Query 1 17655 use `test`; insert into t1 values( 210 ) +master-bin.000001 17655 Query 1 17746 use `test`; insert into t1 values( 209 ) +master-bin.000001 17746 Query 1 17837 use `test`; insert into t1 values( 208 ) +master-bin.000001 17837 Query 1 17928 use `test`; insert into t1 values( 207 ) +master-bin.000001 17928 Query 1 18019 use `test`; insert into t1 values( 206 ) +master-bin.000001 18019 Query 1 18110 use `test`; insert into t1 values( 205 ) +master-bin.000001 18110 Query 1 18201 use `test`; insert into t1 values( 204 ) +master-bin.000001 18201 Query 1 18292 use `test`; insert into t1 values( 203 ) +master-bin.000001 18292 Query 1 18383 use `test`; insert into t1 values( 202 ) +master-bin.000001 18383 Query 1 18474 use `test`; insert into t1 values( 201 ) +master-bin.000001 18474 Query 1 18565 use `test`; insert into t1 values( 200 ) +master-bin.000001 18565 Query 1 18656 use `test`; insert into t1 values( 199 ) +master-bin.000001 18656 Query 1 18747 use `test`; insert into t1 values( 198 ) +master-bin.000001 18747 Query 1 18838 use `test`; insert into t1 values( 197 ) +master-bin.000001 18838 Query 1 18929 use `test`; insert into t1 values( 196 ) +master-bin.000001 18929 Query 1 19020 use `test`; insert into t1 values( 195 ) +master-bin.000001 19020 Query 1 19111 use `test`; insert into t1 values( 194 ) +master-bin.000001 19111 Query 1 19202 use `test`; insert into t1 values( 193 ) +master-bin.000001 19202 Query 1 19293 use `test`; insert into t1 values( 192 ) +master-bin.000001 19293 Query 1 19384 use `test`; insert into t1 values( 191 ) +master-bin.000001 19384 Query 1 19475 use `test`; insert into t1 values( 190 ) +master-bin.000001 19475 Query 1 19566 use `test`; insert into t1 values( 189 ) +master-bin.000001 19566 Query 1 19657 use `test`; insert into t1 values( 188 ) +master-bin.000001 19657 Query 1 19748 use `test`; insert into t1 values( 187 ) +master-bin.000001 19748 Query 1 19839 use `test`; insert into t1 values( 186 ) +master-bin.000001 19839 Query 1 19930 use `test`; insert into t1 values( 185 ) +master-bin.000001 19930 Query 1 20021 use `test`; insert into t1 values( 184 ) +master-bin.000001 20021 Query 1 20112 use `test`; insert into t1 values( 183 ) +master-bin.000001 20112 Query 1 20203 use `test`; insert into t1 values( 182 ) +master-bin.000001 20203 Query 1 20294 use `test`; insert into t1 values( 181 ) +master-bin.000001 20294 Query 1 20385 use `test`; insert into t1 values( 180 ) +master-bin.000001 20385 Query 1 20476 use `test`; insert into t1 values( 179 ) +master-bin.000001 20476 Query 1 20567 use `test`; insert into t1 values( 178 ) +master-bin.000001 20567 Query 1 20658 use `test`; insert into t1 values( 177 ) +master-bin.000001 20658 Query 1 20749 use `test`; insert into t1 values( 176 ) +master-bin.000001 20749 Query 1 20840 use `test`; insert into t1 values( 175 ) +master-bin.000001 20840 Query 1 20931 use `test`; insert into t1 values( 174 ) +master-bin.000001 20931 Query 1 21022 use `test`; insert into t1 values( 173 ) +master-bin.000001 21022 Query 1 21113 use `test`; insert into t1 values( 172 ) +master-bin.000001 21113 Query 1 21204 use `test`; insert into t1 values( 171 ) +master-bin.000001 21204 Query 1 21295 use `test`; insert into t1 values( 170 ) +master-bin.000001 21295 Query 1 21386 use `test`; insert into t1 values( 169 ) +master-bin.000001 21386 Query 1 21477 use `test`; insert into t1 values( 168 ) +master-bin.000001 21477 Query 1 21568 use `test`; insert into t1 values( 167 ) +master-bin.000001 21568 Query 1 21659 use `test`; insert into t1 values( 166 ) +master-bin.000001 21659 Query 1 21750 use `test`; insert into t1 values( 165 ) +master-bin.000001 21750 Query 1 21841 use `test`; insert into t1 values( 164 ) +master-bin.000001 21841 Query 1 21932 use `test`; insert into t1 values( 163 ) +master-bin.000001 21932 Query 1 22023 use `test`; insert into t1 values( 162 ) +master-bin.000001 22023 Query 1 22114 use `test`; insert into t1 values( 161 ) +master-bin.000001 22114 Query 1 22205 use `test`; insert into t1 values( 160 ) +master-bin.000001 22205 Query 1 22296 use `test`; insert into t1 values( 159 ) +master-bin.000001 22296 Query 1 22387 use `test`; insert into t1 values( 158 ) +master-bin.000001 22387 Query 1 22478 use `test`; insert into t1 values( 157 ) +master-bin.000001 22478 Query 1 22569 use `test`; insert into t1 values( 156 ) +master-bin.000001 22569 Query 1 22660 use `test`; insert into t1 values( 155 ) +master-bin.000001 22660 Query 1 22751 use `test`; insert into t1 values( 154 ) +master-bin.000001 22751 Query 1 22842 use `test`; insert into t1 values( 153 ) +master-bin.000001 22842 Query 1 22933 use `test`; insert into t1 values( 152 ) +master-bin.000001 22933 Query 1 23024 use `test`; insert into t1 values( 151 ) +master-bin.000001 23024 Query 1 23115 use `test`; insert into t1 values( 150 ) +master-bin.000001 23115 Query 1 23206 use `test`; insert into t1 values( 149 ) +master-bin.000001 23206 Query 1 23297 use `test`; insert into t1 values( 148 ) +master-bin.000001 23297 Query 1 23388 use `test`; insert into t1 values( 147 ) +master-bin.000001 23388 Query 1 23479 use `test`; insert into t1 values( 146 ) +master-bin.000001 23479 Query 1 23570 use `test`; insert into t1 values( 145 ) +master-bin.000001 23570 Query 1 23661 use `test`; insert into t1 values( 144 ) +master-bin.000001 23661 Query 1 23752 use `test`; insert into t1 values( 143 ) +master-bin.000001 23752 Query 1 23843 use `test`; insert into t1 values( 142 ) +master-bin.000001 23843 Query 1 23934 use `test`; insert into t1 values( 141 ) +master-bin.000001 23934 Query 1 24025 use `test`; insert into t1 values( 140 ) +master-bin.000001 24025 Query 1 24116 use `test`; insert into t1 values( 139 ) +master-bin.000001 24116 Query 1 24207 use `test`; insert into t1 values( 138 ) +master-bin.000001 24207 Query 1 24298 use `test`; insert into t1 values( 137 ) +master-bin.000001 24298 Query 1 24389 use `test`; insert into t1 values( 136 ) +master-bin.000001 24389 Query 1 24480 use `test`; insert into t1 values( 135 ) +master-bin.000001 24480 Query 1 24571 use `test`; insert into t1 values( 134 ) +master-bin.000001 24571 Query 1 24662 use `test`; insert into t1 values( 133 ) +master-bin.000001 24662 Query 1 24753 use `test`; insert into t1 values( 132 ) +master-bin.000001 24753 Query 1 24844 use `test`; insert into t1 values( 131 ) +master-bin.000001 24844 Query 1 24935 use `test`; insert into t1 values( 130 ) +master-bin.000001 24935 Query 1 25026 use `test`; insert into t1 values( 129 ) +master-bin.000001 25026 Query 1 25117 use `test`; insert into t1 values( 128 ) +master-bin.000001 25117 Query 1 25208 use `test`; insert into t1 values( 127 ) +master-bin.000001 25208 Query 1 25299 use `test`; insert into t1 values( 126 ) +master-bin.000001 25299 Query 1 25390 use `test`; insert into t1 values( 125 ) +master-bin.000001 25390 Query 1 25481 use `test`; insert into t1 values( 124 ) +master-bin.000001 25481 Query 1 25572 use `test`; insert into t1 values( 123 ) +master-bin.000001 25572 Query 1 25663 use `test`; insert into t1 values( 122 ) +master-bin.000001 25663 Query 1 25754 use `test`; insert into t1 values( 121 ) +master-bin.000001 25754 Query 1 25845 use `test`; insert into t1 values( 120 ) +master-bin.000001 25845 Query 1 25936 use `test`; insert into t1 values( 119 ) +master-bin.000001 25936 Query 1 26027 use `test`; insert into t1 values( 118 ) +master-bin.000001 26027 Query 1 26118 use `test`; insert into t1 values( 117 ) +master-bin.000001 26118 Query 1 26209 use `test`; insert into t1 values( 116 ) +master-bin.000001 26209 Query 1 26300 use `test`; insert into t1 values( 115 ) +master-bin.000001 26300 Query 1 26391 use `test`; insert into t1 values( 114 ) +master-bin.000001 26391 Query 1 26482 use `test`; insert into t1 values( 113 ) +master-bin.000001 26482 Query 1 26573 use `test`; insert into t1 values( 112 ) +master-bin.000001 26573 Query 1 26664 use `test`; insert into t1 values( 111 ) +master-bin.000001 26664 Query 1 26755 use `test`; insert into t1 values( 110 ) +master-bin.000001 26755 Query 1 26846 use `test`; insert into t1 values( 109 ) +master-bin.000001 26846 Query 1 26937 use `test`; insert into t1 values( 108 ) +master-bin.000001 26937 Query 1 27028 use `test`; insert into t1 values( 107 ) +master-bin.000001 27028 Query 1 27119 use `test`; insert into t1 values( 106 ) +master-bin.000001 27119 Query 1 27210 use `test`; insert into t1 values( 105 ) +master-bin.000001 27210 Query 1 27301 use `test`; insert into t1 values( 104 ) +master-bin.000001 27301 Query 1 27392 use `test`; insert into t1 values( 103 ) +master-bin.000001 27392 Query 1 27483 use `test`; insert into t1 values( 102 ) +master-bin.000001 27483 Query 1 27574 use `test`; insert into t1 values( 101 ) +master-bin.000001 27574 Query 1 27665 use `test`; insert into t1 values( 100 ) +master-bin.000001 27665 Query 1 27755 use `test`; insert into t1 values( 99 ) +master-bin.000001 27755 Query 1 27845 use `test`; insert into t1 values( 98 ) +master-bin.000001 27845 Query 1 27935 use `test`; insert into t1 values( 97 ) +master-bin.000001 27935 Query 1 28025 use `test`; insert into t1 values( 96 ) +master-bin.000001 28025 Query 1 28115 use `test`; insert into t1 values( 95 ) +master-bin.000001 28115 Query 1 28205 use `test`; insert into t1 values( 94 ) +master-bin.000001 28205 Query 1 28295 use `test`; insert into t1 values( 93 ) +master-bin.000001 28295 Query 1 28385 use `test`; insert into t1 values( 92 ) +master-bin.000001 28385 Query 1 28475 use `test`; insert into t1 values( 91 ) +master-bin.000001 28475 Query 1 28565 use `test`; insert into t1 values( 90 ) +master-bin.000001 28565 Query 1 28655 use `test`; insert into t1 values( 89 ) +master-bin.000001 28655 Query 1 28745 use `test`; insert into t1 values( 88 ) +master-bin.000001 28745 Query 1 28835 use `test`; insert into t1 values( 87 ) +master-bin.000001 28835 Query 1 28925 use `test`; insert into t1 values( 86 ) +master-bin.000001 28925 Query 1 29015 use `test`; insert into t1 values( 85 ) +master-bin.000001 29015 Query 1 29105 use `test`; insert into t1 values( 84 ) +master-bin.000001 29105 Query 1 29195 use `test`; insert into t1 values( 83 ) +master-bin.000001 29195 Query 1 29285 use `test`; insert into t1 values( 82 ) +master-bin.000001 29285 Query 1 29375 use `test`; insert into t1 values( 81 ) +master-bin.000001 29375 Query 1 29465 use `test`; insert into t1 values( 80 ) +master-bin.000001 29465 Query 1 29555 use `test`; insert into t1 values( 79 ) +master-bin.000001 29555 Query 1 29645 use `test`; insert into t1 values( 78 ) +master-bin.000001 29645 Query 1 29735 use `test`; insert into t1 values( 77 ) +master-bin.000001 29735 Query 1 29825 use `test`; insert into t1 values( 76 ) +master-bin.000001 29825 Query 1 29915 use `test`; insert into t1 values( 75 ) +master-bin.000001 29915 Query 1 30005 use `test`; insert into t1 values( 74 ) +master-bin.000001 30005 Query 1 30095 use `test`; insert into t1 values( 73 ) +master-bin.000001 30095 Query 1 30185 use `test`; insert into t1 values( 72 ) +master-bin.000001 30185 Query 1 30275 use `test`; insert into t1 values( 71 ) +master-bin.000001 30275 Query 1 30365 use `test`; insert into t1 values( 70 ) +master-bin.000001 30365 Query 1 30455 use `test`; insert into t1 values( 69 ) +master-bin.000001 30455 Query 1 30545 use `test`; insert into t1 values( 68 ) +master-bin.000001 30545 Query 1 30635 use `test`; insert into t1 values( 67 ) +master-bin.000001 30635 Query 1 30725 use `test`; insert into t1 values( 66 ) +master-bin.000001 30725 Query 1 30815 use `test`; insert into t1 values( 65 ) +master-bin.000001 30815 Query 1 30905 use `test`; insert into t1 values( 64 ) +master-bin.000001 30905 Query 1 30995 use `test`; insert into t1 values( 63 ) +master-bin.000001 30995 Query 1 31085 use `test`; insert into t1 values( 62 ) +master-bin.000001 31085 Query 1 31175 use `test`; insert into t1 values( 61 ) +master-bin.000001 31175 Query 1 31265 use `test`; insert into t1 values( 60 ) +master-bin.000001 31265 Query 1 31355 use `test`; insert into t1 values( 59 ) +master-bin.000001 31355 Query 1 31445 use `test`; insert into t1 values( 58 ) +master-bin.000001 31445 Query 1 31535 use `test`; insert into t1 values( 57 ) +master-bin.000001 31535 Query 1 31625 use `test`; insert into t1 values( 56 ) +master-bin.000001 31625 Query 1 31715 use `test`; insert into t1 values( 55 ) +master-bin.000001 31715 Query 1 31805 use `test`; insert into t1 values( 54 ) +master-bin.000001 31805 Query 1 31895 use `test`; insert into t1 values( 53 ) +master-bin.000001 31895 Query 1 31985 use `test`; insert into t1 values( 52 ) +master-bin.000001 31985 Query 1 32075 use `test`; insert into t1 values( 51 ) +master-bin.000001 32075 Query 1 32165 use `test`; insert into t1 values( 50 ) +master-bin.000001 32165 Query 1 32255 use `test`; insert into t1 values( 49 ) +master-bin.000001 32255 Query 1 32345 use `test`; insert into t1 values( 48 ) +master-bin.000001 32345 Query 1 32435 use `test`; insert into t1 values( 47 ) +master-bin.000001 32435 Query 1 32525 use `test`; insert into t1 values( 46 ) +master-bin.000001 32525 Query 1 32615 use `test`; insert into t1 values( 45 ) +master-bin.000001 32615 Query 1 32705 use `test`; insert into t1 values( 44 ) +master-bin.000001 32705 Query 1 32795 use `test`; insert into t1 values( 43 ) +master-bin.000001 32795 Query 1 32885 use `test`; insert into t1 values( 42 ) +master-bin.000001 32885 Query 1 32975 use `test`; insert into t1 values( 41 ) +master-bin.000001 32975 Query 1 33065 use `test`; insert into t1 values( 40 ) +master-bin.000001 33065 Query 1 33155 use `test`; insert into t1 values( 39 ) +master-bin.000001 33155 Query 1 33245 use `test`; insert into t1 values( 38 ) +master-bin.000001 33245 Query 1 33335 use `test`; insert into t1 values( 37 ) +master-bin.000001 33335 Query 1 33425 use `test`; insert into t1 values( 36 ) +master-bin.000001 33425 Query 1 33515 use `test`; insert into t1 values( 35 ) +master-bin.000001 33515 Query 1 33605 use `test`; insert into t1 values( 34 ) +master-bin.000001 33605 Query 1 33695 use `test`; insert into t1 values( 33 ) +master-bin.000001 33695 Query 1 33785 use `test`; insert into t1 values( 32 ) +master-bin.000001 33785 Query 1 33875 use `test`; insert into t1 values( 31 ) +master-bin.000001 33875 Query 1 33965 use `test`; insert into t1 values( 30 ) +master-bin.000001 33965 Query 1 34055 use `test`; insert into t1 values( 29 ) +master-bin.000001 34055 Query 1 34145 use `test`; insert into t1 values( 28 ) +master-bin.000001 34145 Query 1 34235 use `test`; insert into t1 values( 27 ) +master-bin.000001 34235 Query 1 34325 use `test`; insert into t1 values( 26 ) +master-bin.000001 34325 Query 1 34415 use `test`; insert into t1 values( 25 ) +master-bin.000001 34415 Query 1 34505 use `test`; insert into t1 values( 24 ) +master-bin.000001 34505 Query 1 34595 use `test`; insert into t1 values( 23 ) +master-bin.000001 34595 Query 1 34685 use `test`; insert into t1 values( 22 ) +master-bin.000001 34685 Query 1 34775 use `test`; insert into t1 values( 21 ) +master-bin.000001 34775 Query 1 34865 use `test`; insert into t1 values( 20 ) +master-bin.000001 34865 Query 1 34955 use `test`; insert into t1 values( 19 ) +master-bin.000001 34955 Query 1 35045 use `test`; insert into t1 values( 18 ) +master-bin.000001 35045 Query 1 35135 use `test`; insert into t1 values( 17 ) +master-bin.000001 35135 Query 1 35225 use `test`; insert into t1 values( 16 ) +master-bin.000001 35225 Query 1 35315 use `test`; insert into t1 values( 15 ) +master-bin.000001 35315 Query 1 35405 use `test`; insert into t1 values( 14 ) +master-bin.000001 35405 Query 1 35495 use `test`; insert into t1 values( 13 ) +master-bin.000001 35495 Query 1 35585 use `test`; insert into t1 values( 12 ) +master-bin.000001 35585 Query 1 35675 use `test`; insert into t1 values( 11 ) +master-bin.000001 35675 Query 1 35765 use `test`; insert into t1 values( 10 ) +master-bin.000001 35765 Query 1 35854 use `test`; insert into t1 values( 9 ) +master-bin.000001 35854 Query 1 35943 use `test`; insert into t1 values( 8 ) +master-bin.000001 35943 Query 1 36032 use `test`; insert into t1 values( 7 ) +master-bin.000001 36032 Query 1 36121 use `test`; insert into t1 values( 6 ) +master-bin.000001 36121 Query 1 36210 use `test`; insert into t1 values( 5 ) +master-bin.000001 36210 Query 1 36299 use `test`; insert into t1 values( 4 ) +master-bin.000001 36299 Query 1 36388 use `test`; insert into t1 values( 3 ) +master-bin.000001 36388 Query 1 36477 use `test`; insert into t1 values( 2 ) +master-bin.000001 36477 Query 1 36566 use `test`; insert into t1 values( 1 ) +master-bin.000001 36566 Xid 1 36593 COMMIT /* XID */ +master-bin.000001 36593 Rotate 1 36637 master-bin.000002;pos=4 drop table t1; set global binlog_cache_size=@bcs; set session autocommit = @ac; -- cgit v1.2.1 From b7af4c5b25e8ae6768a35b5ddf296d41642f6785 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Jul 2007 04:33:19 +0200 Subject: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB Streamlining test for RBR --- mysql-test/suite/binlog/r/binlog_row_binlog.result | 109 --------------------- 1 file changed, 109 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index 37fe49e79dc..1d1656889f4 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -258,117 +258,8 @@ master-bin.000001 419 Table_map 1 458 table_id: # (test.t1) master-bin.000001 458 Write_rows 1 492 table_id: # flags: STMT_END_F master-bin.000001 492 Xid 1 519 COMMIT /* XID */ master-bin.000001 519 Query 1 595 use `test`; drop table t1 -set autocommit= 1; -reset master; -create table t1(n int) engine=innodb; -insert into t1 values (1); -insert into t1 values (2); -insert into t1 values (3); -commit; -drop table t1; -show binlog events from 0; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 -master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb -master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) -master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F -master-bin.000001 278 Xid 1 305 COMMIT /* XID */ -master-bin.000001 305 Table_map 1 344 table_id: # (test.t1) -master-bin.000001 344 Write_rows 1 378 table_id: # flags: STMT_END_F -master-bin.000001 378 Xid 1 405 COMMIT /* XID */ -master-bin.000001 405 Table_map 1 444 table_id: # (test.t1) -master-bin.000001 444 Write_rows 1 478 table_id: # flags: STMT_END_F -master-bin.000001 478 Xid 1 505 COMMIT /* XID */ -master-bin.000001 505 Query 1 581 use `test`; drop table t1 -reset master; -create table t1(n int) engine=myisam; -begin; -insert into t1 values (4); -insert into t1 values (5); -insert into t1 values (6); -commit; -drop table t1; -show binlog events from 0; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 -master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=myisam -master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) -master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F -master-bin.000001 278 Table_map 1 317 table_id: # (test.t1) -master-bin.000001 317 Write_rows 1 351 table_id: # flags: STMT_END_F -master-bin.000001 351 Table_map 1 390 table_id: # (test.t1) -master-bin.000001 390 Write_rows 1 424 table_id: # flags: STMT_END_F -master-bin.000001 424 Query 1 500 use `test`; drop table t1 -set autocommit= 1; -reset master; -create table t1(n int) engine=innodb; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 205 -insert into t1 values (1); -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 305 -insert into t1 values (2); -insert into t1 values (3); -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 505 -commit; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 505 -drop table t1; -show binlog events from 0; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 -master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb -master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) -master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F -master-bin.000001 278 Xid 1 305 COMMIT /* XID */ -master-bin.000001 305 Table_map 1 344 table_id: # (test.t1) -master-bin.000001 344 Write_rows 1 378 table_id: # flags: STMT_END_F -master-bin.000001 378 Xid 1 405 COMMIT /* XID */ -master-bin.000001 405 Table_map 1 444 table_id: # (test.t1) -master-bin.000001 444 Write_rows 1 478 table_id: # flags: STMT_END_F -master-bin.000001 478 Xid 1 505 COMMIT /* XID */ -master-bin.000001 505 Query 1 581 use `test`; drop table t1 -set autocommit= 0; -reset master; -create table t1(n int) engine=myisam; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 205 -insert into t1 values (4); -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 278 -insert into t1 values (5); -insert into t1 values (6); -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 424 -commit; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 424 -drop table t1; -show binlog events from 0; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 -master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=myisam -master-bin.000001 205 Table_map 1 244 table_id: # (test.t1) -master-bin.000001 244 Write_rows 1 278 table_id: # flags: STMT_END_F -master-bin.000001 278 Table_map 1 317 table_id: # (test.t1) -master-bin.000001 317 Write_rows 1 351 table_id: # flags: STMT_END_F -master-bin.000001 351 Table_map 1 390 table_id: # (test.t1) -master-bin.000001 390 Write_rows 1 424 table_id: # flags: STMT_END_F -master-bin.000001 424 Query 1 500 use `test`; drop table t1 -set session autocommit = @ac; set @bcs = @@binlog_cache_size; -set @ac = @@autocommit; set global binlog_cache_size=4096; -set autocommit= 0; reset master; create table t1 (a int) engine=innodb; show binlog events from 0; -- cgit v1.2.1 From 1abab6c7c7461bac95afd424e80b9a953fdf897b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Jul 2007 10:49:54 +0300 Subject: Bug #29325: By default MyISAM overwrites .MYD and .MYI files no DATA DIRECTORY option is used. This can lead to two tables using the same .MYD and .MYI files (that can't be dropped). To prevent CREATE TABLE from overwriting a file a new option is introduced : keep_files_on_create When this is on the CREATE TABLE throws an error if either the .MYD or .MYI exists for a MyISAM table. The option is off by default (resulting in compatible behavior). include/my_base.h: Bug #29325: introduce keep_files_on_create myisam/mi_create.c: Bug #29325: introduce keep_files_on_create mysql-test/r/create.result: Bug #29325: test case mysql-test/t/create.test: Bug #29325: test case sql/ha_myisam.cc: Bug #29325: introduce keep_files_on_create sql/set_var.cc: Bug #29325: introduce keep_files_on_create sql/sql_class.h: Bug #29325: introduce keep_files_on_create sql/sql_table.cc: Bug #29325: introduce keep_files_on_create sql/unireg.cc: Bug #29325: introduce keep_files_on_create --- mysql-test/r/create.result | 17 +++++++++++++++++ mysql-test/t/create.test | 31 +++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index e692dbf3938..16bc534ba92 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1503,4 +1503,21 @@ t1 CREATE TABLE `t1` ( `c17` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +CREATE DATABASE db1; +CREATE DATABASE db2; +USE db2; +INSERT INTO db2.t1 VALUES (1); +SELECT * FROM db2.t1; +b +1 +RESET QUERY CACHE; +USE db1; +SET SESSION keep_files_on_create = TRUE; +CREATE TABLE t1 (a INT) ENGINE MYISAM; +ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17) +SET SESSION keep_files_on_create = DEFAULT; +DROP TABLE db2.t1; +DROP DATABASE db1; +DROP DATABASE db2; +USE test; End of 5.0 tests diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 99f3fea416a..610a208ebf0 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1118,5 +1118,36 @@ show create table t1; drop table t1; +# +# Bug #29325: create table overwrites .MYD file of other table (datadir) +# + +CREATE DATABASE db1; +CREATE DATABASE db2; + +USE db2; +--disable_query_log +eval CREATE TABLE t1 (b INT) ENGINE MYISAM +DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/'; +--enable_query_log + +INSERT INTO db2.t1 VALUES (1); +SELECT * FROM db2.t1; +RESET QUERY CACHE; + +USE db1; + +#no warning from create table +SET SESSION keep_files_on_create = TRUE; +--disable_abort_on_error +CREATE TABLE t1 (a INT) ENGINE MYISAM; +--enable_abort_on_error +SET SESSION keep_files_on_create = DEFAULT; + +DROP TABLE db2.t1; +DROP DATABASE db1; +DROP DATABASE db2; +USE test; + --echo End of 5.0 tests -- cgit v1.2.1 From 847d6ed75bf396eeccef04205822c6314ff55065 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Jul 2007 15:26:19 +0200 Subject: fix for smarter index mergein fulltext to work for queries like "+a (b)" mysql-test/r/fulltext.result: second test for BUG#29445 mysql-test/t/fulltext.test: second test for BUG#29445 storage/myisam/ft_boolean_search.c: fix for smarter index merge, to work for queries like "+a (b)" --- mysql-test/r/fulltext.result | 3 +++ mysql-test/t/fulltext.test | 1 + 2 files changed, 4 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 6f6760e31bc..02b115cb6dc 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -485,4 +485,7 @@ INSERT INTO t1 VALUES('Offside'),('City Of God'); SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE); a City Of God +SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of)*' IN BOOLEAN MODE); +a +City Of God DROP TABLE t1; diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 4e0c65267c4..b1bf0036c70 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -414,6 +414,7 @@ DROP TABLE t1; CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a)); INSERT INTO t1 VALUES('Offside'),('City Of God'); SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE); +SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of)*' IN BOOLEAN MODE); DROP TABLE t1; # End of 4.1 tests -- cgit v1.2.1 From 2f0e00175b56af824f0946284053e5a5a30b2c82 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Jul 2007 18:02:47 +0300 Subject: Addendum to bug 29325: test if TRUNCATE TABLE works with keep_files_on_create --- mysql-test/r/create.result | 7 ++++++- mysql-test/t/create.test | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 16bc534ba92..ff963892bc9 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1515,8 +1515,13 @@ USE db1; SET SESSION keep_files_on_create = TRUE; CREATE TABLE t1 (a INT) ENGINE MYISAM; ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17) +CREATE TABLE t3 (a INT) Engine=MyISAM; +INSERT INTO t3 VALUES (1),(2),(3); +TRUNCATE TABLE t3; +SELECT * from t3; +a SET SESSION keep_files_on_create = DEFAULT; -DROP TABLE db2.t1; +DROP TABLE db2.t1, db1.t3; DROP DATABASE db1; DROP DATABASE db2; USE test; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 610a208ebf0..a1d3d488f1c 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1142,9 +1142,15 @@ SET SESSION keep_files_on_create = TRUE; --disable_abort_on_error CREATE TABLE t1 (a INT) ENGINE MYISAM; --enable_abort_on_error + +CREATE TABLE t3 (a INT) Engine=MyISAM; +INSERT INTO t3 VALUES (1),(2),(3); +TRUNCATE TABLE t3; +SELECT * from t3; + SET SESSION keep_files_on_create = DEFAULT; -DROP TABLE db2.t1; +DROP TABLE db2.t1, db1.t3; DROP DATABASE db1; DROP DATABASE db2; USE test; -- cgit v1.2.1 From 0920c75b5efa164253c546f88e30b9b4fe686e6b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jul 2007 00:03:08 +0500 Subject: Fixed bug #29360. The special `zero' enum value was coerced to the normal empty string enum value during a field-to-field copy. This bug affected CREATE ... SELECT statements and SELECT aggregate GROUP BY enum field statements. Also this bug made unnecessary warnings during the execution of CREATE ... SELECT statements: Warning 1265 Data truncated for column... sql/field_conv.cc: Fixed bug #29360. The field_conv function has been modified to properly convert the special `zero' enum value between enum fields. mysql-test/t/type_enum.test: Updated test case for bug #29360. mysql-test/r/type_enum.result: Updated test case for bug #29360. mysql-test/r/type_ranges.result: Updated test case for bug #29360. --- mysql-test/r/type_enum.result | 20 ++++++++++++++++++++ mysql-test/r/type_ranges.result | 4 ---- mysql-test/t/type_enum.test | 18 ++++++++++++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index f537b7140ba..ca516f027ba 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1809,3 +1809,23 @@ f1 drop table t1; +CREATE TABLE t1 (c1 ENUM('a', '', 'b')); +INSERT INTO t1 (c1) VALUES ('b'); +INSERT INTO t1 (c1) VALUES (''); +INSERT INTO t1 (c1) VALUES (0); +Warnings: +Warning 1265 Data truncated for column 'c1' at row 1 +INSERT INTO t1 (c1) VALUES (''); +SELECT c1 + 0, COUNT(c1) FROM t1 GROUP BY c1; +c1 + 0 COUNT(c1) +0 1 +2 2 +3 1 +CREATE TABLE t2 SELECT * FROM t1; +SELECT c1 + 0 FROM t2; +c1 + 0 +3 +2 +0 +2 +DROP TABLE t1,t2; diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index e949d734944..5c2d3b84d89 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -208,10 +208,6 @@ options flags one one drop table t2; create table t2 select * from t1; -Warnings: -Warning 1265 Data truncated for column 'options' at row 4 -Warning 1265 Data truncated for column 'options' at row 5 -Warning 1265 Data truncated for column 'options' at row 6 update t2 set string="changed" where auto=16; show full columns from t1; Field Type Collation Null Key Default Extra Privileges Comment diff --git a/mysql-test/t/type_enum.test b/mysql-test/t/type_enum.test index ecc945a3157..fbba38f926d 100644 --- a/mysql-test/t/type_enum.test +++ b/mysql-test/t/type_enum.test @@ -182,3 +182,21 @@ create table t1(f1 set('a','b'), index(f1)); insert into t1 values(''),(''),('a'),('b'); select * from t1 where f1=''; drop table t1; + +# +# Bug#29360: Confluence of the special 0 enum value with the normal empty string +# value during field to field copy. +# + +CREATE TABLE t1 (c1 ENUM('a', '', 'b')); +INSERT INTO t1 (c1) VALUES ('b'); +INSERT INTO t1 (c1) VALUES (''); +INSERT INTO t1 (c1) VALUES (0); +INSERT INTO t1 (c1) VALUES (''); + +SELECT c1 + 0, COUNT(c1) FROM t1 GROUP BY c1; + +CREATE TABLE t2 SELECT * FROM t1; +SELECT c1 + 0 FROM t2; + +DROP TABLE t1,t2; -- cgit v1.2.1 From 25e28d4d28e7052d31079a9c8b6f65e4e94041ca Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Jul 2007 23:18:02 +0400 Subject: Bug#29555: Comparing time values as strings may lead to a wrong result. Time values were compared as strings. This led to a wrong comparison result when comparing values one of which is under 100 hours and another is over 100 hours. Now when the Arg_comparator::set_cmp_func function sees that both items to compare are of the TIME type it sets the comparator to the Arg_comparator::compare_e_int or the Arg_comparator::compare_int_unsigned functions. sql/item_cmpfunc.cc: Bug#29555: Comparing time values as strings may lead to a wrong result. Now when the Arg_comparator::set_cmp_func function sees that both items to compare are of the TIME type it sets the comparator to the Arg_comparator::compare_e_int or the Arg_comparator::compare_int_unsigned functions. mysql-test/r/type_time.result: Added a test case for the bug#29555: Comparing time values as strings may lead to a wrong result. mysql-test/t/type_time.test: Added a test case for the bug#29555: Comparing time values as strings may lead to a wrong result. --- mysql-test/r/type_time.result | 18 ++++++++++++++++++ mysql-test/t/type_time.test | 10 ++++++++++ 2 files changed, 28 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index 442435b0459..6124f6e39f1 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -85,3 +85,21 @@ sec_to_time(time_to_sec(t)) 13:00:00 09:00:00 drop table t1; +select cast('100:55:50' as time) < cast('24:00:00' as time); +cast('100:55:50' as time) < cast('24:00:00' as time) +0 +select cast('100:55:50' as time) < cast('024:00:00' as time); +cast('100:55:50' as time) < cast('024:00:00' as time) +0 +select cast('300:55:50' as time) < cast('240:00:00' as time); +cast('300:55:50' as time) < cast('240:00:00' as time) +0 +select cast('100:55:50' as time) > cast('24:00:00' as time); +cast('100:55:50' as time) > cast('24:00:00' as time) +1 +select cast('100:55:50' as time) > cast('024:00:00' as time); +cast('100:55:50' as time) > cast('024:00:00' as time) +1 +select cast('300:55:50' as time) > cast('240:00:00' as time); +cast('300:55:50' as time) > cast('240:00:00' as time) +1 diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test index cb7e4f85ad1..d294e53a12f 100644 --- a/mysql-test/t/type_time.test +++ b/mysql-test/t/type_time.test @@ -40,3 +40,13 @@ drop table t1; # ########################################################## # End of 4.1 tests + +# +# Bug#29555: Comparing time values as strings may lead to a wrong result. +# +select cast('100:55:50' as time) < cast('24:00:00' as time); +select cast('100:55:50' as time) < cast('024:00:00' as time); +select cast('300:55:50' as time) < cast('240:00:00' as time); +select cast('100:55:50' as time) > cast('24:00:00' as time); +select cast('100:55:50' as time) > cast('024:00:00' as time); +select cast('300:55:50' as time) > cast('240:00:00' as time); -- cgit v1.2.1 From 0bc3e69f92497c04cdd48e7936888183fd8a21d5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jul 2007 01:10:29 +0400 Subject: A fix and a test case for Bug#25859 ALTER DATABASE works w/o parameters. Fix the parser to make the database options not optional. mysql-test/r/information_schema.result: Update results (Bug#25859) mysql-test/t/information_schema.test: Add a test case for Bug#25859 "ALTER DATABASE works w/o parameters" sql/sql_yacc.yy: Fix Bug#25859 ALTER DATABASE works w/o parameters - require parameters in the parser. --- mysql-test/r/information_schema.result | 7 ++++++- mysql-test/t/information_schema.test | 11 +++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 4947fd7aecc..9d0e41b341a 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1013,7 +1013,7 @@ c int(11) YES NULL drop view v1; drop table t1; alter database information_schema; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 drop database information_schema; ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' drop table information_schema.tables; @@ -1326,3 +1326,8 @@ v2 YES delete from v1; drop view v1,v2; drop table t1,t2; +alter database; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 +alter database test; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 +End of 5.0 tests. diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 1d368ac6075..6cf4ad8f576 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -697,7 +697,7 @@ drop table t1; # # Bug #9846 Inappropriate error displayed while dropping table from 'INFORMATION_SCHEMA' # ---error 1044 +--error ER_PARSE_ERROR alter database information_schema; --error 1044 drop database information_schema; @@ -1038,4 +1038,11 @@ delete from v1; drop view v1,v2; drop table t1,t2; -# End of 5.0 tests. +# +# Bug#25859 ALTER DATABASE works w/o parameters +# +--error ER_PARSE_ERROR +alter database; +--error ER_PARSE_ERROR +alter database test; +--echo End of 5.0 tests. -- cgit v1.2.1 From b1e55680437cefcfa087fd7531c0d351da87306e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Jul 2007 18:45:35 -0700 Subject: Fixed bug #29604. A bug in the restore_prev_nj_state function allowed interleaving inner tables of outer join operations with outer tables. With the current implementation of the nested loops algorithm it could lead to wrong result sets for queries with nested outer joins. Another bug in this procedure effectively blocked evaluation of some valid execution plans for queries with nested outer joins. mysql-test/r/join_nested.result: Added a test case for bug #29604. mysql-test/t/join_nested.test: Added a test case for bug #29604. --- mysql-test/r/join_nested.result | 111 ++++++++++++++++++++++++++++++++++++++ mysql-test/t/join_nested.test | 114 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result index 006488f9d43..daf63579e9c 100644 --- a/mysql-test/r/join_nested.result +++ b/mysql-test/r/join_nested.result @@ -1632,4 +1632,115 @@ INSERT INTO t3 VALUES (1,1); SELECT * FROM t1 JOIN (t2 JOIN t3 USING (b)) USING (a); ERROR 23000: Column 'a' in from clause is ambiguous DROP TABLE t1,t2,t3; +CREATE TABLE t1 ( +carrier char(2) default NULL, +id int NOT NULL auto_increment PRIMARY KEY +); +INSERT INTO t1 VALUES +('CO',235371754),('CO',235376554),('CO',235376884),('CO',235377874), +('CO',231060394),('CO',231059224),('CO',231059314),('CO',231060484), +('CO',231060274),('CO',231060124),('CO',231060244),('CO',231058594), +('CO',231058924),('CO',231058504),('CO',231059344),('CO',231060424), +('CO',231059554),('CO',231060304),('CO',231059644),('CO',231059464), +('CO',231059764),('CO',231058294),('CO',231058624),('CO',231058864), +('CO',231059374),('CO',231059584),('CO',231059734),('CO',231059014), +('CO',231059854),('CO',231059494),('CO',231059794),('CO',231058534), +('CO',231058324),('CO',231058684),('CO',231059524),('CO',231059974); +CREATE TABLE t2 ( +scan_date date default NULL, +package_id int default NULL, +INDEX scan_date(scan_date), +INDEX package_id(package_id) +); +INSERT INTO t2 VALUES +('2008-12-29',231062944),('2008-12-29',231065764),('2008-12-29',231066124), +('2008-12-29',231060094),('2008-12-29',231061054),('2008-12-29',231065644), +('2008-12-29',231064384),('2008-12-29',231064444),('2008-12-29',231073774), +('2008-12-29',231058594),('2008-12-29',231059374),('2008-12-29',231066004), +('2008-12-29',231068494),('2008-12-29',231070174),('2008-12-29',231071884), +('2008-12-29',231063274),('2008-12-29',231063754),('2008-12-29',231064144), +('2008-12-29',231069424),('2008-12-29',231073714),('2008-12-29',231058414), +('2008-12-29',231060994),('2008-12-29',231069154),('2008-12-29',231068614), +('2008-12-29',231071464),('2008-12-29',231074014),('2008-12-29',231059614), +('2008-12-29',231059074),('2008-12-29',231059464),('2008-12-29',231069094), +('2008-12-29',231067294),('2008-12-29',231070144),('2008-12-29',231073804), +('2008-12-29',231072634),('2008-12-29',231058294),('2008-12-29',231065344), +('2008-12-29',231066094),('2008-12-29',231069034),('2008-12-29',231058594), +('2008-12-29',231059854),('2008-12-29',231059884),('2008-12-29',231059914), +('2008-12-29',231063664),('2008-12-29',231063814),('2008-12-29',231063904); +CREATE TABLE t3 ( +package_id int default NULL, +INDEX package_id(package_id) +); +INSERT INTO t3 VALUES +(231058294),(231058324),(231058354),(231058384),(231058414),(231058444), +(231058474),(231058504),(231058534),(231058564),(231058594),(231058624), +(231058684),(231058744),(231058804),(231058864),(231058924),(231058954), +(231059014),(231059074),(231059104),(231059134),(231059164),(231059194), +(231059224),(231059254),(231059284),(231059314),(231059344),(231059374), +(231059404),(231059434),(231059464),(231059494),(231059524),(231059554), +(231059584),(231059614),(231059644),(231059674),(231059704),(231059734), +(231059764),(231059794),(231059824),(231059854),(231059884),(231059914), +(231059944),(231059974),(231060004),(231060034),(231060064),(231060094), +(231060124),(231060154),(231060184),(231060214),(231060244),(231060274), +(231060304),(231060334),(231060364),(231060394),(231060424),(231060454), +(231060484),(231060514),(231060544),(231060574),(231060604),(231060634), +(231060664),(231060694),(231060724),(231060754),(231060784),(231060814), +(231060844),(231060874),(231060904),(231060934),(231060964),(231060994), +(231061024),(231061054),(231061084),(231061144),(231061174),(231061204), +(231061234),(231061294),(231061354),(231061384),(231061414),(231061474), +(231061564),(231061594),(231061624),(231061684),(231061714),(231061774), +(231061804),(231061894),(231061984),(231062074),(231062134),(231062224), +(231062254),(231062314),(231062374),(231062434),(231062494),(231062554), +(231062584),(231062614),(231062644),(231062704),(231062734),(231062794), +(231062854),(231062884),(231062944),(231063004),(231063034),(231063064), +(231063124),(231063154),(231063184),(231063214),(231063274),(231063334), +(231063394),(231063424),(231063454),(231063514),(231063574),(231063664); +CREATE TABLE t4 ( +carrier char(2) NOT NULL default '' PRIMARY KEY, +id int(11) default NULL, +INDEX id(id) +); +INSERT INTO t4 VALUES +('99',6),('SK',456),('UA',486),('AI',1081),('OS',1111),('VS',1510); +CREATE TABLE t5 ( +carrier_id int default NULL, +INDEX carrier_id(carrier_id) +); +INSERT INTO t5 VALUES +(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6), +(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6), +(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6), +(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6), +(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6), +(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(456),(456),(456), +(456),(456),(456),(456),(456),(456),(456),(456),(456),(456),(456),(456), +(456),(486),(1081),(1111),(1111),(1111),(1111),(1510); +SELECT COUNT(*) +FROM((t2 JOIN t1 ON t2.package_id = t1.id) +JOIN t3 ON t3.package_id = t1.id); +COUNT(*) +6 +EXPLAIN +SELECT COUNT(*) +FROM ((t2 JOIN t1 ON t2.package_id = t1.id) +JOIN t3 ON t3.package_id = t1.id) +LEFT JOIN +(t5 JOIN t4 ON t5.carrier_id = t4.id) +ON t4.carrier = t1.carrier; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index package_id package_id 5 NULL 45 Using index +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.package_id 1 +1 SIMPLE t4 eq_ref PRIMARY,id PRIMARY 2 test.t1.carrier 1 +1 SIMPLE t5 ref carrier_id carrier_id 5 test.t4.id 22 Using index +1 SIMPLE t3 ref package_id package_id 5 test.t1.id 1 Using where; Using index +SELECT COUNT(*) +FROM ((t2 JOIN t1 ON t2.package_id = t1.id) +JOIN t3 ON t3.package_id = t1.id) +LEFT JOIN +(t5 JOIN t4 ON t5.carrier_id = t4.id) +ON t4.carrier = t1.carrier; +COUNT(*) +6 +DROP TABLE t1,t2,t3,t4,t5; End of 5.0 tests diff --git a/mysql-test/t/join_nested.test b/mysql-test/t/join_nested.test index f29366797f6..5b07d8966f1 100644 --- a/mysql-test/t/join_nested.test +++ b/mysql-test/t/join_nested.test @@ -1083,4 +1083,118 @@ SELECT * FROM t1 JOIN (t2 JOIN t3 USING (b)) USING (a); DROP TABLE t1,t2,t3; +# +# BUG#29604: inner nest of left join interleaves with outer tables +# + +CREATE TABLE t1 ( + carrier char(2) default NULL, + id int NOT NULL auto_increment PRIMARY KEY +); +INSERT INTO t1 VALUES + ('CO',235371754),('CO',235376554),('CO',235376884),('CO',235377874), + ('CO',231060394),('CO',231059224),('CO',231059314),('CO',231060484), + ('CO',231060274),('CO',231060124),('CO',231060244),('CO',231058594), + ('CO',231058924),('CO',231058504),('CO',231059344),('CO',231060424), + ('CO',231059554),('CO',231060304),('CO',231059644),('CO',231059464), + ('CO',231059764),('CO',231058294),('CO',231058624),('CO',231058864), + ('CO',231059374),('CO',231059584),('CO',231059734),('CO',231059014), + ('CO',231059854),('CO',231059494),('CO',231059794),('CO',231058534), + ('CO',231058324),('CO',231058684),('CO',231059524),('CO',231059974); + +CREATE TABLE t2 ( + scan_date date default NULL, + package_id int default NULL, + INDEX scan_date(scan_date), + INDEX package_id(package_id) +); +INSERT INTO t2 VALUES + ('2008-12-29',231062944),('2008-12-29',231065764),('2008-12-29',231066124), + ('2008-12-29',231060094),('2008-12-29',231061054),('2008-12-29',231065644), + ('2008-12-29',231064384),('2008-12-29',231064444),('2008-12-29',231073774), + ('2008-12-29',231058594),('2008-12-29',231059374),('2008-12-29',231066004), + ('2008-12-29',231068494),('2008-12-29',231070174),('2008-12-29',231071884), + ('2008-12-29',231063274),('2008-12-29',231063754),('2008-12-29',231064144), + ('2008-12-29',231069424),('2008-12-29',231073714),('2008-12-29',231058414), + ('2008-12-29',231060994),('2008-12-29',231069154),('2008-12-29',231068614), + ('2008-12-29',231071464),('2008-12-29',231074014),('2008-12-29',231059614), + ('2008-12-29',231059074),('2008-12-29',231059464),('2008-12-29',231069094), + ('2008-12-29',231067294),('2008-12-29',231070144),('2008-12-29',231073804), + ('2008-12-29',231072634),('2008-12-29',231058294),('2008-12-29',231065344), + ('2008-12-29',231066094),('2008-12-29',231069034),('2008-12-29',231058594), + ('2008-12-29',231059854),('2008-12-29',231059884),('2008-12-29',231059914), + ('2008-12-29',231063664),('2008-12-29',231063814),('2008-12-29',231063904); + +CREATE TABLE t3 ( + package_id int default NULL, + INDEX package_id(package_id) +); +INSERT INTO t3 VALUES + (231058294),(231058324),(231058354),(231058384),(231058414),(231058444), + (231058474),(231058504),(231058534),(231058564),(231058594),(231058624), + (231058684),(231058744),(231058804),(231058864),(231058924),(231058954), + (231059014),(231059074),(231059104),(231059134),(231059164),(231059194), + (231059224),(231059254),(231059284),(231059314),(231059344),(231059374), + (231059404),(231059434),(231059464),(231059494),(231059524),(231059554), + (231059584),(231059614),(231059644),(231059674),(231059704),(231059734), + (231059764),(231059794),(231059824),(231059854),(231059884),(231059914), + (231059944),(231059974),(231060004),(231060034),(231060064),(231060094), + (231060124),(231060154),(231060184),(231060214),(231060244),(231060274), + (231060304),(231060334),(231060364),(231060394),(231060424),(231060454), + (231060484),(231060514),(231060544),(231060574),(231060604),(231060634), + (231060664),(231060694),(231060724),(231060754),(231060784),(231060814), + (231060844),(231060874),(231060904),(231060934),(231060964),(231060994), + (231061024),(231061054),(231061084),(231061144),(231061174),(231061204), + (231061234),(231061294),(231061354),(231061384),(231061414),(231061474), + (231061564),(231061594),(231061624),(231061684),(231061714),(231061774), + (231061804),(231061894),(231061984),(231062074),(231062134),(231062224), + (231062254),(231062314),(231062374),(231062434),(231062494),(231062554), + (231062584),(231062614),(231062644),(231062704),(231062734),(231062794), + (231062854),(231062884),(231062944),(231063004),(231063034),(231063064), + (231063124),(231063154),(231063184),(231063214),(231063274),(231063334), + (231063394),(231063424),(231063454),(231063514),(231063574),(231063664); + +CREATE TABLE t4 ( + carrier char(2) NOT NULL default '' PRIMARY KEY, + id int(11) default NULL, + INDEX id(id) +); +INSERT INTO t4 VALUES + ('99',6),('SK',456),('UA',486),('AI',1081),('OS',1111),('VS',1510); + +CREATE TABLE t5 ( + carrier_id int default NULL, + INDEX carrier_id(carrier_id) +); +INSERT INTO t5 VALUES + (6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6), + (6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6), + (6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6), + (6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6), + (6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6), + (6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(6),(456),(456),(456), + (456),(456),(456),(456),(456),(456),(456),(456),(456),(456),(456),(456), + (456),(486),(1081),(1111),(1111),(1111),(1111),(1510); + +SELECT COUNT(*) + FROM((t2 JOIN t1 ON t2.package_id = t1.id) + JOIN t3 ON t3.package_id = t1.id); + +EXPLAIN +SELECT COUNT(*) + FROM ((t2 JOIN t1 ON t2.package_id = t1.id) + JOIN t3 ON t3.package_id = t1.id) + LEFT JOIN + (t5 JOIN t4 ON t5.carrier_id = t4.id) + ON t4.carrier = t1.carrier; +SELECT COUNT(*) + FROM ((t2 JOIN t1 ON t2.package_id = t1.id) + JOIN t3 ON t3.package_id = t1.id) + LEFT JOIN + (t5 JOIN t4 ON t5.carrier_id = t4.id) + ON t4.carrier = t1.carrier; + +DROP TABLE t1,t2,t3,t4,t5; + --echo End of 5.0 tests + -- cgit v1.2.1 From 6ba23b0ac9a4548de36386b4f892af9c7d471e97 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jul 2007 12:49:39 +0400 Subject: Fix for 5.1 for BUG#10491: Server returns data as charset binary SHOW CREATE TABLE or SELECT FROM I_S. This is the last patch for this bug, which depends on the big CS patch and was pending. The problem was that SHOW CREATE statements returned original queries in the binary character set. That could cause the query to be unreadable. The fix is to use original character_set_client when sending the original query to the client. In order to preserve the query in mysqldump, 'binary' character set results should be set when issuing SHOW CREATE statement. If either source or destination character set is 'binary' , no conversion is performed. The idea is that since the source character set is no longer 'binary', we fix the destination character set to still produce valid dumps. client/mysqldump.c: Switch character_set_results of mysqldump-connection before calling SHOW CREATE statements for the objects. mysql-test/r/show_check.result: Result file. mysql-test/t/show_check.test: Add test case for the part of BUG#10491. sql/events.cc: Send original query in the original character set. sql/sp_head.cc: Send original query in the original character set. sql/sql_show.cc: Send original query in the original character set. --- mysql-test/r/show_check.result | 39 +++++++++++++++++++++++++ mysql-test/t/show_check.test | 64 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 9ef10865cd7..c89f386623b 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1282,4 +1282,43 @@ t1_bi CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR E DROP TABLE t1; DROP PROCEDURE p1; DEALLOCATE PREPARE stmt1; +set names koi8r; +DROP VIEW IF EXISTS v1; +DROP PROCEDURE IF EXISTS p1; +DROP FUNCTION IF EXISTS f1; +DROP TABLE IF EXISTS t1; +DROP EVENT IF EXISTS ev1; +CREATE VIEW v1 AS SELECT 'ÔÅÓÔ' AS test; +CREATE PROCEDURE p1() SELECT 'ÔÅÓÔ' AS test; +CREATE FUNCTION f1() RETURNS CHAR(10) RETURN 'ÔÅÓÔ'; +CREATE TABLE t1(c1 CHAR(10)); +CREATE TRIGGER t1_bi BEFORE INSERT ON t1 +FOR EACH ROW +SET NEW.c1 = 'ÔÅÓÔ'; +CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT 'ÔÅÓÔ' AS test; +set names utf8; +SHOW CREATE VIEW v1; +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select _koi8r'теÑÑ‚' AS `test` koi8r koi8r_general_ci +SHOW CREATE PROCEDURE p1; +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +SELECT 'теÑÑ‚' AS test koi8r koi8r_general_ci latin1_swedish_ci +SHOW CREATE FUNCTION f1; +Function sql_mode Create Function character_set_client collation_connection Database Collation +f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS char(10) CHARSET latin1 +RETURN 'теÑÑ‚' koi8r koi8r_general_ci latin1_swedish_ci +SHOW CREATE TRIGGER t1_bi; +Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation +t1_bi CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 +FOR EACH ROW +SET NEW.c1 = 'теÑÑ‚' koi8r koi8r_general_ci latin1_swedish_ci +SHOW CREATE EVENT ev1; +Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation +ev1 SYSTEM CREATE EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 'теÑÑ‚' AS test koi8r koi8r_general_ci latin1_swedish_ci +DROP VIEW v1; +DROP PROCEDURE p1; +DROP FUNCTION f1; +DROP TABLE t1; +DROP EVENT ev1; End of 5.1 tests diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 341c9039390..2f474d0335b 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -897,4 +897,68 @@ DROP TABLE t1; DROP PROCEDURE p1; DEALLOCATE PREPARE stmt1; +# +# BUG#10491: Server returns data as charset binary SHOW CREATE TABLE or SELECT +# FROM INFORMATION_SCHEMA. +# +# Before the change performed to fix the bug, the metadata of the output of +# SHOW CREATE statements would always describe the result as 'binary'. That +# would ensure that the result is never converted to character_set_client +# (which was essential to mysqldump). Now we return to the client the actual +# character set of the object -- which is character_set_client of the +# connection that issues the CREATE statement, and this triggers an automatic +# conversion to character_set_results of the connection that issues SHOW CREATE +# statement. +# +# This test demonstrates that this conversion indeed is taking place. +# + +# Prepare: create objects in a one character set. + +set names koi8r; + +--disable_warnings +DROP VIEW IF EXISTS v1; +DROP PROCEDURE IF EXISTS p1; +DROP FUNCTION IF EXISTS f1; +DROP TABLE IF EXISTS t1; +DROP EVENT IF EXISTS ev1; +--enable_warnings + +CREATE VIEW v1 AS SELECT 'ÔÅÓÔ' AS test; + +CREATE PROCEDURE p1() SELECT 'ÔÅÓÔ' AS test; + +CREATE FUNCTION f1() RETURNS CHAR(10) RETURN 'ÔÅÓÔ'; + +CREATE TABLE t1(c1 CHAR(10)); +CREATE TRIGGER t1_bi BEFORE INSERT ON t1 + FOR EACH ROW + SET NEW.c1 = 'ÔÅÓÔ'; + +CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT 'ÔÅÓÔ' AS test; + +# Test: switch the character set and show that SHOW CREATE output is +# automatically converted to the new character_set_client. + +set names utf8; + +SHOW CREATE VIEW v1; + +SHOW CREATE PROCEDURE p1; + +SHOW CREATE FUNCTION f1; + +SHOW CREATE TRIGGER t1_bi; + +SHOW CREATE EVENT ev1; + +# Cleanup. + +DROP VIEW v1; +DROP PROCEDURE p1; +DROP FUNCTION f1; +DROP TABLE t1; +DROP EVENT ev1; + --echo End of 5.1 tests -- cgit v1.2.1 From 30810f80b1070cbfd4579835353bb6e84fd1b233 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jul 2007 13:29:51 +0200 Subject: Bug#28249 Query Cache returns wrong result with concurrent insert / certain lock A race condition in the integration between MyISAM and the query cache code caused the query cache to fail to invalidate itself on concurrently inserted data. This patch fix this problem by using the existing handler interface which, upon each statement cache attempt, compare the size of the table as viewed from the cache writing thread and with any snap shot of the global table state. If the two sizes are different the global table size is unknown and the current statement can't be cached. mysql-test/r/query_cache.result: Added test case mysql-test/t/query_cache.test: Added test case sql/ha_myisam.cc: - Implemented handler interface for ha_myisam class to dermine if the table belonging to the currently processed statement can be cached or not. sql/ha_myisam.h: - Implemented handler interface for ha_myisam class to dermine if the table belonging to the currently processed statement can be cached or not. sql/handler.h: - Documented register_query_cache_table method in the handler interface. --- mysql-test/r/query_cache.result | 39 ++++++++++++++++++++++ mysql-test/t/query_cache.test | 73 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 79471ee5c02..58b8aad6fc9 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1409,3 +1409,42 @@ set GLOBAL query_cache_type=default; set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_size= default; +Bug#28249 Query Cache returns wrong result with concurrent insert/ certain lock +set GLOBAL query_cache_type=1; +set GLOBAL query_cache_limit=10000; +set GLOBAL query_cache_min_res_unit=0; +set GLOBAL query_cache_size= 100000; +flush tables; +drop table if exists t1, t2; +create table t1 (a int); +create table t2 (a int); +insert into t1 values (1),(2),(3); +Locking table T2 with a write lock. +lock table t2 write; +Select blocked by write lock. +select *, (select count(*) from t2) from t1;; +Sleeing is ok, because selecting should be done very fast. +Inserting into table T1. +insert into t1 values (4); +Unlocking the tables. +unlock tables; +Collecting result from previously blocked select. +Next select should contain 4 rows, as the insert is long finished. +select *, (select count(*) from t2) from t1; +a (select count(*) from t2) +1 0 +2 0 +3 0 +4 0 +reset query cache; +select *, (select count(*) from t2) from t1; +a (select count(*) from t2) +1 0 +2 0 +3 0 +4 0 +drop table t1,t2; +set GLOBAL query_cache_type=default; +set GLOBAL query_cache_limit=default; +set GLOBAL query_cache_min_res_unit=default; +set GLOBAL query_cache_size=default; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 1ef104f820b..17073e039c2 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -970,4 +970,77 @@ set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_size= default; +# +# Bug #28249 Query Cache returns wrong result with concurrent insert / certain lock +# +--echo Bug#28249 Query Cache returns wrong result with concurrent insert/ certain lock +connect (user1,localhost,root,,test,,); +connect (user2,localhost,root,,test,,); +connect (user3,localhost,root,,test,,); + +connection user1; + +set GLOBAL query_cache_type=1; +set GLOBAL query_cache_limit=10000; +set GLOBAL query_cache_min_res_unit=0; +set GLOBAL query_cache_size= 100000; + +flush tables; +--disable_warnings +drop table if exists t1, t2; +--enable_warnings +create table t1 (a int); +create table t2 (a int); +insert into t1 values (1),(2),(3); +connection user2; +--echo Locking table T2 with a write lock. +lock table t2 write; + +connection user1; +--echo Select blocked by write lock. +--send select *, (select count(*) from t2) from t1; +--echo Sleeing is ok, because selecting should be done very fast. +sleep 5; + +connection user3; +--echo Inserting into table T1. +insert into t1 values (4); + +connection user2; +--echo Unlocking the tables. +unlock tables; + +connection user1; +--echo Collecting result from previously blocked select. +# +# Since the lock ordering rule in thr_multi_lock depends on +# pointer values, from execution to execution we might have +# different lock order, and therefore, sometimes lock t1 and block +# on t2, and sometimes block on t2 right away. In the second case, +# the following insert succeeds, and only then this select can +# proceed, and we actually test nothing, as the very first select +# returns 4 rows right away. +# It's fine to have a test case that covers the problematic area +# at least once in a while. +# We, however, need to disable the result log here to make the +# test repeatable. +--disable_result_log +--reap +--enable_result_log +--echo Next select should contain 4 rows, as the insert is long finished. +select *, (select count(*) from t2) from t1; +reset query cache; +select *, (select count(*) from t2) from t1; + +drop table t1,t2; + +connection default; +disconnect user1; +disconnect user2; +disconnect user3; +set GLOBAL query_cache_type=default; +set GLOBAL query_cache_limit=default; +set GLOBAL query_cache_min_res_unit=default; +set GLOBAL query_cache_size=default; # End of 5.0 tests + -- cgit v1.2.1 From ad492a6db7582a35a95e7f0d9e9e7392efd353eb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jul 2007 15:12:56 +0300 Subject: Bug 29325: test suite is not applicable on windows --- mysql-test/r/create.result | 22 ------------------- mysql-test/r/create_not_windows.result | 22 +++++++++++++++++++ mysql-test/t/create.test | 37 -------------------------------- mysql-test/t/create_not_windows.test | 39 ++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 59 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index ff963892bc9..e692dbf3938 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1503,26 +1503,4 @@ t1 CREATE TABLE `t1` ( `c17` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; -CREATE DATABASE db1; -CREATE DATABASE db2; -USE db2; -INSERT INTO db2.t1 VALUES (1); -SELECT * FROM db2.t1; -b -1 -RESET QUERY CACHE; -USE db1; -SET SESSION keep_files_on_create = TRUE; -CREATE TABLE t1 (a INT) ENGINE MYISAM; -ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17) -CREATE TABLE t3 (a INT) Engine=MyISAM; -INSERT INTO t3 VALUES (1),(2),(3); -TRUNCATE TABLE t3; -SELECT * from t3; -a -SET SESSION keep_files_on_create = DEFAULT; -DROP TABLE db2.t1, db1.t3; -DROP DATABASE db1; -DROP DATABASE db2; -USE test; End of 5.0 tests diff --git a/mysql-test/r/create_not_windows.result b/mysql-test/r/create_not_windows.result index b975c98c2b1..a07ffa82610 100644 --- a/mysql-test/r/create_not_windows.result +++ b/mysql-test/r/create_not_windows.result @@ -12,3 +12,25 @@ about:text CREATE TABLE `about:text` ( PRIMARY KEY (`_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table `about:text`; +CREATE DATABASE db1; +CREATE DATABASE db2; +USE db2; +INSERT INTO db2.t1 VALUES (1); +SELECT * FROM db2.t1; +b +1 +RESET QUERY CACHE; +USE db1; +SET SESSION keep_files_on_create = TRUE; +CREATE TABLE t1 (a INT) ENGINE MYISAM; +ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17) +CREATE TABLE t3 (a INT) Engine=MyISAM; +INSERT INTO t3 VALUES (1),(2),(3); +TRUNCATE TABLE t3; +SELECT * from t3; +a +SET SESSION keep_files_on_create = DEFAULT; +DROP TABLE db2.t1, db1.t3; +DROP DATABASE db1; +DROP DATABASE db2; +USE test; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index a1d3d488f1c..99f3fea416a 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1118,42 +1118,5 @@ show create table t1; drop table t1; -# -# Bug #29325: create table overwrites .MYD file of other table (datadir) -# - -CREATE DATABASE db1; -CREATE DATABASE db2; - -USE db2; ---disable_query_log -eval CREATE TABLE t1 (b INT) ENGINE MYISAM -DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/'; ---enable_query_log - -INSERT INTO db2.t1 VALUES (1); -SELECT * FROM db2.t1; -RESET QUERY CACHE; - -USE db1; - -#no warning from create table -SET SESSION keep_files_on_create = TRUE; ---disable_abort_on_error -CREATE TABLE t1 (a INT) ENGINE MYISAM; ---enable_abort_on_error - -CREATE TABLE t3 (a INT) Engine=MyISAM; -INSERT INTO t3 VALUES (1),(2),(3); -TRUNCATE TABLE t3; -SELECT * from t3; - -SET SESSION keep_files_on_create = DEFAULT; - -DROP TABLE db2.t1, db1.t3; -DROP DATABASE db1; -DROP DATABASE db2; -USE test; - --echo End of 5.0 tests diff --git a/mysql-test/t/create_not_windows.test b/mysql-test/t/create_not_windows.test index 71ad9ccd7fe..c6547b1376b 100644 --- a/mysql-test/t/create_not_windows.test +++ b/mysql-test/t/create_not_windows.test @@ -17,4 +17,43 @@ primary key (_id) show create table `about:text`; drop table `about:text`; + +# +# Bug #29325: create table overwrites .MYD file of other table (datadir) +# + +CREATE DATABASE db1; +CREATE DATABASE db2; + +USE db2; +--disable_query_log +eval CREATE TABLE t1 (b INT) ENGINE MYISAM +DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/'; +--enable_query_log + +INSERT INTO db2.t1 VALUES (1); +SELECT * FROM db2.t1; +RESET QUERY CACHE; + +USE db1; + +#no warning from create table +SET SESSION keep_files_on_create = TRUE; +--disable_abort_on_error +CREATE TABLE t1 (a INT) ENGINE MYISAM; +--enable_abort_on_error + +CREATE TABLE t3 (a INT) Engine=MyISAM; +INSERT INTO t3 VALUES (1),(2),(3); +TRUNCATE TABLE t3; +SELECT * from t3; + +SET SESSION keep_files_on_create = DEFAULT; + +DROP TABLE db2.t1, db1.t3; +DROP DATABASE db1; +DROP DATABASE db2; +USE test; + + # End of 5.0 tests -- cgit v1.2.1 From 4922166ed1739d067719200f6542e09f4cc48c1f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jul 2007 17:27:53 +0200 Subject: Bug #29612 Cluster ndbd can't write to file, linux kernel 2.4 - remove usage for now --- mysql-test/ndb/ndb_config_2_node.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/ndb/ndb_config_2_node.ini b/mysql-test/ndb/ndb_config_2_node.ini index 6bcb148d471..57e4d049ad6 100644 --- a/mysql-test/ndb/ndb_config_2_node.ini +++ b/mysql-test/ndb/ndb_config_2_node.ini @@ -13,7 +13,8 @@ TimeBetweenGlobalCheckpoints= 500 NoOfFragmentLogFiles= 4 FragmentLogFileSize=12M DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory -ODirect= 1 +# O_DIRECT has issues on 2.4 whach have not been handled, Bug #29612 +#ODirect= 1 # the following parametes just function as a small regression # test that the parameter exists InitialNoOfOpenFiles= 27 -- cgit v1.2.1 From afbac0070f7dd7e5f37d5b99375568bfe09463cc Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jul 2007 20:21:17 +0200 Subject: Bug#28158 - table->read_set is set incorrectly, causing wrong error message in Falcon An error message about a duplicate key could show a wrong key value when not all columns of the key were used to select the rows for update. Some storage engines return a record with only the selected columns filled. This is fixed by re-reading the record with a read_set which includes all columns of the duplicate key after a duplicate key error happens and before the error message is printed. mysql-test/r/ndb_update.result: Bug#28158 - table->read_set is set incorrectly, causing wrong error message in Falcon Added test result. mysql-test/t/ndb_update.test: Bug#28158 - table->read_set is set incorrectly, causing wrong error message in Falcon Added test from falcon_bug_28158. sql/sql_update.cc: Bug#28158 - table->read_set is set incorrectly, causing wrong error message in Falcon Added a function for re-reading a record with a read_set that contains all fields used by a duplicate key. Called the function before every call to handler::print_error(), which could print a duplicate key value. --- mysql-test/r/ndb_update.result | 46 ++++++++++++++++++++++++++++++++++++++ mysql-test/t/ndb_update.test | 50 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 95 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/ndb_update.result b/mysql-test/r/ndb_update.result index 919b8c44a40..daea0e27a6a 100644 --- a/mysql-test/r/ndb_update.result +++ b/mysql-test/r/ndb_update.result @@ -1,4 +1,6 @@ DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; CREATE TABLE t1 ( pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, @@ -40,3 +42,47 @@ pk1 b c 12 2 2 14 1 1 DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster; +CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster; +CREATE TABLE t3 (a int, b int, PRIMARY KEY (a, b)) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (1, 2); +INSERT INTO t1 VALUES (2, 2); +INSERT INTO t2 VALUES (1, 2); +INSERT INTO t2 VALUES (2, 2); +INSERT INTO t3 VALUES (1, 2); +INSERT INTO t3 VALUES (2, 2); +UPDATE t1 SET a = 1; +UPDATE t1 SET a = 1 ORDER BY a; +UPDATE t2 SET a = 1; +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +UPDATE t2 SET a = 1 ORDER BY a; +ERROR 23000: Duplicate entry '' for key '*UNKNOWN*' +UPDATE t3 SET a = 1; +ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY' +UPDATE t3 SET a = 1 ORDER BY a; +ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY' +SELECT count(*) FROM t1; +count(*) +2 +SELECT count(*) FROM t2; +count(*) +2 +SELECT count(*) FROM t3; +count(*) +2 +SELECT * FROM t1 ORDER by a; +a b +1 2 +1 2 +SELECT * FROM t2 ORDER by a; +a b +1 2 +2 2 +SELECT * FROM t3 ORDER by a; +a b +1 2 +2 2 +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +End of 5.1 tests diff --git a/mysql-test/t/ndb_update.test b/mysql-test/t/ndb_update.test index 73a0ebc69cb..c45f990edcc 100644 --- a/mysql-test/t/ndb_update.test +++ b/mysql-test/t/ndb_update.test @@ -3,10 +3,12 @@ --disable_warnings DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; --enable_warnings # -# Basic test of INSERT in NDB +# Basic test of UPDATE in NDB # # @@ -39,3 +41,49 @@ DROP TABLE IF EXISTS t1; --enable_warnings # End of 4.1 tests + +# +# Bug#28158: table->read_set is set incorrectly, +# causing wrong error message in Falcon +# +CREATE TABLE t1 (a int, b int, KEY (a, b)) ENGINE=ndbcluster; +CREATE TABLE t2 (a int, b int, UNIQUE KEY (a, b)) ENGINE=ndbcluster; +CREATE TABLE t3 (a int, b int, PRIMARY KEY (a, b)) ENGINE=ndbcluster; +# +INSERT INTO t1 VALUES (1, 2); +INSERT INTO t1 VALUES (2, 2); +# +INSERT INTO t2 VALUES (1, 2); +INSERT INTO t2 VALUES (2, 2); +# +INSERT INTO t3 VALUES (1, 2); +INSERT INTO t3 VALUES (2, 2); +# +UPDATE t1 SET a = 1; +UPDATE t1 SET a = 1 ORDER BY a; +# +--error ER_DUP_ENTRY +UPDATE t2 SET a = 1; +--error ER_DUP_ENTRY +UPDATE t2 SET a = 1 ORDER BY a; +# +--error ER_DUP_ENTRY +UPDATE t3 SET a = 1; +--error ER_DUP_ENTRY +UPDATE t3 SET a = 1 ORDER BY a; +# +SELECT count(*) FROM t1; +SELECT count(*) FROM t2; +SELECT count(*) FROM t3; +SELECT * FROM t1 ORDER by a; +SELECT * FROM t2 ORDER by a; +SELECT * FROM t3 ORDER by a; +# +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +--enable_warnings + +--echo End of 5.1 tests + -- cgit v1.2.1 From 9dc3088f9e4cad7b6e33d4d1b35f11d4b5b5e372 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jul 2007 22:26:41 +0400 Subject: A fix and a test case for Bug#26141 mixing table types in trigger causes full table lock on innodb table. Also fixes Bug#28502 Triggers that update another innodb table will block on X lock unnecessarily (duplciate). Code review fixes. Both bugs' synopses are misleading: InnoDB table is not X locked. The statements, however, cannot proceed concurrently, but this happens due to lock conflicts for tables used in triggers, not for the InnoDB table. If a user had an InnoDB table, and two triggers, AFTER UPDATE and AFTER INSERT, competing for different resources (e.g. two distinct MyISAM tables), then these two triggers would not be able to execute concurrently. Moreover, INSERTS/UPDATES of the InnoDB table would not be able to run concurrently. The problem had other side-effects (see respective bug reports). This behavior was a consequence of a shortcoming of the pre-locking algorithm, which would not distinguish between different DML operations (e.g. INSERT and DELETE) and pre-lock all the tables that are used by any trigger defined on the subject table. The idea of the fix is to extend the pre-locking algorithm to keep track, for each table, what DML operation it is used for and not load triggers that are known to never be fired. mysql-test/r/trigger-trans.result: Update results (Bug#26141) mysql-test/r/trigger.result: Update results (Bug#28502) mysql-test/t/trigger-trans.test: Add a test case for Bug#26141 mixing table types in trigger causes full table lock on innodb table. mysql-test/t/trigger.test: Add a test case for Bug#28502 Triggers that update another innodb table will block echo on X lock unnecessarily. Add more test coverage for triggers. sql/item.h: enum trg_event_type is needed in table.h sql/sp.cc: Take into account table_list->trg_event_map when determining what tables to pre-lock. After this change, if we attempt to fire a trigger for which we had not pre-locked any tables, error 'Table was not locked with LOCK TABLES' will be printed. This, however, should never happen, provided the pre-locking algorithm has no programming bugs. Previously a trigger key in the sroutines hash was based on the name of the table the trigger belongs to. This was possible because we would always add to the pre-locking list all the triggers defined for a table when handling this table. Now the key is based on the name of the trigger, owing to the fact that a trigger name must be unique in the database it belongs to. sql/sp_head.cc: Generate sroutines hash key in init_spname(). This is a convenient place since there we have all the necessary information and can avoid an extra alloc. Maintain and merge trg_event_map when adding and merging elements of the pre-locking list. sql/sp_head.h: Add ,m_sroutines_key member, used when inserting the sphead for a trigger into the cache of routines used by a statement. Previously the key was based on the table name the trigger belonged to, since for a given table we would add to the sroutines list all the triggers defined on it. sql/sql_lex.cc: Introduce a new lex step: set_trg_event_type_for_tables(). It is called when we have finished parsing but before opening and locking tables. Now this step is used to evaluate for each TABLE_LIST instance which INSERT/UPDATE/DELETE operation, if any, it is used in. In future this method could be extended to aggregate other information that is hard to aggregate during parsing. sql/sql_lex.h: Add declaration for set_trg_event_type_for_tables(). sql/sql_parse.cc: Call set_trg_event_type_for_tables() after MYSQLparse(). Remove tabs. sql/sql_prepare.cc: Call set_trg_event_type_for_tables() after MYSQLparse(). sql/sql_trigger.cc: Call set_trg_event_type_for_tables() after MYSQLparse(). sql/sql_trigger.h: Remove an obsolete member. sql/sql_view.cc: Call set_trg_event_type_for_tables() after MYSQLparse(). sql/sql_yacc.yy: Move assignment of sp_head::m_type before calling sp_head::init_spname(), one is now used inside another. sql/table.cc: Implement TABLE_LIST::set_trg_event_map() - a method that calculates wh triggers may be fired on this table when executing a statement. sql/table.h: Add missing declarations. Move declaration of trg_event_type from item.h (it will be needed for trg_event_map bitmap when we start using Bitmap template instead of uint8). --- mysql-test/r/trigger-trans.result | 59 +++++ mysql-test/r/trigger.result | 457 ++++++++++++++++++++++++++++++++++++++ mysql-test/t/trigger-trans.test | 82 ++++++- mysql-test/t/trigger.test | 365 ++++++++++++++++++++++++++++++ 4 files changed, 962 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/trigger-trans.result b/mysql-test/r/trigger-trans.result index b56abf1f59a..cd5f629564f 100644 --- a/mysql-test/r/trigger-trans.result +++ b/mysql-test/r/trigger-trans.result @@ -82,3 +82,62 @@ ALICE 33 1 0 THE CROWN 43 1 0 THE PIE 53 1 1 drop table t1; + +Bug#26141 mixing table types in trigger causes full +table lock on innodb table + +Ensure we do not open and lock tables for the triggers we do not +fire. + +drop table if exists t1, t2, t3; +drop trigger if exists trg_bug26141_au; +drop trigger if exists trg_bug26141_ai; +create table t1 (c int primary key) engine=innodb; +create table t2 (c int) engine=myisam; +create table t3 (c int) engine=myisam; +insert into t1 (c) values (1); +create trigger trg_bug26141_ai after insert on t1 +for each row +begin +insert into t2 (c) values (1); +# We need the 'sync' lock to synchronously wait in connection 2 till +# the moment when the trigger acquired all the locks. +select release_lock("lock_bug26141_sync") into @a; +# 1000 is time in seconds of lock wait timeout -- this is a way +# to cause a manageable sleep up to 1000 seconds +select get_lock("lock_bug26141_wait", 1000) into @a; +end| +create trigger trg_bug26141_au after update on t1 +for each row +begin +insert into t3 (c) values (1); +end| +select get_lock("lock_bug26141_wait", 0); +get_lock("lock_bug26141_wait", 0) +1 +select get_lock("lock_bug26141_sync", /* must not be priorly locked */ 0); +get_lock("lock_bug26141_sync", /* must not be priorly locked */ 0) +1 +insert into t1 (c) values (2); +select get_lock("lock_bug26141_sync", 1000); +get_lock("lock_bug26141_sync", 1000) +1 +update t1 set c=3 where c=1; +select release_lock("lock_bug26141_sync"); +release_lock("lock_bug26141_sync") +1 +select release_lock("lock_bug26141_wait"); +release_lock("lock_bug26141_wait") +1 +select * from t1; +c +2 +3 +select * from t2; +c +1 +select * from t3; +c +1 +drop table t1, t2, t3; +End of 5.0 tests diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 290929d476d..4b18e525e62 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -1476,4 +1476,461 @@ DROP TRIGGER t1_test; DROP TABLE t1,t2; SET SESSION LOW_PRIORITY_UPDATES=DEFAULT; SET GLOBAL LOW_PRIORITY_UPDATES=DEFAULT; + +Bug#28502 Triggers that update another innodb table will block +on X lock unnecessarily + +Ensure we do not open and lock tables for triggers we do not fire. + +drop table if exists t1, t2; +drop trigger if exists trg_bug28502_au; +create table t1 (id int, count int); +create table t2 (id int); +create trigger trg_bug28502_au before update on t2 +for each row +begin +if (new.id is not null) then +update t1 set count= count + 1 where id = old.id; +end if; +end| +insert into t1 (id, count) values (1, 0); +lock table t1 write; +insert into t2 set id=1; +unlock tables; +update t2 set id=1 where id=1; +select * from t1; +id count +1 1 +select * from t2; +id +1 +drop table t1, t2; + +Additionally, provide test coverage for triggers and +all MySQL data changing commands. + +drop table if exists t1, t2, t1_op_log; +drop view if exists v1; +drop trigger if exists trg_bug28502_bi; +drop trigger if exists trg_bug28502_ai; +drop trigger if exists trg_bug28502_bu; +drop trigger if exists trg_bug28502_au; +drop trigger if exists trg_bug28502_bd; +drop trigger if exists trg_bug28502_ad; +create table t1 (id int primary key auto_increment, operation varchar(255)); +create table t2 (id int primary key); +create table t1_op_log(operation varchar(255)); +create view v1 as select * from t1; +create trigger trg_bug28502_bi before insert on t1 +for each row +insert into t1_op_log (operation) +values (concat("Before INSERT, new=", new.operation)); +create trigger trg_bug28502_ai after insert on t1 +for each row +insert into t1_op_log (operation) +values (concat("After INSERT, new=", new.operation)); +create trigger trg_bug28502_bu before update on t1 +for each row +insert into t1_op_log (operation) +values (concat("Before UPDATE, new=", new.operation, +", old=", old.operation)); +create trigger trg_bug28502_au after update on t1 +for each row +insert into t1_op_log (operation) +values (concat("After UPDATE, new=", new.operation, +", old=", old.operation)); +create trigger trg_bug28502_bd before delete on t1 +for each row +insert into t1_op_log (operation) +values (concat("Before DELETE, old=", old.operation)); +create trigger trg_bug28502_ad after delete on t1 +for each row +insert into t1_op_log (operation) +values (concat("After DELETE, old=", old.operation)); +insert into t1 (operation) values ("INSERT"); +set @id=last_insert_id(); +select * from t1; +id operation +1 INSERT +select * from t1_op_log; +operation +Before INSERT, new=INSERT +After INSERT, new=INSERT +truncate t1_op_log; +update t1 set operation="UPDATE" where id=@id; +select * from t1; +id operation +1 UPDATE +select * from t1_op_log; +operation +Before UPDATE, new=UPDATE, old=INSERT +After UPDATE, new=UPDATE, old=INSERT +truncate t1_op_log; +delete from t1 where id=@id; +select * from t1; +id operation +select * from t1_op_log; +operation +Before DELETE, old=UPDATE +After DELETE, old=UPDATE +truncate t1; +truncate t1_op_log; +insert into t1 (id, operation) values +(NULL, "INSERT ON DUPLICATE KEY UPDATE, inserting a new key") +on duplicate key update id=NULL, operation="Should never happen"; +set @id=last_insert_id(); +select * from t1; +id operation +1 INSERT ON DUPLICATE KEY UPDATE, inserting a new key +select * from t1_op_log; +operation +Before INSERT, new=INSERT ON DUPLICATE KEY UPDATE, inserting a new key +After INSERT, new=INSERT ON DUPLICATE KEY UPDATE, inserting a new key +truncate t1_op_log; +insert into t1 (id, operation) values +(@id, "INSERT ON DUPLICATE KEY UPDATE, the key value is the same") +on duplicate key update id=NULL, +operation="INSERT ON DUPLICATE KEY UPDATE, updating the duplicate"; +select * from t1; +id operation +0 INSERT ON DUPLICATE KEY UPDATE, updating the duplicate +select * from t1_op_log; +operation +Before INSERT, new=INSERT ON DUPLICATE KEY UPDATE, the key value is the same +Before UPDATE, new=INSERT ON DUPLICATE KEY UPDATE, updating the duplicate, old=INSERT ON DUPLICATE KEY UPDATE, inserting a new key +After UPDATE, new=INSERT ON DUPLICATE KEY UPDATE, updating the duplicate, old=INSERT ON DUPLICATE KEY UPDATE, inserting a new key +truncate t1; +truncate t1_op_log; +replace into t1 values (NULL, "REPLACE, inserting a new key"); +set @id=last_insert_id(); +select * from t1; +id operation +1 REPLACE, inserting a new key +select * from t1_op_log; +operation +Before INSERT, new=REPLACE, inserting a new key +After INSERT, new=REPLACE, inserting a new key +truncate t1_op_log; +replace into t1 values (@id, "REPLACE, deleting the duplicate"); +select * from t1; +id operation +1 REPLACE, deleting the duplicate +select * from t1_op_log; +operation +Before INSERT, new=REPLACE, deleting the duplicate +Before DELETE, old=REPLACE, inserting a new key +After DELETE, old=REPLACE, inserting a new key +After INSERT, new=REPLACE, deleting the duplicate +truncate t1; +truncate t1_op_log; +create table if not exists t1 +select NULL, "CREATE TABLE ... SELECT, inserting a new key"; +Warnings: +Note 1050 Table 't1' already exists +set @id=last_insert_id(); +select * from t1; +id operation +1 CREATE TABLE ... SELECT, inserting a new key +select * from t1_op_log; +operation +Before INSERT, new=CREATE TABLE ... SELECT, inserting a new key +After INSERT, new=CREATE TABLE ... SELECT, inserting a new key +truncate t1_op_log; +create table if not exists t1 replace +select @id, "CREATE TABLE ... REPLACE SELECT, deleting a duplicate key"; +Warnings: +Note 1050 Table 't1' already exists +select * from t1; +id operation +1 CREATE TABLE ... REPLACE SELECT, deleting a duplicate key +select * from t1_op_log; +operation +Before INSERT, new=CREATE TABLE ... REPLACE SELECT, deleting a duplicate key +Before DELETE, old=CREATE TABLE ... SELECT, inserting a new key +After DELETE, old=CREATE TABLE ... SELECT, inserting a new key +After INSERT, new=CREATE TABLE ... REPLACE SELECT, deleting a duplicate key +truncate t1; +truncate t1_op_log; +insert into t1 (id, operation) +select NULL, "INSERT ... SELECT, inserting a new key"; +set @id=last_insert_id(); +select * from t1; +id operation +1 INSERT ... SELECT, inserting a new key +select * from t1_op_log; +operation +Before INSERT, new=INSERT ... SELECT, inserting a new key +After INSERT, new=INSERT ... SELECT, inserting a new key +truncate t1_op_log; +insert into t1 (id, operation) +select @id, +"INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate" +on duplicate key update id=NULL, +operation="INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate"; +select * from t1; +id operation +0 INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate +select * from t1_op_log; +operation +Before INSERT, new=INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate +Before UPDATE, new=INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate, old=INSERT ... SELECT, inserting a new key +After UPDATE, new=INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate, old=INSERT ... SELECT, inserting a new key +truncate t1; +truncate t1_op_log; +replace into t1 (id, operation) +select NULL, "REPLACE ... SELECT, inserting a new key"; +set @id=last_insert_id(); +select * from t1; +id operation +1 REPLACE ... SELECT, inserting a new key +select * from t1_op_log; +operation +Before INSERT, new=REPLACE ... SELECT, inserting a new key +After INSERT, new=REPLACE ... SELECT, inserting a new key +truncate t1_op_log; +replace into t1 (id, operation) +select @id, "REPLACE ... SELECT, deleting a duplicate"; +select * from t1; +id operation +1 REPLACE ... SELECT, deleting a duplicate +select * from t1_op_log; +operation +Before INSERT, new=REPLACE ... SELECT, deleting a duplicate +Before DELETE, old=REPLACE ... SELECT, inserting a new key +After DELETE, old=REPLACE ... SELECT, inserting a new key +After INSERT, new=REPLACE ... SELECT, deleting a duplicate +truncate t1; +truncate t1_op_log; +insert into t1 (id, operation) values (1, "INSERT for multi-DELETE"); +insert into t2 (id) values (1); +delete t1.*, t2.* from t1, t2 where t1.id=1; +select * from t1; +id operation +select * from t2; +id +select * from t1_op_log; +operation +Before INSERT, new=INSERT for multi-DELETE +After INSERT, new=INSERT for multi-DELETE +Before DELETE, old=INSERT for multi-DELETE +After DELETE, old=INSERT for multi-DELETE +truncate t1; +truncate t2; +truncate t1_op_log; +insert into t1 (id, operation) values (1, "INSERT for multi-UPDATE"); +insert into t2 (id) values (1); +update t1, t2 set t1.id=2, operation="multi-UPDATE" where t1.id=1; +update t1, t2 +set t2.id=3, operation="multi-UPDATE, SET for t2, but the trigger is fired" where t1.id=2; +select * from t1; +id operation +2 multi-UPDATE, SET for t2, but the trigger is fired +select * from t2; +id +3 +select * from t1_op_log; +operation +Before INSERT, new=INSERT for multi-UPDATE +After INSERT, new=INSERT for multi-UPDATE +Before UPDATE, new=multi-UPDATE, old=INSERT for multi-UPDATE +After UPDATE, new=multi-UPDATE, old=INSERT for multi-UPDATE +Before UPDATE, new=multi-UPDATE, SET for t2, but the trigger is fired, old=multi-UPDATE +After UPDATE, new=multi-UPDATE, SET for t2, but the trigger is fired, old=multi-UPDATE +truncate table t1; +truncate table t2; +truncate table t1_op_log; + +Now do the same but use a view instead of the base table. + +insert into v1 (operation) values ("INSERT"); +set @id=last_insert_id(); +select * from t1; +id operation +1 INSERT +select * from t1_op_log; +operation +Before INSERT, new=INSERT +After INSERT, new=INSERT +truncate t1_op_log; +update v1 set operation="UPDATE" where id=@id; +select * from t1; +id operation +1 UPDATE +select * from t1_op_log; +operation +Before UPDATE, new=UPDATE, old=INSERT +After UPDATE, new=UPDATE, old=INSERT +truncate t1_op_log; +delete from v1 where id=@id; +select * from t1; +id operation +select * from t1_op_log; +operation +Before DELETE, old=UPDATE +After DELETE, old=UPDATE +truncate t1; +truncate t1_op_log; +insert into v1 (id, operation) values +(NULL, "INSERT ON DUPLICATE KEY UPDATE, inserting a new key") +on duplicate key update id=NULL, operation="Should never happen"; +set @id=last_insert_id(); +select * from t1; +id operation +1 INSERT ON DUPLICATE KEY UPDATE, inserting a new key +select * from t1_op_log; +operation +Before INSERT, new=INSERT ON DUPLICATE KEY UPDATE, inserting a new key +After INSERT, new=INSERT ON DUPLICATE KEY UPDATE, inserting a new key +truncate t1_op_log; +insert into v1 (id, operation) values +(@id, "INSERT ON DUPLICATE KEY UPDATE, the key value is the same") +on duplicate key update id=NULL, +operation="INSERT ON DUPLICATE KEY UPDATE, updating the duplicate"; +select * from t1; +id operation +0 INSERT ON DUPLICATE KEY UPDATE, updating the duplicate +select * from t1_op_log; +operation +Before INSERT, new=INSERT ON DUPLICATE KEY UPDATE, the key value is the same +Before UPDATE, new=INSERT ON DUPLICATE KEY UPDATE, updating the duplicate, old=INSERT ON DUPLICATE KEY UPDATE, inserting a new key +After UPDATE, new=INSERT ON DUPLICATE KEY UPDATE, updating the duplicate, old=INSERT ON DUPLICATE KEY UPDATE, inserting a new key +truncate t1; +truncate t1_op_log; +replace into v1 values (NULL, "REPLACE, inserting a new key"); +set @id=last_insert_id(); +select * from t1; +id operation +1 REPLACE, inserting a new key +select * from t1_op_log; +operation +Before INSERT, new=REPLACE, inserting a new key +After INSERT, new=REPLACE, inserting a new key +truncate t1_op_log; +replace into v1 values (@id, "REPLACE, deleting the duplicate"); +select * from t1; +id operation +1 REPLACE, deleting the duplicate +select * from t1_op_log; +operation +Before INSERT, new=REPLACE, deleting the duplicate +Before DELETE, old=REPLACE, inserting a new key +After DELETE, old=REPLACE, inserting a new key +After INSERT, new=REPLACE, deleting the duplicate +truncate t1; +truncate t1_op_log; +create table if not exists v1 +select NULL, "CREATE TABLE ... SELECT, inserting a new key"; +Warnings: +Note 1050 Table 'v1' already exists +set @id=last_insert_id(); +select * from t1; +id operation +1 CREATE TABLE ... SELECT, inserting a new key +select * from t1_op_log; +operation +Before INSERT, new=CREATE TABLE ... SELECT, inserting a new key +After INSERT, new=CREATE TABLE ... SELECT, inserting a new key +truncate t1_op_log; +create table if not exists v1 replace +select @id, "CREATE TABLE ... REPLACE SELECT, deleting a duplicate key"; +Warnings: +Note 1050 Table 'v1' already exists +select * from t1; +id operation +1 CREATE TABLE ... REPLACE SELECT, deleting a duplicate key +select * from t1_op_log; +operation +Before INSERT, new=CREATE TABLE ... REPLACE SELECT, deleting a duplicate key +Before DELETE, old=CREATE TABLE ... SELECT, inserting a new key +After DELETE, old=CREATE TABLE ... SELECT, inserting a new key +After INSERT, new=CREATE TABLE ... REPLACE SELECT, deleting a duplicate key +truncate t1; +truncate t1_op_log; +insert into v1 (id, operation) +select NULL, "INSERT ... SELECT, inserting a new key"; +set @id=last_insert_id(); +select * from t1; +id operation +1 INSERT ... SELECT, inserting a new key +select * from t1_op_log; +operation +Before INSERT, new=INSERT ... SELECT, inserting a new key +After INSERT, new=INSERT ... SELECT, inserting a new key +truncate t1_op_log; +insert into v1 (id, operation) +select @id, +"INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate" +on duplicate key update id=NULL, +operation="INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate"; +select * from t1; +id operation +0 INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate +select * from t1_op_log; +operation +Before INSERT, new=INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate +Before UPDATE, new=INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate, old=INSERT ... SELECT, inserting a new key +After UPDATE, new=INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate, old=INSERT ... SELECT, inserting a new key +truncate t1; +truncate t1_op_log; +replace into v1 (id, operation) +select NULL, "REPLACE ... SELECT, inserting a new key"; +set @id=last_insert_id(); +select * from t1; +id operation +1 REPLACE ... SELECT, inserting a new key +select * from t1_op_log; +operation +Before INSERT, new=REPLACE ... SELECT, inserting a new key +After INSERT, new=REPLACE ... SELECT, inserting a new key +truncate t1_op_log; +replace into v1 (id, operation) +select @id, "REPLACE ... SELECT, deleting a duplicate"; +select * from t1; +id operation +1 REPLACE ... SELECT, deleting a duplicate +select * from t1_op_log; +operation +Before INSERT, new=REPLACE ... SELECT, deleting a duplicate +Before DELETE, old=REPLACE ... SELECT, inserting a new key +After DELETE, old=REPLACE ... SELECT, inserting a new key +After INSERT, new=REPLACE ... SELECT, deleting a duplicate +truncate t1; +truncate t1_op_log; +insert into v1 (id, operation) values (1, "INSERT for multi-DELETE"); +insert into t2 (id) values (1); +delete v1.*, t2.* from v1, t2 where v1.id=1; +select * from t1; +id operation +select * from t2; +id +select * from t1_op_log; +operation +Before INSERT, new=INSERT for multi-DELETE +After INSERT, new=INSERT for multi-DELETE +Before DELETE, old=INSERT for multi-DELETE +After DELETE, old=INSERT for multi-DELETE +truncate t1; +truncate t2; +truncate t1_op_log; +insert into v1 (id, operation) values (1, "INSERT for multi-UPDATE"); +insert into t2 (id) values (1); +update v1, t2 set v1.id=2, operation="multi-UPDATE" where v1.id=1; +update v1, t2 +set t2.id=3, operation="multi-UPDATE, SET for t2, but the trigger is fired" where v1.id=2; +select * from t1; +id operation +2 multi-UPDATE, SET for t2, but the trigger is fired +select * from t2; +id +3 +select * from t1_op_log; +operation +Before INSERT, new=INSERT for multi-UPDATE +After INSERT, new=INSERT for multi-UPDATE +Before UPDATE, new=multi-UPDATE, old=INSERT for multi-UPDATE +After UPDATE, new=multi-UPDATE, old=INSERT for multi-UPDATE +Before UPDATE, new=multi-UPDATE, SET for t2, but the trigger is fired, old=multi-UPDATE +After UPDATE, new=multi-UPDATE, SET for t2, but the trigger is fired, old=multi-UPDATE +drop view v1; +drop table t1, t2, t1_op_log; End of 5.0 tests diff --git a/mysql-test/t/trigger-trans.test b/mysql-test/t/trigger-trans.test index 5c135d98878..8103a1ba0b1 100644 --- a/mysql-test/t/trigger-trans.test +++ b/mysql-test/t/trigger-trans.test @@ -49,4 +49,84 @@ insert into t1 values ('The Pie', 50, 1, 1); select * from t1; drop table t1; -# End of 5.0 tests +--echo +--echo Bug#26141 mixing table types in trigger causes full +--echo table lock on innodb table +--echo +--echo Ensure we do not open and lock tables for the triggers we do not +--echo fire. +--echo +--disable_warnings +drop table if exists t1, t2, t3; +drop trigger if exists trg_bug26141_au; +drop trigger if exists trg_bug26141_ai; +--enable_warnings +# Note, for InnoDB to allow concurrent UPDATE and INSERT the +# table must have a unique key. +create table t1 (c int primary key) engine=innodb; +create table t2 (c int) engine=myisam; +create table t3 (c int) engine=myisam; +insert into t1 (c) values (1); +delimiter |; + +create trigger trg_bug26141_ai after insert on t1 +for each row +begin + insert into t2 (c) values (1); +# We need the 'sync' lock to synchronously wait in connection 2 till +# the moment when the trigger acquired all the locks. + select release_lock("lock_bug26141_sync") into @a; +# 1000 is time in seconds of lock wait timeout -- this is a way +# to cause a manageable sleep up to 1000 seconds + select get_lock("lock_bug26141_wait", 1000) into @a; +end| + +create trigger trg_bug26141_au after update on t1 +for each row +begin + insert into t3 (c) values (1); +end| +delimiter ;| + +# Establish an alternative connection. +--connect (connection_aux,localhost,root,,test,,) +--connect (connection_update,localhost,root,,test,,) + +connection connection_aux; +# Lock the wait lock, it must not be locked, so specify zero timeout. +select get_lock("lock_bug26141_wait", 0); + +# +connection default; +# +# Run the trigger synchronously +# +select get_lock("lock_bug26141_sync", /* must not be priorly locked */ 0); +# Will acquire the table level locks, perform the insert into t2, +# release the sync lock and block on the wait lock. +send insert into t1 (c) values (2); + +connection connection_update; +# Wait for the trigger to acquire its locks and unlock the sync lock. +select get_lock("lock_bug26141_sync", 1000); +# +# This must continue: after the fix for the bug, we do not +# open tables for t2, and with c=4 innobase allows the update +# to run concurrently with insert. +update t1 set c=3 where c=1; +select release_lock("lock_bug26141_sync"); +connection connection_aux; +select release_lock("lock_bug26141_wait"); +connection default; +reap; +select * from t1; +select * from t2; +select * from t3; + +# Drops the trigger as well. +drop table t1, t2, t3; +disconnect connection_update; +disconnect connection_aux; + + +--echo End of 5.0 tests diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index 0fa92f33de2..a6390036322 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -1828,5 +1828,370 @@ DROP TRIGGER t1_test; DROP TABLE t1,t2; SET SESSION LOW_PRIORITY_UPDATES=DEFAULT; SET GLOBAL LOW_PRIORITY_UPDATES=DEFAULT; +--echo +--echo Bug#28502 Triggers that update another innodb table will block +--echo on X lock unnecessarily +--echo +--echo Ensure we do not open and lock tables for triggers we do not fire. +--echo +--disable_warnings +drop table if exists t1, t2; +drop trigger if exists trg_bug28502_au; +--enable_warnings + +create table t1 (id int, count int); +create table t2 (id int); +delimiter |; + +create trigger trg_bug28502_au before update on t2 +for each row +begin + if (new.id is not null) then + update t1 set count= count + 1 where id = old.id; + end if; +end| + +delimiter ;| +insert into t1 (id, count) values (1, 0); + +lock table t1 write; + +--connect (connection_insert, localhost, root, , test, , ) +connection connection_insert; +# Is expected to pass. +insert into t2 set id=1; +connection default; +unlock tables; +update t2 set id=1 where id=1; +select * from t1; +select * from t2; +# Will drop the trigger +drop table t1, t2; +disconnect connection_insert; +--echo +--echo Additionally, provide test coverage for triggers and +--echo all MySQL data changing commands. +--echo +--disable_warnings +drop table if exists t1, t2, t1_op_log; +drop view if exists v1; +drop trigger if exists trg_bug28502_bi; +drop trigger if exists trg_bug28502_ai; +drop trigger if exists trg_bug28502_bu; +drop trigger if exists trg_bug28502_au; +drop trigger if exists trg_bug28502_bd; +drop trigger if exists trg_bug28502_ad; +--enable_warnings +create table t1 (id int primary key auto_increment, operation varchar(255)); +create table t2 (id int primary key); +create table t1_op_log(operation varchar(255)); +create view v1 as select * from t1; +create trigger trg_bug28502_bi before insert on t1 +for each row + insert into t1_op_log (operation) + values (concat("Before INSERT, new=", new.operation)); + +create trigger trg_bug28502_ai after insert on t1 +for each row + insert into t1_op_log (operation) + values (concat("After INSERT, new=", new.operation)); + +create trigger trg_bug28502_bu before update on t1 +for each row + insert into t1_op_log (operation) + values (concat("Before UPDATE, new=", new.operation, + ", old=", old.operation)); + +create trigger trg_bug28502_au after update on t1 +for each row + insert into t1_op_log (operation) + values (concat("After UPDATE, new=", new.operation, + ", old=", old.operation)); + +create trigger trg_bug28502_bd before delete on t1 +for each row + insert into t1_op_log (operation) + values (concat("Before DELETE, old=", old.operation)); + +create trigger trg_bug28502_ad after delete on t1 +for each row + insert into t1_op_log (operation) + values (concat("After DELETE, old=", old.operation)); + +insert into t1 (operation) values ("INSERT"); + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +update t1 set operation="UPDATE" where id=@id; + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +delete from t1 where id=@id; + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +insert into t1 (id, operation) values +(NULL, "INSERT ON DUPLICATE KEY UPDATE, inserting a new key") +on duplicate key update id=NULL, operation="Should never happen"; + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +insert into t1 (id, operation) values +(@id, "INSERT ON DUPLICATE KEY UPDATE, the key value is the same") +on duplicate key update id=NULL, +operation="INSERT ON DUPLICATE KEY UPDATE, updating the duplicate"; + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +replace into t1 values (NULL, "REPLACE, inserting a new key"); + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +replace into t1 values (@id, "REPLACE, deleting the duplicate"); + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +create table if not exists t1 +select NULL, "CREATE TABLE ... SELECT, inserting a new key"; + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +create table if not exists t1 replace +select @id, "CREATE TABLE ... REPLACE SELECT, deleting a duplicate key"; + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +insert into t1 (id, operation) +select NULL, "INSERT ... SELECT, inserting a new key"; + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +insert into t1 (id, operation) +select @id, +"INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate" +on duplicate key update id=NULL, +operation="INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate"; + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +replace into t1 (id, operation) +select NULL, "REPLACE ... SELECT, inserting a new key"; + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +replace into t1 (id, operation) +select @id, "REPLACE ... SELECT, deleting a duplicate"; + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +insert into t1 (id, operation) values (1, "INSERT for multi-DELETE"); +insert into t2 (id) values (1); +delete t1.*, t2.* from t1, t2 where t1.id=1; + +select * from t1; +select * from t2; +select * from t1_op_log; +truncate t1; +truncate t2; +truncate t1_op_log; + +insert into t1 (id, operation) values (1, "INSERT for multi-UPDATE"); +insert into t2 (id) values (1); +update t1, t2 set t1.id=2, operation="multi-UPDATE" where t1.id=1; +update t1, t2 +set t2.id=3, operation="multi-UPDATE, SET for t2, but the trigger is fired" where t1.id=2; + +select * from t1; +select * from t2; +select * from t1_op_log; +truncate table t1; +truncate table t2; +truncate table t1_op_log; + +--echo +--echo Now do the same but use a view instead of the base table. +--echo + +insert into v1 (operation) values ("INSERT"); + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +update v1 set operation="UPDATE" where id=@id; + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +delete from v1 where id=@id; + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +insert into v1 (id, operation) values +(NULL, "INSERT ON DUPLICATE KEY UPDATE, inserting a new key") +on duplicate key update id=NULL, operation="Should never happen"; + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +insert into v1 (id, operation) values +(@id, "INSERT ON DUPLICATE KEY UPDATE, the key value is the same") +on duplicate key update id=NULL, +operation="INSERT ON DUPLICATE KEY UPDATE, updating the duplicate"; + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +replace into v1 values (NULL, "REPLACE, inserting a new key"); + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +replace into v1 values (@id, "REPLACE, deleting the duplicate"); + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +create table if not exists v1 +select NULL, "CREATE TABLE ... SELECT, inserting a new key"; + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +create table if not exists v1 replace +select @id, "CREATE TABLE ... REPLACE SELECT, deleting a duplicate key"; + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +insert into v1 (id, operation) +select NULL, "INSERT ... SELECT, inserting a new key"; + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +insert into v1 (id, operation) +select @id, +"INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate" +on duplicate key update id=NULL, +operation="INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, updating a duplicate"; + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +replace into v1 (id, operation) +select NULL, "REPLACE ... SELECT, inserting a new key"; + +set @id=last_insert_id(); + +select * from t1; +select * from t1_op_log; +truncate t1_op_log; + +replace into v1 (id, operation) +select @id, "REPLACE ... SELECT, deleting a duplicate"; + +select * from t1; +select * from t1_op_log; +truncate t1; +truncate t1_op_log; + +insert into v1 (id, operation) values (1, "INSERT for multi-DELETE"); +insert into t2 (id) values (1); + +delete v1.*, t2.* from v1, t2 where v1.id=1; + +select * from t1; +select * from t2; +select * from t1_op_log; +truncate t1; +truncate t2; +truncate t1_op_log; + +insert into v1 (id, operation) values (1, "INSERT for multi-UPDATE"); +insert into t2 (id) values (1); +update v1, t2 set v1.id=2, operation="multi-UPDATE" where v1.id=1; +update v1, t2 +set t2.id=3, operation="multi-UPDATE, SET for t2, but the trigger is fired" where v1.id=2; + +select * from t1; +select * from t2; +select * from t1_op_log; + +drop view v1; +drop table t1, t2, t1_op_log; + +# +# TODO: test LOAD DATA INFILE --echo End of 5.0 tests -- cgit v1.2.1 From e08e63b192ac37b372b1cbb9014ef8180527e48a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jul 2007 23:09:55 +0400 Subject: Bug#29739: Incorrect time comparison in BETWEEN. Time values were compared by the BETWEEN function as strings. This led to a wrong result in cases when some of arguments are less than 100 hours and other are greater. Now if all 3 arguments of the BETWEEN function are of the TIME type then they are compared as integers. mysql-test/t/type_time.test: Added a tes tcase for the bug#29739: Incorrect time comparison in BETWEEN. mysql-test/r/type_time.result: Added a tes tcase for the bug#29739: Incorrect time comparison in BETWEEN. sql/item_cmpfunc.cc: Bug#29739: Incorrect time comparison in BETWEEN. Now if all 3 arguments of the BETWEEN function are of the TIME type then they are compared as integers. --- mysql-test/r/type_time.result | 6 ++++++ mysql-test/t/type_time.test | 8 ++++++++ 2 files changed, 14 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index 6124f6e39f1..71bd8b68a0b 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -103,3 +103,9 @@ cast('100:55:50' as time) > cast('024:00:00' as time) select cast('300:55:50' as time) > cast('240:00:00' as time); cast('300:55:50' as time) > cast('240:00:00' as time) 1 +create table t1(f1 time, f2 time); +insert into t1 values('20:00:00','150:00:00'); +select 1 from t1 where cast('100:00:00' as time) between f1 and f2; +1 +1 +drop table t1; diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test index d294e53a12f..82d701e29b5 100644 --- a/mysql-test/t/type_time.test +++ b/mysql-test/t/type_time.test @@ -50,3 +50,11 @@ select cast('300:55:50' as time) < cast('240:00:00' as time); select cast('100:55:50' as time) > cast('24:00:00' as time); select cast('100:55:50' as time) > cast('024:00:00' as time); select cast('300:55:50' as time) > cast('240:00:00' as time); + +# +# Bug#29739: Incorrect time comparison in BETWEEN. +# +create table t1(f1 time, f2 time); +insert into t1 values('20:00:00','150:00:00'); +select 1 from t1 where cast('100:00:00' as time) between f1 and f2; +drop table t1; -- cgit v1.2.1 From 62738bf97e7a653030361f0dcedf0f4a5c97388d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 03:25:27 +0500 Subject: BUG#29445 - match ... against () never returns Part 2: Searching fulltext index for a word with boolean mode truncation operator may cause infinite loop. The problem was that "smarter index merge" was used with "trunc-words", which must never happen. Affects 5.1 only. mysql-test/r/fulltext.result: Addition to a test case for BUG#29445. mysql-test/t/fulltext.test: Addition to a test case for BUG#29445. storage/myisam/ft_boolean_search.c: Fulltext "smarter index merge" optimization assumes that rows it gets are ordered by doc_id. That is not the case when we search for a word with truncation operator. It may return rows in random order. Thus we may not use "smarter index merge" optimization with "trunc-words". Also fixed compiler warning introduced by Part 1 patch. --- mysql-test/r/fulltext.result | 5 ++++- mysql-test/t/fulltext.test | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 02b115cb6dc..a649f70b6f2 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -485,7 +485,10 @@ INSERT INTO t1 VALUES('Offside'),('City Of God'); SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE); a City Of God -SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of)*' IN BOOLEAN MODE); +SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of*)' IN BOOLEAN MODE); +a +City Of God +SELECT a FROM t1 WHERE MATCH a AGAINST ('+city* of*' IN BOOLEAN MODE); a City Of God DROP TABLE t1; diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index b1bf0036c70..ecb4a0e5691 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -414,7 +414,8 @@ DROP TABLE t1; CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a)); INSERT INTO t1 VALUES('Offside'),('City Of God'); SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE); -SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of)*' IN BOOLEAN MODE); +SELECT a FROM t1 WHERE MATCH a AGAINST ('+city (of*)' IN BOOLEAN MODE); +SELECT a FROM t1 WHERE MATCH a AGAINST ('+city* of*' IN BOOLEAN MODE); DROP TABLE t1; # End of 4.1 tests -- cgit v1.2.1 From bae6562762e8a35793faf5c2708b1401f81f81fe Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 03:29:25 +0500 Subject: BUG#29464 - load data infile into table with big5 chinese fulltext index hangs 100% cpu Moved a test case for BUG#29464 into fulltext3.test, since it requires big5 character set. mysql-test/r/fulltext.result: Moved a test case for BUG#29464 into fulltext3.test, since it requires big5 character set. mysql-test/r/fulltext3.result: Moved a test case for BUG#29464 into fulltext3.test, since it requires big5 character set. mysql-test/t/fulltext.test: Moved a test case for BUG#29464 into fulltext3.test, since it requires big5 character set. mysql-test/t/fulltext3.test: Moved a test case for BUG#29464 into fulltext3.test, since it requires big5 character set. --- mysql-test/r/fulltext.result | 4 ---- mysql-test/r/fulltext3.result | 4 ++++ mysql-test/t/fulltext.test | 9 --------- mysql-test/t/fulltext3.test | 10 ++++++++++ 4 files changed, 14 insertions(+), 13 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index a649f70b6f2..96ebb9bf254 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -476,10 +476,6 @@ ALTER TABLE t1 DISABLE KEYS; SELECT * FROM t1 WHERE MATCH(a) AGAINST('test'); ERROR HY000: Can't find FULLTEXT index matching the column list DROP TABLE t1; -CREATE TABLE t1(a VARCHAR(2) CHARACTER SET big5 COLLATE big5_chinese_ci, -FULLTEXT(a)); -INSERT INTO t1 VALUES(0xA3C2); -DROP TABLE t1; CREATE TABLE t1(a VARCHAR(20), FULLTEXT(a)); INSERT INTO t1 VALUES('Offside'),('City Of God'); SELECT a FROM t1 WHERE MATCH a AGAINST ('+city of*' IN BOOLEAN MODE); diff --git a/mysql-test/r/fulltext3.result b/mysql-test/r/fulltext3.result index 019d5f472ed..4ec48369ad1 100644 --- a/mysql-test/r/fulltext3.result +++ b/mysql-test/r/fulltext3.result @@ -11,3 +11,7 @@ Table Op Msg_type Msg_text test.t1 check status OK SET NAMES latin1; DROP TABLE t1; +CREATE TABLE t1(a VARCHAR(2) CHARACTER SET big5 COLLATE big5_chinese_ci, +FULLTEXT(a)); +INSERT INTO t1 VALUES(0xA3C2); +DROP TABLE t1; diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index ecb4a0e5691..1f8a3b82cfd 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -399,15 +399,6 @@ ALTER TABLE t1 DISABLE KEYS; SELECT * FROM t1 WHERE MATCH(a) AGAINST('test'); DROP TABLE t1; -# -# BUG#29464 - load data infile into table with big5 chinese fulltext index -# hangs 100% cpu -# -CREATE TABLE t1(a VARCHAR(2) CHARACTER SET big5 COLLATE big5_chinese_ci, -FULLTEXT(a)); -INSERT INTO t1 VALUES(0xA3C2); -DROP TABLE t1; - # # BUG#29445 - match ... against () never returns # diff --git a/mysql-test/t/fulltext3.test b/mysql-test/t/fulltext3.test index a57fd48daaa..1b6a07c540f 100644 --- a/mysql-test/t/fulltext3.test +++ b/mysql-test/t/fulltext3.test @@ -22,3 +22,13 @@ DROP TABLE t1; # End of 5.0 tests +# +# BUG#29464 - load data infile into table with big5 chinese fulltext index +# hangs 100% cpu +# +CREATE TABLE t1(a VARCHAR(2) CHARACTER SET big5 COLLATE big5_chinese_ci, +FULLTEXT(a)); +INSERT INTO t1 VALUES(0xA3C2); +DROP TABLE t1; + +# End of 5.1 tests -- cgit v1.2.1 From b7527f6b72cbd3d919671ed15262b1893166e125 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 12 Jul 2007 22:06:33 -0400 Subject: Bug #29579 Clients using SSL can hang the server Added an option to yassl to allow "quiet shutdown" like openssl does. This option causes the SSL libs to NOT perform the close_notify handshake during shutdown. This fixes a hang we experience because we hold a lock during socket shutdown. mysql-test/t/ssl_big.test: BitKeeper file /Users/dkatz/50/mysql-test/t/ssl_big.test mysql-test/r/ssl-big.result: BitKeeper file /Users/dkatz/50/mysql-test/r/ssl-big.result client/mysqltest.c: Added new command to mysqltest to send a quit command to the server, but to not close the actual socket on our end. Also changed code to reuse connection slots, so that the tests can open and close sockets in a loop. extra/yassl/include/openssl/ssl.h: Added C accessors to the quietShutdown option. extra/yassl/include/yassl_int.hpp: Added quietShutdown_ member and accessor methods to the SSL class. extra/yassl/src/ssl.cpp: Added accessors to get/set the quietShutdown option and to not perform the shutdown handshake if quietShutdown is set. extra/yassl/src/yassl_int.cpp: Added quietShutdown_ member and accessor methods to the SSL class. vio/viossl.c: Added line to set the quiet_shutdown option before shutting down the socket. mysql-test/t/ssl-big.test: Added a test that causes an unpatched server to hang during SSL socket shutdown. --- mysql-test/r/ssl-big.result | 3 +++ mysql-test/t/ssl-big.test | 56 ++++++++++++++++++++++++++++++++++++++++ mysql-test/t/ssl_big.test | 62 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 mysql-test/r/ssl-big.result create mode 100644 mysql-test/t/ssl-big.test create mode 100644 mysql-test/t/ssl_big.test (limited to 'mysql-test') diff --git a/mysql-test/r/ssl-big.result b/mysql-test/r/ssl-big.result new file mode 100644 index 00000000000..39c4f34e46c --- /dev/null +++ b/mysql-test/r/ssl-big.result @@ -0,0 +1,3 @@ +DROP TABLE IF EXISTS t1, t2; +create table t1 (a int); +drop table t1; diff --git a/mysql-test/t/ssl-big.test b/mysql-test/t/ssl-big.test new file mode 100644 index 00000000000..099c64df08f --- /dev/null +++ b/mysql-test/t/ssl-big.test @@ -0,0 +1,56 @@ +# Turn on ssl between the client and server +# and run a number of tests + +-- source include/have_ssl.inc +-- source include/big_test.inc + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +# +# Bug #29579 Clients using SSL can hang the server +# + +connect (ssl_con,localhost,root,,,,,SSL); + +create table t1 (a int); + +disconnect ssl_con; + + +--disable_query_log +--disable_result_log + +let $count= 2000; +while ($count) +{ + connect (ssl_con,localhost,root,,,,,SSL); + + eval insert into t1 values ($count); + dec $count; + + # This select causes the net buffer to fill as the server sends the results + # but the client doesn't reap the results. The results are larger each time + # through the loop, so that eventually the buffer is completely full + # at the exact moment the server attempts to the close the connection with + # the lock held. + send select * from t1; + + # now send the quit the command so the server will initiate the shutdown. + send_quit ssl_con; + + # if the server is hung, this will hang too: + connect (ssl_con2,localhost,root,,,,,SSL); + + # no hang if we get here, close and retry + disconnect ssl_con2; + disconnect ssl_con; +} +--enable_query_log +--enable_result_log + +connect (ssl_con,localhost,root,,,,,SSL); + +drop table t1; + diff --git a/mysql-test/t/ssl_big.test b/mysql-test/t/ssl_big.test new file mode 100644 index 00000000000..58c11899e55 --- /dev/null +++ b/mysql-test/t/ssl_big.test @@ -0,0 +1,62 @@ +# Turn on ssl between the client and server +# and run a number of tests + +-- source include/have_ssl.inc + +connect (ssl_con,localhost,root,,,,,SSL); + +# Check ssl turned on +SHOW STATUS LIKE 'Ssl_cipher'; + +# Source select test case +-- source include/common-tests.inc + +# Check ssl turned on +SHOW STATUS LIKE 'Ssl_cipher'; + +disconnect ssl_con; + + +# +# Bug #29579 Clients using SSL can hang the server +# + +connect (ssl_con,localhost,root,,,,,SSL); + +create table t1 (a int); + +disconnect ssl_con; + +let $count= 2000; +while ($count) +{ + + connect (ssl_con,localhost,root,,,,,SSL); + + let $i= 1; + while ($i) + { + eval insert into t1 values ($count); + dec $count; + dec $i; + } + + # This select causes the net buffer to fill as the server sends the results + # but the client doesn't reap the results. The results are larger each time + # through the loop, so that eventually the buffer is completely full + # at the exact moment the server attempts to the close the connection with + # the lock held. + send select * from t1; + + # now send the quit the command so the server will initiate the shutdown. + send_quit ssl_con; + + # if the server is hung, this will hang too: + connect (ssl_con2,localhost,root,,,,,SSL); + + # no hang if we get here, close and retry + disconnect ssl_con2; + + disconnect ssl_con; +} + -- cgit v1.2.1 From 4bbeef1c123213fc73fe8bb23f77607176c06086 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 00:45:54 -0400 Subject: Minor fixes for test failures and compiler warnings for Bug #29579. BitKeeper/deleted/.del-ssl_big.test: Delete: mysql-test/t/ssl_big.test extra/yassl/include/yassl_int.hpp: added comment extra/yassl/src/yassl_int.cpp: Changed init order to fix a compiler warning. mysql-test/r/mysqltest.result: There is no limit to connections anymore. mysql-test/t/mysqltest.test: There is no limit to connections anymore. --- mysql-test/r/mysqltest.result | 2 +- mysql-test/t/mysqltest.test | 2 +- mysql-test/t/ssl_big.test | 62 ------------------------------------------- 3 files changed, 2 insertions(+), 64 deletions(-) delete mode 100644 mysql-test/t/ssl_big.test (limited to 'mysql-test') diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 8cf5f99dca3..55f78d22272 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -420,7 +420,7 @@ mysqltest: At line 1: query 'connect con2,localhost,root,,illegal_db' failed: 1 mysqltest: At line 1: Illegal argument for port: 'illegal_port' mysqltest: At line 1: Illegal option to connect: SMTP OK -mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 7: Connection limit exhausted, you can have max 128 connections +mysqltest: The test didn't produce any output mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET); diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index aa0e2f89382..b01579dce53 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1263,7 +1263,7 @@ while ($i) EOF --exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK;" | $MYSQL_TEST 2>&1 -# Repeat connect/disconnect, exceed max number of connections +# Repeat connect/disconnect --write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql let $i=200; while ($i) diff --git a/mysql-test/t/ssl_big.test b/mysql-test/t/ssl_big.test deleted file mode 100644 index 58c11899e55..00000000000 --- a/mysql-test/t/ssl_big.test +++ /dev/null @@ -1,62 +0,0 @@ -# Turn on ssl between the client and server -# and run a number of tests - --- source include/have_ssl.inc - -connect (ssl_con,localhost,root,,,,,SSL); - -# Check ssl turned on -SHOW STATUS LIKE 'Ssl_cipher'; - -# Source select test case --- source include/common-tests.inc - -# Check ssl turned on -SHOW STATUS LIKE 'Ssl_cipher'; - -disconnect ssl_con; - - -# -# Bug #29579 Clients using SSL can hang the server -# - -connect (ssl_con,localhost,root,,,,,SSL); - -create table t1 (a int); - -disconnect ssl_con; - -let $count= 2000; -while ($count) -{ - - connect (ssl_con,localhost,root,,,,,SSL); - - let $i= 1; - while ($i) - { - eval insert into t1 values ($count); - dec $count; - dec $i; - } - - # This select causes the net buffer to fill as the server sends the results - # but the client doesn't reap the results. The results are larger each time - # through the loop, so that eventually the buffer is completely full - # at the exact moment the server attempts to the close the connection with - # the lock held. - send select * from t1; - - # now send the quit the command so the server will initiate the shutdown. - send_quit ssl_con; - - # if the server is hung, this will hang too: - connect (ssl_con2,localhost,root,,,,,SSL); - - # no hang if we get here, close and retry - disconnect ssl_con2; - - disconnect ssl_con; -} - -- cgit v1.2.1 From b806ca22c6bcab929c0121d23f686a0484e64ed1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 13:56:22 +0300 Subject: Bug 29325: moved the test from create_not_windows to symlink. --- mysql-test/r/create_not_windows.result | 22 -------------------- mysql-test/r/symlink.result | 24 +++++++++++++++++++++ mysql-test/t/create_not_windows.test | 38 ---------------------------------- mysql-test/t/symlink.test | 36 ++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 60 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/create_not_windows.result b/mysql-test/r/create_not_windows.result index a07ffa82610..b975c98c2b1 100644 --- a/mysql-test/r/create_not_windows.result +++ b/mysql-test/r/create_not_windows.result @@ -12,25 +12,3 @@ about:text CREATE TABLE `about:text` ( PRIMARY KEY (`_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table `about:text`; -CREATE DATABASE db1; -CREATE DATABASE db2; -USE db2; -INSERT INTO db2.t1 VALUES (1); -SELECT * FROM db2.t1; -b -1 -RESET QUERY CACHE; -USE db1; -SET SESSION keep_files_on_create = TRUE; -CREATE TABLE t1 (a INT) ENGINE MYISAM; -ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17) -CREATE TABLE t3 (a INT) Engine=MyISAM; -INSERT INTO t3 VALUES (1),(2),(3); -TRUNCATE TABLE t3; -SELECT * from t3; -a -SET SESSION keep_files_on_create = DEFAULT; -DROP TABLE db2.t1, db1.t3; -DROP DATABASE db1; -DROP DATABASE db2; -USE test; diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 4725bcc0ac9..02c3a085eef 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -133,4 +133,28 @@ a 42 drop table t1; End of 4.1 tests +CREATE DATABASE db1; +CREATE DATABASE db2; +USE db2; +CREATE TABLE t1 (b INT) ENGINE MYISAM +DATA DIRECTORY = '/home/kgeorge/mysql/work/B29325-winfix-5.0-opt/mysql-test/var/master-data/db1/'; +INSERT INTO db2.t1 VALUES (1); +SELECT * FROM db2.t1; +b +1 +RESET QUERY CACHE; +USE db1; +SET SESSION keep_files_on_create = TRUE; +CREATE TABLE t1 (a INT) ENGINE MYISAM; +ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17) +CREATE TABLE t3 (a INT) Engine=MyISAM; +INSERT INTO t3 VALUES (1),(2),(3); +TRUNCATE TABLE t3; +SELECT * from t3; +a +SET SESSION keep_files_on_create = DEFAULT; +DROP TABLE db2.t1, db1.t3; +DROP DATABASE db1; +DROP DATABASE db2; +USE test; End of 5.0 tests diff --git a/mysql-test/t/create_not_windows.test b/mysql-test/t/create_not_windows.test index c6547b1376b..7e51ff51024 100644 --- a/mysql-test/t/create_not_windows.test +++ b/mysql-test/t/create_not_windows.test @@ -18,42 +18,4 @@ show create table `about:text`; drop table `about:text`; -# -# Bug #29325: create table overwrites .MYD file of other table (datadir) -# - -CREATE DATABASE db1; -CREATE DATABASE db2; - -USE db2; ---disable_query_log -eval CREATE TABLE t1 (b INT) ENGINE MYISAM -DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/'; ---enable_query_log - -INSERT INTO db2.t1 VALUES (1); -SELECT * FROM db2.t1; -RESET QUERY CACHE; - -USE db1; - -#no warning from create table -SET SESSION keep_files_on_create = TRUE; ---disable_abort_on_error -CREATE TABLE t1 (a INT) ENGINE MYISAM; ---enable_abort_on_error - -CREATE TABLE t3 (a INT) Engine=MyISAM; -INSERT INTO t3 VALUES (1),(2),(3); -TRUNCATE TABLE t3; -SELECT * from t3; - -SET SESSION keep_files_on_create = DEFAULT; - -DROP TABLE db2.t1, db1.t3; -DROP DATABASE db1; -DROP DATABASE db2; -USE test; - - # End of 5.0 tests diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index d79b6905224..46a9ead5829 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -178,4 +178,40 @@ drop table t1; --echo End of 4.1 tests +# +# Bug #29325: create table overwrites .MYD file of other table (datadir) +# + +CREATE DATABASE db1; +CREATE DATABASE db2; + +USE db2; +eval CREATE TABLE t1 (b INT) ENGINE MYISAM +DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/'; + +INSERT INTO db2.t1 VALUES (1); +SELECT * FROM db2.t1; +RESET QUERY CACHE; + +USE db1; + +#no warning from create table +SET SESSION keep_files_on_create = TRUE; +--disable_abort_on_error +CREATE TABLE t1 (a INT) ENGINE MYISAM; +--enable_abort_on_error + +CREATE TABLE t3 (a INT) Engine=MyISAM; +INSERT INTO t3 VALUES (1),(2),(3); +TRUNCATE TABLE t3; +SELECT * from t3; + +SET SESSION keep_files_on_create = DEFAULT; + +DROP TABLE db2.t1, db1.t3; +DROP DATABASE db1; +DROP DATABASE db2; +USE test; + + --echo End of 5.0 tests -- cgit v1.2.1 From fe6d5d631d52f28188f1c45dda661cad54e95c41 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 14:31:40 +0200 Subject: avoid some sporadic startup issues --- mysql-test/include/have_ndb.inc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/have_ndb.inc b/mysql-test/include/have_ndb.inc index cb2f2f7cd9e..d087a45a15a 100644 --- a/mysql-test/include/have_ndb.inc +++ b/mysql-test/include/have_ndb.inc @@ -1,6 +1,10 @@ # Check that server is compiled and started with support for NDB -disable_query_log; ---require r/true.require -select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; ---source include/ndb_not_readonly.inc -enable_query_log; +#disable_query_log; +#--require r/true.require +#select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; +#--source include/ndb_not_readonly.inc +#enable_query_log; +# always make sure we have both mysql servers started ok before test starts +# there are some initial startup bugs that are avoided by doing this, avoiding sporadic +# failures in mysql-test-run +--source include/have_multi_ndb.inc -- cgit v1.2.1 From 2a0498c0f9a67676aedef2699fe5a14150ce5f4d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 16:32:29 +0300 Subject: disabled the output of the full path in tesing bug 29325 --- mysql-test/r/symlink.result | 2 -- mysql-test/t/symlink.test | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 02c3a085eef..18299bf4298 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -136,8 +136,6 @@ End of 4.1 tests CREATE DATABASE db1; CREATE DATABASE db2; USE db2; -CREATE TABLE t1 (b INT) ENGINE MYISAM -DATA DIRECTORY = '/home/kgeorge/mysql/work/B29325-winfix-5.0-opt/mysql-test/var/master-data/db1/'; INSERT INTO db2.t1 VALUES (1); SELECT * FROM db2.t1; b diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 46a9ead5829..8c67a4c1048 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -186,8 +186,10 @@ CREATE DATABASE db1; CREATE DATABASE db2; USE db2; +--disable_query_log eval CREATE TABLE t1 (b INT) ENGINE MYISAM DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/'; +--enable_query_log INSERT INTO db2.t1 VALUES (1); SELECT * FROM db2.t1; -- cgit v1.2.1 From 23ab9bd4db3f8c497b0b88e46034f6c957946fce Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 16:06:12 +0200 Subject: update bug dependency on failing test mysql-test/suite/ndb/t/ndb_binlog_format.test: Rename: mysql-test/t/ndb_binlog_format.test -> mysql-test/suite/ndb/t/ndb_binlog_format.test mysql-test/suite/ndb/r/ndb_binlog_format.result: Rename: mysql-test/r/ndb_binlog_format.result -> mysql-test/suite/ndb/r/ndb_binlog_format.result --- mysql-test/r/ndb_binlog_format.result | 30 ---------------------- mysql-test/suite/ndb/r/ndb_binlog_format.result | 30 ++++++++++++++++++++++ mysql-test/suite/ndb/t/ndb_binlog_format.test | 33 +++++++++++++++++++++++++ mysql-test/suite/rpl_ndb/t/disabled.def | 5 ++-- mysql-test/t/ndb_binlog_format.test | 33 ------------------------- 5 files changed, 65 insertions(+), 66 deletions(-) delete mode 100644 mysql-test/r/ndb_binlog_format.result create mode 100644 mysql-test/suite/ndb/r/ndb_binlog_format.result create mode 100644 mysql-test/suite/ndb/t/ndb_binlog_format.test delete mode 100644 mysql-test/t/ndb_binlog_format.test (limited to 'mysql-test') diff --git a/mysql-test/r/ndb_binlog_format.result b/mysql-test/r/ndb_binlog_format.result deleted file mode 100644 index ed26060e2a4..00000000000 --- a/mysql-test/r/ndb_binlog_format.result +++ /dev/null @@ -1,30 +0,0 @@ -drop table if exists t1, t2, t3; -CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM; -CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE; -CREATE TABLE t3 (e INT, f INT) ENGINE=NDB; -RESET MASTER; -SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c; -START TRANSACTION; -INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f; -UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c; -COMMIT; -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2) -master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2) -master-bin.000001 # Query # # use `test`; UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2) -master-bin.000001 # Query # # use `test`; UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f -master-bin.000001 # Query # # use `test`; UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t3) -master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # COMMIT -DROP TABLE t1, t2, t3; diff --git a/mysql-test/suite/ndb/r/ndb_binlog_format.result b/mysql-test/suite/ndb/r/ndb_binlog_format.result new file mode 100644 index 00000000000..ed26060e2a4 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_binlog_format.result @@ -0,0 +1,30 @@ +drop table if exists t1, t2, t3; +CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM; +CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE; +CREATE TABLE t3 (e INT, f INT) ENGINE=NDB; +RESET MASTER; +SET SESSION BINLOG_FORMAT=STATEMENT; +INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2); +UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c; +START TRANSACTION; +INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2); +UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f; +UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c; +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2) +master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2) +master-bin.000001 # Query # # use `test`; UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2) +master-bin.000001 # Query # # use `test`; UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f +master-bin.000001 # Query # # use `test`; UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c +master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t3) +master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +DROP TABLE t1, t2, t3; diff --git a/mysql-test/suite/ndb/t/ndb_binlog_format.test b/mysql-test/suite/ndb/t/ndb_binlog_format.test new file mode 100644 index 00000000000..acb34bb388c --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_binlog_format.test @@ -0,0 +1,33 @@ +# +# test different behavior of ndb using different binlog formats +# + +-- source include/have_blackhole.inc +-- source include/have_ndb.inc +-- source include/have_log_bin.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +# +# Bug #29222 Statement mode replicates both statement and +# rows when writing to an NDB table +# +CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM; +CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE; +CREATE TABLE t3 (e INT, f INT) ENGINE=NDB; +RESET MASTER; +SET SESSION BINLOG_FORMAT=STATEMENT; +INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2); +UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c; +# A transaction here is not necessary, but I wanted to group the bad statements +START TRANSACTION; +INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2); +UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f; +UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c; +COMMIT; +--source include/show_binlog_events.inc +DROP TABLE t1, t2, t3; + diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def index f5c99129c89..e4c1d875a67 100644 --- a/mysql-test/suite/rpl_ndb/t/disabled.def +++ b/mysql-test/suite/rpl_ndb/t/disabled.def @@ -15,9 +15,8 @@ rpl_ndb_circular_simplex : BUG#27972 2007-04-20 mats Slave cannot start where it rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated rpl_ndb_2myisam : BUG#19227 Seems to pass currently rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD -rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement -rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement -#rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly +rpl_ndb_innodb2ndb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue +rpl_ndb_myisam2ndb : Bug#29549 rpl_ndb_myisam2ndb,rpl_ndb_innodb2ndb failed on Solaris for pack_length issue rpl_ndb_ddl : BUG#28798 2007-05-31 lars Valgrind failure in NDB rpl_ndb_mix_innodb : BUG#28123 rpl_ndb_mix_innodb.test casue slave to core on sol10-sparc-a rpl_ndb_ctype_ucs2_def : BUG#27404 util thd mysql_parse sig11 when mysqld default multibyte charset diff --git a/mysql-test/t/ndb_binlog_format.test b/mysql-test/t/ndb_binlog_format.test deleted file mode 100644 index acb34bb388c..00000000000 --- a/mysql-test/t/ndb_binlog_format.test +++ /dev/null @@ -1,33 +0,0 @@ -# -# test different behavior of ndb using different binlog formats -# - --- source include/have_blackhole.inc --- source include/have_ndb.inc --- source include/have_log_bin.inc - ---disable_warnings -drop table if exists t1, t2, t3; ---enable_warnings - -# -# Bug #29222 Statement mode replicates both statement and -# rows when writing to an NDB table -# -CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM; -CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE; -CREATE TABLE t3 (e INT, f INT) ENGINE=NDB; -RESET MASTER; -SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c; -# A transaction here is not necessary, but I wanted to group the bad statements -START TRANSACTION; -INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f; -UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c; -COMMIT; ---source include/show_binlog_events.inc -DROP TABLE t1, t2, t3; - -- cgit v1.2.1 From 38f4c6137a64192a962ad9d357055ced0f9150fa Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 19:13:40 +0400 Subject: BUG#29740: Wrong query results for index_merge/union over HEAP table. - return HA_KEY_SCAN_NOT_ROR flag for HASH indexes; - Fix ha_heap::cmp_ref() to work with BTREE index scans. mysql-test/r/index_merge.result: BUG#29740: testcase mysql-test/t/index_merge.test: BUG#29740: testcase sql/ha_heap.h: BUG#29740: Wrong query results for index_merge/union over HEAP table. - make HEAP table engine return HA_KEY_SCAN_NOT_ROR flag for HASH indexes,as HASH index does not guarantee any ordering for rows within the hash bucket. - Fix BTREE indexes: make ha_heap::cmp_ref() compare the rowids in the same way as ha_key_cmp() does. sql/opt_range.cc: BUG#29740: Fix comment about ROR scans. --- mysql-test/r/index_merge.result | 61 +++++++++++++++++++++++++++++++++++++++++ mysql-test/t/index_merge.test | 43 +++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/index_merge.result b/mysql-test/r/index_merge.result index 9456b4ec978..c7e4ead9eeb 100644 --- a/mysql-test/r/index_merge.result +++ b/mysql-test/r/index_merge.result @@ -455,3 +455,64 @@ a 1 UNLOCK TABLES; DROP TABLE t1, t2; +CREATE TABLE `t1` ( +`a` int(11) DEFAULT NULL, +`filler` char(200) DEFAULT NULL, +`b` int(11) DEFAULT NULL, +KEY `a` (`a`), +KEY `b` (`b`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +insert into t1 values +(0, 'filler', 0), (1, 'filler', 1), (2, 'filler', 2), (3, 'filler', 3), +(4, 'filler', 4), (5, 'filler', 5), (6, 'filler', 6), (7, 'filler', 7), +(8, 'filler', 8), (9, 'filler', 9), (0, 'filler', 0), (1, 'filler', 1), +(2, 'filler', 2), (3, 'filler', 3), (4, 'filler', 4), (5, 'filler', 5), +(6, 'filler', 6), (7, 'filler', 7), (8, 'filler', 8), (9, 'filler', 9), +(10, 'filler', 10), (11, 'filler', 11), (12, 'filler', 12), (13, 'filler', 13), +(14, 'filler', 14), (15, 'filler', 15), (16, 'filler', 16), (17, 'filler', 17), +(18, 'filler', 18), (19, 'filler', 19), (4, '5 ', 0), (5, '4 ', 0), +(4, '4 ', 0), (4, 'qq ', 5), (5, 'qq ', 4), (4, 'zz ', 4); +create table t2( +`a` int(11) DEFAULT NULL, +`filler` char(200) DEFAULT NULL, +`b` int(11) DEFAULT NULL, +KEY USING BTREE (`a`), +KEY USING BTREE (`b`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +insert into t2 select * from t1; +must use sort-union rather than union: +explain select * from t1 where a=4 or b=4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 4 Using sort_union(a,b); Using where +select * from t1 where a=4 or b=4; +a filler b +4 zz 4 +5 qq 4 +4 filler 4 +4 qq 5 +4 4 0 +4 filler 4 +4 5 0 +select * from t1 ignore index(a,b) where a=4 or b=4; +a filler b +4 filler 4 +4 filler 4 +4 5 0 +4 4 0 +4 qq 5 +5 qq 4 +4 zz 4 +must use union, not sort-union: +explain select * from t2 where a=4 or b=4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index_merge a,b a,b 5,5 NULL 7 Using union(a,b); Using where +select * from t2 where a=4 or b=4; +a filler b +4 5 0 +4 zz 4 +5 qq 4 +4 filler 4 +4 qq 5 +4 4 0 +4 filler 4 +drop table t1, t2; diff --git a/mysql-test/t/index_merge.test b/mysql-test/t/index_merge.test index 30eb0b40fca..7d9a4340b0f 100644 --- a/mysql-test/t/index_merge.test +++ b/mysql-test/t/index_merge.test @@ -415,3 +415,46 @@ INSERT INTO t2(a,b) VALUES(1,2); SELECT t2.a FROM t1,t2 WHERE t2.b=2 AND t2.a=1; UNLOCK TABLES; DROP TABLE t1, t2; + +# +# BUG#29740: HA_KEY_SCAN_NOT_ROR wasn't set for HEAP engine +# +CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `filler` char(200) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + KEY `a` (`a`), + KEY `b` (`b`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; + +insert into t1 values +(0, 'filler', 0), (1, 'filler', 1), (2, 'filler', 2), (3, 'filler', 3), +(4, 'filler', 4), (5, 'filler', 5), (6, 'filler', 6), (7, 'filler', 7), +(8, 'filler', 8), (9, 'filler', 9), (0, 'filler', 0), (1, 'filler', 1), +(2, 'filler', 2), (3, 'filler', 3), (4, 'filler', 4), (5, 'filler', 5), +(6, 'filler', 6), (7, 'filler', 7), (8, 'filler', 8), (9, 'filler', 9), +(10, 'filler', 10), (11, 'filler', 11), (12, 'filler', 12), (13, 'filler', 13), +(14, 'filler', 14), (15, 'filler', 15), (16, 'filler', 16), (17, 'filler', 17), +(18, 'filler', 18), (19, 'filler', 19), (4, '5 ', 0), (5, '4 ', 0), +(4, '4 ', 0), (4, 'qq ', 5), (5, 'qq ', 4), (4, 'zz ', 4); + +create table t2( + `a` int(11) DEFAULT NULL, + `filler` char(200) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + KEY USING BTREE (`a`), + KEY USING BTREE (`b`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +insert into t2 select * from t1; + +--echo must use sort-union rather than union: +explain select * from t1 where a=4 or b=4; +select * from t1 where a=4 or b=4; +select * from t1 ignore index(a,b) where a=4 or b=4; + +--echo must use union, not sort-union: +explain select * from t2 where a=4 or b=4; +select * from t2 where a=4 or b=4; + +drop table t1, t2; + -- cgit v1.2.1 From 3a979065e90b8938f88307fa4dbd762b8d786e0b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 18:32:22 +0200 Subject: Additional tests checking for symptoms observed within Bug28309 First insert violates unique constraint - was "memory" table empty ? --- Add missing phony targets Makefile.am: Add execution of the ddl stress tests. (modified) test-bt: Short running variant added (new) test-ext-stress: Longer running variant (modified) test-ext: test-ext-stress added (modified) test-fast: Short running variant with MyISAM only added --- Declare test-ext-jp and test-ext-stress to PHONY make targets. mysql-test/suite/stress/include/ddl.cln: Script for cleanup at execution end mysql-test/suite/stress/include/ddl.pre: Script for general preparations at execution start mysql-test/suite/stress/include/ddl1.inc: ddl stress script mysql-test/suite/stress/include/ddl2.inc: ddl stress script mysql-test/suite/stress/include/ddl3.inc: ddl stress script mysql-test/suite/stress/include/ddl4.inc: ddl stress script mysql-test/suite/stress/include/ddl5.inc: ddl stress script mysql-test/suite/stress/include/ddl6.inc: ddl stress script mysql-test/suite/stress/include/ddl7.inc: ddl stress script mysql-test/suite/stress/include/ddl8.inc: ddl stress script mysql-test/suite/stress/r/ddl_archive.result: File with expected results mysql-test/suite/stress/r/ddl_csv.result: File with expected results mysql-test/suite/stress/r/ddl_innodb.result: File with expected results mysql-test/suite/stress/r/ddl_memory.result: File with expected results mysql-test/suite/stress/r/ddl_myisam.result: File with expected results mysql-test/suite/stress/r/ddl_ndb.result: File with expected results mysql-test/suite/stress/t/ddl_archive.test: Storage engine specific toplevel testscript mysql-test/suite/stress/t/ddl_csv.test: Storage engine specific toplevel testscript mysql-test/suite/stress/t/ddl_innodb.test: Storage engine specific toplevel testscript mysql-test/suite/stress/t/ddl_memory.test: Storage engine specific toplevel testscript mysql-test/suite/stress/t/ddl_myisam.test: Storage engine specific toplevel testscript mysql-test/suite/stress/t/ddl_ndb.test: Storage engine specific toplevel testscript --- mysql-test/suite/stress/include/ddl.cln | 4 + mysql-test/suite/stress/include/ddl.pre | 21 ++ mysql-test/suite/stress/include/ddl1.inc | 277 ++++++++++++++++++++++ mysql-test/suite/stress/include/ddl2.inc | 259 ++++++++++++++++++++ mysql-test/suite/stress/include/ddl3.inc | 242 +++++++++++++++++++ mysql-test/suite/stress/include/ddl4.inc | 339 +++++++++++++++++++++++++++ mysql-test/suite/stress/include/ddl5.inc | 227 ++++++++++++++++++ mysql-test/suite/stress/include/ddl6.inc | 266 +++++++++++++++++++++ mysql-test/suite/stress/include/ddl7.inc | 274 ++++++++++++++++++++++ mysql-test/suite/stress/include/ddl8.inc | 302 ++++++++++++++++++++++++ mysql-test/suite/stress/r/ddl_archive.result | 79 +++++++ mysql-test/suite/stress/r/ddl_csv.result | 55 +++++ mysql-test/suite/stress/r/ddl_innodb.result | 251 ++++++++++++++++++++ mysql-test/suite/stress/r/ddl_memory.result | 251 ++++++++++++++++++++ mysql-test/suite/stress/r/ddl_myisam.result | 251 ++++++++++++++++++++ mysql-test/suite/stress/r/ddl_ndb.result | 216 +++++++++++++++++ mysql-test/suite/stress/t/ddl_archive.test | 51 ++++ mysql-test/suite/stress/t/ddl_csv.test | 51 ++++ mysql-test/suite/stress/t/ddl_innodb.test | 49 ++++ mysql-test/suite/stress/t/ddl_memory.test | 48 ++++ mysql-test/suite/stress/t/ddl_myisam.test | 48 ++++ mysql-test/suite/stress/t/ddl_ndb.test | 56 +++++ 22 files changed, 3617 insertions(+) create mode 100644 mysql-test/suite/stress/include/ddl.cln create mode 100644 mysql-test/suite/stress/include/ddl.pre create mode 100644 mysql-test/suite/stress/include/ddl1.inc create mode 100644 mysql-test/suite/stress/include/ddl2.inc create mode 100644 mysql-test/suite/stress/include/ddl3.inc create mode 100644 mysql-test/suite/stress/include/ddl4.inc create mode 100644 mysql-test/suite/stress/include/ddl5.inc create mode 100644 mysql-test/suite/stress/include/ddl6.inc create mode 100644 mysql-test/suite/stress/include/ddl7.inc create mode 100644 mysql-test/suite/stress/include/ddl8.inc create mode 100644 mysql-test/suite/stress/r/ddl_archive.result create mode 100644 mysql-test/suite/stress/r/ddl_csv.result create mode 100644 mysql-test/suite/stress/r/ddl_innodb.result create mode 100644 mysql-test/suite/stress/r/ddl_memory.result create mode 100644 mysql-test/suite/stress/r/ddl_myisam.result create mode 100644 mysql-test/suite/stress/r/ddl_ndb.result create mode 100644 mysql-test/suite/stress/t/ddl_archive.test create mode 100644 mysql-test/suite/stress/t/ddl_csv.test create mode 100644 mysql-test/suite/stress/t/ddl_innodb.test create mode 100644 mysql-test/suite/stress/t/ddl_memory.test create mode 100644 mysql-test/suite/stress/t/ddl_myisam.test create mode 100644 mysql-test/suite/stress/t/ddl_ndb.test (limited to 'mysql-test') diff --git a/mysql-test/suite/stress/include/ddl.cln b/mysql-test/suite/stress/include/ddl.cln new file mode 100644 index 00000000000..7d021a8c912 --- /dev/null +++ b/mysql-test/suite/stress/include/ddl.cln @@ -0,0 +1,4 @@ +######## include/ddl.cln ######## +disconnect con2; +DEALLOCATE PREPARE stmt_start; +DEALLOCATE PREPARE stmt_break; diff --git a/mysql-test/suite/stress/include/ddl.pre b/mysql-test/suite/stress/include/ddl.pre new file mode 100644 index 00000000000..52de4a3665b --- /dev/null +++ b/mysql-test/suite/stress/include/ddl.pre @@ -0,0 +1,21 @@ +######## include/ddl.pre ######## +# The variable +# $runtime -- rough intended runtime per subtest variant +# must be set within the routine sourcing this script. +# +# Please look for more details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-11 mleich +# +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start"; +--replace_result $runtime +eval SET @runtime = $runtime; +eval PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1"; +connect (con2,localhost,root,,); +connection default; + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings diff --git a/mysql-test/suite/stress/include/ddl1.inc b/mysql-test/suite/stress/include/ddl1.inc new file mode 100644 index 00000000000..96adadc5af5 --- /dev/null +++ b/mysql-test/suite/stress/include/ddl1.inc @@ -0,0 +1,277 @@ +######## include/ddl1.inc ###### +# +# Purpose of include/ddl1.inc - include/ddl8.inc: +# +# Stress storage engines with rapid CREATE/DROP TABLE/INDEX +# and following SELECT/INSERT/SHOW etc. +# +# The variables +# $loop_size -- number of rounds till we look at the clock again +# $runtime -- rough intended runtime per subtest variant +# Real runtime without server restarts and comparison is: +# - >= $runtime +# - > runtime needed for $loop_size execution loops +# $engine_type -- storage engine to be used in CREATE TABLE +# must be set within the routine sourcing this script. +# +# Other stuff which must already exist: +# - connection con2 +# - stmt_start and stmt_break prepared by the default connection +# +# Attention: +# The test does suppress the writing of most statements, server error +# messages and result sets. +# This is needed because their number is usual not deterministic. +# The test is partially self checking. That means is prints some +# helpful hints into the protocol and aborts if something is wrong. +# +# Creation of this test: +# 2007-07-04 mleich +# +############################################################################ +# +# Some details: +# +# 1. Base question of the test: +# There was just a create or drop of some object (TABLE/INDEX). +# +# Could it happen that the next statement referring to this +# object gets a somehow wrong server response (result set, +# error message, warning) because the creation or removal of +# the object is in an incomplete state? +# +# Thinkable reasons for incomplete state of creation or removal: +# The server performs the creation or removal +# - all time incomplete. +# Example: +# Bug#28309 First insert violates unique constraint +# - was "memory" table empty ? +# - asynchronous +# In that case the next statement has probably to wait till +# completion. +# +# 2. Why do we use in some scripts "--error 0," followed +# a check of $mysql_errno? +# +# System reactions when running with "--error 0,": +# - RC=0 --> no error message +# - RC= --> no error message +# - RC not in (0,) --> error message + abort of script +# execution +# +# Requirements and tricky solution for statements which are expected +# to fail: +# 1. RC= +# - no abort of script execution +# --> add "--error " +# - no error message into the protocol, because the number of +# executions is NOT deterministic +# --> use "--error 0," +# 2. RC=0 = failure +# - abort of script execution +# "--error 0," prevents the automatic abort of +# execution. Therefore we do not need to code the abort. +# --> Check $mysql_errno and do an explicit abort if $mysql_errno = 0. +# 3. RC not in (0,) +# - abort of script execution +# "--error 0," causes an automatic abort. +# +# 3. We do not check the correctness of the SHOW CREATE TABLE output +# in detail. This must be done within other tests. +# We only check here that +# - same CREATE TABLE/INDEX statements lead to the same +# - different CREATE TABLE/INDEX statements lead to different +# SHOW CREATE TABLE output +# (Applies to ddl4.inc. and ddl8.inc.) +# +# 4. It could be assumed that running this test with +# - PS-PROTOCOL +# There are already subtests using prepared statements contained. +# - SP/CURSOR/VIEW-PROTOCOL +# These protocol variants transform SELECTs to hopefully much +# stressing statement sequencies using SP/CURSOR/VIEW. +# The SELECTs within include/ddl*.inc are very simple. +# does not increase the coverage. +# Therefore we skip runs with these protocols. +# +# 5. The test consumes significant runtime when running on a non RAM +# based filesystem (run without "--mem"). +# Therefore we adjust $runtime and $loop_size depending on "--big-test" +# option. +# $runtime and $loop_size do not influence the expected results. +# Rough runtime in seconds reported by mysql-test-run.pl: +# (engine_type = MEMORY) +# option set -> $runtime $loop_size real runtime in seconds +# 1 20 68 +# --mem 1 20 32 +# --big-test 5 100 200 +# --mem --big-test 5 100 400 +# I assume that runs with slow filesystems are as much valuable +# as runs with extreme fast filesystems. +# +# 6. Hints for analysis of test failures: +# 1. Look into the protocol and check in which ddl*.inc +# script the difference to the expected result occured. +# 2. Comment the sourcing of all other ddl*.inc scripts +# out. +# 3. Edit the ddl*.inc script where the error occured and +# remove all +# - "--disable_query_log", "--disable_result_log" +# - successful passed subtests. +# 4. Alternative: +# Have a look into VARDIR/master-data/mysql/general_log.CSV +# and construct a new testcase from that. +# 5. If the problem is not deterministic, please try the following +# - increase $runtime (important), $loop_size (most probably +# less important) within the "t/ddl_.test" and +# maybe the "--testcase-timeout" assigned to mysqltest-run.pl +# - vary the I/O performance of the testing machine by using +# a RAM or disk based filesystem for VARDIR +# + + +#---------------------------------------------------------------------- +# Settings for Subtest 1 variants +# Scenario: CREATE with UNIQUE KEY/INSERT/DROP TABLE like in Bug#28309 +let $create_table= CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = $engine_type; +let $insert_into= INSERT INTO t1 VALUES (1,1), (2,2), (3,3); +let $drop_table= DROP TABLE t1; +#---------------------------------------------------------------------- + +# +--echo # Subtest 1A (one connection, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # default: $insert_into +--echo # default: $drop_table +--disable_query_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_table; + eval $insert_into; + eval $drop_table; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_query_log +# +--echo # Subtest 1B (one connection, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # default: $insert_into +--echo # default: $drop_table +--disable_query_log +connection default; +eval PREPARE create_table FROM "$create_table"; +EXECUTE create_table; +eval PREPARE insert_into FROM "$insert_into"; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE drop_table; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_table; + EXECUTE insert_into; + EXECUTE drop_table; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_table; +DEALLOCATE PREPARE insert_into; +DEALLOCATE PREPARE drop_table; +--enable_query_log +# +--echo # Subtest 1C (two connections, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # con2: $insert_into +--echo # con2: $drop_table +--disable_query_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_table; + connection con2; + eval $insert_into; + eval $drop_table; + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_query_log +# +--echo # Subtest 1D (two connections, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # con2: $insert_into +--echo # con2: $drop_table +--disable_query_log +connection default; +eval PREPARE create_table FROM "$create_table"; +EXECUTE create_table; +connection con2; +eval PREPARE insert_into FROM "$insert_into"; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE drop_table; +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_table; + connection con2; + EXECUTE insert_into; + EXECUTE drop_table; + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_table; +connection con2; +DEALLOCATE PREPARE insert_into; +DEALLOCATE PREPARE drop_table; +connection default; +--enable_query_log diff --git a/mysql-test/suite/stress/include/ddl2.inc b/mysql-test/suite/stress/include/ddl2.inc new file mode 100644 index 00000000000..dd2ec0fd804 --- /dev/null +++ b/mysql-test/suite/stress/include/ddl2.inc @@ -0,0 +1,259 @@ +######## include/ddl2.inc ###### +# +# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX +# and following SELECT/INSERT/SHOW etc. +# Subtest 2 variants (2A - 2D) +# +# The variables +# $loop_size -- number of rounds till we look at the clock again +# $runtime -- rough intended runtime per subtest variant +# $engine_type -- storage engine to be used in CREATE TABLE +# must be set within the routine sourcing this script. +# +# Other stuff which must already exist: +# - connection con2 +# - stmt_start and stmt_break prepared by the default connection +# +# Please look for more details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + + +#---------------------------------------------------------------------- +# Settings for Subtest 2 variants +# Scenario: CREATE TABLE AS SELECT/SELECT/DROP/SELECT(F) +let $create_table= CREATE TABLE t1 ENGINE = $engine_type AS SELECT 1 AS f1; +let $select_record= SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1; +let $drop_table= DROP TABLE t1; +#---------------------------------------------------------------------- + +# +--echo # Subtest 2A (one connection, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # default: $select_record +--echo # default: $drop_table +--echo # default: $select_record (expect to get ER_NO_SUCH_TABLE) +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_table; + if (`$select_record`) + { + --enable_result_log + --enable_query_log + --echo # Error: Unexpected content within t1. + --echo # Expected: 0 + --echo # Got: + eval $select_record; + SELECT * FROM t1; + --echo # abort + exit; + } + eval $drop_table; + --error 0,ER_NO_SUCH_TABLE + eval $select_record; + if (!$mysql_errno) + { + --echo # Error: SELECT was successful though we expected ER_NO_SUCH_TABLE + --echo # abort + exit; + } + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 2B (one connection, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # default: $select_record +--echo # default: $drop_table +--echo # default: $select_record (expect to get ER_NO_SUCH_TABLE) +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_table FROM "$create_table"; +EXECUTE create_table; +eval PREPARE select_record FROM "$select_record"; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE drop_table; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_table; + if (`EXECUTE select_record`) + { + --enable_result_log + --enable_query_log + --echo # Error: Unexpected content within t1. + --echo # Expected: 0 + --echo # Got: + EXECUTE select_record; + SELECT * FROM t1; + --echo # abort + exit; + } + EXECUTE drop_table; + --error 0,ER_NO_SUCH_TABLE + EXECUTE select_record; + if (!$mysql_errno) + { + --echo # Error: SELECT was successful though we expected ER_NO_SUCH_TABLE + --echo # abort + exit; + } + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_table; +DEALLOCATE PREPARE select_record; +DEALLOCATE PREPARE drop_table; +--enable_result_log +--enable_query_log +# +--echo # Subtest 2C (two connections, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # con2: $select_record +--echo # default: $drop_table +--echo # con2: $select_record (expect to get ER_NO_SUCH_TABLE) +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_table; + connection con2; + if (`$select_record`) + { + --enable_result_log + --enable_query_log + --echo # Error: Unexpected content within t1. + --echo # Expected: 0 + --echo # Got: + eval $select_record; + SELECT * FROM t1; + --echo # abort + exit; + } + connection default; + eval $drop_table; + connection con2; + --error 0,ER_NO_SUCH_TABLE + eval $select_record; + if (!$mysql_errno) + { + --echo # Error: SELECT was successful though we expected ER_NO_SUCH_TABLE + --echo # abort + exit; + } + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 2D (two connections, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # con2: $select_record +--echo # default: $drop_table +--echo # con2: $select_record (expect to get ER_NO_SUCH_TABLE) +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_table FROM "$create_table"; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE create_table; +connection con2; +eval PREPARE select_record FROM "$select_record"; +connection default; +EXECUTE drop_table; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_table; + connection con2; + if (`EXECUTE select_record`) + { + --enable_result_log + --enable_query_log + --echo # Error: Unexpected content within t1. + --echo # Expected: 0 + --echo # Got: + EXECUTE select_record; + SELECT * FROM t1; + --echo # abort + exit; + } + connection default; + EXECUTE drop_table; + connection con2; + --error 0,ER_NO_SUCH_TABLE + EXECUTE select_record; + if (!$mysql_errno) + { + --echo # Error: SELECT was successful though we expected ER_NO_SUCH_TABLE + --echo # abort + exit; + } + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_table; +DEALLOCATE PREPARE drop_table; +connection con2; +DEALLOCATE PREPARE select_record; +connection default; +--enable_result_log +--enable_query_log diff --git a/mysql-test/suite/stress/include/ddl3.inc b/mysql-test/suite/stress/include/ddl3.inc new file mode 100644 index 00000000000..aacf09f9428 --- /dev/null +++ b/mysql-test/suite/stress/include/ddl3.inc @@ -0,0 +1,242 @@ +######## include/ddl3.inc ###### +# +# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX +# and following SELECT/INSERT/SHOW etc. +# Subtest 3 variants (3A - 3D) +# +# The variables +# $loop_size -- number of rounds till we look at the clock again +# $runtime -- rough intended runtime per subtest variant +# $engine_type -- storage engine to be used in CREATE TABLE +# must be set within the routine sourcing this script. +# +# Other stuff which must already exist: +# - connection con2 +# - stmt_start and stmt_break prepared by the default connection +# +# Please look for more details within include/ddl2.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + + +#---------------------------------------------------------------------- +# Settings for Subtest 3 variants +# Scenario: CREATE TABLE/CREATE TABLE(F)/DROP TABLE/DROP TABLE(F) +let $create_table= CREATE TABLE t1 (f1 BIGINT) ENGINE=$engine_type; +let $drop_table= DROP TABLE t1; +#---------------------------------------------------------------------- + +# +--echo # Subtest 3A (one connection, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # default: $create_table (expect to get ER_TABLE_EXISTS_ERROR) +--echo # default: $drop_table +--echo # default: $drop_table (expect to get ER_BAD_TABLE_ERROR) +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_table; + --error 0,ER_TABLE_EXISTS_ERROR + eval $create_table; + if (!$mysql_errno) + { + --echo # Error: CREATE TABLE was successful though we expected ER_TABLE_EXISTS_ERROR + --echo # abort + exit; + } + eval $drop_table; + --error 0,ER_BAD_TABLE_ERROR + eval $drop_table; + if (!$mysql_errno) + { + --echo # Error: DROP TABLE was successful though we expected ER_BAD_TABLE_ERROR) + --echo # abort + exit; + } + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 3B (one connection, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # default: $create_table (expect to get ER_TABLE_EXISTS_ERROR) +--echo # default: $drop_table +--echo # default: $drop_table (expect to get ER_BAD_TABLE_ERROR) +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_table FROM "$create_table"; +EXECUTE create_table; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE drop_table; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_table; + --error 0,ER_TABLE_EXISTS_ERROR + EXECUTE create_table; + if (!$mysql_errno) + { + --echo # Error: CREATE TABLE was successful though we expected ER_TABLE_EXISTS_ERROR + --echo # abort + exit; + } + EXECUTE drop_table; + --error 0,ER_BAD_TABLE_ERROR + EXECUTE drop_table; + if (!$mysql_errno) + { + --echo # Error: DROP TABLE was successful though we expected ER_BAD_TABLE_ERROR) + --echo # abort + exit; + } + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_table; +DEALLOCATE PREPARE drop_table; +--enable_result_log +--enable_query_log +# +--echo # Subtest 3C (two connections, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # con2: $create_table (expect to get ER_TABLE_EXISTS_ERROR) +--echo # default: $drop_table +--echo # con2: $drop_table (expect to get ER_BAD_TABLE_ERROR) +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_table; + connection con2; + --error 0,ER_TABLE_EXISTS_ERROR + eval $create_table; + if (!$mysql_errno) + { + --echo # Error: CREATE TABLE was successful though we expected ER_TABLE_EXISTS_ERROR + --echo # abort + exit; + } + connection default; + eval $drop_table; + connection con2; + --error 0,ER_BAD_TABLE_ERROR + eval $drop_table; + if (!$mysql_errno) + { + --echo # Error: DROP TABLE was successful though we expected ER_BAD_TABLE_ERROR) + --echo # abort + exit; + } + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 3D (two connections, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # con2: $create_table (expect to get ER_TABLE_EXISTS_ERROR) +--echo # default: $drop_table +--echo # con2: $drop_table (expect to get ER_BAD_TABLE_ERROR) +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_table FROM "$create_table"; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE create_table; +connection con2; +eval PREPARE create_table FROM "$create_table"; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE drop_table; +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_table; + connection con2; + --error 0,ER_TABLE_EXISTS_ERROR + EXECUTE create_table; + if (!$mysql_errno) + { + --echo # Error: CREATE TABLE was successful though we expected ER_TABLE_EXISTS_ERROR + --echo # abort + exit; + } + connection default; + EXECUTE drop_table; + connection con2; + --error 0,ER_BAD_TABLE_ERROR + EXECUTE drop_table; + if (!$mysql_errno) + { + --echo # Error: DROP TABLE was successful though we expected ER_BAD_TABLE_ERROR) + --echo # abort + exit; + } + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_table; +DEALLOCATE PREPARE drop_table; +connection con2; +DEALLOCATE PREPARE create_table; +DEALLOCATE PREPARE drop_table; +connection default; +--enable_result_log +--enable_query_log diff --git a/mysql-test/suite/stress/include/ddl4.inc b/mysql-test/suite/stress/include/ddl4.inc new file mode 100644 index 00000000000..10452a453a5 --- /dev/null +++ b/mysql-test/suite/stress/include/ddl4.inc @@ -0,0 +1,339 @@ +######## include/ddl4.inc ###### +# +# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX +# and following SELECT/INSERT/SHOW etc. +# Subtest 4 variants (4A - 4D) +# +# The variables +# $loop_size -- number of rounds till we look at the clock again +# $runtime -- rough intended runtime per subtest variant +# $engine_type -- storage engine to be used in CREATE TABLE +# must be set within the routine sourcing this script. +# +# Other stuff which must already exist: +# - connection con2 +# - stmt_start and stmt_break prepared by the default connection +# +# Please look for more details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + + +#---------------------------------------------------------------------- +# Settings for Subtest 4 variants +# Scenario: CREATE TABLE variant1/SHOW/DROP TABLE/SHOW(F)/ +# CREATE TABLE variant2/SHOW/DROP TABLE +let $create_table1= CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=$engine_type; +let $create_table2= CREATE TABLE t1 (f1 BIGINT) ENGINE=$engine_type; +let $show_table= SHOW CREATE TABLE t1; +let $drop_table= DROP TABLE t1; +# +eval $create_table1; +let $cr_value1= INITIALIZED; +let $cr_value1= query_get_value($show_table, Create Table, 1); +eval $drop_table; +eval $create_table2; +let $cr_value2= INITIALIZED; +let $cr_value2= query_get_value($show_table, Create Table, 1); +eval $drop_table; +if (`SELECT '$cr_value1' = '$cr_value2'`) +{ + --echo # Error during generation of prerequisites. + --echo # cr_value1 equals cr_value2 + --echo # cr_value1: $cr_value1 + --echo # cr_value2: $cr_value2 + --echo # abort + exit; +} +#---------------------------------------------------------------------- + +# +--echo # Subtest 4A (one connection, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table1 +--echo # default: $show_table +--echo # default: $drop_table +--echo # default: $show_table (expect to get ER_NO_SUCH_TABLE) +--echo # default: $create_table2 +--echo # default: $show_table +--echo # default: $drop_table +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_table1; + let $value= INITIALIZED; + let $value= query_get_value($show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value1'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value1 + --echo # abort + exit; + } + eval $drop_table; + --error 0,ER_NO_SUCH_TABLE + eval $show_table; + if (!$mysql_errno) + { + --echo # Error: SHOW CREATE TABLE was successful though we expected ER_NO_SUCH_TABLE) + --echo # abort + exit; + } + eval $create_table2; + let $value= INITIALIZED; + let $value= query_get_value($show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value2'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value2 + --echo # abort + exit; + } + eval $drop_table; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 4B (one connection, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table1 +--echo # default: $show_table +--echo # default: $drop_table +--echo # default: $show_table (expect to get ER_NO_SUCH_TABLE) +--echo # default: $create_table2 +--echo # default: $show_table +--echo # default: $drop_table +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_table1 FROM "$create_table1"; +eval PREPARE create_table2 FROM "$create_table2"; +EXECUTE create_table1; +eval PREPARE show_table FROM "$show_table"; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE drop_table; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_table1; + let $value= INITIALIZED; + let $value= query_get_value(EXECUTE show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value1'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value1 + --echo # abort + exit; + } + EXECUTE drop_table; + --error 0,ER_NO_SUCH_TABLE + EXECUTE show_table; + if (!$mysql_errno) + { + --echo # Error: SHOW CREATE TABLE was successful though we expected ER_NO_SUCH_TABLE) + --echo # abort + exit; + } + EXECUTE create_table2; + let $value= INITIALIZED; + let $value= query_get_value(EXECUTE show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value2'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value2 + --echo # abort + exit; + } + EXECUTE drop_table; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_table1; +DEALLOCATE PREPARE create_table2; +DEALLOCATE PREPARE show_table; +DEALLOCATE PREPARE drop_table; +--enable_result_log +--enable_query_log +# +--echo # Subtest 4C (two connections, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table1 +--echo # con2: $show_table +--echo # default: $drop_table +--echo # con2: $show_table (expect to get ER_NO_SUCH_TABLE) +--echo # default: $create_table2 +--echo # con2: $show_table +--echo # default: $drop_table +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_table1; + connection con2; + let $value= INITIALIZED; + let $value= query_get_value($show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value1'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value1 + --echo # abort + exit; + } + connection default; + eval $drop_table; + connection con2; + --error 0,ER_NO_SUCH_TABLE + eval $show_table; + if (!$mysql_errno) + { + --echo # Error: SHOW CREATE TABLE was successful though we expected ER_NO_SUCH_TABLE) + --echo # abort + exit; + } + connection default; + eval $create_table2; + connection con2; + let $value= INITIALIZED; + let $value= query_get_value($show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value2'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value2 + --echo # abort + exit; + } + connection default; + eval $drop_table; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 4D (two connections, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table1 +--echo # con2: $show_table +--echo # default: $drop_table +--echo # con2: $show_table (expect to get ER_NO_SUCH_TABLE) +--echo # default: $create_table2 +--echo # con2: $show_table +--echo # default: $drop_table +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_table1 FROM "$create_table1"; +eval PREPARE create_table2 FROM "$create_table2"; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE create_table1; +connection con2; +eval PREPARE show_table FROM "$show_table"; +connection default; +EXECUTE drop_table; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_table1; + connection con2; + let $value= INITIALIZED; + let $value= query_get_value(EXECUTE show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value1'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value1 + --echo # abort + exit; + } + connection default; + EXECUTE drop_table; + connection con2; + --error 0,ER_NO_SUCH_TABLE + EXECUTE show_table; + if (!$mysql_errno) + { + --echo # Error: SHOW CREATE TABLE was successful though we expected ER_NO_SUCH_TABLE) + --echo # abort + exit; + } + connection default; + EXECUTE create_table2; + connection con2; + let $value= INITIALIZED; + let $value= query_get_value(EXECUTE show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value2'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value2 + --echo # abort + exit; + } + connection default; + EXECUTE drop_table; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_table1; +DEALLOCATE PREPARE create_table2; +DEALLOCATE PREPARE drop_table; +connection con2; +DEALLOCATE PREPARE show_table; +connection default; +--enable_result_log +--enable_query_log diff --git a/mysql-test/suite/stress/include/ddl5.inc b/mysql-test/suite/stress/include/ddl5.inc new file mode 100644 index 00000000000..5a6c2fa0e96 --- /dev/null +++ b/mysql-test/suite/stress/include/ddl5.inc @@ -0,0 +1,227 @@ +######## include/ddl5.inc ###### +# +# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX +# and following SELECT/INSERT/SHOW etc. +# Subtest 5 variants (5A - 5D) +# +# The variables +# $loop_size -- number of rounds till we look at the clock again +# $runtime -- rough intended runtime per subtest variant +# $engine_type -- storage engine to be used in CREATE TABLE +# must be set within the routine sourcing this script. +# +# Other stuff which must already exist: +# - connection con2 +# - stmt_start and stmt_break prepared by the default connection +# +# Please look for more details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + +#---------------------------------------------------------------------- +# Settings for Subtest 5 variants +# Scenario: CREATE TABLE with AUTOINC/INSERT/SELECT/DROP TABLE +let $create_table= CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = $engine_type; +let $insert_into= INSERT INTO t1 SET f2 = 9; +let $select_record= SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9; +let $drop_table= DROP TABLE t1; +#---------------------------------------------------------------------- + +# +--echo # Subtest 5A (one connection, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # default: $insert_into +--echo # default: $select_record +--echo # default: $drop_table +--disable_query_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_table; + eval $insert_into; + if (`$select_record`) + { + --enable_result_log + --enable_query_log + --echo # Error: Unexpected content within t1. + --echo # Expected: 0 + --echo # Got: + eval $select_record; + SELECT * FROM t1; + --echo # abort + exit; + } + eval $drop_table; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_query_log +# +--echo # Subtest 5B (one connection, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # default: $insert_into +--echo # default: $select_record +--echo # default: $drop_table +--disable_query_log +connection default; +eval PREPARE create_table FROM "$create_table"; +EXECUTE create_table; +eval PREPARE insert_into FROM "$insert_into"; +eval PREPARE select_record FROM "$select_record"; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE drop_table; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_table; + EXECUTE insert_into; + if (`EXECUTE select_record`) + { + --enable_result_log + --enable_query_log + --echo # Error: Unexpected content within t1. + --echo # Expected: 0 + --echo # Got: + EXECUTE select_record; + SELECT * FROM t1; + --echo # abort + exit; + } + EXECUTE drop_table; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_table; +DEALLOCATE PREPARE insert_into; +DEALLOCATE PREPARE select_record; +DEALLOCATE PREPARE drop_table; +--enable_query_log +# +--echo # Subtest 5C (two connections, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # con2: $insert_into +--echo # default: $select_record +--echo # con2: $drop_table +--disable_query_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_table; + connection con2; + eval $insert_into; + connection default; + if (`$select_record`) + { + --enable_result_log + --enable_query_log + --echo # Error: Unexpected content within t1. + --echo # Expected: 0 + --echo # Got: + eval $select_record; + SELECT * FROM t1; + --echo # abort + exit; + } + connection con2; + eval $drop_table; + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_query_log +# +--echo # Subtest 5D (two connections, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_table +--echo # con2: $insert_into +--echo # default: $select_record +--echo # con2: $drop_table +--disable_query_log +connection default; +eval PREPARE create_table FROM "$create_table"; +EXECUTE create_table; +eval PREPARE select_record FROM "$select_record"; +connection con2; +eval PREPARE insert_into FROM "$insert_into"; +eval PREPARE drop_table FROM "$drop_table"; +EXECUTE drop_table; +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_table; + connection con2; + EXECUTE insert_into; + connection default; + if (`EXECUTE select_record`) + { + --enable_result_log + --enable_query_log + --echo # Error: Unexpected content within t1. + --echo # Expected: 0 + --echo # Got: + EXECUTE select_record; + SELECT * FROM t1; + --echo # abort + exit; + } + connection con2; + EXECUTE drop_table; + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_table; +DEALLOCATE PREPARE select_record; +connection con2; +DEALLOCATE PREPARE insert_into; +DEALLOCATE PREPARE drop_table; +connection default; +--enable_query_log diff --git a/mysql-test/suite/stress/include/ddl6.inc b/mysql-test/suite/stress/include/ddl6.inc new file mode 100644 index 00000000000..7bbfe300eaa --- /dev/null +++ b/mysql-test/suite/stress/include/ddl6.inc @@ -0,0 +1,266 @@ +######## include/ddl6.inc ###### +# +# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX +# and following SELECT/INSERT/SHOW etc. +# Subtest 6 variants (6A - 6D) +# +# The variables +# $loop_size -- number of rounds till we look at the clock again +# $runtime -- rough intended runtime per subtest variant +# $engine_type -- storage engine to be used in CREATE TABLE +# must be set within the routine sourcing this script. +# +# Other stuff which must already exist: +# - connection con2 +# - stmt_start and stmt_break prepared by the default connection +# +# Please look for more details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + + +#---------------------------------------------------------------------- +# Settings for Subtest 6 variants +# Scenario: CREATE INDEX/CREATE INDEX(F)/DROP INDEX/DROP INDEX(F) +let $create_index= CREATE INDEX IDX1 ON t1 (f2); +let $drop_index= DROP INDEX IDX1 ON t1; +eval CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=$engine_type; +#---------------------------------------------------------------------- + + +# +--echo # Subtest 6A (one connection, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index +--echo # default: $create_index (expect to get ER_DUP_KEYNAME) +--echo # default: $drop_index +--echo # default: $drop_index (expect to get ER_CANT_DROP_FIELD_OR_KEY) +--echo # default: $create_index +--echo # default: $drop_index +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_index; + --error 0,ER_DUP_KEYNAME + eval $create_index; + if (!$mysql_errno) + { + --echo # Error: CREATE INDEX was successful though we expected ER_DUP_KEYNAME + --echo # abort + exit; + } + eval $drop_index; + --error 0,ER_CANT_DROP_FIELD_OR_KEY + eval $drop_index; + if (!$mysql_errno) + { + --echo # Error: DROP INDEX was successful though we expected ER_CANT_DROP_FIELD_OR_KEY + --echo # abort + exit; + } + eval $create_index; + eval $drop_index; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 6B (one connection, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index +--echo # default: $create_index (expect to get ER_DUP_KEYNAME) +--echo # default: $drop_index +--echo # default: $drop_index (expect to get ER_CANT_DROP_FIELD_OR_KEY) +--echo # default: $create_index +--echo # default: $drop_index +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_index FROM "$create_index"; +EXECUTE create_index; +eval PREPARE drop_index FROM "$drop_index"; +EXECUTE drop_index; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_index; + --error 0,ER_DUP_KEYNAME + EXECUTE create_index; + if (!$mysql_errno) + { + --echo # Error: CREATE INDEX was successful though we expected ER_DUP_KEYNAME + --echo # abort + exit; + } + EXECUTE drop_index; + --error 0,ER_CANT_DROP_FIELD_OR_KEY + EXECUTE drop_index; + if (!$mysql_errno) + { + --echo # Error: DROP INDEX was successful though we expected ER_CANT_DROP_FIELD_OR_KEY + --echo # abort + exit; + } + EXECUTE create_index; + EXECUTE drop_index; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_index; +DEALLOCATE PREPARE drop_index; +--enable_result_log +--enable_query_log +# +--echo # Subtest 6C (two connections, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index +--echo # con2: $create_index (expect to get ER_DUP_KEYNAME) +--echo # default: $drop_index +--echo # con2: $drop_index (expect to get ER_CANT_DROP_FIELD_OR_KEY) +--echo # default: $create_index +--echo # con2: $drop_index +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_index; + connection con2; + --error 0,ER_DUP_KEYNAME + eval $create_index; + if (!$mysql_errno) + { + --echo # Error: CREATE INDEX was successful though we expected ER_DUP_KEYNAME + --echo # abort + exit; + } + connection default; + eval $drop_index; + connection con2; + --error 0,ER_CANT_DROP_FIELD_OR_KEY + eval $drop_index; + if (!$mysql_errno) + { + --echo # Error: DROP INDEX was successful though we expected ER_CANT_DROP_FIELD_OR_KEY + --echo # abort + exit; + } + connection default; + eval $create_index; + connection con2; + eval $drop_index; + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 6D (two connections, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index +--echo # con2: $create_index (expect to get ER_DUP_KEYNAME) +--echo # default: $drop_index +--echo # con2: $drop_index (expect to get ER_CANT_DROP_FIELD_OR_KEY) +--echo # default: $create_index +--echo # con2: $drop_index +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_index FROM "$create_index"; +eval PREPARE drop_index FROM "$drop_index"; +EXECUTE create_index; +connection con2; +eval PREPARE create_index FROM "$create_index"; +eval PREPARE drop_index FROM "$drop_index"; +EXECUTE drop_index; +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_index; + connection con2; + --error 0,ER_DUP_KEYNAME + EXECUTE create_index; + if (!$mysql_errno) + { + --echo # Error: CREATE INDEX was successful though we expected ER_DUP_KEYNAME + --echo # abort + exit; + } + connection default; + EXECUTE drop_index; + connection con2; + --error 0,ER_CANT_DROP_FIELD_OR_KEY + EXECUTE drop_index; + if (!$mysql_errno) + { + --echo # Error: DROP INDEX was successful though we expected ER_CANT_DROP_FIELD_OR_KEY + --echo # abort + exit; + } + connection default; + EXECUTE create_index; + connection con2; + EXECUTE drop_index; + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_index; +DEALLOCATE PREPARE drop_index; +connection con2; +DEALLOCATE PREPARE create_index; +DEALLOCATE PREPARE drop_index; +connection default; +--enable_result_log +--enable_query_log + +DROP TABLE t1; diff --git a/mysql-test/suite/stress/include/ddl7.inc b/mysql-test/suite/stress/include/ddl7.inc new file mode 100644 index 00000000000..76ba8066c66 --- /dev/null +++ b/mysql-test/suite/stress/include/ddl7.inc @@ -0,0 +1,274 @@ +######## include/ddl7.inc ###### +# +# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX +# and following SELECT/INSERT/SHOW etc. +# Subtest 7 variants (7A - 7D) +# +# The variables +# $loop_size -- number of rounds till we look at the clock again +# $runtime -- rough intended runtime per subtest variant +# $engine_type -- storage engine to be used in CREATE TABLE +# must be set within the routine sourcing this script. +# +# Other stuff which must already exist: +# - connection con2 +# - stmt_start and stmt_break prepared by the default connection +# +# Please look for more details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + + +#---------------------------------------------------------------------- +# Settings for Subtest 7 variants +# Scenario: CREATE INDEX/INSERT(F)/DROP INDEX/INSERT/CREATE INDEX(F)/DELETE +let $create_index= CREATE UNIQUE INDEX IDX1 ON t1 (f2); +let $insert_record= INSERT INTO t1 VALUES(1,1); +let $drop_index= DROP INDEX IDX1 ON t1; +let $delete_record= DELETE FROM t1 WHERE f1 = 1; +eval CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=$engine_type; +INSERT INTO t1 VALUES(0,1); +#---------------------------------------------------------------------- + +# +--echo # Subtest 7A (one connection, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index +--echo # default: $insert_record (expect to get ER_DUP_ENTRY) +--echo # default: $drop_index +--echo # default: $insert_record +--echo # default: $create_index (expect to get ER_DUP_ENTRY) +--echo # default: $delete_record +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +let $counter= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_index; + --error 0,ER_DUP_ENTRY + eval $insert_record; + if (!$mysql_errno) + { + --echo # Error: INSERT was successful though we expected ER_DUP_ENTRY + --echo # abort + exit; + } + eval $drop_index; + eval $insert_record; + # NDB: ER_DUP_UNIQUE, others: ER_DUP_ENTRY + --error 0,ER_DUP_ENTRY,ER_DUP_UNIQUE + eval $create_index; + if (!$mysql_errno) + { + --echo # Error: CREATE INDEX was successful though we expected ER_DUP_ENTRY + --echo # Error: or ER_DUP_UNIQUE (NDB only) + --echo # abort + exit; + } + eval $delete_record; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 7B (one connection, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index +--echo # default: $insert_record (expect to get ER_DUP_ENTRY) +--echo # default: $drop_index +--echo # default: $insert_record +--echo # default: $create_index (expect to get ER_DUP_ENTRY) +--echo # default: $delete_record +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_index FROM "$create_index"; +eval PREPARE insert_record FROM "$insert_record"; +eval PREPARE delete_record FROM "$delete_record"; +eval PREPARE drop_index FROM "$drop_index"; +let $run= 1; +let $counter= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_index; + --error 0,ER_DUP_ENTRY + EXECUTE insert_record; + if (!$mysql_errno) + { + --echo # Error: INSERT was successful though we expected ER_DUP_ENTRY + --echo # abort + exit; + } + EXECUTE drop_index; + EXECUTE insert_record; + --error 0,ER_DUP_ENTRY + EXECUTE create_index; + if (!$mysql_errno) + { + --echo # Error: CREATE INDEX was successful though we expected ER_DUP_ENTRY + --echo # abort + exit; + } + EXECUTE delete_record; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_index; +DEALLOCATE PREPARE insert_record; +DEALLOCATE PREPARE delete_record; +DEALLOCATE PREPARE drop_index; +--enable_result_log +--enable_query_log +# +--echo # Subtest 7C (two connections, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index +--echo # default: $insert_record (expect to get ER_DUP_ENTRY) +--echo # con2: $drop_index +--echo # default: $insert_record +--echo # con2: $create_index (expect to get ER_DUP_ENTRY) +--echo # con2: $delete_record +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +let $counter= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_index; + --error 0,ER_DUP_ENTRY + eval $insert_record; + if (!$mysql_errno) + { + --echo # Error: INSERT was successful though we expected ER_DUP_ENTRY + --echo # abort + exit; + } + connection con2; + eval $drop_index; + connection default; + eval $insert_record; + connection con2; + --error 0,ER_DUP_ENTRY + eval $create_index; + if (!$mysql_errno) + { + --echo # Error: CREATE INDEX was successful though we expected ER_DUP_ENTRY + --echo # abort + exit; + } + eval $delete_record; + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 7D (two connections, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index +--echo # default: $insert_record (expect to get ER_DUP_ENTRY) +--echo # con2: $drop_index +--echo # default: $insert_record +--echo # con2: $create_index (expect to get ER_DUP_ENTRY) +--echo # con2: $delete_record +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_index FROM "$create_index"; +eval PREPARE insert_record FROM "$insert_record"; +EXECUTE create_index; +connection con2; +eval PREPARE create_index FROM "$create_index"; +eval PREPARE drop_index FROM "$drop_index"; +eval PREPARE delete_record FROM "$delete_record"; +EXECUTE drop_index; +connection default; +let $run= 1; +let $counter= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_index; + --error 0,ER_DUP_ENTRY + EXECUTE insert_record; + if (!$mysql_errno) + { + --echo # Error: INSERT was successful though we expected ER_DUP_ENTRY + --echo # abort + exit; + } + connection con2; + EXECUTE drop_index; + connection default; + EXECUTE insert_record; + connection con2; + --error 0,ER_DUP_ENTRY + EXECUTE create_index; + if (!$mysql_errno) + { + --echo # Error: CREATE INDEX was successful though we expected ER_DUP_ENTRY + --echo # abort + exit; + } + EXECUTE delete_record; + connection default; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_index; +DEALLOCATE PREPARE insert_record; +connection con2; +DEALLOCATE PREPARE create_index; +DEALLOCATE PREPARE drop_index; +DEALLOCATE PREPARE delete_record; +connection default; +--enable_result_log +--enable_query_log + +DROP TABLE t1; diff --git a/mysql-test/suite/stress/include/ddl8.inc b/mysql-test/suite/stress/include/ddl8.inc new file mode 100644 index 00000000000..85a70770a56 --- /dev/null +++ b/mysql-test/suite/stress/include/ddl8.inc @@ -0,0 +1,302 @@ +######## include/ddl8.inc ###### +# +# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX +# and following SELECT/INSERT/SHOW etc. +# Subtest 8 variants (8A - 8D) +# +# The variables +# $loop_size -- number of rounds till we look at the clock again +# $runtime -- rough intended runtime per subtest variant +# $engine_type -- storage engine to be used in CREATE TABLE +# must be set within the routine sourcing this script. +# +# Other stuff which must already exist: +# - connection con2 +# - stmt_start and stmt_break prepared by the default connection +# +# Please look for more details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + + +#---------------------------------------------------------------------- +# Settings for Subtest 8 variants +# Scenario: CREATE INDEX variant1/SHOW/DROP INDEX/ +# CREATE INDEX variant2/SHOW/DROP INDEX +let $create_index1= CREATE INDEX IDX ON t1 (f2); +let $create_index2= CREATE UNIQUE INDEX IDX ON t1 (f2); +let $show_table= SHOW CREATE TABLE t1; +let $drop_index= DROP INDEX IDX ON t1; +eval CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=$engine_type; +INSERT INTO t1 VALUES(1,1); +eval $create_index1; +let $cr_value1= INITIALIZED; +let $cr_value1= query_get_value($show_table, Create Table, 1); +eval $drop_index; +eval $create_index2; +let $cr_value2= INITIALIZED; +let $cr_value2= query_get_value($show_table, Create Table, 1); +eval $drop_index; +if (`SELECT '$cr_value1' = '$cr_value2'`) +{ + --echo # Error during generation of prerequisites. + --echo # cr_value1 equals cr_value2 + --echo # cr_value1: $cr_value1 + --echo # cr_value2: $cr_value2 + --echo # abort + exit; +} +#---------------------------------------------------------------------- + +# +--echo # Subtest 8A (one connection, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index1 +--echo # default: $show_table +--echo # default: $drop_index +--echo # default: $create_index2 +--echo # default: $show_table +--echo # default: $drop_index +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_index1; + let $value= INITIALIZED; + let $value= query_get_value($show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value1'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value1 + --echo # abort + exit; + } + eval $drop_index; + eval $create_index2; + let $value= INITIALIZED; + let $value= query_get_value($show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value2'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value2 + --echo # abort + exit; + } + eval $drop_index; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 8B (one connection, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index1 +--echo # default: $show_table +--echo # default: $drop_index +--echo # default: $create_index2 +--echo # default: $show_table +--echo # default: $drop_index +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_index1 FROM "$create_index1"; +eval PREPARE create_index2 FROM "$create_index2"; +EXECUTE create_index1; +eval PREPARE show_table FROM "$show_table"; +eval PREPARE drop_index FROM "$drop_index"; +EXECUTE drop_index; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_index1; + let $value= INITIALIZED; + let $value= query_get_value(EXECUTE show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value1'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value1 + --echo # abort + exit; + } + EXECUTE drop_index; + EXECUTE create_index2; + let $value= INITIALIZED; + let $value= query_get_value(EXECUTE show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value2'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value2 + --echo # abort + exit; + } + EXECUTE drop_index; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_index1; +DEALLOCATE PREPARE create_index2; +DEALLOCATE PREPARE show_table; +DEALLOCATE PREPARE drop_index; +--enable_result_log +--enable_query_log +# +--echo # Subtest 8C (two connections, no PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index1 +--echo # con2: $show_table +--echo # default: $drop_index +--echo # default: $create_index2 +--echo # con2: $show_table +--echo # default: $drop_index +--disable_query_log +--disable_result_log +connection default; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + eval $create_index1; + connection con2; + let $value= INITIALIZED; + let $value= query_get_value($show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value1'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value1 + --echo # abort + exit; + } + connection default; + eval $drop_index; + eval $create_index2; + connection con2; + let $value= INITIALIZED; + let $value= query_get_value($show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value2'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value2 + --echo # abort + exit; + } + connection default; + eval $drop_index; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +--enable_result_log +--enable_query_log +# +--echo # Subtest 8D (two connections, use PREPARE/EXECUTE) +--echo # connection action +--echo # default: $create_index1 +--echo # con2: $show_table +--echo # default: $drop_index +--echo # default: $create_index2 +--echo # con2: $show_table +--echo # default: $drop_index +--disable_query_log +--disable_result_log +connection default; +eval PREPARE create_index1 FROM "$create_index1"; +eval PREPARE create_index2 FROM "$create_index2"; +eval PREPARE drop_index FROM "$drop_index"; +EXECUTE create_index1; +connection con2; +eval PREPARE show_table FROM "$show_table"; +connection default; +EXECUTE drop_index; +let $run= 1; +# Determine the current time. +EXECUTE stmt_start; +# Run execution loops till the planned runtime is reached +while ($run) +{ + let $loop_run= $loop_size; + while ($loop_run) + { + EXECUTE create_index1; + connection con2; + let $value= INITIALIZED; + let $value= query_get_value(EXECUTE show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value1'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value1 + --echo # abort + exit; + } + connection default; + EXECUTE drop_index; + EXECUTE create_index2; + connection con2; + let $value= INITIALIZED; + let $value= query_get_value(EXECUTE show_table, Create Table, 1); + if (`SELECT '$value' <> '$cr_value2'`) + { + --echo # Error: Unexpected SHOW CREATE TABLE output + --echo # Got: $value + --echo # Expected: $cr_value2 + --echo # abort + exit; + } + connection default; + EXECUTE drop_index; + dec $loop_run; + } + if (`EXECUTE stmt_break`) + { + let $run= 0; + } +} +DEALLOCATE PREPARE create_index1; +DEALLOCATE PREPARE create_index2; +DEALLOCATE PREPARE drop_index; +connection con2; +DEALLOCATE PREPARE show_table; +connection default; +--enable_result_log +--enable_query_log + +DROP TABLE t1; diff --git a/mysql-test/suite/stress/r/ddl_archive.result b/mysql-test/suite/stress/r/ddl_archive.result new file mode 100644 index 00000000000..47c64a6af94 --- /dev/null +++ b/mysql-test/suite/stress/r/ddl_archive.result @@ -0,0 +1,79 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start"; +SET @runtime = ; +PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1"; +DROP TABLE IF EXISTS t1; +# Subtest 2A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 3A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 5A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE +# default: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# default: DROP TABLE t1 +# Subtest 5B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE +# default: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# default: DROP TABLE t1 +# Subtest 5C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE +# con2: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# con2: DROP TABLE t1 +# Subtest 5D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE +# con2: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# con2: DROP TABLE t1 +DEALLOCATE PREPARE stmt_start; +DEALLOCATE PREPARE stmt_break; diff --git a/mysql-test/suite/stress/r/ddl_csv.result b/mysql-test/suite/stress/r/ddl_csv.result new file mode 100644 index 00000000000..3dfa0c8fd15 --- /dev/null +++ b/mysql-test/suite/stress/r/ddl_csv.result @@ -0,0 +1,55 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start"; +SET @runtime = ; +PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1"; +DROP TABLE IF EXISTS t1; +# Subtest 2A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 3A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +DEALLOCATE PREPARE stmt_start; +DEALLOCATE PREPARE stmt_break; diff --git a/mysql-test/suite/stress/r/ddl_innodb.result b/mysql-test/suite/stress/r/ddl_innodb.result new file mode 100644 index 00000000000..6417d3e1c5c --- /dev/null +++ b/mysql-test/suite/stress/r/ddl_innodb.result @@ -0,0 +1,251 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start"; +SET @runtime = ; +PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1"; +DROP TABLE IF EXISTS t1; +# Subtest 1A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = InnoDB +# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# default: DROP TABLE t1 +# Subtest 1B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = InnoDB +# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# default: DROP TABLE t1 +# Subtest 1C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = InnoDB +# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# con2: DROP TABLE t1 +# Subtest 1D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = InnoDB +# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# con2: DROP TABLE t1 +# Subtest 2A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 3A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB; +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB; +DROP TABLE t1; +# Subtest 4A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 5A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB +# default: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# default: DROP TABLE t1 +# Subtest 5B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB +# default: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# default: DROP TABLE t1 +# Subtest 5C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB +# con2: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# con2: DROP TABLE t1 +# Subtest 5D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB +# con2: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# con2: DROP TABLE t1 +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=InnoDB; +# Subtest 6A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: DROP INDEX IDX1 ON t1 +# Subtest 6B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: DROP INDEX IDX1 ON t1 +# Subtest 6C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: DROP INDEX IDX1 ON t1 +# Subtest 6D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: DROP INDEX IDX1 ON t1 +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(0,1); +# Subtest 7A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# default: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# default: DELETE FROM t1 WHERE f1 = 1 +# Subtest 7B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# default: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# default: DELETE FROM t1 WHERE f1 = 1 +# Subtest 7C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# con2: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# con2: DELETE FROM t1 WHERE f1 = 1 +# Subtest 7D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# con2: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# con2: DELETE FROM t1 WHERE f1 = 1 +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(1,1); +CREATE INDEX IDX ON t1 (f2); +DROP INDEX IDX ON t1; +CREATE UNIQUE INDEX IDX ON t1 (f2); +DROP INDEX IDX ON t1; +# Subtest 8A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +DROP TABLE t1; +DEALLOCATE PREPARE stmt_start; +DEALLOCATE PREPARE stmt_break; diff --git a/mysql-test/suite/stress/r/ddl_memory.result b/mysql-test/suite/stress/r/ddl_memory.result new file mode 100644 index 00000000000..1700fbc2745 --- /dev/null +++ b/mysql-test/suite/stress/r/ddl_memory.result @@ -0,0 +1,251 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start"; +SET @runtime = ; +PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1"; +DROP TABLE IF EXISTS t1; +# Subtest 1A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = MEMORY +# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# default: DROP TABLE t1 +# Subtest 1B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = MEMORY +# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# default: DROP TABLE t1 +# Subtest 1C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = MEMORY +# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# con2: DROP TABLE t1 +# Subtest 1D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = MEMORY +# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# con2: DROP TABLE t1 +# Subtest 2A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 3A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY; +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY; +DROP TABLE t1; +# Subtest 4A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 5A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY +# default: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# default: DROP TABLE t1 +# Subtest 5B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY +# default: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# default: DROP TABLE t1 +# Subtest 5C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY +# con2: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# con2: DROP TABLE t1 +# Subtest 5D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY +# con2: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# con2: DROP TABLE t1 +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MEMORY; +# Subtest 6A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: DROP INDEX IDX1 ON t1 +# Subtest 6B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: DROP INDEX IDX1 ON t1 +# Subtest 6C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: DROP INDEX IDX1 ON t1 +# Subtest 6D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: DROP INDEX IDX1 ON t1 +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=MEMORY; +INSERT INTO t1 VALUES(0,1); +# Subtest 7A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# default: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# default: DELETE FROM t1 WHERE f1 = 1 +# Subtest 7B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# default: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# default: DELETE FROM t1 WHERE f1 = 1 +# Subtest 7C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# con2: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# con2: DELETE FROM t1 WHERE f1 = 1 +# Subtest 7D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# con2: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# con2: DELETE FROM t1 WHERE f1 = 1 +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MEMORY; +INSERT INTO t1 VALUES(1,1); +CREATE INDEX IDX ON t1 (f2); +DROP INDEX IDX ON t1; +CREATE UNIQUE INDEX IDX ON t1 (f2); +DROP INDEX IDX ON t1; +# Subtest 8A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +DROP TABLE t1; +DEALLOCATE PREPARE stmt_start; +DEALLOCATE PREPARE stmt_break; diff --git a/mysql-test/suite/stress/r/ddl_myisam.result b/mysql-test/suite/stress/r/ddl_myisam.result new file mode 100644 index 00000000000..82be55b8371 --- /dev/null +++ b/mysql-test/suite/stress/r/ddl_myisam.result @@ -0,0 +1,251 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start"; +SET @runtime = ; +PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1"; +DROP TABLE IF EXISTS t1; +# Subtest 1A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = MyISAM +# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# default: DROP TABLE t1 +# Subtest 1B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = MyISAM +# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# default: DROP TABLE t1 +# Subtest 1C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = MyISAM +# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# con2: DROP TABLE t1 +# Subtest 1D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = MyISAM +# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# con2: DROP TABLE t1 +# Subtest 2A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 3A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM; +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM; +DROP TABLE t1; +# Subtest 4A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 5A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM +# default: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# default: DROP TABLE t1 +# Subtest 5B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM +# default: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# default: DROP TABLE t1 +# Subtest 5C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM +# con2: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# con2: DROP TABLE t1 +# Subtest 5D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM +# con2: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# con2: DROP TABLE t1 +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MyISAM; +# Subtest 6A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: DROP INDEX IDX1 ON t1 +# Subtest 6B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: DROP INDEX IDX1 ON t1 +# Subtest 6C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: DROP INDEX IDX1 ON t1 +# Subtest 6D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: DROP INDEX IDX1 ON t1 +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES(0,1); +# Subtest 7A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# default: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# default: DELETE FROM t1 WHERE f1 = 1 +# Subtest 7B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# default: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# default: DELETE FROM t1 WHERE f1 = 1 +# Subtest 7C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# con2: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# con2: DELETE FROM t1 WHERE f1 = 1 +# Subtest 7D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) +# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY) +# con2: DROP INDEX IDX1 ON t1 +# default: INSERT INTO t1 VALUES(1,1) +# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY) +# con2: DELETE FROM t1 WHERE f1 = 1 +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES(1,1); +CREATE INDEX IDX ON t1 (f2); +DROP INDEX IDX ON t1; +CREATE UNIQUE INDEX IDX ON t1 (f2); +DROP INDEX IDX ON t1; +# Subtest 8A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +DROP TABLE t1; +DEALLOCATE PREPARE stmt_start; +DEALLOCATE PREPARE stmt_break; diff --git a/mysql-test/suite/stress/r/ddl_ndb.result b/mysql-test/suite/stress/r/ddl_ndb.result new file mode 100644 index 00000000000..39146e65fb0 --- /dev/null +++ b/mysql-test/suite/stress/r/ddl_ndb.result @@ -0,0 +1,216 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start"; +SET @runtime = ; +PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1"; +DROP TABLE IF EXISTS t1; +# Subtest 1A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = NDB +# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# default: DROP TABLE t1 +# Subtest 1B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = NDB +# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# default: DROP TABLE t1 +# Subtest 1C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = NDB +# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# con2: DROP TABLE t1 +# Subtest 1D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2)) +ENGINE = NDB +# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3) +# con2: DROP TABLE t1 +# Subtest 2A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 2D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 +# default: DROP TABLE t1 +# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE) +# Subtest 3A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +# Subtest 3D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB +# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: DROP TABLE t1 +# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB; +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB; +DROP TABLE t1; +# Subtest 4A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB +# default: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 4D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE) +# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB +# con2: SHOW CREATE TABLE t1 +# default: DROP TABLE t1 +# Subtest 5A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB +# default: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# default: DROP TABLE t1 +# Subtest 5B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB +# default: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# default: DROP TABLE t1 +# Subtest 5C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB +# con2: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# con2: DROP TABLE t1 +# Subtest 5D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB +# con2: INSERT INTO t1 SET f2 = 9 +# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9 +# con2: DROP TABLE t1 +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=NDB; +# Subtest 6A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: DROP INDEX IDX1 ON t1 +# Subtest 6B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# default: DROP INDEX IDX1 ON t1 +# Subtest 6C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: DROP INDEX IDX1 ON t1 +# Subtest 6D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME) +# default: DROP INDEX IDX1 ON t1 +# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY) +# default: CREATE INDEX IDX1 ON t1 (f2) +# con2: DROP INDEX IDX1 ON t1 +DROP TABLE t1; +CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=NDB; +INSERT INTO t1 VALUES(1,1); +CREATE INDEX IDX ON t1 (f2); +DROP INDEX IDX ON t1; +CREATE UNIQUE INDEX IDX ON t1 (f2); +DROP INDEX IDX ON t1; +# Subtest 8A (one connection, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8B (one connection, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# default: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8C (two connections, no PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# Subtest 8D (two connections, use PREPARE/EXECUTE) +# connection action +# default: CREATE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +# default: CREATE UNIQUE INDEX IDX ON t1 (f2) +# con2: SHOW CREATE TABLE t1 +# default: DROP INDEX IDX ON t1 +DROP TABLE t1; +DEALLOCATE PREPARE stmt_start; +DEALLOCATE PREPARE stmt_break; diff --git a/mysql-test/suite/stress/t/ddl_archive.test b/mysql-test/suite/stress/t/ddl_archive.test new file mode 100644 index 00000000000..0c47b5fcdd5 --- /dev/null +++ b/mysql-test/suite/stress/t/ddl_archive.test @@ -0,0 +1,51 @@ +######## t/ddl_archive.test ###### +# +# Stress the storage engine ARCHIVE with CREATE/DROP TABLE/INDEX +# +# Please look for details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + +# Storage engine to be used in CREATE TABLE +--source include/have_archive.inc +let $engine_type= ARCHIVE; + + +if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) +{ + --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled +} +let $run= `SELECT '$BIG_TEST' = '1'`; +if ($run) +{ + # A run started with "--big-test" should be allowed to consume more time. + # Rough intended runtime per subtest variant in seconds + let $runtime = 5; + # number of rounds till we look at the clock again + let $loop_size= 100; +} +if (!$run) +{ + let $runtime = 1; + let $loop_size= 20; +} + + +##### Some preparations needed for the ddl*.inc scripts +--source suite/stress/include/ddl.pre + +# Tests set to comment fail because of CSV limitations +# (limited number of keys, NULL within index not supported) +# --source suite/stress/include/ddl1.inc +--source suite/stress/include/ddl2.inc +--source suite/stress/include/ddl3.inc +# --source suite/stress/include/ddl4.inc +--source suite/stress/include/ddl5.inc +# --source suite/stress/include/ddl6.inc +# --source suite/stress/include/ddl7.inc +# --source suite/stress/include/ddl8.inc + +##### Cleanup +--source suite/stress/include/ddl.cln diff --git a/mysql-test/suite/stress/t/ddl_csv.test b/mysql-test/suite/stress/t/ddl_csv.test new file mode 100644 index 00000000000..9f6185c76be --- /dev/null +++ b/mysql-test/suite/stress/t/ddl_csv.test @@ -0,0 +1,51 @@ +######## t/ddl_csv.test ###### +# +# Stress the storage engine CSV with CREATE/DROP TABLE/INDEX +# +# Please look for details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + +# Storage engine to be used in CREATE TABLE +--source include/have_csv.inc +let $engine_type= CSV; + + +if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) +{ + --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled +} +let $run= `SELECT '$BIG_TEST' = '1'`; +if ($run) +{ + # A run started with "--big-test" should be allowed to consume more time. + # Rough intended runtime per subtest variant in seconds + let $runtime = 5; + # number of rounds till we look at the clock again + let $loop_size= 100; +} +if (!$run) +{ + let $runtime = 1; + let $loop_size= 20; +} + + +##### Some preparations needed for the ddl*.inc scripts +--source suite/stress/include/ddl.pre + +# Tests set to comment fail because of CSV limitations +# (limited number of keys, AUTOINC not supported) +# --source suite/stress/include/ddl1.inc +--source suite/stress/include/ddl2.inc +--source suite/stress/include/ddl3.inc +# --source suite/stress/include/ddl4.inc +# --source suite/stress/include/ddl5.inc +# --source suite/stress/include/ddl6.inc +# --source suite/stress/include/ddl7.inc +# --source suite/stress/include/ddl8.inc + +##### Cleanup +--source suite/stress/include/ddl.cln diff --git a/mysql-test/suite/stress/t/ddl_innodb.test b/mysql-test/suite/stress/t/ddl_innodb.test new file mode 100644 index 00000000000..784ba8ff003 --- /dev/null +++ b/mysql-test/suite/stress/t/ddl_innodb.test @@ -0,0 +1,49 @@ +######## t/ddl_innodb.test ###### +# +# Stress the storage engine InnoDB with CREATE/DROP TABLE/INDEX +# +# Please look for details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + +# Storage engine to be used in CREATE TABLE +--source include/have_innodb.inc +let $engine_type= InnoDB; + + +if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) +{ + --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled +} +let $run= `SELECT '$BIG_TEST' = '1'`; +if ($run) +{ + # A run started with "--big-test" should be allowed to consume more time. + # Rough intended runtime per subtest variant in seconds + let $runtime = 5; + # number of rounds till we look at the clock again + let $loop_size= 100; +} +if (!$run) +{ + let $runtime = 1; + let $loop_size= 20; +} + + +##### Some preparations needed for the ddl*.inc scripts +--source suite/stress/include/ddl.pre + +--source suite/stress/include/ddl1.inc +--source suite/stress/include/ddl2.inc +--source suite/stress/include/ddl3.inc +--source suite/stress/include/ddl4.inc +--source suite/stress/include/ddl5.inc +--source suite/stress/include/ddl6.inc +--source suite/stress/include/ddl7.inc +--source suite/stress/include/ddl8.inc + +##### Cleanup +--source suite/stress/include/ddl.cln diff --git a/mysql-test/suite/stress/t/ddl_memory.test b/mysql-test/suite/stress/t/ddl_memory.test new file mode 100644 index 00000000000..5178439bff1 --- /dev/null +++ b/mysql-test/suite/stress/t/ddl_memory.test @@ -0,0 +1,48 @@ +######## t/ddl_memory.test ###### +# +# Stress the storage engine MEMORY with CREATE/DROP TABLE/INDEX +# +# Please look for details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + +# Storage engine to be used in CREATE TABLE +let $engine_type= MEMORY; + + +if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) +{ + --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled +} +let $run= `SELECT '$BIG_TEST' = '1'`; +if ($run) +{ + # A run started with "--big-test" should be allowed to consume more time. + # Rough intended runtime per subtest variant in seconds + let $runtime = 5; + # number of rounds till we look at the clock again + let $loop_size= 100; +} +if (!$run) +{ + let $runtime = 1; + let $loop_size= 20; +} + + +##### Some preparations needed for the ddl*.inc scripts +--source suite/stress/include/ddl.pre + +--source suite/stress/include/ddl1.inc +--source suite/stress/include/ddl2.inc +--source suite/stress/include/ddl3.inc +--source suite/stress/include/ddl4.inc +--source suite/stress/include/ddl5.inc +--source suite/stress/include/ddl6.inc +--source suite/stress/include/ddl7.inc +--source suite/stress/include/ddl8.inc + +##### Cleanup +--source suite/stress/include/ddl.cln diff --git a/mysql-test/suite/stress/t/ddl_myisam.test b/mysql-test/suite/stress/t/ddl_myisam.test new file mode 100644 index 00000000000..8d6226e573b --- /dev/null +++ b/mysql-test/suite/stress/t/ddl_myisam.test @@ -0,0 +1,48 @@ +######## t/ddl_myisam.test ###### +# +# Stress the storage engine MyISAM with CREATE/DROP TABLE/INDEX +# +# Please look for details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + +# Storage engine to be used in CREATE TABLE +let $engine_type= MyISAM; + + +if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) +{ + --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled +} +let $run= `SELECT '$BIG_TEST' = '1'`; +if ($run) +{ + # A run started with "--big-test" should be allowed to consume more time. + # Rough intended runtime per subtest variant in seconds + let $runtime = 5; + # number of rounds till we look at the clock again + let $loop_size= 100; +} +if (!$run) +{ + let $runtime = 1; + let $loop_size= 20; +} + + +##### Some preparations needed for the ddl*.inc scripts +--source suite/stress/include/ddl.pre + +--source suite/stress/include/ddl1.inc +--source suite/stress/include/ddl2.inc +--source suite/stress/include/ddl3.inc +--source suite/stress/include/ddl4.inc +--source suite/stress/include/ddl5.inc +--source suite/stress/include/ddl6.inc +--source suite/stress/include/ddl7.inc +--source suite/stress/include/ddl8.inc + +##### Cleanup +--source suite/stress/include/ddl.cln diff --git a/mysql-test/suite/stress/t/ddl_ndb.test b/mysql-test/suite/stress/t/ddl_ndb.test new file mode 100644 index 00000000000..7eb45da8739 --- /dev/null +++ b/mysql-test/suite/stress/t/ddl_ndb.test @@ -0,0 +1,56 @@ +######## t/ddl_ndb.test ###### +# +# Stress the storage engine NDB with CREATE/DROP TABLE/INDEX +# +# Please look for details within include/ddl1.inc. +# +# Creation of this test: +# 2007-07-04 mleich +# + +# Storage engine to be used in CREATE TABLE +--source include/have_ndb.inc +let $engine_type= NDB; + + +if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) +{ + --skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled +} +# Attention: We set here much smaller values for $runtime and $loop_size compared +# to the other storage engines. +# The reason is that NDB is extreme slow and should not exceed +# the "testcase-timeout". +let $run= `SELECT '$BIG_TEST' = '1'`; +if ($run) +{ + # A run started with "--big-test" should be allowed to consume more time. + # Rough intended runtime per subtest variant in seconds + let $runtime = 5; + # number of rounds till we look at the clock again + let $loop_size= 3; +} +if (!$run) +{ + let $runtime = 1; + let $loop_size= 1; +} + + +##### Some preparations needed for the ddl*.inc scripts +--source suite/stress/include/ddl.pre + +--source suite/stress/include/ddl1.inc +--source suite/stress/include/ddl2.inc +--source suite/stress/include/ddl3.inc +--source suite/stress/include/ddl4.inc +--source suite/stress/include/ddl5.inc +--source suite/stress/include/ddl6.inc +# The following test suffers from +# Bug#26043 UNIQUE INDEX create always fails after constraint violation +# and is therefore set to comment. +# --source suite/stress/include/ddl7.inc +--source suite/stress/include/ddl8.inc + +##### Cleanup +--source suite/stress/include/ddl.cln -- cgit v1.2.1 From d8effbe36855fe1a3d34e37f3c72a643c67e45b9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 22:21:19 +0200 Subject: avoid multiple defines of server1/2 --- mysql-test/include/ndb_master-slave.inc | 7 ++++++- mysql-test/t/ndb_multi.test | 1 - mysql-test/t/ndb_multi_row.test | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/ndb_master-slave.inc b/mysql-test/include/ndb_master-slave.inc index 81dd63be78a..ad4eb103803 100644 --- a/mysql-test/include/ndb_master-slave.inc +++ b/mysql-test/include/ndb_master-slave.inc @@ -4,7 +4,12 @@ connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,); connection slave; --- source include/have_ndb.inc +# Check that server is compiled and started with support for NDB +disable_query_log; +--require r/true.require +select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; +--source include/ndb_not_readonly.inc +enable_query_log; -- source include/master-slave-reset.inc diff --git a/mysql-test/t/ndb_multi.test b/mysql-test/t/ndb_multi.test index 3482db1d1b2..b8e052d606b 100644 --- a/mysql-test/t/ndb_multi.test +++ b/mysql-test/t/ndb_multi.test @@ -1,4 +1,3 @@ --- source include/have_ndb.inc -- source include/have_multi_ndb.inc -- source include/not_embedded.inc diff --git a/mysql-test/t/ndb_multi_row.test b/mysql-test/t/ndb_multi_row.test index 632a9fda89a..543e282b900 100644 --- a/mysql-test/t/ndb_multi_row.test +++ b/mysql-test/t/ndb_multi_row.test @@ -1,4 +1,3 @@ --- source include/have_ndb.inc -- source include/have_multi_ndb.inc -- source include/not_embedded.inc -- source include/have_binlog_format_row.inc -- cgit v1.2.1 From fea623a1b91340347a37889bad1b10d1fe2c1e91 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Jul 2007 01:34:46 +0500 Subject: symlink.test, symlink.result: Minor fix for test case of bug #29325 to make emb test happy. mysql-test/t/symlink.test: Minor fix for test case of bug #29325 to make emb test happy. mysql-test/r/symlink.result: Minor fix for test case of bug #29325 to make emb test happy. --- mysql-test/r/symlink.result | 2 +- mysql-test/t/symlink.test | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 093e1fd57cf..aba60f757c6 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -144,7 +144,7 @@ RESET QUERY CACHE; USE db1; SET SESSION keep_files_on_create = TRUE; CREATE TABLE t1 (a INT) ENGINE MYISAM; -ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17) +Got one of the listed errors CREATE TABLE t3 (a INT) Engine=MyISAM; INSERT INTO t3 VALUES (1),(2),(3); TRUNCATE TABLE t3; diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index edad6a11392..15f50b11e73 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -196,6 +196,7 @@ USE db1; #no warning from create table SET SESSION keep_files_on_create = TRUE; --disable_abort_on_error +--error 1,1 CREATE TABLE t1 (a INT) ENGINE MYISAM; --enable_abort_on_error -- cgit v1.2.1 From 11350e076756aa4e85e5fe5443cbe8ebfd68c7f2 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jul 2007 22:45:05 +0200 Subject: correct cluster support check --- mysql-test/include/ndb_master-slave.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/include/ndb_master-slave.inc b/mysql-test/include/ndb_master-slave.inc index ad4eb103803..1568072202b 100644 --- a/mysql-test/include/ndb_master-slave.inc +++ b/mysql-test/include/ndb_master-slave.inc @@ -7,7 +7,7 @@ connection slave; # Check that server is compiled and started with support for NDB disable_query_log; --require r/true.require -select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; +select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster'; --source include/ndb_not_readonly.inc enable_query_log; -- cgit v1.2.1 From 25545b4bfb56ed4581edddb47820f4c968bb1f1f Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Jul 2007 22:02:10 +0400 Subject: BUG#29740: Make the test result deterministic --- mysql-test/r/index_merge.result | 28 ++++++++++++++-------------- mysql-test/t/index_merge.test | 5 +++++ 2 files changed, 19 insertions(+), 14 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/index_merge.result b/mysql-test/r/index_merge.result index c7e4ead9eeb..15aa636d740 100644 --- a/mysql-test/r/index_merge.result +++ b/mysql-test/r/index_merge.result @@ -483,36 +483,36 @@ insert into t2 select * from t1; must use sort-union rather than union: explain select * from t1 where a=4 or b=4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 4 Using sort_union(a,b); Using where +1 SIMPLE t1 index_merge a,b a,b 5,5 NULL # Using sort_union(a,b); Using where select * from t1 where a=4 or b=4; a filler b -4 zz 4 -5 qq 4 -4 filler 4 -4 qq 5 4 4 0 -4 filler 4 4 5 0 +4 filler 4 +4 filler 4 +4 qq 5 +4 zz 4 +5 qq 4 select * from t1 ignore index(a,b) where a=4 or b=4; a filler b +4 4 0 +4 5 0 4 filler 4 4 filler 4 -4 5 0 -4 4 0 4 qq 5 -5 qq 4 4 zz 4 +5 qq 4 must use union, not sort-union: explain select * from t2 where a=4 or b=4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index_merge a,b a,b 5,5 NULL 7 Using union(a,b); Using where +1 SIMPLE t2 index_merge a,b a,b 5,5 NULL # Using union(a,b); Using where select * from t2 where a=4 or b=4; a filler b +4 4 0 4 5 0 -4 zz 4 -5 qq 4 4 filler 4 -4 qq 5 -4 4 0 4 filler 4 +4 qq 5 +4 zz 4 +5 qq 4 drop table t1, t2; diff --git a/mysql-test/t/index_merge.test b/mysql-test/t/index_merge.test index 7d9a4340b0f..8c19ab4d7d6 100644 --- a/mysql-test/t/index_merge.test +++ b/mysql-test/t/index_merge.test @@ -448,12 +448,17 @@ create table t2( insert into t2 select * from t1; --echo must use sort-union rather than union: +--replace_column 9 # explain select * from t1 where a=4 or b=4; +--sorted_result select * from t1 where a=4 or b=4; +--sorted_result select * from t1 ignore index(a,b) where a=4 or b=4; --echo must use union, not sort-union: +--replace_column 9 # explain select * from t2 where a=4 or b=4; +--sorted_result select * from t2 where a=4 or b=4; drop table t1, t2; -- cgit v1.2.1 From 4f146f656c319f0ffb37f9f1428035aadf4acaf5 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Jul 2007 22:43:58 +0400 Subject: Bug#29729: Wrong conversion error led to an empty result set. The Field_newdate::store when storing a DATETIME value was returning the 'value was cut' error even if the thd->count_cuted_fields flag is set to CHECK_FIELD_IGNORE. This made range optimizr think that there is no appropriate data in the table and thus to return an empty set. Now the Field_newdate::store function returns conversion error only if the thd->count_cuted_fields flag isn't set to CHECK_FIELD_IGNORE. mysql-test/t/type_time.test: Added a test case for the bug#29729: Wrong conversion error led to an empty result set. mysql-test/r/type_time.result: Added a test case for the bug#29729: Wrong conversion error led to an empty result set. sql/field.cc: Bug#29729: Wrong conversion error led to an empty result set. --- mysql-test/r/type_time.result | 13 +++++++++++++ mysql-test/t/type_time.test | 15 +++++++++++++++ 2 files changed, 28 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index 71bd8b68a0b..def94bd707b 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -109,3 +109,16 @@ select 1 from t1 where cast('100:00:00' as time) between f1 and f2; 1 1 drop table t1; +CREATE TABLE t1 ( +f2 date NOT NULL, +f3 int(11) unsigned NOT NULL default '0', +PRIMARY KEY (f3, f2) +); +insert into t1 values('2007-07-01', 1); +insert into t1 values('2007-07-01', 2); +insert into t1 values('2007-07-02', 1); +insert into t1 values('2007-07-02', 2); +SELECT sum(f3) FROM t1 where f2='2007-07-01 00:00:00' group by f2; +sum(f3) +3 +drop table t1; diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test index 82d701e29b5..bc4f850dfee 100644 --- a/mysql-test/t/type_time.test +++ b/mysql-test/t/type_time.test @@ -58,3 +58,18 @@ create table t1(f1 time, f2 time); insert into t1 values('20:00:00','150:00:00'); select 1 from t1 where cast('100:00:00' as time) between f1 and f2; drop table t1; + +# +# Bug#29729: Wrong conversion error led to an empty result set. +# +CREATE TABLE t1 ( + f2 date NOT NULL, + f3 int(11) unsigned NOT NULL default '0', + PRIMARY KEY (f3, f2) +); +insert into t1 values('2007-07-01', 1); +insert into t1 values('2007-07-01', 2); +insert into t1 values('2007-07-02', 1); +insert into t1 values('2007-07-02', 2); +SELECT sum(f3) FROM t1 where f2='2007-07-01 00:00:00' group by f2; +drop table t1; -- cgit v1.2.1 From 7416224c60a876c5cde518e41469911d1b00b3ce Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 15 Jul 2007 13:25:38 +0400 Subject: A fix for Bug#27406 Events: failure only causes a warning. Update test results. When executing a CREATE EVENT statement with ON COMPLETION NOT PRESERVE clause (explicit or implicit) and completion date in the past, we do not create the event. Or, put it differently, we create it and then drop immediately. A warning is issued in this case, not an error -- we want to load successfully old database dumps, and such dumps may contain events that are no longer valid. Update the warning text to not imply an erroneous condition. mysql-test/r/events_bugs.result: Update the test results (Bug#27406) sql/share/errmsg.txt: Fix Bug#27406 "Events: failure only causes a warning" -- update the error message to not imply that there was a failure. --- mysql-test/r/events_bugs.result | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index a01f098affb..14728bdcc2e 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -31,7 +31,7 @@ create event e_55 on schedule at 10000101000000 do drop table t; ERROR HY000: Incorrect AT value: '10000101000000' create event e_55 on schedule at 20000101000000 do drop table t; Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. show events; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation create event e_55 on schedule at 20200101000000 starts 10000101000000 do drop table t; @@ -447,32 +447,32 @@ e3 +00:00 CREATE EVENT `e3` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00 The following should fail, and nothing should be altered. ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00'; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' DISABLE; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. The following should give warnings, and nothing should be created. CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' DO SELECT 1; Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' DISABLE DO SELECT 1; Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO SELECT 1; Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE DO SELECT 1; Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation. SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci -- cgit v1.2.1 From 8023d91929247f1b2e2f81ca10daca4dde4ab2e2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 15 Jul 2007 13:34:35 +0400 Subject: Add a teste case for Bug#27296 "Assertion in ALTER TABLE SET DEFAULT in Linux Debug build (possible deadlock)" The bug is not repeatable any more. mysql-test/r/innodb_mysql.result: Update test results (Bug#27296) mysql-test/t/innodb_mysql.test: Add a teste case for Bug#27296 "Assertion in ALTER TABLE SET DEFAULT in Linux Debug build (possible deadlock)" --- mysql-test/r/innodb_mysql.result | 4 ++++ mysql-test/t/innodb_mysql.test | 14 ++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 11c7c2aedc9..847805e7b6f 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -676,4 +676,8 @@ INSERT INTO t1 VALUES (1); switch to connection default SET AUTOCOMMIT=default; DROP TABLE t1,t2; +drop table if exists t1; +create table t1 (a int) engine=innodb; +alter table t1 alter a set default 1; +drop table t1; End of 5.0 tests diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index 25ba9a258ff..49ffe359fd9 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -670,5 +670,19 @@ DISCONNECT c1; DISCONNECT c2; DROP TABLE t1,t2; +# +# Bug#27296 Assertion in ALTER TABLE SET DEFAULT in Linux Debug build +# (possible deadlock). +# +# The bug is applicable only to a transactoinal table. +# Cover with tests behavior that no longer causes an +# assertion. +# +--disable_warnings +drop table if exists t1; +--enable_warnings +create table t1 (a int) engine=innodb; +alter table t1 alter a set default 1; +drop table t1; --echo End of 5.0 tests -- cgit v1.2.1 From 9828ab7096314b329a622e6daf0dbd512c1bb662 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 15 Jul 2007 18:47:57 +0200 Subject: Post-merge fixes Disabled tests which break automatic merging due to non-empty warnings file. --- mysql-test/suite/ndb/t/disabled.def | 1 + mysql-test/suite/rpl/t/disabled.def | 15 +++++++++++++++ mysql-test/suite/rpl_ndb/t/disabled.def | 2 ++ mysql-test/t/disabled.def | 2 ++ 4 files changed, 20 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/ndb/t/disabled.def b/mysql-test/suite/ndb/t/disabled.def index 96ef152f513..023c9c47210 100644 --- a/mysql-test/suite/ndb/t/disabled.def +++ b/mysql-test/suite/ndb/t/disabled.def @@ -22,3 +22,4 @@ ndb_partition_error2 : HF is not sure if the test can work as internded on all #ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent CRBR: multiple binlog, second binlog may miss schema log events #ndb_binlog_discover : bug#21806 2006-08-24 #ndb_autodiscover3 : bug#21806 +ndb_autodiscover3 : Bug#20872 2007-07-15 ingo master*.err: miscellaneous error messages diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index fda40c30340..6ebbd3a2f46 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -14,3 +14,18 @@ rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after C rpl_innodb_mixed_ddl : Bug #29363 rpl.rpl_innodb_mixed_* test failures rpl_innodb_mixed_dml : Bug #29363 rpl.rpl_innodb_mixed_* test failures rpl_invoked_features : BUG#29020 2007-06-21 Lars Non-deterministic test case +rpl_deadlock_innodb : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_extraCol_innodb : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_extraCol_myisam : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_incident : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_known_bugs_detection : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_loaddata : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_loaddata_fatal : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_rewrt_db : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_rotate_logs : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_row_inexist_tbl : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_row_tabledefs_2myisam : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_row_tabledefs_3innodb : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_ssl : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_stm_EE_err2 : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_stm_mystery22 : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def index f5c99129c89..8392c39331e 100644 --- a/mysql-test/suite/rpl_ndb/t/disabled.def +++ b/mysql-test/suite/rpl_ndb/t/disabled.def @@ -26,3 +26,5 @@ rpl_ndb_ctype_ucs2_def : BUG#27404 util thd mysql_parse sig11 when mysqld defa # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open #rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly +rpl_ndb_extraCol : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file +rpl_truncate_7ndb : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 9d2b4abc929..b994561116d 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -25,3 +25,5 @@ ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Do mysql_upgrade : Bug#28560 test links to /usr/local/mysql/lib libraries, causes non-determinism and failures on ABI breakage federated_innodb : Bug#29522 failed assertion in binlog_close_connection() +binlog_innodb : Bug#29806 2007-07-15 ingo master.err: InnoDB: Error: MySQL is freeing a thd +innodb_mysql : Bug#29807 2007-07-15 ingo master.err: Cannot find table test/t2 from the internal data dictionary -- cgit v1.2.1 From 6e078ff5433080699416ed473a332395d48a1bfa Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 15 Jul 2007 21:51:36 +0400 Subject: Extended fix for the bug#29555. The get_time_value function is added. It is used to obtain TIME values both from items the can return time as an integer and from items that can return time only as a string. The Arg_comparator::compare_datetime function now uses pointer to a getter function to obtain values to compare. Now this function is also used for comparison of TIME values. The get_value_func variable is added to the Arg_comparator class. It points to a getter function for the DATE/DATETIME/TIME comparator. mysql-test/t/type_time.test: Extended test case for the bug#29555. mysql-test/r/type_time.result: Extended test case for the bug#29555. sql/item_cmpfunc.cc: Extended fix for the bug#29555. The get_time_value function is added. It is used to obtain TIME values both from items the can return time as an integer and from items that can return time only as a string. The Arg_comparator::compare_datetime function now uses pointer to a getter function to obtain values to compare. Now this function is also used for comparison of TIME values. sql/item_cmpfunc.h: Extended fix for the bug#29555. The get_value_func variable is added to the Arg_comparator class. It points to a getter function for the DATE/DATETIME/TIME comparator. --- mysql-test/r/type_time.result | 6 ++++++ mysql-test/t/type_time.test | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index def94bd707b..96bf23109df 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -103,6 +103,12 @@ cast('100:55:50' as time) > cast('024:00:00' as time) select cast('300:55:50' as time) > cast('240:00:00' as time); cast('300:55:50' as time) > cast('240:00:00' as time) 1 +create table t1 (f1 time); +insert into t1 values ('24:00:00'); +select cast('24:00:00' as time) = (select f1 from t1); +cast('24:00:00' as time) = (select f1 from t1) +1 +drop table t1; create table t1(f1 time, f2 time); insert into t1 values('20:00:00','150:00:00'); select 1 from t1 where cast('100:00:00' as time) between f1 and f2; diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test index bc4f850dfee..5fc763be7fe 100644 --- a/mysql-test/t/type_time.test +++ b/mysql-test/t/type_time.test @@ -50,6 +50,10 @@ select cast('300:55:50' as time) < cast('240:00:00' as time); select cast('100:55:50' as time) > cast('24:00:00' as time); select cast('100:55:50' as time) > cast('024:00:00' as time); select cast('300:55:50' as time) > cast('240:00:00' as time); +create table t1 (f1 time); +insert into t1 values ('24:00:00'); +select cast('24:00:00' as time) = (select f1 from t1); +drop table t1; # # Bug#29739: Incorrect time comparison in BETWEEN. -- cgit v1.2.1 From a21ff660953cae4c43b8221926a5f302e205c9c8 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Jul 2007 15:09:46 +0500 Subject: BUG#29807 - innodb_mysql.test: Cannot find table test/t2 from the internal data dictionary - re-enabled innodb_mysql test; - added a rule to through away expected warning to mtr_report.pl; - fixed a test case to produce unique warning. mysql-test/include/mix1.inc: Modified a test case to through away expected warning. mysql-test/lib/mtr_report.pl: Through away a warning produced by BUG#29807 test. mysql-test/r/innodb_mysql.result: Modified a test case to through away expected warning. mysql-test/t/disabled.def: Re-enabled innodb_mysql.test. --- mysql-test/include/mix1.inc | 10 +++++----- mysql-test/lib/mtr_report.pl | 6 +++++- mysql-test/r/innodb_mysql.result | 12 ++++++------ mysql-test/t/disabled.def | 1 - 4 files changed, 16 insertions(+), 13 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index 11b0013fc38..6a82d2b126c 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -677,14 +677,14 @@ DROP TABLE t1,t2,t3; # create table t1 (a int) engine=innodb; -copy_file $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t2.frm; +copy_file $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/bug29807.frm; --error 1146 -select * from t2; +select * from bug29807; drop table t1; --error 1051 -drop table t2; -create table t2 (a int); -drop table t2; +drop table bug29807; +create table bug29807 (a int); +drop table bug29807; # diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 317b5b8ba8e..306a0fe5d9d 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -358,7 +358,11 @@ sub mtr_report_stats ($) { # Test case for Bug#14233 produces the following warnings: /Stored routine 'test'.'bug14233_1': invalid value in column mysql.proc/ or /Stored routine 'test'.'bug14233_2': invalid value in column mysql.proc/ or - /Stored routine 'test'.'bug14233_3': invalid value in column mysql.proc/ + /Stored routine 'test'.'bug14233_3': invalid value in column mysql.proc/ or + + # BUG#29807 - innodb_mysql.test: Cannot find table test/t2 + # from the internal data dictionary + /Cannot find table test\/bug29807 from the internal data dictionary/ ) { next; # Skip these lines diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index cdea5c49594..a2ed8f6b175 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -666,13 +666,13 @@ SELECT * FROM t3 WHERE a = 'uk'; a DROP TABLE t1,t2,t3; create table t1 (a int) engine=innodb; -select * from t2; -ERROR 42S02: Table 'test.t2' doesn't exist +select * from bug29807; +ERROR 42S02: Table 'test.bug29807' doesn't exist drop table t1; -drop table t2; -ERROR 42S02: Unknown table 't2' -create table t2 (a int); -drop table t2; +drop table bug29807; +ERROR 42S02: Unknown table 'bug29807' +create table bug29807 (a int); +drop table bug29807; CREATE TABLE t1 (a INT) ENGINE=InnoDB; CREATE TABLE t2 (a INT) ENGINE=InnoDB; switch to connection c1 diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index b994561116d..17505cc91b7 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -26,4 +26,3 @@ ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Do mysql_upgrade : Bug#28560 test links to /usr/local/mysql/lib libraries, causes non-determinism and failures on ABI breakage federated_innodb : Bug#29522 failed assertion in binlog_close_connection() binlog_innodb : Bug#29806 2007-07-15 ingo master.err: InnoDB: Error: MySQL is freeing a thd -innodb_mysql : Bug#29807 2007-07-15 ingo master.err: Cannot find table test/t2 from the internal data dictionary -- cgit v1.2.1 From f3c857068dfc059d418bf20370fb5ec683a7e180 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Jul 2007 16:12:05 +0200 Subject: Post-merge fix Disabled a test that reports Slave SQL error in warnings file. --- mysql-test/suite/rpl/t/disabled.def | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 6ebbd3a2f46..14102c27c17 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -14,6 +14,7 @@ rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after C rpl_innodb_mixed_ddl : Bug #29363 rpl.rpl_innodb_mixed_* test failures rpl_innodb_mixed_dml : Bug #29363 rpl.rpl_innodb_mixed_* test failures rpl_invoked_features : BUG#29020 2007-06-21 Lars Non-deterministic test case +rpl_auto_increment_11932 : Bug#29809 2007-07-16 ingo Slave SQL errors in warnings file rpl_deadlock_innodb : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file rpl_extraCol_innodb : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file rpl_extraCol_myisam : Bug#29809 2007-07-15 ingo Slave SQL errors in warnings file -- cgit v1.2.1 From bc642e113255417907d2759e5355c7b374b8d479 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2007 00:59:21 +0400 Subject: Post-merge fixes (merge from the main). mysql-test/r/innodb_mysql.result: Update test results (merge from the main tree). mysql-test/r/query_cache.result: Update test results (merge from the main tree). mysql-test/r/sp.result: Update test results (merge from the main tree). mysql-test/t/query_cache.test: Use --echo End of to simplify future merges. sql/handler.h: st_table_list -> TABLE_LIST sql/item_create.cc: A post-merge fix (this code is in sql_yacc.yy in 5.0) sql/rpl_utility.h: st_table_list -> TABLE_LIST sql/sp.cc: A post-merge fix. sql/sp_head.cc: In 5.1 memdup_root returns void*. sql/sql_show.cc: st_table_list -> TABLE_LIST sql/sql_show.h: st_table_list -> TABLE_LIST sql/sql_yacc.yy: A post-merge fix. sql/table.cc: st_table_list -> TABLE_LIST sql/table.h: st_table_list -> TABLE_LIST --- mysql-test/r/innodb_mysql.result | 52 ++++------------------------------------ mysql-test/r/query_cache.result | 1 + mysql-test/r/sp.result | 50 +++++++++++++++++++------------------- mysql-test/t/query_cache.test | 6 ++--- 4 files changed, 33 insertions(+), 76 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 3e4e10780d2..8a4749a478d 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -166,7 +166,6 @@ t1.a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables DROP TABLE t1; -End of 4.1 tests create table t1m (a int) engine = MEMORY; create table t1i (a int); create table t2m (a int) engine = MEMORY; @@ -362,22 +361,6 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where DROP TABLE t1,t2; -CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB; -INSERT INTO t1 VALUES ( 1 , 1 , 1); -INSERT INTO t1 SELECT a + 1 , MOD(a + 1 , 20), 1 FROM t1; -INSERT INTO t1 SELECT a + 2 , MOD(a + 2 , 20), 1 FROM t1; -INSERT INTO t1 SELECT a + 4 , MOD(a + 4 , 20), 1 FROM t1; -INSERT INTO t1 SELECT a + 8 , MOD(a + 8 , 20), 1 FROM t1; -INSERT INTO t1 SELECT a + 16, MOD(a + 16, 20), 1 FROM t1; -INSERT INTO t1 SELECT a + 32, MOD(a + 32, 20), 1 FROM t1; -INSERT INTO t1 SELECT a + 64, MOD(a + 64, 20), 1 FROM t1; -EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 128 -EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using filesort -DROP TABLE t1; CREATE TABLE t1 ( id int NOT NULL, name varchar(20) NOT NULL, @@ -503,37 +486,6 @@ a 2 5 drop table t1; -set @save_qcache_size=@@global.query_cache_size; -set @save_qcache_type=@@global.query_cache_type; -set global query_cache_size=10*1024*1024; -set global query_cache_type=1; -drop table if exists `test`; -Warnings: -Note 1051 Unknown table 'test' -CREATE TABLE `test` (`test1` varchar(3) NOT NULL, -`test2` varchar(4) NOT NULL,PRIMARY KEY (`test1`)) -ENGINE=InnoDB DEFAULT CHARSET=latin1; -INSERT INTO `test` (`test1`, `test2`) VALUES ('tes', '5678'); -select * from test; -test1 test2 -tes 5678 -INSERT INTO `test` (`test1`, `test2`) VALUES ('tes', '1234') -ON DUPLICATE KEY UPDATE `test2` = '1234'; -select * from test; -test1 test2 -tes 1234 -flush tables; -select * from test; -test1 test2 -tes 1234 -drop table test; -set global query_cache_type=@save_qcache_type; -set global query_cache_size=@save_qcache_size; -drop table if exists t1; -create table t1 (a int) engine=innodb; -alter table t1 alter a set default 1; -drop table t1; -End of 5.0 tests create table t1( id int auto_increment, c char(1) not null, @@ -858,6 +810,10 @@ a 2 5 drop table t1; +drop table if exists t1; +create table t1 (a int) engine=innodb; +alter table t1 alter a set default 1; +drop table t1; End of 5.0 tests CREATE TABLE `t2` ( `k` int(11) NOT NULL auto_increment, diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index db513902b2c..7a3cbf26a21 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1301,6 +1301,7 @@ drop procedure f3; drop procedure f4; drop table t1; set GLOBAL query_cache_size=0; +End of 4.1 tests SET GLOBAL query_cache_size=102400; create table t1(a int); insert into t1 values(0), (1), (4), (5); diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 9c98dc8d027..273c60110b3 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -5659,31 +5659,6 @@ t3_id_1 t3_id_2 t4_id DROP PROCEDURE p1| DROP VIEW v1, v2| DROP TABLE t3, t4| -drop database if exists mysqltest_db1; -create database mysqltest_db1; -create procedure mysqltest_db1.sp_bug28551() begin end; -call mysqltest_db1.sp_bug28551(); -show warnings; -Level Code Message -drop database mysqltest_db1; -drop database if exists mysqltest_db1; -drop table if exists test.t1; -create database mysqltest_db1; -use mysqltest_db1; -drop database mysqltest_db1; -create table test.t1 (id int); -insert into test.t1 (id) values (1); -create procedure test.sp_bug29050() begin select * from t1; end// -show warnings; -Level Code Message -call test.sp_bug29050(); -id -1 -show warnings; -Level Code Message -use test; -drop procedure sp_bug29050; -drop table t1; End of 5.0 tests Begin of 5.1 tests drop function if exists pi; @@ -6306,6 +6281,31 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI DROP VIEW v1; DROP FUNCTION metered; DROP TABLE t1; +drop database if exists mysqltest_db1; +create database mysqltest_db1; +create procedure mysqltest_db1.sp_bug28551() begin end; +call mysqltest_db1.sp_bug28551(); +show warnings; +Level Code Message +drop database mysqltest_db1; +drop database if exists mysqltest_db1; +drop table if exists test.t1; +create database mysqltest_db1; +use mysqltest_db1; +drop database mysqltest_db1; +create table test.t1 (id int); +insert into test.t1 (id) values (1); +create procedure test.sp_bug29050() begin select * from t1; end// +show warnings; +Level Code Message +call test.sp_bug29050(); +id +1 +show warnings; +Level Code Message +use test; +drop procedure sp_bug29050; +drop table t1; drop procedure if exists proc_25411_a; drop procedure if exists proc_25411_b; drop procedure if exists proc_25411_c; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 3a2434892c5..e0db99cf42b 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -878,7 +878,7 @@ drop procedure f4; drop table t1; set GLOBAL query_cache_size=0; -# End of 4.1 tests +--echo End of 4.1 tests # # Bug #10303: problem with last_query_cost @@ -1129,7 +1129,7 @@ set GLOBAL query_cache_type=default; set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_size=default; -# End of 5.0 tests +--echo End of 5.0 tests # @@ -1174,4 +1174,4 @@ show status like 'Qcache_queries_in_cache'; drop database db2; drop database db3; -# End of 5.1 tests +--echo End of 5.1 tests -- cgit v1.2.1 From 6e3d4f1c9844997c1a051efb8986698856410b4a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2007 09:25:01 +0200 Subject: Post-merge fixes Disabled test cases that produce errors in a "server log". mysql-test/t/disabled.def: Post-merge fixes Removed 'binlog_innodb' from the wrong disabled.def file. --- mysql-test/suite/binlog/t/disabled.def | 14 ++++++++++++++ mysql-test/t/disabled.def | 1 - 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/binlog/t/disabled.def (limited to 'mysql-test') diff --git a/mysql-test/suite/binlog/t/disabled.def b/mysql-test/suite/binlog/t/disabled.def new file mode 100644 index 00000000000..76eeb5b00ef --- /dev/null +++ b/mysql-test/suite/binlog/t/disabled.def @@ -0,0 +1,14 @@ +############################################################################## +# +# List the test cases that are to be disabled temporarily. +# +# Separate the test case name and the comment with ':'. +# +# : BUG# +# +# Do not use any TAB characters for whitespace. +# +############################################################################## + +binlog_innodb : Bug#29806 2007-07-15 ingo master.err: InnoDB: Error: MySQL is freeing a thd +binlog_killed : Bug#29806 2007-07-17 ingo master.err: InnoDB: Error: MySQL is freeing a thd diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index b994561116d..d253b4b51e2 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -25,5 +25,4 @@ ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Do mysql_upgrade : Bug#28560 test links to /usr/local/mysql/lib libraries, causes non-determinism and failures on ABI breakage federated_innodb : Bug#29522 failed assertion in binlog_close_connection() -binlog_innodb : Bug#29806 2007-07-15 ingo master.err: InnoDB: Error: MySQL is freeing a thd innodb_mysql : Bug#29807 2007-07-15 ingo master.err: Cannot find table test/t2 from the internal data dictionary -- cgit v1.2.1 From cc533adf9cd6b1325a346c9d5c90ace6487a3ff1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2007 09:52:55 +0200 Subject: Disabled a test case that reports an error on OSX. --- mysql-test/t/disabled.def | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test') diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index d253b4b51e2..3576f1dbc23 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -26,3 +26,4 @@ ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Do mysql_upgrade : Bug#28560 test links to /usr/local/mysql/lib libraries, causes non-determinism and failures on ABI breakage federated_innodb : Bug#29522 failed assertion in binlog_close_connection() innodb_mysql : Bug#29807 2007-07-15 ingo master.err: Cannot find table test/t2 from the internal data dictionary +lowercase_table3 : Bug#29839 2007-07-17 ingo Cannot find table test/T1 from the internal data dictionary -- cgit v1.2.1 From e44d995fa92c562e71e7fe65d6054e0383f493a0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2007 16:25:32 +0200 Subject: Ensure "mysql-stress-test.pl" is included in both "tar.gz" and RPM packages. Fixing bug#21023: "mysql-stress-test.pl" missing in builds mysql-test/Makefile.am: Ensure "mysql-stress-test.pl" is handled by "make install" in the "mysql-test" directory. This should get the script into the result tree of a RPM build. Fixing bug#21023. scripts/make_binary_distribution.sh: Copy "mysql-test/mysql-stress-test.pl" into a binary distribution ("tar.gz" and derived formats). Fixing bug#21023. --- mysql-test/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index ebc2bbb83e8..1920a68b21b 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -35,7 +35,7 @@ testdir = $(benchdir_root)/mysql-test EXTRA_SCRIPTS = mysql-test-run-shell.sh install_test_db.sh valgrind.supp $(PRESCRIPTS) EXTRA_DIST = $(EXTRA_SCRIPTS) suite GENSCRIPTS = mysql-test-run-shell mysql-test-run install_test_db mtr -PRESCRIPTS = mysql-test-run.pl +PRESCRIPTS = mysql-test-run.pl mysql-stress-test.pl test_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS) test_DATA = std_data/client-key.pem \ std_data/client-cert.pem \ -- cgit v1.2.1 From 5f462f96266c193ea13bd2aa0a13c181c1d0919c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2007 14:42:06 +0400 Subject: Add a test case for Bug#27248 Triggers: error if insert affects temporary table. The bug itself is yet another manifestation of Bug 26141. mysql-test/r/trigger.result: Update results. mysql-test/t/trigger.test: Add a test case for Bug#27248 Triggers: error if insert affects temporary table --- mysql-test/r/trigger.result | 28 ++++++++++++++++++++++++++++ mysql-test/t/trigger.test | 23 +++++++++++++++++++++++ 2 files changed, 51 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 4b18e525e62..a07318435f6 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -1933,4 +1933,32 @@ Before UPDATE, new=multi-UPDATE, SET for t2, but the trigger is fired, old=multi After UPDATE, new=multi-UPDATE, SET for t2, but the trigger is fired, old=multi-UPDATE drop view v1; drop table t1, t2, t1_op_log; + +Bug#27248 Triggers: error if insert affects temporary table + +The bug was fixed by the fix for Bug#26141 + +drop table if exists t1; +drop temporary table if exists t2; +create table t1 (s1 int); +create temporary table t2 (s1 int); +create trigger t1_bi before insert on t1 for each row insert into t2 values (0); +create trigger t1_bd before delete on t1 for each row delete from t2; +insert into t1 values (0); +insert into t1 values (0); +select * from t1; +s1 +0 +0 +select * from t2; +s1 +0 +0 +delete from t1; +select * from t1; +s1 +select * from t2; +s1 +drop table t1; +drop temporary table t2; End of 5.0 tests diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index a6390036322..2f62ad38621 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -2194,4 +2194,27 @@ drop table t1, t2, t1_op_log; # # TODO: test LOAD DATA INFILE +# +--echo +--echo Bug#27248 Triggers: error if insert affects temporary table +--echo +--echo The bug was fixed by the fix for Bug#26141 +--echo +--disable_warnings +drop table if exists t1; +drop temporary table if exists t2; +--enable_warnings +create table t1 (s1 int); +create temporary table t2 (s1 int); +create trigger t1_bi before insert on t1 for each row insert into t2 values (0); +create trigger t1_bd before delete on t1 for each row delete from t2; +insert into t1 values (0); +insert into t1 values (0); +select * from t1; +select * from t2; +delete from t1; +select * from t1; +select * from t2; +drop table t1; +drop temporary table t2; --echo End of 5.0 tests -- cgit v1.2.1 From c0277a1192d0526ea76968196584e7d2b5a51203 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2007 16:22:05 +0400 Subject: A fix and a test case for Bug#26104 Bug on foreign key class constructor. Fix the typo in the constructor. Cover a semantic check that previously never worked with a test. mysql-test/r/create.result: Update results (Bug#26104) mysql-test/r/innodb.result: Update results. mysql-test/t/create.test: Add a test case for Bug#26104 Bug on foreign key class constructor mysql-test/t/innodb.test: Return a new error number (MySQL error instead of internal InnoDB error). sql/sql_class.h: A fix for Bug#26104 Bug on foreign key class constructor -- fix the typo in the constructor --- mysql-test/r/create.result | 16 ++++++++++++++++ mysql-test/r/innodb.result | 2 +- mysql-test/t/create.test | 19 +++++++++++++++++++ mysql-test/t/innodb.test | 2 +- 4 files changed, 37 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index e692dbf3938..a1843573794 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1503,4 +1503,20 @@ t1 CREATE TABLE `t1` ( `c17` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; + +Bug #26104 Bug on foreign key class constructor + +Check that ref_columns is initalized correctly in the constructor +and semantic checks in mysql_prepare_table work. + +We do not need a storage engine that supports foreign keys +for this test, as the checks are purely syntax-based, and the +syntax is supported for all engines. + +drop table if exists t1,t2; +create table t1(a int not null, b int not null, primary key (a, b)); +create table t2(a int not null, b int not null, c int not null, primary key (a), +foreign key fk_bug26104 (b,c) references t1(a)); +ERROR 42000: Incorrect foreign key definition for 'fk_bug26104': Key reference and table reference don't match +drop table t1; End of 5.0 tests diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 80b46e5098a..6082a30bce3 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1648,7 +1648,7 @@ t2 CREATE TABLE `t2` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t2; create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb; -ERROR HY000: Can't create table './test/t2' (errno: 150) +ERROR 42000: Incorrect foreign key definition for 't1_id_fk': Key reference and table reference don't match create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb; show create table t2; Table Create Table diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 99f3fea416a..a6679cd674a 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1118,5 +1118,24 @@ show create table t1; drop table t1; +--echo +--echo Bug #26104 Bug on foreign key class constructor +--echo +--echo Check that ref_columns is initalized correctly in the constructor +--echo and semantic checks in mysql_prepare_table work. +--echo +--echo We do not need a storage engine that supports foreign keys +--echo for this test, as the checks are purely syntax-based, and the +--echo syntax is supported for all engines. +--echo +--disable_warnings +drop table if exists t1,t2; +--enable_warnings + +create table t1(a int not null, b int not null, primary key (a, b)); +--error ER_WRONG_FK_DEF +create table t2(a int not null, b int not null, c int not null, primary key (a), +foreign key fk_bug26104 (b,c) references t1(a)); +drop table t1; --echo End of 5.0 tests diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index a9679c01071..04dfa1d0836 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1180,7 +1180,7 @@ drop table t2; # Clean up filename -- embedded server reports whole path without .frm, # regular server reports relative path with .frm (argh!) --replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / t2.frm t2 ---error 1005 +--error ER_WRONG_FK_DEF create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb; # bug#3749 -- cgit v1.2.1 From 6981af6ff53d63254284a4b6a5370c17075793bc Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2007 17:09:03 +0400 Subject: Add a test case for Bug#22427 create table if not exists + stored function results in inconsistent behavior. The bug itself was fixed by the patch for bug 20662. mysql-test/r/sp-prelocking.result: Update results (Bug#22427) mysql-test/t/sp-prelocking.test: Add a test case for Bug#22427 create table if not exists + stored function results in inconsistent behavior --- mysql-test/r/sp-prelocking.result | 22 ++++++++++++++++++++++ mysql-test/t/sp-prelocking.test | 23 +++++++++++++++++++++++ 2 files changed, 45 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result index 5eac54803f0..c19bd1abd26 100644 --- a/mysql-test/r/sp-prelocking.result +++ b/mysql-test/r/sp-prelocking.result @@ -267,4 +267,26 @@ drop table bug_27907_logs; insert into bug_27907_t1(a) values (1); ERROR 42S02: Table 'test.bug_27907_logs' doesn't exist drop table bug_27907_t1; + +Bug#22427 create table if not exists + stored function results in +inconsistent behavior + +Add a test case, the bug itself was fixed by the patch for +Bug#20662 + +drop table if exists t1; +drop function if exists f_bug22427; +create table t1 (i int); +insert into t1 values (1); +create function f_bug22427() returns int return (select max(i) from t1); +select f_bug22427(); +f_bug22427() +1 +create table if not exists t1 select f_bug22427() as i; +Warnings: +Note 1050 Table 't1' already exists +create table t1 select f_bug22427() as i; +ERROR 42S01: Table 't1' already exists +drop table t1; +drop function f_bug22427; End of 5.0 tests diff --git a/mysql-test/t/sp-prelocking.test b/mysql-test/t/sp-prelocking.test index ec5b7fbad7c..60e97260839 100644 --- a/mysql-test/t/sp-prelocking.test +++ b/mysql-test/t/sp-prelocking.test @@ -333,4 +333,27 @@ insert into bug_27907_t1(a) values (1); drop table bug_27907_t1; +--echo +--echo Bug#22427 create table if not exists + stored function results in +--echo inconsistent behavior +--echo +--echo Add a test case, the bug itself was fixed by the patch for +--echo Bug#20662 +--echo +--disable_warnings +drop table if exists t1; +drop function if exists f_bug22427; +--enable_warnings +create table t1 (i int); +insert into t1 values (1); +create function f_bug22427() returns int return (select max(i) from t1); +select f_bug22427(); +# Until this bug was fixed, the following emitted error +# ERROR 1213: Deadlock found when trying to get lock +create table if not exists t1 select f_bug22427() as i; +--error ER_TABLE_EXISTS_ERROR +create table t1 select f_bug22427() as i; +drop table t1; +drop function f_bug22427; + --echo End of 5.0 tests -- cgit v1.2.1 From 2bfe84d434104fdc1a9b69c62a237e01043f865f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2007 19:14:48 +0500 Subject: Fixed bug #28524. For each view the mysqldump utility creates a temporary table with the same name and the same columns as the view in order to satisfy views that depend on this view. After the creation of all tables, mysqldump drops all temporary tables and creates actual views. However, --skip-add-drop-table and --compact flags disable DROP TABLE statements for those temporary tables. Thus, it was impossible to create the views because of existence of the temporary tables with the same names. client/mysqldump.c: Fixed bug #28524. The mysqldump utility has been modified to unconditionally drop temporary tables before the creation of views. mysql-test/t/mysqldump.test: Updated test case for bug #28524 and updated result of previous tests. mysql-test/r/mysqldump.result: Updated test case for bug #28524 and updated result of previous tests. --- mysql-test/r/mysqldump.result | 33 +++++++++++++++++++++++---------- mysql-test/t/mysqldump.test | 13 +++++++++++++ 2 files changed, 36 insertions(+), 10 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 8eac7c7e715..da05fe7bc5b 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -1889,7 +1889,7 @@ DROP TABLE IF EXISTS `v2`; /*!50001 CREATE TABLE `v2` ( `a` varchar(30) ) */; -/*!50001 DROP TABLE IF EXISTS `v2`*/; +/*!50001 DROP TABLE `v2`*/; /*!50001 DROP VIEW IF EXISTS `v2`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ @@ -1968,7 +1968,7 @@ DROP TABLE IF EXISTS `v1`; /*!50001 CREATE TABLE `v1` ( `a` int(11) ) */; -/*!50001 DROP TABLE IF EXISTS `v1`*/; +/*!50001 DROP TABLE `v1`*/; /*!50001 DROP VIEW IF EXISTS `v1`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ @@ -2027,7 +2027,7 @@ DROP TABLE IF EXISTS `v2`; /*!50001 CREATE TABLE `v2` ( `a` varchar(30) ) */; -/*!50001 DROP TABLE IF EXISTS `v2`*/; +/*!50001 DROP TABLE `v2`*/; /*!50001 DROP VIEW IF EXISTS `v2`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ @@ -2137,17 +2137,17 @@ DROP TABLE IF EXISTS `v3`; `b` int(11), `c` varchar(30) ) */; -/*!50001 DROP TABLE IF EXISTS `v1`*/; +/*!50001 DROP TABLE `v1`*/; /*!50001 DROP VIEW IF EXISTS `v1`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v1` AS select `v3`.`a` AS `a`,`v3`.`b` AS `b`,`v3`.`c` AS `c` from `v3` where (`v3`.`b` in (1,2,3,4,5,6,7)) */; -/*!50001 DROP TABLE IF EXISTS `v2`*/; +/*!50001 DROP TABLE `v2`*/; /*!50001 DROP VIEW IF EXISTS `v2`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v2` AS select `v3`.`a` AS `a` from (`v3` join `v1`) where ((`v1`.`a` = `v3`.`a`) and (`v3`.`b` = 3)) limit 1 */; -/*!50001 DROP TABLE IF EXISTS `v3`*/; +/*!50001 DROP TABLE `v3`*/; /*!50001 DROP VIEW IF EXISTS `v3`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ @@ -2721,17 +2721,17 @@ DROP TABLE IF EXISTS `v2`; ) */; USE `test`; -/*!50001 DROP TABLE IF EXISTS `v0`*/; +/*!50001 DROP TABLE `v0`*/; /*!50001 DROP VIEW IF EXISTS `v0`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v0` AS select `v1`.`a` AS `a`,`v1`.`b` AS `b`,`v1`.`c` AS `c` from `v1` */; -/*!50001 DROP TABLE IF EXISTS `v1`*/; +/*!50001 DROP TABLE `v1`*/; /*!50001 DROP VIEW IF EXISTS `v1`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b`,`t1`.`c` AS `c` from `t1` */; -/*!50001 DROP TABLE IF EXISTS `v2`*/; +/*!50001 DROP TABLE `v2`*/; /*!50001 DROP VIEW IF EXISTS `v2`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ @@ -2941,11 +2941,13 @@ insert into t values(5, 51); create view v1 as select qty, price, qty*price as value from t; create view v2 as select qty from v1; mysqldump { +/*!50001 DROP TABLE `v1`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v1` AS select `t`.`qty` AS `qty`,`t`.`price` AS `price`,(`t`.`qty` * `t`.`price`) AS `value` from `t` */; } mysqldump { +/*!50001 DROP TABLE `v2`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v2` AS select `v1`.`qty` AS `qty` from `v1` */; @@ -3029,7 +3031,7 @@ DROP TABLE IF EXISTS `v1`; ) */; USE `mysqldump_test_db`; -/*!50001 DROP TABLE IF EXISTS `v1`*/; +/*!50001 DROP TABLE `v1`*/; /*!50001 DROP VIEW IF EXISTS `v1`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ @@ -3076,6 +3078,7 @@ USE `mysqldump_views`; USE `mysqldump_tables`; USE `mysqldump_views`; +/*!50001 DROP TABLE `nasishnasifu`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `mysqldump_views`.`nasishnasifu` AS select `mysqldump_tables`.`basetable`.`id` AS `id` from `mysqldump_tables`.`basetable` */; @@ -3321,5 +3324,15 @@ CREATE TABLE `t1` ( INSERT INTO `t1` VALUES (11,0x7171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171); DROP TABLE t1; # +# Bug #28524: mysqldump --skip-add-drop-table is not +# compatible with views +# +CREATE VIEW v1 AS SELECT 1; +DROP VIEW v1; +SELECT * FROM v1; +1 +1 +DROP VIEW v1; +# # End of 5.0 tests # diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 30c241d4096..d42162541de 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1541,6 +1541,19 @@ INSERT INTO t1 SET c1=11, c2=REPEAT('q',509); --exec $MYSQL_DUMP --skip-create --compact --hex-blob test t1 DROP TABLE t1; +--echo # +--echo # Bug #28524: mysqldump --skip-add-drop-table is not +--echo # compatible with views +--echo # + +CREATE VIEW v1 AS SELECT 1; +--exec $MYSQL_DUMP --skip-add-drop-table test > $MYSQLTEST_VARDIR/tmp/bug28524.sql +DROP VIEW v1; + +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug28524.sql +SELECT * FROM v1; +DROP VIEW v1; + --echo # --echo # End of 5.0 tests --echo # -- cgit v1.2.1 From 155eb4658d3c238d2d27e6ca9f7e0ef91cf045b5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2007 18:08:05 +0300 Subject: 5.0-opt -> 5.1-opt merge --- mysql-test/r/index_merge_myisam.result | 61 ++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result index f135d849f76..9d7d06f7f1b 100644 --- a/mysql-test/r/index_merge_myisam.result +++ b/mysql-test/r/index_merge_myisam.result @@ -457,6 +457,67 @@ a 1 UNLOCK TABLES; DROP TABLE t1, t2; +CREATE TABLE `t1` ( +`a` int(11) DEFAULT NULL, +`filler` char(200) DEFAULT NULL, +`b` int(11) DEFAULT NULL, +KEY `a` (`a`), +KEY `b` (`b`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +insert into t1 values +(0, 'filler', 0), (1, 'filler', 1), (2, 'filler', 2), (3, 'filler', 3), +(4, 'filler', 4), (5, 'filler', 5), (6, 'filler', 6), (7, 'filler', 7), +(8, 'filler', 8), (9, 'filler', 9), (0, 'filler', 0), (1, 'filler', 1), +(2, 'filler', 2), (3, 'filler', 3), (4, 'filler', 4), (5, 'filler', 5), +(6, 'filler', 6), (7, 'filler', 7), (8, 'filler', 8), (9, 'filler', 9), +(10, 'filler', 10), (11, 'filler', 11), (12, 'filler', 12), (13, 'filler', 13), +(14, 'filler', 14), (15, 'filler', 15), (16, 'filler', 16), (17, 'filler', 17), +(18, 'filler', 18), (19, 'filler', 19), (4, '5 ', 0), (5, '4 ', 0), +(4, '4 ', 0), (4, 'qq ', 5), (5, 'qq ', 4), (4, 'zz ', 4); +create table t2( +`a` int(11) DEFAULT NULL, +`filler` char(200) DEFAULT NULL, +`b` int(11) DEFAULT NULL, +KEY USING BTREE (`a`), +KEY USING BTREE (`b`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +insert into t2 select * from t1; +must use sort-union rather than union: +explain select * from t1 where a=4 or b=4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge a,b a,b 5,5 NULL # Using sort_union(a,b); Using where +select * from t1 where a=4 or b=4; +a filler b +4 4 0 +4 5 0 +4 filler 4 +4 filler 4 +4 qq 5 +4 zz 4 +5 qq 4 +select * from t1 ignore index(a,b) where a=4 or b=4; +a filler b +4 4 0 +4 5 0 +4 filler 4 +4 filler 4 +4 qq 5 +4 zz 4 +5 qq 4 +must use union, not sort-union: +explain select * from t2 where a=4 or b=4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index_merge a,b a,b 5,5 NULL # Using union(a,b); Using where +select * from t2 where a=4 or b=4; +a filler b +4 4 0 +4 5 0 +4 filler 4 +4 filler 4 +4 qq 5 +4 zz 4 +5 qq 4 +drop table t1, t2; #---------------- ROR-index_merge tests ----------------------- SET SESSION STORAGE_ENGINE = MyISAM; drop table if exists t0,t1,t2; -- cgit v1.2.1 From b55bb35c25b48712b4b2da759697a9755f6996cb Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2007 15:31:24 -0600 Subject: ddl_i18n_utf8.test, ddl_i18n_koi8r.test: Don't run test with embedded server; requires external client connections mysql-test/t/ddl_i18n_koi8r.test: Don't run test with embedded server; requires external client connections mysql-test/t/ddl_i18n_utf8.test: Don't run test with embedded server; requires external client connections --- mysql-test/t/ddl_i18n_koi8r.test | 2 ++ mysql-test/t/ddl_i18n_utf8.test | 2 ++ 2 files changed, 4 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/t/ddl_i18n_koi8r.test b/mysql-test/t/ddl_i18n_koi8r.test index e636d801b07..1d16adbad55 100644 --- a/mysql-test/t/ddl_i18n_koi8r.test +++ b/mysql-test/t/ddl_i18n_koi8r.test @@ -30,6 +30,8 @@ # ########################################################################### +# Test requires server to accept client connections (for mysqldump portions) +--source include/not_embedded.inc --source include/have_utf8.inc --source include/have_cp866.inc --source include/have_cp1251.inc diff --git a/mysql-test/t/ddl_i18n_utf8.test b/mysql-test/t/ddl_i18n_utf8.test index 5f032232e56..c80137a58b5 100644 --- a/mysql-test/t/ddl_i18n_utf8.test +++ b/mysql-test/t/ddl_i18n_utf8.test @@ -30,6 +30,8 @@ # ########################################################################### +# Test requires server to accept client connections (for mysqldump portions) +--source include/not_embedded.inc --source include/have_utf8.inc --source include/have_cp866.inc --source include/have_cp1251.inc -- cgit v1.2.1 From 8e500b7b75c94ad467a18adfddf6eebd28912281 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Jul 2007 14:56:04 +0500 Subject: mysqldump.result: Post-merge fix. mysql-test/r/mysqldump.result: Post-merge fix. --- mysql-test/r/mysqldump.result | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 5a073ffe7a4..e8c971a41bc 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -2916,7 +2916,6 @@ USE `test`; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; -/*!50001 DROP TABLE IF EXISTS `v2`*/; /*!50001 DROP TABLE `v2`*/; /*!50001 DROP VIEW IF EXISTS `v2`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; @@ -3146,13 +3145,13 @@ insert into t values(5, 51); create view v1 as select qty, price, qty*price as value from t; create view v2 as select qty from v1; mysqldump { +/*!50001 DROP TABLE `v1`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = latin1 */; /*!50001 SET character_set_results = latin1 */; /*!50001 SET collation_connection = latin1_swedish_ci */; -/*!50001 DROP TABLE `v1`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v1` AS select `t`.`qty` AS `qty`,`t`.`price` AS `price`,(`t`.`qty` * `t`.`price`) AS `value` from `t` */; @@ -3161,13 +3160,13 @@ mysqldump { /*!50001 SET collation_connection = @saved_col_connection */; } mysqldump { +/*!50001 DROP TABLE `v2`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = latin1 */; /*!50001 SET character_set_results = latin1 */; /*!50001 SET collation_connection = latin1_swedish_ci */; -/*!50001 DROP TABLE `v2`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v2` AS select `v1`.`qty` AS `qty` from `v1` */; @@ -3310,13 +3309,13 @@ USE `mysqldump_views`; USE `mysqldump_tables`; USE `mysqldump_views`; +/*!50001 DROP TABLE `nasishnasifu`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = latin1 */; /*!50001 SET character_set_results = latin1 */; /*!50001 SET collation_connection = latin1_swedish_ci */; -/*!50001 DROP TABLE `nasishnasifu`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `mysqldump_views`.`nasishnasifu` AS select `mysqldump_tables`.`basetable`.`id` AS `id` from `mysqldump_tables`.`basetable` */; @@ -3876,7 +3875,7 @@ DROP TABLE IF EXISTS `v1`; ) */; USE `mysqldump_test_db`; -/*!50001 DROP TABLE IF EXISTS `v1`*/; +/*!50001 DROP TABLE `v1`*/; /*!50001 DROP VIEW IF EXISTS `v1`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; -- cgit v1.2.1 From 93de616578d601d49dfee8927bdd539da94dc69f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Jul 2007 19:56:07 +0400 Subject: A post-merge fix --- mysql-test/r/create.result | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index cdbb767dd9f..de25fb754e4 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1516,6 +1516,22 @@ t1 CREATE TABLE `t1` ( `c17` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; + +Bug #26104 Bug on foreign key class constructor + +Check that ref_columns is initalized correctly in the constructor +and semantic checks in mysql_prepare_table work. + +We do not need a storage engine that supports foreign keys +for this test, as the checks are purely syntax-based, and the +syntax is supported for all engines. + +drop table if exists t1,t2; +create table t1(a int not null, b int not null, primary key (a, b)); +create table t2(a int not null, b int not null, c int not null, primary key (a), +foreign key fk_bug26104 (b,c) references t1(a)); +ERROR 42000: Incorrect foreign key definition for 'fk_bug26104': Key reference and table reference don't match +drop table t1; End of 5.0 tests CREATE TABLE t1 (a int, b int); insert into t1 values (1,1),(1,2); -- cgit v1.2.1 From 7f6a8164846da34a822e8f844d6ec9e1da3af412 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Jul 2007 20:21:23 +0400 Subject: Bug#29850: Wrong charset of GROUP_CONCAT result when the select employs a temporary table. The result string of the Item_func_group_concat wasn't initialized in the copying constructor of the Item_func_group_concat class. This led to a wrong charset of GROUP_CONCAT result when the select employs a temporary table. The copying constructor of the Item_func_group_concat class now correctly initializes the charset of the result string. mysql-test/t/func_gconcat.test: Added a test case for the bug#29850: Wrong charset of the GROUP_CONCAT result when the select employs a temporary table. mysql-test/r/func_gconcat.result: Added a test case for the bug#29850: Wrong charset of the GROUP_CONCAT result when the select employs a temporary table. sql/item_sum.cc: Bug#29850: Wrong charset of GROUP_CONCAT result when the select employs a temporary table. The copying constructor of the Item_func_group_concat class now correctly initializes the charset of the result string. --- mysql-test/r/func_gconcat.result | 9 +++++++++ mysql-test/t/func_gconcat.test | 11 +++++++++++ 2 files changed, 20 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 8b71ad1940e..35487c25ae3 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -810,4 +810,13 @@ LENGTH( GROUP_CONCAT( a ) ) 65535 SET group_concat_max_len= DEFAULT; DROP TABLE t1, t2, t3; +set names latin1; +create table t1 (id int, name varchar(20)) DEFAULT CHARSET=utf8; +insert into t1 (id, name) values (1, "óra"); +insert into t1 (id, name) values (2, "óra"); +select b.id, group_concat(b.name) from t1 a, t1 b group by b.id; +id group_concat(b.name) +1 óra,óra +2 óra,óra +drop table t1; End of 5.0 tests diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 767df5ae233..ff3ba951870 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -551,4 +551,15 @@ SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 3; SET group_concat_max_len= DEFAULT; DROP TABLE t1, t2, t3; +# +# Bug#29850: Wrong charset of the GROUP_CONCAT result when the select employs +# a temporary table. +# +set names latin1; +create table t1 (id int, name varchar(20)) DEFAULT CHARSET=utf8; +insert into t1 (id, name) values (1, "óra"); +insert into t1 (id, name) values (2, "óra"); +select b.id, group_concat(b.name) from t1 a, t1 b group by b.id; +drop table t1; + --echo End of 5.0 tests -- cgit v1.2.1 From a131428f041cd015662240bde255d159bcc53af7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Jul 2007 00:06:35 +0400 Subject: Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag. The Item_date_typecast::val_int function doesn't reset null_value flag. This makes all values that follows the first null value to be treated as nulls and led to a wrong result. Now the Item_date_typecast::val_int function correctly sets the null_value flag for both null and non-null values. mysql-test/t/cast.test: Added a test case for the bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag. mysql-test/r/cast.result: Added a test case for the bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag. sql/item_timefunc.cc: Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag. Now the Item_date_typecast::val_int function correctly sets the null_value flag for both null and non-null values. --- mysql-test/r/cast.result | 11 +++++++++++ mysql-test/t/cast.test | 9 +++++++++ 2 files changed, 20 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 6eceeff87e2..524ff48d69e 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -403,4 +403,15 @@ hex(cast('a' as binary(2))) select hex(cast('a' as char(2) binary)); hex(cast('a' as char(2) binary)) 61 +CREATE TABLE t1 (d1 datetime); +INSERT INTO t1(d1) VALUES ('2007-07-19 08:30:00'), (NULL), +('2007-07-19 08:34:00'), (NULL), ('2007-07-19 08:36:00'); +SELECT cast(date(d1) as signed) FROM t1; +cast(date(d1) as signed) +20070719 +NULL +20070719 +NULL +20070719 +drop table t1; End of 5.0 tests diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index b665eb86656..316b79efe4d 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -237,4 +237,13 @@ select hex(cast('a' as char(2) binary)); select hex(cast('a' as binary(2))); select hex(cast('a' as char(2) binary)); +# +# Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag. +# +CREATE TABLE t1 (d1 datetime); +INSERT INTO t1(d1) VALUES ('2007-07-19 08:30:00'), (NULL), + ('2007-07-19 08:34:00'), (NULL), ('2007-07-19 08:36:00'); +SELECT cast(date(d1) as signed) FROM t1; +drop table t1; + --echo End of 5.0 tests -- cgit v1.2.1 From 20b9d9bb2ffec3eb2490047b4c9e4b6502342904 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 23 Jul 2007 22:01:22 -0600 Subject: Bug#29993 (Default value of log_output should be 'FILE', not 'TABLE') Changed the default location of the log output to LOG_FILE, for backward compatibility with MySQL 5.0 mysql-test/r/log_state.result: Changed the default location of the log output to LOG_FILE, for backward compatibility with MySQL 5.0 sql/set_var.cc: Changed the default location of the log output to LOG_FILE, for backward compatibility with MySQL 5.0 --- mysql-test/r/log_state.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/log_state.result b/mysql-test/r/log_state.result index 946797aeec7..38b3ebd6e98 100644 --- a/mysql-test/r/log_state.result +++ b/mysql-test/r/log_state.result @@ -131,7 +131,7 @@ set global general_log=ON; set global log_output=default; show variables like 'log_output'; Variable_name Value -log_output TABLE +log_output FILE set global general_log=OFF; set global log_output=FILE; truncate table mysql.general_log; -- cgit v1.2.1