From ff1df12a20535be9b94e669f29a6134597dbe4a1 Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Thu, 10 Sep 2009 11:15:39 +0200 Subject: WL#4444 Added TRUNCATE partition support, fixes bug#19405 and bug #35111 --- mysql-test/r/partition_truncate.result | 18 +++ mysql-test/suite/parts/inc/partition_mgm.inc | 90 +++++++++++ .../suite/parts/r/partition_mgm_lc0_archive.result | 12 ++ .../suite/parts/r/partition_mgm_lc0_innodb.result | 164 +++++++++++++++++++++ .../suite/parts/r/partition_mgm_lc0_memory.result | 164 +++++++++++++++++++++ .../suite/parts/r/partition_mgm_lc0_myisam.result | 164 +++++++++++++++++++++ .../suite/parts/r/partition_mgm_lc0_ndb.result | 12 ++ .../suite/parts/r/partition_mgm_lc1_archive.result | 12 ++ .../suite/parts/r/partition_mgm_lc1_innodb.result | 164 +++++++++++++++++++++ .../suite/parts/r/partition_mgm_lc1_memory.result | 164 +++++++++++++++++++++ .../suite/parts/r/partition_mgm_lc1_myisam.result | 164 +++++++++++++++++++++ .../suite/parts/r/partition_mgm_lc1_ndb.result | 12 ++ .../suite/parts/r/partition_mgm_lc2_archive.result | 12 ++ .../suite/parts/r/partition_mgm_lc2_innodb.result | 164 +++++++++++++++++++++ .../suite/parts/r/partition_mgm_lc2_memory.result | 164 +++++++++++++++++++++ .../suite/parts/r/partition_mgm_lc2_myisam.result | 164 +++++++++++++++++++++ .../suite/parts/r/partition_mgm_lc2_ndb.result | 12 ++ .../suite/parts/t/partition_mgm_lc0_archive.test | 1 + .../suite/parts/t/partition_mgm_lc0_ndb.test | 2 + .../suite/parts/t/partition_mgm_lc1_archive.test | 1 + .../suite/parts/t/partition_mgm_lc1_ndb.test | 2 + .../suite/parts/t/partition_mgm_lc2_archive.test | 1 + .../suite/parts/t/partition_mgm_lc2_ndb.test | 2 + mysql-test/t/partition_truncate.test | 26 ++++ 24 files changed, 1691 insertions(+) create mode 100644 mysql-test/r/partition_truncate.result create mode 100644 mysql-test/t/partition_truncate.test (limited to 'mysql-test') diff --git a/mysql-test/r/partition_truncate.result b/mysql-test/r/partition_truncate.result new file mode 100644 index 00000000000..8f594a319df --- /dev/null +++ b/mysql-test/r/partition_truncate.result @@ -0,0 +1,18 @@ +drop table if exists t1, t2, t3, t4; +create table t1 (a int) +partition by list (a) +(partition p1 values in (0)); +alter table t1 truncate partition p1,p1; +ERROR HY000: Incorrect partition name +alter table t1 truncate partition p0; +ERROR HY000: Incorrect partition name +drop table t1; +create table t1 (a int) +partition by list (a) +subpartition by hash (a) +subpartitions 1 +(partition p1 values in (1) +(subpartition sp1)); +alter table t1 truncate partition sp1; +ERROR HY000: Incorrect partition name +drop table t1; diff --git a/mysql-test/suite/parts/inc/partition_mgm.inc b/mysql-test/suite/parts/inc/partition_mgm.inc index 1ab548222a8..9dfa2b2ffb3 100644 --- a/mysql-test/suite/parts/inc/partition_mgm.inc +++ b/mysql-test/suite/parts/inc/partition_mgm.inc @@ -13,6 +13,7 @@ # part_optA-D Extra partitioning options (E.g. INDEX/DATA DIR) # # # # have_bug33158 NDB case insensitive create, but case sensitive rename # +# no_truncate No support for truncate partition # #------------------------------------------------------------------------------# # Original Author: mattiasj # # Original Date: 2008-06-27 # @@ -518,6 +519,95 @@ DROP TABLE TableA; } # End of $can_only_key +if ($no_truncate) +{ +--echo # Verify that TRUNCATE PARTITION gives error +eval CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, + b VARCHAR(255)) +ENGINE = $engine +PARTITION BY KEY (a) +(PARTITION LT1000, + PARTITION LT2000, + PARTITION MAX); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +--error ER_PARTITION_MGMT_ON_NONPARTITIONED, ER_ILLEGAL_HA +ALTER TABLE t1 TRUNCATE PARTITION MAX; +} +if (!$no_truncate) +{ +--echo # Testing TRUNCATE PARTITION +eval CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, + b VARCHAR(255)) +ENGINE = $engine +PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000), + PARTITION LT2000 VALUES LESS THAN (2000), + PARTITION MAX VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +SHOW CREATE TABLE t1; +SELECT * FROM t1 ORDER BY a; +ALTER TABLE t1 ANALYZE PARTITION MAX; +--echo # Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (1)"); +SELECT * FROM t1 WHERE a >= 2000; +--echo # Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION MAX; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (2)"); +SELECT * FROM t1 WHERE a >= 2000; +--echo # Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (3)"); +SELECT * FROM t1 WHERE a >= 2000; +--echo # Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (4)"); +SELECT * FROM t1 WHERE a >= 2000; +--echo # Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (1)"); +SELECT * FROM t1 ORDER BY a; +--echo # Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (2)"); +SELECT * FROM t1 ORDER BY a; +--echo # Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (3)"); +SELECT * FROM t1 ORDER BY a; +--echo # Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (4)"); +SELECT * FROM t1 ORDER BY a; +--echo # Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (1)"); +SELECT * FROM t1 ORDER BY a; +--echo # Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (2)"); +SELECT * FROM t1 ORDER BY a; +--echo # Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (3)"); +SELECT * FROM t1 ORDER BY a; +--echo # Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (4)"); +SELECT * FROM t1 ORDER BY a; +DROP TABLE t1; +} --echo # Cleaning up before exit eval USE $old_db; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_archive.result b/mysql-test/suite/parts/r/partition_mgm_lc0_archive.result index 30ff27df298..4f623813386 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc0_archive.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc0_archive.result @@ -915,6 +915,18 @@ TableA CREATE TABLE `TableA` ( ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Verify that TRUNCATE PARTITION gives error +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'Archive' +PARTITION BY KEY (a) +(PARTITION LT1000, +PARTITION LT2000, +PARTITION MAX); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +ALTER TABLE t1 TRUNCATE PARTITION MAX; +Got one of the listed errors # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result index cd55ffbad03..19f16780d13 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result @@ -915,6 +915,170 @@ TableA CREATE TABLE `TableA` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Testing TRUNCATE PARTITION +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'InnoDB' +PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000), +PARTITION LT2000 VALUES LESS THAN (2000), +PARTITION MAX VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL AUTO_INCREMENT, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = InnoDB, + PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = InnoDB, + PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +SELECT * FROM t1 ORDER BY a; +a b +1 First +2 Second +999 Last in LT1000 +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First in MAX +2001 Second in MAX +ALTER TABLE t1 ANALYZE PARTITION MAX; +Table Op Msg_type Msg_text +MySQL_Test_DB.t1 analyze status OK +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (1)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION MAX; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (2)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (3)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (4)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +2008 First after TRUNCATE LT2000 (4) +DROP TABLE t1; # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result index faf776e03a3..69a43b64d87 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result @@ -915,6 +915,170 @@ TableA CREATE TABLE `TableA` ( ) ENGINE=MEMORY DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Testing TRUNCATE PARTITION +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'Memory' +PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000), +PARTITION LT2000 VALUES LESS THAN (2000), +PARTITION MAX VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL AUTO_INCREMENT, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MEMORY AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = MEMORY, + PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = MEMORY, + PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = MEMORY) */ +SELECT * FROM t1 ORDER BY a; +a b +1 First +2 Second +999 Last in LT1000 +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First in MAX +2001 Second in MAX +ALTER TABLE t1 ANALYZE PARTITION MAX; +Table Op Msg_type Msg_text +MySQL_Test_DB.t1 analyze note The storage engine for the table doesn't support analyze +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (1)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION MAX; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (2)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (3)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (4)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +2008 First after TRUNCATE LT2000 (4) +DROP TABLE t1; # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result index 827f7a15c24..9b4e85be9d0 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result @@ -915,6 +915,170 @@ TableA CREATE TABLE `TableA` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Testing TRUNCATE PARTITION +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'MyISAM' +PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000), +PARTITION LT2000 VALUES LESS THAN (2000), +PARTITION MAX VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL AUTO_INCREMENT, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = MyISAM, + PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = MyISAM, + PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +SELECT * FROM t1 ORDER BY a; +a b +1 First +2 Second +999 Last in LT1000 +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First in MAX +2001 Second in MAX +ALTER TABLE t1 ANALYZE PARTITION MAX; +Table Op Msg_type Msg_text +MySQL_Test_DB.t1 analyze status OK +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (1)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION MAX; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (2)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (3)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (4)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +2008 First after TRUNCATE LT2000 (4) +DROP TABLE t1; # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result b/mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result index 45b674638e7..15b3f424527 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result @@ -181,6 +181,18 @@ TableA CREATE TABLE `TableA` ( ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 # Cleaning up after KEY PARTITIONING test DROP TABLE TableA; +# Verify that TRUNCATE PARTITION gives error +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'NDBCluster' +PARTITION BY KEY (a) +(PARTITION LT1000, +PARTITION LT2000, +PARTITION MAX); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +ALTER TABLE t1 TRUNCATE PARTITION MAX; +Got one of the listed errors # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_archive.result b/mysql-test/suite/parts/r/partition_mgm_lc1_archive.result index 443453a2d70..4cd8cafa3ee 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc1_archive.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc1_archive.result @@ -882,6 +882,18 @@ TableA CREATE TABLE `tablea` ( ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Verify that TRUNCATE PARTITION gives error +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'Archive' +PARTITION BY KEY (a) +(PARTITION LT1000, +PARTITION LT2000, +PARTITION MAX); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +ALTER TABLE t1 TRUNCATE PARTITION MAX; +Got one of the listed errors # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result index 49ccc7b1808..952f4136cb6 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result @@ -882,6 +882,170 @@ TableA CREATE TABLE `tablea` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Testing TRUNCATE PARTITION +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'InnoDB' +PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000), +PARTITION LT2000 VALUES LESS THAN (2000), +PARTITION MAX VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL AUTO_INCREMENT, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = InnoDB, + PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = InnoDB, + PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +SELECT * FROM t1 ORDER BY a; +a b +1 First +2 Second +999 Last in LT1000 +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First in MAX +2001 Second in MAX +ALTER TABLE t1 ANALYZE PARTITION MAX; +Table Op Msg_type Msg_text +mysql_test_db.t1 analyze status OK +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (1)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION MAX; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (2)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (3)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (4)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +2008 First after TRUNCATE LT2000 (4) +DROP TABLE t1; # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result index 6f34054428c..435a0d8313e 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result @@ -882,6 +882,170 @@ TableA CREATE TABLE `tablea` ( ) ENGINE=MEMORY DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Testing TRUNCATE PARTITION +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'Memory' +PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000), +PARTITION LT2000 VALUES LESS THAN (2000), +PARTITION MAX VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL AUTO_INCREMENT, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MEMORY AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = MEMORY, + PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = MEMORY, + PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = MEMORY) */ +SELECT * FROM t1 ORDER BY a; +a b +1 First +2 Second +999 Last in LT1000 +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First in MAX +2001 Second in MAX +ALTER TABLE t1 ANALYZE PARTITION MAX; +Table Op Msg_type Msg_text +mysql_test_db.t1 analyze note The storage engine for the table doesn't support analyze +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (1)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION MAX; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (2)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (3)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (4)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +2008 First after TRUNCATE LT2000 (4) +DROP TABLE t1; # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result index ac230e29c66..3a90ce4d73c 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result @@ -882,6 +882,170 @@ TableA CREATE TABLE `tablea` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Testing TRUNCATE PARTITION +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'MyISAM' +PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000), +PARTITION LT2000 VALUES LESS THAN (2000), +PARTITION MAX VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL AUTO_INCREMENT, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = MyISAM, + PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = MyISAM, + PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +SELECT * FROM t1 ORDER BY a; +a b +1 First +2 Second +999 Last in LT1000 +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First in MAX +2001 Second in MAX +ALTER TABLE t1 ANALYZE PARTITION MAX; +Table Op Msg_type Msg_text +mysql_test_db.t1 analyze status OK +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (1)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION MAX; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (2)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (3)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (4)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +2008 First after TRUNCATE LT2000 (4) +DROP TABLE t1; # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result b/mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result index 0a53e1b4a9b..1d221caa163 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result @@ -219,6 +219,18 @@ TableA CREATE TABLE `tablea` ( ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 # Cleaning up after KEY PARTITIONING test DROP TABLE TableA; +# Verify that TRUNCATE PARTITION gives error +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'NDBCluster' +PARTITION BY KEY (a) +(PARTITION LT1000, +PARTITION LT2000, +PARTITION MAX); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +ALTER TABLE t1 TRUNCATE PARTITION MAX; +Got one of the listed errors # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_archive.result b/mysql-test/suite/parts/r/partition_mgm_lc2_archive.result index fc0390c238d..6e8abfef06d 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc2_archive.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc2_archive.result @@ -882,6 +882,18 @@ TableA CREATE TABLE `TableA` ( ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Verify that TRUNCATE PARTITION gives error +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'Archive' +PARTITION BY KEY (a) +(PARTITION LT1000, +PARTITION LT2000, +PARTITION MAX); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +ALTER TABLE t1 TRUNCATE PARTITION MAX; +Got one of the listed errors # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result index da111137068..8e42bc9eb62 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result @@ -882,6 +882,170 @@ TableA CREATE TABLE `TableA` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Testing TRUNCATE PARTITION +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'InnoDB' +PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000), +PARTITION LT2000 VALUES LESS THAN (2000), +PARTITION MAX VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL AUTO_INCREMENT, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = InnoDB, + PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = InnoDB, + PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +SELECT * FROM t1 ORDER BY a; +a b +1 First +2 Second +999 Last in LT1000 +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First in MAX +2001 Second in MAX +ALTER TABLE t1 ANALYZE PARTITION MAX; +Table Op Msg_type Msg_text +mysql_test_db.t1 analyze status OK +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (1)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION MAX; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (2)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (3)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (4)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +2008 First after TRUNCATE LT2000 (4) +DROP TABLE t1; # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result index a1716ea36c8..24047912ab1 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc2_memory.result @@ -882,6 +882,170 @@ TableA CREATE TABLE `TableA` ( ) ENGINE=MEMORY DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Testing TRUNCATE PARTITION +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'Memory' +PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000), +PARTITION LT2000 VALUES LESS THAN (2000), +PARTITION MAX VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL AUTO_INCREMENT, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MEMORY AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = MEMORY, + PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = MEMORY, + PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = MEMORY) */ +SELECT * FROM t1 ORDER BY a; +a b +1 First +2 Second +999 Last in LT1000 +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First in MAX +2001 Second in MAX +ALTER TABLE t1 ANALYZE PARTITION MAX; +Table Op Msg_type Msg_text +mysql_test_db.t1 analyze note The storage engine for the table doesn't support analyze +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (1)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION MAX; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (2)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (3)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (4)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +2008 First after TRUNCATE LT2000 (4) +DROP TABLE t1; # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result index 6bdfa149de0..7a61a811ea3 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result @@ -882,6 +882,170 @@ TableA CREATE TABLE `TableA` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 # Cleaning up after LIST PARTITIONING test DROP TABLE TableA; +# Testing TRUNCATE PARTITION +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'MyISAM' +PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000), +PARTITION LT2000 VALUES LESS THAN (2000), +PARTITION MAX VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) NOT NULL AUTO_INCREMENT, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (a) +(PARTITION LT1000 VALUES LESS THAN (1000) ENGINE = MyISAM, + PARTITION LT2000 VALUES LESS THAN (2000) ENGINE = MyISAM, + PARTITION MAX VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +SELECT * FROM t1 ORDER BY a; +a b +1 First +2 Second +999 Last in LT1000 +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First in MAX +2001 Second in MAX +ALTER TABLE t1 ANALYZE PARTITION MAX; +Table Op Msg_type Msg_text +mysql_test_db.t1 analyze status OK +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (1)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION MAX; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (2)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (3)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION MAX; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE MAX (4)"); +SELECT * FROM t1 WHERE a >= 2000; +a b +2000 First after TRUNCATE MAX (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT1000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT1000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +1000 First in LT2000 +1001 Second in LT2000 +1999 Last in LT2000 +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +# Truncate without FLUSH +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (1)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +# Truncate with FLUSH after +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +FLUSH TABLES; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (2)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +# Truncate with FLUSH before +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (3)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +# Truncate with FLUSH after INSERT +FLUSH TABLES; +ALTER TABLE t1 TRUNCATE PARTITION LT2000; +INSERT INTO t1 VALUES (NULL, "First after TRUNCATE LT2000 (4)"); +SELECT * FROM t1 ORDER BY a; +a b +2000 First after TRUNCATE MAX (4) +2001 First after TRUNCATE LT1000 (1) +2002 First after TRUNCATE LT1000 (2) +2003 First after TRUNCATE LT1000 (3) +2004 First after TRUNCATE LT1000 (4) +2005 First after TRUNCATE LT2000 (1) +2006 First after TRUNCATE LT2000 (2) +2007 First after TRUNCATE LT2000 (3) +2008 First after TRUNCATE LT2000 (4) +DROP TABLE t1; # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result b/mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result index 8b9c5be1fb6..2f5dfe5e08e 100644 --- a/mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result +++ b/mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result @@ -219,6 +219,18 @@ TableA CREATE TABLE `TableA` ( ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 # Cleaning up after KEY PARTITIONING test DROP TABLE TableA; +# Verify that TRUNCATE PARTITION gives error +CREATE TABLE t1 +(a BIGINT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(255)) +ENGINE = 'NDBCluster' +PARTITION BY KEY (a) +(PARTITION LT1000, +PARTITION LT2000, +PARTITION MAX); +INSERT INTO t1 VALUES (NULL, "First"), (NULL, "Second"), (999, "Last in LT1000"), (NULL, "First in LT2000"), (NULL, "Second in LT2000"), (1999, "Last in LT2000"), (NULL, "First in MAX"), (NULL, "Second in MAX"); +ALTER TABLE t1 TRUNCATE PARTITION MAX; +Got one of the listed errors # Cleaning up before exit USE test; DROP DATABASE MySQL_Test_DB; diff --git a/mysql-test/suite/parts/t/partition_mgm_lc0_archive.test b/mysql-test/suite/parts/t/partition_mgm_lc0_archive.test index 5b4f2568d46..313da329a9f 100644 --- a/mysql-test/suite/parts/t/partition_mgm_lc0_archive.test +++ b/mysql-test/suite/parts/t/partition_mgm_lc0_archive.test @@ -35,6 +35,7 @@ ##### Storage engine to be tested --source include/have_archive.inc let $engine= 'Archive'; +let $no_truncate= 1; #------------------------------------------------------------------------------# # Execute the tests to be applied to all storage engines diff --git a/mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test b/mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test index 686c69cca25..736e45067bc 100644 --- a/mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test +++ b/mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test @@ -41,6 +41,8 @@ let $can_only_key= 1; # Allow hash/list/range partitioning with ndb #SET new=on; let $engine= 'NDBCluster'; +# NDB does not yet support TRUNCATE PARTITION +let $no_truncate= 1; #------------------------------------------------------------------------------# # Execute the tests to be applied to all storage engines diff --git a/mysql-test/suite/parts/t/partition_mgm_lc1_archive.test b/mysql-test/suite/parts/t/partition_mgm_lc1_archive.test index 2bc643db75f..58eef828f06 100644 --- a/mysql-test/suite/parts/t/partition_mgm_lc1_archive.test +++ b/mysql-test/suite/parts/t/partition_mgm_lc1_archive.test @@ -32,6 +32,7 @@ ##### Storage engine to be tested --source include/have_archive.inc let $engine= 'Archive'; +let $no_truncate= 1; #------------------------------------------------------------------------------# # Execute the tests to be applied to all storage engines diff --git a/mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test b/mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test index a70b9b5c41c..ac425eb84ff 100644 --- a/mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test +++ b/mysql-test/suite/parts/t/partition_mgm_lc1_ndb.test @@ -38,6 +38,8 @@ let $can_only_key= 1; # Allow hash/list/range partitioning with ndb #SET new=on; let $engine= 'NDBCluster'; +# NDB does not yet support TRUNCATE PARTITION +let $no_truncate= 1; #------------------------------------------------------------------------------# # Execute the tests to be applied to all storage engines diff --git a/mysql-test/suite/parts/t/partition_mgm_lc2_archive.test b/mysql-test/suite/parts/t/partition_mgm_lc2_archive.test index d0e2591804d..92036178e59 100644 --- a/mysql-test/suite/parts/t/partition_mgm_lc2_archive.test +++ b/mysql-test/suite/parts/t/partition_mgm_lc2_archive.test @@ -32,6 +32,7 @@ ##### Storage engine to be tested --source include/have_archive.inc let $engine= 'Archive'; +let $no_truncate= 1; #------------------------------------------------------------------------------# # Execute the tests to be applied to all storage engines diff --git a/mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test b/mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test index 67fdfdde70b..725ba3b5e74 100644 --- a/mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test +++ b/mysql-test/suite/parts/t/partition_mgm_lc2_ndb.test @@ -37,6 +37,8 @@ let $can_only_key= 1; # Allow hash/list/range partitioning with ndb #SET new=on; let $engine= 'NDBCluster'; +# NDB does not yet support TRUNCATE PARTITION +let $no_truncate= 1; #------------------------------------------------------------------------------# # Execute the tests to be applied to all storage engines diff --git a/mysql-test/t/partition_truncate.test b/mysql-test/t/partition_truncate.test new file mode 100644 index 00000000000..93b9cf62d14 --- /dev/null +++ b/mysql-test/t/partition_truncate.test @@ -0,0 +1,26 @@ +# +# Simple tests to verify truncate partition syntax +# +--source include/have_partition.inc +--disable_warnings +drop table if exists t1, t2, t3, t4; +--enable_warnings + +create table t1 (a int) +partition by list (a) +(partition p1 values in (0)); +--error ER_WRONG_PARTITION_NAME +alter table t1 truncate partition p1,p1; +--error ER_WRONG_PARTITION_NAME +alter table t1 truncate partition p0; +drop table t1; + +create table t1 (a int) +partition by list (a) +subpartition by hash (a) +subpartitions 1 +(partition p1 values in (1) + (subpartition sp1)); +--error ER_WRONG_PARTITION_NAME +alter table t1 truncate partition sp1; +drop table t1; -- cgit v1.2.1 From d5fd452d7c7a2d5e59ee2c09cdc3be8025f09471 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Thu, 10 Sep 2009 03:18:29 -0600 Subject: WL#2110 (SIGNAL) WL#2265 (RESIGNAL) Manual merge of SIGNAL and RESIGNAL to mysql-trunk-signal, plus required dependencies. --- mysql-test/r/bigint.result | 4 +- mysql-test/r/cast.result | 2 +- mysql-test/r/ctype_utf8.result | 14 +- mysql-test/r/date_formats.result | 64 +- mysql-test/r/func_compress.result | 14 +- mysql-test/r/func_encrypt.result | 8 +- mysql-test/r/func_gconcat.result | 64 +- mysql-test/r/func_math.result | 10 +- mysql-test/r/func_str.result | 256 +- mysql-test/r/join_outer.result | 12 +- mysql-test/r/merge.result | 2 +- mysql-test/r/myisam-system.result | 2 +- mysql-test/r/partition.result | 1 - mysql-test/r/ps.result | 4 + mysql-test/r/query_cache.result | 8 +- mysql-test/r/signal.result | 2362 +++++++++++++++++ mysql-test/r/signal_code.result | 35 + mysql-test/r/signal_demo1.result | 270 ++ mysql-test/r/signal_demo2.result | 197 ++ mysql-test/r/signal_demo3.result | 143 ++ mysql-test/r/signal_sqlmode.result | 86 + mysql-test/r/sp-dynamic.result | 8 - mysql-test/r/sp-vars.result | 70 - mysql-test/r/sp.result | 51 +- mysql-test/r/sp_notembedded.result | 2 + mysql-test/r/strict.result | 52 +- mysql-test/r/trigger.result | 14 +- mysql-test/r/type_newdecimal.result | 76 +- mysql-test/r/view.result | 20 +- mysql-test/suite/binlog/r/binlog_index.result | 2 +- mysql-test/suite/binlog/r/binlog_unsafe.result | 27 - mysql-test/suite/innodb/r/innodb-zip.result | 26 - mysql-test/suite/ndb/r/ndb_bitfield.result | 4 +- mysql-test/suite/ndb/r/ndb_dd_basic.result | 6 +- mysql-test/suite/ndb/r/ndb_dd_ddl.result | 2 +- mysql-test/suite/ndb/r/ndb_gis.result | 4 +- mysql-test/suite/ndb/r/ndb_partition_error.result | 2 +- mysql-test/suite/ndb/r/ndb_row_format.result | 2 +- mysql-test/suite/ndb/r/ndb_single_user.result | 10 +- mysql-test/suite/rpl/r/rpl_EE_err.result | 2 +- mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result | 2 - mysql-test/t/func_gconcat.test | 32 + mysql-test/t/signal.test | 2685 ++++++++++++++++++++ mysql-test/t/signal_code.test | 57 + mysql-test/t/signal_demo1.test | 345 +++ mysql-test/t/signal_demo2.test | 207 ++ mysql-test/t/signal_demo3.test | 159 ++ mysql-test/t/signal_sqlmode.test | 123 + 48 files changed, 7056 insertions(+), 492 deletions(-) create mode 100644 mysql-test/r/signal.result create mode 100644 mysql-test/r/signal_code.result create mode 100644 mysql-test/r/signal_demo1.result create mode 100644 mysql-test/r/signal_demo2.result create mode 100644 mysql-test/r/signal_demo3.result create mode 100644 mysql-test/r/signal_sqlmode.result create mode 100644 mysql-test/t/signal.test create mode 100644 mysql-test/t/signal_code.test create mode 100644 mysql-test/t/signal_demo1.test create mode 100644 mysql-test/t/signal_demo2.test create mode 100644 mysql-test/t/signal_demo3.test create mode 100644 mysql-test/t/signal_sqlmode.test (limited to 'mysql-test') diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 4a5b8fcf4aa..7c23f1267c2 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -362,12 +362,12 @@ select cast(19999999999999999999 as signed); cast(19999999999999999999 as signed) 9223372036854775807 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select cast(-19999999999999999999 as signed); cast(-19999999999999999999 as signed) -9223372036854775808 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select -9223372036854775808; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def -9223372036854775808 8 20 20 N 32897 0 63 diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index dd61396e485..c53de220b60 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -380,7 +380,7 @@ select cast(s1 as decimal(7,2)) from t1; cast(s1 as decimal(7,2)) 99999.99 Warnings: -Error 1264 Out of range value for column 'cast(s1 as decimal(7,2))' at row 1 +Warning 1264 Out of range value for column 'cast(s1 as decimal(7,2))' at row 1 drop table t1; CREATE TABLE t1 (v varchar(10), tt tinytext, t text, mt mediumtext, lt longtext); diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 6f4ae965ca0..70f976ee9a7 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1631,27 +1631,27 @@ select char(0xff,0x8f using utf8); char(0xff,0x8f using utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FF8F' +Warning 1300 Invalid utf8 character string: 'FF8F' select char(195 using utf8); char(195 using utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'C3' +Warning 1300 Invalid utf8 character string: 'C3' select char(196 using utf8); char(196 using utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'C4' +Warning 1300 Invalid utf8 character string: 'C4' select char(2557 using utf8); char(2557 using utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FD' +Warning 1300 Invalid utf8 character string: 'FD' select convert(char(0xff,0x8f) using utf8); convert(char(0xff,0x8f) using utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FF8F' +Warning 1300 Invalid utf8 character string: 'FF8F' select hex(convert(char(2557 using latin1) using utf8)); hex(convert(char(2557 using latin1) using utf8)) 09C3BD @@ -1815,12 +1815,12 @@ select hex(char(0xFF using utf8)); hex(char(0xFF using utf8)) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FF' +Warning 1300 Invalid utf8 character string: 'FF' select hex(convert(0xFF using utf8)); hex(convert(0xFF using utf8)) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FF' +Warning 1300 Invalid utf8 character string: 'FF' select hex(_utf8 0x616263FF); ERROR HY000: Invalid utf8 character string: 'FF' select hex(_utf8 X'616263FF'); diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 7e185daa668..b0b8316fe33 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -89,7 +89,7 @@ select STR_TO_DATE('2004.12.12 22.30.61','%Y.%m.%d %T'); STR_TO_DATE('2004.12.12 22.30.61','%Y.%m.%d %T') NULL Warnings: -Error 1411 Incorrect time value: '22.30.61' for function str_to_date +Warning 1411 Incorrect time value: '22.30.61' for function str_to_date create table t1 (date char(30), format char(30) not null); insert into t1 values ('2003-01-02 10:11:12', '%Y-%m-%d %H:%i:%S'), @@ -361,21 +361,21 @@ Tuesday 52 2001 %W %u %x NULL 7 53 1998 %w %u %Y NULL NULL %m.%d.%Y NULL Warnings: -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date -Error 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date -Error 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date -Error 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date -Error 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date -Error 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: '7 53 1998' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date +Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date +Warning 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date +Warning 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date +Warning 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date +Warning 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: '7 53 1998' for function str_to_date select date,format,concat(str_to_date(date, format),'') as con from t1; date format con 2003-01-02 10:11:12 PM %Y-%m-%d %H:%i:%S %p NULL @@ -395,21 +395,21 @@ Tuesday 52 2001 %W %u %x NULL 7 53 1998 %w %u %Y NULL NULL %m.%d.%Y NULL Warnings: -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date -Error 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date -Error 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date -Error 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date -Error 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date -Error 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: '7 53 1998' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date +Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date +Warning 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date +Warning 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date +Warning 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date +Warning 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: '7 53 1998' for function str_to_date truncate table t1; insert into t1 values ('10:20:10AM', '%h:%i:%s'), @@ -449,7 +449,7 @@ select str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA')); str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA')) NULL Warnings: -Error 1411 Incorrect datetime value: '15-01-2001 12:59:59' for function str_to_date +Warning 1411 Incorrect datetime value: '15-01-2001 12:59:59' for function str_to_date explain extended select makedate(1997,1), addtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002"),subtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002"),timediff("01.01.97 11:59:59.000001 PM","31.12.95 11:59:59.000002 PM"),cast(str_to_date("15-01-2001 12:59:59", "%d-%m-%Y %H:%i:%S") as TIME), maketime(23,11,12),microsecond("1997-12-31 23:59:59.000001"); 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 diff --git a/mysql-test/r/func_compress.result b/mysql-test/r/func_compress.result index b4e61d0e4fc..650cc9c2c70 100644 --- a/mysql-test/r/func_compress.result +++ b/mysql-test/r/func_compress.result @@ -65,8 +65,8 @@ NULL 50000 NULL Warnings: -Error 1259 ZLIB: Input data corrupted -Error 1256 Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted) +Warning 1259 ZLIB: Input data corrupted +Warning 1256 Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted) drop table t1; set @@global.max_allowed_packet=1048576*100; select compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null; @@ -96,12 +96,12 @@ explain select * from t1 where uncompress(a) is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 Warnings: -Error 1259 ZLIB: Input data corrupted +Warning 1259 ZLIB: Input data corrupted select * from t1 where uncompress(a) is null; a foo Warnings: -Error 1259 ZLIB: Input data corrupted +Warning 1259 ZLIB: Input data corrupted explain select *, uncompress(a) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 @@ -109,13 +109,13 @@ select *, uncompress(a) from t1; a uncompress(a) foo NULL Warnings: -Error 1259 ZLIB: Input data corrupted +Warning 1259 ZLIB: Input data corrupted select *, uncompress(a), uncompress(a) is null from t1; a uncompress(a) uncompress(a) is null foo NULL 1 Warnings: -Error 1259 ZLIB: Input data corrupted -Error 1259 ZLIB: Input data corrupted +Warning 1259 ZLIB: Input data corrupted +Warning 1259 ZLIB: Input data corrupted drop table t1; CREATE TABLE t1 (c1 INT); INSERT INTO t1 VALUES (1), (1111), (11111); diff --git a/mysql-test/r/func_encrypt.result b/mysql-test/r/func_encrypt.result index 8fbf36b45b9..91ff4e218fb 100644 --- a/mysql-test/r/func_encrypt.result +++ b/mysql-test/r/func_encrypt.result @@ -124,7 +124,7 @@ select des_encrypt("hello",10); des_encrypt("hello",10) NULL Warnings: -Error 1108 Incorrect parameters to procedure 'des_encrypt' +Warning 1108 Incorrect parameters to procedure 'des_encrypt' select des_encrypt(NULL); des_encrypt(NULL) NULL @@ -138,12 +138,12 @@ select des_encrypt(10, NULL); des_encrypt(10, NULL) NULL Warnings: -Error 1108 Incorrect parameters to procedure 'des_encrypt' +Warning 1108 Incorrect parameters to procedure 'des_encrypt' select des_encrypt("hello", NULL); des_encrypt("hello", NULL) NULL Warnings: -Error 1108 Incorrect parameters to procedure 'des_encrypt' +Warning 1108 Incorrect parameters to procedure 'des_encrypt' select des_decrypt("hello",10); des_decrypt("hello",10) hello @@ -177,7 +177,7 @@ select hex(des_decrypt(des_encrypt("hello","hidden"))); hex(des_decrypt(des_encrypt("hello","hidden"))) NULL Warnings: -Error 1108 Incorrect parameters to procedure 'des_decrypt' +Warning 1108 Incorrect parameters to procedure 'des_decrypt' explain extended select des_decrypt(des_encrypt("hello",4),'password2'), des_decrypt(des_encrypt("hello","hidden")); 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 diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 3b78851a1b9..ebec186591d 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -153,10 +153,10 @@ grp group_concat(c) 4 5 NULL Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() show warnings; Level Code Message -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() set group_concat_max_len = 1024; select group_concat(sum(c)) from t1 group by grp; ERROR HY000: Invalid use of group function @@ -380,25 +380,29 @@ group_concat(b) bb,c BB,C Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() select group_concat(distinct b) from t1 group by a; group_concat(distinct b) bb,c BB,C Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() select group_concat(b order by b) from t1 group by a; group_concat(b order by b) a,bb A,BB Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 3 was cut by GROUP_CONCAT() +Warning 1260 Row 6 was cut by GROUP_CONCAT() select group_concat(distinct b order by b) from t1 group by a; group_concat(distinct b order by b) a,bb A,BB Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 3 was cut by GROUP_CONCAT() +Warning 1260 Row 6 was cut by GROUP_CONCAT() insert into t1 values (1, concat(repeat('1', 300), '2')), (1, concat(repeat('1', 300), '2')), (1, concat(repeat('0', 300), '1')), (2, concat(repeat('1', 300), '2')), (2, concat(repeat('1', 300), '2')), @@ -426,25 +430,29 @@ group_concat(b) bb,ccc,a,bb,ccc,1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112,1111111111111111111111111111111111111111111111111111111111111111111111111111111111 BB,CCC,A,BB,CCC,1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112,1111111111111111111111111111111111111111111111111111111111111111111111111111111111 Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 7 was cut by GROUP_CONCAT() +Warning 1260 Row 14 was cut by GROUP_CONCAT() select group_concat(distinct b) from t1 group by a; group_concat(distinct b) bb,ccc,a,1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 BB,CCC,A,1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 5 was cut by GROUP_CONCAT() +Warning 1260 Row 10 was cut by GROUP_CONCAT() select group_concat(b order by b) from t1 group by a; group_concat(b order by b) 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() select group_concat(distinct b order by b) from t1 group by a; group_concat(distinct b order by b) 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() drop table t1; create table t1 (a varchar(255) character set cp1250 collate cp1250_general_ci, b varchar(255) character set koi8r); @@ -751,22 +759,22 @@ SELECT GROUP_CONCAT( a ) FROM t1; GROUP_CONCAT( a ) aaaaaaaaaa,bbbbbbbbb Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() SELECT GROUP_CONCAT( DISTINCT a ) FROM t1; GROUP_CONCAT( DISTINCT a ) aaaaaaaaaa,bbbbbbbbb Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1; GROUP_CONCAT( a ORDER BY b ) aaaaaaaaaa,bbbbbbbbb Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() SELECT GROUP_CONCAT( DISTINCT a ORDER BY b ) FROM t1; GROUP_CONCAT( DISTINCT a ORDER BY b ) aaaaaaaaaa,bbbbbbbbb Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() SET group_concat_max_len = DEFAULT; DROP TABLE t1; SET group_concat_max_len= 65535; @@ -979,3 +987,31 @@ GROUP BY t1.a 1 DROP TABLE t1, t2; End of 5.0 tests +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (a VARCHAR(6), b INT); +CREATE TABLE t2 (a VARCHAR(6), b INT); +INSERT INTO t1 VALUES ('111111', 1); +INSERT INTO t1 VALUES ('222222', 2); +INSERT INTO t1 VALUES ('333333', 3); +INSERT INTO t1 VALUES ('444444', 4); +INSERT INTO t1 VALUES ('555555', 5); +SET group_concat_max_len = 5; +SET @old_sql_mode = @@sql_mode, @@sql_mode = 'traditional'; +SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b LIMIT 3; +GROUP_CONCAT(a) b +11111 1 +22222 2 +33333 3 +Warnings: +Warning 1260 Row 1 was cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() +Warning 1260 Row 3 was cut by GROUP_CONCAT() +INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; +ERROR HY000: Row 1 was cut by GROUP_CONCAT() +UPDATE t1 SET a = '11111' WHERE b = 1; +UPDATE t1 SET a = '22222' WHERE b = 2; +INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; +ERROR HY000: Row 3 was cut by GROUP_CONCAT() +SET group_concat_max_len = DEFAULT; +SET @@sql_mode = @old_sql_mode; +DROP TABLE t1, t2; diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index fd7ef72409e..d8b8a14afc6 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -225,27 +225,27 @@ select ln(-1); ln(-1) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select log10(-1); log10(-1) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select log2(-1); log2(-1) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select log(2,-1); log(2,-1) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select log(-2,1); log(-2,1) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 set sql_mode=''; select round(111,-10); round(111,-10) diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index a0c3935fde0..47fd4f2cdad 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1433,7 +1433,7 @@ select benchmark(-1, 1); benchmark(-1, 1) NULL Warnings: -Error 1411 Incorrect count value: '-1' for function benchmark +Warning 1411 Incorrect count value: '-1' for function benchmark set @password="password"; set @my_data="clear text to encode"; select md5(encode(@my_data, "password")); @@ -1533,7 +1533,7 @@ select locate('lo','hello',-18446744073709551615); locate('lo','hello',-18446744073709551615) 0 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select locate('lo','hello',18446744073709551615); locate('lo','hello',18446744073709551615) 0 @@ -1541,22 +1541,22 @@ select locate('lo','hello',-18446744073709551616); locate('lo','hello',-18446744073709551616) 0 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select locate('lo','hello',18446744073709551616); locate('lo','hello',18446744073709551616) 0 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select locate('lo','hello',-18446744073709551617); locate('lo','hello',-18446744073709551617) 0 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select locate('lo','hello',18446744073709551617); locate('lo','hello',18446744073709551617) 0 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select left('hello', 10); left('hello', 10) hello @@ -1588,8 +1588,8 @@ select left('hello', -18446744073709551615); left('hello', -18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select left('hello', 18446744073709551615); left('hello', 18446744073709551615) hello @@ -1597,26 +1597,26 @@ select left('hello', -18446744073709551616); left('hello', -18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select left('hello', 18446744073709551616); left('hello', 18446744073709551616) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select left('hello', -18446744073709551617); left('hello', -18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select left('hello', 18446744073709551617); left('hello', 18446744073709551617) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select right('hello', 10); right('hello', 10) hello @@ -1648,8 +1648,8 @@ select right('hello', -18446744073709551615); right('hello', -18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select right('hello', 18446744073709551615); right('hello', 18446744073709551615) hello @@ -1657,26 +1657,26 @@ select right('hello', -18446744073709551616); right('hello', -18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select right('hello', 18446744073709551616); right('hello', 18446744073709551616) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select right('hello', -18446744073709551617); right('hello', -18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select right('hello', 18446744073709551617); right('hello', 18446744073709551617) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 2, -1); substring('hello', 2, -1) @@ -1708,8 +1708,8 @@ select substring('hello', -18446744073709551615, 1); substring('hello', -18446744073709551615, 1) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551615, 1); substring('hello', 18446744073709551615, 1) @@ -1717,26 +1717,26 @@ select substring('hello', -18446744073709551616, 1); substring('hello', -18446744073709551616, 1) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551616, 1); substring('hello', 18446744073709551616, 1) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', -18446744073709551617, 1); substring('hello', -18446744073709551617, 1) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551617, 1); substring('hello', 18446744073709551617, 1) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 1, -1); substring('hello', 1, -1) @@ -1762,8 +1762,8 @@ select substring('hello', 1, -18446744073709551615); substring('hello', 1, -18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 1, 18446744073709551615); substring('hello', 1, 18446744073709551615) hello @@ -1771,26 +1771,26 @@ select substring('hello', 1, -18446744073709551616); substring('hello', 1, -18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 1, 18446744073709551616); substring('hello', 1, 18446744073709551616) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 1, -18446744073709551617); substring('hello', 1, -18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 1, 18446744073709551617); substring('hello', 1, 18446744073709551617) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', -1, -1); substring('hello', -1, -1) @@ -1816,10 +1816,10 @@ select substring('hello', -18446744073709551615, -18446744073709551615); substring('hello', -18446744073709551615, -18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551615, 18446744073709551615); substring('hello', 18446744073709551615, 18446744073709551615) @@ -1827,34 +1827,34 @@ select substring('hello', -18446744073709551616, -18446744073709551616); substring('hello', -18446744073709551616, -18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551616, 18446744073709551616); substring('hello', 18446744073709551616, 18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', -18446744073709551617, -18446744073709551617); substring('hello', -18446744073709551617, -18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551617, 18446744073709551617); substring('hello', 18446744073709551617, 18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', -1, 1, 'hi'); insert('hello', -1, 1, 'hi') hello @@ -1880,7 +1880,7 @@ select insert('hello', -18446744073709551615, 1, 'hi'); insert('hello', -18446744073709551615, 1, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551615, 1, 'hi'); insert('hello', 18446744073709551615, 1, 'hi') hello @@ -1888,22 +1888,22 @@ select insert('hello', -18446744073709551616, 1, 'hi'); insert('hello', -18446744073709551616, 1, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551616, 1, 'hi'); insert('hello', 18446744073709551616, 1, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', -18446744073709551617, 1, 'hi'); insert('hello', -18446744073709551617, 1, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551617, 1, 'hi'); insert('hello', 18446744073709551617, 1, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 1, -1, 'hi'); insert('hello', 1, -1, 'hi') hi @@ -1929,7 +1929,7 @@ select insert('hello', 1, -18446744073709551615, 'hi'); insert('hello', 1, -18446744073709551615, 'hi') hi Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 1, 18446744073709551615, 'hi'); insert('hello', 1, 18446744073709551615, 'hi') hi @@ -1937,22 +1937,22 @@ select insert('hello', 1, -18446744073709551616, 'hi'); insert('hello', 1, -18446744073709551616, 'hi') hi Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 1, 18446744073709551616, 'hi'); insert('hello', 1, 18446744073709551616, 'hi') hi Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 1, -18446744073709551617, 'hi'); insert('hello', 1, -18446744073709551617, 'hi') hi Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 1, 18446744073709551617, 'hi'); insert('hello', 1, 18446744073709551617, 'hi') hi Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', -1, -1, 'hi'); insert('hello', -1, -1, 'hi') hello @@ -1978,8 +1978,8 @@ select insert('hello', -18446744073709551615, -18446744073709551615, 'hi'); insert('hello', -18446744073709551615, -18446744073709551615, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551615, 18446744073709551615, 'hi'); insert('hello', 18446744073709551615, 18446744073709551615, 'hi') hello @@ -1987,26 +1987,26 @@ select insert('hello', -18446744073709551616, -18446744073709551616, 'hi'); insert('hello', -18446744073709551616, -18446744073709551616, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551616, 18446744073709551616, 'hi'); insert('hello', 18446744073709551616, 18446744073709551616, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', -18446744073709551617, -18446744073709551617, 'hi'); insert('hello', -18446744073709551617, -18446744073709551617, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551617, 18446744073709551617, 'hi'); insert('hello', 18446744073709551617, 18446744073709551617, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select repeat('hello', -1); repeat('hello', -1) @@ -2038,8 +2038,8 @@ select repeat('hello', -18446744073709551615); repeat('hello', -18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select repeat('hello', 18446744073709551615); repeat('hello', 18446744073709551615) NULL @@ -2049,27 +2049,27 @@ select repeat('hello', -18446744073709551616); repeat('hello', -18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select repeat('hello', 18446744073709551616); repeat('hello', 18446744073709551616) NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated select repeat('hello', -18446744073709551617); repeat('hello', -18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select repeat('hello', 18446744073709551617); repeat('hello', 18446744073709551617) NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated select space(-1); space(-1) @@ -2102,8 +2102,8 @@ select space(-18446744073709551615); space(-18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select space(18446744073709551615); space(18446744073709551615) NULL @@ -2113,27 +2113,27 @@ select space(-18446744073709551616); space(-18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select space(18446744073709551616); space(18446744073709551616) NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated select space(-18446744073709551617); space(-18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select space(18446744073709551617); space(18446744073709551617) NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated select rpad('hello', -1, '1'); rpad('hello', -1, '1') @@ -2166,8 +2166,8 @@ select rpad('hello', -18446744073709551615, '1'); rpad('hello', -18446744073709551615, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select rpad('hello', 18446744073709551615, '1'); rpad('hello', 18446744073709551615, '1') NULL @@ -2177,27 +2177,27 @@ select rpad('hello', -18446744073709551616, '1'); rpad('hello', -18446744073709551616, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select rpad('hello', 18446744073709551616, '1'); rpad('hello', 18446744073709551616, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of rpad() was larger than max_allowed_packet (1048576) - truncated select rpad('hello', -18446744073709551617, '1'); rpad('hello', -18446744073709551617, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select rpad('hello', 18446744073709551617, '1'); rpad('hello', 18446744073709551617, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of rpad() was larger than max_allowed_packet (1048576) - truncated select lpad('hello', -1, '1'); lpad('hello', -1, '1') @@ -2230,8 +2230,8 @@ select lpad('hello', -18446744073709551615, '1'); lpad('hello', -18446744073709551615, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select lpad('hello', 18446744073709551615, '1'); lpad('hello', 18446744073709551615, '1') NULL @@ -2241,27 +2241,27 @@ select lpad('hello', -18446744073709551616, '1'); lpad('hello', -18446744073709551616, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select lpad('hello', 18446744073709551616, '1'); lpad('hello', 18446744073709551616, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of lpad() was larger than max_allowed_packet (1048576) - truncated select lpad('hello', -18446744073709551617, '1'); lpad('hello', -18446744073709551617, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select lpad('hello', 18446744073709551617, '1'); lpad('hello', 18446744073709551617, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of lpad() was larger than max_allowed_packet (1048576) - truncated SET @orig_sql_mode = @@SQL_MODE; SET SQL_MODE=traditional; @@ -2269,12 +2269,12 @@ SELECT CHAR(0xff,0x8f USING utf8); CHAR(0xff,0x8f USING utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FF8F' +Warning 1300 Invalid utf8 character string: 'FF8F' SELECT CHAR(0xff,0x8f USING utf8) IS NULL; CHAR(0xff,0x8f USING utf8) IS NULL 1 Warnings: -Error 1300 Invalid utf8 character string: 'FF8F' +Warning 1300 Invalid utf8 character string: 'FF8F' SET SQL_MODE=@orig_sql_mode; select substring('abc', cast(2 as unsigned int)); substring('abc', cast(2 as unsigned int)) diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 1e4fc91b8bd..bc77072f67a 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -942,25 +942,29 @@ group_concat(t1.b,t2.c) aaaaa bbbbb Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 1 was cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a; group_concat(t1.b,t2.c) aaaaa bbbbb Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 1 was cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a; group_concat(t1.b,t2.c) aaaaa bbbbb Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 1 was cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a; group_concat(t1.b,t2.c) aaaaa bbbbb Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 1 was cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() drop table t1, t2; set group_concat_max_len=default; create table t1 (gid smallint(5) unsigned not null, x int(11) not null, y int(11) not null, art int(11) not null, primary key (gid,x,y)); diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 893ea5acf88..a2248d3d878 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -914,7 +914,7 @@ SELECT * FROM tm1; ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist CHECK TABLE tm1; Table Op Msg_type Msg_text -test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist +test.tm1 check Warning Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist test.tm1 check error Corrupt ALTER TABLE t2 MODIFY a INT; diff --git a/mysql-test/r/myisam-system.result b/mysql-test/r/myisam-system.result index e0629d955ae..b3ba8066f5c 100644 --- a/mysql-test/r/myisam-system.result +++ b/mysql-test/r/myisam-system.result @@ -2,7 +2,7 @@ drop table if exists t1,t2; create table t1 (a int) engine=myisam; drop table if exists t1; Warnings: -Error 2 Can't find file: 't1' (errno: 2) +Warning 2 Can't find file: 't1' (errno: 2) create table t1 (a int) engine=myisam; drop table t1; Got one of the listed errors diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 2d54a66fe11..a76cb2ba225 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1226,7 +1226,6 @@ COMMIT; END| CALL test.p1(12); Warnings: -Note 1051 Unknown table 't1' Warning 1196 Some non-transactional changed tables couldn't be rolled back CALL test.p1(13); Warnings: diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 1f8a077af40..06e6b8167fd 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -2748,17 +2748,21 @@ Warnings: Note 1051 Unknown table 't1' call proc_1(); Level Code Message +Note 1051 Unknown table 't1' drop table if exists t2; Warnings: Note 1051 Unknown table 't2' call proc_1(); Level Code Message +Note 1051 Unknown table 't2' drop table if exists t1, t2; Warnings: Note 1051 Unknown table 't1' Note 1051 Unknown table 't2' call proc_1(); Level Code Message +Note 1051 Unknown table 't1' +Note 1051 Unknown table 't2' drop procedure proc_1; create function func_1() returns int begin show warnings; return 1; end| ERROR 0A000: Not allowed to return a result set from a function diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 6cabc24d0eb..89057603c3d 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -889,7 +889,7 @@ select group_concat(a) FROM t1 group by b; group_concat(a) 1234567890 Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 1 was cut by GROUP_CONCAT() set group_concat_max_len=1024; select group_concat(a) FROM t1 group by b; group_concat(a) @@ -992,19 +992,19 @@ COUNT(*) 0 Warnings: Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 -Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 0 +Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid'; COUNT(*) 0 Warnings: Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1 -Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 0 +Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1 SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid'; COUNT(*) 0 Warnings: Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 -Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 0 +Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 diff --git a/mysql-test/r/signal.result b/mysql-test/r/signal.result new file mode 100644 index 00000000000..56140733c33 --- /dev/null +++ b/mysql-test/r/signal.result @@ -0,0 +1,2362 @@ +# +# PART 1: syntax +# +# +# Test every new reserved and non reserved keywords +# +drop table if exists signal_non_reserved; +create table signal_non_reserved ( +class_origin int, +subclass_origin int, +constraint_catalog int, +constraint_schema int, +constraint_name int, +catalog_name int, +schema_name int, +table_name int, +column_name int, +cursor_name int, +message_text int, +sqlcode int +); +drop table signal_non_reserved; +drop table if exists diag_non_reserved; +create table diag_non_reserved ( +diagnostics int, +current int, +stacked int, +exception int +); +drop table diag_non_reserved; +drop table if exists diag_cond_non_reserved; +create table diag_cond_non_reserved ( +condition_identifier int, +condition_number int, +condition_name int, +connection_name int, +message_length int, +message_octet_length int, +parameter_mode int, +parameter_name int, +parameter_ordinal_position int, +returned_sqlstate int, +routine_catalog int, +routine_name int, +routine_schema int, +server_name int, +specific_name int, +trigger_catalog int, +trigger_name int, +trigger_schema int +); +drop table diag_cond_non_reserved; +drop table if exists diag_stmt_non_reserved; +create table diag_stmt_non_reserved ( +number int, +more int, +command_function int, +command_function_code int, +dynamic_function int, +dynamic_function_code int, +row_count int, +transactions_committed int, +transactions_rolled_back int, +transaction_active int +); +drop table diag_stmt_non_reserved; +drop table if exists test_reserved; +create table test_reserved (signal int); +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 'signal int)' at line 1 +create table test_reserved (resignal int); +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 'resignal int)' at line 1 +create table test_reserved (condition int); +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 'condition int)' at line 1 +# +# Test the SIGNAL syntax +# +drop procedure if exists test_invalid; +drop procedure if exists test_signal_syntax; +drop function if exists test_signal_func; +create procedure test_invalid() +begin +SIGNAL; +end $$ +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 '; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL foo; +end $$ +ERROR 42000: Undefined CONDITION: foo +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR 1234; +SIGNAL foo; +end $$ +ERROR HY000: SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +SIGNAL SQLSTATE '23000'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +SIGNAL SQLSTATE VALUE '23000'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CLASS_ORIGIN = 'foo', CLASS_ORIGIN = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'CLASS_ORIGIN' +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MESSAGE_TEXT = 'foo', MESSAGE_TEXT = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'MESSAGE_TEXT' +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 'foo', MYSQL_ERRNO = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'MYSQL_ERRNO' +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET +CLASS_ORIGIN = 'foo', +SUBCLASS_ORIGIN = 'foo', +CONSTRAINT_CATALOG = 'foo', +CONSTRAINT_SCHEMA = 'foo', +CONSTRAINT_NAME = 'foo', +CATALOG_NAME = 'foo', +SCHEMA_NAME = 'foo', +TABLE_NAME = 'foo', +COLUMN_NAME = 'foo', +CURSOR_NAME = 'foo', +MESSAGE_TEXT = 'foo', +MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +SIGNAL SQLSTATE '00000' $$ +ERROR 42000: Bad SQLSTATE: '00000' +SIGNAL SQLSTATE '00001' $$ +ERROR 42000: Bad SQLSTATE: '00001' +create procedure test_invalid() +begin +SIGNAL SQLSTATE '00000'; +end $$ +ERROR 42000: Bad SQLSTATE: '00000' +create procedure test_invalid() +begin +SIGNAL SQLSTATE '00001'; +end $$ +ERROR 42000: Bad SQLSTATE: '00001' +# +# Test conditions information that SIGNAL can not set +# +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET bla_bla = 'foo'; +end $$ +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 'bla_bla = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET CONDITION_IDENTIFIER = 'foo'; +end $$ +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 'CONDITION_IDENTIFIER = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET CONDITION_NUMBER = 'foo'; +end $$ +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 'CONDITION_NUMBER = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET CONNECTION_NAME = 'foo'; +end $$ +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 'CONNECTION_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET MESSAGE_LENGTH = 'foo'; +end $$ +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 'MESSAGE_LENGTH = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET MESSAGE_OCTET_LENGTH = 'foo'; +end $$ +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 'MESSAGE_OCTET_LENGTH = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET PARAMETER_MODE = 'foo'; +end $$ +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 'PARAMETER_MODE = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET PARAMETER_NAME = 'foo'; +end $$ +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 'PARAMETER_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET PARAMETER_ORDINAL_POSITION = 'foo'; +end $$ +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 'PARAMETER_ORDINAL_POSITION = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET RETURNED_SQLSTATE = 'foo'; +end $$ +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 'RETURNED_SQLSTATE = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET ROUTINE_CATALOG = 'foo'; +end $$ +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 'ROUTINE_CATALOG = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET ROUTINE_NAME = 'foo'; +end $$ +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 'ROUTINE_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET ROUTINE_SCHEMA = 'foo'; +end $$ +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 'ROUTINE_SCHEMA = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET SERVER_NAME = 'foo'; +end $$ +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 'SERVER_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET SPECIFIC_NAME = 'foo'; +end $$ +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 'SPECIFIC_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET TRIGGER_CATALOG = 'foo'; +end $$ +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 'TRIGGER_CATALOG = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET TRIGGER_NAME = 'foo'; +end $$ +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 'TRIGGER_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET TRIGGER_SCHEMA = 'foo'; +end $$ +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 'TRIGGER_SCHEMA = 'foo'; +end' at line 3 +# +# Test the RESIGNAL syntax +# +drop procedure if exists test_invalid; +drop procedure if exists test_resignal_syntax; +create procedure test_invalid() +begin +RESIGNAL foo; +end $$ +ERROR 42000: Undefined CONDITION: foo +create procedure test_resignal_syntax() +begin +RESIGNAL; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR 1234; +RESIGNAL foo; +end $$ +ERROR HY000: SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SQLSTATE '23000'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SQLSTATE VALUE '23000'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CLASS_ORIGIN = 'foo', CLASS_ORIGIN = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'CLASS_ORIGIN' +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET MESSAGE_TEXT = 'foo', MESSAGE_TEXT = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'MESSAGE_TEXT' +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET MYSQL_ERRNO = 'foo', MYSQL_ERRNO = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'MYSQL_ERRNO' +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET +CLASS_ORIGIN = 'foo', +SUBCLASS_ORIGIN = 'foo', +CONSTRAINT_CATALOG = 'foo', +CONSTRAINT_SCHEMA = 'foo', +CONSTRAINT_NAME = 'foo', +CATALOG_NAME = 'foo', +SCHEMA_NAME = 'foo', +TABLE_NAME = 'foo', +COLUMN_NAME = 'foo', +CURSOR_NAME = 'foo', +MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_invalid() +begin +RESIGNAL SQLSTATE '00000'; +end $$ +ERROR 42000: Bad SQLSTATE: '00000' +create procedure test_invalid() +begin +RESIGNAL SQLSTATE '00001'; +end $$ +ERROR 42000: Bad SQLSTATE: '00001' +# +# PART 2: non preparable statements +# +prepare stmt from 'SIGNAL SQLSTATE \'23000\''; +ERROR HY000: This command is not supported in the prepared statement protocol yet +prepare stmt from 'RESIGNAL SQLSTATE \'23000\''; +ERROR HY000: This command is not supported in the prepared statement protocol yet +# +# PART 3: runtime execution +# +drop procedure if exists test_signal; +drop procedure if exists test_resignal; +drop table if exists t_warn; +drop table if exists t_cursor; +create table t_warn(a integer(2)); +create table t_cursor(a integer); +# +# SIGNAL can also appear in a query +# +SIGNAL foo; +ERROR 42000: Undefined CONDITION: foo +SIGNAL SQLSTATE '01000'; +Warnings: +Warning 1640 Unhandled user-defined warning condition +SIGNAL SQLSTATE '02000'; +ERROR 02000: Unhandled user-defined not found condition +SIGNAL SQLSTATE '23000'; +ERROR 23000: Unhandled user-defined exception condition +SIGNAL SQLSTATE VALUE '23000'; +ERROR 23000: Unhandled user-defined exception condition +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 65536; +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '65536' +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 99999; +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '99999' +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 4294967295; +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '4294967295' +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 0; +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '0' +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = -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 +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 65535; +ERROR HY000: Unhandled user-defined exception condition +# +# RESIGNAL can also appear in a query +# +RESIGNAL; +ERROR 0K000: RESIGNAL when handler not active +RESIGNAL foo; +ERROR 42000: Undefined CONDITION: foo +RESIGNAL SQLSTATE '12345'; +ERROR 0K000: RESIGNAL when handler not active +RESIGNAL SQLSTATE VALUE '12345'; +ERROR 0K000: RESIGNAL when handler not active +# +# Different kind of SIGNAL conditions +# +create procedure test_signal() +begin +# max range +DECLARE foo CONDITION FOR SQLSTATE 'AABBB'; +SIGNAL foo SET MYSQL_ERRNO = 65535; +end $$ +call test_signal() $$ +ERROR AABBB: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# max range +DECLARE foo CONDITION FOR SQLSTATE 'AABBB'; +SIGNAL foo SET MYSQL_ERRNO = 65536; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '65536' +drop procedure test_signal $$ +create procedure test_signal() +begin +# Error +DECLARE foo CONDITION FOR SQLSTATE '99999'; +SIGNAL foo SET MYSQL_ERRNO = 9999; +end $$ +call test_signal() $$ +ERROR 99999: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# warning +DECLARE too_few_records CONDITION FOR SQLSTATE '01000'; +SIGNAL too_few_records SET MYSQL_ERRNO = 1261; +end $$ +call test_signal() $$ +Warnings: +Warning 1261 Unhandled user-defined warning condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Not found +DECLARE sp_fetch_no_data CONDITION FOR SQLSTATE '02000'; +SIGNAL sp_fetch_no_data SET MYSQL_ERRNO = 1329; +end $$ +call test_signal() $$ +ERROR 02000: Unhandled user-defined not found condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Error +DECLARE sp_cursor_already_open CONDITION FOR SQLSTATE '24000'; +SIGNAL sp_cursor_already_open SET MYSQL_ERRNO = 1325; +end $$ +call test_signal() $$ +ERROR 24000: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Severe error +DECLARE lock_deadlock CONDITION FOR SQLSTATE '40001'; +SIGNAL lock_deadlock SET MYSQL_ERRNO = 1213; +end $$ +call test_signal() $$ +ERROR 40001: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Unknown -> error +DECLARE foo CONDITION FOR SQLSTATE "99999"; +SIGNAL foo; +end $$ +call test_signal() $$ +ERROR 99999: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# warning, no subclass +DECLARE warn CONDITION FOR SQLSTATE "01000"; +SIGNAL warn; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 Unhandled user-defined warning condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# warning, with subclass +DECLARE warn CONDITION FOR SQLSTATE "01123"; +SIGNAL warn; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 Unhandled user-defined warning condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Not found, no subclass +DECLARE not_found CONDITION FOR SQLSTATE "02000"; +SIGNAL not_found; +end $$ +call test_signal() $$ +ERROR 02000: Unhandled user-defined not found condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Not found, with subclass +DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; +SIGNAL not_found; +end $$ +call test_signal() $$ +ERROR 02XXX: Unhandled user-defined not found condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Error, no subclass +DECLARE error CONDITION FOR SQLSTATE "12000"; +SIGNAL error; +end $$ +call test_signal() $$ +ERROR 12000: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Error, with subclass +DECLARE error CONDITION FOR SQLSTATE "12ABC"; +SIGNAL error; +end $$ +call test_signal() $$ +ERROR 12ABC: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Severe error, no subclass +DECLARE error CONDITION FOR SQLSTATE "40000"; +SIGNAL error; +end $$ +call test_signal() $$ +ERROR 40000: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Severe error, with subclass +DECLARE error CONDITION FOR SQLSTATE "40001"; +SIGNAL error; +end $$ +call test_signal() $$ +ERROR 40001: Unhandled user-defined exception condition +drop procedure test_signal $$ +# +# Test the scope of condition +# +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '99999'; +begin +DECLARE foo CONDITION FOR 8888; +end; +SIGNAL foo SET MYSQL_ERRNO=9999; /* outer */ +end $$ +call test_signal() $$ +ERROR 99999: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR 9999; +begin +DECLARE foo CONDITION FOR SQLSTATE '88888'; +SIGNAL foo SET MYSQL_ERRNO=8888; /* inner */ +end; +end $$ +call test_signal() $$ +ERROR 88888: Unhandled user-defined exception condition +drop procedure test_signal $$ +# +# Test SET MYSQL_ERRNO +# +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '99999'; +SIGNAL foo SET MYSQL_ERRNO = 1111; +end $$ +call test_signal() $$ +ERROR 99999: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01000"; +SIGNAL warn SET MYSQL_ERRNO = 1111; +end $$ +call test_signal() $$ +Warnings: +Warning 1111 Unhandled user-defined warning condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02000"; +SIGNAL not_found SET MYSQL_ERRNO = 1111; +end $$ +call test_signal() $$ +ERROR 02000: Unhandled user-defined not found condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE "55000"; +SIGNAL error SET MYSQL_ERRNO = 1111; +end $$ +call test_signal() $$ +ERROR 55000: Unhandled user-defined exception condition +drop procedure test_signal $$ +# +# Test SET MESSAGE_TEXT +# +SIGNAL SQLSTATE '77777' SET MESSAGE_TEXT='' $$ +ERROR 77777: +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '77777'; +SIGNAL foo SET +MESSAGE_TEXT = "", +MYSQL_ERRNO=5678; +end $$ +call test_signal() $$ +ERROR 77777: +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '99999'; +SIGNAL foo SET +MESSAGE_TEXT = "Something bad happened", +MYSQL_ERRNO=9999; +end $$ +call test_signal() $$ +ERROR 99999: Something bad happened +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01000"; +SIGNAL warn SET MESSAGE_TEXT = "Something bad happened"; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 Something bad happened +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02000"; +SIGNAL not_found SET MESSAGE_TEXT = "Something bad happened"; +end $$ +call test_signal() $$ +ERROR 02000: Something bad happened +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE "55000"; +SIGNAL error SET MESSAGE_TEXT = "Something bad happened"; +end $$ +call test_signal() $$ +ERROR 55000: Something bad happened +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE something CONDITION FOR SQLSTATE "01000"; +SIGNAL something SET MESSAGE_TEXT = _utf8 "This is a UTF8 text"; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 This is a UTF8 text +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE something CONDITION FOR SQLSTATE "01000"; +SIGNAL something SET MESSAGE_TEXT = ""; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01111"; +SIGNAL warn SET MESSAGE_TEXT = "á a"; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 á a +show warnings $$ +Level Code Message +Warning 1640 á a +drop procedure test_signal $$ +# +# Test SET complex expressions +# +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +MYSQL_ERRNO = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CLASS_ORIGIN = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CLASS_ORIGIN' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +SUBCLASS_ORIGIN = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'SUBCLASS_ORIGIN' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CONSTRAINT_CATALOG = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CONSTRAINT_CATALOG' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CONSTRAINT_SCHEMA = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CONSTRAINT_SCHEMA' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CONSTRAINT_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CONSTRAINT_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CATALOG_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CATALOG_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +SCHEMA_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'SCHEMA_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +TABLE_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'TABLE_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +COLUMN_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'COLUMN_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CURSOR_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CURSOR_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +MESSAGE_TEXT = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'MESSAGE_TEXT' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE something CONDITION FOR SQLSTATE '99999'; +DECLARE message_text VARCHAR(64) DEFAULT "Local string variable"; +DECLARE sqlcode INTEGER DEFAULT 1234; +SIGNAL something SET +MESSAGE_TEXT = message_text, +MYSQL_ERRNO = sqlcode; +end $$ +call test_signal() $$ +ERROR 99999: Local string variable +drop procedure test_signal $$ +create procedure test_signal(message_text VARCHAR(64), sqlcode INTEGER) +begin +DECLARE something CONDITION FOR SQLSTATE "12345"; +SIGNAL something SET +MESSAGE_TEXT = message_text, +MYSQL_ERRNO = sqlcode; +end $$ +call test_signal("Parameter string", NULL) $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of 'NULL' +call test_signal(NULL, 1234) $$ +ERROR 42000: Variable 'MESSAGE_TEXT' can't be set to the value of 'NULL' +call test_signal("Parameter string", 5678) $$ +ERROR 12345: Parameter string +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE something CONDITION FOR SQLSTATE "AABBB"; +SIGNAL something SET +MESSAGE_TEXT = @message_text, +MYSQL_ERRNO = @sqlcode; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'MESSAGE_TEXT' can't be set to the value of 'NULL' +set @sqlcode= 12 $$ +call test_signal() $$ +ERROR 42000: Variable 'MESSAGE_TEXT' can't be set to the value of 'NULL' +set @message_text= "User variable" $$ +call test_signal() $$ +ERROR AABBB: User variable +drop procedure test_signal $$ +create procedure test_invalid() +begin +DECLARE something CONDITION FOR SQLSTATE "AABBB"; +SIGNAL something SET +MESSAGE_TEXT = @message_text := 'illegal', +MYSQL_ERRNO = @sqlcode := 1234; +end $$ +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 ' +MYSQL_ERRNO = @sqlcode := 1234; +end' at line 5 +create procedure test_signal() +begin +DECLARE aaa VARCHAR(64); +DECLARE bbb VARCHAR(64); +DECLARE ccc VARCHAR(64); +DECLARE ddd VARCHAR(64); +DECLARE eee VARCHAR(64); +DECLARE fff VARCHAR(64); +DECLARE ggg VARCHAR(64); +DECLARE hhh VARCHAR(64); +DECLARE iii VARCHAR(64); +DECLARE jjj VARCHAR(64); +DECLARE kkk VARCHAR(64); +DECLARE warn CONDITION FOR SQLSTATE "01234"; +set aaa= repeat("A", 64); +set bbb= repeat("B", 64); +set ccc= repeat("C", 64); +set ddd= repeat("D", 64); +set eee= repeat("E", 64); +set fff= repeat("F", 64); +set ggg= repeat("G", 64); +set hhh= repeat("H", 64); +set iii= repeat("I", 64); +set jjj= repeat("J", 64); +set kkk= repeat("K", 64); +SIGNAL warn SET +CLASS_ORIGIN = aaa, +SUBCLASS_ORIGIN = bbb, +CONSTRAINT_CATALOG = ccc, +CONSTRAINT_SCHEMA = ddd, +CONSTRAINT_NAME = eee, +CATALOG_NAME = fff, +SCHEMA_NAME = ggg, +TABLE_NAME = hhh, +COLUMN_NAME = iii, +CURSOR_NAME = jjj, +MESSAGE_TEXT = kkk, +MYSQL_ERRNO = 65535; +end $$ +call test_signal() $$ +Warnings: +Warning 65535 KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +SIGNAL warn SET +MYSQL_ERRNO = 999999999999999999999999999999999999999999999999999; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '999999999999999999999999999999999999999999999999999' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE aaax VARCHAR(65); +DECLARE bbbx VARCHAR(65); +DECLARE cccx VARCHAR(65); +DECLARE dddx VARCHAR(65); +DECLARE eeex VARCHAR(65); +DECLARE fffx VARCHAR(65); +DECLARE gggx VARCHAR(65); +DECLARE hhhx VARCHAR(65); +DECLARE iiix VARCHAR(65); +DECLARE jjjx VARCHAR(65); +DECLARE kkkx VARCHAR(65); +DECLARE lllx VARCHAR(129); +DECLARE warn CONDITION FOR SQLSTATE "01234"; +set aaax= concat(repeat("A", 64), "X"); +set bbbx= concat(repeat("B", 64), "X"); +set cccx= concat(repeat("C", 64), "X"); +set dddx= concat(repeat("D", 64), "X"); +set eeex= concat(repeat("E", 64), "X"); +set fffx= concat(repeat("F", 64), "X"); +set gggx= concat(repeat("G", 64), "X"); +set hhhx= concat(repeat("H", 64), "X"); +set iiix= concat(repeat("I", 64), "X"); +set jjjx= concat(repeat("J", 64), "X"); +set kkkx= concat(repeat("K", 64), "X"); +set lllx= concat(repeat("1", 100), +repeat("2", 20), +repeat("8", 8), +"X"); +SIGNAL warn SET +CLASS_ORIGIN = aaax, +SUBCLASS_ORIGIN = bbbx, +CONSTRAINT_CATALOG = cccx, +CONSTRAINT_SCHEMA = dddx, +CONSTRAINT_NAME = eeex, +CATALOG_NAME = fffx, +SCHEMA_NAME = gggx, +TABLE_NAME = hhhx, +COLUMN_NAME = iiix, +CURSOR_NAME = jjjx, +MESSAGE_TEXT = lllx, +MYSQL_ERRNO = 10000; +end $$ +call test_signal() $$ +Warnings: +Warning 1645 Data truncated for condition item 'CLASS_ORIGIN' +Warning 1645 Data truncated for condition item 'SUBCLASS_ORIGIN' +Warning 1645 Data truncated for condition item 'CONSTRAINT_CATALOG' +Warning 1645 Data truncated for condition item 'CONSTRAINT_SCHEMA' +Warning 1645 Data truncated for condition item 'CONSTRAINT_NAME' +Warning 1645 Data truncated for condition item 'CATALOG_NAME' +Warning 1645 Data truncated for condition item 'SCHEMA_NAME' +Warning 1645 Data truncated for condition item 'TABLE_NAME' +Warning 1645 Data truncated for condition item 'COLUMN_NAME' +Warning 1645 Data truncated for condition item 'CURSOR_NAME' +Warning 1645 Data truncated for condition item 'MESSAGE_TEXT' +Warning 10000 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222288888888 +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for SQLSTATE "01234" + begin +select "Caught by SQLSTATE"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by SQLSTATE +Caught by SQLSTATE +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "Caught by number"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by number +Caught by number +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for SQLWARNING +begin +select "Caught by SQLWARNING"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by SQLWARNING +Caught by SQLWARNING +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for SQLSTATE "02ABC" + begin +select "Caught by SQLSTATE"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by SQLSTATE +Caught by SQLSTATE +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "Caught by number"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by number +Caught by number +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for NOT FOUND +begin +select "Caught by NOT FOUND"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by NOT FOUND +Caught by NOT FOUND +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE "55555"; +DECLARE CONTINUE HANDLER for SQLSTATE "55555" + begin +select "Caught by SQLSTATE"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by SQLSTATE +Caught by SQLSTATE +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE "55555"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "Caught by number"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by number +Caught by number +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE "55555"; +DECLARE CONTINUE HANDLER for SQLEXCEPTION +begin +select "Caught by SQLEXCEPTION"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by SQLEXCEPTION +Caught by SQLEXCEPTION +drop procedure test_signal $$ +# +# Test where SIGNAL can be used +# +create function test_signal_func() returns integer +begin +DECLARE warn CONDITION FOR SQLSTATE "01XXX"; +SIGNAL warn SET +MESSAGE_TEXT = "This function SIGNAL a warning", +MYSQL_ERRNO = 1012; +return 5; +end $$ +select test_signal_func() $$ +test_signal_func() +5 +Warnings: +Warning 1012 This function SIGNAL a warning +drop function test_signal_func $$ +create function test_signal_func() returns integer +begin +DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; +SIGNAL not_found SET +MESSAGE_TEXT = "This function SIGNAL not found", +MYSQL_ERRNO = 1012; +return 5; +end $$ +select test_signal_func() $$ +ERROR 02XXX: This function SIGNAL not found +drop function test_signal_func $$ +create function test_signal_func() returns integer +begin +DECLARE error CONDITION FOR SQLSTATE "50000"; +SIGNAL error SET +MESSAGE_TEXT = "This function SIGNAL an error", +MYSQL_ERRNO = 1012; +return 5; +end $$ +select test_signal_func() $$ +ERROR 50000: This function SIGNAL an error +drop function test_signal_func $$ +drop table if exists t1 $$ +create table t1 (a integer) $$ +create trigger t1_ai after insert on t1 for each row +begin +DECLARE msg VARCHAR(128); +DECLARE warn CONDITION FOR SQLSTATE "01XXX"; +set msg= concat("This trigger SIGNAL a warning, a=", NEW.a); +SIGNAL warn SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 1012; +end $$ +insert into t1 values (1), (2) $$ +Warnings: +Warning 1012 This trigger SIGNAL a warning, a=1 +Warning 1012 This trigger SIGNAL a warning, a=2 +drop trigger t1_ai $$ +create trigger t1_ai after insert on t1 for each row +begin +DECLARE msg VARCHAR(128); +DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; +set msg= concat("This trigger SIGNAL a not found, a=", NEW.a); +SIGNAL not_found SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 1012; +end $$ +insert into t1 values (3), (4) $$ +ERROR 02XXX: This trigger SIGNAL a not found, a=3 +drop trigger t1_ai $$ +create trigger t1_ai after insert on t1 for each row +begin +DECLARE msg VARCHAR(128); +DECLARE error CONDITION FOR SQLSTATE "03XXX"; +set msg= concat("This trigger SIGNAL an error, a=", NEW.a); +SIGNAL error SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 1012; +end $$ +insert into t1 values (5), (6) $$ +ERROR 03XXX: This trigger SIGNAL an error, a=5 +drop table t1 $$ +create table t1 (errno integer, msg varchar(128)) $$ +create trigger t1_ai after insert on t1 for each row +begin +DECLARE warn CONDITION FOR SQLSTATE "01XXX"; +SIGNAL warn SET +MESSAGE_TEXT = NEW.msg, +MYSQL_ERRNO = NEW.errno; +end $$ +insert into t1 set errno=1012, msg='Warning message 1 in trigger' $$ +Warnings: +Warning 1012 Warning message 1 in trigger +insert into t1 set errno=1013, msg='Warning message 2 in trigger' $$ +Warnings: +Warning 1013 Warning message 2 in trigger +drop table t1 $$ +drop table if exists t1 $$ +drop procedure if exists p1 $$ +drop function if exists f1 $$ +create table t1 (s1 int) $$ +insert into t1 values (1) $$ +create procedure p1() +begin +declare a int; +declare c cursor for select f1() from t1; +declare continue handler for sqlstate '03000' + select "caught 03000"; +declare continue handler for 1326 +select "caught cursor is not open"; +select "Before open"; +open c; +select "Before fetch"; +fetch c into a; +select "Before close"; +close c; +end $$ +create function f1() returns int +begin +signal sqlstate '03000'; +return 5; +end $$ +drop table t1 $$ +drop procedure p1 $$ +drop function f1 $$ +# +# Test the RESIGNAL runtime +# +create procedure test_resignal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 1012 Raising a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02222"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02222: Raising a not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE error CONDITION FOR SQLSTATE "55555"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 55555: Raising an error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlwarning +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +insert into t_warn set a= 9999999999999999; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE x integer; +DECLARE c cursor for select * from t_cursor; +DECLARE CONTINUE HANDLER for not found +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +open c; +fetch c into x; +close c; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02000: No data - zero rows fetched, selected, or processed +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlexception +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +drop table no_such_table; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 42S02: Unknown table 'no_such_table' +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of a warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 5555 RESIGNAL of a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02111"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of a not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02111: RESIGNAL of a not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE error CONDITION FOR SQLSTATE "33333"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of an error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 33333: RESIGNAL of an error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlwarning +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of a warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +insert into t_warn set a= 9999999999999999; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 5555 RESIGNAL of a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE x integer; +DECLARE c cursor for select * from t_cursor; +DECLARE CONTINUE HANDLER for not found +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +open c; +fetch c into x; +close c; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02000: RESIGNAL of not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlexception +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of an error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +drop table no_such_table; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 42S02: RESIGNAL of an error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01111"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01222" SET +MESSAGE_TEXT = "RESIGNAL to warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 1012 Raising a warning +Warning 5555 RESIGNAL to warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01111"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02222" SET +MESSAGE_TEXT = "RESIGNAL to not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02222: RESIGNAL to not found +show warnings $$ +Level Code Message +Warning 1012 Raising a warning +Error 5555 RESIGNAL to not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01111"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "33333" SET +MESSAGE_TEXT = "RESIGNAL to error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 33333: RESIGNAL to error +show warnings $$ +Level Code Message +Warning 1012 Raising a warning +Error 5555 RESIGNAL to error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01222" SET +MESSAGE_TEXT = "RESIGNAL to warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Error 1012 Raising a not found +Warning 5555 RESIGNAL to warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02222" SET +MESSAGE_TEXT = "RESIGNAL to not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02222: RESIGNAL to not found +show warnings $$ +Level Code Message +Error 1012 Raising a not found +Error 5555 RESIGNAL to not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "33333" SET +MESSAGE_TEXT = "RESIGNAL to error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 33333: RESIGNAL to error +show warnings $$ +Level Code Message +Error 1012 Raising a not found +Error 5555 RESIGNAL to error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE error CONDITION FOR SQLSTATE "AAAAA"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01222" SET +MESSAGE_TEXT = "RESIGNAL to warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Error 1012 Raising an error +Warning 5555 RESIGNAL to warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE error CONDITION FOR SQLSTATE "AAAAA"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02222" SET +MESSAGE_TEXT = "RESIGNAL to not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02222: RESIGNAL to not found +show warnings $$ +Level Code Message +Error 1012 Raising an error +Error 5555 RESIGNAL to not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE error CONDITION FOR SQLSTATE "AAAAA"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "33333" SET +MESSAGE_TEXT = "RESIGNAL to error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 33333: RESIGNAL to error +show warnings $$ +Level Code Message +Error 1012 Raising an error +Error 5555 RESIGNAL to error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlwarning +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01111" SET +MESSAGE_TEXT = "RESIGNAL to a warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +insert into t_warn set a= 9999999999999999; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +Warning 5555 RESIGNAL to a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlwarning +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02444" SET +MESSAGE_TEXT = "RESIGNAL to a not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +insert into t_warn set a= 9999999999999999; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02444: RESIGNAL to a not found +show warnings $$ +Level Code Message +Warning 1264 Out of range value for column 'a' at row 1 +Error 5555 RESIGNAL to a not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlwarning +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "44444" SET +MESSAGE_TEXT = "RESIGNAL to an error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +insert into t_warn set a= 9999999999999999; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 44444: RESIGNAL to an error +show warnings $$ +Level Code Message +Warning 1264 Out of range value for column 'a' at row 1 +Error 5555 RESIGNAL to an error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE x integer; +DECLARE c cursor for select * from t_cursor; +DECLARE CONTINUE HANDLER for not found +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01111" SET +MESSAGE_TEXT = "RESIGNAL to a warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +open c; +fetch c into x; +close c; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Error 1329 No data - zero rows fetched, selected, or processed +Warning 5555 RESIGNAL to a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE x integer; +DECLARE c cursor for select * from t_cursor; +DECLARE CONTINUE HANDLER for not found +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02444" SET +MESSAGE_TEXT = "RESIGNAL to a not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +open c; +fetch c into x; +close c; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02444: RESIGNAL to a not found +show warnings $$ +Level Code Message +Error 1329 No data - zero rows fetched, selected, or processed +Error 5555 RESIGNAL to a not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE x integer; +DECLARE c cursor for select * from t_cursor; +DECLARE CONTINUE HANDLER for not found +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "44444" SET +MESSAGE_TEXT = "RESIGNAL to an error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +open c; +fetch c into x; +close c; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 44444: RESIGNAL to an error +show warnings $$ +Level Code Message +Error 1329 No data - zero rows fetched, selected, or processed +Error 5555 RESIGNAL to an error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlexception +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01111" SET +MESSAGE_TEXT = "RESIGNAL to a warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +drop table no_such_table; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Error 1051 Unknown table 'no_such_table' +Warning 5555 RESIGNAL to a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlexception +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02444" SET +MESSAGE_TEXT = "RESIGNAL to a not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +drop table no_such_table; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02444: RESIGNAL to a not found +show warnings $$ +Level Code Message +Error 1051 Unknown table 'no_such_table' +Error 5555 RESIGNAL to a not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlexception +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "44444" SET +MESSAGE_TEXT = "RESIGNAL to an error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +drop table no_such_table; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 44444: RESIGNAL to an error +show warnings $$ +Level Code Message +Error 1051 Unknown table 'no_such_table' +Error 5555 RESIGNAL to an error +drop procedure test_resignal $$ +# +# More complex cases +# +drop procedure if exists peter_p1 $$ +drop procedure if exists peter_p2 $$ +CREATE PROCEDURE peter_p1 () +BEGIN +DECLARE x CONDITION FOR 1231; +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '2'; +RESIGNAL SET MYSQL_ERRNO = 9999; +END; +BEGIN +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '1'; +RESIGNAL SET SCHEMA_NAME = 'test'; +END; +SET @@sql_mode=NULL; +END; +END +$$ +CREATE PROCEDURE peter_p2 () +BEGIN +DECLARE x CONDITION for 9999; +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '3'; +RESIGNAL SET MESSAGE_TEXT = 'Hi, I am a useless error message'; +END; +CALL peter_p1(); +END +$$ +CALL peter_p2() $$ +1 +1 +2 +2 +3 +3 +ERROR 42000: Hi, I am a useless error message +show warnings $$ +Level Code Message +Error 9999 Hi, I am a useless error message +drop procedure peter_p1 $$ +drop procedure peter_p2 $$ +CREATE PROCEDURE peter_p1 () +BEGIN +DECLARE x CONDITION FOR SQLSTATE '42000'; +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '2'; +RESIGNAL x SET MYSQL_ERRNO = 9999; +END; +BEGIN +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '1'; +RESIGNAL x SET +SCHEMA_NAME = 'test', +MYSQL_ERRNO= 1231; +END; +/* Raises ER_WRONG_VALUE_FOR_VAR : 1231, SQLSTATE 42000 */ +SET @@sql_mode=NULL; +END; +END +$$ +CREATE PROCEDURE peter_p2 () +BEGIN +DECLARE x CONDITION for SQLSTATE '42000'; +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '3'; +RESIGNAL x SET +MESSAGE_TEXT = 'Hi, I am a useless error message', +MYSQL_ERRNO = 9999; +END; +CALL peter_p1(); +END +$$ +CALL peter_p2() $$ +1 +1 +2 +2 +3 +3 +ERROR 42000: Hi, I am a useless error message +show warnings $$ +Level Code Message +Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL' +Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL' +Error 9999 Variable 'sql_mode' can't be set to the value of 'NULL' +Error 9999 Hi, I am a useless error message +drop procedure peter_p1 $$ +drop procedure peter_p2 $$ +drop procedure if exists peter_p3 $$ +Warnings: +Note 1305 PROCEDURE peter_p3 does not exist +create procedure peter_p3() +begin +declare continue handler for sqlexception +resignal sqlstate '99002' set mysql_errno = 2; +signal sqlstate '99001' set mysql_errno = 1, message_text = "Original"; +end $$ +call peter_p3() $$ +ERROR 99002: Original +show warnings $$ +Level Code Message +Error 1 Original +Error 2 Original +drop procedure peter_p3 $$ +drop table t_warn; +drop table t_cursor; +# +# Miscelaneous test cases +# +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 0x12; /* 18 */ +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 0b00010010; /* 18 */ +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = '65'; /* 65 */ +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 'A'; /* illegal */ +end $$ +call test_signal $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of 'A' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = "65"; /* 65 */ +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = "A"; /* illegal */ +end $$ +call test_signal $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of 'A' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = `65`; /* illegal */ +end $$ +call test_signal $$ +ERROR 42S22: Unknown column '65' in 'field list' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = `A`; /* illegal */ +end $$ +call test_signal $$ +ERROR 42S22: Unknown column 'A' in 'field list' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 3.141592; /* 3 */ +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT= 0x41; /* A */ +end $$ +call test_signal $$ +ERROR 12345: A +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT= 0b01000001; /* A */ +end $$ +call test_signal $$ +ERROR 12345: A +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT = "Hello"; +end $$ +call test_signal $$ +ERROR 12345: Hello +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT = 'Hello'; +end $$ +call test_signal $$ +ERROR 12345: Hello +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT = `Hello`; +end $$ +call test_signal $$ +ERROR 42S22: Unknown column 'Hello' in 'field list' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT = 65.4321; +end $$ +call test_signal $$ +ERROR 12345: 65.4321 +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE céèçà foo CONDITION FOR SQLSTATE '12345'; +SIGNAL céèçà SET MYSQL_ERRNO = 1000; +end $$ +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 '©Ã¨Ã§Ã  foo CONDITION FOR SQLSTATE '12345'; +SIGNAL céèçà SET MYSQL_ERRNO = 1' at line 3 +create procedure test_signal() +begin +DECLARE "céèçà" CONDITION FOR SQLSTATE '12345'; +SIGNAL "céèçà" SET MYSQL_ERRNO = 1000; +end $$ +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 '"céèçà" CONDITION FOR SQLSTATE '12345'; +SIGNAL "céèçà" SET MYSQL_ERRNO =' at line 3 +create procedure test_signal() +begin +DECLARE 'céèçà' CONDITION FOR SQLSTATE '12345'; +SIGNAL 'céèçà' SET MYSQL_ERRNO = 1000; +end $$ +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 ''céèçà' CONDITION FOR SQLSTATE '12345'; +SIGNAL 'céèçà' SET MYSQL_ERRNO =' at line 3 +create procedure test_signal() +begin +DECLARE `céèçà` CONDITION FOR SQLSTATE '12345'; +SIGNAL `céèçà` SET MYSQL_ERRNO = 1000; +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +SIGNAL SQLSTATE '77777' SET MYSQL_ERRNO = 1000, MESSAGE_TEXT='ÃÂÃÅÄ'; +end $$ +drop procedure test_signal $$ diff --git a/mysql-test/r/signal_code.result b/mysql-test/r/signal_code.result new file mode 100644 index 00000000000..63db6656636 --- /dev/null +++ b/mysql-test/r/signal_code.result @@ -0,0 +1,35 @@ +use test; +drop procedure if exists signal_proc; +drop function if exists signal_func; +create procedure signal_proc() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo; +SIGNAL foo SET MESSAGE_TEXT = "This is an error message"; +RESIGNAL foo; +RESIGNAL foo SET MESSAGE_TEXT = "This is an error message"; +end $$ +create function signal_func() returns int +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo; +SIGNAL foo SET MESSAGE_TEXT = "This is an error message"; +RESIGNAL foo; +RESIGNAL foo SET MESSAGE_TEXT = "This is an error message"; +return 0; +end $$ +show procedure code signal_proc; +Pos Instruction +0 stmt 136 "SIGNAL foo" +1 stmt 136 "SIGNAL foo SET MESSAGE_TEXT = "This i..." +2 stmt 137 "RESIGNAL foo" +3 stmt 137 "RESIGNAL foo SET MESSAGE_TEXT = "This..." +drop procedure signal_proc; +show function code signal_func; +Pos Instruction +0 stmt 136 "SIGNAL foo" +1 stmt 136 "SIGNAL foo SET MESSAGE_TEXT = "This i..." +2 stmt 137 "RESIGNAL foo" +3 stmt 137 "RESIGNAL foo SET MESSAGE_TEXT = "This..." +4 freturn 3 0 +drop function signal_func; diff --git a/mysql-test/r/signal_demo1.result b/mysql-test/r/signal_demo1.result new file mode 100644 index 00000000000..752f23a48d6 --- /dev/null +++ b/mysql-test/r/signal_demo1.result @@ -0,0 +1,270 @@ +drop database if exists demo; +create database demo; +use demo; +create table ab_physical_person ( +person_id integer, +first_name VARCHAR(50), +middle_initial CHAR, +last_name VARCHAR(50), +primary key (person_id)); +create table ab_moral_person ( +company_id integer, +name VARCHAR(100), +primary key (company_id)); +create table in_inventory ( +item_id integer, +descr VARCHAR(50), +stock integer, +primary key (item_id)); +create table po_order ( +po_id integer auto_increment, +cust_type char, /* arc relationship, see cust_id */ +cust_id integer, /* FK to ab_physical_person *OR* ab_moral_person */ +primary key (po_id)); +create table po_order_line ( +po_id integer, /* FK to po_order.po_id */ +line_no integer, +item_id integer, /* FK to in_inventory.item_id */ +qty integer); +# +# Schema integrity enforcement +# +create procedure check_pk_person(in person_type char, in id integer) +begin +declare x integer; +declare msg varchar(128); +/* +Test integrity constraints for an 'arc' relationship. +Based on 'person_type', 'id' points to either a +physical person, or a moral person. +*/ +case person_type +when 'P' then +begin +select count(person_id) from ab_physical_person +where ab_physical_person.person_id = id +into x; +if (x != 1) +then +set msg= concat('No such physical person, PK:', id); +SIGNAL SQLSTATE '45000' SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 10000; +end if; +end; +when 'M' then +begin +select count(company_id) from ab_moral_person +where ab_moral_person.company_id = id +into x; +if (x != 1) +then +set msg= concat('No such moral person, PK:', id); +SIGNAL SQLSTATE '45000' SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 10000; +end if; +end; +else +begin +set msg= concat('No such person type:', person_type); +SIGNAL SQLSTATE '45000' SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 20000; +end; +end case; +end +$$ +create procedure check_pk_inventory(in id integer) +begin +declare x integer; +declare msg varchar(128); +select count(item_id) from in_inventory +where in_inventory.item_id = id +into x; +if (x != 1) +then +set msg= concat('Failed integrity constraint, table in_inventory, PK:', +id); +SIGNAL SQLSTATE '45000' SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 10000; +end if; +end +$$ +create procedure check_pk_order(in id integer) +begin +declare x integer; +declare msg varchar(128); +select count(po_id) from po_order +where po_order.po_id = id +into x; +if (x != 1) +then +set msg= concat('Failed integrity constraint, table po_order, PK:', id); +SIGNAL SQLSTATE '45000' SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 10000; +end if; +end +$$ +create trigger po_order_bi before insert on po_order +for each row +begin +call check_pk_person(NEW.cust_type, NEW.cust_id); +end +$$ +create trigger po_order_bu before update on po_order +for each row +begin +call check_pk_person(NEW.cust_type, NEW.cust_id); +end +$$ +create trigger po_order_line_bi before insert on po_order_line +for each row +begin +call check_pk_order(NEW.po_id); +call check_pk_inventory(NEW.item_id); +end +$$ +create trigger po_order_line_bu before update on po_order_line +for each row +begin +call check_pk_order(NEW.po_id); +call check_pk_inventory(NEW.item_id); +end +$$ +# +# Application helpers +# +create procedure po_create_order( +in p_cust_type char, +in p_cust_id integer, +out id integer) +begin +insert into po_order set cust_type = p_cust_type, cust_id = p_cust_id; +set id = last_insert_id(); +end +$$ +create procedure po_add_order_line( +in po integer, +in line integer, +in item integer, +in q integer) +begin +insert into po_order_line set +po_id = po, line_no = line, item_id = item, qty = q; +end +$$ +# +# Create sample data +# +insert into ab_physical_person values +( 1, "John", "A", "Doe"), +( 2, "Marry", "B", "Smith") +; +insert into ab_moral_person values +( 3, "ACME real estate, INC"), +( 4, "Local school") +; +insert into in_inventory values +( 100, "Table, dinner", 5), +( 101, "Chair", 20), +( 200, "Table, coffee", 3), +( 300, "School table", 25), +( 301, "School chairs", 50) +; +select * from ab_physical_person order by person_id; +person_id first_name middle_initial last_name +1 John A Doe +2 Marry B Smith +select * from ab_moral_person order by company_id; +company_id name +3 ACME real estate, INC +4 Local school +select * from in_inventory order by item_id; +item_id descr stock +100 Table, dinner 5 +101 Chair 20 +200 Table, coffee 3 +300 School table 25 +301 School chairs 50 +# +# Entering an order +# +set @my_po = 0; +/* John Doe wants 1 table and 4 chairs */ +call po_create_order("P", 1, @my_po); +call po_add_order_line (@my_po, 1, 100, 1); +call po_add_order_line (@my_po, 2, 101, 4); +/* Marry Smith wants a coffee table */ +call po_create_order("P", 2, @my_po); +call po_add_order_line (@my_po, 1, 200, 1); +# +# Entering bad data in an order +# +call po_add_order_line (@my_po, 1, 999, 1); +ERROR 45000: Failed integrity constraint, table in_inventory, PK:999 +# +# Entering bad data in an unknown order +# +call po_add_order_line (99, 1, 100, 1); +ERROR 45000: Failed integrity constraint, table po_order, PK:99 +# +# Entering an order for an unknown company +# +call po_create_order("M", 7, @my_po); +ERROR 45000: No such moral person, PK:7 +# +# Entering an order for an unknown person type +# +call po_create_order("X", 1, @my_po); +ERROR 45000: No such person type:X +/* The local school wants 10 class tables and 20 chairs */ +call po_create_order("M", 4, @my_po); +call po_add_order_line (@my_po, 1, 300, 10); +call po_add_order_line (@my_po, 2, 301, 20); +select * from po_order; +po_id cust_type cust_id +1 P 1 +2 P 2 +3 M 4 +select * from po_order_line; +po_id line_no item_id qty +1 1 100 1 +1 2 101 4 +2 1 200 1 +3 1 300 10 +3 2 301 20 +select po_id as "PO#", +( case cust_type +when "P" then concat (pp.first_name, +" ", +pp.middle_initial, +" ", +pp.last_name) +when "M" then mp.name +end ) as "Sold to" + from po_order po +left join ab_physical_person pp on po.cust_id = pp.person_id +left join ab_moral_person mp on po.cust_id = company_id +; +PO# Sold to +1 John A Doe +2 Marry B Smith +3 Local school +select po_id as "PO#", +ol.line_no as "Line", +ol.item_id as "Item", +inv.descr as "Description", +ol.qty as "Quantity" + from po_order_line ol, in_inventory inv +where inv.item_id = ol.item_id +order by ol.item_id, ol.line_no; +PO# Line Item Description Quantity +1 1 100 Table, dinner 1 +1 2 101 Chair 4 +2 1 200 Table, coffee 1 +3 1 300 School table 10 +3 2 301 School chairs 20 +drop database demo; diff --git a/mysql-test/r/signal_demo2.result b/mysql-test/r/signal_demo2.result new file mode 100644 index 00000000000..223030b0624 --- /dev/null +++ b/mysql-test/r/signal_demo2.result @@ -0,0 +1,197 @@ +drop database if exists demo; +create database demo; +use demo; +create procedure proc_top_a(p1 integer) +begin +## DECLARE CONTINUE HANDLER for SQLEXCEPTION, NOT FOUND +begin +end; +select "Starting ..."; +call proc_middle_a(p1); +select "The end"; +end +$$ +create procedure proc_middle_a(p1 integer) +begin +DECLARE l integer; +# without RESIGNAL: +# Should be: DECLARE EXIT HANDLER for SQLEXCEPTION, NOT FOUND +DECLARE EXIT HANDLER for 1 /* not sure how to handle exceptions */ +begin +select "Oops ... now what ?"; +end; +select "In prod_middle()"; +create temporary table t1(a integer, b integer); +select GET_LOCK("user_mutex", 10) into l; +insert into t1 set a = p1, b = p1; +call proc_bottom_a(p1); +select RELEASE_LOCK("user_mutex") into l; +drop temporary table t1; +end +$$ +create procedure proc_bottom_a(p1 integer) +begin +select "In proc_bottom()"; +if (p1 = 1) then +begin +select "Doing something that works ..."; +select * from t1; +end; +end if; +if (p1 = 2) then +begin +select "Doing something that fail (simulate an error) ..."; +drop table no_such_table; +end; +end if; +if (p1 = 3) then +begin +select "Doing something that *SHOULD* works ..."; +select * from t1; +end; +end if; +end +$$ +call proc_top_a(1); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that works ... +Doing something that works ... +a b +1 1 +The end +The end +call proc_top_a(2); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that fail (simulate an error) ... +Doing something that fail (simulate an error) ... +ERROR 42S02: Unknown table 'no_such_table' +call proc_top_a(3); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +ERROR 42S01: Table 't1' already exists +call proc_top_a(1); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +ERROR 42S01: Table 't1' already exists +drop temporary table if exists t1; +create procedure proc_top_b(p1 integer) +begin +select "Starting ..."; +call proc_middle_b(p1); +select "The end"; +end +$$ +create procedure proc_middle_b(p1 integer) +begin +DECLARE l integer; +DECLARE EXIT HANDLER for SQLEXCEPTION, NOT FOUND +begin +begin +DECLARE CONTINUE HANDLER for SQLEXCEPTION, NOT FOUND +begin +/* Ignore errors from the cleanup code */ +end; +select "Doing cleanup !"; +select RELEASE_LOCK("user_mutex") into l; +drop temporary table t1; +end; +RESIGNAL; +end; +select "In prod_middle()"; +create temporary table t1(a integer, b integer); +select GET_LOCK("user_mutex", 10) into l; +insert into t1 set a = p1, b = p1; +call proc_bottom_b(p1); +select RELEASE_LOCK("user_mutex") into l; +drop temporary table t1; +end +$$ +create procedure proc_bottom_b(p1 integer) +begin +select "In proc_bottom()"; +if (p1 = 1) then +begin +select "Doing something that works ..."; +select * from t1; +end; +end if; +if (p1 = 2) then +begin +select "Doing something that fail (simulate an error) ..."; +drop table no_such_table; +end; +end if; +if (p1 = 3) then +begin +select "Doing something that *SHOULD* works ..."; +select * from t1; +end; +end if; +end +$$ +call proc_top_b(1); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that works ... +Doing something that works ... +a b +1 1 +The end +The end +call proc_top_b(2); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that fail (simulate an error) ... +Doing something that fail (simulate an error) ... +Doing cleanup ! +Doing cleanup ! +ERROR 42S02: Unknown table 'no_such_table' +call proc_top_b(3); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that *SHOULD* works ... +Doing something that *SHOULD* works ... +a b +3 3 +The end +The end +call proc_top_b(1); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that works ... +Doing something that works ... +a b +1 1 +The end +The end +drop database demo; diff --git a/mysql-test/r/signal_demo3.result b/mysql-test/r/signal_demo3.result new file mode 100644 index 00000000000..fea41ec2ef9 --- /dev/null +++ b/mysql-test/r/signal_demo3.result @@ -0,0 +1,143 @@ +SET @start_global_value = @@global.max_error_count; +SELECT @start_global_value; +@start_global_value +64 +SET @start_session_value = @@session.max_error_count; +SELECT @start_session_value; +@start_session_value +64 +drop database if exists demo; +create database demo; +use demo; +create procedure proc_1() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_1'; +call proc_2(); +end +$$ +create procedure proc_2() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_2'; +call proc_3(); +end +$$ +create procedure proc_3() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_3'; +call proc_4(); +end +$$ +create procedure proc_4() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_4'; +call proc_5(); +end +$$ +create procedure proc_5() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_5'; +call proc_6(); +end +$$ +create procedure proc_6() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_6'; +call proc_7(); +end +$$ +create procedure proc_7() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_7'; +call proc_8(); +end +$$ +create procedure proc_8() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_8'; +call proc_9(); +end +$$ +create procedure proc_9() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_9'; +## Do something that fails, to see how errors are reported +drop table oops_it_is_not_here; +end +$$ +call proc_1(); +ERROR 45000: Oops in proc_1 +show warnings; +Level Code Message +Error 1051 Unknown table 'oops_it_is_not_here' +Error 1642 Oops in proc_9 +Error 1642 Oops in proc_8 +Error 1642 Oops in proc_7 +Error 1642 Oops in proc_6 +Error 1642 Oops in proc_5 +Error 1642 Oops in proc_4 +Error 1642 Oops in proc_3 +Error 1642 Oops in proc_2 +Error 1642 Oops in proc_1 +SET @@session.max_error_count = 5; +SELECT @@session.max_error_count; +@@session.max_error_count +5 +call proc_1(); +ERROR 45000: Oops in proc_1 +show warnings; +Level Code Message +Error 1642 Oops in proc_5 +Error 1642 Oops in proc_4 +Error 1642 Oops in proc_3 +Error 1642 Oops in proc_2 +Error 1642 Oops in proc_1 +SET @@session.max_error_count = 7; +SELECT @@session.max_error_count; +@@session.max_error_count +7 +call proc_1(); +ERROR 45000: Oops in proc_1 +show warnings; +Level Code Message +Error 1642 Oops in proc_7 +Error 1642 Oops in proc_6 +Error 1642 Oops in proc_5 +Error 1642 Oops in proc_4 +Error 1642 Oops in proc_3 +Error 1642 Oops in proc_2 +Error 1642 Oops in proc_1 +SET @@session.max_error_count = 9; +SELECT @@session.max_error_count; +@@session.max_error_count +9 +call proc_1(); +ERROR 45000: Oops in proc_1 +show warnings; +Level Code Message +Error 1642 Oops in proc_9 +Error 1642 Oops in proc_8 +Error 1642 Oops in proc_7 +Error 1642 Oops in proc_6 +Error 1642 Oops in proc_5 +Error 1642 Oops in proc_4 +Error 1642 Oops in proc_3 +Error 1642 Oops in proc_2 +Error 1642 Oops in proc_1 +drop database demo; +SET @@global.max_error_count = @start_global_value; +SELECT @@global.max_error_count; +@@global.max_error_count +64 +SET @@session.max_error_count = @start_session_value; +SELECT @@session.max_error_count; +@@session.max_error_count +64 diff --git a/mysql-test/r/signal_sqlmode.result b/mysql-test/r/signal_sqlmode.result new file mode 100644 index 00000000000..8fed85eb4a9 --- /dev/null +++ b/mysql-test/r/signal_sqlmode.result @@ -0,0 +1,86 @@ +SET @save_sql_mode=@@sql_mode; +SET sql_mode=''; +drop procedure if exists p; +drop procedure if exists p2; +drop procedure if exists p3; +create procedure p() +begin +declare utf8_var VARCHAR(128) CHARACTER SET UTF8; +set utf8_var = concat(repeat('A', 128), 'X'); +select length(utf8_var), utf8_var; +end +$$ +create procedure p2() +begin +declare msg VARCHAR(129) CHARACTER SET UTF8; +set msg = concat(repeat('A', 128), 'X'); +select length(msg), msg; +signal sqlstate '55555' set message_text = msg; +end +$$ +create procedure p3() +begin +declare name VARCHAR(65) CHARACTER SET UTF8; +set name = concat(repeat('A', 64), 'X'); +select length(name), name; +signal sqlstate '55555' set +message_text = 'Message', +table_name = name; +end +$$ +call p; +length(utf8_var) utf8_var +128 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +Warnings: +Warning 1265 Data truncated for column 'utf8_var' at row 1 +call p2; +length(msg) msg +129 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX +ERROR 55555: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +call p3; +length(name) name +65 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX +ERROR 55555: Message +drop procedure p; +drop procedure p2; +drop procedure p3; +SET sql_mode='STRICT_ALL_TABLES'; +create procedure p() +begin +declare utf8_var VARCHAR(128) CHARACTER SET UTF8; +set utf8_var = concat(repeat('A', 128), 'X'); +select length(utf8_var), utf8_var; +end +$$ +create procedure p2() +begin +declare msg VARCHAR(129) CHARACTER SET UTF8; +set msg = concat(repeat('A', 128), 'X'); +select length(msg), msg; +signal sqlstate '55555' set message_text = msg; +end +$$ +create procedure p3() +begin +declare name VARCHAR(65) CHARACTER SET UTF8; +set name = concat(repeat('A', 64), 'X'); +select length(name), name; +signal sqlstate '55555' set +message_text = 'Message', +table_name = name; +end +$$ +call p; +ERROR 22001: Data too long for column 'utf8_var' at row 1 +call p2; +length(msg) msg +129 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX +ERROR HY000: Data too long for condition item 'MESSAGE_TEXT' +call p3; +length(name) name +65 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX +ERROR HY000: Data too long for condition item 'TABLE_NAME' +drop procedure p; +drop procedure p2; +drop procedure p3; +SET @@sql_mode=@save_sql_mode; diff --git a/mysql-test/r/sp-dynamic.result b/mysql-test/r/sp-dynamic.result index 34b76a9424f..cdfeb8ab020 100644 --- a/mysql-test/r/sp-dynamic.result +++ b/mysql-test/r/sp-dynamic.result @@ -97,8 +97,6 @@ end| call p1()| a 1 -Warnings: -Note 1051 Unknown table 't1' call p1()| a 1 @@ -371,9 +369,6 @@ call p1(@a)| create table t1 (a int) @rsql create table t2 (a int) -Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' select @a| @a 0 @@ -382,9 +377,6 @@ call p1(@a)| create table t1 (a int) @rsql create table t2 (a int) -Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' select @a| @a 0 diff --git a/mysql-test/r/sp-vars.result b/mysql-test/r/sp-vars.result index f5420a62f63..f532a5284a9 100644 --- a/mysql-test/r/sp-vars.result +++ b/mysql-test/r/sp-vars.result @@ -110,24 +110,6 @@ v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18 v19 v20 12.00 12.12 12.00 12.12 Warnings: -Warning 1264 Out of range value for column 'v1' at row 1 -Warning 1264 Out of range value for column 'v1u' at row 1 -Warning 1264 Out of range value for column 'v2' at row 1 -Warning 1264 Out of range value for column 'v2u' at row 1 -Warning 1264 Out of range value for column 'v3' at row 1 -Warning 1264 Out of range value for column 'v3u' at row 1 -Warning 1264 Out of range value for column 'v4' at row 1 -Warning 1264 Out of range value for column 'v4u' at row 1 -Warning 1264 Out of range value for column 'v5' at row 1 -Warning 1264 Out of range value for column 'v5u' at row 1 -Warning 1264 Out of range value for column 'v6' at row 1 -Warning 1264 Out of range value for column 'v6u' at row 1 -Warning 1366 Incorrect integer value: 'String 10 ' for column 'v10' at row 1 -Warning 1366 Incorrect integer value: 'String10' for column 'v11' at row 1 -Warning 1265 Data truncated for column 'v12' at row 1 -Warning 1265 Data truncated for column 'v13' at row 1 -Warning 1366 Incorrect integer value: 'Hello, world' for column 'v16' at row 1 -Note 1265 Data truncated for column 'v18' at row 1 Note 1265 Data truncated for column 'v20' at row 1 CALL sp_vars_check_assignment(); i1 i2 i3 i4 @@ -143,21 +125,6 @@ d1 d2 d3 d1 d2 d3 1234.00 1234.12 1234.12 Warnings: -Warning 1264 Out of range value for column 'i1' at row 1 -Warning 1264 Out of range value for column 'i2' at row 1 -Warning 1264 Out of range value for column 'i3' at row 1 -Warning 1264 Out of range value for column 'i4' at row 1 -Warning 1264 Out of range value for column 'i1' at row 1 -Warning 1264 Out of range value for column 'i2' at row 1 -Warning 1264 Out of range value for column 'i3' at row 1 -Warning 1264 Out of range value for column 'i4' at row 1 -Warning 1264 Out of range value for column 'u1' at row 1 -Warning 1264 Out of range value for column 'u2' at row 1 -Warning 1264 Out of range value for column 'u3' at row 1 -Warning 1264 Out of range value for column 'u4' at row 1 -Warning 1264 Out of range value for column 'u1' at row 1 -Warning 1264 Out of range value for column 'u2' at row 1 -Note 1265 Data truncated for column 'd3' at row 1 Note 1265 Data truncated for column 'd3' at row 1 SELECT sp_vars_check_ret1(); sp_vars_check_ret1() @@ -198,24 +165,6 @@ v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18 v19 v20 12.00 12.12 12.00 12.12 Warnings: -Warning 1264 Out of range value for column 'v1' at row 1 -Warning 1264 Out of range value for column 'v1u' at row 1 -Warning 1264 Out of range value for column 'v2' at row 1 -Warning 1264 Out of range value for column 'v2u' at row 1 -Warning 1264 Out of range value for column 'v3' at row 1 -Warning 1264 Out of range value for column 'v3u' at row 1 -Warning 1264 Out of range value for column 'v4' at row 1 -Warning 1264 Out of range value for column 'v4u' at row 1 -Warning 1264 Out of range value for column 'v5' at row 1 -Warning 1264 Out of range value for column 'v5u' at row 1 -Warning 1264 Out of range value for column 'v6' at row 1 -Warning 1264 Out of range value for column 'v6u' at row 1 -Warning 1366 Incorrect integer value: 'String 10 ' for column 'v10' at row 1 -Warning 1366 Incorrect integer value: 'String10' for column 'v11' at row 1 -Warning 1265 Data truncated for column 'v12' at row 1 -Warning 1265 Data truncated for column 'v13' at row 1 -Warning 1366 Incorrect integer value: 'Hello, world' for column 'v16' at row 1 -Note 1265 Data truncated for column 'v18' at row 1 Note 1265 Data truncated for column 'v20' at row 1 CALL sp_vars_check_assignment(); i1 i2 i3 i4 @@ -231,21 +180,6 @@ d1 d2 d3 d1 d2 d3 1234.00 1234.12 1234.12 Warnings: -Warning 1264 Out of range value for column 'i1' at row 1 -Warning 1264 Out of range value for column 'i2' at row 1 -Warning 1264 Out of range value for column 'i3' at row 1 -Warning 1264 Out of range value for column 'i4' at row 1 -Warning 1264 Out of range value for column 'i1' at row 1 -Warning 1264 Out of range value for column 'i2' at row 1 -Warning 1264 Out of range value for column 'i3' at row 1 -Warning 1264 Out of range value for column 'i4' at row 1 -Warning 1264 Out of range value for column 'u1' at row 1 -Warning 1264 Out of range value for column 'u2' at row 1 -Warning 1264 Out of range value for column 'u3' at row 1 -Warning 1264 Out of range value for column 'u4' at row 1 -Warning 1264 Out of range value for column 'u1' at row 1 -Warning 1264 Out of range value for column 'u2' at row 1 -Note 1265 Data truncated for column 'd3' at row 1 Note 1265 Data truncated for column 'd3' at row 1 SELECT sp_vars_check_ret1(); sp_vars_check_ret1() @@ -451,10 +385,6 @@ FF HEX(v10) FF Warnings: -Warning 1264 Out of range value for column 'v8' at row 1 -Warning 1264 Out of range value for column 'v9' at row 1 -Warning 1264 Out of range value for column 'v10' at row 1 -Warning 1264 Out of range value for column 'v1' at row 1 Warning 1264 Out of range value for column 'v5' at row 1 DROP PROCEDURE p1; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 3ad556b8c30..6f4755fcf37 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -526,8 +526,6 @@ end| delete from t1| create table t3 ( s char(16), d int)| call into_test4()| -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select * from t3| s d into4 NULL @@ -1120,8 +1118,6 @@ end| select f9()| f9() 6 -Warnings: -Note 1051 Unknown table 't3' select f9() from t1 limit 1| f9() 6 @@ -1162,8 +1158,6 @@ drop temporary table t3| select f12_1()| f12_1() 3 -Warnings: -Note 1051 Unknown table 't3' select f12_1() from t1 limit 1| f12_1() 3 @@ -2069,12 +2063,7 @@ end if; insert into t4 values (2, rc, t3); end| call bug1863(10)| -Warnings: -Note 1051 Unknown table 'temp_t1' -Warning 1329 No data - zero rows fetched, selected, or processed call bug1863(10)| -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select * from t4| f1 rc t3 2 0 NULL @@ -2339,11 +2328,7 @@ begin end| call bug4579_1()| call bug4579_1()| -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed call bug4579_1()| -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed drop procedure bug4579_1| drop procedure bug4579_2| drop table t3| @@ -3736,9 +3721,6 @@ Table Create Table tm1 CREATE TEMPORARY TABLE `tm1` ( `spv1` decimal(3,3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -Warnings: -Warning 1264 Out of range value for column 'spv1' at row 1 -Warning 1366 Incorrect decimal value: 'test' for column 'spv1' at row 1 call bug12589_2()| Table Create Table tm1 CREATE TEMPORARY TABLE `tm1` ( @@ -6106,35 +6088,6 @@ bug5274_f2() x Warnings: Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 DROP FUNCTION bug5274_f1| DROP FUNCTION bug5274_f2| drop procedure if exists proc_21513| @@ -6229,20 +6182,17 @@ f1(2) 0 Warnings: Warning 1329 No data - zero rows fetched, selected, or processed -Warning 1329 No data - zero rows fetched, selected, or processed PREPARE s1 FROM 'SELECT f1(2)'; EXECUTE s1; f1(2) 0 Warnings: Warning 1329 No data - zero rows fetched, selected, or processed -Warning 1329 No data - zero rows fetched, selected, or processed EXECUTE s1; f1(2) 0 Warnings: Warning 1329 No data - zero rows fetched, selected, or processed -Warning 1329 No data - zero rows fetched, selected, or processed DROP PROCEDURE p1; DROP PROCEDURE p2; DROP FUNCTION f1; @@ -6254,6 +6204,7 @@ create procedure mysqltest_db1.sp_bug28551() begin end; call mysqltest_db1.sp_bug28551(); show warnings; Level Code Message +Note 1008 Can't drop database 'mysqltest_db1'; database doesn't exist drop database mysqltest_db1; drop database if exists mysqltest_db1; drop table if exists test.t1; diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result index 831616f491b..228fe008447 100644 --- a/mysql-test/r/sp_notembedded.result +++ b/mysql-test/r/sp_notembedded.result @@ -21,9 +21,11 @@ end| call bug4902_2()| show warnings| Level Code Message +Note 1305 PROCEDURE bug4902_2 does not exist call bug4902_2()| show warnings| Level Code Message +Note 1305 PROCEDURE bug4902_2 does not exist drop procedure bug4902_2| drop table if exists t1| create table t1 ( diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 241f4198bf7..a9e0d7f457d 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -315,8 +315,8 @@ MOD(col1,0) NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT INTO t1 (col1) VALUES(-129); ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(128); @@ -343,7 +343,7 @@ SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 1; MOD(col1,0) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0; ERROR 22003: Out of range value for column 'col1' at row 1 UPDATE t1 SET col2=col2 + 50 WHERE col2 > 0; @@ -353,16 +353,16 @@ ERROR 22012: Division by 0 set @@sql_mode='ERROR_FOR_DIVISION_BY_ZERO'; INSERT INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 set @@sql_mode='ansi,traditional'; SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 2; MOD(col1,0) NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT INTO t1 (col1) VALUES (''); ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES ('a59b'); @@ -374,8 +374,8 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 set @@sql_mode='ansi'; INSERT INTO t1 values (1/0,1/0); set @@sql_mode='ansi,traditional'; @@ -457,8 +457,8 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(-32769,-1),(32768,65536); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -541,8 +541,8 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(-8388609,-1),(8388608,16777216); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -625,8 +625,8 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 values (-2147483649, -1),(2147643648,4294967296); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -707,8 +707,8 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(-9223372036854775809,-1),(9223372036854775808,18446744073709551616); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -794,7 +794,7 @@ Warnings: Note 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0); Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(1000),(-1000); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -861,7 +861,7 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 (col1) VALUES (1/0); Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES (+3.4E+39,-3.4E+39); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -910,7 +910,7 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 (col1) values (1/0); Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES (+1.9E+309,-1.9E+309); ERROR 22007: Illegal double '1.9E+309' value found during parsing INSERT IGNORE INTO t1 VALUES ('+2.0E+309','-2.0E+309'); @@ -1080,13 +1080,13 @@ Warnings: Warning 1292 Truncated incorrect datetime value: '31.10.2004 15.30 abc' insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); Warnings: -Error 1411 Incorrect datetime value: '32.10.2004 15.30' for function str_to_date +Warning 1411 Incorrect datetime value: '32.10.2004 15.30' for function str_to_date insert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r')); Warnings: -Error 1411 Incorrect time value: '22:22:33 AM' for function str_to_date +Warning 1411 Incorrect time value: '22:22:33 AM' for function str_to_date insert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T')); Warnings: -Error 1411 Incorrect time value: 'abc' for function str_to_date +Warning 1411 Incorrect time value: 'abc' for function str_to_date insert into t1 values(STR_TO_DATE('31.10.2004 15.30','%d.%m.%Y %H.%i')); insert into t1 values(STR_TO_DATE('2004.12.12 11:22:33 AM','%Y.%m.%d %r')); insert into t1 values(STR_TO_DATE('2004.12.12 10:22:59','%Y.%m.%d %T')); @@ -1104,9 +1104,9 @@ select count(*) from t1 where STR_TO_DATE('2004.12.12 10:22:61','%Y.%m.%d %T') I count(*) 7 Warnings: -Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date -Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date -Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date +Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date +Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date +Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date drop table t1; create table t1 (col1 char(3), col2 integer); insert into t1 (col1) values (cast(1000 as char(3))); diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 4476735735c..000b08113c1 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -1073,7 +1073,7 @@ NULL SET @x=2; UPDATE t1 SET i1 = @x; Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 SELECT @x; @x NULL @@ -1086,8 +1086,8 @@ NULL SET @x=4; UPDATE t1 SET i1 = @x; Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 SELECT @x; @x NULL @@ -1190,16 +1190,16 @@ create trigger t4_bu before update on t4 for each row set @t4_bu_called:=1| insert into t1 values(10, 10)| set @a:=1/0| Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select 1/0 from t1| 1/0 NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 create trigger t1_bi before insert on t1 for each row set @a:=1/0| insert into t1 values(20, 20)| Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 drop trigger t1_bi| create trigger t1_bi before insert on t1 for each row begin @@ -1219,7 +1219,7 @@ end| set @check=0, @t4_bi_called=0, @t4_bu_called=0| insert into t1 values(30, 30)| Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select @check, @t4_bi_called, @t4_bu_called| @check @t4_bi_called @t4_bu_called 2 1 1 diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index c3d1e400b23..1ad46821bb7 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -185,7 +185,7 @@ select 1e10/0e0; 1e10/0e0 NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 create table wl1612 (col1 int, col2 decimal(38,10), col3 numeric(38,10)); insert into wl1612 values(1,12345678901234567890.1234567890,12345678901234567890.1234567890); select * from wl1612; @@ -205,27 +205,27 @@ NULL NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 select col2/0 from wl1612; col2/0 NULL NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 select col3/0 from wl1612; col3/0 NULL NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 insert into wl1612 values(5,5000.0005,5000.0005); insert into wl1612 values(6,5000.0005,5000.0005); select sum(col2),sum(col3) from wl1612; @@ -788,12 +788,12 @@ select 1 / 1E-500; 1 / 1E-500 NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select 1 / 0; 1 / 0 NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 set sql_mode='ansi,traditional'; CREATE TABLE Sow6_2f (col1 NUMERIC(4,2)); INSERT INTO Sow6_2f VALUES (10.55); @@ -819,11 +819,11 @@ NULL NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT INTO Sow6_2f VALUES ('a59b'); ERROR HY000: Incorrect decimal value: 'a59b' for column 'col1' at row 1 drop table Sow6_2f; @@ -838,12 +838,12 @@ select 9999999999999999999999999999999999999999999999999999999999999999999999999 x 99999999999999999999999999999999999999999999999999999999999999999 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 + 1 as x; x 100000000000000000000000000000000000000000000000000000000000000000 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select 0.190287977636363637 + 0.040372670 * 0 - 0; 0.190287977636363637 + 0.040372670 * 0 - 0 0.190287977636363637 @@ -1380,15 +1380,15 @@ create table t1 (c1 decimal(64)); insert into t1 values( 89000000000000000000000000000000000000000000000000000000000000000000000000000000000000000); Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1264 Out of range value for column 'c1' at row 1 insert into t1 values( 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 * 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999); Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1264 Out of range value for column 'c1' at row 1 insert into t1 values(1e100); Warnings: @@ -1432,7 +1432,7 @@ select cast(19999999999999999999 as unsigned); cast(19999999999999999999 as unsigned) 18446744073709551615 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' create table t1(a decimal(18)); insert into t1 values(123456789012345678); alter table t1 modify column a decimal(19); @@ -1444,12 +1444,12 @@ select cast(11.1234 as DECIMAL(3,2)); cast(11.1234 as DECIMAL(3,2)) 9.99 Warnings: -Error 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 select * from (select cast(11.1234 as DECIMAL(3,2))) t; cast(11.1234 as DECIMAL(3,2)) 9.99 Warnings: -Error 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 select cast(a as DECIMAL(3,2)) from (select 11.1233 as a UNION select 11.1234 @@ -1460,9 +1460,9 @@ cast(a as DECIMAL(3,2)) 9.99 9.99 Warnings: -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 select cast(a as DECIMAL(3,2)), count(*) from (select 11.1233 as a UNION select 11.1234 @@ -1471,10 +1471,10 @@ UNION select 12.1234 cast(a as DECIMAL(3,2)) count(*) 9.99 3 Warnings: -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 create table t1 (s varchar(100)); insert into t1 values (0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875); drop table t1; @@ -1560,7 +1560,7 @@ select cast(143.481 as decimal(2,1)); cast(143.481 as decimal(2,1)) 9.9 Warnings: -Error 1264 Out of range value for column 'cast(143.481 as decimal(2,1))' at row 1 +Warning 1264 Out of range value for column 'cast(143.481 as decimal(2,1))' at row 1 select cast(-3.4 as decimal(2,1)); cast(-3.4 as decimal(2,1)) -3.4 @@ -1568,12 +1568,12 @@ select cast(99.6 as decimal(2,0)); cast(99.6 as decimal(2,0)) 99 Warnings: -Error 1264 Out of range value for column 'cast(99.6 as decimal(2,0))' at row 1 +Warning 1264 Out of range value for column 'cast(99.6 as decimal(2,0))' at row 1 select cast(-13.4 as decimal(2,1)); cast(-13.4 as decimal(2,1)) -9.9 Warnings: -Error 1264 Out of range value for column 'cast(-13.4 as decimal(2,1))' at row 1 +Warning 1264 Out of range value for column 'cast(-13.4 as decimal(2,1))' at row 1 select cast(98.6 as decimal(2,0)); cast(98.6 as decimal(2,0)) 99 @@ -1674,7 +1674,7 @@ CREATE TABLE t1 SELECT /* 82 */ 1000000000000000000000000000000000000000000000000000000000000000000000000000000001 AS c1; Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DESC t1; Field Type Null Key Default Extra c1 decimal(65,0) NO 0 @@ -1797,7 +1797,7 @@ CREATE TABLE t1 (a DECIMAL(30,30)); INSERT INTO t1 VALUES (0.1),(0.2),(0.3); CREATE TABLE t2 SELECT MIN(a + 0.0000000000000000000000000000001) AS c1 FROM t1; Warnings: -Note 1265 Data truncated for column 'c1' at row 3 +Note 1265 Data truncated for column 'c1' at row 4 DESC t2; Field Type Null Key Default Extra c1 decimal(32,30) YES NULL diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index b5e374aaf8c..e23e8930ddb 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1111,8 +1111,8 @@ insert into v1 values(3); ERROR HY000: CHECK OPTION failed 'test.v1' insert ignore into v1 values (2),(3),(0); Warnings: -Error 1369 CHECK OPTION failed 'test.v1' -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1; a 1 @@ -1125,8 +1125,8 @@ create table t2 (a int); insert into t2 values (2),(3),(0); insert ignore into v1 SELECT a from t2; Warnings: -Error 1369 CHECK OPTION failed 'test.v1' -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1 order by a desc; a 1 @@ -1148,7 +1148,7 @@ a update v1 set a=a+1; update ignore v1,t2 set v1.a=v1.a+1 where v1.a=t2.a; Warnings: -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1; a 1 @@ -1182,7 +1182,7 @@ insert into v1 values (1) on duplicate key update a=2; ERROR HY000: CHECK OPTION failed 'test.v1' insert ignore into v1 values (1) on duplicate key update a=2; Warnings: -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1; a 1 @@ -1283,7 +1283,7 @@ insert ignore into v1 values (6); ERROR HY000: CHECK OPTION failed 'test.v1' insert ignore into v1 values (6),(3); Warnings: -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1; s1 3 @@ -1328,9 +1328,9 @@ delete from t1; load data infile '../../std_data/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines; Warnings: Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3 -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 4 -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1 order by a,b; a b 1 row 1 @@ -1354,7 +1354,7 @@ concat('|',a,'|') concat('|',b,'|') delete from t1; load data infile '../../std_data/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by ''''; Warnings: -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' Warning 1261 Row 2 doesn't contain data for all columns select concat('|',a,'|'), concat('|',b,'|') from t1; concat('|',a,'|') concat('|',b,'|') diff --git a/mysql-test/suite/binlog/r/binlog_index.result b/mysql-test/suite/binlog/r/binlog_index.result index d49ceb00501..69d877c5adc 100644 --- a/mysql-test/suite/binlog/r/binlog_index.result +++ b/mysql-test/suite/binlog/r/binlog_index.result @@ -34,7 +34,7 @@ purge binary logs TO 'master-bin.000002'; ERROR HY000: Fatal error during log purge show warnings; Level Code Message -Error 1377 a problem with deleting master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files +Warning 1377 a problem with deleting master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files Error 1377 Fatal error during log purge reset master; End of tests diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index 4c2c32ad8f1..3047ff54cf0 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -43,12 +43,6 @@ END| CALL proc(); Warnings: Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. ---- Insert from stored function ---- CREATE FUNCTION func() RETURNS INT @@ -67,12 +61,6 @@ func() 0 Warnings: Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. ---- Insert from trigger ---- CREATE TRIGGER trig BEFORE INSERT ON trigger_table @@ -90,12 +78,6 @@ INSERT INTO trigger_table VALUES ('bye.'); Warnings: Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. ---- Insert from prepared statement ---- PREPARE p1 FROM 'INSERT INTO t1 VALUES (@@global.sync_binlog)'; PREPARE p2 FROM 'INSERT INTO t1 VALUES (@@session.insert_id)'; @@ -155,12 +137,6 @@ func5() 0 Warnings: Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. ==== Variables that should *not* be unsafe ==== INSERT INTO t1 VALUES (@@session.pseudo_thread_id); INSERT INTO t1 VALUES (@@session.pseudo_thread_id); @@ -215,9 +191,6 @@ END| CALL p1(); Warnings: Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. DROP PROCEDURE p1; DROP TABLE t1; DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/innodb/r/innodb-zip.result b/mysql-test/suite/innodb/r/innodb-zip.result index b26c4112826..a59758c8673 100644 --- a/mysql-test/suite/innodb/r/innodb-zip.result +++ b/mysql-test/suite/innodb/r/innodb-zip.result @@ -198,13 +198,11 @@ create table t1 (id int primary key) engine = innodb key_block_size = 0; ERROR HY000: Can't create table 'test.t1' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 0. Valid values are [1, 2, 4, 8, 16] Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 9; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 1; create table t4 (id int primary key) engine = innodb key_block_size = 2; @@ -235,28 +233,24 @@ key_block_size = 8 row_format = redundant; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 8 row_format = compact; ERROR HY000: Can't create table 'test.t3' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t3' (errno: 1478) create table t4 (id int primary key) engine = innodb key_block_size = 8 row_format = dynamic; ERROR HY000: Can't create table 'test.t4' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t4' (errno: 1478) create table t5 (id int primary key) engine = innodb key_block_size = 8 row_format = default; ERROR HY000: Can't create table 'test.t5' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t5' (errno: 1478) SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; @@ -268,24 +262,18 @@ key_block_size = 9 row_format = redundant; ERROR HY000: Can't create table 'test.t1' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 9 row_format = compact; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 9 row_format = dynamic; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t2' (errno: 1478) SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; @@ -295,43 +283,36 @@ create table t1 (id int primary key) engine = innodb key_block_size = 1; ERROR HY000: Can't create table 'test.t1' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 2; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 4; ERROR HY000: Can't create table 'test.t3' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t3' (errno: 1478) create table t4 (id int primary key) engine = innodb key_block_size = 8; ERROR HY000: Can't create table 'test.t4' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t4' (errno: 1478) create table t5 (id int primary key) engine = innodb key_block_size = 16; ERROR HY000: Can't create table 'test.t5' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t5' (errno: 1478) create table t6 (id int primary key) engine = innodb row_format = compressed; ERROR HY000: Can't create table 'test.t6' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. Error 1005 Can't create table 'test.t6' (errno: 1478) create table t7 (id int primary key) engine = innodb row_format = dynamic; ERROR HY000: Can't create table 'test.t7' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. Error 1005 Can't create table 'test.t7' (errno: 1478) create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; @@ -347,43 +328,36 @@ create table t1 (id int primary key) engine = innodb key_block_size = 1; ERROR HY000: Can't create table 'test.t1' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 2; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 4; ERROR HY000: Can't create table 'test.t3' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t3' (errno: 1478) create table t4 (id int primary key) engine = innodb key_block_size = 8; ERROR HY000: Can't create table 'test.t4' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t4' (errno: 1478) create table t5 (id int primary key) engine = innodb key_block_size = 16; ERROR HY000: Can't create table 'test.t5' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t5' (errno: 1478) create table t6 (id int primary key) engine = innodb row_format = compressed; ERROR HY000: Can't create table 'test.t6' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t6' (errno: 1478) create table t7 (id int primary key) engine = innodb row_format = dynamic; ERROR HY000: Can't create table 'test.t7' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t7' (errno: 1478) create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; diff --git a/mysql-test/suite/ndb/r/ndb_bitfield.result b/mysql-test/suite/ndb/r/ndb_bitfield.result index 59c4d420b22..826f3a98348 100644 --- a/mysql-test/suite/ndb/r/ndb_bitfield.result +++ b/mysql-test/suite/ndb/r/ndb_bitfield.result @@ -204,7 +204,7 @@ b int 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 +Warning 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, @@ -214,7 +214,7 @@ key(b) 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 +Warning 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, diff --git a/mysql-test/suite/ndb/r/ndb_dd_basic.result b/mysql-test/suite/ndb/r/ndb_dd_basic.result index 41e3d10fe5b..b956d3b0047 100644 --- a/mysql-test/suite/ndb/r/ndb_dd_basic.result +++ b/mysql-test/suite/ndb/r/ndb_dd_basic.result @@ -8,20 +8,20 @@ INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=MYISAM; Warnings: -Error 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Warning 1478 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 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Warning 1478 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 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Warning 1478 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/suite/ndb/r/ndb_dd_ddl.result b/mysql-test/suite/ndb/r/ndb_dd_ddl.result index d8d9e8631d5..2bf30f5c7fc 100644 --- a/mysql-test/suite/ndb/r/ndb_dd_ddl.result +++ b/mysql-test/suite/ndb/r/ndb_dd_ddl.result @@ -15,7 +15,7 @@ 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 +Warning 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB Error 1528 Failed to create LOGFILE GROUP CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' diff --git a/mysql-test/suite/ndb/r/ndb_gis.result b/mysql-test/suite/ndb/r/ndb_gis.result index 374d702c408..61d15b7cb98 100644 --- a/mysql-test/suite/ndb/r/ndb_gis.result +++ b/mysql-test/suite/ndb/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 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +Warning 1478 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 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +Warning 1478 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/suite/ndb/r/ndb_partition_error.result b/mysql-test/suite/ndb/r/ndb_partition_error.result index d86dc382185..df2db5c5f06 100644 --- a/mysql-test/suite/ndb/r/ndb_partition_error.result +++ b/mysql-test/suite/ndb/r/ndb_partition_error.result @@ -14,7 +14,7 @@ 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 +Warning 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, diff --git a/mysql-test/suite/ndb/r/ndb_row_format.result b/mysql-test/suite/ndb/r/ndb_row_format.result index eea0692dd92..48a314c2fe9 100644 --- a/mysql-test/suite/ndb/r/ndb_row_format.result +++ b/mysql-test/suite/ndb/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 1478 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute' +Warning 1478 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/suite/ndb/r/ndb_single_user.result b/mysql-test/suite/ndb/r/ndb_single_user.result index 8133e540d71..1d5f3041adb 100644 --- a/mysql-test/suite/ndb/r/ndb_single_user.result +++ b/mysql-test/suite/ndb/r/ndb_single_user.result @@ -9,7 +9,7 @@ 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 +Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB Error 1528 Failed to create LOGFILE GROUP create table t1 (a int key, b int unique, c int) engine ndb; CREATE LOGFILE GROUP lg1 @@ -25,14 +25,14 @@ 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 +Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB Error 1528 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 +Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB Error 1529 Failed to drop LOGFILE GROUP CREATE TABLESPACE ts1 ADD DATAFILE 'datafile.dat' @@ -45,7 +45,7 @@ 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 +Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB Error 1533 Failed to alter: DROP DATAFILE ALTER TABLESPACE ts1 DROP DATAFILE 'datafile.dat' @@ -55,7 +55,7 @@ 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 +Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB Error 1529 Failed to drop TABLESPACE DROP TABLESPACE ts1 ENGINE NDB; diff --git a/mysql-test/suite/rpl/r/rpl_EE_err.result b/mysql-test/suite/rpl/r/rpl_EE_err.result index 16fa931e303..8c1277445b2 100644 --- a/mysql-test/suite/rpl/r/rpl_EE_err.result +++ b/mysql-test/suite/rpl/r/rpl_EE_err.result @@ -8,4 +8,4 @@ create table t1 (a int) engine=myisam; flush tables; drop table if exists t1; Warnings: -Error 2 Can't find file: 't1' (errno: 2) +Warning 2 Can't find file: 't1' (errno: 2) diff --git a/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result index 9a2822835f8..5a6a9ace4c5 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result @@ -22,8 +22,6 @@ END| < ---- Master selects-- > ------------------------- CALL test.p1(12); -Warnings: -Note 1051 Unknown table 't1' SELECT * FROM test.t1; num 12 diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index e92f3e96303..71d3d5a140b 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -694,3 +694,35 @@ SELECT 1 FROM t1 WHERE t1.a NOT IN DROP TABLE t1, t2; --echo End of 5.0 tests + +# +# Bug#36785: Wrong error message when group_concat() exceeds max length +# + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +CREATE TABLE t1 (a VARCHAR(6), b INT); +CREATE TABLE t2 (a VARCHAR(6), b INT); + +INSERT INTO t1 VALUES ('111111', 1); +INSERT INTO t1 VALUES ('222222', 2); +INSERT INTO t1 VALUES ('333333', 3); +INSERT INTO t1 VALUES ('444444', 4); +INSERT INTO t1 VALUES ('555555', 5); + +SET group_concat_max_len = 5; +SET @old_sql_mode = @@sql_mode, @@sql_mode = 'traditional'; + +SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b LIMIT 3; +--error ER_CUT_VALUE_GROUP_CONCAT +INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; +UPDATE t1 SET a = '11111' WHERE b = 1; +UPDATE t1 SET a = '22222' WHERE b = 2; +--error ER_CUT_VALUE_GROUP_CONCAT +INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; + +SET group_concat_max_len = DEFAULT; +SET @@sql_mode = @old_sql_mode; +DROP TABLE t1, t2; diff --git a/mysql-test/t/signal.test b/mysql-test/t/signal.test new file mode 100644 index 00000000000..bdb6625ba32 --- /dev/null +++ b/mysql-test/t/signal.test @@ -0,0 +1,2685 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# Tests for SIGNAL and RESIGNAL + +--echo # +--echo # PART 1: syntax +--echo # + +--echo # +--echo # Test every new reserved and non reserved keywords +--echo # + +--disable_warnings +drop table if exists signal_non_reserved; +--enable_warnings + +create table signal_non_reserved ( + class_origin int, + subclass_origin int, + constraint_catalog int, + constraint_schema int, + constraint_name int, + catalog_name int, + schema_name int, + table_name int, + column_name int, + cursor_name int, + message_text int, + sqlcode int +); + +drop table signal_non_reserved; + +--disable_warnings +drop table if exists diag_non_reserved; +--enable_warnings + +create table diag_non_reserved ( + diagnostics int, + current int, + stacked int, + exception int +); + +drop table diag_non_reserved; + +--disable_warnings +drop table if exists diag_cond_non_reserved; +--enable_warnings + +create table diag_cond_non_reserved ( + condition_identifier int, + condition_number int, + condition_name int, + connection_name int, + message_length int, + message_octet_length int, + parameter_mode int, + parameter_name int, + parameter_ordinal_position int, + returned_sqlstate int, + routine_catalog int, + routine_name int, + routine_schema int, + server_name int, + specific_name int, + trigger_catalog int, + trigger_name int, + trigger_schema int +); + +drop table diag_cond_non_reserved; + +--disable_warnings +drop table if exists diag_stmt_non_reserved; +--enable_warnings + +create table diag_stmt_non_reserved ( + number int, + more int, + command_function int, + command_function_code int, + dynamic_function int, + dynamic_function_code int, + row_count int, + transactions_committed int, + transactions_rolled_back int, + transaction_active int +); + +drop table diag_stmt_non_reserved; + +--disable_warnings +drop table if exists test_reserved; +--enable_warnings + +--error ER_PARSE_ERROR +create table test_reserved (signal int); + +--error ER_PARSE_ERROR +create table test_reserved (resignal int); + +--error ER_PARSE_ERROR +create table test_reserved (condition int); + +--echo # +--echo # Test the SIGNAL syntax +--echo # + +--disable_warnings +drop procedure if exists test_invalid; +drop procedure if exists test_signal_syntax; +drop function if exists test_signal_func; +--enable_warnings + +delimiter $$; + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL; +end $$ + +--error ER_SP_COND_MISMATCH +create procedure test_invalid() +begin + SIGNAL foo; +end $$ + +--error ER_SIGNAL_BAD_CONDITION_TYPE +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR 1234; + SIGNAL foo; +end $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + SIGNAL SQLSTATE '23000'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + SIGNAL SQLSTATE VALUE '23000'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CLASS_ORIGIN = 'foo', CLASS_ORIGIN = 'bar'; +end $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MESSAGE_TEXT = 'foo', MESSAGE_TEXT = 'bar'; +end $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 'foo', MYSQL_ERRNO = 'bar'; +end $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET + CLASS_ORIGIN = 'foo', + SUBCLASS_ORIGIN = 'foo', + CONSTRAINT_CATALOG = 'foo', + CONSTRAINT_SCHEMA = 'foo', + CONSTRAINT_NAME = 'foo', + CATALOG_NAME = 'foo', + SCHEMA_NAME = 'foo', + TABLE_NAME = 'foo', + COLUMN_NAME = 'foo', + CURSOR_NAME = 'foo', + MESSAGE_TEXT = 'foo', + MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +--error ER_SP_BAD_SQLSTATE +SIGNAL SQLSTATE '00000' $$ + +--error ER_SP_BAD_SQLSTATE +SIGNAL SQLSTATE '00001' $$ + +--error ER_SP_BAD_SQLSTATE +create procedure test_invalid() +begin + SIGNAL SQLSTATE '00000'; +end $$ + +--error ER_SP_BAD_SQLSTATE +create procedure test_invalid() +begin + SIGNAL SQLSTATE '00001'; +end $$ + +--echo # +--echo # Test conditions information that SIGNAL can not set +--echo # + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET bla_bla = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET CONDITION_IDENTIFIER = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET CONDITION_NUMBER = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET CONNECTION_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET MESSAGE_LENGTH = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET MESSAGE_OCTET_LENGTH = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET PARAMETER_MODE = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET PARAMETER_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET PARAMETER_ORDINAL_POSITION = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET RETURNED_SQLSTATE = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET ROUTINE_CATALOG = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET ROUTINE_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET ROUTINE_SCHEMA = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET SERVER_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET SPECIFIC_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET TRIGGER_CATALOG = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET TRIGGER_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET TRIGGER_SCHEMA = 'foo'; +end $$ + +delimiter ;$$ + +--echo # +--echo # Test the RESIGNAL syntax +--echo # + +--disable_warnings +drop procedure if exists test_invalid; +drop procedure if exists test_resignal_syntax; +--enable_warnings + +delimiter $$; + +--error ER_SP_COND_MISMATCH +create procedure test_invalid() +begin + RESIGNAL foo; +end $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL; +end $$ +drop procedure test_resignal_syntax $$ + +--error ER_SIGNAL_BAD_CONDITION_TYPE +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR 1234; + RESIGNAL foo; +end $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SQLSTATE '23000'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SQLSTATE VALUE '23000'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CLASS_ORIGIN = 'foo', CLASS_ORIGIN = 'bar'; +end $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET MESSAGE_TEXT = 'foo', MESSAGE_TEXT = 'bar'; +end $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET MYSQL_ERRNO = 'foo', MYSQL_ERRNO = 'bar'; +end $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET + CLASS_ORIGIN = 'foo', + SUBCLASS_ORIGIN = 'foo', + CONSTRAINT_CATALOG = 'foo', + CONSTRAINT_SCHEMA = 'foo', + CONSTRAINT_NAME = 'foo', + CATALOG_NAME = 'foo', + SCHEMA_NAME = 'foo', + TABLE_NAME = 'foo', + COLUMN_NAME = 'foo', + CURSOR_NAME = 'foo', + MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +--error ER_SP_BAD_SQLSTATE +create procedure test_invalid() +begin + RESIGNAL SQLSTATE '00000'; +end $$ + +--error ER_SP_BAD_SQLSTATE +create procedure test_invalid() +begin + RESIGNAL SQLSTATE '00001'; +end $$ + +delimiter ;$$ + +--echo # +--echo # PART 2: non preparable statements +--echo # + +--error ER_UNSUPPORTED_PS +prepare stmt from 'SIGNAL SQLSTATE \'23000\''; + +--error ER_UNSUPPORTED_PS +prepare stmt from 'RESIGNAL SQLSTATE \'23000\''; + +--echo # +--echo # PART 3: runtime execution +--echo # + +--disable_warnings +drop procedure if exists test_signal; +drop procedure if exists test_resignal; +drop table if exists t_warn; +drop table if exists t_cursor; +--enable_warnings + +# Helper tables +create table t_warn(a integer(2)); +create table t_cursor(a integer); + +--echo # +--echo # SIGNAL can also appear in a query +--echo # + +--error ER_SP_COND_MISMATCH +SIGNAL foo; + +SIGNAL SQLSTATE '01000'; + +--error ER_SIGNAL_NOT_FOUND +SIGNAL SQLSTATE '02000'; + +--error ER_SIGNAL_EXCEPTION +SIGNAL SQLSTATE '23000'; + +--error ER_SIGNAL_EXCEPTION +SIGNAL SQLSTATE VALUE '23000'; + +--error ER_WRONG_VALUE_FOR_VAR +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 65536; + +--error ER_WRONG_VALUE_FOR_VAR +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 99999; + +--error ER_WRONG_VALUE_FOR_VAR +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 4294967295; + +--error ER_WRONG_VALUE_FOR_VAR +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 0; + +--error ER_PARSE_ERROR +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = -1; + +--error 65535 +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 65535; + +--echo # +--echo # RESIGNAL can also appear in a query +--echo # + +--error ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER +RESIGNAL; + +--error ER_SP_COND_MISMATCH +RESIGNAL foo; + +--error ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER +RESIGNAL SQLSTATE '12345'; + +--error ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER +RESIGNAL SQLSTATE VALUE '12345'; + +--echo # +--echo # Different kind of SIGNAL conditions +--echo # + +delimiter $$; + +create procedure test_signal() +begin + # max range + DECLARE foo CONDITION FOR SQLSTATE 'AABBB'; + SIGNAL foo SET MYSQL_ERRNO = 65535; +end $$ + +--error 65535 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # max range + DECLARE foo CONDITION FOR SQLSTATE 'AABBB'; + SIGNAL foo SET MYSQL_ERRNO = 65536; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Error + DECLARE foo CONDITION FOR SQLSTATE '99999'; + SIGNAL foo SET MYSQL_ERRNO = 9999; +end $$ + +--error 9999 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # warning + DECLARE too_few_records CONDITION FOR SQLSTATE '01000'; + SIGNAL too_few_records SET MYSQL_ERRNO = 1261; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Not found + DECLARE sp_fetch_no_data CONDITION FOR SQLSTATE '02000'; + SIGNAL sp_fetch_no_data SET MYSQL_ERRNO = 1329; +end $$ + +--error ER_SP_FETCH_NO_DATA +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Error + DECLARE sp_cursor_already_open CONDITION FOR SQLSTATE '24000'; + SIGNAL sp_cursor_already_open SET MYSQL_ERRNO = 1325; +end $$ + +--error ER_SP_CURSOR_ALREADY_OPEN +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Severe error + DECLARE lock_deadlock CONDITION FOR SQLSTATE '40001'; + SIGNAL lock_deadlock SET MYSQL_ERRNO = 1213; +end $$ + +--error ER_LOCK_DEADLOCK +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Unknown -> error + DECLARE foo CONDITION FOR SQLSTATE "99999"; + SIGNAL foo; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # warning, no subclass + DECLARE warn CONDITION FOR SQLSTATE "01000"; + SIGNAL warn; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # warning, with subclass + DECLARE warn CONDITION FOR SQLSTATE "01123"; + SIGNAL warn; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Not found, no subclass + DECLARE not_found CONDITION FOR SQLSTATE "02000"; + SIGNAL not_found; +end $$ + +--error ER_SIGNAL_NOT_FOUND +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Not found, with subclass + DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; + SIGNAL not_found; +end $$ + +--error ER_SIGNAL_NOT_FOUND +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Error, no subclass + DECLARE error CONDITION FOR SQLSTATE "12000"; + SIGNAL error; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Error, with subclass + DECLARE error CONDITION FOR SQLSTATE "12ABC"; + SIGNAL error; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Severe error, no subclass + DECLARE error CONDITION FOR SQLSTATE "40000"; + SIGNAL error; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Severe error, with subclass + DECLARE error CONDITION FOR SQLSTATE "40001"; + SIGNAL error; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +--echo # +--echo # Test the scope of condition +--echo # + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '99999'; + begin + DECLARE foo CONDITION FOR 8888; + end; + SIGNAL foo SET MYSQL_ERRNO=9999; /* outer */ +end $$ + +--error 9999 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR 9999; + begin + DECLARE foo CONDITION FOR SQLSTATE '88888'; + SIGNAL foo SET MYSQL_ERRNO=8888; /* inner */ + end; +end $$ + +--error 8888 +call test_signal() $$ +drop procedure test_signal $$ + +--echo # +--echo # Test SET MYSQL_ERRNO +--echo # + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '99999'; + SIGNAL foo SET MYSQL_ERRNO = 1111; +end $$ + +--error 1111 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01000"; + SIGNAL warn SET MYSQL_ERRNO = 1111; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02000"; + SIGNAL not_found SET MYSQL_ERRNO = 1111; +end $$ + +--error 1111 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE "55000"; + SIGNAL error SET MYSQL_ERRNO = 1111; +end $$ + +--error 1111 +call test_signal() $$ +drop procedure test_signal $$ + +--echo # +--echo # Test SET MESSAGE_TEXT +--echo # + +--error ER_SIGNAL_EXCEPTION +SIGNAL SQLSTATE '77777' SET MESSAGE_TEXT='' $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '77777'; + SIGNAL foo SET + MESSAGE_TEXT = "", + MYSQL_ERRNO=5678; +end $$ + +--error 5678 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '99999'; + SIGNAL foo SET + MESSAGE_TEXT = "Something bad happened", + MYSQL_ERRNO=9999; +end $$ + +--error 9999 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01000"; + SIGNAL warn SET MESSAGE_TEXT = "Something bad happened"; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02000"; + SIGNAL not_found SET MESSAGE_TEXT = "Something bad happened"; +end $$ + +--error ER_SIGNAL_NOT_FOUND +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE "55000"; + SIGNAL error SET MESSAGE_TEXT = "Something bad happened"; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE something CONDITION FOR SQLSTATE "01000"; + SIGNAL something SET MESSAGE_TEXT = _utf8 "This is a UTF8 text"; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE something CONDITION FOR SQLSTATE "01000"; + SIGNAL something SET MESSAGE_TEXT = ""; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01111"; + SIGNAL warn SET MESSAGE_TEXT = "á a"; +end $$ + +call test_signal() $$ +show warnings $$ +drop procedure test_signal $$ + +--echo # +--echo # Test SET complex expressions +--echo # + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + MYSQL_ERRNO = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CLASS_ORIGIN = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + SUBCLASS_ORIGIN = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CONSTRAINT_CATALOG = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CONSTRAINT_SCHEMA = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CONSTRAINT_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CATALOG_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + SCHEMA_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + TABLE_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + COLUMN_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CURSOR_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + MESSAGE_TEXT = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE something CONDITION FOR SQLSTATE '99999'; + DECLARE message_text VARCHAR(64) DEFAULT "Local string variable"; + DECLARE sqlcode INTEGER DEFAULT 1234; + + SIGNAL something SET + MESSAGE_TEXT = message_text, + MYSQL_ERRNO = sqlcode; +end $$ + +--error 1234 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal(message_text VARCHAR(64), sqlcode INTEGER) +begin + DECLARE something CONDITION FOR SQLSTATE "12345"; + + SIGNAL something SET + MESSAGE_TEXT = message_text, + MYSQL_ERRNO = sqlcode; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal("Parameter string", NULL) $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal(NULL, 1234) $$ + +--error 5678 +call test_signal("Parameter string", 5678) $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE something CONDITION FOR SQLSTATE "AABBB"; + + SIGNAL something SET + MESSAGE_TEXT = @message_text, + MYSQL_ERRNO = @sqlcode; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ + +set @sqlcode= 12 $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ + +set @message_text= "User variable" $$ + +--error 12 +call test_signal() $$ +drop procedure test_signal $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + DECLARE something CONDITION FOR SQLSTATE "AABBB"; + + SIGNAL something SET + MESSAGE_TEXT = @message_text := 'illegal', + MYSQL_ERRNO = @sqlcode := 1234; +end $$ + +create procedure test_signal() +begin + DECLARE aaa VARCHAR(64); + DECLARE bbb VARCHAR(64); + DECLARE ccc VARCHAR(64); + DECLARE ddd VARCHAR(64); + DECLARE eee VARCHAR(64); + DECLARE fff VARCHAR(64); + DECLARE ggg VARCHAR(64); + DECLARE hhh VARCHAR(64); + DECLARE iii VARCHAR(64); + DECLARE jjj VARCHAR(64); + DECLARE kkk VARCHAR(64); + + DECLARE warn CONDITION FOR SQLSTATE "01234"; + + set aaa= repeat("A", 64); + set bbb= repeat("B", 64); + set ccc= repeat("C", 64); + set ddd= repeat("D", 64); + set eee= repeat("E", 64); + set fff= repeat("F", 64); + set ggg= repeat("G", 64); + set hhh= repeat("H", 64); + set iii= repeat("I", 64); + set jjj= repeat("J", 64); + set kkk= repeat("K", 64); + + SIGNAL warn SET + CLASS_ORIGIN = aaa, + SUBCLASS_ORIGIN = bbb, + CONSTRAINT_CATALOG = ccc, + CONSTRAINT_SCHEMA = ddd, + CONSTRAINT_NAME = eee, + CATALOG_NAME = fff, + SCHEMA_NAME = ggg, + TABLE_NAME = hhh, + COLUMN_NAME = iii, + CURSOR_NAME = jjj, + MESSAGE_TEXT = kkk, + MYSQL_ERRNO = 65535; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + + SIGNAL warn SET + MYSQL_ERRNO = 999999999999999999999999999999999999999999999999999; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE aaax VARCHAR(65); + DECLARE bbbx VARCHAR(65); + DECLARE cccx VARCHAR(65); + DECLARE dddx VARCHAR(65); + DECLARE eeex VARCHAR(65); + DECLARE fffx VARCHAR(65); + DECLARE gggx VARCHAR(65); + DECLARE hhhx VARCHAR(65); + DECLARE iiix VARCHAR(65); + DECLARE jjjx VARCHAR(65); + DECLARE kkkx VARCHAR(65); + DECLARE lllx VARCHAR(129); + + DECLARE warn CONDITION FOR SQLSTATE "01234"; + + set aaax= concat(repeat("A", 64), "X"); + set bbbx= concat(repeat("B", 64), "X"); + set cccx= concat(repeat("C", 64), "X"); + set dddx= concat(repeat("D", 64), "X"); + set eeex= concat(repeat("E", 64), "X"); + set fffx= concat(repeat("F", 64), "X"); + set gggx= concat(repeat("G", 64), "X"); + set hhhx= concat(repeat("H", 64), "X"); + set iiix= concat(repeat("I", 64), "X"); + set jjjx= concat(repeat("J", 64), "X"); + set kkkx= concat(repeat("K", 64), "X"); + set lllx= concat(repeat("1", 100), + repeat("2", 20), + repeat("8", 8), + "X"); + + SIGNAL warn SET + CLASS_ORIGIN = aaax, + SUBCLASS_ORIGIN = bbbx, + CONSTRAINT_CATALOG = cccx, + CONSTRAINT_SCHEMA = dddx, + CONSTRAINT_NAME = eeex, + CATALOG_NAME = fffx, + SCHEMA_NAME = gggx, + TABLE_NAME = hhhx, + COLUMN_NAME = iiix, + CURSOR_NAME = jjjx, + MESSAGE_TEXT = lllx, + MYSQL_ERRNO = 10000; +end $$ + +#NOTE: the warning text for ER_TRUNCATED_WRONG_VALUE contains +# value: '%-.128s', so the warning printed truncates the value too, +# which affects MESSAGE_TEXT (the X is missing) + +call test_signal() $$ +drop procedure test_signal $$ + +# Test that HANDLER can catch conditions raised by SIGNAL + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + DECLARE CONTINUE HANDLER for SQLSTATE "01234" + begin + select "Caught by SQLSTATE"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "Caught by number"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + DECLARE CONTINUE HANDLER for SQLWARNING + begin + select "Caught by SQLWARNING"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for SQLSTATE "02ABC" + begin + select "Caught by SQLSTATE"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "Caught by number"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for NOT FOUND + begin + select "Caught by NOT FOUND"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE "55555"; + DECLARE CONTINUE HANDLER for SQLSTATE "55555" + begin + select "Caught by SQLSTATE"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE "55555"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "Caught by number"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE "55555"; + DECLARE CONTINUE HANDLER for SQLEXCEPTION + begin + select "Caught by SQLEXCEPTION"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +--echo # +--echo # Test where SIGNAL can be used +--echo # + +create function test_signal_func() returns integer +begin + DECLARE warn CONDITION FOR SQLSTATE "01XXX"; + + SIGNAL warn SET + MESSAGE_TEXT = "This function SIGNAL a warning", + MYSQL_ERRNO = 1012; + + return 5; +end $$ + +select test_signal_func() $$ +drop function test_signal_func $$ + +create function test_signal_func() returns integer +begin + DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; + + SIGNAL not_found SET + MESSAGE_TEXT = "This function SIGNAL not found", + MYSQL_ERRNO = 1012; + + return 5; +end $$ + +--error 1012 +select test_signal_func() $$ +drop function test_signal_func $$ + +create function test_signal_func() returns integer +begin + DECLARE error CONDITION FOR SQLSTATE "50000"; + + SIGNAL error SET + MESSAGE_TEXT = "This function SIGNAL an error", + MYSQL_ERRNO = 1012; + + return 5; +end $$ + +--error 1012 +select test_signal_func() $$ +drop function test_signal_func $$ + +--disable_warnings +drop table if exists t1 $$ +--enable_warnings + +create table t1 (a integer) $$ + +create trigger t1_ai after insert on t1 for each row +begin + DECLARE msg VARCHAR(128); + DECLARE warn CONDITION FOR SQLSTATE "01XXX"; + + set msg= concat("This trigger SIGNAL a warning, a=", NEW.a); + SIGNAL warn SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 1012; +end $$ + +insert into t1 values (1), (2) $$ + +drop trigger t1_ai $$ + +create trigger t1_ai after insert on t1 for each row +begin + DECLARE msg VARCHAR(128); + DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; + + set msg= concat("This trigger SIGNAL a not found, a=", NEW.a); + SIGNAL not_found SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 1012; +end $$ + +--error 1012 +insert into t1 values (3), (4) $$ + +drop trigger t1_ai $$ + +create trigger t1_ai after insert on t1 for each row +begin + DECLARE msg VARCHAR(128); + DECLARE error CONDITION FOR SQLSTATE "03XXX"; + + set msg= concat("This trigger SIGNAL an error, a=", NEW.a); + SIGNAL error SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 1012; +end $$ + +--error 1012 +insert into t1 values (5), (6) $$ + +drop table t1 $$ + +create table t1 (errno integer, msg varchar(128)) $$ + +create trigger t1_ai after insert on t1 for each row +begin + DECLARE warn CONDITION FOR SQLSTATE "01XXX"; + + SIGNAL warn SET + MESSAGE_TEXT = NEW.msg, + MYSQL_ERRNO = NEW.errno; +end $$ + +insert into t1 set errno=1012, msg='Warning message 1 in trigger' $$ +insert into t1 set errno=1013, msg='Warning message 2 in trigger' $$ + +drop table t1 $$ + +--disable_warnings +drop table if exists t1 $$ +drop procedure if exists p1 $$ +drop function if exists f1 $$ +--enable_warnings + +create table t1 (s1 int) $$ +insert into t1 values (1) $$ + +create procedure p1() +begin + declare a int; + declare c cursor for select f1() from t1; + declare continue handler for sqlstate '03000' + select "caught 03000"; + declare continue handler for 1326 + select "caught cursor is not open"; + + select "Before open"; + open c; + select "Before fetch"; + fetch c into a; + select "Before close"; + close c; +end $$ + +create function f1() returns int +begin + signal sqlstate '03000'; + return 5; +end $$ + +## FIXME : MEMORY plugin warning, valgrind leak, bug#36518 +## call p1() $$ + +drop table t1 $$ +drop procedure p1 $$ +drop function f1 $$ + +--echo # +--echo # Test the RESIGNAL runtime +--echo # + +# 6 tests: +# {Signaled warning, Signaled Not Found, Signaled Error, +# warning, not found, error} --> RESIGNAL + +create procedure test_resignal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02222"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +--error 1012 +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE error CONDITION FOR SQLSTATE "55555"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +--error 1012 +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlwarning + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + insert into t_warn set a= 9999999999999999; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE x integer; + DECLARE c cursor for select * from t_cursor; + DECLARE CONTINUE HANDLER for not found + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + open c; + fetch c into x; + close c; +end $$ + +--error ER_SP_FETCH_NO_DATA +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlexception + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + drop table no_such_table; +end $$ + +--error ER_BAD_TABLE_ERROR +call test_resignal() $$ +drop procedure test_resignal $$ + +# 6 tests: +# {Signaled warning, Signaled Not Found, Signaled Error, +# warning, not found, error} --> RESIGNAL SET ... + +create procedure test_resignal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of a warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02111"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of a not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE error CONDITION FOR SQLSTATE "33333"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of an error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlwarning + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of a warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + insert into t_warn set a= 9999999999999999; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE x integer; + DECLARE c cursor for select * from t_cursor; + DECLARE CONTINUE HANDLER for not found + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + open c; + fetch c into x; + close c; +end $$ + +--error 5555 +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlexception + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of an error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + drop table no_such_table; +end $$ + +--error 5555 +call test_resignal() $$ +drop procedure test_resignal $$ + +######################################################### + +# 3 tests: +# {Signaled warning} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01111"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01222" SET + MESSAGE_TEXT = "RESIGNAL to warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01111"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02222" SET + MESSAGE_TEXT = "RESIGNAL to not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01111"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "33333" SET + MESSAGE_TEXT = "RESIGNAL to error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +# 3 tests: +# {Signaled not found} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01222" SET + MESSAGE_TEXT = "RESIGNAL to warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02222" SET + MESSAGE_TEXT = "RESIGNAL to not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "33333" SET + MESSAGE_TEXT = "RESIGNAL to error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +# 3 tests: +# {Signaled error} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE error CONDITION FOR SQLSTATE "AAAAA"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01222" SET + MESSAGE_TEXT = "RESIGNAL to warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE error CONDITION FOR SQLSTATE "AAAAA"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02222" SET + MESSAGE_TEXT = "RESIGNAL to not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE error CONDITION FOR SQLSTATE "AAAAA"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "33333" SET + MESSAGE_TEXT = "RESIGNAL to error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +# 3 tests: +# {warning} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlwarning + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01111" SET + MESSAGE_TEXT = "RESIGNAL to a warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + insert into t_warn set a= 9999999999999999; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlwarning + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02444" SET + MESSAGE_TEXT = "RESIGNAL to a not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + insert into t_warn set a= 9999999999999999; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlwarning + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "44444" SET + MESSAGE_TEXT = "RESIGNAL to an error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + insert into t_warn set a= 9999999999999999; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +# 3 tests: +# {not found} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE x integer; + DECLARE c cursor for select * from t_cursor; + DECLARE CONTINUE HANDLER for not found + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01111" SET + MESSAGE_TEXT = "RESIGNAL to a warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + open c; + fetch c into x; + close c; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE x integer; + DECLARE c cursor for select * from t_cursor; + DECLARE CONTINUE HANDLER for not found + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02444" SET + MESSAGE_TEXT = "RESIGNAL to a not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + open c; + fetch c into x; + close c; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE x integer; + DECLARE c cursor for select * from t_cursor; + DECLARE CONTINUE HANDLER for not found + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "44444" SET + MESSAGE_TEXT = "RESIGNAL to an error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + open c; + fetch c into x; + close c; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +# 3 tests: +# {error} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlexception + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01111" SET + MESSAGE_TEXT = "RESIGNAL to a warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + drop table no_such_table; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlexception + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02444" SET + MESSAGE_TEXT = "RESIGNAL to a not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + drop table no_such_table; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlexception + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "44444" SET + MESSAGE_TEXT = "RESIGNAL to an error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + drop table no_such_table; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +--echo # +--echo # More complex cases +--echo # + +--disable_warnings +drop procedure if exists peter_p1 $$ +drop procedure if exists peter_p2 $$ +--enable_warnings + +CREATE PROCEDURE peter_p1 () +BEGIN + DECLARE x CONDITION FOR 1231; + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '2'; + RESIGNAL SET MYSQL_ERRNO = 9999; + END; + + BEGIN + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '1'; + RESIGNAL SET SCHEMA_NAME = 'test'; + END; + SET @@sql_mode=NULL; + END; +END +$$ + +CREATE PROCEDURE peter_p2 () +BEGIN + DECLARE x CONDITION for 9999; + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '3'; + RESIGNAL SET MESSAGE_TEXT = 'Hi, I am a useless error message'; + END; + CALL peter_p1(); +END +$$ + +# +# Here, RESIGNAL only modifies the condition caught, +# so there is only 1 condition at the end +# The final SQLSTATE is 42000 (it comes from the error 1231), +# since the condition attributes are preserved. +# +--error 9999 +CALL peter_p2() $$ +show warnings $$ + +drop procedure peter_p1 $$ +drop procedure peter_p2 $$ + +CREATE PROCEDURE peter_p1 () +BEGIN + DECLARE x CONDITION FOR SQLSTATE '42000'; + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '2'; + RESIGNAL x SET MYSQL_ERRNO = 9999; + END; + + BEGIN + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '1'; + RESIGNAL x SET + SCHEMA_NAME = 'test', + MYSQL_ERRNO= 1231; + END; + /* Raises ER_WRONG_VALUE_FOR_VAR : 1231, SQLSTATE 42000 */ + SET @@sql_mode=NULL; + END; +END +$$ + +CREATE PROCEDURE peter_p2 () +BEGIN + DECLARE x CONDITION for SQLSTATE '42000'; + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '3'; + RESIGNAL x SET + MESSAGE_TEXT = 'Hi, I am a useless error message', + MYSQL_ERRNO = 9999; + END; + CALL peter_p1(); +END +$$ + +# +# Here, "RESIGNAL " create a new condition in the diagnostics +# area, so that there are 4 conditions at the end. +# +--error 9999 +CALL peter_p2() $$ +show warnings $$ + +drop procedure peter_p1 $$ +drop procedure peter_p2 $$ + +# +# Test the value of MESSAGE_TEXT in RESIGNAL when no SET MESSAGE_TEXT clause +# is provided (the expected result is the text from the SIGNALed condition) +# + +drop procedure if exists peter_p3 $$ + +create procedure peter_p3() +begin + declare continue handler for sqlexception + resignal sqlstate '99002' set mysql_errno = 2; + + signal sqlstate '99001' set mysql_errno = 1, message_text = "Original"; +end $$ + +--error 2 +call peter_p3() $$ + +# Expecting 2 conditions, both with the text "Original" +show warnings $$ + +drop procedure peter_p3 $$ + +delimiter ;$$ + +drop table t_warn; +drop table t_cursor; + +--echo # +--echo # Miscelaneous test cases +--echo # + +delimiter $$; + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 0x12; /* 18 */ +end $$ + +-- error 18 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 0b00010010; /* 18 */ +end $$ + +-- error 18 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = '65'; /* 65 */ +end $$ + +-- error 65 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 'A'; /* illegal */ +end $$ + +-- error ER_WRONG_VALUE_FOR_VAR +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = "65"; /* 65 */ +end $$ + +-- error 65 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = "A"; /* illegal */ +end $$ + +-- error ER_WRONG_VALUE_FOR_VAR +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = `65`; /* illegal */ +end $$ + +-- error ER_BAD_FIELD_ERROR +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = `A`; /* illegal */ +end $$ + +-- error ER_BAD_FIELD_ERROR +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 3.141592; /* 3 */ +end $$ + +-- error 3 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT= 0x41; /* A */ +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT= 0b01000001; /* A */ +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT = "Hello"; +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT = 'Hello'; +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT = `Hello`; +end $$ + +-- error ER_BAD_FIELD_ERROR +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT = 65.4321; +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +-- error ER_PARSE_ERROR +create procedure test_signal() +begin + DECLARE céèçà foo CONDITION FOR SQLSTATE '12345'; + SIGNAL céèçà SET MYSQL_ERRNO = 1000; +end $$ + +-- error ER_PARSE_ERROR +create procedure test_signal() +begin + DECLARE "céèçà" CONDITION FOR SQLSTATE '12345'; + SIGNAL "céèçà" SET MYSQL_ERRNO = 1000; +end $$ + +-- error ER_PARSE_ERROR +create procedure test_signal() +begin + DECLARE 'céèçà' CONDITION FOR SQLSTATE '12345'; + SIGNAL 'céèçà' SET MYSQL_ERRNO = 1000; +end $$ + +create procedure test_signal() +begin + DECLARE `céèçà` CONDITION FOR SQLSTATE '12345'; + SIGNAL `céèçà` SET MYSQL_ERRNO = 1000; +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + SIGNAL SQLSTATE '77777' SET MYSQL_ERRNO = 1000, MESSAGE_TEXT='ÃÂÃÅÄ'; +end $$ + +# Commented until WL#751 is implemented in this version +# -- error 1000 +# call test_signal $$ +drop procedure test_signal $$ + +delimiter ; $$ + diff --git a/mysql-test/t/signal_code.test b/mysql-test/t/signal_code.test new file mode 100644 index 00000000000..d2f65647c81 --- /dev/null +++ b/mysql-test/t/signal_code.test @@ -0,0 +1,57 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# Tests for SIGNAL and RESIGNAL + +-- source include/have_debug.inc + +use test; + +--disable_warnings +drop procedure if exists signal_proc; +drop function if exists signal_func; +--enable_warnings + +delimiter $$; + +create procedure signal_proc() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + + SIGNAL foo; + SIGNAL foo SET MESSAGE_TEXT = "This is an error message"; + RESIGNAL foo; + RESIGNAL foo SET MESSAGE_TEXT = "This is an error message"; +end $$ + +create function signal_func() returns int +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + + SIGNAL foo; + SIGNAL foo SET MESSAGE_TEXT = "This is an error message"; + RESIGNAL foo; + RESIGNAL foo SET MESSAGE_TEXT = "This is an error message"; + return 0; +end $$ + +delimiter ;$$ + +show procedure code signal_proc; +drop procedure signal_proc; + +show function code signal_func; +drop function signal_func; + diff --git a/mysql-test/t/signal_demo1.test b/mysql-test/t/signal_demo1.test new file mode 100644 index 00000000000..5de847ba0ba --- /dev/null +++ b/mysql-test/t/signal_demo1.test @@ -0,0 +1,345 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# +# Demonstrate how SIGNAL can be used to enforce integrity constraints. +# + +# Naming: +# - PO: Purchase Order +# - AB: Address Book +# - IN: Inventory + +# Simplified schema: +# +# Relation 1: +# PO_ORDER (PK: po_id) 1:1 <---> 0:N (FK: po_id) PO_ORDER_LINE +# +# Relation 2: +# IN_INVENTORY (PK: item_id) 1:1 <---> 0:N (FK: item_id) PO_ORDER_LINE +# +# Relation 3: +# +--> 0:1 (PK: person_id) AB_PHYSICAL_PERSON +# PO_ORDER (FK: cust_id) 1:1 <--| +# +--> 0:1 (PK: company_id) AB_MORAL_PERSON +# This is an 'arc' relationship :) +# + + +--disable_warnings +drop database if exists demo; +--enable_warnings + +create database demo; + +use demo; + +create table ab_physical_person ( + person_id integer, + first_name VARCHAR(50), + middle_initial CHAR, + last_name VARCHAR(50), + primary key (person_id)); + +create table ab_moral_person ( + company_id integer, + name VARCHAR(100), + primary key (company_id)); + +create table in_inventory ( + item_id integer, + descr VARCHAR(50), + stock integer, + primary key (item_id)); + +create table po_order ( + po_id integer auto_increment, + cust_type char, /* arc relationship, see cust_id */ + cust_id integer, /* FK to ab_physical_person *OR* ab_moral_person */ + primary key (po_id)); + +create table po_order_line ( + po_id integer, /* FK to po_order.po_id */ + line_no integer, + item_id integer, /* FK to in_inventory.item_id */ + qty integer); + +delimiter $$; + +--echo # +--echo # Schema integrity enforcement +--echo # + +create procedure check_pk_person(in person_type char, in id integer) +begin + declare x integer; + declare msg varchar(128); + + /* + Test integrity constraints for an 'arc' relationship. + Based on 'person_type', 'id' points to either a + physical person, or a moral person. + */ + case person_type + when 'P' then + begin + select count(person_id) from ab_physical_person + where ab_physical_person.person_id = id + into x; + + if (x != 1) + then + set msg= concat('No such physical person, PK:', id); + SIGNAL SQLSTATE '45000' SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 10000; + end if; + end; + + when 'M' then + begin + select count(company_id) from ab_moral_person + where ab_moral_person.company_id = id + into x; + + if (x != 1) + then + set msg= concat('No such moral person, PK:', id); + SIGNAL SQLSTATE '45000' SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 10000; + end if; + end; + + else + begin + set msg= concat('No such person type:', person_type); + SIGNAL SQLSTATE '45000' SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 20000; + end; + end case; +end +$$ + +create procedure check_pk_inventory(in id integer) +begin + declare x integer; + declare msg varchar(128); + + select count(item_id) from in_inventory + where in_inventory.item_id = id + into x; + + if (x != 1) + then + set msg= concat('Failed integrity constraint, table in_inventory, PK:', + id); + SIGNAL SQLSTATE '45000' SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 10000; + end if; +end +$$ + +create procedure check_pk_order(in id integer) +begin + declare x integer; + declare msg varchar(128); + + select count(po_id) from po_order + where po_order.po_id = id + into x; + + if (x != 1) + then + set msg= concat('Failed integrity constraint, table po_order, PK:', id); + SIGNAL SQLSTATE '45000' SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 10000; + end if; +end +$$ + +create trigger po_order_bi before insert on po_order +for each row +begin + call check_pk_person(NEW.cust_type, NEW.cust_id); +end +$$ + +create trigger po_order_bu before update on po_order +for each row +begin + call check_pk_person(NEW.cust_type, NEW.cust_id); +end +$$ + +create trigger po_order_line_bi before insert on po_order_line +for each row +begin + call check_pk_order(NEW.po_id); + call check_pk_inventory(NEW.item_id); +end +$$ + +create trigger po_order_line_bu before update on po_order_line +for each row +begin + call check_pk_order(NEW.po_id); + call check_pk_inventory(NEW.item_id); +end +$$ + +--echo # +--echo # Application helpers +--echo # + +create procedure po_create_order( + in p_cust_type char, + in p_cust_id integer, + out id integer) +begin + insert into po_order set cust_type = p_cust_type, cust_id = p_cust_id; + set id = last_insert_id(); +end +$$ + +create procedure po_add_order_line( + in po integer, + in line integer, + in item integer, + in q integer) +begin + insert into po_order_line set + po_id = po, line_no = line, item_id = item, qty = q; +end +$$ + +delimiter ;$$ + +--echo # +--echo # Create sample data +--echo # + +insert into ab_physical_person values + ( 1, "John", "A", "Doe"), + ( 2, "Marry", "B", "Smith") +; + +insert into ab_moral_person values + ( 3, "ACME real estate, INC"), + ( 4, "Local school") +; + +insert into in_inventory values + ( 100, "Table, dinner", 5), + ( 101, "Chair", 20), + ( 200, "Table, coffee", 3), + ( 300, "School table", 25), + ( 301, "School chairs", 50) +; + +select * from ab_physical_person order by person_id; +select * from ab_moral_person order by company_id; +select * from in_inventory order by item_id; + +--echo # +--echo # Entering an order +--echo # + +set @my_po = 0; + +/* John Doe wants 1 table and 4 chairs */ +call po_create_order("P", 1, @my_po); + +call po_add_order_line (@my_po, 1, 100, 1); +call po_add_order_line (@my_po, 2, 101, 4); + +/* Marry Smith wants a coffee table */ +call po_create_order("P", 2, @my_po); + +call po_add_order_line (@my_po, 1, 200, 1); + +--echo # +--echo # Entering bad data in an order +--echo # + +# There is no item 999 in in_inventory +--error 10000 +call po_add_order_line (@my_po, 1, 999, 1); + +--echo # +--echo # Entering bad data in an unknown order +--echo # + +# There is no order 99 in po_order +--error 10000 +call po_add_order_line (99, 1, 100, 1); + +--echo # +--echo # Entering an order for an unknown company +--echo # + +# There is no moral person of id 7 +--error 10000 +call po_create_order("M", 7, @my_po); + +--echo # +--echo # Entering an order for an unknown person type +--echo # + +# There is no person of type X +--error 20000 +call po_create_order("X", 1, @my_po); + +/* The local school wants 10 class tables and 20 chairs */ +call po_create_order("M", 4, @my_po); + +call po_add_order_line (@my_po, 1, 300, 10); +call po_add_order_line (@my_po, 2, 301, 20); + +# Raw data +select * from po_order; +select * from po_order_line; + +# Creative reporting ... + +select po_id as "PO#", + ( case cust_type + when "P" then concat (pp.first_name, + " ", + pp.middle_initial, + " ", + pp.last_name) + when "M" then mp.name + end ) as "Sold to" + from po_order po + left join ab_physical_person pp on po.cust_id = pp.person_id + left join ab_moral_person mp on po.cust_id = company_id +; + +select po_id as "PO#", + ol.line_no as "Line", + ol.item_id as "Item", + inv.descr as "Description", + ol.qty as "Quantity" + from po_order_line ol, in_inventory inv + where inv.item_id = ol.item_id + order by ol.item_id, ol.line_no; + +drop database demo; + + diff --git a/mysql-test/t/signal_demo2.test b/mysql-test/t/signal_demo2.test new file mode 100644 index 00000000000..fc909cb926c --- /dev/null +++ b/mysql-test/t/signal_demo2.test @@ -0,0 +1,207 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# +# Demonstrate how RESIGNAL can be used to 'catch' and 're-throw' an error +# + +--disable_warnings +drop database if exists demo; +--enable_warnings + +create database demo; + +use demo; + +delimiter $$; + +create procedure proc_top_a(p1 integer) +begin + ## DECLARE CONTINUE HANDLER for SQLEXCEPTION, NOT FOUND + begin + end; + + select "Starting ..."; + call proc_middle_a(p1); + select "The end"; +end +$$ + +create procedure proc_middle_a(p1 integer) +begin + DECLARE l integer; + # without RESIGNAL: + # Should be: DECLARE EXIT HANDLER for SQLEXCEPTION, NOT FOUND + DECLARE EXIT HANDLER for 1 /* not sure how to handle exceptions */ + begin + select "Oops ... now what ?"; + end; + + select "In prod_middle()"; + + create temporary table t1(a integer, b integer); + select GET_LOCK("user_mutex", 10) into l; + + insert into t1 set a = p1, b = p1; + + call proc_bottom_a(p1); + + select RELEASE_LOCK("user_mutex") into l; + drop temporary table t1; +end +$$ + +create procedure proc_bottom_a(p1 integer) +begin + select "In proc_bottom()"; + + if (p1 = 1) then + begin + select "Doing something that works ..."; + select * from t1; + end; + end if; + + if (p1 = 2) then + begin + select "Doing something that fail (simulate an error) ..."; + drop table no_such_table; + end; + end if; + + if (p1 = 3) then + begin + select "Doing something that *SHOULD* works ..."; + select * from t1; + end; + end if; + +end +$$ + +delimiter ;$$ + +# +# Code without RESIGNAL: +# errors are apparent to the caller, +# but there is no cleanup code, +# so that the environment (get_lock(), temporary table) is polluted ... +# +call proc_top_a(1); + +# Expected +--error ER_BAD_TABLE_ERROR +call proc_top_a(2); + +# Dirty state +--error ER_TABLE_EXISTS_ERROR +call proc_top_a(3); + +# Dirty state +--error ER_TABLE_EXISTS_ERROR +call proc_top_a(1); + +drop temporary table if exists t1; + +delimiter $$; + +create procedure proc_top_b(p1 integer) +begin + select "Starting ..."; + call proc_middle_b(p1); + select "The end"; +end +$$ + +create procedure proc_middle_b(p1 integer) +begin + DECLARE l integer; + DECLARE EXIT HANDLER for SQLEXCEPTION, NOT FOUND + begin + begin + DECLARE CONTINUE HANDLER for SQLEXCEPTION, NOT FOUND + begin + /* Ignore errors from the cleanup code */ + end; + + select "Doing cleanup !"; + select RELEASE_LOCK("user_mutex") into l; + drop temporary table t1; + end; + + RESIGNAL; + end; + + select "In prod_middle()"; + + create temporary table t1(a integer, b integer); + select GET_LOCK("user_mutex", 10) into l; + + insert into t1 set a = p1, b = p1; + + call proc_bottom_b(p1); + + select RELEASE_LOCK("user_mutex") into l; + drop temporary table t1; +end +$$ + +create procedure proc_bottom_b(p1 integer) +begin + select "In proc_bottom()"; + + if (p1 = 1) then + begin + select "Doing something that works ..."; + select * from t1; + end; + end if; + + if (p1 = 2) then + begin + select "Doing something that fail (simulate an error) ..."; + drop table no_such_table; + end; + end if; + + if (p1 = 3) then + begin + select "Doing something that *SHOULD* works ..."; + select * from t1; + end; + end if; + +end +$$ + +delimiter ;$$ + +# +# Code with RESIGNAL: +# errors are apparent to the caller, +# the but cleanup code did get a chance to act ... +# + +call proc_top_b(1); + +--error ER_BAD_TABLE_ERROR +call proc_top_b(2); + +call proc_top_b(3); + +call proc_top_b(1); + +drop database demo; + diff --git a/mysql-test/t/signal_demo3.test b/mysql-test/t/signal_demo3.test new file mode 100644 index 00000000000..347f1b75a79 --- /dev/null +++ b/mysql-test/t/signal_demo3.test @@ -0,0 +1,159 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# +# Demonstrate how RESIGNAL can be used to print a stack trace +# + +# Save defaults + +SET @start_global_value = @@global.max_error_count; +SELECT @start_global_value; +SET @start_session_value = @@session.max_error_count; +SELECT @start_session_value; + +--disable_warnings +drop database if exists demo; +--enable_warnings + +create database demo; + +use demo; + +delimiter $$; + +create procedure proc_1() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_1'; + + call proc_2(); +end +$$ + +create procedure proc_2() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_2'; + + call proc_3(); +end +$$ + +create procedure proc_3() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_3'; + + call proc_4(); +end +$$ + +create procedure proc_4() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_4'; + + call proc_5(); +end +$$ + +create procedure proc_5() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_5'; + + call proc_6(); +end +$$ + +create procedure proc_6() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_6'; + + call proc_7(); +end +$$ + +create procedure proc_7() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_7'; + + call proc_8(); +end +$$ + +create procedure proc_8() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_8'; + + call proc_9(); +end +$$ + +create procedure proc_9() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_9'; + + ## Do something that fails, to see how errors are reported + drop table oops_it_is_not_here; +end +$$ + +delimiter ;$$ + +-- error ER_SIGNAL_EXCEPTION +call proc_1(); + +# This is the interesting part: +# the complete call stack from the origin of failure (proc_9) +# to the top level caller (proc_1) is available ... + +show warnings; + +SET @@session.max_error_count = 5; +SELECT @@session.max_error_count; + +-- error ER_SIGNAL_EXCEPTION +call proc_1(); +show warnings; + +SET @@session.max_error_count = 7; +SELECT @@session.max_error_count; + +-- error ER_SIGNAL_EXCEPTION +call proc_1(); +show warnings; + +SET @@session.max_error_count = 9; +SELECT @@session.max_error_count; + +-- error ER_SIGNAL_EXCEPTION +call proc_1(); +show warnings; + +drop database demo; + +# Restore defaults + +SET @@global.max_error_count = @start_global_value; +SELECT @@global.max_error_count; +SET @@session.max_error_count = @start_session_value; +SELECT @@session.max_error_count; + diff --git a/mysql-test/t/signal_sqlmode.test b/mysql-test/t/signal_sqlmode.test new file mode 100644 index 00000000000..860c145a361 --- /dev/null +++ b/mysql-test/t/signal_sqlmode.test @@ -0,0 +1,123 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# Tests for SIGNAL, RESIGNAL and GET DIAGNOSTICS + +SET @save_sql_mode=@@sql_mode; + +SET sql_mode=''; + +--disable_warnings +drop procedure if exists p; +drop procedure if exists p2; +drop procedure if exists p3; +--enable_warnings + +delimiter $$; + +create procedure p() +begin + declare utf8_var VARCHAR(128) CHARACTER SET UTF8; + set utf8_var = concat(repeat('A', 128), 'X'); + select length(utf8_var), utf8_var; +end +$$ + +create procedure p2() +begin + declare msg VARCHAR(129) CHARACTER SET UTF8; + set msg = concat(repeat('A', 128), 'X'); + select length(msg), msg; + + signal sqlstate '55555' set message_text = msg; +end +$$ + +create procedure p3() +begin + declare name VARCHAR(65) CHARACTER SET UTF8; + set name = concat(repeat('A', 64), 'X'); + select length(name), name; + + signal sqlstate '55555' set + message_text = 'Message', + table_name = name; +end +$$ +delimiter ;$$ + +call p; + +--error ER_SIGNAL_EXCEPTION +call p2; + +--error ER_SIGNAL_EXCEPTION +call p3; + +drop procedure p; +drop procedure p2; +drop procedure p3; + +SET sql_mode='STRICT_ALL_TABLES'; + +delimiter $$; + +create procedure p() +begin + declare utf8_var VARCHAR(128) CHARACTER SET UTF8; + set utf8_var = concat(repeat('A', 128), 'X'); + select length(utf8_var), utf8_var; +end +$$ + +create procedure p2() +begin + declare msg VARCHAR(129) CHARACTER SET UTF8; + set msg = concat(repeat('A', 128), 'X'); + select length(msg), msg; + + signal sqlstate '55555' set message_text = msg; +end +$$ + +create procedure p3() +begin + declare name VARCHAR(65) CHARACTER SET UTF8; + set name = concat(repeat('A', 64), 'X'); + select length(name), name; + + signal sqlstate '55555' set + message_text = 'Message', + table_name = name; +end +$$ + +delimiter ;$$ + +--error ER_DATA_TOO_LONG +call p; + +--error ER_COND_ITEM_TOO_LONG +call p2; + +--error ER_COND_ITEM_TOO_LONG +call p3; + +drop procedure p; +drop procedure p2; +drop procedure p3; + +SET @@sql_mode=@save_sql_mode; + -- cgit v1.2.1 From f662d397c826b21851d7f43df34730f686e1b413 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Fri, 11 Sep 2009 01:15:41 -0600 Subject: Post merge fixes --- mysql-test/r/func_encrypt_nossl.result | 42 +++++----- mysql-test/suite/funcs_1/r/innodb_func_view.result | 92 +++++++++++----------- .../suite/funcs_1/r/innodb_storedproc_02.result | 3 - mysql-test/suite/funcs_1/r/memory_func_view.result | 92 +++++++++++----------- .../suite/funcs_1/r/memory_storedproc_02.result | 3 - mysql-test/suite/funcs_1/r/myisam_func_view.result | 92 +++++++++++----------- .../suite/funcs_1/r/myisam_storedproc_02.result | 3 - mysql-test/suite/funcs_1/r/ndb_func_view.result | 92 +++++++++++----------- .../suite/funcs_1/r/ndb_storedproc_02.result | 3 - mysql-test/suite/funcs_1/r/storedproc.result | 73 +---------------- mysql-test/suite/ndb/r/ndb_multi_row.result | 6 +- 11 files changed, 210 insertions(+), 291 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/func_encrypt_nossl.result b/mysql-test/r/func_encrypt_nossl.result index d0df2335afa..fc003eec226 100644 --- a/mysql-test/r/func_encrypt_nossl.result +++ b/mysql-test/r/func_encrypt_nossl.result @@ -2,83 +2,83 @@ select des_encrypt("test", 'akeystr'); des_encrypt("test", 'akeystr') NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_encrypt("test", 1); des_encrypt("test", 1) NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_encrypt("test", 9); des_encrypt("test", 9) NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_encrypt("test", 100); des_encrypt("test", 100) NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_encrypt("test", NULL); des_encrypt("test", NULL) NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_encrypt(NULL, NULL); des_encrypt(NULL, NULL) NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt("test", 'anotherkeystr'); des_decrypt("test", 'anotherkeystr') NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(1, 1); des_decrypt(1, 1) NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(des_encrypt("test", 'thekey')); des_decrypt(des_encrypt("test", 'thekey')) NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello")); hex(des_encrypt("hello")) des_decrypt(des_encrypt("hello")) NULL NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(des_encrypt("hello",4)); des_decrypt(des_encrypt("hello",4)) NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(des_encrypt("hello",'test'),'test'); des_decrypt(des_encrypt("hello",'test'),'test') NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password')); hex(des_encrypt("hello")) hex(des_encrypt("hello",5)) hex(des_encrypt("hello",'default_password')) NULL NULL NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(des_encrypt("hello"),'default_password'); des_decrypt(des_encrypt("hello"),'default_password') NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(des_encrypt("hello",4),'password4'); des_decrypt(des_encrypt("hello",4),'password4') NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working SET @a=des_decrypt(des_encrypt("hello")); Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working flush des_key_file; select @a = des_decrypt(des_encrypt("hello")); @a = des_decrypt(des_encrypt("hello")) @@ -90,9 +90,9 @@ select hex(des_decrypt(des_encrypt("hello",4),'password2')); hex(des_decrypt(des_encrypt("hello",4),'password2')) NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select hex(des_decrypt(des_encrypt("hello","hidden"))); hex(des_decrypt(des_encrypt("hello","hidden"))) NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index 4beb0c8aaf2..172f410b949 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -945,8 +945,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -960,8 +960,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2587,9 +2587,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2603,9 +2603,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2955,8 +2955,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2970,8 +2970,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -3282,10 +3282,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 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 cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3300,10 +3300,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3372,9 +3372,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 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 cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3389,9 +3389,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3408,11 +3408,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3430,11 +3430,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3454,9 +3454,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 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 cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3471,9 +3471,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3490,11 +3490,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3510,11 +3510,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result index 65fc5b5afc9..3e2d084aa0c 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result @@ -550,9 +550,6 @@ exit handler 2 exit handler 2 exit handler 1 exit handler 1 -Warnings: -Note 1051 Unknown table 'tqq' -Note 1051 Unknown table 'tqq' create table res_t1(w char unique, x char); insert into res_t1 values ('a', 'b'); CREATE PROCEDURE h1 () diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result index 4e48d9412d1..a386272b8ab 100644 --- a/mysql-test/suite/funcs_1/r/memory_func_view.result +++ b/mysql-test/suite/funcs_1/r/memory_func_view.result @@ -946,8 +946,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -961,8 +961,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2588,9 +2588,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2604,9 +2604,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2956,8 +2956,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2971,8 +2971,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -3283,10 +3283,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 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 cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3301,10 +3301,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3373,9 +3373,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 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 cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3390,9 +3390,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3409,11 +3409,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3431,11 +3431,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3455,9 +3455,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 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 cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3472,9 +3472,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3491,11 +3491,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3511,11 +3511,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result index 6b474621685..16dde71400e 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result @@ -551,9 +551,6 @@ exit handler 2 exit handler 2 exit handler 1 exit handler 1 -Warnings: -Note 1051 Unknown table 'tqq' -Note 1051 Unknown table 'tqq' create table res_t1(w char unique, x char); insert into res_t1 values ('a', 'b'); CREATE PROCEDURE h1 () diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result index 4e48d9412d1..a386272b8ab 100644 --- a/mysql-test/suite/funcs_1/r/myisam_func_view.result +++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result @@ -946,8 +946,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -961,8 +961,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2588,9 +2588,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2604,9 +2604,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2956,8 +2956,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2971,8 +2971,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -3283,10 +3283,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 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 cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3301,10 +3301,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3373,9 +3373,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 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 cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3390,9 +3390,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3409,11 +3409,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3431,11 +3431,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3455,9 +3455,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 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 cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3472,9 +3472,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3491,11 +3491,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3511,11 +3511,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result index 6b474621685..16dde71400e 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result @@ -551,9 +551,6 @@ exit handler 2 exit handler 2 exit handler 1 exit handler 1 -Warnings: -Note 1051 Unknown table 'tqq' -Note 1051 Unknown table 'tqq' create table res_t1(w char unique, x char); insert into res_t1 values ('a', 'b'); CREATE PROCEDURE h1 () diff --git a/mysql-test/suite/funcs_1/r/ndb_func_view.result b/mysql-test/suite/funcs_1/r/ndb_func_view.result index 4beb0c8aaf2..172f410b949 100644 --- a/mysql-test/suite/funcs_1/r/ndb_func_view.result +++ b/mysql-test/suite/funcs_1/r/ndb_func_view.result @@ -945,8 +945,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -960,8 +960,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2587,9 +2587,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2603,9 +2603,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2955,8 +2955,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' 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 cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2970,8 +2970,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -3282,10 +3282,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 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 cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3300,10 +3300,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3372,9 +3372,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 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 cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3389,9 +3389,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3408,11 +3408,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3430,11 +3430,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3454,9 +3454,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 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 cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3471,9 +3471,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3490,11 +3490,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3510,11 +3510,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result index 65fc5b5afc9..3e2d084aa0c 100644 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result @@ -550,9 +550,6 @@ exit handler 2 exit handler 2 exit handler 1 exit handler 1 -Warnings: -Note 1051 Unknown table 'tqq' -Note 1051 Unknown table 'tqq' create table res_t1(w char unique, x char); insert into res_t1 values ('a', 'b'); CREATE PROCEDURE h1 () diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result index 3efb361dc82..ab917fce339 100644 --- a/mysql-test/suite/funcs_1/r/storedproc.result +++ b/mysql-test/suite/funcs_1/r/storedproc.result @@ -7128,8 +7128,6 @@ CALL sp1(); x y z 000 000 000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7168,8 +7166,6 @@ CALL sp1(); x y z 00000 00000 00000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7208,8 +7204,6 @@ CALL sp1(); x y z 00000000 00000000 00000000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7248,8 +7242,6 @@ CALL sp1(); x y z 0000000000 0000000000 0000000000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7288,8 +7280,6 @@ CALL sp1(); x y z 00000000000000000000 00000000000000000000 00000000000000000000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7310,8 +7300,6 @@ CALL sp1(); x y z -9999999999 -9999999999 -9999999999 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7323,8 +7311,6 @@ CALL sp1(); x y z 0 0 0 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7336,8 +7322,6 @@ CALL sp1(); x y z 0000000000 0000000000 0000000000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7349,8 +7333,6 @@ CALL sp1(); x y z 0000000000 0000000000 0000000000 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7362,8 +7344,6 @@ CALL sp1(); x y z 0 0 0 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7375,8 +7355,6 @@ CALL sp1(); x y z 0 0 0 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7388,8 +7366,6 @@ CALL sp1(); x y z 0000000000 0000000000 0000000000 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7401,8 +7377,6 @@ CALL sp1(); x y z 0000000000 0000000000 0000000000 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -13782,9 +13756,6 @@ END// CALL sp1(); x y @x NULL a 3 -Warnings: -Warning 1265 Data truncated for column 'y' at row 3 -Warning 1265 Data truncated for column 'y' at row 1 SELECT @v1, @v2; @v1 @v2 4 a @@ -15465,14 +15436,6 @@ count done 10 1 Warnings: Warning 1265 Data truncated for column 'name' at row 1 -Warning 1265 Data truncated for column 'name' at row 2 -Warning 1265 Data truncated for column 'name' at row 3 -Warning 1265 Data truncated for column 'name' at row 4 -Warning 1265 Data truncated for column 'name' at row 5 -Warning 1265 Data truncated for column 'name' at row 6 -Warning 1265 Data truncated for column 'name' at row 7 -Warning 1265 Data truncated for column 'name' at row 8 -Warning 1265 Data truncated for column 'name' at row 9 DROP PROCEDURE sp3; drop table res_t3_itisalongname_1381742_itsaverylongname_1381742; @@ -16387,7 +16350,6 @@ fn7(99999999999) 9999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn8; CREATE FUNCTION fn8( f1 decimal (0) unsigned zerofill) returns decimal (0) unsigned zerofill @@ -16432,7 +16394,6 @@ fn11(99999999999) 9999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn12; CREATE FUNCTION fn12( f1 decimal (0, 0) unsigned zerofill) returns decimal (0, 0) unsigned zerofill @@ -16533,7 +16494,6 @@ SELECT fn21_d_z(1.00e+00); fn21_d_z(1.00e+00) 0000000000000000000000000000000000000000000000000000000000000010 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn22; CREATE FUNCTION fn22( f1 decimal unsigned) returns decimal unsigned @@ -16545,7 +16505,6 @@ SELECT fn22(1.00e+00); fn22(1.00e+00) 10 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn23; CREATE FUNCTION fn23( f1 decimal unsigned zerofill) returns decimal unsigned zerofill @@ -16557,7 +16516,6 @@ SELECT fn23(1.00e+00); fn23(1.00e+00) 0000000010 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn24; CREATE FUNCTION fn24( f1 decimal zerofill) returns decimal zerofill @@ -16903,7 +16861,6 @@ fn56(-8388601) Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn57; CREATE FUNCTION fn57( f1 numeric) returns numeric BEGIN @@ -16936,7 +16893,6 @@ SELECT fn59(9999999999); fn59(9999999999) 9999999999 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn60; CREATE FUNCTION fn60( f1 numeric (0) unsigned zerofill) returns numeric (0) unsigned zerofill @@ -16982,7 +16938,6 @@ SELECT fn63(9999999999); fn63(9999999999) 9999999999 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn64; CREATE FUNCTION fn64( f1 numeric (0, 0) unsigned zerofill) returns numeric (0, 0) unsigned zerofill @@ -17018,8 +16973,6 @@ fn66(-1e+36) -999999999999999999999999999999989.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn67; CREATE FUNCTION fn67( f1 numeric (63, 30) unsigned) returns numeric (63, 30) unsigned @@ -17032,7 +16985,6 @@ fn67(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn68; CREATE FUNCTION fn68( f1 numeric (63, 30) unsigned zerofill) returns numeric (63, 30) unsigned zerofill @@ -17045,7 +16997,6 @@ fn68(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn69; CREATE FUNCTION fn69( f1 numeric (63, 30) zerofill) returns numeric (63, 30) zerofill @@ -17213,7 +17164,6 @@ fn84(-32601) Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn85; CREATE FUNCTION fn85( f1 tinyint) returns tinyint BEGIN @@ -17253,7 +17203,6 @@ fn88(-101) Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn89; CREATE FUNCTION fn89( f1 enum('1enum', '2enum')) returns enum('1enum', '2enum') BEGIN @@ -17511,7 +17460,6 @@ f1 9999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp8; CREATE PROCEDURE sp8( f1 decimal (0) unsigned zerofill) @@ -17556,7 +17504,6 @@ f1 9999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp12; CREATE PROCEDURE sp12( f1 decimal (0, 0) unsigned zerofill) @@ -17678,7 +17625,6 @@ CALL sp21(1.00e+00); f1 0000000000000000000000000000000000000000000000000000000000000010 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp22; CREATE PROCEDURE sp22( f1 decimal unsigned) @@ -17690,7 +17636,6 @@ CALL sp22(1.00e+00); f1 10 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp23; CREATE PROCEDURE sp23( f1 decimal unsigned zerofill) @@ -17702,7 +17647,6 @@ CALL sp23(1.00e+00); f1 0000000010 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp24; CREATE PROCEDURE sp24( f1 decimal zerofill) @@ -18048,7 +17992,6 @@ f1 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp57; CREATE PROCEDURE sp57( f1 numeric) BEGIN @@ -18081,7 +18024,6 @@ CALL sp59(9999999999); f1 9999999999 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp60; CREATE PROCEDURE sp60( f1 numeric (0) unsigned zerofill) @@ -18127,7 +18069,6 @@ CALL sp63(9999999999); f1 9999999999 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp64; CREATE PROCEDURE sp64( f1 numeric (0, 0) unsigned zerofill) @@ -18163,16 +18104,12 @@ f1 -999999999999999999999999999999989.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 CALL sp66_n( -1000000000000000000000000000000000000 ); f1 -999999999999999999999999999999989.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp67_nu; CREATE PROCEDURE sp67_nu( f1 numeric (63, 30) unsigned) @@ -18185,14 +18122,12 @@ f1 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 CALL sp67_nu( 1000000000000000000000000000000000000 ); f1 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp68_nuz; CREATE PROCEDURE sp68_nuz( f1 numeric (63, 30) unsigned zerofill) @@ -18205,14 +18140,12 @@ f1 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 CALL sp68_nuz( 1000000000000000000000000000000000000 ); f1 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp69_n_z; CREATE PROCEDURE sp69_n_z( f1 numeric (63, 30) zerofill) @@ -18395,7 +18328,6 @@ f1 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp85; CREATE PROCEDURE sp85( f1 tinyint) BEGIN @@ -18435,7 +18367,6 @@ f1 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp89; CREATE PROCEDURE sp89( f1 enum('1enum', '2enum')) BEGIN @@ -22263,9 +22194,9 @@ END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode=''; CALL sp4(); Level Code Message -Error 1365 Division by 0 +Warning 1365 Division by 0 Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 DROP PROCEDURE sp4; set @@sql_mode=''; diff --git a/mysql-test/suite/ndb/r/ndb_multi_row.result b/mysql-test/suite/ndb/r/ndb_multi_row.result index 3d34b16a1a8..96986490d23 100644 --- a/mysql-test/suite/ndb/r/ndb_multi_row.result +++ b/mysql-test/suite/ndb/r/ndb_multi_row.result @@ -63,6 +63,6 @@ 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 +Warning 155 Table 'test.t1' doesn't exist +Warning 155 Table 'test.t3' doesn't exist +Warning 155 Table 'test.t4' doesn't exist -- cgit v1.2.1 From 4e92af9f43c29dac960cbba9ce946a35b02b4960 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 11 Sep 2009 22:26:35 +0200 Subject: This is the downport of Bug#24509 - 2048 file descriptor limit on windows needs increasing, also WL#3049 - improved Windows I/O The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open file is stored in the my_file_info struct, along with a flag for append mode because the Windows API does not support opening files in append mode in all cases) The default max open files has been increased to 16384 and can be increased further by setting --max-open-files= during the server start. Another major change in this patch that almost all Windows specific file IO code has been moved to a new file my_winfile.c, greatly reducing the amount of code in #ifdef blocks within mysys, thus improving readability. Minor enhancements: - my_(f)stat() is changed to use __stati64 structure with 64 file size and timestamps. It will return correct file size now (C runtime implementation used to report outdated information) - my_lock on Windows is prepared to handle additional timeout parameter - after review : changed __WIN__ to _WIN32 in the new and changed code. --- .../suite/large_tests/r/lock_tables_big.result | 1 + .../suite/large_tests/t/lock_tables_big.test | 32 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 mysql-test/suite/large_tests/r/lock_tables_big.result create mode 100644 mysql-test/suite/large_tests/t/lock_tables_big.test (limited to 'mysql-test') diff --git a/mysql-test/suite/large_tests/r/lock_tables_big.result b/mysql-test/suite/large_tests/r/lock_tables_big.result new file mode 100644 index 00000000000..de639143055 --- /dev/null +++ b/mysql-test/suite/large_tests/r/lock_tables_big.result @@ -0,0 +1 @@ +all done diff --git a/mysql-test/suite/large_tests/t/lock_tables_big.test b/mysql-test/suite/large_tests/t/lock_tables_big.test new file mode 100644 index 00000000000..41dcff3577c --- /dev/null +++ b/mysql-test/suite/large_tests/t/lock_tables_big.test @@ -0,0 +1,32 @@ +# +# Bug#24509 cannot use more than 2048 file descriptors on windows +# +--disable_query_log +create database many_tables; +use many_tables; +let $max_tables=3000; +let $i=$max_tables; + +--disable_warnings +create table t (i int); +let $table_list=t READ; + +while ($i) +{ + eval create table t$i (i int); + let $table_list= $table_list ,t$i READ; + dec $i; +} + +#lock all tables we just created (resembles mysqldump startup is doing with --all-databases operation) +#There will be 3 descriptors for each table (table.FRM, table.MYI and table.MYD files) means 9000 files +#descriptors altogether. For Microsoft C runtime, this is way too many. + +eval LOCK TABLES $table_list; +unlock tables; + +drop database many_tables; +--disable_query_log +--echo all done + + -- cgit v1.2.1 From 12627d40725a5513a365f31164f89a518f249b65 Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Tue, 15 Sep 2009 17:07:52 +0200 Subject: WL#3352, Introducing Column list partitioning, makes it possible to partition on most data types, makes it possible to prune on multi-field partitioning --- mysql-test/r/partition_mgm_err.result | 2 +- mysql-test/r/partition_range.result | 94 +++++++++ mysql-test/suite/parts/inc/partition_key_32col.inc | 2 +- mysql-test/t/partition_column.test | 209 +++++++++++++++++++++ mysql-test/t/partition_column_prune.test | 71 +++++++ mysql-test/t/partition_error.test | 6 +- mysql-test/t/partition_mgm_err.test | 2 +- mysql-test/t/partition_range.test | 76 ++++++++ mysql-test/t/type_decimal.test | 10 +- 9 files changed, 461 insertions(+), 11 deletions(-) create mode 100644 mysql-test/t/partition_column.test create mode 100644 mysql-test/t/partition_column_prune.test (limited to 'mysql-test') diff --git a/mysql-test/r/partition_mgm_err.result b/mysql-test/r/partition_mgm_err.result index f8403988f47..a13278d724e 100644 --- a/mysql-test/r/partition_mgm_err.result +++ b/mysql-test/r/partition_mgm_err.result @@ -41,7 +41,7 @@ ERROR HY000: Reorganize of range partitions cannot change total ranges except fo ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO (PARTITION x01 VALUES LESS THAN (4), PARTITION x11 VALUES LESS THAN (2)); -ERROR HY000: Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range +ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO (PARTITION x01 VALUES LESS THAN (6), PARTITION x11 VALUES LESS THAN (4)); diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result index e8fc55b759b..fc15665d698 100644 --- a/mysql-test/r/partition_range.result +++ b/mysql-test/r/partition_range.result @@ -1,6 +1,100 @@ drop table if exists t1, t2; create table t1 (a int) partition by range (a) +( partition p0 values less than (NULL), +partition p1 values less than (MAXVALUE)); +ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), +partition p1 values less than (MAXVALUE))' at line 3 +create table t1 (a datetime not null) +partition by range (TO_SECONDS(a)) +( partition p0 VALUES LESS THAN (TO_SECONDS('2007-03-08 00:00:00')), +partition p1 VALUES LESS THAN (TO_SECONDS('2007-04-01 00:00:00'))); +INSERT INTO t1 VALUES ('2007-03-01 12:00:00'), ('2007-03-07 12:00:00'); +INSERT INTO t1 VALUES ('2007-03-08 12:00:00'), ('2007-03-15 12:00:00'); +explain partitions select * from t1 where a < '2007-03-08 00:00:00'; +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 t1 where a < '2007-03-08 00:00:01'; +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 t1 where a <= '2007-03-08 00:00:00'; +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 t1 where a <= '2007-03-07 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where +explain partitions select * from t1 where a < '2007-03-07 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where +drop table t1; +create table t1 (a date) +partition by range(to_seconds(a)) +(partition p0 values less than (to_seconds('2004-01-01')), +partition p1 values less than (to_seconds('2005-01-01'))); +insert into t1 values ('2003-12-30'),('2004-12-31'); +select * from t1; +a +2003-12-30 +2004-12-31 +explain partitions select * from t1 where a <= '2003-12-31'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 system NULL NULL NULL NULL 1 +select * from t1 where a <= '2003-12-31'; +a +2003-12-30 +explain partitions select * from t1 where a <= '2005-01-01'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 2 Using where +select * from t1 where a <= '2005-01-01'; +a +2003-12-30 +2004-12-31 +drop table t1; +create table t1 (a datetime) +partition by range(to_seconds(a)) +(partition p0 values less than (to_seconds('2004-01-01 12:00:00')), +partition p1 values less than (to_seconds('2005-01-01 12:00:00'))); +insert into t1 values ('2004-01-01 11:59:29'),('2005-01-01 11:59:59'); +select * from t1; +a +2004-01-01 11:59:29 +2005-01-01 11:59:59 +explain partitions select * from t1 where a <= '2004-01-01 11:59.59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 system NULL NULL NULL NULL 1 +select * from t1 where a <= '2004-01-01 11:59:59'; +a +2004-01-01 11:59:29 +explain partitions select * from t1 where a <= '2005-01-01'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 2 Using where +select * from t1 where a <= '2005-01-01'; +a +2004-01-01 11:59:29 +drop table t1; +create table t1 (a int, b char(20)) +partition by range column_list(a,b) +(partition p0 values less than (1)); +ERROR 42000: Inconsistency in usage of column lists for partitioning near '))' at line 3 +create table t1 (a int, b char(20)) +partition by range(a) +(partition p0 values less than (column_list(1,"b"))); +ERROR HY000: Inconsistency in usage of column lists for partitioning +create table t1 (a int, b char(20)) +partition by range(a) +(partition p0 values less than (column_list(1,"b"))); +ERROR HY000: Inconsistency in usage of column lists for partitioning +create table t1 (a int, b char(20)); +create global index inx on t1 (a,b) +partition by range (a) +(partition p0 values less than (1)); +drop table t1; +create table t1 (a int, b char(20)) +partition by range column_list(b) +(partition p0 values less than (column_list("b"))); +drop table t1; +create table t1 (a int) +partition by range (a) ( partition p0 values less than (maxvalue)); alter table t1 add partition (partition p1 values less than (100000)); ERROR HY000: MAXVALUE can only be used in last partition definition diff --git a/mysql-test/suite/parts/inc/partition_key_32col.inc b/mysql-test/suite/parts/inc/partition_key_32col.inc index 74016d9b556..b0635ca0e9c 100644 --- a/mysql-test/suite/parts/inc/partition_key_32col.inc +++ b/mysql-test/suite/parts/inc/partition_key_32col.inc @@ -1,4 +1,4 @@ ---error ER_TOO_MANY_KEY_PARTS +--error ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine=$engine partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) ( partition pa1 max_rows=20 min_rows=2, diff --git a/mysql-test/t/partition_column.test b/mysql-test/t/partition_column.test new file mode 100644 index 00000000000..b1f5f4abfcf --- /dev/null +++ b/mysql-test/t/partition_column.test @@ -0,0 +1,209 @@ +# +# Tests for the new column list partitioning introduced in second +# version for partitioning. +# +--source include/have_partition.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +create table t1 (a int, b char(10), c varchar(25), d datetime) +partition by range column_list(a,b,c,d) +subpartition by hash (to_seconds(d)) +subpartitions 4 +( partition p0 values less than (column_list(1, NULL, MAXVALUE, NULL)), + partition p1 values less than (column_list(1, 'a', MAXVALUE, TO_DAYS('1999-01-01'))), + partition p2 values less than (column_list(1, 'a', MAXVALUE, MAXVALUE)), + partition p3 values less than (column_list(1, MAXVALUE, MAXVALUE, MAXVALUE))); +drop table t1; + +create table t1 (a int, b char(10), c varchar(5), d int) +partition by range column_list(a,b,c) +subpartition by key (c,d) +subpartitions 3 +( partition p0 values less than (column_list(1,'abc','abc')), + partition p1 values less than (column_list(2,'abc','abc')), + partition p2 values less than (column_list(3,'abc','abc')), + partition p3 values less than (column_list(4,'abc','abc'))); + +insert into t1 values (1,'a','b',1),(2,'a','b',2),(3,'a','b',3); +insert into t1 values (1,'b','c',1),(2,'b','c',2),(3,'b','c',3); +insert into t1 values (1,'c','d',1),(2,'c','d',2),(3,'c','d',3); +insert into t1 values (1,'d','e',1),(2,'d','e',2),(3,'d','e',3); +select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) OR + (a = 1 AND b >= 'a' AND (c = 'c' OR (c = 'd' AND d = 2)))); +drop table t1; + +create table t1 (a int, b varchar(2), c int) +partition by range column_list (a, b, c) +(partition p0 values less than (column_list(1, 'A', 1)), + partition p1 values less than (column_list(1, 'B', 1))); +insert into t1 values (1, 'A', 1); +explain partitions select * from t1 where a = 1 AND b <= 'A' and c = 1; +select * from t1 where a = 1 AND b <= 'A' and c = 1; +drop table t1; + +create table t1 (a char, b char, c char) +partition by list column_list(a) +( partition p0 values in (column_list('a'))); +insert into t1 (a) values ('a'); +select * from t1 where a = 'a'; +drop table t1; + +--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR +create table t1 (d timestamp) +partition by range column_list(d) +( partition p0 values less than (column_list('2000-01-01')), + partition p1 values less than (column_list('2040-01-01'))); + +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p0 values less than (column_list(null, 10))); +drop table t1; + +create table t1 (d date) +partition by range column_list(d) +( partition p0 values less than (column_list('2000-01-01')), + partition p1 values less than (column_list('2009-01-01'))); +drop table t1; + +create table t1 (d date) +partition by range column_list(d) +( partition p0 values less than (column_list('1999-01-01')), + partition p1 values less than (column_list('2000-01-01'))); +drop table t1; + +create table t1 (d date) +partition by range column_list(d) +( partition p0 values less than (column_list('2000-01-01')), + partition p1 values less than (column_list('3000-01-01'))); +drop table t1; + +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p2 values less than (column_list(99,99)), + partition p1 values less than (column_list(99,999))); + +insert into t1 values (99,998); +select * from t1 where b = 998; +drop table t1; + +create table t1 as select to_seconds(null) as to_seconds; +select data_type from information_schema.columns +where column_name='to_seconds'; +drop table t1; + +--error ER_PARSE_ERROR +create table t1 (a int, b int) +partition by list column_list(a,b) +(partition p0 values in (column_list(maxvalue,maxvalue))); +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p0 values less than (column_list(maxvalue,maxvalue))); +drop table t1; + +create table t1 (a int) +partition by list column_list(a) +(partition p0 values in (column_list(0))); +select partition_method from information_schema.partitions where table_name='t1'; +drop table t1; + +create table t1 (a char(6)) +partition by range column_list(a) +(partition p0 values less than (column_list('H23456')), + partition p1 values less than (column_list('M23456'))); +insert into t1 values ('F23456'); +select * from t1; +drop table t1; + +-- error 1054 +create table t1 (a char(6)) +partition by range column_list(a) +(partition p0 values less than (column_list(H23456)), + partition p1 values less than (column_list(M23456))); + +-- error ER_RANGE_NOT_INCREASING_ERROR +create table t1 (a char(6)) +partition by range column_list(a) +(partition p0 values less than (column_list(23456)), + partition p1 values less than (column_list(23456))); + +-- error 1064 +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p0 values less than (10)); + +-- error ER_PARTITION_COLUMN_LIST_ERROR +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p0 values less than (column_list(1,1,1)); + +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p0 values less than (column_list(1, NULL)), + partition p1 values less than (column_list(2, maxvalue)), + partition p2 values less than (column_list(3, 3)), + partition p3 values less than (column_list(10, NULL))); + +-- error ER_NO_PARTITION_FOR_GIVEN_VALUE +insert into t1 values (10,0); +insert into t1 values (0,1),(1,1),(2,1),(3,1),(3,4),(4,9),(9,1); +select * from t1; + +alter table t1 +partition by range column_list(b,a) +(partition p0 values less than (column_list(1,2)), + partition p1 values less than (column_list(3,3)), + partition p2 values less than (column_list(9,5))); +explain partitions select * from t1 where b < 2; +select * from t1 where b < 2; +explain partitions select * from t1 where b < 4; +select * from t1 where b < 4; + +alter table t1 reorganize partition p1 into +(partition p11 values less than (column_list(2,2)), + partition p12 values less than (column_list(3,3))); + +-- error ER_REORG_OUTSIDE_RANGE +alter table t1 reorganize partition p0 into +(partition p01 values less than (column_list(0,3)), + partition p02 values less than (column_list(1,1))); + +-- error ER_PARTITION_COLUMN_LIST_ERROR +alter table t1 reorganize partition p2 into +(partition p2 values less than(column_list(9,6,1))); + +-- error ER_PARTITION_COLUMN_LIST_ERROR +alter table t1 reorganize partition p2 into +(partition p2 values less than (10)); + +alter table t1 reorganize partition p2 into +(partition p21 values less than (column_list(4,7)), + partition p22 values less than (column_list(9,5))); +explain partitions select * from t1 where b < 4; +select * from t1 where b < 4; +drop table t1; + +#create table t1 (a int, b int) +#partition by range column_list(a,b) +#(partition p0 values less than (column_list(99,99)), +# partition p1 values less than (column_list(99,maxvalue))); +#drop table t1; + +create table t1 (a int, b int) +partition by list column_list(a,b) +subpartition by hash (b) +subpartitions 2 +(partition p0 values in (column_list(0,0), column_list(1,1)), + partition p1 values in (column_list(1000,1000))); +insert into t1 values (1000,1000); +#select * from t1 where a = 0 and b = 0; +drop table t1; + +create table t1 (a char, b char, c char) +partition by range column_list(a,b,c) +( partition p0 values less than (column_list('a','b','c'))); +alter table t1 add partition +(partition p1 values less than (column_list('b','c','d'))); +drop table t1; diff --git a/mysql-test/t/partition_column_prune.test b/mysql-test/t/partition_column_prune.test new file mode 100644 index 00000000000..52267a66b65 --- /dev/null +++ b/mysql-test/t/partition_column_prune.test @@ -0,0 +1,71 @@ +# +# Partition pruning tests for new COLUMN LIST feature +# +-- source include/have_partition.inc + +--disable_warnings +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +--enable_warnings + +create table t1 (a char, b char, c char) +partition by range column_list(a,b,c) +( partition p0 values less than (column_list('a','b','c'))); +insert into t1 values ('a', NULL, 'd'); +explain partitions select * from t1 where a = 'a' AND c = 'd'; +select * from t1 where a = 'a' AND c = 'd'; +drop table t1; + +## COLUMN_LIST partition pruning tests +create table t1 (a int not null) partition by range column_list(a) ( + partition p0 values less than (column_list(10)), + partition p1 values less than (column_list(20)), + partition p2 values less than (column_list(30)), + partition p3 values less than (column_list(40)), + partition p4 values less than (column_list(50)), + partition p5 values less than (column_list(60)), + partition p6 values less than (column_list(70)) +); +insert into t1 values (5),(15),(25),(35),(45),(55),(65); +insert into t1 values (5),(15),(25),(35),(45),(55),(65); + +create table t2 (a int not null) partition by range(a) ( + partition p0 values less than (10), + partition p1 values less than (20), + partition p2 values less than (30), + partition p3 values less than (40), + partition p4 values less than (50), + partition p5 values less than (60), + partition p6 values less than (70) +); +insert into t2 values (5),(15),(25),(35),(45),(55),(65); +insert into t2 values (5),(15),(25),(35),(45),(55),(65); + +explain partitions select * from t1 where a > 35 and a < 45; +explain partitions select * from t2 where a > 35 and a < 45; + +drop table t1, t2; + +create table t1 (a int not null, b int not null ) +partition by range column_list(a,b) ( + partition p01 values less than (column_list(2,10)), + partition p02 values less than (column_list(2,20)), + partition p03 values less than (column_list(2,30)), + + partition p11 values less than (column_list(4,10)), + partition p12 values less than (column_list(4,20)), + partition p13 values less than (column_list(4,30)), + + partition p21 values less than (column_list(6,10)), + partition p22 values less than (column_list(6,20)), + partition p23 values less than (column_list(6,30)) +); + +insert into t1 values (2,5), (2,15), (2,25), + (4,5), (4,15), (4,25), (6,5), (6,15), (6,25); +insert into t1 select * from t1; + +explain partitions select * from t1 where a=2; +explain partitions select * from t1 where a=4; +explain partitions select * from t1 where a=2 and b < 22; + +drop table t1; diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test index 49632f95dfb..1e76945ca46 100644 --- a/mysql-test/t/partition_error.test +++ b/mysql-test/t/partition_error.test @@ -180,7 +180,7 @@ partitions 3 (partition x1, partition x2); # -# Partition by key specified 3 partitions but only defined 2 => error +# Partition by hash, random function # --error 1064 CREATE TABLE t1 ( @@ -193,7 +193,7 @@ partitions 2 (partition x1, partition x2); # -# Partition by key specified 3 partitions but only defined 2 => error +# Partition by range, random function # --error 1064 CREATE TABLE t1 ( @@ -206,7 +206,7 @@ partitions 2 (partition x1 values less than (0), partition x2 values less than (2)); # -# Partition by key specified 3 partitions but only defined 2 => error +# Partition by list, random function # --error 1064 CREATE TABLE t1 ( diff --git a/mysql-test/t/partition_mgm_err.test b/mysql-test/t/partition_mgm_err.test index 0f8b8d3cd90..f921fa8ebca 100644 --- a/mysql-test/t/partition_mgm_err.test +++ b/mysql-test/t/partition_mgm_err.test @@ -61,7 +61,7 @@ ALTER TABLE t1 REORGANIZE PARTITION x0, x1, x1 INTO ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO (PARTITION x01 VALUES LESS THAN (5)); ---error ER_REORG_OUTSIDE_RANGE +--error ER_RANGE_NOT_INCREASING_ERROR ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO (PARTITION x01 VALUES LESS THAN (4), PARTITION x11 VALUES LESS THAN (2)); diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test index c02d9049f2e..c14dfd1822d 100644 --- a/mysql-test/t/partition_range.test +++ b/mysql-test/t/partition_range.test @@ -9,6 +9,82 @@ drop table if exists t1, t2; --enable_warnings +--error ER_PARSE_ERROR +create table t1 (a int) +partition by range (a) +( partition p0 values less than (NULL), + partition p1 values less than (MAXVALUE)); +# +# Merge fix of bug#27927 for TO_SECONDS function +# +create table t1 (a datetime not null) +partition by range (TO_SECONDS(a)) +( partition p0 VALUES LESS THAN (TO_SECONDS('2007-03-08 00:00:00')), + partition p1 VALUES LESS THAN (TO_SECONDS('2007-04-01 00:00:00'))); +INSERT INTO t1 VALUES ('2007-03-01 12:00:00'), ('2007-03-07 12:00:00'); +INSERT INTO t1 VALUES ('2007-03-08 12:00:00'), ('2007-03-15 12:00:00'); +explain partitions select * from t1 where a < '2007-03-08 00:00:00'; +explain partitions select * from t1 where a < '2007-03-08 00:00:01'; +explain partitions select * from t1 where a <= '2007-03-08 00:00:00'; +explain partitions select * from t1 where a <= '2007-03-07 23:59:59'; +explain partitions select * from t1 where a < '2007-03-07 23:59:59'; +drop table t1; +# +# New test cases for new function to_seconds +# +create table t1 (a date) +partition by range(to_seconds(a)) +(partition p0 values less than (to_seconds('2004-01-01')), + partition p1 values less than (to_seconds('2005-01-01'))); +insert into t1 values ('2003-12-30'),('2004-12-31'); +select * from t1; +explain partitions select * from t1 where a <= '2003-12-31'; +select * from t1 where a <= '2003-12-31'; +explain partitions select * from t1 where a <= '2005-01-01'; +select * from t1 where a <= '2005-01-01'; +drop table t1; + +create table t1 (a datetime) +partition by range(to_seconds(a)) +(partition p0 values less than (to_seconds('2004-01-01 12:00:00')), + partition p1 values less than (to_seconds('2005-01-01 12:00:00'))); +insert into t1 values ('2004-01-01 11:59:29'),('2005-01-01 11:59:59'); +select * from t1; +explain partitions select * from t1 where a <= '2004-01-01 11:59.59'; +select * from t1 where a <= '2004-01-01 11:59:59'; +explain partitions select * from t1 where a <= '2005-01-01'; +select * from t1 where a <= '2005-01-01'; +drop table t1; + +# +# Adding new test cases for column list variant for partitioning +# +--error 1064 +create table t1 (a int, b char(20)) +partition by range column_list(a,b) +(partition p0 values less than (1)); + +--error ER_PARTITION_COLUMN_LIST_ERROR +create table t1 (a int, b char(20)) +partition by range(a) +(partition p0 values less than (column_list(1,"b"))); + +--error ER_PARTITION_COLUMN_LIST_ERROR +create table t1 (a int, b char(20)) +partition by range(a) +(partition p0 values less than (column_list(1,"b"))); + +create table t1 (a int, b char(20)); +create global index inx on t1 (a,b) +partition by range (a) +(partition p0 values less than (1)); +drop table t1; + +create table t1 (a int, b char(20)) +partition by range column_list(b) +(partition p0 values less than (column_list("b"))); +drop table t1; + # # BUG 33429: Succeeds in adding partition when maxvalue on last partition # diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test index 8a81908296f..dfe36ed0905 100644 --- a/mysql-test/t/type_decimal.test +++ b/mysql-test/t/type_decimal.test @@ -8,13 +8,13 @@ SET SQL_WARNINGS=1; CREATE TABLE t1 ( id int(11) NOT NULL auto_increment, datatype_id int(11) DEFAULT '0' NOT NULL, - minvalue decimal(20,10) DEFAULT '0.0000000000' NOT NULL, - maxvalue decimal(20,10) DEFAULT '0.0000000000' NOT NULL, + min_value decimal(20,10) DEFAULT '0.0000000000' NOT NULL, + max_value decimal(20,10) DEFAULT '0.0000000000' NOT NULL, valuename varchar(20), forecolor int(11), backcolor int(11), PRIMARY KEY (id), - UNIQUE datatype_id (datatype_id, minvalue, maxvalue) + UNIQUE datatype_id (datatype_id, min_value, max_value) ); INSERT INTO t1 VALUES ( '1', '4', '0.0000000000', '0.0000000000', 'Ei saja', '0', '16776960'); INSERT INTO t1 VALUES ( '2', '4', '1.0000000000', '1.0000000000', 'Sajab', '16777215', '255'); @@ -148,8 +148,8 @@ INSERT INTO t1 VALUES ( '139', '21', '326.0000000000', '326.0000000000', 'Lumine INSERT INTO t1 VALUES ( '143', '16', '-4.9000000000', '-0.1000000000', '', NULL, '15774720'); INSERT INTO t1 VALUES ( '145', '15', '0.0000000000', '1.9000000000', '', '0', '16769024'); INSERT INTO t1 VALUES ( '146', '16', '0.0000000000', '1.9000000000', '', '0', '16769024'); -select * from t1 where minvalue<=1 and maxvalue>=-1 and datatype_id=16; -select * from t1 where minvalue<=-1 and maxvalue>=-1 and datatype_id=16; +select * from t1 where min_value<=1 and max_value>=-1 and datatype_id=16; +select * from t1 where min_value<=-1 and max_value>=-1 and datatype_id=16; drop table t1; # -- cgit v1.2.1 From b34643b8d2fbc41390b1b8d263d8bde8d857d49b Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Tue, 15 Sep 2009 17:27:10 +0200 Subject: Forgot to add result files for WL#3352 new test cases --- mysql-test/r/partition_column.result | 213 +++++++++++++++++++++++++++++ mysql-test/r/partition_column_prune.result | 66 +++++++++ 2 files changed, 279 insertions(+) create mode 100644 mysql-test/r/partition_column.result create mode 100644 mysql-test/r/partition_column_prune.result (limited to 'mysql-test') diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result new file mode 100644 index 00000000000..5c6464b271d --- /dev/null +++ b/mysql-test/r/partition_column.result @@ -0,0 +1,213 @@ +drop table if exists t1; +create table t1 (a int, b char(10), c varchar(25), d datetime) +partition by range column_list(a,b,c,d) +subpartition by hash (to_seconds(d)) +subpartitions 4 +( partition p0 values less than (column_list(1, NULL, MAXVALUE, NULL)), +partition p1 values less than (column_list(1, 'a', MAXVALUE, TO_DAYS('1999-01-01'))), +partition p2 values less than (column_list(1, 'a', MAXVALUE, MAXVALUE)), +partition p3 values less than (column_list(1, MAXVALUE, MAXVALUE, MAXVALUE))); +drop table t1; +create table t1 (a int, b char(10), c varchar(5), d int) +partition by range column_list(a,b,c) +subpartition by key (c,d) +subpartitions 3 +( partition p0 values less than (column_list(1,'abc','abc')), +partition p1 values less than (column_list(2,'abc','abc')), +partition p2 values less than (column_list(3,'abc','abc')), +partition p3 values less than (column_list(4,'abc','abc'))); +insert into t1 values (1,'a','b',1),(2,'a','b',2),(3,'a','b',3); +insert into t1 values (1,'b','c',1),(2,'b','c',2),(3,'b','c',3); +insert into t1 values (1,'c','d',1),(2,'c','d',2),(3,'c','d',3); +insert into t1 values (1,'d','e',1),(2,'d','e',2),(3,'d','e',3); +select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) OR +(a = 1 AND b >= 'a' AND (c = 'c' OR (c = 'd' AND d = 2)))); +a b c d +1 a b 1 +1 b c 1 +drop table t1; +create table t1 (a int, b varchar(2), c int) +partition by range column_list (a, b, c) +(partition p0 values less than (column_list(1, 'A', 1)), +partition p1 values less than (column_list(1, 'B', 1))); +insert into t1 values (1, 'A', 1); +explain partitions select * from t1 where a = 1 AND b <= 'A' and c = 1; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1 system NULL NULL NULL NULL 1 +select * from t1 where a = 1 AND b <= 'A' and c = 1; +a b c +1 A 1 +drop table t1; +create table t1 (a char, b char, c char) +partition by list column_list(a) +( partition p0 values in (column_list('a'))); +insert into t1 (a) values ('a'); +select * from t1 where a = 'a'; +a b c +a NULL NULL +drop table t1; +create table t1 (d timestamp) +partition by range column_list(d) +( partition p0 values less than (column_list('2000-01-01')), +partition p1 values less than (column_list('2040-01-01'))); +ERROR HY000: Partition column values of incorrect type +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p0 values less than (column_list(null, 10))); +drop table t1; +create table t1 (d date) +partition by range column_list(d) +( partition p0 values less than (column_list('2000-01-01')), +partition p1 values less than (column_list('2009-01-01'))); +drop table t1; +create table t1 (d date) +partition by range column_list(d) +( partition p0 values less than (column_list('1999-01-01')), +partition p1 values less than (column_list('2000-01-01'))); +drop table t1; +create table t1 (d date) +partition by range column_list(d) +( partition p0 values less than (column_list('2000-01-01')), +partition p1 values less than (column_list('3000-01-01'))); +drop table t1; +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p2 values less than (column_list(99,99)), +partition p1 values less than (column_list(99,999))); +insert into t1 values (99,998); +select * from t1 where b = 998; +a b +99 998 +drop table t1; +create table t1 as select to_seconds(null) as to_seconds; +select data_type from information_schema.columns +where column_name='to_seconds'; +data_type +int +drop table t1; +create table t1 (a int, b int) +partition by list column_list(a,b) +(partition p0 values in (column_list(maxvalue,maxvalue))); +ERROR 42000: Cannot use MAXVALUE as value in List partitioning near 'maxvalue,maxvalue)))' at line 3 +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p0 values less than (column_list(maxvalue,maxvalue))); +drop table t1; +create table t1 (a int) +partition by list column_list(a) +(partition p0 values in (column_list(0))); +select partition_method from information_schema.partitions where table_name='t1'; +partition_method +LIST COLUMN_LIST +drop table t1; +create table t1 (a char(6)) +partition by range column_list(a) +(partition p0 values less than (column_list('H23456')), +partition p1 values less than (column_list('M23456'))); +insert into t1 values ('F23456'); +select * from t1; +a +F23456 +drop table t1; +create table t1 (a char(6)) +partition by range column_list(a) +(partition p0 values less than (column_list(H23456)), +partition p1 values less than (column_list(M23456))); +ERROR 42S22: Unknown column 'H23456' in 'field list' +create table t1 (a char(6)) +partition by range column_list(a) +(partition p0 values less than (column_list(23456)), +partition p1 values less than (column_list(23456))); +ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p0 values less than (10)); +ERROR 42000: Inconsistency in usage of column lists for partitioning near '))' at line 3 +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p0 values less than (column_list(1,1,1)); +ERROR HY000: Inconsistency in usage of column lists for partitioning +create table t1 (a int, b int) +partition by range column_list(a,b) +(partition p0 values less than (column_list(1, NULL)), +partition p1 values less than (column_list(2, maxvalue)), +partition p2 values less than (column_list(3, 3)), +partition p3 values less than (column_list(10, NULL))); +insert into t1 values (10,0); +ERROR HY000: Table has no partition for value from column_list +insert into t1 values (0,1),(1,1),(2,1),(3,1),(3,4),(4,9),(9,1); +select * from t1; +a b +0 1 +1 1 +2 1 +3 1 +3 4 +4 9 +9 1 +alter table t1 +partition by range column_list(b,a) +(partition p0 values less than (column_list(1,2)), +partition p1 values less than (column_list(3,3)), +partition p2 values less than (column_list(9,5))); +explain partitions select * from t1 where b < 2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 7 Using where +select * from t1 where b < 2; +a b +0 1 +1 1 +2 1 +3 1 +9 1 +explain partitions select * from t1 where b < 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 7 Using where +select * from t1 where b < 4; +a b +0 1 +1 1 +2 1 +3 1 +9 1 +alter table t1 reorganize partition p1 into +(partition p11 values less than (column_list(2,2)), +partition p12 values less than (column_list(3,3))); +alter table t1 reorganize partition p0 into +(partition p01 values less than (column_list(0,3)), +partition p02 values less than (column_list(1,1))); +ERROR HY000: Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range +alter table t1 reorganize partition p2 into +(partition p2 values less than(column_list(9,6,1))); +ERROR HY000: Inconsistency in usage of column lists for partitioning +alter table t1 reorganize partition p2 into +(partition p2 values less than (10)); +ERROR HY000: Inconsistency in usage of column lists for partitioning +alter table t1 reorganize partition p2 into +(partition p21 values less than (column_list(4,7)), +partition p22 values less than (column_list(9,5))); +explain partitions select * from t1 where b < 4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p11,p12,p21 ALL NULL NULL NULL NULL 7 Using where +select * from t1 where b < 4; +a b +0 1 +1 1 +2 1 +3 1 +9 1 +drop table t1; +create table t1 (a int, b int) +partition by list column_list(a,b) +subpartition by hash (b) +subpartitions 2 +(partition p0 values in (column_list(0,0), column_list(1,1)), +partition p1 values in (column_list(1000,1000))); +insert into t1 values (1000,1000); +drop table t1; +create table t1 (a char, b char, c char) +partition by range column_list(a,b,c) +( partition p0 values less than (column_list('a','b','c'))); +alter table t1 add partition +(partition p1 values less than (column_list('b','c','d'))); +drop table t1; diff --git a/mysql-test/r/partition_column_prune.result b/mysql-test/r/partition_column_prune.result new file mode 100644 index 00000000000..8f7a8f85d05 --- /dev/null +++ b/mysql-test/r/partition_column_prune.result @@ -0,0 +1,66 @@ +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +create table t1 (a char, b char, c char) +partition by range column_list(a,b,c) +( partition p0 values less than (column_list('a','b','c'))); +insert into t1 values ('a', NULL, 'd'); +explain partitions select * from t1 where a = 'a' AND c = 'd'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 system NULL NULL NULL NULL 1 +select * from t1 where a = 'a' AND c = 'd'; +a b c +a NULL d +drop table t1; +create table t1 (a int not null) partition by range column_list(a) ( +partition p0 values less than (column_list(10)), +partition p1 values less than (column_list(20)), +partition p2 values less than (column_list(30)), +partition p3 values less than (column_list(40)), +partition p4 values less than (column_list(50)), +partition p5 values less than (column_list(60)), +partition p6 values less than (column_list(70)) +); +insert into t1 values (5),(15),(25),(35),(45),(55),(65); +insert into t1 values (5),(15),(25),(35),(45),(55),(65); +create table t2 (a int not null) partition by range(a) ( +partition p0 values less than (10), +partition p1 values less than (20), +partition p2 values less than (30), +partition p3 values less than (40), +partition p4 values less than (50), +partition p5 values less than (60), +partition p6 values less than (70) +); +insert into t2 values (5),(15),(25),(35),(45),(55),(65); +insert into t2 values (5),(15),(25),(35),(45),(55),(65); +explain partitions select * from t1 where a > 35 and a < 45; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p3,p4 ALL NULL NULL NULL NULL 4 Using where +explain partitions select * from t2 where a > 35 and a < 45; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 p3,p4 ALL NULL NULL NULL NULL 4 Using where +drop table t1, t2; +create table t1 (a int not null, b int not null ) +partition by range column_list(a,b) ( +partition p01 values less than (column_list(2,10)), +partition p02 values less than (column_list(2,20)), +partition p03 values less than (column_list(2,30)), +partition p11 values less than (column_list(4,10)), +partition p12 values less than (column_list(4,20)), +partition p13 values less than (column_list(4,30)), +partition p21 values less than (column_list(6,10)), +partition p22 values less than (column_list(6,20)), +partition p23 values less than (column_list(6,30)) +); +insert into t1 values (2,5), (2,15), (2,25), +(4,5), (4,15), (4,25), (6,5), (6,15), (6,25); +insert into t1 select * from t1; +explain partitions select * from t1 where a=2; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p01,p02,p03,p11 ALL NULL NULL NULL NULL 13 Using where +explain partitions select * from t1 where a=4; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p11,p12,p13,p21 ALL NULL NULL NULL NULL 16 Using where +explain partitions select * from t1 where a=2 and b < 22; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p01,p02,p03 ALL NULL NULL NULL NULL 16 Using where +drop table t1; -- cgit v1.2.1 From 5661e72623e66d9170dbe3e7913ff4f36b79100d Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Wed, 23 Sep 2009 11:43:43 +0200 Subject: BUG#29288: myisam transactions replicated to a transactional slave leaves slave unstable Problem: when replicating from non-transactional to transactional engine with autocommit off, no BEGIN/COMMIT is written to the binlog. When the slave replicates, it will start a transaction that never ends. Fix: Force autocommit=on on slave by always replicating autocommit=1 from the master. --- .../suite/rpl_ndb/r/rpl_ndb_mixed_tables.result | 286 +++++++++++++++++ .../rpl_ndb/t/rpl_ndb_mixed_tables-master.opt | 1 + .../suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt | 1 + .../suite/rpl_ndb/t/rpl_ndb_mixed_tables.test | 349 +++++++++++++++++++++ 4 files changed, 637 insertions(+) create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result new file mode 100644 index 00000000000..92fda774da5 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result @@ -0,0 +1,286 @@ +==== Initialization ==== +stop slave; +drop table if exists t1,t2,t3,t4,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 master ---- +CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM; +CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB; +CREATE TABLE myisam_ndb (a INT) ENGINE=MYISAM; +CREATE TABLE ndb_myisam (a INT) ENGINE=NDB; +CREATE TABLE innodb_ndb (a INT) ENGINE=INNODB; +CREATE TABLE ndb_innodb (a INT) ENGINE=NDB; +SHOW CREATE TABLE myisam_innodb; +Table Create Table +myisam_innodb CREATE TABLE `myisam_innodb` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE innodb_myisam; +Table Create Table +innodb_myisam CREATE TABLE `innodb_myisam` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE myisam_ndb; +Table Create Table +myisam_ndb CREATE TABLE `myisam_ndb` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE ndb_myisam; +Table Create Table +ndb_myisam CREATE TABLE `ndb_myisam` ( + `a` int(11) DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +SHOW CREATE TABLE innodb_ndb; +Table Create Table +innodb_ndb CREATE TABLE `innodb_ndb` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE ndb_innodb; +Table Create Table +ndb_innodb CREATE TABLE `ndb_innodb` ( + `a` int(11) DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +---- setup slave with different engines ---- +DROP TABLE myisam_innodb, innodb_myisam; +DROP TABLE myisam_ndb, ndb_myisam; +DROP TABLE innodb_ndb, ndb_innodb; +CREATE TABLE myisam_innodb (a INT) ENGINE=INNODB; +CREATE TABLE innodb_myisam (a INT) ENGINE=MYISAM; +CREATE TABLE myisam_ndb (a INT) ENGINE=NDB; +CREATE TABLE ndb_myisam (a INT) ENGINE=MYISAM; +CREATE TABLE innodb_ndb (a INT) ENGINE=NDB; +CREATE TABLE ndb_innodb (a INT) ENGINE=INNODB; +SHOW CREATE TABLE myisam_innodb; +Table Create Table +myisam_innodb CREATE TABLE `myisam_innodb` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE innodb_myisam; +Table Create Table +innodb_myisam CREATE TABLE `innodb_myisam` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE myisam_ndb; +Table Create Table +myisam_ndb CREATE TABLE `myisam_ndb` ( + `a` int(11) DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +SHOW CREATE TABLE ndb_myisam; +Table Create Table +ndb_myisam CREATE TABLE `ndb_myisam` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE innodb_ndb; +Table Create Table +innodb_ndb CREATE TABLE `innodb_ndb` ( + `a` int(11) DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +SHOW CREATE TABLE ndb_innodb; +Table Create Table +ndb_innodb CREATE TABLE `ndb_innodb` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +==== AUTOCOMMIT=0, transactions ==== +---- COMMIT ---- +SET AUTOCOMMIT = 0; +BEGIN; +INSERT INTO myisam_innodb VALUES (1); +INSERT INTO myisam_innodb VALUES (2); +COMMIT; +BEGIN; +INSERT INTO innodb_myisam VALUES (3); +INSERT INTO innodb_myisam VALUES (4); +COMMIT; +BEGIN; +INSERT INTO myisam_ndb VALUES (5); +INSERT INTO myisam_ndb VALUES (6); +COMMIT; +BEGIN; +INSERT INTO ndb_myisam VALUES (7); +INSERT INTO ndb_myisam VALUES (8); +COMMIT; +BEGIN; +INSERT INTO ndb_innodb VALUES (9); +INSERT INTO ndb_innodb VALUES (10); +COMMIT; +BEGIN; +INSERT INTO innodb_ndb VALUES (11); +INSERT INTO innodb_ndb VALUES (12); +COMMIT; +---- ROLLBACK ---- +BEGIN; +INSERT INTO myisam_innodb VALUES (13); +INSERT INTO myisam_innodb VALUES (14); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO innodb_myisam VALUES (15); +INSERT INTO innodb_myisam VALUES (16); +ROLLBACK; +BEGIN; +INSERT INTO myisam_ndb VALUES (17); +INSERT INTO myisam_ndb VALUES (18); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO ndb_myisam VALUES (19); +INSERT INTO ndb_myisam VALUES (20); +ROLLBACK; +BEGIN; +INSERT INTO ndb_innodb VALUES (21); +INSERT INTO ndb_innodb VALUES (22); +ROLLBACK; +BEGIN; +INSERT INTO innodb_ndb VALUES (23); +INSERT INTO innodb_ndb VALUES (24); +ROLLBACK; +==== AUTOCOMMIT=1, transactions ==== +---- COMMIT ---- +SET AUTOCOMMIT = 1; +BEGIN; +INSERT INTO myisam_innodb VALUES (25); +INSERT INTO myisam_innodb VALUES (26); +COMMIT; +BEGIN; +INSERT INTO innodb_myisam VALUES (27); +INSERT INTO innodb_myisam VALUES (28); +COMMIT; +BEGIN; +INSERT INTO myisam_ndb VALUES (29); +INSERT INTO myisam_ndb VALUES (30); +COMMIT; +BEGIN; +INSERT INTO ndb_myisam VALUES (31); +INSERT INTO ndb_myisam VALUES (32); +COMMIT; +BEGIN; +INSERT INTO ndb_innodb VALUES (33); +INSERT INTO ndb_innodb VALUES (34); +COMMIT; +BEGIN; +INSERT INTO innodb_ndb VALUES (35); +INSERT INTO innodb_ndb VALUES (36); +COMMIT; +---- ROLLBACK ---- +BEGIN; +INSERT INTO myisam_innodb VALUES (37); +INSERT INTO myisam_innodb VALUES (38); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO innodb_myisam VALUES (39); +INSERT INTO innodb_myisam VALUES (40); +ROLLBACK; +BEGIN; +INSERT INTO myisam_ndb VALUES (41); +INSERT INTO myisam_ndb VALUES (42); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO ndb_myisam VALUES (43); +INSERT INTO ndb_myisam VALUES (44); +ROLLBACK; +BEGIN; +INSERT INTO ndb_innodb VALUES (45); +INSERT INTO ndb_innodb VALUES (46); +ROLLBACK; +BEGIN; +INSERT INTO innodb_ndb VALUES (47); +INSERT INTO innodb_ndb VALUES (48); +ROLLBACK; +==== AUTOCOMMIT=1, single statements ==== +INSERT INTO myisam_innodb VALUES (49); +INSERT INTO myisam_innodb VALUES (50); +INSERT INTO innodb_myisam VALUES (51); +INSERT INTO innodb_myisam VALUES (52); +INSERT INTO myisam_ndb VALUES (53); +INSERT INTO myisam_ndb VALUES (54); +INSERT INTO ndb_myisam VALUES (55); +INSERT INTO ndb_myisam VALUES (56); +INSERT INTO ndb_innodb VALUES (57); +INSERT INTO ndb_innodb VALUES (58); +INSERT INTO innodb_ndb VALUES (59); +INSERT INTO innodb_ndb VALUES (60); +==== AUTOCOMMIT=0, single statements, myisam on master ==== +SET AUTOCOMMIT = 0; +INSERT INTO myisam_innodb VALUES (61); +INSERT INTO myisam_innodb VALUES (62); +INSERT INTO myisam_ndb VALUES (63); +INSERT INTO myisam_ndb VALUES (64); +==== Show results ==== +SELECT * FROM myisam_innodb ORDER BY a; +a +1 +2 +13 +14 +25 +26 +37 +38 +49 +50 +61 +62 +SELECT * FROM innodb_myisam ORDER BY a; +a +3 +4 +27 +28 +51 +52 +SELECT * FROM myisam_ndb ORDER BY a; +a +5 +6 +17 +18 +29 +30 +41 +42 +53 +54 +63 +64 +SELECT * FROM ndb_myisam ORDER BY a; +a +7 +8 +31 +32 +55 +56 +SELECT * FROM innodb_ndb ORDER BY a; +a +11 +12 +35 +36 +59 +60 +SELECT * FROM ndb_innodb ORDER BY a; +a +9 +10 +33 +34 +57 +58 +Comparing tables master:test.myisam_innodb and slave:test.myisam_innodb +Comparing tables master:test.innodb_myisam and slave:test.innodb_myisam +Comparing tables master:test.myisam_ndb and slave:test.myisam_ndb +Comparing tables master:test.ndb_myisam and slave:test.ndb_myisam +Comparing tables master:test.innodb_ndb and slave:test.innodb_ndb +Comparing tables master:test.ndb_innodb and slave:test.ndb_innodb +==== Clean up ==== +drop table myisam_innodb, innodb_myisam; +drop table myisam_ndb, ndb_myisam; +drop table innodb_ndb, ndb_innodb; diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt new file mode 100644 index 00000000000..b74354b22e1 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt @@ -0,0 +1 @@ +--innodb --ndbcluster diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt new file mode 100644 index 00000000000..bbb86b2991b --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt @@ -0,0 +1 @@ +--innodb --ndbcluster --replicate-ignore-table=mysql.ndb_apply_status diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test new file mode 100644 index 00000000000..7d7cd5770cf --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test @@ -0,0 +1,349 @@ +# ==== Purpose ==== +# +# Test replication of transactions on tables which have different +# engines on master and slave. This tests all combinations of innodb, +# myisam, and ndb. +# +# ==== Method ==== +# +# Set up six tables, each being innodb, myisam, or innodb on master, +# and another of innodb, myisam, or innodb on slave. For each table, +# do the following: +# +# - committed and rollback'ed transactions, with autocommit on and +# off +# - non-transactions with autocommit on +# - non-transactions with autocommit off, where the master table is +# myisam. +# +# Note: we are running the slave with +# --replicate-ignore-table=mysql.ndb_apply_status . See BUG#34557 for +# explanation. +# +# ==== Related bugs ==== +# +# BUG#26395: if crash during autocommit update to transactional table on master, slave fails +# BUG#29288: myisam transactions replicated to a transactional slave leaves slave unstable +# BUG#34557: Row-based replication from ndb to non-ndb gives error on slave +# BUG#34600: Rolled-back punch transactions not replicated correctly +# +# ==== Todo ==== +# +# We should eventually try transactions touching two tables which are +# of different engines on the same server (so that we try, e.g. punch +# transactions; cf BUG#34600). However, that will make the test much +# bigger (9 master-slave engine combinations [myisam->myisam, +# myisam->ndb, etc]. To try all combinations of one or more such +# tables means 2^9-1=511 transactions. We need to multiplied by 5 +# since we want to test committed/rollback'ed transactions +# with/without AUTOCOMMIT, as well as non-transactions with +# autocommit). We'd have to write a script to produce the test case. + + +--echo ==== Initialization ==== + +--source include/have_ndb.inc +--source include/have_innodb.inc +--source include/ndb_master-slave.inc + +--echo ---- setup master ---- + +CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM; +CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB; +CREATE TABLE myisam_ndb (a INT) ENGINE=MYISAM; +CREATE TABLE ndb_myisam (a INT) ENGINE=NDB; +CREATE TABLE innodb_ndb (a INT) ENGINE=INNODB; +CREATE TABLE ndb_innodb (a INT) ENGINE=NDB; + +SHOW CREATE TABLE myisam_innodb; +SHOW CREATE TABLE innodb_myisam; +SHOW CREATE TABLE myisam_ndb; +SHOW CREATE TABLE ndb_myisam; +SHOW CREATE TABLE innodb_ndb; +SHOW CREATE TABLE ndb_innodb; + +--echo ---- setup slave with different engines ---- + +sync_slave_with_master; + +DROP TABLE myisam_innodb, innodb_myisam; +DROP TABLE myisam_ndb, ndb_myisam; +DROP TABLE innodb_ndb, ndb_innodb; + +CREATE TABLE myisam_innodb (a INT) ENGINE=INNODB; +CREATE TABLE innodb_myisam (a INT) ENGINE=MYISAM; +CREATE TABLE myisam_ndb (a INT) ENGINE=NDB; +CREATE TABLE ndb_myisam (a INT) ENGINE=MYISAM; +CREATE TABLE innodb_ndb (a INT) ENGINE=NDB; +CREATE TABLE ndb_innodb (a INT) ENGINE=INNODB; + +SHOW CREATE TABLE myisam_innodb; +SHOW CREATE TABLE innodb_myisam; +SHOW CREATE TABLE myisam_ndb; +SHOW CREATE TABLE ndb_myisam; +SHOW CREATE TABLE innodb_ndb; +SHOW CREATE TABLE ndb_innodb; + +connection master; + + +--echo ==== AUTOCOMMIT=0, transactions ==== + +--echo ---- COMMIT ---- + +SET AUTOCOMMIT = 0; + +BEGIN; +INSERT INTO myisam_innodb VALUES (1); +INSERT INTO myisam_innodb VALUES (2); +COMMIT; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO innodb_myisam VALUES (3); +INSERT INTO innodb_myisam VALUES (4); +COMMIT; +sync_slave_with_master; +connection master; + +BEGIN; +INSERT INTO myisam_ndb VALUES (5); +INSERT INTO myisam_ndb VALUES (6); +COMMIT; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO ndb_myisam VALUES (7); +INSERT INTO ndb_myisam VALUES (8); +COMMIT; +sync_slave_with_master; +connection master; + +BEGIN; +INSERT INTO ndb_innodb VALUES (9); +INSERT INTO ndb_innodb VALUES (10); +COMMIT; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO innodb_ndb VALUES (11); +INSERT INTO innodb_ndb VALUES (12); +COMMIT; +sync_slave_with_master; +connection master; + +--echo ---- ROLLBACK ---- + +BEGIN; +INSERT INTO myisam_innodb VALUES (13); +INSERT INTO myisam_innodb VALUES (14); +ROLLBACK; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO innodb_myisam VALUES (15); +INSERT INTO innodb_myisam VALUES (16); +ROLLBACK; +sync_slave_with_master; +connection master; + +BEGIN; +INSERT INTO myisam_ndb VALUES (17); +INSERT INTO myisam_ndb VALUES (18); +ROLLBACK; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO ndb_myisam VALUES (19); +INSERT INTO ndb_myisam VALUES (20); +ROLLBACK; +sync_slave_with_master; +connection master; + +BEGIN; +INSERT INTO ndb_innodb VALUES (21); +INSERT INTO ndb_innodb VALUES (22); +ROLLBACK; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO innodb_ndb VALUES (23); +INSERT INTO innodb_ndb VALUES (24); +ROLLBACK; +sync_slave_with_master; +connection master; + + +--echo ==== AUTOCOMMIT=1, transactions ==== + +--echo ---- COMMIT ---- + +SET AUTOCOMMIT = 1; + +BEGIN; +INSERT INTO myisam_innodb VALUES (25); +INSERT INTO myisam_innodb VALUES (26); +COMMIT; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO innodb_myisam VALUES (27); +INSERT INTO innodb_myisam VALUES (28); +COMMIT; +sync_slave_with_master; +connection master; + +BEGIN; +INSERT INTO myisam_ndb VALUES (29); +INSERT INTO myisam_ndb VALUES (30); +COMMIT; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO ndb_myisam VALUES (31); +INSERT INTO ndb_myisam VALUES (32); +COMMIT; +sync_slave_with_master; +connection master; + +BEGIN; +INSERT INTO ndb_innodb VALUES (33); +INSERT INTO ndb_innodb VALUES (34); +COMMIT; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO innodb_ndb VALUES (35); +INSERT INTO innodb_ndb VALUES (36); +COMMIT; +sync_slave_with_master; +connection master; + +--echo ---- ROLLBACK ---- + +BEGIN; +INSERT INTO myisam_innodb VALUES (37); +INSERT INTO myisam_innodb VALUES (38); +ROLLBACK; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO innodb_myisam VALUES (39); +INSERT INTO innodb_myisam VALUES (40); +ROLLBACK; +sync_slave_with_master; +connection master; + +BEGIN; +INSERT INTO myisam_ndb VALUES (41); +INSERT INTO myisam_ndb VALUES (42); +ROLLBACK; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO ndb_myisam VALUES (43); +INSERT INTO ndb_myisam VALUES (44); +ROLLBACK; +sync_slave_with_master; +connection master; + +BEGIN; +INSERT INTO ndb_innodb VALUES (45); +INSERT INTO ndb_innodb VALUES (46); +ROLLBACK; +sync_slave_with_master; +connection master; +BEGIN; +INSERT INTO innodb_ndb VALUES (47); +INSERT INTO innodb_ndb VALUES (48); +ROLLBACK; +sync_slave_with_master; +connection master; + + +--echo ==== AUTOCOMMIT=1, single statements ==== + +INSERT INTO myisam_innodb VALUES (49); +INSERT INTO myisam_innodb VALUES (50); +sync_slave_with_master; +connection master; +INSERT INTO innodb_myisam VALUES (51); +INSERT INTO innodb_myisam VALUES (52); +sync_slave_with_master; +connection master; + +INSERT INTO myisam_ndb VALUES (53); +INSERT INTO myisam_ndb VALUES (54); +sync_slave_with_master; +connection master; +INSERT INTO ndb_myisam VALUES (55); +INSERT INTO ndb_myisam VALUES (56); +sync_slave_with_master; +connection master; + +INSERT INTO ndb_innodb VALUES (57); +INSERT INTO ndb_innodb VALUES (58); +sync_slave_with_master; +connection master; +INSERT INTO innodb_ndb VALUES (59); +INSERT INTO innodb_ndb VALUES (60); +sync_slave_with_master; +connection master; + + +--echo ==== AUTOCOMMIT=0, single statements, myisam on master ==== + +SET AUTOCOMMIT = 0; + +# This tests BUG#29288. +INSERT INTO myisam_innodb VALUES (61); +INSERT INTO myisam_innodb VALUES (62); +sync_slave_with_master; +connection master; + +INSERT INTO myisam_ndb VALUES (63); +INSERT INTO myisam_ndb VALUES (64); +sync_slave_with_master; +connection master; + + +--echo ==== Show results ==== + +SELECT * FROM myisam_innodb ORDER BY a; +SELECT * FROM innodb_myisam ORDER BY a; +SELECT * FROM myisam_ndb ORDER BY a; +SELECT * FROM ndb_myisam ORDER BY a; +SELECT * FROM innodb_ndb ORDER BY a; +SELECT * FROM ndb_innodb ORDER BY a; + +let $diff_table_1=master:test.myisam_innodb; +let $diff_table_2=slave:test.myisam_innodb; +source include/diff_tables.inc; + +let $diff_table_1=master:test.innodb_myisam; +let $diff_table_2=slave:test.innodb_myisam; +source include/diff_tables.inc; + +let $diff_table_1=master:test.myisam_ndb; +let $diff_table_2=slave:test.myisam_ndb; +source include/diff_tables.inc; + +let $diff_table_1=master:test.ndb_myisam; +let $diff_table_2=slave:test.ndb_myisam; +source include/diff_tables.inc; + +let $diff_table_1=master:test.innodb_ndb; +let $diff_table_2=slave:test.innodb_ndb; +source include/diff_tables.inc; + +let $diff_table_1=master:test.ndb_innodb; +let $diff_table_2=slave:test.ndb_innodb; +source include/diff_tables.inc; + + +--echo ==== Clean up ==== + +drop table myisam_innodb, innodb_myisam; +drop table myisam_ndb, ndb_myisam; +drop table innodb_ndb, ndb_innodb; +sync_slave_with_master; -- cgit v1.2.1 From 8f35f7c907992c77b1bda584956cf8acf97e88d5 Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Wed, 23 Sep 2009 13:20:48 +0200 Subject: Bug #37221: SET AUTOCOMMIT=1 does not commit binary log When setting AUTOCOMMIT=1 after starting a transaction, the binary log did not commit the outstanding transaction. The reason was that the binary log commit function saw the values of the new settings, deciding that there were nothing to commit. Fixed the problem by moving the implicit commit to before the thread option flags were changed, so that the binary log sees the old values of the flags instead of the values they will take after the statement. --- mysql-test/extra/binlog_tests/implicit.test | 28 ++ .../suite/binlog/r/binlog_implicit_commit.result | 345 +++++++++++++++++++++ .../suite/binlog/t/binlog_implicit_commit.test | 63 ++++ 3 files changed, 436 insertions(+) create mode 100644 mysql-test/extra/binlog_tests/implicit.test create mode 100644 mysql-test/suite/binlog/r/binlog_implicit_commit.result create mode 100644 mysql-test/suite/binlog/t/binlog_implicit_commit.test (limited to 'mysql-test') diff --git a/mysql-test/extra/binlog_tests/implicit.test b/mysql-test/extra/binlog_tests/implicit.test new file mode 100644 index 00000000000..84d80288d36 --- /dev/null +++ b/mysql-test/extra/binlog_tests/implicit.test @@ -0,0 +1,28 @@ +# First part: outside a transaction +RESET MASTER; +eval $prepare; + +INSERT INTO t1 VALUES (1); +source include/show_binlog_events.inc; +eval $statement; +source include/show_binlog_events.inc; +if (`select '$cleanup' != ''`) { + eval $cleanup; +} + +# Second part: inside a transaction +RESET MASTER; +eval $prepare; +BEGIN; +INSERT INTO t1 VALUES (2); +source include/show_binlog_events.inc; +eval $statement; +source include/show_binlog_events.inc; +INSERT INTO t1 VALUES (3); +source include/show_binlog_events.inc; +COMMIT; +source include/show_binlog_events.inc; +if (`select '$cleanup' != ''`) { + eval $cleanup; +} + diff --git a/mysql-test/suite/binlog/r/binlog_implicit_commit.result b/mysql-test/suite/binlog/r/binlog_implicit_commit.result new file mode 100644 index 00000000000..ea43b31bde9 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_implicit_commit.result @@ -0,0 +1,345 @@ +CREATE TABLE t1 (id INT) ENGINE = InnoDB; +SET BINLOG_FORMAT = STATEMENT; +RESET MASTER; +SET AUTOCOMMIT = 0; +INSERT INTO t1 VALUES (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 0; +BEGIN; +INSERT INTO t1 VALUES (2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Xid # # COMMIT /* XID */ +INSERT INTO t1 VALUES (3); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +master-bin.000001 # Xid # # COMMIT /* XID */ +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +master-bin.000001 # Xid # # COMMIT /* XID */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 1; +INSERT INTO t1 VALUES (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +SET AUTOCOMMIT = 1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 1; +BEGIN; +INSERT INTO t1 VALUES (2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +INSERT INTO t1 VALUES (3); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +master-bin.000001 # Xid # # COMMIT /* XID */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 0; +INSERT INTO t1 VALUES (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 0; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 0; +BEGIN; +INSERT INTO t1 VALUES (2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 0; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +INSERT INTO t1 VALUES (3); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +master-bin.000001 # Xid # # COMMIT /* XID */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 1; +INSERT INTO t1 VALUES (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +SET AUTOCOMMIT = 0; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 1; +BEGIN; +INSERT INTO t1 VALUES (2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 0; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +INSERT INTO t1 VALUES (3); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +master-bin.000001 # Xid # # COMMIT /* XID */ +COMMIT; +SET BINLOG_FORMAT = ROW; +RESET MASTER; +SET AUTOCOMMIT = 0; +INSERT INTO t1 VALUES (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 0; +BEGIN; +INSERT INTO t1 VALUES (2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +INSERT INTO t1 VALUES (3); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 # # 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 */ +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 # # 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 */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 1; +INSERT INTO t1 VALUES (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +SET AUTOCOMMIT = 1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 1; +BEGIN; +INSERT INTO t1 VALUES (2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +INSERT INTO t1 VALUES (3); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 0; +INSERT INTO t1 VALUES (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 0; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 0; +BEGIN; +INSERT INTO t1 VALUES (2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 0; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +INSERT INTO t1 VALUES (3); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 1; +INSERT INTO t1 VALUES (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +SET AUTOCOMMIT = 0; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 1; +BEGIN; +INSERT INTO t1 VALUES (2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +SET AUTOCOMMIT = 0; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +INSERT INTO t1 VALUES (3); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +COMMIT; +RESET MASTER; +SET AUTOCOMMIT = 0; +INSERT INTO t1 VALUES (1); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +LOCK TABLES t1 WRITE; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +INSERT INTO t1 VALUES (2); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 */ +UNLOCK TABLES; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 # # 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 */ +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # 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 # # 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 */ +DROP TABLE t1; diff --git a/mysql-test/suite/binlog/t/binlog_implicit_commit.test b/mysql-test/suite/binlog/t/binlog_implicit_commit.test new file mode 100644 index 00000000000..a682ab95e3d --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_implicit_commit.test @@ -0,0 +1,63 @@ +# The purpose of this test is to test that setting autocommit does a +# commit of outstanding transactions and nothing is left pending in +# the transaction cache. + +source include/have_log_bin.inc; +source include/have_innodb.inc; + +# We need a transactional engine, so let's use InnoDB +CREATE TABLE t1 (id INT) ENGINE = InnoDB; + +# Testing SET AUTOCOMMIT +SET BINLOG_FORMAT = STATEMENT; + +let $cleanup = COMMIT; + +let $prepare = SET AUTOCOMMIT = 0; +let $statement = SET AUTOCOMMIT = 1; +source extra/binlog_tests/implicit.test; + +let $prepare = SET AUTOCOMMIT = 1; +let $statement = SET AUTOCOMMIT = 1; +source extra/binlog_tests/implicit.test; + +let $prepare = SET AUTOCOMMIT = 0; +let $statement = SET AUTOCOMMIT = 0; +source extra/binlog_tests/implicit.test; + +let $prepare = SET AUTOCOMMIT = 1; +let $statement = SET AUTOCOMMIT = 0; +source extra/binlog_tests/implicit.test; + +SET BINLOG_FORMAT = ROW; +let $prepare = SET AUTOCOMMIT = 0; +let $statement = SET AUTOCOMMIT = 1; +source extra/binlog_tests/implicit.test; + +let $prepare = SET AUTOCOMMIT = 1; +let $statement = SET AUTOCOMMIT = 1; +source extra/binlog_tests/implicit.test; + +let $prepare = SET AUTOCOMMIT = 0; +let $statement = SET AUTOCOMMIT = 0; +source extra/binlog_tests/implicit.test; + +let $prepare = SET AUTOCOMMIT = 1; +let $statement = SET AUTOCOMMIT = 0; +source extra/binlog_tests/implicit.test; + +RESET MASTER; +SET AUTOCOMMIT = 0; +INSERT INTO t1 VALUES (1); +source include/show_binlog_events.inc; +LOCK TABLES t1 WRITE; +source include/show_binlog_events.inc; +INSERT INTO t1 VALUES (2); +source include/show_binlog_events.inc; +UNLOCK TABLES; +source include/show_binlog_events.inc; +COMMIT; +source include/show_binlog_events.inc; + +# Cleaning up +DROP TABLE t1; -- cgit v1.2.1 From 06442da289d351aae0540d0aca8bb69652ab6e13 Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Sat, 26 Sep 2009 12:49:49 +0800 Subject: Backporting WL#4398 WL#1720 Backporting BUG#44058 BUG#42244 BUG#45672 BUG#45673 Backporting BUG#45819 BUG#45973 BUG#39012 --- mysql-test/mysql-test-run.pl | 20 ++++++++++++++++++++ mysql-test/suite/rpl/t/rpl000017.test | 1 + 2 files changed, 21 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 114b6c84aa3..434896df6a5 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1815,6 +1815,26 @@ sub environment_setup { $ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=;EXAMPLE=".$plugin_filename.";"; } + # -------------------------------------------------------------------------- + # Add the path where mysqld will find semisync plugins + # -------------------------------------------------------------------------- + my $lib_semisync_master_plugin= + mtr_file_exists("$basedir/plugin/semisync/.libs/libsemisync_master.so"); + my $lib_semisync_slave_plugin= + mtr_file_exists("$basedir/plugin/semisync/.libs/libsemisync_slave.so"); + if ($lib_semisync_master_plugin && $lib_semisync_slave_plugin) + { + $ENV{'SEMISYNC_MASTER_PLUGIN'}= basename($lib_semisync_master_plugin); + $ENV{'SEMISYNC_SLAVE_PLUGIN'}= basename($lib_semisync_slave_plugin); + $ENV{'SEMISYNC_PLUGIN_OPT'}= "--plugin-dir=".dirname($lib_semisync_master_plugin); + } + else + { + $ENV{'SEMISYNC_MASTER_PLUGIN'}= ""; + $ENV{'SEMISYNC_SLAVE_PLUGIN'}= ""; + $ENV{'SEMISYNC_PLUGIN_OPT'}=""; + } + # ---------------------------------------------------- # Add the path where mysqld will find mypluglib.so # ---------------------------------------------------- diff --git a/mysql-test/suite/rpl/t/rpl000017.test b/mysql-test/suite/rpl/t/rpl000017.test index 2ba321cd8c3..d6b3e46fa31 100644 --- a/mysql-test/suite/rpl/t/rpl000017.test +++ b/mysql-test/suite/rpl/t/rpl000017.test @@ -6,6 +6,7 @@ grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaa grant replication slave on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab'; connection slave; start slave; +source include/wait_for_slave_to_start.inc; connection master; --disable_warnings drop table if exists t1; -- cgit v1.2.1 From 7aa8cd7a117817c9627932b86be2e8e047bd033b Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Mon, 28 Sep 2009 10:21:25 +0300 Subject: Ported WL#3220 to mysql-next-mr. --- mysql-test/mysql-test-run.pl | 1 - mysql-test/r/bench_count_distinct.result | 2 +- mysql-test/r/group_min_max.result | 270 ++++++++++++++++++++++++++++++- mysql-test/t/group_min_max.test | 125 +++++++++++++- 4 files changed, 386 insertions(+), 12 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 83364db0eeb..17102196f42 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -5085,7 +5085,6 @@ sub valgrind_arguments { else { mtr_add_arg($args, "--tool=memcheck"); # From >= 2.1.2 needs this option - mtr_add_arg($args, "--alignment=8"); mtr_add_arg($args, "--leak-check=yes"); mtr_add_arg($args, "--num-callers=16"); mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir) diff --git a/mysql-test/r/bench_count_distinct.result b/mysql-test/r/bench_count_distinct.result index 79e12afd237..8b67e4be38a 100644 --- a/mysql-test/r/bench_count_distinct.result +++ b/mysql-test/r/bench_count_distinct.result @@ -5,7 +5,7 @@ count(distinct n) 100 explain extended select count(distinct n) from t1; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 index NULL n 4 NULL 200 100.00 Using index +1 SIMPLE t1 range NULL n 4 NULL 10 100.00 Using index for group-by Warnings: Note 1003 select count(distinct `test`.`t1`.`n`) AS `count(distinct n)` from `test`.`t1` drop table t1; diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result index ac9a53ca238..c4841ee57a0 100644 --- a/mysql-test/r/group_min_max.result +++ b/mysql-test/r/group_min_max.result @@ -1800,23 +1800,23 @@ b a explain select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a'); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by explain select count(distinct a1,a2,b,c) from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 65 Using where; Using index for group-by (scanning) explain extended select count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 index idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 128 75.00 Using where; Using index +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 100.00 Using where; Using index for group-by Warnings: Note 1003 select count(distinct `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`) AS `count(distinct a1,a2,b)` from `test`.`t1` where ((`test`.`t1`.`b` = 'c') and (`test`.`t1`.`a1` > 'a') and (`test`.`t1`.`a2` > 'a')) explain select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a'); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index -explain extended select ord(a1) + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); +explain extended select 98 + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 index idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 128 75.00 Using where; Using index +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 100.00 Using where; Using index for group-by Warnings: -Note 1003 select (ord(`test`.`t1`.`a1`) + count(distinct `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`)) AS `ord(a1) + count(distinct a1,a2,b)` from `test`.`t1` where ((`test`.`t1`.`a1` > 'a') and (`test`.`t1`.`a2` > 'a')) +Note 1003 select (98 + count(distinct `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`)) AS `98 + count(distinct a1,a2,b)` from `test`.`t1` where ((`test`.`t1`.`a1` > 'a') and (`test`.`t1`.`a2` > 'a')) select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a'); count(distinct a1,a2,b) 4 @@ -1829,8 +1829,8 @@ count(distinct a1,a2,b) select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a'); count(distinct b) 1 -select ord(a1) + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); -ord(a1) + count(distinct a1,a2,b) +select 98 + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); +98 + count(distinct a1,a2,b) 104 explain select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b; id select_type table type possible_keys key key_len ref rows Extra @@ -2514,3 +2514,257 @@ a MAX(b) 2 1 DROP TABLE t; End of 5.1 tests +# +# WL#3220 (Loose index scan for COUNT DISTINCT) +# +CREATE TABLE t1 (a INT, b INT, c INT, KEY (a,b)); +INSERT INTO t1 VALUES (1,1,1), (1,2,1), (1,3,1), (1,4,1); +INSERT INTO t1 SELECT a, b + 4, 1 FROM t1; +INSERT INTO t1 SELECT a + 1, b, 1 FROM t1; +CREATE TABLE t2 (a INT, b INT, c INT, d INT, e INT, f INT, KEY (a,b,c)); +INSERT INTO t2 VALUES (1,1,1,1,1,1), (1,2,1,1,1,1), (1,3,1,1,1,1), +(1,4,1,1,1,1); +INSERT INTO t2 SELECT a, b + 4, c,d,e,f FROM t2; +INSERT INTO t2 SELECT a + 1, b, c,d,e,f FROM t2; +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL a 5 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT a) FROM t1; +COUNT(DISTINCT a) +2 +EXPLAIN SELECT COUNT(DISTINCT a,b) FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL a 10 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT a,b) FROM t1; +COUNT(DISTINCT a,b) +16 +EXPLAIN SELECT COUNT(DISTINCT b,a) FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL a 10 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT b,a) FROM t1; +COUNT(DISTINCT b,a) +16 +EXPLAIN SELECT COUNT(DISTINCT b) FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 10 NULL 16 Using index +SELECT COUNT(DISTINCT b) FROM t1; +COUNT(DISTINCT b) +8 +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL a 5 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT a) FROM t1 GROUP BY a; +COUNT(DISTINCT a) +1 +1 +EXPLAIN SELECT COUNT(DISTINCT b) FROM t1 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL a 10 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT b) FROM t1 GROUP BY a; +COUNT(DISTINCT b) +8 +8 +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 GROUP BY b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 10 NULL 16 Using index; Using filesort +SELECT COUNT(DISTINCT a) FROM t1 GROUP BY b; +COUNT(DISTINCT a) +2 +2 +2 +2 +2 +2 +2 +2 +EXPLAIN SELECT DISTINCT COUNT(DISTINCT a) FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 10 NULL 16 Using index +SELECT DISTINCT COUNT(DISTINCT a) FROM t1; +COUNT(DISTINCT a) +2 +EXPLAIN SELECT COUNT(DISTINCT a, b + 0) FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 10 NULL 16 Using index +SELECT COUNT(DISTINCT a, b + 0) FROM t1; +COUNT(DISTINCT a, b + 0) +16 +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT b) < 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL a 10 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT b) < 10; +COUNT(DISTINCT a) +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT c) < 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 16 +SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT c) < 10; +COUNT(DISTINCT a) +2 +EXPLAIN SELECT 1 FROM t1 HAVING COUNT(DISTINCT a) < 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL a 5 NULL 9 Using index for group-by +SELECT 1 FROM t1 HAVING COUNT(DISTINCT a) < 10; +1 +1 +EXPLAIN SELECT 1 FROM t1 GROUP BY a HAVING COUNT(DISTINCT b) > 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL a 10 NULL 9 Using index for group-by +SELECT 1 FROM t1 GROUP BY a HAVING COUNT(DISTINCT b) > 1; +1 +1 +1 +EXPLAIN SELECT COUNT(DISTINCT t1_1.a) FROM t1 t1_1, t1 t1_2 GROUP BY t1_1.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1_1 index NULL a 10 NULL 16 Using index; Using temporary; Using filesort +1 SIMPLE t1_2 index NULL a 10 NULL 16 Using index; Using join buffer +SELECT COUNT(DISTINCT t1_1.a) FROM t1 t1_1, t1 t1_2 GROUP BY t1_1.a; +COUNT(DISTINCT t1_1.a) +1 +1 +EXPLAIN SELECT COUNT(DISTINCT a), 12 FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL a 5 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT a), 12 FROM t1; +COUNT(DISTINCT a) 12 +2 12 +EXPLAIN SELECT COUNT(DISTINCT a, b, c) FROM t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 15 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT a, b, c) FROM t2; +COUNT(DISTINCT a, b, c) +16 +EXPLAIN SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT a) FROM t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 5 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT a) FROM t2; +COUNT(DISTINCT a) SUM(DISTINCT a) AVG(DISTINCT a) +2 3 1.5000 +EXPLAIN SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT f) FROM t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 16 +SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT f) FROM t2; +COUNT(DISTINCT a) SUM(DISTINCT a) AVG(DISTINCT f) +2 3 1.0000 +EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, a) FROM t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 10 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, a) FROM t2; +COUNT(DISTINCT a, b) COUNT(DISTINCT b, a) +16 16 +EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, f) FROM t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 16 +SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, f) FROM t2; +COUNT(DISTINCT a, b) COUNT(DISTINCT b, f) +16 8 +EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, d) FROM t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 16 +SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, d) FROM t2; +COUNT(DISTINCT a, b) COUNT(DISTINCT b, d) +16 8 +EXPLAIN SELECT a, c, COUNT(DISTINCT c, a, b) FROM t2 GROUP BY a, b, c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 15 NULL 9 Using index for group-by +SELECT a, c, COUNT(DISTINCT c, a, b) FROM t2 GROUP BY a, b, c; +a c COUNT(DISTINCT c, a, b) +1 1 1 +1 1 1 +1 1 1 +1 1 1 +1 1 1 +1 1 1 +1 1 1 +2 1 1 +2 1 1 +2 1 1 +2 1 1 +2 1 1 +2 1 1 +2 1 1 +2 1 1 +2 1 1 +EXPLAIN SELECT COUNT(DISTINCT c, a, b) FROM t2 +WHERE a > 5 AND b BETWEEN 10 AND 20 GROUP BY a, b, c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range a a 15 NULL 1 Using where; Using index for group-by +SELECT COUNT(DISTINCT c, a, b) FROM t2 +WHERE a > 5 AND b BETWEEN 10 AND 20 GROUP BY a, b, c; +COUNT(DISTINCT c, a, b) +EXPLAIN SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 WHERE a = 5 +GROUP BY b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ref a a 5 const 1 Using where; Using index +SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 WHERE a = 5 +GROUP BY b; +COUNT(DISTINCT b) SUM(DISTINCT b) +EXPLAIN SELECT a, COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 10 NULL 9 Using index for group-by +SELECT a, COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a; +a COUNT(DISTINCT b) SUM(DISTINCT b) +2 8 36 +2 8 36 +EXPLAIN SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 10 NULL 9 Using index for group-by +SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a; +COUNT(DISTINCT b) SUM(DISTINCT b) +8 36 +8 36 +EXPLAIN SELECT COUNT(DISTINCT a, b) FROM t2 WHERE c = 13 AND d = 42; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 16 Using where +SELECT COUNT(DISTINCT a, b) FROM t2 WHERE c = 13 AND d = 42; +COUNT(DISTINCT a, b) +0 +EXPLAIN SELECT a, COUNT(DISTINCT a), SUM(DISTINCT a) FROM t2 +WHERE b = 13 AND c = 42 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 15 NULL 9 Using where; Using index for group-by +SELECT a, COUNT(DISTINCT a), SUM(DISTINCT a) FROM t2 +WHERE b = 13 AND c = 42 GROUP BY a; +a COUNT(DISTINCT a) SUM(DISTINCT a) +EXPLAIN SELECT COUNT(DISTINCT a, b), SUM(DISTINCT a) FROM t2 WHERE b = 42; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 10 NULL 9 Using where; Using index for group-by +SELECT COUNT(DISTINCT a, b), SUM(DISTINCT a) FROM t2 WHERE b = 42; +COUNT(DISTINCT a, b) SUM(DISTINCT a) +0 NULL +EXPLAIN SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 5 NULL 9 Using index for group-by +SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a; +SUM(DISTINCT a) MAX(b) +1 8 +2 8 +EXPLAIN SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 15 NULL 9 Using index for group-by +SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c; +42 * (a + c + COUNT(DISTINCT c, a, b)) +126 +126 +126 +126 +126 +126 +126 +168 +168 +168 +168 +168 +168 +168 +168 +168 +EXPLAIN SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL a 5 NULL 9 Using index for group-by +SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a; +(SUM(DISTINCT a) + MAX(b)) +9 +10 +DROP TABLE t1,t2; +# end of WL#3220 tests diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test index c09a4fbf490..3ff3b96d829 100644 --- a/mysql-test/t/group_min_max.test +++ b/mysql-test/t/group_min_max.test @@ -570,13 +570,13 @@ explain select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a'); explain select count(distinct a1,a2,b,c) from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); explain extended select count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); explain select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a'); -explain extended select ord(a1) + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); +explain extended select 98 + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a'); select count(distinct a1,a2,b,c) from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); select count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a'); -select ord(a1) + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); +select 98 + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); # # Queries with expressions in the select clause @@ -1033,3 +1033,124 @@ SELECT a, MAX(b) FROM t WHERE b GROUP BY a; DROP TABLE t; --echo End of 5.1 tests + + +--echo # +--echo # WL#3220 (Loose index scan for COUNT DISTINCT) +--echo # + +CREATE TABLE t1 (a INT, b INT, c INT, KEY (a,b)); +INSERT INTO t1 VALUES (1,1,1), (1,2,1), (1,3,1), (1,4,1); +INSERT INTO t1 SELECT a, b + 4, 1 FROM t1; +INSERT INTO t1 SELECT a + 1, b, 1 FROM t1; +CREATE TABLE t2 (a INT, b INT, c INT, d INT, e INT, f INT, KEY (a,b,c)); +INSERT INTO t2 VALUES (1,1,1,1,1,1), (1,2,1,1,1,1), (1,3,1,1,1,1), + (1,4,1,1,1,1); +INSERT INTO t2 SELECT a, b + 4, c,d,e,f FROM t2; +INSERT INTO t2 SELECT a + 1, b, c,d,e,f FROM t2; + +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1; +SELECT COUNT(DISTINCT a) FROM t1; + +EXPLAIN SELECT COUNT(DISTINCT a,b) FROM t1; +SELECT COUNT(DISTINCT a,b) FROM t1; + +EXPLAIN SELECT COUNT(DISTINCT b,a) FROM t1; +SELECT COUNT(DISTINCT b,a) FROM t1; + +EXPLAIN SELECT COUNT(DISTINCT b) FROM t1; +SELECT COUNT(DISTINCT b) FROM t1; + +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 GROUP BY a; +SELECT COUNT(DISTINCT a) FROM t1 GROUP BY a; + +EXPLAIN SELECT COUNT(DISTINCT b) FROM t1 GROUP BY a; +SELECT COUNT(DISTINCT b) FROM t1 GROUP BY a; + +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 GROUP BY b; +SELECT COUNT(DISTINCT a) FROM t1 GROUP BY b; + +EXPLAIN SELECT DISTINCT COUNT(DISTINCT a) FROM t1; +SELECT DISTINCT COUNT(DISTINCT a) FROM t1; + +EXPLAIN SELECT COUNT(DISTINCT a, b + 0) FROM t1; +SELECT COUNT(DISTINCT a, b + 0) FROM t1; + +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT b) < 10; +SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT b) < 10; + +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT c) < 10; +SELECT COUNT(DISTINCT a) FROM t1 HAVING COUNT(DISTINCT c) < 10; + +EXPLAIN SELECT 1 FROM t1 HAVING COUNT(DISTINCT a) < 10; +SELECT 1 FROM t1 HAVING COUNT(DISTINCT a) < 10; + +EXPLAIN SELECT 1 FROM t1 GROUP BY a HAVING COUNT(DISTINCT b) > 1; +SELECT 1 FROM t1 GROUP BY a HAVING COUNT(DISTINCT b) > 1; + +EXPLAIN SELECT COUNT(DISTINCT t1_1.a) FROM t1 t1_1, t1 t1_2 GROUP BY t1_1.a; +SELECT COUNT(DISTINCT t1_1.a) FROM t1 t1_1, t1 t1_2 GROUP BY t1_1.a; + +EXPLAIN SELECT COUNT(DISTINCT a), 12 FROM t1; +SELECT COUNT(DISTINCT a), 12 FROM t1; + +EXPLAIN SELECT COUNT(DISTINCT a, b, c) FROM t2; +SELECT COUNT(DISTINCT a, b, c) FROM t2; + +EXPLAIN SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT a) FROM t2; +SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT a) FROM t2; + +EXPLAIN SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT f) FROM t2; +SELECT COUNT(DISTINCT a), SUM(DISTINCT a), AVG(DISTINCT f) FROM t2; + +EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, a) FROM t2; +SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, a) FROM t2; + +EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, f) FROM t2; +SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, f) FROM t2; + +EXPLAIN SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, d) FROM t2; +SELECT COUNT(DISTINCT a, b), COUNT(DISTINCT b, d) FROM t2; + +EXPLAIN SELECT a, c, COUNT(DISTINCT c, a, b) FROM t2 GROUP BY a, b, c; +SELECT a, c, COUNT(DISTINCT c, a, b) FROM t2 GROUP BY a, b, c; + +EXPLAIN SELECT COUNT(DISTINCT c, a, b) FROM t2 + WHERE a > 5 AND b BETWEEN 10 AND 20 GROUP BY a, b, c; +SELECT COUNT(DISTINCT c, a, b) FROM t2 + WHERE a > 5 AND b BETWEEN 10 AND 20 GROUP BY a, b, c; + +EXPLAIN SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 WHERE a = 5 + GROUP BY b; +SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 WHERE a = 5 + GROUP BY b; + +EXPLAIN SELECT a, COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a; +SELECT a, COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a; + +EXPLAIN SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a; +SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a; + +EXPLAIN SELECT COUNT(DISTINCT a, b) FROM t2 WHERE c = 13 AND d = 42; +SELECT COUNT(DISTINCT a, b) FROM t2 WHERE c = 13 AND d = 42; + +EXPLAIN SELECT a, COUNT(DISTINCT a), SUM(DISTINCT a) FROM t2 + WHERE b = 13 AND c = 42 GROUP BY a; +SELECT a, COUNT(DISTINCT a), SUM(DISTINCT a) FROM t2 + WHERE b = 13 AND c = 42 GROUP BY a; + +EXPLAIN SELECT COUNT(DISTINCT a, b), SUM(DISTINCT a) FROM t2 WHERE b = 42; +SELECT COUNT(DISTINCT a, b), SUM(DISTINCT a) FROM t2 WHERE b = 42; + +EXPLAIN SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a; +SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a; + +EXPLAIN SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c; +SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c; + +EXPLAIN SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a; +SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a; + +DROP TABLE t1,t2; + +--echo # end of WL#3220 tests -- cgit v1.2.1 From acd1d7c2f5330184bc2f65f4137ed2ebcd359ac9 Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Mon, 28 Sep 2009 13:44:45 +0200 Subject: Disabling tests that are not relevant after BUG#40116, these will be enabled when WL#2867 or associated fixes for 5.1 is added to solve the problem. --- .../suite/rpl_ndb/r/rpl_ndb_mixed_tables.result | 40 ---------------------- .../suite/rpl_ndb/t/rpl_ndb_mixed_tables.test | 24 +++++++++++++ 2 files changed, 24 insertions(+), 40 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result index 92fda774da5..43efc10c2e1 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result @@ -111,22 +111,10 @@ INSERT INTO innodb_ndb VALUES (12); COMMIT; ---- ROLLBACK ---- BEGIN; -INSERT INTO myisam_innodb VALUES (13); -INSERT INTO myisam_innodb VALUES (14); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; INSERT INTO innodb_myisam VALUES (15); INSERT INTO innodb_myisam VALUES (16); ROLLBACK; BEGIN; -INSERT INTO myisam_ndb VALUES (17); -INSERT INTO myisam_ndb VALUES (18); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; INSERT INTO ndb_myisam VALUES (19); INSERT INTO ndb_myisam VALUES (20); ROLLBACK; @@ -167,22 +155,10 @@ INSERT INTO innodb_ndb VALUES (36); COMMIT; ---- ROLLBACK ---- BEGIN; -INSERT INTO myisam_innodb VALUES (37); -INSERT INTO myisam_innodb VALUES (38); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; INSERT INTO innodb_myisam VALUES (39); INSERT INTO innodb_myisam VALUES (40); ROLLBACK; BEGIN; -INSERT INTO myisam_ndb VALUES (41); -INSERT INTO myisam_ndb VALUES (42); -ROLLBACK; -Warnings: -Warning 1196 Some non-transactional changed tables couldn't be rolled back -BEGIN; INSERT INTO ndb_myisam VALUES (43); INSERT INTO ndb_myisam VALUES (44); ROLLBACK; @@ -209,25 +185,15 @@ INSERT INTO innodb_ndb VALUES (59); INSERT INTO innodb_ndb VALUES (60); ==== AUTOCOMMIT=0, single statements, myisam on master ==== SET AUTOCOMMIT = 0; -INSERT INTO myisam_innodb VALUES (61); -INSERT INTO myisam_innodb VALUES (62); -INSERT INTO myisam_ndb VALUES (63); -INSERT INTO myisam_ndb VALUES (64); ==== Show results ==== SELECT * FROM myisam_innodb ORDER BY a; a 1 2 -13 -14 25 26 -37 -38 49 50 -61 -62 SELECT * FROM innodb_myisam ORDER BY a; a 3 @@ -240,16 +206,10 @@ SELECT * FROM myisam_ndb ORDER BY a; a 5 6 -17 -18 29 30 -41 -42 53 54 -63 -64 SELECT * FROM ndb_myisam ORDER BY a; a 7 diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test index 7d7cd5770cf..a20e42f1b24 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test @@ -134,11 +134,15 @@ connection master; --echo ---- ROLLBACK ---- +# This test does not work in ROW mode after the changes introduced in +# BUG#40116. After WL#2687 is pushed, Tests should be added again. +--disable_parsing BEGIN; INSERT INTO myisam_innodb VALUES (13); INSERT INTO myisam_innodb VALUES (14); ROLLBACK; sync_slave_with_master; +--enable_parsing connection master; BEGIN; INSERT INTO innodb_myisam VALUES (15); @@ -147,12 +151,17 @@ ROLLBACK; sync_slave_with_master; connection master; +# This test does not work in ROW mode after the changes introduced in +# BUG#40116. After WL#2687 is pushed, these tests should be enabled +# again. +--disable_parsing BEGIN; INSERT INTO myisam_ndb VALUES (17); INSERT INTO myisam_ndb VALUES (18); ROLLBACK; sync_slave_with_master; connection master; +--enable_parsing BEGIN; INSERT INTO ndb_myisam VALUES (19); INSERT INTO ndb_myisam VALUES (20); @@ -221,12 +230,17 @@ connection master; --echo ---- ROLLBACK ---- +# This test does not work in ROW mode after the changes introduced in +# BUG#40116. After WL#2687 is pushed, these tests should be enabled +# again. +--disable_parsing BEGIN; INSERT INTO myisam_innodb VALUES (37); INSERT INTO myisam_innodb VALUES (38); ROLLBACK; sync_slave_with_master; connection master; +--enable_parsing BEGIN; INSERT INTO innodb_myisam VALUES (39); INSERT INTO innodb_myisam VALUES (40); @@ -234,12 +248,17 @@ ROLLBACK; sync_slave_with_master; connection master; +# This test does not work in ROW mode after the changes introduced in +# BUG#40116. After WL#2687 is pushed, these tests should be enabled +# again. +--disable_parsing BEGIN; INSERT INTO myisam_ndb VALUES (41); INSERT INTO myisam_ndb VALUES (42); ROLLBACK; sync_slave_with_master; connection master; +--enable_parsing BEGIN; INSERT INTO ndb_myisam VALUES (43); INSERT INTO ndb_myisam VALUES (44); @@ -295,6 +314,10 @@ connection master; SET AUTOCOMMIT = 0; +# These tests do not work in ROW mode after the changes introduced in +# BUG#40116. After WL#2687 is pushed, these tests should be enabled +# again. +--disable_parsing # This tests BUG#29288. INSERT INTO myisam_innodb VALUES (61); INSERT INTO myisam_innodb VALUES (62); @@ -305,6 +328,7 @@ INSERT INTO myisam_ndb VALUES (63); INSERT INTO myisam_ndb VALUES (64); sync_slave_with_master; connection master; +--enable_parsing --echo ==== Show results ==== -- cgit v1.2.1 From d28ef002d7c9bd8febf8965134cac802222ba279 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Tue, 29 Sep 2009 00:04:20 +0100 Subject: BUG#28777, WL#4293: SHOW BINLOG EVENTS does not work on relay log files NOTE: this is the backport to next-mr. SHOW BINLOG EVENTS does not work with relay log files. If issuing "SHOW BINLOG EVENTS IN 'relay-log.000001'" in a non-empty relay log file (relay-log.000001), mysql reports empty set. This patch addresses this issue by extending the SHOW command with RELAYLOG. Events in relay log files can now be inspected by issuing SHOW RELAYLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]. --- .../extra/rpl_tests/rpl_show_relaylog_events.inc | 121 +++++++++ mysql-test/include/show_binlog_events.inc | 27 +- mysql-test/include/show_relaylog_events.inc | 35 +++ .../rpl/r/rpl_row_show_relaylog_events.result | 274 +++++++++++++++++++++ .../rpl/r/rpl_stm_mix_show_relaylog_events.result | 148 +++++++++++ .../suite/rpl/t/rpl_row_show_relaylog_events.test | 18 ++ .../rpl/t/rpl_stm_mix_show_relaylog_events.test | 18 ++ 7 files changed, 640 insertions(+), 1 deletion(-) create mode 100644 mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc create mode 100644 mysql-test/include/show_relaylog_events.inc create mode 100644 mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result create mode 100644 mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result create mode 100644 mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test create mode 100644 mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc b/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc new file mode 100644 index 00000000000..50036e564a7 --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc @@ -0,0 +1,121 @@ +-- connection master + +CREATE TABLE t1 (a INT); +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); + +-- echo [MASTER] ********* SOW BINLOG EVENTS IN ... ********* +let $binary_log_file= master-bin.000001; +-- source include/show_binlog_events.inc + +-- echo [MASTER] ********* SOW BINLOG EVENTS ********* +let $binary_log_file= ; +-- source include/show_binlog_events.inc + +-- echo [MASTER] ********* SOW BINLOG EVENTS ... LIMIT rows ********* +let $binary_log_file= ; +let $binary_log_limit_row= 3; +-- source include/show_binlog_events.inc + +-- echo [MASTER] ********* SOW BINLOG EVENTS ... LIMIT offset,rows ********* +let $binary_log_file= ; +let $binary_log_limit_row= 3; +let $binary_log_limit_offset= 1; +-- source include/show_binlog_events.inc + +# clear show_binlog_event/show_relaylog_events parameters +let $binary_log_file= ; +let $binary_log_limit_row= ; +let $binary_log_limit_offset= ; + +-- sync_slave_with_master + +-- echo [SLAVE] ********* SOW BINLOG EVENTS IN ... ********* +let $binary_log_file= slave-bin.000001; +-- source include/show_binlog_events.inc + +-- echo [SLAVE] ********* SOW BINLOG EVENTS ********* +let $binary_log_file= ; +-- source include/show_binlog_events.inc + +-- echo [SLAVE] ********* SOW BINLOG EVENTS ... LIMIT rows ********* +let $binary_log_file= ; +let $binary_log_limit_row= 3; +-- source include/show_binlog_events.inc + +-- echo [SLAVE] ********* SOW BINLOG EVENTS ... LIMIT offset,rows ********* +let $binary_log_file= ; +let $binary_log_limit_row= 3; +let $binary_log_limit_offset= 1; +-- source include/show_binlog_events.inc + +# clear show_binlog_event/show_relaylog_events parameters +let $binary_log_file= ; +let $binary_log_limit_row= ; +let $binary_log_limit_offset= ; + +-- echo [SLAVE] ********* SOW RELAYLOG EVENTS IN ... ********* +let $binary_log_file= slave-relay-bin.000003; +-- source include/show_relaylog_events.inc + +-- echo [SLAVE] ********* SOW RELAYLOG EVENTS ********* +let $binary_log_file= ; +-- source include/show_relaylog_events.inc + +-- echo [MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT rows ********* +let $binary_log_file= slave-relay-bin.000003; +let $binary_log_limit_row= 3; +let $binary_log_limit_offset= ; +-- source include/show_relaylog_events.inc + +-- echo [MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT offset,rows ********* +let $binary_log_file= slave-relay-bin.000003; +let $binary_log_limit_offset= 1; +let $binary_log_limit_row= 3; +-- source include/show_relaylog_events.inc + +FLUSH LOGS; + +-- connection master +FLUSH LOGS; +DROP TABLE t1; + +# clear show_binlog_event/show_relaylog_events parameters +let $binary_log_file= ; +let $binary_log_limit_row= ; +let $binary_log_limit_offset= ; + +-- echo [MASTER] ********* SOW BINLOG EVENTS IN ... ********* +let $binary_log_file= master-bin.000002; +-- source include/show_binlog_events.inc + +-- echo [MASTER] ********* SOW BINLOG EVENTS ********* +let $binary_log_file= ; +-- source include/show_binlog_events.inc + +-- sync_slave_with_master + +-- echo [SLAVE] ********* SOW BINLOG EVENTS IN ... ********* +let $binary_log_file= slave-bin.000002; +-- source include/show_binlog_events.inc + +-- echo [SLAVE] ********* SOW BINLOG EVENTS ********* +let $binary_log_file= ; +-- source include/show_binlog_events.inc + +-- echo [SLAVE] ********* SOW RELAYLOG EVENTS IN ... ********* +let $binary_log_file= slave-relay-bin.000005; +-- source include/show_relaylog_events.inc + +-- echo [SLAVE] ********* SOW RELAYLOG EVENTS ********* +let $binary_log_file= ; +-- source include/show_relaylog_events.inc + +# clear show_binlog_event/show_relaylog_events parameters +let $binary_log_name= ; +let $binary_log_limit_row= ; +let $binary_log_limit_offset= ; diff --git a/mysql-test/include/show_binlog_events.inc b/mysql-test/include/show_binlog_events.inc index 68f913a16a3..353ee0e3ce9 100644 --- a/mysql-test/include/show_binlog_events.inc +++ b/mysql-test/include/show_binlog_events.inc @@ -1,10 +1,35 @@ # $binlog_start can be set by caller or take a default value +# $binary_log_file the name of the log file show +# $binary_log_limit_row - sets the number of binlog rows to be returned +# $binary_log_limit_offset - sets the offset where to start returning events + +let $show_binlog_events= show binlog events; if (!$binlog_start) { + # defaults to chop the first event in the binary log let $binlog_start=106; } + +if (!`SELECT '$binary_log_file' = ''`) +{ + let $show_binlog_events= $show_binlog_events in '$binary_log_file'; +} +let $show_binlog_events= $show_binlog_events from $binlog_start; + +if ($binary_log_limit_row) +{ + let $limit= limit; + if ($binary_log_limit_offset) + { + let $limit= $limit $binary_log_limit_offset, ; + } + + let $limit= $limit $binary_log_limit_row; + let $show_binlog_events= $show_binlog_events $limit; +} + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start --replace_column 2 # 4 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ ---eval show binlog events from $binlog_start +--eval $show_binlog_events diff --git a/mysql-test/include/show_relaylog_events.inc b/mysql-test/include/show_relaylog_events.inc new file mode 100644 index 00000000000..6f63b055d58 --- /dev/null +++ b/mysql-test/include/show_relaylog_events.inc @@ -0,0 +1,35 @@ +# $binlog_start can be set by caller or take a default value +# $binary_log_file the name of the log file show +# $binary_log_limit_row - sets the number of binlog rows to be returned +# $binary_log_limit_offset - sets the offset where to start returning events + +let $show_binlog_events= show relaylog events; + +if (!$binlog_start) +{ + # defaults to chop the first event in the binary log + let $binlog_start=106; +} + +if (!`SELECT '$binary_log_file' = ''`) +{ + let $show_binlog_events= $show_binlog_events in '$binary_log_file'; +} +let $show_binlog_events= $show_binlog_events from $binlog_start; + +if ($binary_log_limit_row) +{ + let $limit= limit; + if ($binary_log_limit_offset) + { + let $limit= $limit $binary_log_limit_offset, ; + } + + let $limit= $limit $binary_log_limit_row; + let $show_binlog_events= $show_binlog_events $limit; +} + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start +--replace_column 2 # 4 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /Server ver:.*$/SERVER_VERSION, BINLOG_VERSION/ +--eval $show_binlog_events diff --git a/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result b/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result new file mode 100644 index 00000000000..461ab14a93a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result @@ -0,0 +1,274 @@ +stop slave; +drop table if exists t1,t2,t3,t4,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 (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); +[MASTER] ********* SOW BINLOG EVENTS IN ... ********* +show binlog events in 'master-bin.000001' 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 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +[MASTER] ********* SOW BINLOG EVENTS ********* +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 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +[MASTER] ********* SOW BINLOG EVENTS ... LIMIT rows ********* +show binlog events from limit 3; +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 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +[MASTER] ********* SOW BINLOG EVENTS ... LIMIT offset,rows ********* +show binlog events from limit 1, 3; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +[SLAVE] ********* SOW BINLOG EVENTS IN ... ********* +show binlog events in 'slave-bin.000001' from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +[SLAVE] ********* SOW BINLOG EVENTS ********* +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +[SLAVE] ********* SOW BINLOG EVENTS ... LIMIT rows ********* +show binlog events from limit 3; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +[SLAVE] ********* SOW BINLOG EVENTS ... LIMIT offset,rows ********* +show binlog events from limit 1, 3; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +[SLAVE] ********* SOW RELAYLOG EVENTS IN ... ********* +show relaylog events in 'slave-relay-bin.000003' from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4 +slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-relay-bin.000003 # Query # # BEGIN +slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000003 # Query # # COMMIT +slave-relay-bin.000003 # Query # # BEGIN +slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000003 # Query # # COMMIT +slave-relay-bin.000003 # Query # # BEGIN +slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000003 # Query # # COMMIT +slave-relay-bin.000003 # Query # # BEGIN +slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000003 # Query # # COMMIT +slave-relay-bin.000003 # Query # # BEGIN +slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000003 # Query # # COMMIT +slave-relay-bin.000003 # Query # # BEGIN +slave-relay-bin.000003 # Table_map # # table_id: # (test.t1) +slave-relay-bin.000003 # Write_rows # # table_id: # flags: STMT_END_F +slave-relay-bin.000003 # Query # # COMMIT +[SLAVE] ********* SOW RELAYLOG EVENTS ********* +show relaylog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000002 # Rotate # # slave-relay-bin.000003;pos=4 +[MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT rows ********* +show relaylog events in 'slave-relay-bin.000003' from limit 3; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4 +slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) +[MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT offset,rows ********* +show relaylog events in 'slave-relay-bin.000003' from limit 1, 3; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-relay-bin.000003 # Query # # BEGIN +FLUSH LOGS; +FLUSH LOGS; +DROP TABLE t1; +[MASTER] ********* SOW BINLOG EVENTS IN ... ********* +show binlog events in 'master-bin.000002' from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query # # use `test`; DROP TABLE t1 +[MASTER] ********* SOW BINLOG EVENTS ********* +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 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Query # # 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 # # COMMIT +master-bin.000001 # Rotate # # master-bin.000002;pos=4 +[SLAVE] ********* SOW BINLOG EVENTS IN ... ********* +show binlog events in 'slave-bin.000002' from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Query # # use `test`; DROP TABLE t1 +[SLAVE] ********* SOW BINLOG EVENTS ********* +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Query # # BEGIN +slave-bin.000001 # Table_map # # table_id: # (test.t1) +slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Rotate # # slave-bin.000002;pos=4 +[SLAVE] ********* SOW RELAYLOG EVENTS IN ... ********* +show relaylog events in 'slave-relay-bin.000005' from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=4 +slave-relay-bin.000005 # Rotate # # slave-relay-bin.000006;pos=4 +[SLAVE] ********* SOW RELAYLOG EVENTS ********* +show relaylog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=4 +slave-relay-bin.000005 # Rotate # # slave-relay-bin.000006;pos=4 diff --git a/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result b/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result new file mode 100644 index 00000000000..512a72c3040 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result @@ -0,0 +1,148 @@ +stop slave; +drop table if exists t1,t2,t3,t4,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 (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); +[MASTER] ********* SOW BINLOG EVENTS IN ... ********* +show binlog events in 'master-bin.000001' 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 # Query # # use `test`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6) +[MASTER] ********* SOW BINLOG EVENTS ********* +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 # Query # # use `test`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6) +[MASTER] ********* SOW BINLOG EVENTS ... LIMIT rows ********* +show binlog events from limit 3; +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 # Query # # use `test`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +[MASTER] ********* SOW BINLOG EVENTS ... LIMIT offset,rows ********* +show binlog events from limit 1, 3; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +[SLAVE] ********* SOW BINLOG EVENTS IN ... ********* +show binlog events in 'slave-bin.000001' from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6) +[SLAVE] ********* SOW BINLOG EVENTS ********* +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6) +[SLAVE] ********* SOW BINLOG EVENTS ... LIMIT rows ********* +show binlog events from limit 3; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +[SLAVE] ********* SOW BINLOG EVENTS ... LIMIT offset,rows ********* +show binlog events from limit 1, 3; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +[SLAVE] ********* SOW RELAYLOG EVENTS IN ... ********* +show relaylog events in 'slave-relay-bin.000003' from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4 +slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (1) +slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (2) +slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (3) +slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (4) +slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (5) +slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (6) +[SLAVE] ********* SOW RELAYLOG EVENTS ********* +show relaylog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000002 # Rotate # # slave-relay-bin.000003;pos=4 +[MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT rows ********* +show relaylog events in 'slave-relay-bin.000003' from limit 3; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000003 # Rotate # # master-bin.000001;pos=4 +slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) +[MASTER] ********* SOW RELAYLOG EVENTS ... LIMIT offset,rows ********* +show relaylog events in 'slave-relay-bin.000003' from limit 1, 3; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION +slave-relay-bin.000003 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-relay-bin.000003 # Query # # use `test`; INSERT INTO t1 VALUES (1) +FLUSH LOGS; +FLUSH LOGS; +DROP TABLE t1; +[MASTER] ********* SOW BINLOG EVENTS IN ... ********* +show binlog events in 'master-bin.000002' from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query # # use `test`; DROP TABLE t1 +[MASTER] ********* SOW BINLOG EVENTS ********* +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 # Query # # use `test`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5) +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6) +master-bin.000001 # Rotate # # master-bin.000002;pos=4 +[SLAVE] ********* SOW BINLOG EVENTS IN ... ********* +show binlog events in 'slave-bin.000002' from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 # Query # # use `test`; DROP TABLE t1 +[SLAVE] ********* SOW BINLOG EVENTS ********* +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5) +slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6) +slave-bin.000001 # Rotate # # slave-bin.000002;pos=4 +[SLAVE] ********* SOW RELAYLOG EVENTS IN ... ********* +show relaylog events in 'slave-relay-bin.000005' from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=4 +slave-relay-bin.000005 # Rotate # # slave-relay-bin.000006;pos=4 +[SLAVE] ********* SOW RELAYLOG EVENTS ********* +show relaylog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +slave-relay-bin.000005 # Rotate # # master-bin.000002;pos=4 +slave-relay-bin.000005 # Rotate # # slave-relay-bin.000006;pos=4 diff --git a/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test b/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test new file mode 100644 index 00000000000..6a426efc7ea --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test @@ -0,0 +1,18 @@ +# BUG#28777 SHOW BINLOG EVENTS does not work on relay log files +# +# GOAL +# ==== +# +# Test that SHOW BINLOG EVENTS and the new SHOW RELAYLOG EVENTS works after +# the patch, both on master and slave. +# +# HOW +# === +# +# This test issues SHOW [BINLOG|RELAYLOG] EVENTS both on master and slave after +# some statements have been issued. + +-- source include/master-slave.inc +-- source include/have_binlog_format_row.inc + +-- source extra/rpl_tests/rpl_show_relaylog_events.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test b/mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test new file mode 100644 index 00000000000..523e883d9fa --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test @@ -0,0 +1,18 @@ +# BUG#28777 SHOW BINLOG EVENTS does not work on relay log files +# +# GOAL +# ==== +# +# Test that SHOW BINLOG EVENTS and the new SHOW RELAYLOG EVENTS works after +# the patch, both on master and slave. +# +# HOW +# === +# +# This test issues SHOW [BINLOG|RELAYLOG] EVENTS both on master and slave after +# some statements have been issued. + +-- source include/master-slave.inc +-- source include/have_binlog_format_mixed_or_statement.inc + +-- source extra/rpl_tests/rpl_show_relaylog_events.inc -- cgit v1.2.1 From c03549bf05270b645c118e3bd74b07f386ef6a1b Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Tue, 29 Sep 2009 14:16:23 +0300 Subject: WL#342 heartbeat backporting from 6.0 code base to 5.1. --- mysql-test/extra/binlog_tests/binlog.test | 4 +- .../binlog_tests/mix_innodb_myisam_binlog.test | 4 +- mysql-test/extra/rpl_tests/rpl_loaddata.test | 6 +- mysql-test/extra/rpl_tests/rpl_log.test | 6 +- mysql-test/include/show_binlog_events.inc | 2 +- mysql-test/include/show_binlog_events2.inc | 2 +- mysql-test/r/sp_trans_log.result | 12 +- mysql-test/suite/binlog/r/binlog_innodb.result | 10 +- mysql-test/suite/binlog/r/binlog_row_binlog.result | 1617 ++++++++++---------- mysql-test/suite/binlog/r/binlog_stm_binlog.result | 8 +- mysql-test/suite/binlog/t/binlog_innodb.test | 6 +- mysql-test/suite/binlog/t/binlog_killed.test | 2 +- .../suite/binlog/t/binlog_killed_simulate.test | 4 +- mysql-test/suite/rpl/r/rpl_binlog_grant.result | 42 +- mysql-test/suite/rpl/r/rpl_deadlock_innodb.result | 2 +- mysql-test/suite/rpl/r/rpl_extraCol_innodb.result | 4 +- mysql-test/suite/rpl/r/rpl_extraCol_myisam.result | 4 +- .../suite/rpl/r/rpl_known_bugs_detection.result | 4 +- mysql-test/suite/rpl/r/rpl_loaddata.result | 126 +- mysql-test/suite/rpl/r/rpl_loaddata_fatal.result | 8 +- mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result | 4 +- mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result | 12 +- mysql-test/suite/rpl/r/rpl_row_conflicts.result | 4 +- mysql-test/suite/rpl/r/rpl_row_create_table.result | 138 +- mysql-test/suite/rpl/r/rpl_row_drop.result | 8 +- mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result | 4 +- mysql-test/suite/rpl/r/rpl_row_log.result | 10 +- mysql-test/suite/rpl/r/rpl_row_log_innodb.result | 10 +- mysql-test/suite/rpl/r/rpl_slave_skip.result | 8 +- mysql-test/suite/rpl/r/rpl_sp.result | 178 +-- mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result | 4 +- mysql-test/suite/rpl/r/rpl_stm_log.result | 10 +- mysql-test/suite/rpl/t/rpl_binlog_grant.test | 8 +- mysql-test/suite/rpl/t/rpl_row_create_table.test | 16 +- mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test | 2 +- mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test | 8 +- mysql-test/suite/rpl/t/rpl_sp.test | 4 +- mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test | 2 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result | 10 +- .../suite/rpl_ndb/r/rpl_truncate_7ndb.result | 68 +- mysql-test/t/ctype_cp932_binlog_stm.test | 4 +- mysql-test/t/mysqlbinlog.test | 6 +- mysql-test/t/mysqlbinlog2.test | 20 +- mysql-test/t/sp_trans_log.test | 3 +- 44 files changed, 1268 insertions(+), 1146 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test index 5d898d41a54..08510d661e2 100644 --- a/mysql-test/extra/binlog_tests/binlog.test +++ b/mysql-test/extra/binlog_tests/binlog.test @@ -43,10 +43,10 @@ commit; drop table t1; --replace_column 2 # 5 # --replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\// -show binlog events in 'master-bin.000001' from 106; +show binlog events in 'master-bin.000001' from 107; --replace_column 2 # 5 # --replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\// -show binlog events in 'master-bin.000002' from 106; +show binlog events in 'master-bin.000002' from 107; # diff --git a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test index 5db79e4f848..da0b77fbc23 100644 --- a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test +++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test @@ -323,12 +323,12 @@ let $MYSQLD_DATADIR= `select @@datadir`; # and does not make slave to stop) if (`select @@binlog_format = 'ROW'`) { - --exec $MYSQL_BINLOG --start-position=524 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output + --exec $MYSQL_BINLOG --start-position=525 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output } if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`) { - --exec $MYSQL_BINLOG --start-position=555 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output + --exec $MYSQL_BINLOG --start-position=556 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output } --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test index 26916642cae..129a39ac509 100644 --- a/mysql-test/extra/rpl_tests/rpl_loaddata.test +++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test @@ -72,7 +72,7 @@ start slave; sync_with_master; --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; +--query_vertical show slave status; # Trigger error again to test CHANGE MASTER @@ -94,7 +94,7 @@ change master to master_user='test'; change master to master_user='root'; --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; +--query_vertical show slave status; # Trigger error again to test RESET SLAVE @@ -116,7 +116,7 @@ stop slave; reset slave; --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 8 # 9 # 16 # 23 # 33 # -show slave status; +--query_vertical show slave status; # Finally, see if logging is done ok on master for a failing LOAD DATA INFILE diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index e4ebfd68761..0517fea1be3 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -37,13 +37,13 @@ select count(*) from t1; show binlog events; --replace_column 2 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -show binlog events from 106 limit 1; +show binlog events from 107 limit 1; --replace_column 2 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -show binlog events from 106 limit 2; +show binlog events from 107 limit 2; --replace_column 2 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -show binlog events from 106 limit 2,1; +show binlog events from 107 limit 2,1; flush logs; # We need an extra update before doing save_master_pos. diff --git a/mysql-test/include/show_binlog_events.inc b/mysql-test/include/show_binlog_events.inc index 68f913a16a3..93014d9f1a3 100644 --- a/mysql-test/include/show_binlog_events.inc +++ b/mysql-test/include/show_binlog_events.inc @@ -2,7 +2,7 @@ if (!$binlog_start) { - let $binlog_start=106; + let $binlog_start=107; } --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start --replace_column 2 # 4 # 5 # diff --git a/mysql-test/include/show_binlog_events2.inc b/mysql-test/include/show_binlog_events2.inc index 5dd272c562d..0e1a889bacc 100644 --- a/mysql-test/include/show_binlog_events2.inc +++ b/mysql-test/include/show_binlog_events2.inc @@ -1,4 +1,4 @@ ---let $binlog_start=106 +--let $binlog_start=107 --replace_result $binlog_start --replace_column 2 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ diff --git a/mysql-test/r/sp_trans_log.result b/mysql-test/r/sp_trans_log.result index 7a6173b89e2..3eec6f70063 100644 --- a/mysql-test/r/sp_trans_log.result +++ b/mysql-test/r/sp_trans_log.result @@ -14,13 +14,13 @@ end| reset master| insert into t2 values (bug23333(),1)| ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -show binlog events from 106 /* with fixes for #23333 will show there is the query */| +show binlog events from | 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 # Table_map 1 # # -master-bin.000001 # Write_rows 1 # # -master-bin.000001 # Query 1 # # +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Table_map # # table_id: # (test.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`; ROLLBACK select count(*),@a from t1 /* must be 1,1 */| count(*) @a 1 1 diff --git a/mysql-test/suite/binlog/r/binlog_innodb.result b/mysql-test/suite/binlog/r/binlog_innodb.result index 1922897f631..424f7d60829 100644 --- a/mysql-test/suite/binlog/r/binlog_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_innodb.result @@ -156,9 +156,10 @@ select * from t2 /* must be (3,1), (4,4) */; a b 1 1 4 4 -show master status /* there must no UPDATE in binlog */; +there must no UPDATE in binlog +show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 106 +master-bin.000001 # delete from t1; delete from t2; insert into t1 values (1,2),(3,4),(4,4); @@ -166,8 +167,9 @@ insert into t2 values (1,2),(3,4),(4,4); reset master; UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a; ERROR 23000: Duplicate entry '4' for key 'PRIMARY' -show master status /* there must be no UPDATE query event */; +there must no UPDATE in binlog +show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 106 +master-bin.000001 # drop table t1, t2; End of tests diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index f6b5392dbc8..d2d702b12a0 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -26,7 +26,7 @@ create table t1 (n int) engine=innodb; begin; commit; drop table t1; -show binlog events in 'master-bin.000001' from 106; +show binlog events in 'master-bin.000001' from 107; 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 # BEGIN @@ -232,7 +232,7 @@ 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; +show binlog events in 'master-bin.000002' from 107; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Query 1 # use `test`; drop table t1 set @ac = @@autocommit; @@ -273,802 +273,819 @@ master-bin.000001 349 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 Table_map 1 465 table_id: # (test.t1) master-bin.000001 465 Write_rows 1 499 table_id: # flags: STMT_END_F -master-bin.000001 499 Table_map 1 540 table_id: # (test.t1) -master-bin.000001 540 Write_rows 1 574 table_id: # flags: STMT_END_F -master-bin.000001 574 Table_map 1 615 table_id: # (test.t1) -master-bin.000001 615 Write_rows 1 649 table_id: # flags: STMT_END_F -master-bin.000001 649 Table_map 1 690 table_id: # (test.t1) -master-bin.000001 690 Write_rows 1 724 table_id: # flags: STMT_END_F -master-bin.000001 724 Table_map 1 765 table_id: # (test.t1) -master-bin.000001 765 Write_rows 1 799 table_id: # flags: STMT_END_F -master-bin.000001 799 Table_map 1 840 table_id: # (test.t1) -master-bin.000001 840 Write_rows 1 874 table_id: # flags: STMT_END_F -master-bin.000001 874 Table_map 1 915 table_id: # (test.t1) -master-bin.000001 915 Write_rows 1 949 table_id: # flags: STMT_END_F -master-bin.000001 949 Table_map 1 990 table_id: # (test.t1) -master-bin.000001 990 Write_rows 1 1024 table_id: # flags: STMT_END_F -master-bin.000001 1024 Table_map 1 1065 table_id: # (test.t1) -master-bin.000001 1065 Write_rows 1 1099 table_id: # flags: STMT_END_F -master-bin.000001 1099 Table_map 1 1140 table_id: # (test.t1) -master-bin.000001 1140 Write_rows 1 1174 table_id: # flags: STMT_END_F -master-bin.000001 1174 Table_map 1 1215 table_id: # (test.t1) -master-bin.000001 1215 Write_rows 1 1249 table_id: # flags: STMT_END_F -master-bin.000001 1249 Table_map 1 1290 table_id: # (test.t1) -master-bin.000001 1290 Write_rows 1 1324 table_id: # flags: STMT_END_F -master-bin.000001 1324 Table_map 1 1365 table_id: # (test.t1) -master-bin.000001 1365 Write_rows 1 1399 table_id: # flags: STMT_END_F -master-bin.000001 1399 Table_map 1 1440 table_id: # (test.t1) -master-bin.000001 1440 Write_rows 1 1474 table_id: # flags: STMT_END_F -master-bin.000001 1474 Table_map 1 1515 table_id: # (test.t1) -master-bin.000001 1515 Write_rows 1 1549 table_id: # flags: STMT_END_F -master-bin.000001 1549 Table_map 1 1590 table_id: # (test.t1) -master-bin.000001 1590 Write_rows 1 1624 table_id: # flags: STMT_END_F -master-bin.000001 1624 Table_map 1 1665 table_id: # (test.t1) -master-bin.000001 1665 Write_rows 1 1699 table_id: # flags: STMT_END_F -master-bin.000001 1699 Table_map 1 1740 table_id: # (test.t1) -master-bin.000001 1740 Write_rows 1 1774 table_id: # flags: STMT_END_F -master-bin.000001 1774 Table_map 1 1815 table_id: # (test.t1) -master-bin.000001 1815 Write_rows 1 1849 table_id: # flags: STMT_END_F -master-bin.000001 1849 Table_map 1 1890 table_id: # (test.t1) -master-bin.000001 1890 Write_rows 1 1924 table_id: # flags: STMT_END_F -master-bin.000001 1924 Table_map 1 1965 table_id: # (test.t1) -master-bin.000001 1965 Write_rows 1 1999 table_id: # flags: STMT_END_F -master-bin.000001 1999 Table_map 1 2040 table_id: # (test.t1) -master-bin.000001 2040 Write_rows 1 2074 table_id: # flags: STMT_END_F -master-bin.000001 2074 Table_map 1 2115 table_id: # (test.t1) -master-bin.000001 2115 Write_rows 1 2149 table_id: # flags: STMT_END_F -master-bin.000001 2149 Table_map 1 2190 table_id: # (test.t1) -master-bin.000001 2190 Write_rows 1 2224 table_id: # flags: STMT_END_F -master-bin.000001 2224 Table_map 1 2265 table_id: # (test.t1) -master-bin.000001 2265 Write_rows 1 2299 table_id: # flags: STMT_END_F -master-bin.000001 2299 Table_map 1 2340 table_id: # (test.t1) -master-bin.000001 2340 Write_rows 1 2374 table_id: # flags: STMT_END_F -master-bin.000001 2374 Table_map 1 2415 table_id: # (test.t1) -master-bin.000001 2415 Write_rows 1 2449 table_id: # flags: STMT_END_F -master-bin.000001 2449 Table_map 1 2490 table_id: # (test.t1) -master-bin.000001 2490 Write_rows 1 2524 table_id: # flags: STMT_END_F -master-bin.000001 2524 Table_map 1 2565 table_id: # (test.t1) -master-bin.000001 2565 Write_rows 1 2599 table_id: # flags: STMT_END_F -master-bin.000001 2599 Table_map 1 2640 table_id: # (test.t1) -master-bin.000001 2640 Write_rows 1 2674 table_id: # flags: STMT_END_F -master-bin.000001 2674 Table_map 1 2715 table_id: # (test.t1) -master-bin.000001 2715 Write_rows 1 2749 table_id: # flags: STMT_END_F -master-bin.000001 2749 Table_map 1 2790 table_id: # (test.t1) -master-bin.000001 2790 Write_rows 1 2824 table_id: # flags: STMT_END_F -master-bin.000001 2824 Table_map 1 2865 table_id: # (test.t1) -master-bin.000001 2865 Write_rows 1 2899 table_id: # flags: STMT_END_F -master-bin.000001 2899 Table_map 1 2940 table_id: # (test.t1) -master-bin.000001 2940 Write_rows 1 2974 table_id: # flags: STMT_END_F -master-bin.000001 2974 Table_map 1 3015 table_id: # (test.t1) -master-bin.000001 3015 Write_rows 1 3049 table_id: # flags: STMT_END_F -master-bin.000001 3049 Table_map 1 3090 table_id: # (test.t1) -master-bin.000001 3090 Write_rows 1 3124 table_id: # flags: STMT_END_F -master-bin.000001 3124 Table_map 1 3165 table_id: # (test.t1) -master-bin.000001 3165 Write_rows 1 3199 table_id: # flags: STMT_END_F -master-bin.000001 3199 Table_map 1 3240 table_id: # (test.t1) -master-bin.000001 3240 Write_rows 1 3274 table_id: # flags: STMT_END_F -master-bin.000001 3274 Table_map 1 3315 table_id: # (test.t1) -master-bin.000001 3315 Write_rows 1 3349 table_id: # flags: STMT_END_F -master-bin.000001 3349 Table_map 1 3390 table_id: # (test.t1) -master-bin.000001 3390 Write_rows 1 3424 table_id: # flags: STMT_END_F -master-bin.000001 3424 Table_map 1 3465 table_id: # (test.t1) -master-bin.000001 3465 Write_rows 1 3499 table_id: # flags: STMT_END_F -master-bin.000001 3499 Table_map 1 3540 table_id: # (test.t1) -master-bin.000001 3540 Write_rows 1 3574 table_id: # flags: STMT_END_F -master-bin.000001 3574 Table_map 1 3615 table_id: # (test.t1) -master-bin.000001 3615 Write_rows 1 3649 table_id: # flags: STMT_END_F -master-bin.000001 3649 Table_map 1 3690 table_id: # (test.t1) -master-bin.000001 3690 Write_rows 1 3724 table_id: # flags: STMT_END_F -master-bin.000001 3724 Table_map 1 3765 table_id: # (test.t1) -master-bin.000001 3765 Write_rows 1 3799 table_id: # flags: STMT_END_F -master-bin.000001 3799 Table_map 1 3840 table_id: # (test.t1) -master-bin.000001 3840 Write_rows 1 3874 table_id: # flags: STMT_END_F -master-bin.000001 3874 Table_map 1 3915 table_id: # (test.t1) -master-bin.000001 3915 Write_rows 1 3949 table_id: # flags: STMT_END_F -master-bin.000001 3949 Table_map 1 3990 table_id: # (test.t1) -master-bin.000001 3990 Write_rows 1 4024 table_id: # flags: STMT_END_F -master-bin.000001 4024 Table_map 1 4065 table_id: # (test.t1) -master-bin.000001 4065 Write_rows 1 4099 table_id: # flags: STMT_END_F -master-bin.000001 4099 Table_map 1 4140 table_id: # (test.t1) -master-bin.000001 4140 Write_rows 1 4174 table_id: # flags: STMT_END_F -master-bin.000001 4174 Table_map 1 4215 table_id: # (test.t1) -master-bin.000001 4215 Write_rows 1 4249 table_id: # flags: STMT_END_F -master-bin.000001 4249 Table_map 1 4290 table_id: # (test.t1) -master-bin.000001 4290 Write_rows 1 4324 table_id: # flags: STMT_END_F -master-bin.000001 4324 Table_map 1 4365 table_id: # (test.t1) -master-bin.000001 4365 Write_rows 1 4399 table_id: # flags: STMT_END_F -master-bin.000001 4399 Table_map 1 4440 table_id: # (test.t1) -master-bin.000001 4440 Write_rows 1 4474 table_id: # flags: STMT_END_F -master-bin.000001 4474 Table_map 1 4515 table_id: # (test.t1) -master-bin.000001 4515 Write_rows 1 4549 table_id: # flags: STMT_END_F -master-bin.000001 4549 Table_map 1 4590 table_id: # (test.t1) -master-bin.000001 4590 Write_rows 1 4624 table_id: # flags: STMT_END_F -master-bin.000001 4624 Table_map 1 4665 table_id: # (test.t1) -master-bin.000001 4665 Write_rows 1 4699 table_id: # flags: STMT_END_F -master-bin.000001 4699 Table_map 1 4740 table_id: # (test.t1) -master-bin.000001 4740 Write_rows 1 4774 table_id: # flags: STMT_END_F -master-bin.000001 4774 Table_map 1 4815 table_id: # (test.t1) -master-bin.000001 4815 Write_rows 1 4849 table_id: # flags: STMT_END_F -master-bin.000001 4849 Table_map 1 4890 table_id: # (test.t1) -master-bin.000001 4890 Write_rows 1 4924 table_id: # flags: STMT_END_F -master-bin.000001 4924 Table_map 1 4965 table_id: # (test.t1) -master-bin.000001 4965 Write_rows 1 4999 table_id: # flags: STMT_END_F -master-bin.000001 4999 Table_map 1 5040 table_id: # (test.t1) -master-bin.000001 5040 Write_rows 1 5074 table_id: # flags: STMT_END_F -master-bin.000001 5074 Table_map 1 5115 table_id: # (test.t1) -master-bin.000001 5115 Write_rows 1 5149 table_id: # flags: STMT_END_F -master-bin.000001 5149 Table_map 1 5190 table_id: # (test.t1) -master-bin.000001 5190 Write_rows 1 5224 table_id: # flags: STMT_END_F -master-bin.000001 5224 Table_map 1 5265 table_id: # (test.t1) -master-bin.000001 5265 Write_rows 1 5299 table_id: # flags: STMT_END_F -master-bin.000001 5299 Table_map 1 5340 table_id: # (test.t1) -master-bin.000001 5340 Write_rows 1 5374 table_id: # flags: STMT_END_F -master-bin.000001 5374 Table_map 1 5415 table_id: # (test.t1) -master-bin.000001 5415 Write_rows 1 5449 table_id: # flags: STMT_END_F -master-bin.000001 5449 Table_map 1 5490 table_id: # (test.t1) -master-bin.000001 5490 Write_rows 1 5524 table_id: # flags: STMT_END_F -master-bin.000001 5524 Table_map 1 5565 table_id: # (test.t1) -master-bin.000001 5565 Write_rows 1 5599 table_id: # flags: STMT_END_F -master-bin.000001 5599 Table_map 1 5640 table_id: # (test.t1) -master-bin.000001 5640 Write_rows 1 5674 table_id: # flags: STMT_END_F -master-bin.000001 5674 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 5790 table_id: # (test.t1) -master-bin.000001 5790 Write_rows 1 5824 table_id: # flags: STMT_END_F -master-bin.000001 5824 Table_map 1 5865 table_id: # (test.t1) -master-bin.000001 5865 Write_rows 1 5899 table_id: # flags: STMT_END_F -master-bin.000001 5899 Table_map 1 5940 table_id: # (test.t1) -master-bin.000001 5940 Write_rows 1 5974 table_id: # flags: STMT_END_F -master-bin.000001 5974 Table_map 1 6015 table_id: # (test.t1) -master-bin.000001 6015 Write_rows 1 6049 table_id: # flags: STMT_END_F -master-bin.000001 6049 Table_map 1 6090 table_id: # (test.t1) -master-bin.000001 6090 Write_rows 1 6124 table_id: # flags: STMT_END_F -master-bin.000001 6124 Table_map 1 6165 table_id: # (test.t1) -master-bin.000001 6165 Write_rows 1 6199 table_id: # flags: STMT_END_F -master-bin.000001 6199 Table_map 1 6240 table_id: # (test.t1) -master-bin.000001 6240 Write_rows 1 6274 table_id: # flags: STMT_END_F -master-bin.000001 6274 Table_map 1 6315 table_id: # (test.t1) -master-bin.000001 6315 Write_rows 1 6349 table_id: # flags: STMT_END_F -master-bin.000001 6349 Table_map 1 6390 table_id: # (test.t1) -master-bin.000001 6390 Write_rows 1 6424 table_id: # flags: STMT_END_F -master-bin.000001 6424 Table_map 1 6465 table_id: # (test.t1) -master-bin.000001 6465 Write_rows 1 6499 table_id: # flags: STMT_END_F -master-bin.000001 6499 Table_map 1 6540 table_id: # (test.t1) -master-bin.000001 6540 Write_rows 1 6574 table_id: # flags: STMT_END_F -master-bin.000001 6574 Table_map 1 6615 table_id: # (test.t1) -master-bin.000001 6615 Write_rows 1 6649 table_id: # flags: STMT_END_F -master-bin.000001 6649 Table_map 1 6690 table_id: # (test.t1) -master-bin.000001 6690 Write_rows 1 6724 table_id: # flags: STMT_END_F -master-bin.000001 6724 Table_map 1 6765 table_id: # (test.t1) -master-bin.000001 6765 Write_rows 1 6799 table_id: # flags: STMT_END_F -master-bin.000001 6799 Table_map 1 6840 table_id: # (test.t1) -master-bin.000001 6840 Write_rows 1 6874 table_id: # flags: STMT_END_F -master-bin.000001 6874 Table_map 1 6915 table_id: # (test.t1) -master-bin.000001 6915 Write_rows 1 6949 table_id: # flags: STMT_END_F -master-bin.000001 6949 Table_map 1 6990 table_id: # (test.t1) -master-bin.000001 6990 Write_rows 1 7024 table_id: # flags: STMT_END_F -master-bin.000001 7024 Table_map 1 7065 table_id: # (test.t1) -master-bin.000001 7065 Write_rows 1 7099 table_id: # flags: STMT_END_F -master-bin.000001 7099 Table_map 1 7140 table_id: # (test.t1) -master-bin.000001 7140 Write_rows 1 7174 table_id: # flags: STMT_END_F -master-bin.000001 7174 Table_map 1 7215 table_id: # (test.t1) -master-bin.000001 7215 Write_rows 1 7249 table_id: # flags: STMT_END_F -master-bin.000001 7249 Table_map 1 7290 table_id: # (test.t1) -master-bin.000001 7290 Write_rows 1 7324 table_id: # flags: STMT_END_F -master-bin.000001 7324 Table_map 1 7365 table_id: # (test.t1) -master-bin.000001 7365 Write_rows 1 7399 table_id: # flags: STMT_END_F -master-bin.000001 7399 Table_map 1 7440 table_id: # (test.t1) -master-bin.000001 7440 Write_rows 1 7474 table_id: # flags: STMT_END_F -master-bin.000001 7474 Table_map 1 7515 table_id: # (test.t1) -master-bin.000001 7515 Write_rows 1 7549 table_id: # flags: STMT_END_F -master-bin.000001 7549 Table_map 1 7590 table_id: # (test.t1) -master-bin.000001 7590 Write_rows 1 7624 table_id: # flags: STMT_END_F -master-bin.000001 7624 Table_map 1 7665 table_id: # (test.t1) -master-bin.000001 7665 Write_rows 1 7699 table_id: # flags: STMT_END_F -master-bin.000001 7699 Table_map 1 7740 table_id: # (test.t1) -master-bin.000001 7740 Write_rows 1 7774 table_id: # flags: STMT_END_F -master-bin.000001 7774 Table_map 1 7815 table_id: # (test.t1) -master-bin.000001 7815 Write_rows 1 7849 table_id: # flags: STMT_END_F -master-bin.000001 7849 Table_map 1 7890 table_id: # (test.t1) -master-bin.000001 7890 Write_rows 1 7924 table_id: # flags: STMT_END_F -master-bin.000001 7924 Table_map 1 7965 table_id: # (test.t1) -master-bin.000001 7965 Write_rows 1 7999 table_id: # flags: STMT_END_F -master-bin.000001 7999 Table_map 1 8040 table_id: # (test.t1) -master-bin.000001 8040 Write_rows 1 8074 table_id: # flags: STMT_END_F -master-bin.000001 8074 Table_map 1 8115 table_id: # (test.t1) -master-bin.000001 8115 Write_rows 1 8149 table_id: # flags: STMT_END_F -master-bin.000001 8149 Table_map 1 8190 table_id: # (test.t1) -master-bin.000001 8190 Write_rows 1 8224 table_id: # flags: STMT_END_F -master-bin.000001 8224 Table_map 1 8265 table_id: # (test.t1) -master-bin.000001 8265 Write_rows 1 8299 table_id: # flags: STMT_END_F -master-bin.000001 8299 Table_map 1 8340 table_id: # (test.t1) -master-bin.000001 8340 Write_rows 1 8374 table_id: # flags: STMT_END_F -master-bin.000001 8374 Table_map 1 8415 table_id: # (test.t1) -master-bin.000001 8415 Write_rows 1 8449 table_id: # flags: STMT_END_F -master-bin.000001 8449 Table_map 1 8490 table_id: # (test.t1) -master-bin.000001 8490 Write_rows 1 8524 table_id: # flags: STMT_END_F -master-bin.000001 8524 Table_map 1 8565 table_id: # (test.t1) -master-bin.000001 8565 Write_rows 1 8599 table_id: # flags: STMT_END_F -master-bin.000001 8599 Table_map 1 8640 table_id: # (test.t1) -master-bin.000001 8640 Write_rows 1 8674 table_id: # flags: STMT_END_F -master-bin.000001 8674 Table_map 1 8715 table_id: # (test.t1) -master-bin.000001 8715 Write_rows 1 8749 table_id: # flags: STMT_END_F -master-bin.000001 8749 Table_map 1 8790 table_id: # (test.t1) -master-bin.000001 8790 Write_rows 1 8824 table_id: # flags: STMT_END_F -master-bin.000001 8824 Table_map 1 8865 table_id: # (test.t1) -master-bin.000001 8865 Write_rows 1 8899 table_id: # flags: STMT_END_F -master-bin.000001 8899 Table_map 1 8940 table_id: # (test.t1) -master-bin.000001 8940 Write_rows 1 8974 table_id: # flags: STMT_END_F -master-bin.000001 8974 Table_map 1 9015 table_id: # (test.t1) -master-bin.000001 9015 Write_rows 1 9049 table_id: # flags: STMT_END_F -master-bin.000001 9049 Table_map 1 9090 table_id: # (test.t1) -master-bin.000001 9090 Write_rows 1 9124 table_id: # flags: STMT_END_F -master-bin.000001 9124 Table_map 1 9165 table_id: # (test.t1) -master-bin.000001 9165 Write_rows 1 9199 table_id: # flags: STMT_END_F -master-bin.000001 9199 Table_map 1 9240 table_id: # (test.t1) -master-bin.000001 9240 Write_rows 1 9274 table_id: # flags: STMT_END_F -master-bin.000001 9274 Table_map 1 9315 table_id: # (test.t1) -master-bin.000001 9315 Write_rows 1 9349 table_id: # flags: STMT_END_F -master-bin.000001 9349 Table_map 1 9390 table_id: # (test.t1) -master-bin.000001 9390 Write_rows 1 9424 table_id: # flags: STMT_END_F -master-bin.000001 9424 Table_map 1 9465 table_id: # (test.t1) -master-bin.000001 9465 Write_rows 1 9499 table_id: # flags: STMT_END_F -master-bin.000001 9499 Table_map 1 9540 table_id: # (test.t1) -master-bin.000001 9540 Write_rows 1 9574 table_id: # flags: STMT_END_F -master-bin.000001 9574 Table_map 1 9615 table_id: # (test.t1) -master-bin.000001 9615 Write_rows 1 9649 table_id: # flags: STMT_END_F -master-bin.000001 9649 Table_map 1 9690 table_id: # (test.t1) -master-bin.000001 9690 Write_rows 1 9724 table_id: # flags: STMT_END_F -master-bin.000001 9724 Table_map 1 9765 table_id: # (test.t1) -master-bin.000001 9765 Write_rows 1 9799 table_id: # flags: STMT_END_F -master-bin.000001 9799 Table_map 1 9840 table_id: # (test.t1) -master-bin.000001 9840 Write_rows 1 9874 table_id: # flags: STMT_END_F -master-bin.000001 9874 Table_map 1 9915 table_id: # (test.t1) -master-bin.000001 9915 Write_rows 1 9949 table_id: # flags: STMT_END_F -master-bin.000001 9949 Table_map 1 9990 table_id: # (test.t1) -master-bin.000001 9990 Write_rows 1 10024 table_id: # flags: STMT_END_F -master-bin.000001 10024 Table_map 1 10065 table_id: # (test.t1) -master-bin.000001 10065 Write_rows 1 10099 table_id: # flags: STMT_END_F -master-bin.000001 10099 Table_map 1 10140 table_id: # (test.t1) -master-bin.000001 10140 Write_rows 1 10174 table_id: # flags: STMT_END_F -master-bin.000001 10174 Table_map 1 10215 table_id: # (test.t1) -master-bin.000001 10215 Write_rows 1 10249 table_id: # flags: STMT_END_F -master-bin.000001 10249 Table_map 1 10290 table_id: # (test.t1) -master-bin.000001 10290 Write_rows 1 10324 table_id: # flags: STMT_END_F -master-bin.000001 10324 Table_map 1 10365 table_id: # (test.t1) -master-bin.000001 10365 Write_rows 1 10399 table_id: # flags: STMT_END_F -master-bin.000001 10399 Table_map 1 10440 table_id: # (test.t1) -master-bin.000001 10440 Write_rows 1 10474 table_id: # flags: STMT_END_F -master-bin.000001 10474 Table_map 1 10515 table_id: # (test.t1) -master-bin.000001 10515 Write_rows 1 10549 table_id: # flags: STMT_END_F -master-bin.000001 10549 Table_map 1 10590 table_id: # (test.t1) -master-bin.000001 10590 Write_rows 1 10624 table_id: # flags: STMT_END_F -master-bin.000001 10624 Table_map 1 10665 table_id: # (test.t1) -master-bin.000001 10665 Write_rows 1 10699 table_id: # flags: STMT_END_F -master-bin.000001 10699 Table_map 1 10740 table_id: # (test.t1) -master-bin.000001 10740 Write_rows 1 10774 table_id: # flags: STMT_END_F -master-bin.000001 10774 Table_map 1 10815 table_id: # (test.t1) -master-bin.000001 10815 Write_rows 1 10849 table_id: # flags: STMT_END_F -master-bin.000001 10849 Table_map 1 10890 table_id: # (test.t1) -master-bin.000001 10890 Write_rows 1 10924 table_id: # flags: STMT_END_F -master-bin.000001 10924 Table_map 1 10965 table_id: # (test.t1) -master-bin.000001 10965 Write_rows 1 10999 table_id: # flags: STMT_END_F -master-bin.000001 10999 Table_map 1 11040 table_id: # (test.t1) -master-bin.000001 11040 Write_rows 1 11074 table_id: # flags: STMT_END_F -master-bin.000001 11074 Table_map 1 11115 table_id: # (test.t1) -master-bin.000001 11115 Write_rows 1 11149 table_id: # flags: STMT_END_F -master-bin.000001 11149 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 11265 table_id: # (test.t1) -master-bin.000001 11265 Write_rows 1 11299 table_id: # flags: STMT_END_F -master-bin.000001 11299 Table_map 1 11340 table_id: # (test.t1) -master-bin.000001 11340 Write_rows 1 11374 table_id: # flags: STMT_END_F -master-bin.000001 11374 Table_map 1 11415 table_id: # (test.t1) -master-bin.000001 11415 Write_rows 1 11449 table_id: # flags: STMT_END_F -master-bin.000001 11449 Table_map 1 11490 table_id: # (test.t1) -master-bin.000001 11490 Write_rows 1 11524 table_id: # flags: STMT_END_F -master-bin.000001 11524 Table_map 1 11565 table_id: # (test.t1) -master-bin.000001 11565 Write_rows 1 11599 table_id: # flags: STMT_END_F -master-bin.000001 11599 Table_map 1 11640 table_id: # (test.t1) -master-bin.000001 11640 Write_rows 1 11674 table_id: # flags: STMT_END_F -master-bin.000001 11674 Table_map 1 11715 table_id: # (test.t1) -master-bin.000001 11715 Write_rows 1 11749 table_id: # flags: STMT_END_F -master-bin.000001 11749 Table_map 1 11790 table_id: # (test.t1) -master-bin.000001 11790 Write_rows 1 11824 table_id: # flags: STMT_END_F -master-bin.000001 11824 Table_map 1 11865 table_id: # (test.t1) -master-bin.000001 11865 Write_rows 1 11899 table_id: # flags: STMT_END_F -master-bin.000001 11899 Table_map 1 11940 table_id: # (test.t1) -master-bin.000001 11940 Write_rows 1 11974 table_id: # flags: STMT_END_F -master-bin.000001 11974 Table_map 1 12015 table_id: # (test.t1) -master-bin.000001 12015 Write_rows 1 12049 table_id: # flags: STMT_END_F -master-bin.000001 12049 Table_map 1 12090 table_id: # (test.t1) -master-bin.000001 12090 Write_rows 1 12124 table_id: # flags: STMT_END_F -master-bin.000001 12124 Table_map 1 12165 table_id: # (test.t1) -master-bin.000001 12165 Write_rows 1 12199 table_id: # flags: STMT_END_F -master-bin.000001 12199 Table_map 1 12240 table_id: # (test.t1) -master-bin.000001 12240 Write_rows 1 12274 table_id: # flags: STMT_END_F -master-bin.000001 12274 Table_map 1 12315 table_id: # (test.t1) -master-bin.000001 12315 Write_rows 1 12349 table_id: # flags: STMT_END_F -master-bin.000001 12349 Table_map 1 12390 table_id: # (test.t1) -master-bin.000001 12390 Write_rows 1 12424 table_id: # flags: STMT_END_F -master-bin.000001 12424 Table_map 1 12465 table_id: # (test.t1) -master-bin.000001 12465 Write_rows 1 12499 table_id: # flags: STMT_END_F -master-bin.000001 12499 Table_map 1 12540 table_id: # (test.t1) -master-bin.000001 12540 Write_rows 1 12574 table_id: # flags: STMT_END_F -master-bin.000001 12574 Table_map 1 12615 table_id: # (test.t1) -master-bin.000001 12615 Write_rows 1 12649 table_id: # flags: STMT_END_F -master-bin.000001 12649 Table_map 1 12690 table_id: # (test.t1) -master-bin.000001 12690 Write_rows 1 12724 table_id: # flags: STMT_END_F -master-bin.000001 12724 Table_map 1 12765 table_id: # (test.t1) -master-bin.000001 12765 Write_rows 1 12799 table_id: # flags: STMT_END_F -master-bin.000001 12799 Table_map 1 12840 table_id: # (test.t1) -master-bin.000001 12840 Write_rows 1 12874 table_id: # flags: STMT_END_F -master-bin.000001 12874 Table_map 1 12915 table_id: # (test.t1) -master-bin.000001 12915 Write_rows 1 12949 table_id: # flags: STMT_END_F -master-bin.000001 12949 Table_map 1 12990 table_id: # (test.t1) -master-bin.000001 12990 Write_rows 1 13024 table_id: # flags: STMT_END_F -master-bin.000001 13024 Table_map 1 13065 table_id: # (test.t1) -master-bin.000001 13065 Write_rows 1 13099 table_id: # flags: STMT_END_F -master-bin.000001 13099 Table_map 1 13140 table_id: # (test.t1) -master-bin.000001 13140 Write_rows 1 13174 table_id: # flags: STMT_END_F -master-bin.000001 13174 Table_map 1 13215 table_id: # (test.t1) -master-bin.000001 13215 Write_rows 1 13249 table_id: # flags: STMT_END_F -master-bin.000001 13249 Table_map 1 13290 table_id: # (test.t1) -master-bin.000001 13290 Write_rows 1 13324 table_id: # flags: STMT_END_F -master-bin.000001 13324 Table_map 1 13365 table_id: # (test.t1) -master-bin.000001 13365 Write_rows 1 13399 table_id: # flags: STMT_END_F -master-bin.000001 13399 Table_map 1 13440 table_id: # (test.t1) -master-bin.000001 13440 Write_rows 1 13474 table_id: # flags: STMT_END_F -master-bin.000001 13474 Table_map 1 13515 table_id: # (test.t1) -master-bin.000001 13515 Write_rows 1 13549 table_id: # flags: STMT_END_F -master-bin.000001 13549 Table_map 1 13590 table_id: # (test.t1) -master-bin.000001 13590 Write_rows 1 13624 table_id: # flags: STMT_END_F -master-bin.000001 13624 Table_map 1 13665 table_id: # (test.t1) -master-bin.000001 13665 Write_rows 1 13699 table_id: # flags: STMT_END_F -master-bin.000001 13699 Table_map 1 13740 table_id: # (test.t1) -master-bin.000001 13740 Write_rows 1 13774 table_id: # flags: STMT_END_F -master-bin.000001 13774 Table_map 1 13815 table_id: # (test.t1) -master-bin.000001 13815 Write_rows 1 13849 table_id: # flags: STMT_END_F -master-bin.000001 13849 Table_map 1 13890 table_id: # (test.t1) -master-bin.000001 13890 Write_rows 1 13924 table_id: # flags: STMT_END_F -master-bin.000001 13924 Table_map 1 13965 table_id: # (test.t1) -master-bin.000001 13965 Write_rows 1 13999 table_id: # flags: STMT_END_F -master-bin.000001 13999 Table_map 1 14040 table_id: # (test.t1) -master-bin.000001 14040 Write_rows 1 14074 table_id: # flags: STMT_END_F -master-bin.000001 14074 Table_map 1 14115 table_id: # (test.t1) -master-bin.000001 14115 Write_rows 1 14149 table_id: # flags: STMT_END_F -master-bin.000001 14149 Table_map 1 14190 table_id: # (test.t1) -master-bin.000001 14190 Write_rows 1 14224 table_id: # flags: STMT_END_F -master-bin.000001 14224 Table_map 1 14265 table_id: # (test.t1) -master-bin.000001 14265 Write_rows 1 14299 table_id: # flags: STMT_END_F -master-bin.000001 14299 Table_map 1 14340 table_id: # (test.t1) -master-bin.000001 14340 Write_rows 1 14374 table_id: # flags: STMT_END_F -master-bin.000001 14374 Table_map 1 14415 table_id: # (test.t1) -master-bin.000001 14415 Write_rows 1 14449 table_id: # flags: STMT_END_F -master-bin.000001 14449 Table_map 1 14490 table_id: # (test.t1) -master-bin.000001 14490 Write_rows 1 14524 table_id: # flags: STMT_END_F -master-bin.000001 14524 Table_map 1 14565 table_id: # (test.t1) -master-bin.000001 14565 Write_rows 1 14599 table_id: # flags: STMT_END_F -master-bin.000001 14599 Table_map 1 14640 table_id: # (test.t1) -master-bin.000001 14640 Write_rows 1 14674 table_id: # flags: STMT_END_F -master-bin.000001 14674 Table_map 1 14715 table_id: # (test.t1) -master-bin.000001 14715 Write_rows 1 14749 table_id: # flags: STMT_END_F -master-bin.000001 14749 Table_map 1 14790 table_id: # (test.t1) -master-bin.000001 14790 Write_rows 1 14824 table_id: # flags: STMT_END_F -master-bin.000001 14824 Table_map 1 14865 table_id: # (test.t1) -master-bin.000001 14865 Write_rows 1 14899 table_id: # flags: STMT_END_F -master-bin.000001 14899 Table_map 1 14940 table_id: # (test.t1) -master-bin.000001 14940 Write_rows 1 14974 table_id: # flags: STMT_END_F -master-bin.000001 14974 Table_map 1 15015 table_id: # (test.t1) -master-bin.000001 15015 Write_rows 1 15049 table_id: # flags: STMT_END_F -master-bin.000001 15049 Table_map 1 15090 table_id: # (test.t1) -master-bin.000001 15090 Write_rows 1 15124 table_id: # flags: STMT_END_F -master-bin.000001 15124 Table_map 1 15165 table_id: # (test.t1) -master-bin.000001 15165 Write_rows 1 15199 table_id: # flags: STMT_END_F -master-bin.000001 15199 Table_map 1 15240 table_id: # (test.t1) -master-bin.000001 15240 Write_rows 1 15274 table_id: # flags: STMT_END_F -master-bin.000001 15274 Table_map 1 15315 table_id: # (test.t1) -master-bin.000001 15315 Write_rows 1 15349 table_id: # flags: STMT_END_F -master-bin.000001 15349 Table_map 1 15390 table_id: # (test.t1) -master-bin.000001 15390 Write_rows 1 15424 table_id: # flags: STMT_END_F -master-bin.000001 15424 Table_map 1 15465 table_id: # (test.t1) -master-bin.000001 15465 Write_rows 1 15499 table_id: # flags: STMT_END_F -master-bin.000001 15499 Table_map 1 15540 table_id: # (test.t1) -master-bin.000001 15540 Write_rows 1 15574 table_id: # flags: STMT_END_F -master-bin.000001 15574 Table_map 1 15615 table_id: # (test.t1) -master-bin.000001 15615 Write_rows 1 15649 table_id: # flags: STMT_END_F -master-bin.000001 15649 Table_map 1 15690 table_id: # (test.t1) -master-bin.000001 15690 Write_rows 1 15724 table_id: # flags: STMT_END_F -master-bin.000001 15724 Table_map 1 15765 table_id: # (test.t1) -master-bin.000001 15765 Write_rows 1 15799 table_id: # flags: STMT_END_F -master-bin.000001 15799 Table_map 1 15840 table_id: # (test.t1) -master-bin.000001 15840 Write_rows 1 15874 table_id: # flags: STMT_END_F -master-bin.000001 15874 Table_map 1 15915 table_id: # (test.t1) -master-bin.000001 15915 Write_rows 1 15949 table_id: # flags: STMT_END_F -master-bin.000001 15949 Table_map 1 15990 table_id: # (test.t1) -master-bin.000001 15990 Write_rows 1 16024 table_id: # flags: STMT_END_F -master-bin.000001 16024 Table_map 1 16065 table_id: # (test.t1) -master-bin.000001 16065 Write_rows 1 16099 table_id: # flags: STMT_END_F -master-bin.000001 16099 Table_map 1 16140 table_id: # (test.t1) -master-bin.000001 16140 Write_rows 1 16174 table_id: # flags: STMT_END_F -master-bin.000001 16174 Table_map 1 16215 table_id: # (test.t1) -master-bin.000001 16215 Write_rows 1 16249 table_id: # flags: STMT_END_F -master-bin.000001 16249 Table_map 1 16290 table_id: # (test.t1) -master-bin.000001 16290 Write_rows 1 16324 table_id: # flags: STMT_END_F -master-bin.000001 16324 Table_map 1 16365 table_id: # (test.t1) -master-bin.000001 16365 Write_rows 1 16399 table_id: # flags: STMT_END_F -master-bin.000001 16399 Table_map 1 16440 table_id: # (test.t1) -master-bin.000001 16440 Write_rows 1 16474 table_id: # flags: STMT_END_F -master-bin.000001 16474 Table_map 1 16515 table_id: # (test.t1) -master-bin.000001 16515 Write_rows 1 16549 table_id: # flags: STMT_END_F -master-bin.000001 16549 Table_map 1 16590 table_id: # (test.t1) -master-bin.000001 16590 Write_rows 1 16624 table_id: # flags: STMT_END_F -master-bin.000001 16624 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 16740 table_id: # (test.t1) -master-bin.000001 16740 Write_rows 1 16774 table_id: # flags: STMT_END_F -master-bin.000001 16774 Table_map 1 16815 table_id: # (test.t1) -master-bin.000001 16815 Write_rows 1 16849 table_id: # flags: STMT_END_F -master-bin.000001 16849 Table_map 1 16890 table_id: # (test.t1) -master-bin.000001 16890 Write_rows 1 16924 table_id: # flags: STMT_END_F -master-bin.000001 16924 Table_map 1 16965 table_id: # (test.t1) -master-bin.000001 16965 Write_rows 1 16999 table_id: # flags: STMT_END_F -master-bin.000001 16999 Table_map 1 17040 table_id: # (test.t1) -master-bin.000001 17040 Write_rows 1 17074 table_id: # flags: STMT_END_F -master-bin.000001 17074 Table_map 1 17115 table_id: # (test.t1) -master-bin.000001 17115 Write_rows 1 17149 table_id: # flags: STMT_END_F -master-bin.000001 17149 Table_map 1 17190 table_id: # (test.t1) -master-bin.000001 17190 Write_rows 1 17224 table_id: # flags: STMT_END_F -master-bin.000001 17224 Table_map 1 17265 table_id: # (test.t1) -master-bin.000001 17265 Write_rows 1 17299 table_id: # flags: STMT_END_F -master-bin.000001 17299 Table_map 1 17340 table_id: # (test.t1) -master-bin.000001 17340 Write_rows 1 17374 table_id: # flags: STMT_END_F -master-bin.000001 17374 Table_map 1 17415 table_id: # (test.t1) -master-bin.000001 17415 Write_rows 1 17449 table_id: # flags: STMT_END_F -master-bin.000001 17449 Table_map 1 17490 table_id: # (test.t1) -master-bin.000001 17490 Write_rows 1 17524 table_id: # flags: STMT_END_F -master-bin.000001 17524 Table_map 1 17565 table_id: # (test.t1) -master-bin.000001 17565 Write_rows 1 17599 table_id: # flags: STMT_END_F -master-bin.000001 17599 Table_map 1 17640 table_id: # (test.t1) -master-bin.000001 17640 Write_rows 1 17674 table_id: # flags: STMT_END_F -master-bin.000001 17674 Table_map 1 17715 table_id: # (test.t1) -master-bin.000001 17715 Write_rows 1 17749 table_id: # flags: STMT_END_F -master-bin.000001 17749 Table_map 1 17790 table_id: # (test.t1) -master-bin.000001 17790 Write_rows 1 17824 table_id: # flags: STMT_END_F -master-bin.000001 17824 Table_map 1 17865 table_id: # (test.t1) -master-bin.000001 17865 Write_rows 1 17899 table_id: # flags: STMT_END_F -master-bin.000001 17899 Table_map 1 17940 table_id: # (test.t1) -master-bin.000001 17940 Write_rows 1 17974 table_id: # flags: STMT_END_F -master-bin.000001 17974 Table_map 1 18015 table_id: # (test.t1) -master-bin.000001 18015 Write_rows 1 18049 table_id: # flags: STMT_END_F -master-bin.000001 18049 Table_map 1 18090 table_id: # (test.t1) -master-bin.000001 18090 Write_rows 1 18124 table_id: # flags: STMT_END_F -master-bin.000001 18124 Table_map 1 18165 table_id: # (test.t1) -master-bin.000001 18165 Write_rows 1 18199 table_id: # flags: STMT_END_F -master-bin.000001 18199 Table_map 1 18240 table_id: # (test.t1) -master-bin.000001 18240 Write_rows 1 18274 table_id: # flags: STMT_END_F -master-bin.000001 18274 Table_map 1 18315 table_id: # (test.t1) -master-bin.000001 18315 Write_rows 1 18349 table_id: # flags: STMT_END_F -master-bin.000001 18349 Table_map 1 18390 table_id: # (test.t1) -master-bin.000001 18390 Write_rows 1 18424 table_id: # flags: STMT_END_F -master-bin.000001 18424 Table_map 1 18465 table_id: # (test.t1) -master-bin.000001 18465 Write_rows 1 18499 table_id: # flags: STMT_END_F -master-bin.000001 18499 Table_map 1 18540 table_id: # (test.t1) -master-bin.000001 18540 Write_rows 1 18574 table_id: # flags: STMT_END_F -master-bin.000001 18574 Table_map 1 18615 table_id: # (test.t1) -master-bin.000001 18615 Write_rows 1 18649 table_id: # flags: STMT_END_F -master-bin.000001 18649 Table_map 1 18690 table_id: # (test.t1) -master-bin.000001 18690 Write_rows 1 18724 table_id: # flags: STMT_END_F -master-bin.000001 18724 Table_map 1 18765 table_id: # (test.t1) -master-bin.000001 18765 Write_rows 1 18799 table_id: # flags: STMT_END_F -master-bin.000001 18799 Table_map 1 18840 table_id: # (test.t1) -master-bin.000001 18840 Write_rows 1 18874 table_id: # flags: STMT_END_F -master-bin.000001 18874 Table_map 1 18915 table_id: # (test.t1) -master-bin.000001 18915 Write_rows 1 18949 table_id: # flags: STMT_END_F -master-bin.000001 18949 Table_map 1 18990 table_id: # (test.t1) -master-bin.000001 18990 Write_rows 1 19024 table_id: # flags: STMT_END_F -master-bin.000001 19024 Table_map 1 19065 table_id: # (test.t1) -master-bin.000001 19065 Write_rows 1 19099 table_id: # flags: STMT_END_F -master-bin.000001 19099 Table_map 1 19140 table_id: # (test.t1) -master-bin.000001 19140 Write_rows 1 19174 table_id: # flags: STMT_END_F -master-bin.000001 19174 Table_map 1 19215 table_id: # (test.t1) -master-bin.000001 19215 Write_rows 1 19249 table_id: # flags: STMT_END_F -master-bin.000001 19249 Table_map 1 19290 table_id: # (test.t1) -master-bin.000001 19290 Write_rows 1 19324 table_id: # flags: STMT_END_F -master-bin.000001 19324 Table_map 1 19365 table_id: # (test.t1) -master-bin.000001 19365 Write_rows 1 19399 table_id: # flags: STMT_END_F -master-bin.000001 19399 Table_map 1 19440 table_id: # (test.t1) -master-bin.000001 19440 Write_rows 1 19474 table_id: # flags: STMT_END_F -master-bin.000001 19474 Table_map 1 19515 table_id: # (test.t1) -master-bin.000001 19515 Write_rows 1 19549 table_id: # flags: STMT_END_F -master-bin.000001 19549 Table_map 1 19590 table_id: # (test.t1) -master-bin.000001 19590 Write_rows 1 19624 table_id: # flags: STMT_END_F -master-bin.000001 19624 Table_map 1 19665 table_id: # (test.t1) -master-bin.000001 19665 Write_rows 1 19699 table_id: # flags: STMT_END_F -master-bin.000001 19699 Table_map 1 19740 table_id: # (test.t1) -master-bin.000001 19740 Write_rows 1 19774 table_id: # flags: STMT_END_F -master-bin.000001 19774 Table_map 1 19815 table_id: # (test.t1) -master-bin.000001 19815 Write_rows 1 19849 table_id: # flags: STMT_END_F -master-bin.000001 19849 Table_map 1 19890 table_id: # (test.t1) -master-bin.000001 19890 Write_rows 1 19924 table_id: # flags: STMT_END_F -master-bin.000001 19924 Table_map 1 19965 table_id: # (test.t1) -master-bin.000001 19965 Write_rows 1 19999 table_id: # flags: STMT_END_F -master-bin.000001 19999 Table_map 1 20040 table_id: # (test.t1) -master-bin.000001 20040 Write_rows 1 20074 table_id: # flags: STMT_END_F -master-bin.000001 20074 Table_map 1 20115 table_id: # (test.t1) -master-bin.000001 20115 Write_rows 1 20149 table_id: # flags: STMT_END_F -master-bin.000001 20149 Table_map 1 20190 table_id: # (test.t1) -master-bin.000001 20190 Write_rows 1 20224 table_id: # flags: STMT_END_F -master-bin.000001 20224 Table_map 1 20265 table_id: # (test.t1) -master-bin.000001 20265 Write_rows 1 20299 table_id: # flags: STMT_END_F -master-bin.000001 20299 Table_map 1 20340 table_id: # (test.t1) -master-bin.000001 20340 Write_rows 1 20374 table_id: # flags: STMT_END_F -master-bin.000001 20374 Table_map 1 20415 table_id: # (test.t1) -master-bin.000001 20415 Write_rows 1 20449 table_id: # flags: STMT_END_F -master-bin.000001 20449 Table_map 1 20490 table_id: # (test.t1) -master-bin.000001 20490 Write_rows 1 20524 table_id: # flags: STMT_END_F -master-bin.000001 20524 Table_map 1 20565 table_id: # (test.t1) -master-bin.000001 20565 Write_rows 1 20599 table_id: # flags: STMT_END_F -master-bin.000001 20599 Table_map 1 20640 table_id: # (test.t1) -master-bin.000001 20640 Write_rows 1 20674 table_id: # flags: STMT_END_F -master-bin.000001 20674 Table_map 1 20715 table_id: # (test.t1) -master-bin.000001 20715 Write_rows 1 20749 table_id: # flags: STMT_END_F -master-bin.000001 20749 Table_map 1 20790 table_id: # (test.t1) -master-bin.000001 20790 Write_rows 1 20824 table_id: # flags: STMT_END_F -master-bin.000001 20824 Table_map 1 20865 table_id: # (test.t1) -master-bin.000001 20865 Write_rows 1 20899 table_id: # flags: STMT_END_F -master-bin.000001 20899 Table_map 1 20940 table_id: # (test.t1) -master-bin.000001 20940 Write_rows 1 20974 table_id: # flags: STMT_END_F -master-bin.000001 20974 Table_map 1 21015 table_id: # (test.t1) -master-bin.000001 21015 Write_rows 1 21049 table_id: # flags: STMT_END_F -master-bin.000001 21049 Table_map 1 21090 table_id: # (test.t1) -master-bin.000001 21090 Write_rows 1 21124 table_id: # flags: STMT_END_F -master-bin.000001 21124 Table_map 1 21165 table_id: # (test.t1) -master-bin.000001 21165 Write_rows 1 21199 table_id: # flags: STMT_END_F -master-bin.000001 21199 Table_map 1 21240 table_id: # (test.t1) -master-bin.000001 21240 Write_rows 1 21274 table_id: # flags: STMT_END_F -master-bin.000001 21274 Table_map 1 21315 table_id: # (test.t1) -master-bin.000001 21315 Write_rows 1 21349 table_id: # flags: STMT_END_F -master-bin.000001 21349 Table_map 1 21390 table_id: # (test.t1) -master-bin.000001 21390 Write_rows 1 21424 table_id: # flags: STMT_END_F -master-bin.000001 21424 Table_map 1 21465 table_id: # (test.t1) -master-bin.000001 21465 Write_rows 1 21499 table_id: # flags: STMT_END_F -master-bin.000001 21499 Table_map 1 21540 table_id: # (test.t1) -master-bin.000001 21540 Write_rows 1 21574 table_id: # flags: STMT_END_F -master-bin.000001 21574 Table_map 1 21615 table_id: # (test.t1) -master-bin.000001 21615 Write_rows 1 21649 table_id: # flags: STMT_END_F -master-bin.000001 21649 Table_map 1 21690 table_id: # (test.t1) -master-bin.000001 21690 Write_rows 1 21724 table_id: # flags: STMT_END_F -master-bin.000001 21724 Table_map 1 21765 table_id: # (test.t1) -master-bin.000001 21765 Write_rows 1 21799 table_id: # flags: STMT_END_F -master-bin.000001 21799 Table_map 1 21840 table_id: # (test.t1) -master-bin.000001 21840 Write_rows 1 21874 table_id: # flags: STMT_END_F -master-bin.000001 21874 Table_map 1 21915 table_id: # (test.t1) -master-bin.000001 21915 Write_rows 1 21949 table_id: # flags: STMT_END_F -master-bin.000001 21949 Table_map 1 21990 table_id: # (test.t1) -master-bin.000001 21990 Write_rows 1 22024 table_id: # flags: STMT_END_F -master-bin.000001 22024 Table_map 1 22065 table_id: # (test.t1) -master-bin.000001 22065 Write_rows 1 22099 table_id: # flags: STMT_END_F -master-bin.000001 22099 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 22215 table_id: # (test.t1) -master-bin.000001 22215 Write_rows 1 22249 table_id: # flags: STMT_END_F -master-bin.000001 22249 Table_map 1 22290 table_id: # (test.t1) -master-bin.000001 22290 Write_rows 1 22324 table_id: # flags: STMT_END_F -master-bin.000001 22324 Table_map 1 22365 table_id: # (test.t1) -master-bin.000001 22365 Write_rows 1 22399 table_id: # flags: STMT_END_F -master-bin.000001 22399 Table_map 1 22440 table_id: # (test.t1) -master-bin.000001 22440 Write_rows 1 22474 table_id: # flags: STMT_END_F -master-bin.000001 22474 Table_map 1 22515 table_id: # (test.t1) -master-bin.000001 22515 Write_rows 1 22549 table_id: # flags: STMT_END_F -master-bin.000001 22549 Table_map 1 22590 table_id: # (test.t1) -master-bin.000001 22590 Write_rows 1 22624 table_id: # flags: STMT_END_F -master-bin.000001 22624 Table_map 1 22665 table_id: # (test.t1) -master-bin.000001 22665 Write_rows 1 22699 table_id: # flags: STMT_END_F -master-bin.000001 22699 Table_map 1 22740 table_id: # (test.t1) -master-bin.000001 22740 Write_rows 1 22774 table_id: # flags: STMT_END_F -master-bin.000001 22774 Table_map 1 22815 table_id: # (test.t1) -master-bin.000001 22815 Write_rows 1 22849 table_id: # flags: STMT_END_F -master-bin.000001 22849 Table_map 1 22890 table_id: # (test.t1) -master-bin.000001 22890 Write_rows 1 22924 table_id: # flags: STMT_END_F -master-bin.000001 22924 Table_map 1 22965 table_id: # (test.t1) -master-bin.000001 22965 Write_rows 1 22999 table_id: # flags: STMT_END_F -master-bin.000001 22999 Table_map 1 23040 table_id: # (test.t1) -master-bin.000001 23040 Write_rows 1 23074 table_id: # flags: STMT_END_F -master-bin.000001 23074 Table_map 1 23115 table_id: # (test.t1) -master-bin.000001 23115 Write_rows 1 23149 table_id: # flags: STMT_END_F -master-bin.000001 23149 Table_map 1 23190 table_id: # (test.t1) -master-bin.000001 23190 Write_rows 1 23224 table_id: # flags: STMT_END_F -master-bin.000001 23224 Table_map 1 23265 table_id: # (test.t1) -master-bin.000001 23265 Write_rows 1 23299 table_id: # flags: STMT_END_F -master-bin.000001 23299 Table_map 1 23340 table_id: # (test.t1) -master-bin.000001 23340 Write_rows 1 23374 table_id: # flags: STMT_END_F -master-bin.000001 23374 Table_map 1 23415 table_id: # (test.t1) -master-bin.000001 23415 Write_rows 1 23449 table_id: # flags: STMT_END_F -master-bin.000001 23449 Table_map 1 23490 table_id: # (test.t1) -master-bin.000001 23490 Write_rows 1 23524 table_id: # flags: STMT_END_F -master-bin.000001 23524 Table_map 1 23565 table_id: # (test.t1) -master-bin.000001 23565 Write_rows 1 23599 table_id: # flags: STMT_END_F -master-bin.000001 23599 Table_map 1 23640 table_id: # (test.t1) -master-bin.000001 23640 Write_rows 1 23674 table_id: # flags: STMT_END_F -master-bin.000001 23674 Table_map 1 23715 table_id: # (test.t1) -master-bin.000001 23715 Write_rows 1 23749 table_id: # flags: STMT_END_F -master-bin.000001 23749 Table_map 1 23790 table_id: # (test.t1) -master-bin.000001 23790 Write_rows 1 23824 table_id: # flags: STMT_END_F -master-bin.000001 23824 Table_map 1 23865 table_id: # (test.t1) -master-bin.000001 23865 Write_rows 1 23899 table_id: # flags: STMT_END_F -master-bin.000001 23899 Table_map 1 23940 table_id: # (test.t1) -master-bin.000001 23940 Write_rows 1 23974 table_id: # flags: STMT_END_F -master-bin.000001 23974 Table_map 1 24015 table_id: # (test.t1) -master-bin.000001 24015 Write_rows 1 24049 table_id: # flags: STMT_END_F -master-bin.000001 24049 Table_map 1 24090 table_id: # (test.t1) -master-bin.000001 24090 Write_rows 1 24124 table_id: # flags: STMT_END_F -master-bin.000001 24124 Table_map 1 24165 table_id: # (test.t1) -master-bin.000001 24165 Write_rows 1 24199 table_id: # flags: STMT_END_F -master-bin.000001 24199 Table_map 1 24240 table_id: # (test.t1) -master-bin.000001 24240 Write_rows 1 24274 table_id: # flags: STMT_END_F -master-bin.000001 24274 Table_map 1 24315 table_id: # (test.t1) -master-bin.000001 24315 Write_rows 1 24349 table_id: # flags: STMT_END_F -master-bin.000001 24349 Table_map 1 24390 table_id: # (test.t1) -master-bin.000001 24390 Write_rows 1 24424 table_id: # flags: STMT_END_F -master-bin.000001 24424 Table_map 1 24465 table_id: # (test.t1) -master-bin.000001 24465 Write_rows 1 24499 table_id: # flags: STMT_END_F -master-bin.000001 24499 Table_map 1 24540 table_id: # (test.t1) -master-bin.000001 24540 Write_rows 1 24574 table_id: # flags: STMT_END_F -master-bin.000001 24574 Table_map 1 24615 table_id: # (test.t1) -master-bin.000001 24615 Write_rows 1 24649 table_id: # flags: STMT_END_F -master-bin.000001 24649 Table_map 1 24690 table_id: # (test.t1) -master-bin.000001 24690 Write_rows 1 24724 table_id: # flags: STMT_END_F -master-bin.000001 24724 Table_map 1 24765 table_id: # (test.t1) -master-bin.000001 24765 Write_rows 1 24799 table_id: # flags: STMT_END_F -master-bin.000001 24799 Table_map 1 24840 table_id: # (test.t1) -master-bin.000001 24840 Write_rows 1 24874 table_id: # flags: STMT_END_F -master-bin.000001 24874 Table_map 1 24915 table_id: # (test.t1) -master-bin.000001 24915 Write_rows 1 24949 table_id: # flags: STMT_END_F -master-bin.000001 24949 Table_map 1 24990 table_id: # (test.t1) -master-bin.000001 24990 Write_rows 1 25024 table_id: # flags: STMT_END_F -master-bin.000001 25024 Table_map 1 25065 table_id: # (test.t1) -master-bin.000001 25065 Write_rows 1 25099 table_id: # flags: STMT_END_F -master-bin.000001 25099 Table_map 1 25140 table_id: # (test.t1) -master-bin.000001 25140 Write_rows 1 25174 table_id: # flags: STMT_END_F -master-bin.000001 25174 Table_map 1 25215 table_id: # (test.t1) -master-bin.000001 25215 Write_rows 1 25249 table_id: # flags: STMT_END_F -master-bin.000001 25249 Table_map 1 25290 table_id: # (test.t1) -master-bin.000001 25290 Write_rows 1 25324 table_id: # flags: STMT_END_F -master-bin.000001 25324 Table_map 1 25365 table_id: # (test.t1) -master-bin.000001 25365 Write_rows 1 25399 table_id: # flags: STMT_END_F -master-bin.000001 25399 Table_map 1 25440 table_id: # (test.t1) -master-bin.000001 25440 Write_rows 1 25474 table_id: # flags: STMT_END_F -master-bin.000001 25474 Table_map 1 25515 table_id: # (test.t1) -master-bin.000001 25515 Write_rows 1 25549 table_id: # flags: STMT_END_F -master-bin.000001 25549 Table_map 1 25590 table_id: # (test.t1) -master-bin.000001 25590 Write_rows 1 25624 table_id: # flags: STMT_END_F -master-bin.000001 25624 Table_map 1 25665 table_id: # (test.t1) -master-bin.000001 25665 Write_rows 1 25699 table_id: # flags: STMT_END_F -master-bin.000001 25699 Table_map 1 25740 table_id: # (test.t1) -master-bin.000001 25740 Write_rows 1 25774 table_id: # flags: STMT_END_F -master-bin.000001 25774 Table_map 1 25815 table_id: # (test.t1) -master-bin.000001 25815 Write_rows 1 25849 table_id: # flags: STMT_END_F -master-bin.000001 25849 Table_map 1 25890 table_id: # (test.t1) -master-bin.000001 25890 Write_rows 1 25924 table_id: # flags: STMT_END_F -master-bin.000001 25924 Table_map 1 25965 table_id: # (test.t1) -master-bin.000001 25965 Write_rows 1 25999 table_id: # flags: STMT_END_F -master-bin.000001 25999 Table_map 1 26040 table_id: # (test.t1) -master-bin.000001 26040 Write_rows 1 26074 table_id: # flags: STMT_END_F -master-bin.000001 26074 Table_map 1 26115 table_id: # (test.t1) -master-bin.000001 26115 Write_rows 1 26149 table_id: # flags: STMT_END_F -master-bin.000001 26149 Table_map 1 26190 table_id: # (test.t1) -master-bin.000001 26190 Write_rows 1 26224 table_id: # flags: STMT_END_F -master-bin.000001 26224 Table_map 1 26265 table_id: # (test.t1) -master-bin.000001 26265 Write_rows 1 26299 table_id: # flags: STMT_END_F -master-bin.000001 26299 Table_map 1 26340 table_id: # (test.t1) -master-bin.000001 26340 Write_rows 1 26374 table_id: # flags: STMT_END_F -master-bin.000001 26374 Table_map 1 26415 table_id: # (test.t1) -master-bin.000001 26415 Write_rows 1 26449 table_id: # flags: STMT_END_F -master-bin.000001 26449 Table_map 1 26490 table_id: # (test.t1) -master-bin.000001 26490 Write_rows 1 26524 table_id: # flags: STMT_END_F -master-bin.000001 26524 Table_map 1 26565 table_id: # (test.t1) -master-bin.000001 26565 Write_rows 1 26599 table_id: # flags: STMT_END_F -master-bin.000001 26599 Table_map 1 26640 table_id: # (test.t1) -master-bin.000001 26640 Write_rows 1 26674 table_id: # flags: STMT_END_F -master-bin.000001 26674 Table_map 1 26715 table_id: # (test.t1) -master-bin.000001 26715 Write_rows 1 26749 table_id: # flags: STMT_END_F -master-bin.000001 26749 Table_map 1 26790 table_id: # (test.t1) -master-bin.000001 26790 Write_rows 1 26824 table_id: # flags: STMT_END_F -master-bin.000001 26824 Table_map 1 26865 table_id: # (test.t1) -master-bin.000001 26865 Write_rows 1 26899 table_id: # flags: STMT_END_F -master-bin.000001 26899 Table_map 1 26940 table_id: # (test.t1) -master-bin.000001 26940 Write_rows 1 26974 table_id: # flags: STMT_END_F -master-bin.000001 26974 Table_map 1 27015 table_id: # (test.t1) -master-bin.000001 27015 Write_rows 1 27049 table_id: # flags: STMT_END_F -master-bin.000001 27049 Table_map 1 27090 table_id: # (test.t1) -master-bin.000001 27090 Write_rows 1 27124 table_id: # flags: STMT_END_F -master-bin.000001 27124 Table_map 1 27165 table_id: # (test.t1) -master-bin.000001 27165 Write_rows 1 27199 table_id: # flags: STMT_END_F -master-bin.000001 27199 Table_map 1 27240 table_id: # (test.t1) -master-bin.000001 27240 Write_rows 1 27274 table_id: # flags: STMT_END_F -master-bin.000001 27274 Table_map 1 27315 table_id: # (test.t1) -master-bin.000001 27315 Write_rows 1 27349 table_id: # flags: STMT_END_F -master-bin.000001 27349 Table_map 1 27390 table_id: # (test.t1) -master-bin.000001 27390 Write_rows 1 27424 table_id: # flags: STMT_END_F -master-bin.000001 27424 Table_map 1 27465 table_id: # (test.t1) -master-bin.000001 27465 Write_rows 1 27499 table_id: # flags: STMT_END_F -master-bin.000001 27499 Table_map 1 27540 table_id: # (test.t1) -master-bin.000001 27540 Write_rows 1 27574 table_id: # flags: STMT_END_F -master-bin.000001 27574 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 27690 table_id: # (test.t1) -master-bin.000001 27690 Write_rows 1 27724 table_id: # flags: STMT_END_F -master-bin.000001 27724 Table_map 1 27765 table_id: # (test.t1) -master-bin.000001 27765 Write_rows 1 27799 table_id: # flags: STMT_END_F -master-bin.000001 27799 Table_map 1 27840 table_id: # (test.t1) -master-bin.000001 27840 Write_rows 1 27874 table_id: # flags: STMT_END_F -master-bin.000001 27874 Table_map 1 27915 table_id: # (test.t1) -master-bin.000001 27915 Write_rows 1 27949 table_id: # flags: STMT_END_F -master-bin.000001 27949 Table_map 1 27990 table_id: # (test.t1) -master-bin.000001 27990 Write_rows 1 28024 table_id: # flags: STMT_END_F -master-bin.000001 28024 Table_map 1 28065 table_id: # (test.t1) -master-bin.000001 28065 Write_rows 1 28099 table_id: # flags: STMT_END_F -master-bin.000001 28099 Table_map 1 28140 table_id: # (test.t1) -master-bin.000001 28140 Write_rows 1 28174 table_id: # flags: STMT_END_F -master-bin.000001 28174 Table_map 1 28215 table_id: # (test.t1) -master-bin.000001 28215 Write_rows 1 28249 table_id: # flags: STMT_END_F -master-bin.000001 28249 Table_map 1 28290 table_id: # (test.t1) -master-bin.000001 28290 Write_rows 1 28324 table_id: # flags: STMT_END_F -master-bin.000001 28324 Table_map 1 28365 table_id: # (test.t1) -master-bin.000001 28365 Write_rows 1 28399 table_id: # flags: STMT_END_F -master-bin.000001 28399 Table_map 1 28440 table_id: # (test.t1) -master-bin.000001 28440 Write_rows 1 28474 table_id: # flags: STMT_END_F -master-bin.000001 28474 Table_map 1 28515 table_id: # (test.t1) -master-bin.000001 28515 Write_rows 1 28549 table_id: # flags: STMT_END_F -master-bin.000001 28549 Table_map 1 28590 table_id: # (test.t1) -master-bin.000001 28590 Write_rows 1 28624 table_id: # flags: STMT_END_F -master-bin.000001 28624 Table_map 1 28665 table_id: # (test.t1) -master-bin.000001 28665 Write_rows 1 28699 table_id: # flags: STMT_END_F -master-bin.000001 28699 Table_map 1 28740 table_id: # (test.t1) -master-bin.000001 28740 Write_rows 1 28774 table_id: # flags: STMT_END_F -master-bin.000001 28774 Table_map 1 28815 table_id: # (test.t1) -master-bin.000001 28815 Write_rows 1 28849 table_id: # flags: STMT_END_F -master-bin.000001 28849 Table_map 1 28890 table_id: # (test.t1) -master-bin.000001 28890 Write_rows 1 28924 table_id: # flags: STMT_END_F -master-bin.000001 28924 Table_map 1 28965 table_id: # (test.t1) -master-bin.000001 28965 Write_rows 1 28999 table_id: # flags: STMT_END_F -master-bin.000001 28999 Table_map 1 29040 table_id: # (test.t1) -master-bin.000001 29040 Write_rows 1 29074 table_id: # flags: STMT_END_F -master-bin.000001 29074 Table_map 1 29115 table_id: # (test.t1) -master-bin.000001 29115 Write_rows 1 29149 table_id: # flags: STMT_END_F -master-bin.000001 29149 Table_map 1 29190 table_id: # (test.t1) -master-bin.000001 29190 Write_rows 1 29224 table_id: # flags: STMT_END_F -master-bin.000001 29224 Table_map 1 29265 table_id: # (test.t1) -master-bin.000001 29265 Write_rows 1 29299 table_id: # flags: STMT_END_F -master-bin.000001 29299 Table_map 1 29340 table_id: # (test.t1) -master-bin.000001 29340 Write_rows 1 29374 table_id: # flags: STMT_END_F -master-bin.000001 29374 Table_map 1 29415 table_id: # (test.t1) -master-bin.000001 29415 Write_rows 1 29449 table_id: # flags: STMT_END_F -master-bin.000001 29449 Table_map 1 29490 table_id: # (test.t1) -master-bin.000001 29490 Write_rows 1 29524 table_id: # flags: STMT_END_F -master-bin.000001 29524 Table_map 1 29565 table_id: # (test.t1) -master-bin.000001 29565 Write_rows 1 29599 table_id: # flags: STMT_END_F -master-bin.000001 29599 Table_map 1 29640 table_id: # (test.t1) -master-bin.000001 29640 Write_rows 1 29674 table_id: # flags: STMT_END_F -master-bin.000001 29674 Table_map 1 29715 table_id: # (test.t1) -master-bin.000001 29715 Write_rows 1 29749 table_id: # flags: STMT_END_F -master-bin.000001 29749 Table_map 1 29790 table_id: # (test.t1) -master-bin.000001 29790 Write_rows 1 29824 table_id: # flags: STMT_END_F -master-bin.000001 29824 Table_map 1 29865 table_id: # (test.t1) -master-bin.000001 29865 Write_rows 1 29899 table_id: # flags: STMT_END_F -master-bin.000001 29899 Table_map 1 29940 table_id: # (test.t1) -master-bin.000001 29940 Write_rows 1 29974 table_id: # flags: STMT_END_F -master-bin.000001 29974 Table_map 1 30015 table_id: # (test.t1) -master-bin.000001 30015 Write_rows 1 30049 table_id: # flags: STMT_END_F -master-bin.000001 30049 Table_map 1 30090 table_id: # (test.t1) -master-bin.000001 30090 Write_rows 1 30124 table_id: # flags: STMT_END_F -master-bin.000001 30124 Table_map 1 30165 table_id: # (test.t1) -master-bin.000001 30165 Write_rows 1 30199 table_id: # flags: STMT_END_F -master-bin.000001 30199 Table_map 1 30240 table_id: # (test.t1) -master-bin.000001 30240 Write_rows 1 30274 table_id: # flags: STMT_END_F -master-bin.000001 30274 Xid 1 30301 COMMIT /* XID */ -master-bin.000001 30301 Rotate 1 30345 master-bin.000002;pos=4 +master-bin.000001 499 Xid 1 526 COMMIT /* XID */ +master-bin.000001 526 Query 1 602 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 107 Server version, Binlog ver: 4 +master-bin.000001 107 Query 1 207 use `test`; create table t1 (a int) engine=innodb +master-bin.000001 207 Query 1 275 use `test`; BEGIN +master-bin.000001 275 Table_map 1 316 table_id: # (test.t1) +master-bin.000001 316 Write_rows 1 350 table_id: # flags: STMT_END_F +master-bin.000001 350 Table_map 1 391 table_id: # (test.t1) +master-bin.000001 391 Write_rows 1 425 table_id: # flags: STMT_END_F +master-bin.000001 425 Table_map 1 466 table_id: # (test.t1) +master-bin.000001 466 Write_rows 1 500 table_id: # flags: STMT_END_F +master-bin.000001 500 Table_map 1 541 table_id: # (test.t1) +master-bin.000001 541 Write_rows 1 575 table_id: # flags: STMT_END_F +master-bin.000001 575 Table_map 1 616 table_id: # (test.t1) +master-bin.000001 616 Write_rows 1 650 table_id: # flags: STMT_END_F +master-bin.000001 650 Table_map 1 691 table_id: # (test.t1) +master-bin.000001 691 Write_rows 1 725 table_id: # flags: STMT_END_F +master-bin.000001 725 Table_map 1 766 table_id: # (test.t1) +master-bin.000001 766 Write_rows 1 800 table_id: # flags: STMT_END_F +master-bin.000001 800 Table_map 1 841 table_id: # (test.t1) +master-bin.000001 841 Write_rows 1 875 table_id: # flags: STMT_END_F +master-bin.000001 875 Table_map 1 916 table_id: # (test.t1) +master-bin.000001 916 Write_rows 1 950 table_id: # flags: STMT_END_F +master-bin.000001 950 Table_map 1 991 table_id: # (test.t1) +master-bin.000001 991 Write_rows 1 1025 table_id: # flags: STMT_END_F +master-bin.000001 1025 Table_map 1 1066 table_id: # (test.t1) +master-bin.000001 1066 Write_rows 1 1100 table_id: # flags: STMT_END_F +master-bin.000001 1100 Table_map 1 1141 table_id: # (test.t1) +master-bin.000001 1141 Write_rows 1 1175 table_id: # flags: STMT_END_F +master-bin.000001 1175 Table_map 1 1216 table_id: # (test.t1) +master-bin.000001 1216 Write_rows 1 1250 table_id: # flags: STMT_END_F +master-bin.000001 1250 Table_map 1 1291 table_id: # (test.t1) +master-bin.000001 1291 Write_rows 1 1325 table_id: # flags: STMT_END_F +master-bin.000001 1325 Table_map 1 1366 table_id: # (test.t1) +master-bin.000001 1366 Write_rows 1 1400 table_id: # flags: STMT_END_F +master-bin.000001 1400 Table_map 1 1441 table_id: # (test.t1) +master-bin.000001 1441 Write_rows 1 1475 table_id: # flags: STMT_END_F +master-bin.000001 1475 Table_map 1 1516 table_id: # (test.t1) +master-bin.000001 1516 Write_rows 1 1550 table_id: # flags: STMT_END_F +master-bin.000001 1550 Table_map 1 1591 table_id: # (test.t1) +master-bin.000001 1591 Write_rows 1 1625 table_id: # flags: STMT_END_F +master-bin.000001 1625 Table_map 1 1666 table_id: # (test.t1) +master-bin.000001 1666 Write_rows 1 1700 table_id: # flags: STMT_END_F +master-bin.000001 1700 Table_map 1 1741 table_id: # (test.t1) +master-bin.000001 1741 Write_rows 1 1775 table_id: # flags: STMT_END_F +master-bin.000001 1775 Table_map 1 1816 table_id: # (test.t1) +master-bin.000001 1816 Write_rows 1 1850 table_id: # flags: STMT_END_F +master-bin.000001 1850 Table_map 1 1891 table_id: # (test.t1) +master-bin.000001 1891 Write_rows 1 1925 table_id: # flags: STMT_END_F +master-bin.000001 1925 Table_map 1 1966 table_id: # (test.t1) +master-bin.000001 1966 Write_rows 1 2000 table_id: # flags: STMT_END_F +master-bin.000001 2000 Table_map 1 2041 table_id: # (test.t1) +master-bin.000001 2041 Write_rows 1 2075 table_id: # flags: STMT_END_F +master-bin.000001 2075 Table_map 1 2116 table_id: # (test.t1) +master-bin.000001 2116 Write_rows 1 2150 table_id: # flags: STMT_END_F +master-bin.000001 2150 Table_map 1 2191 table_id: # (test.t1) +master-bin.000001 2191 Write_rows 1 2225 table_id: # flags: STMT_END_F +master-bin.000001 2225 Table_map 1 2266 table_id: # (test.t1) +master-bin.000001 2266 Write_rows 1 2300 table_id: # flags: STMT_END_F +master-bin.000001 2300 Table_map 1 2341 table_id: # (test.t1) +master-bin.000001 2341 Write_rows 1 2375 table_id: # flags: STMT_END_F +master-bin.000001 2375 Table_map 1 2416 table_id: # (test.t1) +master-bin.000001 2416 Write_rows 1 2450 table_id: # flags: STMT_END_F +master-bin.000001 2450 Table_map 1 2491 table_id: # (test.t1) +master-bin.000001 2491 Write_rows 1 2525 table_id: # flags: STMT_END_F +master-bin.000001 2525 Table_map 1 2566 table_id: # (test.t1) +master-bin.000001 2566 Write_rows 1 2600 table_id: # flags: STMT_END_F +master-bin.000001 2600 Table_map 1 2641 table_id: # (test.t1) +master-bin.000001 2641 Write_rows 1 2675 table_id: # flags: STMT_END_F +master-bin.000001 2675 Table_map 1 2716 table_id: # (test.t1) +master-bin.000001 2716 Write_rows 1 2750 table_id: # flags: STMT_END_F +master-bin.000001 2750 Table_map 1 2791 table_id: # (test.t1) +master-bin.000001 2791 Write_rows 1 2825 table_id: # flags: STMT_END_F +master-bin.000001 2825 Table_map 1 2866 table_id: # (test.t1) +master-bin.000001 2866 Write_rows 1 2900 table_id: # flags: STMT_END_F +master-bin.000001 2900 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 3016 table_id: # (test.t1) +master-bin.000001 3016 Write_rows 1 3050 table_id: # flags: STMT_END_F +master-bin.000001 3050 Table_map 1 3091 table_id: # (test.t1) +master-bin.000001 3091 Write_rows 1 3125 table_id: # flags: STMT_END_F +master-bin.000001 3125 Table_map 1 3166 table_id: # (test.t1) +master-bin.000001 3166 Write_rows 1 3200 table_id: # flags: STMT_END_F +master-bin.000001 3200 Table_map 1 3241 table_id: # (test.t1) +master-bin.000001 3241 Write_rows 1 3275 table_id: # flags: STMT_END_F +master-bin.000001 3275 Table_map 1 3316 table_id: # (test.t1) +master-bin.000001 3316 Write_rows 1 3350 table_id: # flags: STMT_END_F +master-bin.000001 3350 Table_map 1 3391 table_id: # (test.t1) +master-bin.000001 3391 Write_rows 1 3425 table_id: # flags: STMT_END_F +master-bin.000001 3425 Table_map 1 3466 table_id: # (test.t1) +master-bin.000001 3466 Write_rows 1 3500 table_id: # flags: STMT_END_F +master-bin.000001 3500 Table_map 1 3541 table_id: # (test.t1) +master-bin.000001 3541 Write_rows 1 3575 table_id: # flags: STMT_END_F +master-bin.000001 3575 Table_map 1 3616 table_id: # (test.t1) +master-bin.000001 3616 Write_rows 1 3650 table_id: # flags: STMT_END_F +master-bin.000001 3650 Table_map 1 3691 table_id: # (test.t1) +master-bin.000001 3691 Write_rows 1 3725 table_id: # flags: STMT_END_F +master-bin.000001 3725 Table_map 1 3766 table_id: # (test.t1) +master-bin.000001 3766 Write_rows 1 3800 table_id: # flags: STMT_END_F +master-bin.000001 3800 Table_map 1 3841 table_id: # (test.t1) +master-bin.000001 3841 Write_rows 1 3875 table_id: # flags: STMT_END_F +master-bin.000001 3875 Table_map 1 3916 table_id: # (test.t1) +master-bin.000001 3916 Write_rows 1 3950 table_id: # flags: STMT_END_F +master-bin.000001 3950 Table_map 1 3991 table_id: # (test.t1) +master-bin.000001 3991 Write_rows 1 4025 table_id: # flags: STMT_END_F +master-bin.000001 4025 Table_map 1 4066 table_id: # (test.t1) +master-bin.000001 4066 Write_rows 1 4100 table_id: # flags: STMT_END_F +master-bin.000001 4100 Table_map 1 4141 table_id: # (test.t1) +master-bin.000001 4141 Write_rows 1 4175 table_id: # flags: STMT_END_F +master-bin.000001 4175 Table_map 1 4216 table_id: # (test.t1) +master-bin.000001 4216 Write_rows 1 4250 table_id: # flags: STMT_END_F +master-bin.000001 4250 Table_map 1 4291 table_id: # (test.t1) +master-bin.000001 4291 Write_rows 1 4325 table_id: # flags: STMT_END_F +master-bin.000001 4325 Table_map 1 4366 table_id: # (test.t1) +master-bin.000001 4366 Write_rows 1 4400 table_id: # flags: STMT_END_F +master-bin.000001 4400 Table_map 1 4441 table_id: # (test.t1) +master-bin.000001 4441 Write_rows 1 4475 table_id: # flags: STMT_END_F +master-bin.000001 4475 Table_map 1 4516 table_id: # (test.t1) +master-bin.000001 4516 Write_rows 1 4550 table_id: # flags: STMT_END_F +master-bin.000001 4550 Table_map 1 4591 table_id: # (test.t1) +master-bin.000001 4591 Write_rows 1 4625 table_id: # flags: STMT_END_F +master-bin.000001 4625 Table_map 1 4666 table_id: # (test.t1) +master-bin.000001 4666 Write_rows 1 4700 table_id: # flags: STMT_END_F +master-bin.000001 4700 Table_map 1 4741 table_id: # (test.t1) +master-bin.000001 4741 Write_rows 1 4775 table_id: # flags: STMT_END_F +master-bin.000001 4775 Table_map 1 4816 table_id: # (test.t1) +master-bin.000001 4816 Write_rows 1 4850 table_id: # flags: STMT_END_F +master-bin.000001 4850 Table_map 1 4891 table_id: # (test.t1) +master-bin.000001 4891 Write_rows 1 4925 table_id: # flags: STMT_END_F +master-bin.000001 4925 Table_map 1 4966 table_id: # (test.t1) +master-bin.000001 4966 Write_rows 1 5000 table_id: # flags: STMT_END_F +master-bin.000001 5000 Table_map 1 5041 table_id: # (test.t1) +master-bin.000001 5041 Write_rows 1 5075 table_id: # flags: STMT_END_F +master-bin.000001 5075 Table_map 1 5116 table_id: # (test.t1) +master-bin.000001 5116 Write_rows 1 5150 table_id: # flags: STMT_END_F +master-bin.000001 5150 Table_map 1 5191 table_id: # (test.t1) +master-bin.000001 5191 Write_rows 1 5225 table_id: # flags: STMT_END_F +master-bin.000001 5225 Table_map 1 5266 table_id: # (test.t1) +master-bin.000001 5266 Write_rows 1 5300 table_id: # flags: STMT_END_F +master-bin.000001 5300 Table_map 1 5341 table_id: # (test.t1) +master-bin.000001 5341 Write_rows 1 5375 table_id: # flags: STMT_END_F +master-bin.000001 5375 Table_map 1 5416 table_id: # (test.t1) +master-bin.000001 5416 Write_rows 1 5450 table_id: # flags: STMT_END_F +master-bin.000001 5450 Table_map 1 5491 table_id: # (test.t1) +master-bin.000001 5491 Write_rows 1 5525 table_id: # flags: STMT_END_F +master-bin.000001 5525 Table_map 1 5566 table_id: # (test.t1) +master-bin.000001 5566 Write_rows 1 5600 table_id: # flags: STMT_END_F +master-bin.000001 5600 Table_map 1 5641 table_id: # (test.t1) +master-bin.000001 5641 Write_rows 1 5675 table_id: # flags: STMT_END_F +master-bin.000001 5675 Table_map 1 5716 table_id: # (test.t1) +master-bin.000001 5716 Write_rows 1 5750 table_id: # flags: STMT_END_F +master-bin.000001 5750 Table_map 1 5791 table_id: # (test.t1) +master-bin.000001 5791 Write_rows 1 5825 table_id: # flags: STMT_END_F +master-bin.000001 5825 Table_map 1 5866 table_id: # (test.t1) +master-bin.000001 5866 Write_rows 1 5900 table_id: # flags: STMT_END_F +master-bin.000001 5900 Table_map 1 5941 table_id: # (test.t1) +master-bin.000001 5941 Write_rows 1 5975 table_id: # flags: STMT_END_F +master-bin.000001 5975 Table_map 1 6016 table_id: # (test.t1) +master-bin.000001 6016 Write_rows 1 6050 table_id: # flags: STMT_END_F +master-bin.000001 6050 Table_map 1 6091 table_id: # (test.t1) +master-bin.000001 6091 Write_rows 1 6125 table_id: # flags: STMT_END_F +master-bin.000001 6125 Table_map 1 6166 table_id: # (test.t1) +master-bin.000001 6166 Write_rows 1 6200 table_id: # flags: STMT_END_F +master-bin.000001 6200 Table_map 1 6241 table_id: # (test.t1) +master-bin.000001 6241 Write_rows 1 6275 table_id: # flags: STMT_END_F +master-bin.000001 6275 Table_map 1 6316 table_id: # (test.t1) +master-bin.000001 6316 Write_rows 1 6350 table_id: # flags: STMT_END_F +master-bin.000001 6350 Table_map 1 6391 table_id: # (test.t1) +master-bin.000001 6391 Write_rows 1 6425 table_id: # flags: STMT_END_F +master-bin.000001 6425 Table_map 1 6466 table_id: # (test.t1) +master-bin.000001 6466 Write_rows 1 6500 table_id: # flags: STMT_END_F +master-bin.000001 6500 Table_map 1 6541 table_id: # (test.t1) +master-bin.000001 6541 Write_rows 1 6575 table_id: # flags: STMT_END_F +master-bin.000001 6575 Table_map 1 6616 table_id: # (test.t1) +master-bin.000001 6616 Write_rows 1 6650 table_id: # flags: STMT_END_F +master-bin.000001 6650 Table_map 1 6691 table_id: # (test.t1) +master-bin.000001 6691 Write_rows 1 6725 table_id: # flags: STMT_END_F +master-bin.000001 6725 Table_map 1 6766 table_id: # (test.t1) +master-bin.000001 6766 Write_rows 1 6800 table_id: # flags: STMT_END_F +master-bin.000001 6800 Table_map 1 6841 table_id: # (test.t1) +master-bin.000001 6841 Write_rows 1 6875 table_id: # flags: STMT_END_F +master-bin.000001 6875 Table_map 1 6916 table_id: # (test.t1) +master-bin.000001 6916 Write_rows 1 6950 table_id: # flags: STMT_END_F +master-bin.000001 6950 Table_map 1 6991 table_id: # (test.t1) +master-bin.000001 6991 Write_rows 1 7025 table_id: # flags: STMT_END_F +master-bin.000001 7025 Table_map 1 7066 table_id: # (test.t1) +master-bin.000001 7066 Write_rows 1 7100 table_id: # flags: STMT_END_F +master-bin.000001 7100 Table_map 1 7141 table_id: # (test.t1) +master-bin.000001 7141 Write_rows 1 7175 table_id: # flags: STMT_END_F +master-bin.000001 7175 Table_map 1 7216 table_id: # (test.t1) +master-bin.000001 7216 Write_rows 1 7250 table_id: # flags: STMT_END_F +master-bin.000001 7250 Table_map 1 7291 table_id: # (test.t1) +master-bin.000001 7291 Write_rows 1 7325 table_id: # flags: STMT_END_F +master-bin.000001 7325 Table_map 1 7366 table_id: # (test.t1) +master-bin.000001 7366 Write_rows 1 7400 table_id: # flags: STMT_END_F +master-bin.000001 7400 Table_map 1 7441 table_id: # (test.t1) +master-bin.000001 7441 Write_rows 1 7475 table_id: # flags: STMT_END_F +master-bin.000001 7475 Table_map 1 7516 table_id: # (test.t1) +master-bin.000001 7516 Write_rows 1 7550 table_id: # flags: STMT_END_F +master-bin.000001 7550 Table_map 1 7591 table_id: # (test.t1) +master-bin.000001 7591 Write_rows 1 7625 table_id: # flags: STMT_END_F +master-bin.000001 7625 Table_map 1 7666 table_id: # (test.t1) +master-bin.000001 7666 Write_rows 1 7700 table_id: # flags: STMT_END_F +master-bin.000001 7700 Table_map 1 7741 table_id: # (test.t1) +master-bin.000001 7741 Write_rows 1 7775 table_id: # flags: STMT_END_F +master-bin.000001 7775 Table_map 1 7816 table_id: # (test.t1) +master-bin.000001 7816 Write_rows 1 7850 table_id: # flags: STMT_END_F +master-bin.000001 7850 Table_map 1 7891 table_id: # (test.t1) +master-bin.000001 7891 Write_rows 1 7925 table_id: # flags: STMT_END_F +master-bin.000001 7925 Table_map 1 7966 table_id: # (test.t1) +master-bin.000001 7966 Write_rows 1 8000 table_id: # flags: STMT_END_F +master-bin.000001 8000 Table_map 1 8041 table_id: # (test.t1) +master-bin.000001 8041 Write_rows 1 8075 table_id: # flags: STMT_END_F +master-bin.000001 8075 Table_map 1 8116 table_id: # (test.t1) +master-bin.000001 8116 Write_rows 1 8150 table_id: # flags: STMT_END_F +master-bin.000001 8150 Table_map 1 8191 table_id: # (test.t1) +master-bin.000001 8191 Write_rows 1 8225 table_id: # flags: STMT_END_F +master-bin.000001 8225 Table_map 1 8266 table_id: # (test.t1) +master-bin.000001 8266 Write_rows 1 8300 table_id: # flags: STMT_END_F +master-bin.000001 8300 Table_map 1 8341 table_id: # (test.t1) +master-bin.000001 8341 Write_rows 1 8375 table_id: # flags: STMT_END_F +master-bin.000001 8375 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 8491 table_id: # (test.t1) +master-bin.000001 8491 Write_rows 1 8525 table_id: # flags: STMT_END_F +master-bin.000001 8525 Table_map 1 8566 table_id: # (test.t1) +master-bin.000001 8566 Write_rows 1 8600 table_id: # flags: STMT_END_F +master-bin.000001 8600 Table_map 1 8641 table_id: # (test.t1) +master-bin.000001 8641 Write_rows 1 8675 table_id: # flags: STMT_END_F +master-bin.000001 8675 Table_map 1 8716 table_id: # (test.t1) +master-bin.000001 8716 Write_rows 1 8750 table_id: # flags: STMT_END_F +master-bin.000001 8750 Table_map 1 8791 table_id: # (test.t1) +master-bin.000001 8791 Write_rows 1 8825 table_id: # flags: STMT_END_F +master-bin.000001 8825 Table_map 1 8866 table_id: # (test.t1) +master-bin.000001 8866 Write_rows 1 8900 table_id: # flags: STMT_END_F +master-bin.000001 8900 Table_map 1 8941 table_id: # (test.t1) +master-bin.000001 8941 Write_rows 1 8975 table_id: # flags: STMT_END_F +master-bin.000001 8975 Table_map 1 9016 table_id: # (test.t1) +master-bin.000001 9016 Write_rows 1 9050 table_id: # flags: STMT_END_F +master-bin.000001 9050 Table_map 1 9091 table_id: # (test.t1) +master-bin.000001 9091 Write_rows 1 9125 table_id: # flags: STMT_END_F +master-bin.000001 9125 Table_map 1 9166 table_id: # (test.t1) +master-bin.000001 9166 Write_rows 1 9200 table_id: # flags: STMT_END_F +master-bin.000001 9200 Table_map 1 9241 table_id: # (test.t1) +master-bin.000001 9241 Write_rows 1 9275 table_id: # flags: STMT_END_F +master-bin.000001 9275 Table_map 1 9316 table_id: # (test.t1) +master-bin.000001 9316 Write_rows 1 9350 table_id: # flags: STMT_END_F +master-bin.000001 9350 Table_map 1 9391 table_id: # (test.t1) +master-bin.000001 9391 Write_rows 1 9425 table_id: # flags: STMT_END_F +master-bin.000001 9425 Table_map 1 9466 table_id: # (test.t1) +master-bin.000001 9466 Write_rows 1 9500 table_id: # flags: STMT_END_F +master-bin.000001 9500 Table_map 1 9541 table_id: # (test.t1) +master-bin.000001 9541 Write_rows 1 9575 table_id: # flags: STMT_END_F +master-bin.000001 9575 Table_map 1 9616 table_id: # (test.t1) +master-bin.000001 9616 Write_rows 1 9650 table_id: # flags: STMT_END_F +master-bin.000001 9650 Table_map 1 9691 table_id: # (test.t1) +master-bin.000001 9691 Write_rows 1 9725 table_id: # flags: STMT_END_F +master-bin.000001 9725 Table_map 1 9766 table_id: # (test.t1) +master-bin.000001 9766 Write_rows 1 9800 table_id: # flags: STMT_END_F +master-bin.000001 9800 Table_map 1 9841 table_id: # (test.t1) +master-bin.000001 9841 Write_rows 1 9875 table_id: # flags: STMT_END_F +master-bin.000001 9875 Table_map 1 9916 table_id: # (test.t1) +master-bin.000001 9916 Write_rows 1 9950 table_id: # flags: STMT_END_F +master-bin.000001 9950 Table_map 1 9991 table_id: # (test.t1) +master-bin.000001 9991 Write_rows 1 10025 table_id: # flags: STMT_END_F +master-bin.000001 10025 Table_map 1 10066 table_id: # (test.t1) +master-bin.000001 10066 Write_rows 1 10100 table_id: # flags: STMT_END_F +master-bin.000001 10100 Table_map 1 10141 table_id: # (test.t1) +master-bin.000001 10141 Write_rows 1 10175 table_id: # flags: STMT_END_F +master-bin.000001 10175 Table_map 1 10216 table_id: # (test.t1) +master-bin.000001 10216 Write_rows 1 10250 table_id: # flags: STMT_END_F +master-bin.000001 10250 Table_map 1 10291 table_id: # (test.t1) +master-bin.000001 10291 Write_rows 1 10325 table_id: # flags: STMT_END_F +master-bin.000001 10325 Table_map 1 10366 table_id: # (test.t1) +master-bin.000001 10366 Write_rows 1 10400 table_id: # flags: STMT_END_F +master-bin.000001 10400 Table_map 1 10441 table_id: # (test.t1) +master-bin.000001 10441 Write_rows 1 10475 table_id: # flags: STMT_END_F +master-bin.000001 10475 Table_map 1 10516 table_id: # (test.t1) +master-bin.000001 10516 Write_rows 1 10550 table_id: # flags: STMT_END_F +master-bin.000001 10550 Table_map 1 10591 table_id: # (test.t1) +master-bin.000001 10591 Write_rows 1 10625 table_id: # flags: STMT_END_F +master-bin.000001 10625 Table_map 1 10666 table_id: # (test.t1) +master-bin.000001 10666 Write_rows 1 10700 table_id: # flags: STMT_END_F +master-bin.000001 10700 Table_map 1 10741 table_id: # (test.t1) +master-bin.000001 10741 Write_rows 1 10775 table_id: # flags: STMT_END_F +master-bin.000001 10775 Table_map 1 10816 table_id: # (test.t1) +master-bin.000001 10816 Write_rows 1 10850 table_id: # flags: STMT_END_F +master-bin.000001 10850 Table_map 1 10891 table_id: # (test.t1) +master-bin.000001 10891 Write_rows 1 10925 table_id: # flags: STMT_END_F +master-bin.000001 10925 Table_map 1 10966 table_id: # (test.t1) +master-bin.000001 10966 Write_rows 1 11000 table_id: # flags: STMT_END_F +master-bin.000001 11000 Table_map 1 11041 table_id: # (test.t1) +master-bin.000001 11041 Write_rows 1 11075 table_id: # flags: STMT_END_F +master-bin.000001 11075 Table_map 1 11116 table_id: # (test.t1) +master-bin.000001 11116 Write_rows 1 11150 table_id: # flags: STMT_END_F +master-bin.000001 11150 Table_map 1 11191 table_id: # (test.t1) +master-bin.000001 11191 Write_rows 1 11225 table_id: # flags: STMT_END_F +master-bin.000001 11225 Table_map 1 11266 table_id: # (test.t1) +master-bin.000001 11266 Write_rows 1 11300 table_id: # flags: STMT_END_F +master-bin.000001 11300 Table_map 1 11341 table_id: # (test.t1) +master-bin.000001 11341 Write_rows 1 11375 table_id: # flags: STMT_END_F +master-bin.000001 11375 Table_map 1 11416 table_id: # (test.t1) +master-bin.000001 11416 Write_rows 1 11450 table_id: # flags: STMT_END_F +master-bin.000001 11450 Table_map 1 11491 table_id: # (test.t1) +master-bin.000001 11491 Write_rows 1 11525 table_id: # flags: STMT_END_F +master-bin.000001 11525 Table_map 1 11566 table_id: # (test.t1) +master-bin.000001 11566 Write_rows 1 11600 table_id: # flags: STMT_END_F +master-bin.000001 11600 Table_map 1 11641 table_id: # (test.t1) +master-bin.000001 11641 Write_rows 1 11675 table_id: # flags: STMT_END_F +master-bin.000001 11675 Table_map 1 11716 table_id: # (test.t1) +master-bin.000001 11716 Write_rows 1 11750 table_id: # flags: STMT_END_F +master-bin.000001 11750 Table_map 1 11791 table_id: # (test.t1) +master-bin.000001 11791 Write_rows 1 11825 table_id: # flags: STMT_END_F +master-bin.000001 11825 Table_map 1 11866 table_id: # (test.t1) +master-bin.000001 11866 Write_rows 1 11900 table_id: # flags: STMT_END_F +master-bin.000001 11900 Table_map 1 11941 table_id: # (test.t1) +master-bin.000001 11941 Write_rows 1 11975 table_id: # flags: STMT_END_F +master-bin.000001 11975 Table_map 1 12016 table_id: # (test.t1) +master-bin.000001 12016 Write_rows 1 12050 table_id: # flags: STMT_END_F +master-bin.000001 12050 Table_map 1 12091 table_id: # (test.t1) +master-bin.000001 12091 Write_rows 1 12125 table_id: # flags: STMT_END_F +master-bin.000001 12125 Table_map 1 12166 table_id: # (test.t1) +master-bin.000001 12166 Write_rows 1 12200 table_id: # flags: STMT_END_F +master-bin.000001 12200 Table_map 1 12241 table_id: # (test.t1) +master-bin.000001 12241 Write_rows 1 12275 table_id: # flags: STMT_END_F +master-bin.000001 12275 Table_map 1 12316 table_id: # (test.t1) +master-bin.000001 12316 Write_rows 1 12350 table_id: # flags: STMT_END_F +master-bin.000001 12350 Table_map 1 12391 table_id: # (test.t1) +master-bin.000001 12391 Write_rows 1 12425 table_id: # flags: STMT_END_F +master-bin.000001 12425 Table_map 1 12466 table_id: # (test.t1) +master-bin.000001 12466 Write_rows 1 12500 table_id: # flags: STMT_END_F +master-bin.000001 12500 Table_map 1 12541 table_id: # (test.t1) +master-bin.000001 12541 Write_rows 1 12575 table_id: # flags: STMT_END_F +master-bin.000001 12575 Table_map 1 12616 table_id: # (test.t1) +master-bin.000001 12616 Write_rows 1 12650 table_id: # flags: STMT_END_F +master-bin.000001 12650 Table_map 1 12691 table_id: # (test.t1) +master-bin.000001 12691 Write_rows 1 12725 table_id: # flags: STMT_END_F +master-bin.000001 12725 Table_map 1 12766 table_id: # (test.t1) +master-bin.000001 12766 Write_rows 1 12800 table_id: # flags: STMT_END_F +master-bin.000001 12800 Table_map 1 12841 table_id: # (test.t1) +master-bin.000001 12841 Write_rows 1 12875 table_id: # flags: STMT_END_F +master-bin.000001 12875 Table_map 1 12916 table_id: # (test.t1) +master-bin.000001 12916 Write_rows 1 12950 table_id: # flags: STMT_END_F +master-bin.000001 12950 Table_map 1 12991 table_id: # (test.t1) +master-bin.000001 12991 Write_rows 1 13025 table_id: # flags: STMT_END_F +master-bin.000001 13025 Table_map 1 13066 table_id: # (test.t1) +master-bin.000001 13066 Write_rows 1 13100 table_id: # flags: STMT_END_F +master-bin.000001 13100 Table_map 1 13141 table_id: # (test.t1) +master-bin.000001 13141 Write_rows 1 13175 table_id: # flags: STMT_END_F +master-bin.000001 13175 Table_map 1 13216 table_id: # (test.t1) +master-bin.000001 13216 Write_rows 1 13250 table_id: # flags: STMT_END_F +master-bin.000001 13250 Table_map 1 13291 table_id: # (test.t1) +master-bin.000001 13291 Write_rows 1 13325 table_id: # flags: STMT_END_F +master-bin.000001 13325 Table_map 1 13366 table_id: # (test.t1) +master-bin.000001 13366 Write_rows 1 13400 table_id: # flags: STMT_END_F +master-bin.000001 13400 Table_map 1 13441 table_id: # (test.t1) +master-bin.000001 13441 Write_rows 1 13475 table_id: # flags: STMT_END_F +master-bin.000001 13475 Table_map 1 13516 table_id: # (test.t1) +master-bin.000001 13516 Write_rows 1 13550 table_id: # flags: STMT_END_F +master-bin.000001 13550 Table_map 1 13591 table_id: # (test.t1) +master-bin.000001 13591 Write_rows 1 13625 table_id: # flags: STMT_END_F +master-bin.000001 13625 Table_map 1 13666 table_id: # (test.t1) +master-bin.000001 13666 Write_rows 1 13700 table_id: # flags: STMT_END_F +master-bin.000001 13700 Table_map 1 13741 table_id: # (test.t1) +master-bin.000001 13741 Write_rows 1 13775 table_id: # flags: STMT_END_F +master-bin.000001 13775 Table_map 1 13816 table_id: # (test.t1) +master-bin.000001 13816 Write_rows 1 13850 table_id: # flags: STMT_END_F +master-bin.000001 13850 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 13966 table_id: # (test.t1) +master-bin.000001 13966 Write_rows 1 14000 table_id: # flags: STMT_END_F +master-bin.000001 14000 Table_map 1 14041 table_id: # (test.t1) +master-bin.000001 14041 Write_rows 1 14075 table_id: # flags: STMT_END_F +master-bin.000001 14075 Table_map 1 14116 table_id: # (test.t1) +master-bin.000001 14116 Write_rows 1 14150 table_id: # flags: STMT_END_F +master-bin.000001 14150 Table_map 1 14191 table_id: # (test.t1) +master-bin.000001 14191 Write_rows 1 14225 table_id: # flags: STMT_END_F +master-bin.000001 14225 Table_map 1 14266 table_id: # (test.t1) +master-bin.000001 14266 Write_rows 1 14300 table_id: # flags: STMT_END_F +master-bin.000001 14300 Table_map 1 14341 table_id: # (test.t1) +master-bin.000001 14341 Write_rows 1 14375 table_id: # flags: STMT_END_F +master-bin.000001 14375 Table_map 1 14416 table_id: # (test.t1) +master-bin.000001 14416 Write_rows 1 14450 table_id: # flags: STMT_END_F +master-bin.000001 14450 Table_map 1 14491 table_id: # (test.t1) +master-bin.000001 14491 Write_rows 1 14525 table_id: # flags: STMT_END_F +master-bin.000001 14525 Table_map 1 14566 table_id: # (test.t1) +master-bin.000001 14566 Write_rows 1 14600 table_id: # flags: STMT_END_F +master-bin.000001 14600 Table_map 1 14641 table_id: # (test.t1) +master-bin.000001 14641 Write_rows 1 14675 table_id: # flags: STMT_END_F +master-bin.000001 14675 Table_map 1 14716 table_id: # (test.t1) +master-bin.000001 14716 Write_rows 1 14750 table_id: # flags: STMT_END_F +master-bin.000001 14750 Table_map 1 14791 table_id: # (test.t1) +master-bin.000001 14791 Write_rows 1 14825 table_id: # flags: STMT_END_F +master-bin.000001 14825 Table_map 1 14866 table_id: # (test.t1) +master-bin.000001 14866 Write_rows 1 14900 table_id: # flags: STMT_END_F +master-bin.000001 14900 Table_map 1 14941 table_id: # (test.t1) +master-bin.000001 14941 Write_rows 1 14975 table_id: # flags: STMT_END_F +master-bin.000001 14975 Table_map 1 15016 table_id: # (test.t1) +master-bin.000001 15016 Write_rows 1 15050 table_id: # flags: STMT_END_F +master-bin.000001 15050 Table_map 1 15091 table_id: # (test.t1) +master-bin.000001 15091 Write_rows 1 15125 table_id: # flags: STMT_END_F +master-bin.000001 15125 Table_map 1 15166 table_id: # (test.t1) +master-bin.000001 15166 Write_rows 1 15200 table_id: # flags: STMT_END_F +master-bin.000001 15200 Table_map 1 15241 table_id: # (test.t1) +master-bin.000001 15241 Write_rows 1 15275 table_id: # flags: STMT_END_F +master-bin.000001 15275 Table_map 1 15316 table_id: # (test.t1) +master-bin.000001 15316 Write_rows 1 15350 table_id: # flags: STMT_END_F +master-bin.000001 15350 Table_map 1 15391 table_id: # (test.t1) +master-bin.000001 15391 Write_rows 1 15425 table_id: # flags: STMT_END_F +master-bin.000001 15425 Table_map 1 15466 table_id: # (test.t1) +master-bin.000001 15466 Write_rows 1 15500 table_id: # flags: STMT_END_F +master-bin.000001 15500 Table_map 1 15541 table_id: # (test.t1) +master-bin.000001 15541 Write_rows 1 15575 table_id: # flags: STMT_END_F +master-bin.000001 15575 Table_map 1 15616 table_id: # (test.t1) +master-bin.000001 15616 Write_rows 1 15650 table_id: # flags: STMT_END_F +master-bin.000001 15650 Table_map 1 15691 table_id: # (test.t1) +master-bin.000001 15691 Write_rows 1 15725 table_id: # flags: STMT_END_F +master-bin.000001 15725 Table_map 1 15766 table_id: # (test.t1) +master-bin.000001 15766 Write_rows 1 15800 table_id: # flags: STMT_END_F +master-bin.000001 15800 Table_map 1 15841 table_id: # (test.t1) +master-bin.000001 15841 Write_rows 1 15875 table_id: # flags: STMT_END_F +master-bin.000001 15875 Table_map 1 15916 table_id: # (test.t1) +master-bin.000001 15916 Write_rows 1 15950 table_id: # flags: STMT_END_F +master-bin.000001 15950 Table_map 1 15991 table_id: # (test.t1) +master-bin.000001 15991 Write_rows 1 16025 table_id: # flags: STMT_END_F +master-bin.000001 16025 Table_map 1 16066 table_id: # (test.t1) +master-bin.000001 16066 Write_rows 1 16100 table_id: # flags: STMT_END_F +master-bin.000001 16100 Table_map 1 16141 table_id: # (test.t1) +master-bin.000001 16141 Write_rows 1 16175 table_id: # flags: STMT_END_F +master-bin.000001 16175 Table_map 1 16216 table_id: # (test.t1) +master-bin.000001 16216 Write_rows 1 16250 table_id: # flags: STMT_END_F +master-bin.000001 16250 Table_map 1 16291 table_id: # (test.t1) +master-bin.000001 16291 Write_rows 1 16325 table_id: # flags: STMT_END_F +master-bin.000001 16325 Table_map 1 16366 table_id: # (test.t1) +master-bin.000001 16366 Write_rows 1 16400 table_id: # flags: STMT_END_F +master-bin.000001 16400 Table_map 1 16441 table_id: # (test.t1) +master-bin.000001 16441 Write_rows 1 16475 table_id: # flags: STMT_END_F +master-bin.000001 16475 Table_map 1 16516 table_id: # (test.t1) +master-bin.000001 16516 Write_rows 1 16550 table_id: # flags: STMT_END_F +master-bin.000001 16550 Table_map 1 16591 table_id: # (test.t1) +master-bin.000001 16591 Write_rows 1 16625 table_id: # flags: STMT_END_F +master-bin.000001 16625 Table_map 1 16666 table_id: # (test.t1) +master-bin.000001 16666 Write_rows 1 16700 table_id: # flags: STMT_END_F +master-bin.000001 16700 Table_map 1 16741 table_id: # (test.t1) +master-bin.000001 16741 Write_rows 1 16775 table_id: # flags: STMT_END_F +master-bin.000001 16775 Table_map 1 16816 table_id: # (test.t1) +master-bin.000001 16816 Write_rows 1 16850 table_id: # flags: STMT_END_F +master-bin.000001 16850 Table_map 1 16891 table_id: # (test.t1) +master-bin.000001 16891 Write_rows 1 16925 table_id: # flags: STMT_END_F +master-bin.000001 16925 Table_map 1 16966 table_id: # (test.t1) +master-bin.000001 16966 Write_rows 1 17000 table_id: # flags: STMT_END_F +master-bin.000001 17000 Table_map 1 17041 table_id: # (test.t1) +master-bin.000001 17041 Write_rows 1 17075 table_id: # flags: STMT_END_F +master-bin.000001 17075 Table_map 1 17116 table_id: # (test.t1) +master-bin.000001 17116 Write_rows 1 17150 table_id: # flags: STMT_END_F +master-bin.000001 17150 Table_map 1 17191 table_id: # (test.t1) +master-bin.000001 17191 Write_rows 1 17225 table_id: # flags: STMT_END_F +master-bin.000001 17225 Table_map 1 17266 table_id: # (test.t1) +master-bin.000001 17266 Write_rows 1 17300 table_id: # flags: STMT_END_F +master-bin.000001 17300 Table_map 1 17341 table_id: # (test.t1) +master-bin.000001 17341 Write_rows 1 17375 table_id: # flags: STMT_END_F +master-bin.000001 17375 Table_map 1 17416 table_id: # (test.t1) +master-bin.000001 17416 Write_rows 1 17450 table_id: # flags: STMT_END_F +master-bin.000001 17450 Table_map 1 17491 table_id: # (test.t1) +master-bin.000001 17491 Write_rows 1 17525 table_id: # flags: STMT_END_F +master-bin.000001 17525 Table_map 1 17566 table_id: # (test.t1) +master-bin.000001 17566 Write_rows 1 17600 table_id: # flags: STMT_END_F +master-bin.000001 17600 Table_map 1 17641 table_id: # (test.t1) +master-bin.000001 17641 Write_rows 1 17675 table_id: # flags: STMT_END_F +master-bin.000001 17675 Table_map 1 17716 table_id: # (test.t1) +master-bin.000001 17716 Write_rows 1 17750 table_id: # flags: STMT_END_F +master-bin.000001 17750 Table_map 1 17791 table_id: # (test.t1) +master-bin.000001 17791 Write_rows 1 17825 table_id: # flags: STMT_END_F +master-bin.000001 17825 Table_map 1 17866 table_id: # (test.t1) +master-bin.000001 17866 Write_rows 1 17900 table_id: # flags: STMT_END_F +master-bin.000001 17900 Table_map 1 17941 table_id: # (test.t1) +master-bin.000001 17941 Write_rows 1 17975 table_id: # flags: STMT_END_F +master-bin.000001 17975 Table_map 1 18016 table_id: # (test.t1) +master-bin.000001 18016 Write_rows 1 18050 table_id: # flags: STMT_END_F +master-bin.000001 18050 Table_map 1 18091 table_id: # (test.t1) +master-bin.000001 18091 Write_rows 1 18125 table_id: # flags: STMT_END_F +master-bin.000001 18125 Table_map 1 18166 table_id: # (test.t1) +master-bin.000001 18166 Write_rows 1 18200 table_id: # flags: STMT_END_F +master-bin.000001 18200 Table_map 1 18241 table_id: # (test.t1) +master-bin.000001 18241 Write_rows 1 18275 table_id: # flags: STMT_END_F +master-bin.000001 18275 Table_map 1 18316 table_id: # (test.t1) +master-bin.000001 18316 Write_rows 1 18350 table_id: # flags: STMT_END_F +master-bin.000001 18350 Table_map 1 18391 table_id: # (test.t1) +master-bin.000001 18391 Write_rows 1 18425 table_id: # flags: STMT_END_F +master-bin.000001 18425 Table_map 1 18466 table_id: # (test.t1) +master-bin.000001 18466 Write_rows 1 18500 table_id: # flags: STMT_END_F +master-bin.000001 18500 Table_map 1 18541 table_id: # (test.t1) +master-bin.000001 18541 Write_rows 1 18575 table_id: # flags: STMT_END_F +master-bin.000001 18575 Table_map 1 18616 table_id: # (test.t1) +master-bin.000001 18616 Write_rows 1 18650 table_id: # flags: STMT_END_F +master-bin.000001 18650 Table_map 1 18691 table_id: # (test.t1) +master-bin.000001 18691 Write_rows 1 18725 table_id: # flags: STMT_END_F +master-bin.000001 18725 Table_map 1 18766 table_id: # (test.t1) +master-bin.000001 18766 Write_rows 1 18800 table_id: # flags: STMT_END_F +master-bin.000001 18800 Table_map 1 18841 table_id: # (test.t1) +master-bin.000001 18841 Write_rows 1 18875 table_id: # flags: STMT_END_F +master-bin.000001 18875 Table_map 1 18916 table_id: # (test.t1) +master-bin.000001 18916 Write_rows 1 18950 table_id: # flags: STMT_END_F +master-bin.000001 18950 Table_map 1 18991 table_id: # (test.t1) +master-bin.000001 18991 Write_rows 1 19025 table_id: # flags: STMT_END_F +master-bin.000001 19025 Table_map 1 19066 table_id: # (test.t1) +master-bin.000001 19066 Write_rows 1 19100 table_id: # flags: STMT_END_F +master-bin.000001 19100 Table_map 1 19141 table_id: # (test.t1) +master-bin.000001 19141 Write_rows 1 19175 table_id: # flags: STMT_END_F +master-bin.000001 19175 Table_map 1 19216 table_id: # (test.t1) +master-bin.000001 19216 Write_rows 1 19250 table_id: # flags: STMT_END_F +master-bin.000001 19250 Table_map 1 19291 table_id: # (test.t1) +master-bin.000001 19291 Write_rows 1 19325 table_id: # flags: STMT_END_F +master-bin.000001 19325 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 19441 table_id: # (test.t1) +master-bin.000001 19441 Write_rows 1 19475 table_id: # flags: STMT_END_F +master-bin.000001 19475 Table_map 1 19516 table_id: # (test.t1) +master-bin.000001 19516 Write_rows 1 19550 table_id: # flags: STMT_END_F +master-bin.000001 19550 Table_map 1 19591 table_id: # (test.t1) +master-bin.000001 19591 Write_rows 1 19625 table_id: # flags: STMT_END_F +master-bin.000001 19625 Table_map 1 19666 table_id: # (test.t1) +master-bin.000001 19666 Write_rows 1 19700 table_id: # flags: STMT_END_F +master-bin.000001 19700 Table_map 1 19741 table_id: # (test.t1) +master-bin.000001 19741 Write_rows 1 19775 table_id: # flags: STMT_END_F +master-bin.000001 19775 Table_map 1 19816 table_id: # (test.t1) +master-bin.000001 19816 Write_rows 1 19850 table_id: # flags: STMT_END_F +master-bin.000001 19850 Table_map 1 19891 table_id: # (test.t1) +master-bin.000001 19891 Write_rows 1 19925 table_id: # flags: STMT_END_F +master-bin.000001 19925 Table_map 1 19966 table_id: # (test.t1) +master-bin.000001 19966 Write_rows 1 20000 table_id: # flags: STMT_END_F +master-bin.000001 20000 Table_map 1 20041 table_id: # (test.t1) +master-bin.000001 20041 Write_rows 1 20075 table_id: # flags: STMT_END_F +master-bin.000001 20075 Table_map 1 20116 table_id: # (test.t1) +master-bin.000001 20116 Write_rows 1 20150 table_id: # flags: STMT_END_F +master-bin.000001 20150 Table_map 1 20191 table_id: # (test.t1) +master-bin.000001 20191 Write_rows 1 20225 table_id: # flags: STMT_END_F +master-bin.000001 20225 Table_map 1 20266 table_id: # (test.t1) +master-bin.000001 20266 Write_rows 1 20300 table_id: # flags: STMT_END_F +master-bin.000001 20300 Table_map 1 20341 table_id: # (test.t1) +master-bin.000001 20341 Write_rows 1 20375 table_id: # flags: STMT_END_F +master-bin.000001 20375 Table_map 1 20416 table_id: # (test.t1) +master-bin.000001 20416 Write_rows 1 20450 table_id: # flags: STMT_END_F +master-bin.000001 20450 Table_map 1 20491 table_id: # (test.t1) +master-bin.000001 20491 Write_rows 1 20525 table_id: # flags: STMT_END_F +master-bin.000001 20525 Table_map 1 20566 table_id: # (test.t1) +master-bin.000001 20566 Write_rows 1 20600 table_id: # flags: STMT_END_F +master-bin.000001 20600 Table_map 1 20641 table_id: # (test.t1) +master-bin.000001 20641 Write_rows 1 20675 table_id: # flags: STMT_END_F +master-bin.000001 20675 Table_map 1 20716 table_id: # (test.t1) +master-bin.000001 20716 Write_rows 1 20750 table_id: # flags: STMT_END_F +master-bin.000001 20750 Table_map 1 20791 table_id: # (test.t1) +master-bin.000001 20791 Write_rows 1 20825 table_id: # flags: STMT_END_F +master-bin.000001 20825 Table_map 1 20866 table_id: # (test.t1) +master-bin.000001 20866 Write_rows 1 20900 table_id: # flags: STMT_END_F +master-bin.000001 20900 Table_map 1 20941 table_id: # (test.t1) +master-bin.000001 20941 Write_rows 1 20975 table_id: # flags: STMT_END_F +master-bin.000001 20975 Table_map 1 21016 table_id: # (test.t1) +master-bin.000001 21016 Write_rows 1 21050 table_id: # flags: STMT_END_F +master-bin.000001 21050 Table_map 1 21091 table_id: # (test.t1) +master-bin.000001 21091 Write_rows 1 21125 table_id: # flags: STMT_END_F +master-bin.000001 21125 Table_map 1 21166 table_id: # (test.t1) +master-bin.000001 21166 Write_rows 1 21200 table_id: # flags: STMT_END_F +master-bin.000001 21200 Table_map 1 21241 table_id: # (test.t1) +master-bin.000001 21241 Write_rows 1 21275 table_id: # flags: STMT_END_F +master-bin.000001 21275 Table_map 1 21316 table_id: # (test.t1) +master-bin.000001 21316 Write_rows 1 21350 table_id: # flags: STMT_END_F +master-bin.000001 21350 Table_map 1 21391 table_id: # (test.t1) +master-bin.000001 21391 Write_rows 1 21425 table_id: # flags: STMT_END_F +master-bin.000001 21425 Table_map 1 21466 table_id: # (test.t1) +master-bin.000001 21466 Write_rows 1 21500 table_id: # flags: STMT_END_F +master-bin.000001 21500 Table_map 1 21541 table_id: # (test.t1) +master-bin.000001 21541 Write_rows 1 21575 table_id: # flags: STMT_END_F +master-bin.000001 21575 Table_map 1 21616 table_id: # (test.t1) +master-bin.000001 21616 Write_rows 1 21650 table_id: # flags: STMT_END_F +master-bin.000001 21650 Table_map 1 21691 table_id: # (test.t1) +master-bin.000001 21691 Write_rows 1 21725 table_id: # flags: STMT_END_F +master-bin.000001 21725 Table_map 1 21766 table_id: # (test.t1) +master-bin.000001 21766 Write_rows 1 21800 table_id: # flags: STMT_END_F +master-bin.000001 21800 Table_map 1 21841 table_id: # (test.t1) +master-bin.000001 21841 Write_rows 1 21875 table_id: # flags: STMT_END_F +master-bin.000001 21875 Table_map 1 21916 table_id: # (test.t1) +master-bin.000001 21916 Write_rows 1 21950 table_id: # flags: STMT_END_F +master-bin.000001 21950 Table_map 1 21991 table_id: # (test.t1) +master-bin.000001 21991 Write_rows 1 22025 table_id: # flags: STMT_END_F +master-bin.000001 22025 Table_map 1 22066 table_id: # (test.t1) +master-bin.000001 22066 Write_rows 1 22100 table_id: # flags: STMT_END_F +master-bin.000001 22100 Table_map 1 22141 table_id: # (test.t1) +master-bin.000001 22141 Write_rows 1 22175 table_id: # flags: STMT_END_F +master-bin.000001 22175 Table_map 1 22216 table_id: # (test.t1) +master-bin.000001 22216 Write_rows 1 22250 table_id: # flags: STMT_END_F +master-bin.000001 22250 Table_map 1 22291 table_id: # (test.t1) +master-bin.000001 22291 Write_rows 1 22325 table_id: # flags: STMT_END_F +master-bin.000001 22325 Table_map 1 22366 table_id: # (test.t1) +master-bin.000001 22366 Write_rows 1 22400 table_id: # flags: STMT_END_F +master-bin.000001 22400 Table_map 1 22441 table_id: # (test.t1) +master-bin.000001 22441 Write_rows 1 22475 table_id: # flags: STMT_END_F +master-bin.000001 22475 Table_map 1 22516 table_id: # (test.t1) +master-bin.000001 22516 Write_rows 1 22550 table_id: # flags: STMT_END_F +master-bin.000001 22550 Table_map 1 22591 table_id: # (test.t1) +master-bin.000001 22591 Write_rows 1 22625 table_id: # flags: STMT_END_F +master-bin.000001 22625 Table_map 1 22666 table_id: # (test.t1) +master-bin.000001 22666 Write_rows 1 22700 table_id: # flags: STMT_END_F +master-bin.000001 22700 Table_map 1 22741 table_id: # (test.t1) +master-bin.000001 22741 Write_rows 1 22775 table_id: # flags: STMT_END_F +master-bin.000001 22775 Table_map 1 22816 table_id: # (test.t1) +master-bin.000001 22816 Write_rows 1 22850 table_id: # flags: STMT_END_F +master-bin.000001 22850 Table_map 1 22891 table_id: # (test.t1) +master-bin.000001 22891 Write_rows 1 22925 table_id: # flags: STMT_END_F +master-bin.000001 22925 Table_map 1 22966 table_id: # (test.t1) +master-bin.000001 22966 Write_rows 1 23000 table_id: # flags: STMT_END_F +master-bin.000001 23000 Table_map 1 23041 table_id: # (test.t1) +master-bin.000001 23041 Write_rows 1 23075 table_id: # flags: STMT_END_F +master-bin.000001 23075 Table_map 1 23116 table_id: # (test.t1) +master-bin.000001 23116 Write_rows 1 23150 table_id: # flags: STMT_END_F +master-bin.000001 23150 Table_map 1 23191 table_id: # (test.t1) +master-bin.000001 23191 Write_rows 1 23225 table_id: # flags: STMT_END_F +master-bin.000001 23225 Table_map 1 23266 table_id: # (test.t1) +master-bin.000001 23266 Write_rows 1 23300 table_id: # flags: STMT_END_F +master-bin.000001 23300 Table_map 1 23341 table_id: # (test.t1) +master-bin.000001 23341 Write_rows 1 23375 table_id: # flags: STMT_END_F +master-bin.000001 23375 Table_map 1 23416 table_id: # (test.t1) +master-bin.000001 23416 Write_rows 1 23450 table_id: # flags: STMT_END_F +master-bin.000001 23450 Table_map 1 23491 table_id: # (test.t1) +master-bin.000001 23491 Write_rows 1 23525 table_id: # flags: STMT_END_F +master-bin.000001 23525 Table_map 1 23566 table_id: # (test.t1) +master-bin.000001 23566 Write_rows 1 23600 table_id: # flags: STMT_END_F +master-bin.000001 23600 Table_map 1 23641 table_id: # (test.t1) +master-bin.000001 23641 Write_rows 1 23675 table_id: # flags: STMT_END_F +master-bin.000001 23675 Table_map 1 23716 table_id: # (test.t1) +master-bin.000001 23716 Write_rows 1 23750 table_id: # flags: STMT_END_F +master-bin.000001 23750 Table_map 1 23791 table_id: # (test.t1) +master-bin.000001 23791 Write_rows 1 23825 table_id: # flags: STMT_END_F +master-bin.000001 23825 Table_map 1 23866 table_id: # (test.t1) +master-bin.000001 23866 Write_rows 1 23900 table_id: # flags: STMT_END_F +master-bin.000001 23900 Table_map 1 23941 table_id: # (test.t1) +master-bin.000001 23941 Write_rows 1 23975 table_id: # flags: STMT_END_F +master-bin.000001 23975 Table_map 1 24016 table_id: # (test.t1) +master-bin.000001 24016 Write_rows 1 24050 table_id: # flags: STMT_END_F +master-bin.000001 24050 Table_map 1 24091 table_id: # (test.t1) +master-bin.000001 24091 Write_rows 1 24125 table_id: # flags: STMT_END_F +master-bin.000001 24125 Table_map 1 24166 table_id: # (test.t1) +master-bin.000001 24166 Write_rows 1 24200 table_id: # flags: STMT_END_F +master-bin.000001 24200 Table_map 1 24241 table_id: # (test.t1) +master-bin.000001 24241 Write_rows 1 24275 table_id: # flags: STMT_END_F +master-bin.000001 24275 Table_map 1 24316 table_id: # (test.t1) +master-bin.000001 24316 Write_rows 1 24350 table_id: # flags: STMT_END_F +master-bin.000001 24350 Table_map 1 24391 table_id: # (test.t1) +master-bin.000001 24391 Write_rows 1 24425 table_id: # flags: STMT_END_F +master-bin.000001 24425 Table_map 1 24466 table_id: # (test.t1) +master-bin.000001 24466 Write_rows 1 24500 table_id: # flags: STMT_END_F +master-bin.000001 24500 Table_map 1 24541 table_id: # (test.t1) +master-bin.000001 24541 Write_rows 1 24575 table_id: # flags: STMT_END_F +master-bin.000001 24575 Table_map 1 24616 table_id: # (test.t1) +master-bin.000001 24616 Write_rows 1 24650 table_id: # flags: STMT_END_F +master-bin.000001 24650 Table_map 1 24691 table_id: # (test.t1) +master-bin.000001 24691 Write_rows 1 24725 table_id: # flags: STMT_END_F +master-bin.000001 24725 Table_map 1 24766 table_id: # (test.t1) +master-bin.000001 24766 Write_rows 1 24800 table_id: # flags: STMT_END_F +master-bin.000001 24800 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 24916 table_id: # (test.t1) +master-bin.000001 24916 Write_rows 1 24950 table_id: # flags: STMT_END_F +master-bin.000001 24950 Table_map 1 24991 table_id: # (test.t1) +master-bin.000001 24991 Write_rows 1 25025 table_id: # flags: STMT_END_F +master-bin.000001 25025 Table_map 1 25066 table_id: # (test.t1) +master-bin.000001 25066 Write_rows 1 25100 table_id: # flags: STMT_END_F +master-bin.000001 25100 Table_map 1 25141 table_id: # (test.t1) +master-bin.000001 25141 Write_rows 1 25175 table_id: # flags: STMT_END_F +master-bin.000001 25175 Table_map 1 25216 table_id: # (test.t1) +master-bin.000001 25216 Write_rows 1 25250 table_id: # flags: STMT_END_F +master-bin.000001 25250 Table_map 1 25291 table_id: # (test.t1) +master-bin.000001 25291 Write_rows 1 25325 table_id: # flags: STMT_END_F +master-bin.000001 25325 Table_map 1 25366 table_id: # (test.t1) +master-bin.000001 25366 Write_rows 1 25400 table_id: # flags: STMT_END_F +master-bin.000001 25400 Table_map 1 25441 table_id: # (test.t1) +master-bin.000001 25441 Write_rows 1 25475 table_id: # flags: STMT_END_F +master-bin.000001 25475 Table_map 1 25516 table_id: # (test.t1) +master-bin.000001 25516 Write_rows 1 25550 table_id: # flags: STMT_END_F +master-bin.000001 25550 Table_map 1 25591 table_id: # (test.t1) +master-bin.000001 25591 Write_rows 1 25625 table_id: # flags: STMT_END_F +master-bin.000001 25625 Table_map 1 25666 table_id: # (test.t1) +master-bin.000001 25666 Write_rows 1 25700 table_id: # flags: STMT_END_F +master-bin.000001 25700 Table_map 1 25741 table_id: # (test.t1) +master-bin.000001 25741 Write_rows 1 25775 table_id: # flags: STMT_END_F +master-bin.000001 25775 Table_map 1 25816 table_id: # (test.t1) +master-bin.000001 25816 Write_rows 1 25850 table_id: # flags: STMT_END_F +master-bin.000001 25850 Table_map 1 25891 table_id: # (test.t1) +master-bin.000001 25891 Write_rows 1 25925 table_id: # flags: STMT_END_F +master-bin.000001 25925 Table_map 1 25966 table_id: # (test.t1) +master-bin.000001 25966 Write_rows 1 26000 table_id: # flags: STMT_END_F +master-bin.000001 26000 Table_map 1 26041 table_id: # (test.t1) +master-bin.000001 26041 Write_rows 1 26075 table_id: # flags: STMT_END_F +master-bin.000001 26075 Table_map 1 26116 table_id: # (test.t1) +master-bin.000001 26116 Write_rows 1 26150 table_id: # flags: STMT_END_F +master-bin.000001 26150 Table_map 1 26191 table_id: # (test.t1) +master-bin.000001 26191 Write_rows 1 26225 table_id: # flags: STMT_END_F +master-bin.000001 26225 Table_map 1 26266 table_id: # (test.t1) +master-bin.000001 26266 Write_rows 1 26300 table_id: # flags: STMT_END_F +master-bin.000001 26300 Table_map 1 26341 table_id: # (test.t1) +master-bin.000001 26341 Write_rows 1 26375 table_id: # flags: STMT_END_F +master-bin.000001 26375 Table_map 1 26416 table_id: # (test.t1) +master-bin.000001 26416 Write_rows 1 26450 table_id: # flags: STMT_END_F +master-bin.000001 26450 Table_map 1 26491 table_id: # (test.t1) +master-bin.000001 26491 Write_rows 1 26525 table_id: # flags: STMT_END_F +master-bin.000001 26525 Table_map 1 26566 table_id: # (test.t1) +master-bin.000001 26566 Write_rows 1 26600 table_id: # flags: STMT_END_F +master-bin.000001 26600 Table_map 1 26641 table_id: # (test.t1) +master-bin.000001 26641 Write_rows 1 26675 table_id: # flags: STMT_END_F +master-bin.000001 26675 Table_map 1 26716 table_id: # (test.t1) +master-bin.000001 26716 Write_rows 1 26750 table_id: # flags: STMT_END_F +master-bin.000001 26750 Table_map 1 26791 table_id: # (test.t1) +master-bin.000001 26791 Write_rows 1 26825 table_id: # flags: STMT_END_F +master-bin.000001 26825 Table_map 1 26866 table_id: # (test.t1) +master-bin.000001 26866 Write_rows 1 26900 table_id: # flags: STMT_END_F +master-bin.000001 26900 Table_map 1 26941 table_id: # (test.t1) +master-bin.000001 26941 Write_rows 1 26975 table_id: # flags: STMT_END_F +master-bin.000001 26975 Table_map 1 27016 table_id: # (test.t1) +master-bin.000001 27016 Write_rows 1 27050 table_id: # flags: STMT_END_F +master-bin.000001 27050 Table_map 1 27091 table_id: # (test.t1) +master-bin.000001 27091 Write_rows 1 27125 table_id: # flags: STMT_END_F +master-bin.000001 27125 Table_map 1 27166 table_id: # (test.t1) +master-bin.000001 27166 Write_rows 1 27200 table_id: # flags: STMT_END_F +master-bin.000001 27200 Table_map 1 27241 table_id: # (test.t1) +master-bin.000001 27241 Write_rows 1 27275 table_id: # flags: STMT_END_F +master-bin.000001 27275 Table_map 1 27316 table_id: # (test.t1) +master-bin.000001 27316 Write_rows 1 27350 table_id: # flags: STMT_END_F +master-bin.000001 27350 Table_map 1 27391 table_id: # (test.t1) +master-bin.000001 27391 Write_rows 1 27425 table_id: # flags: STMT_END_F +master-bin.000001 27425 Table_map 1 27466 table_id: # (test.t1) +master-bin.000001 27466 Write_rows 1 27500 table_id: # flags: STMT_END_F +master-bin.000001 27500 Table_map 1 27541 table_id: # (test.t1) +master-bin.000001 27541 Write_rows 1 27575 table_id: # flags: STMT_END_F +master-bin.000001 27575 Table_map 1 27616 table_id: # (test.t1) +master-bin.000001 27616 Write_rows 1 27650 table_id: # flags: STMT_END_F +master-bin.000001 27650 Table_map 1 27691 table_id: # (test.t1) +master-bin.000001 27691 Write_rows 1 27725 table_id: # flags: STMT_END_F +master-bin.000001 27725 Table_map 1 27766 table_id: # (test.t1) +master-bin.000001 27766 Write_rows 1 27800 table_id: # flags: STMT_END_F +master-bin.000001 27800 Table_map 1 27841 table_id: # (test.t1) +master-bin.000001 27841 Write_rows 1 27875 table_id: # flags: STMT_END_F +master-bin.000001 27875 Table_map 1 27916 table_id: # (test.t1) +master-bin.000001 27916 Write_rows 1 27950 table_id: # flags: STMT_END_F +master-bin.000001 27950 Table_map 1 27991 table_id: # (test.t1) +master-bin.000001 27991 Write_rows 1 28025 table_id: # flags: STMT_END_F +master-bin.000001 28025 Table_map 1 28066 table_id: # (test.t1) +master-bin.000001 28066 Write_rows 1 28100 table_id: # flags: STMT_END_F +master-bin.000001 28100 Table_map 1 28141 table_id: # (test.t1) +master-bin.000001 28141 Write_rows 1 28175 table_id: # flags: STMT_END_F +master-bin.000001 28175 Table_map 1 28216 table_id: # (test.t1) +master-bin.000001 28216 Write_rows 1 28250 table_id: # flags: STMT_END_F +master-bin.000001 28250 Table_map 1 28291 table_id: # (test.t1) +master-bin.000001 28291 Write_rows 1 28325 table_id: # flags: STMT_END_F +master-bin.000001 28325 Table_map 1 28366 table_id: # (test.t1) +master-bin.000001 28366 Write_rows 1 28400 table_id: # flags: STMT_END_F +master-bin.000001 28400 Table_map 1 28441 table_id: # (test.t1) +master-bin.000001 28441 Write_rows 1 28475 table_id: # flags: STMT_END_F +master-bin.000001 28475 Table_map 1 28516 table_id: # (test.t1) +master-bin.000001 28516 Write_rows 1 28550 table_id: # flags: STMT_END_F +master-bin.000001 28550 Table_map 1 28591 table_id: # (test.t1) +master-bin.000001 28591 Write_rows 1 28625 table_id: # flags: STMT_END_F +master-bin.000001 28625 Table_map 1 28666 table_id: # (test.t1) +master-bin.000001 28666 Write_rows 1 28700 table_id: # flags: STMT_END_F +master-bin.000001 28700 Table_map 1 28741 table_id: # (test.t1) +master-bin.000001 28741 Write_rows 1 28775 table_id: # flags: STMT_END_F +master-bin.000001 28775 Table_map 1 28816 table_id: # (test.t1) +master-bin.000001 28816 Write_rows 1 28850 table_id: # flags: STMT_END_F +master-bin.000001 28850 Table_map 1 28891 table_id: # (test.t1) +master-bin.000001 28891 Write_rows 1 28925 table_id: # flags: STMT_END_F +master-bin.000001 28925 Table_map 1 28966 table_id: # (test.t1) +master-bin.000001 28966 Write_rows 1 29000 table_id: # flags: STMT_END_F +master-bin.000001 29000 Table_map 1 29041 table_id: # (test.t1) +master-bin.000001 29041 Write_rows 1 29075 table_id: # flags: STMT_END_F +master-bin.000001 29075 Table_map 1 29116 table_id: # (test.t1) +master-bin.000001 29116 Write_rows 1 29150 table_id: # flags: STMT_END_F +master-bin.000001 29150 Table_map 1 29191 table_id: # (test.t1) +master-bin.000001 29191 Write_rows 1 29225 table_id: # flags: STMT_END_F +master-bin.000001 29225 Table_map 1 29266 table_id: # (test.t1) +master-bin.000001 29266 Write_rows 1 29300 table_id: # flags: STMT_END_F +master-bin.000001 29300 Table_map 1 29341 table_id: # (test.t1) +master-bin.000001 29341 Write_rows 1 29375 table_id: # flags: STMT_END_F +master-bin.000001 29375 Table_map 1 29416 table_id: # (test.t1) +master-bin.000001 29416 Write_rows 1 29450 table_id: # flags: STMT_END_F +master-bin.000001 29450 Table_map 1 29491 table_id: # (test.t1) +master-bin.000001 29491 Write_rows 1 29525 table_id: # flags: STMT_END_F +master-bin.000001 29525 Table_map 1 29566 table_id: # (test.t1) +master-bin.000001 29566 Write_rows 1 29600 table_id: # flags: STMT_END_F +master-bin.000001 29600 Table_map 1 29641 table_id: # (test.t1) +master-bin.000001 29641 Write_rows 1 29675 table_id: # flags: STMT_END_F +master-bin.000001 29675 Table_map 1 29716 table_id: # (test.t1) +master-bin.000001 29716 Write_rows 1 29750 table_id: # flags: STMT_END_F +master-bin.000001 29750 Table_map 1 29791 table_id: # (test.t1) +master-bin.000001 29791 Write_rows 1 29825 table_id: # flags: STMT_END_F +master-bin.000001 29825 Table_map 1 29866 table_id: # (test.t1) +master-bin.000001 29866 Write_rows 1 29900 table_id: # flags: STMT_END_F +master-bin.000001 29900 Table_map 1 29941 table_id: # (test.t1) +master-bin.000001 29941 Write_rows 1 29975 table_id: # flags: STMT_END_F +master-bin.000001 29975 Table_map 1 30016 table_id: # (test.t1) +master-bin.000001 30016 Write_rows 1 30050 table_id: # flags: STMT_END_F +master-bin.000001 30050 Table_map 1 30091 table_id: # (test.t1) +master-bin.000001 30091 Write_rows 1 30125 table_id: # flags: STMT_END_F +master-bin.000001 30125 Table_map 1 30166 table_id: # (test.t1) +master-bin.000001 30166 Write_rows 1 30200 table_id: # flags: STMT_END_F +master-bin.000001 30200 Table_map 1 30241 table_id: # (test.t1) +master-bin.000001 30241 Write_rows 1 30275 table_id: # flags: STMT_END_F +master-bin.000001 30275 Xid 1 30302 COMMIT /* XID */ +master-bin.000001 30302 Rotate 1 30346 master-bin.000002;pos=4 drop table t1; set global binlog_cache_size=@bcs; set session autocommit = @ac; @@ -1289,14 +1306,14 @@ 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 +master-bin.000001 347 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 +master-bin.000002 107 drop table t3; # # Bug #45998: database crashes when running "create as select" diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index d05d3ccdb7a..9df4164b138 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -36,7 +36,7 @@ create table t1 (n int) engine=innodb; begin; commit; drop table t1; -show binlog events in 'master-bin.000001' from 106; +show binlog events in 'master-bin.000001' from 107; 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 # BEGIN @@ -142,7 +142,7 @@ 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; +show binlog events in 'master-bin.000002' from 107; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Query 1 # use `test`; drop table t1 set @ac = @@autocommit; @@ -764,14 +764,14 @@ 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 +master-bin.000001 347 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 +master-bin.000002 107 drop table t3; # # Bug #45998: database crashes when running "create as select" diff --git a/mysql-test/suite/binlog/t/binlog_innodb.test b/mysql-test/suite/binlog/t/binlog_innodb.test index f84fd65226a..4469fa6224c 100644 --- a/mysql-test/suite/binlog/t/binlog_innodb.test +++ b/mysql-test/suite/binlog/t/binlog_innodb.test @@ -155,7 +155,8 @@ reset master; UPDATE t2,t1 SET t2.a=t1.a+2; # check select * from t2 /* must be (3,1), (4,4) */; -show master status /* there must no UPDATE in binlog */; +--echo there must no UPDATE in binlog +source include/show_master_status.inc; # B. testing multi_update::send_error() execution branch delete from t1; @@ -165,7 +166,8 @@ insert into t2 values (1,2),(3,4),(4,4); reset master; --error ER_DUP_ENTRY UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a; -show master status /* there must be no UPDATE query event */; +--echo there must no UPDATE in binlog +source include/show_master_status.inc; # cleanup bug#27716 drop table t1, t2; diff --git a/mysql-test/suite/binlog/t/binlog_killed.test b/mysql-test/suite/binlog/t/binlog_killed.test index 9b30ec4a0db..d4aa91140cf 100644 --- a/mysql-test/suite/binlog/t/binlog_killed.test +++ b/mysql-test/suite/binlog/t/binlog_killed.test @@ -51,7 +51,7 @@ reap; let $rows= `select count(*) from t2 /* must be 2 or 0 */`; let $MYSQLD_DATADIR= `select @@datadir`; ---exec $MYSQL_BINLOG --force-if-open --start-position=134 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/kill_query_calling_sp.binlog +--exec $MYSQL_BINLOG --force-if-open --start-position=135 $MYSQLD_DATADIR/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")) diff --git a/mysql-test/suite/binlog/t/binlog_killed_simulate.test b/mysql-test/suite/binlog/t/binlog_killed_simulate.test index ec61271ae88..f9240291dba 100644 --- a/mysql-test/suite/binlog/t/binlog_killed_simulate.test +++ b/mysql-test/suite/binlog/t/binlog_killed_simulate.test @@ -24,7 +24,7 @@ update t1 set a=2 /* will be "killed" after work has been done */; # for some constants like the offset of the first real event # that is different between severs versions. let $MYSQLD_DATADIR= `select @@datadir`; ---exec $MYSQL_BINLOG --force-if-open --start-position=106 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog +--exec $MYSQL_BINLOG --force-if-open --start-position=107 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) @@ -52,7 +52,7 @@ load data infile '../../std_data/rpl_loaddata.dat' into table t2 /* will be "kil source include/show_binlog_events.inc; ---exec $MYSQL_BINLOG --force-if-open --start-position=98 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog +--exec $MYSQL_BINLOG --force-if-open --start-position=107 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result index 4a789f361c6..2a7e4401500 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result @@ -17,16 +17,15 @@ show grants for x@y; Grants for x@y GRANT USAGE ON *.* TO 'x'@'y' GRANT SELECT ON `d1`.`t` TO 'x'@'y' -show binlog events; +show binlog events from ; 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 193 drop database if exists d1 -master-bin.000001 193 Query 1 272 create database d1 -master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb -master-bin.000001 370 Query 1 436 BEGIN -master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1) -master-bin.000001 521 Xid 1 548 COMMIT /* XID */ -master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y +master-bin.000001 # Query # # drop database if exists d1 +master-bin.000001 # Query # # create database d1 +master-bin.000001 # Query # # use `d1`; create table t (s1 int) engine=innodb +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `d1`; insert into t values (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `d1`; grant select on t to x@y start transaction; insert into t values (2); revoke select on t from x@y; @@ -38,19 +37,18 @@ s1 show grants for x@y; Grants for x@y GRANT USAGE ON *.* TO 'x'@'y' -show binlog events; +show binlog events from ; 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 193 drop database if exists d1 -master-bin.000001 193 Query 1 272 create database d1 -master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb -master-bin.000001 370 Query 1 436 BEGIN -master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1) -master-bin.000001 521 Xid 1 548 COMMIT /* XID */ -master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y -master-bin.000001 633 Query 1 699 BEGIN -master-bin.000001 699 Query 1 784 use `d1`; insert into t values (2) -master-bin.000001 784 Xid 1 811 COMMIT /* XID */ -master-bin.000001 811 Query 1 899 use `d1`; revoke select on t from x@y +master-bin.000001 # Query # # drop database if exists d1 +master-bin.000001 # Query # # create database d1 +master-bin.000001 # Query # # use `d1`; create table t (s1 int) engine=innodb +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `d1`; insert into t values (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `d1`; grant select on t to x@y +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `d1`; insert into t values (2) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `d1`; revoke select on t from x@y drop user x@y; drop database d1; diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result index 6c8d35619e5..9b54498d809 100644 --- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result @@ -157,7 +157,7 @@ SET @my_max_relay_log_size= @@global.max_relay_log_size; SET global max_relay_log_size=0; include/stop_slave.inc DELETE FROM t2; -CHANGE MASTER TO MASTER_LOG_POS=440; +CHANGE MASTER TO MASTER_LOG_POS=441; BEGIN; SELECT * FROM t1 FOR UPDATE; a diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result index e2ec78e7adc..fd208055bea 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result @@ -435,7 +435,7 @@ Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1364 -Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 +Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 331 Skip_Counter 0 Exec_Master_Log_Pos # Relay_Log_Space # @@ -453,7 +453,7 @@ Master_SSL_Verify_Server_Cert No Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1364 -Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 +Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 331 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Create t10 on slave *** diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result index ed5b4eac27d..e50caa8861e 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result @@ -435,7 +435,7 @@ Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1364 -Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 +Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 331 Skip_Counter 0 Exec_Master_Log_Pos # Relay_Log_Space # @@ -453,7 +453,7 @@ Master_SSL_Verify_Server_Cert No Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1364 -Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 +Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 331 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Create t10 on slave *** diff --git a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result index 75180334c28..3055216cbd9 100644 --- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result +++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result @@ -33,7 +33,7 @@ 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 +Exec_Master_Log_Pos 247 Relay_Log_Space # Until_Condition None Until_Log_File @@ -120,7 +120,7 @@ FROM t2 ON DUPLICATE KEY UPDATE t1.field_3 = t2.field_c' Skip_Counter 0 -Exec_Master_Log_Pos 1278 +Exec_Master_Log_Pos 1279 Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result index d7a02bc84a5..141bbaeb95e 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result @@ -34,9 +34,45 @@ insert into t1 values(1,10); load data infile '../../std_data/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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1797 # # master-bin.000001 Yes Yes # 0 0 1797 # None 0 No # No 0 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 1798 +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 1798 +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 set sql_log_bin=0; delete from t1; set sql_log_bin=1; @@ -44,9 +80,45 @@ load data infile '../../std_data/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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1832 # # master-bin.000001 No No # 0 0 1832 # None 0 No # No 0 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 1833 +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 1833 +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 set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; @@ -55,9 +127,45 @@ set sql_log_bin=1; load data infile '../../std_data/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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error -# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No 0 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 +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 +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 0 +Last_SQL_Error reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result index 27fb8623e85..cb2accc86ca 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result @@ -13,7 +13,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 290 +Read_Master_Log_Pos 291 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -28,7 +28,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 290 +Exec_Master_Log_Pos 291 Relay_Log_Space # Until_Condition None Until_Log_File @@ -53,7 +53,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 465 +Read_Master_Log_Pos 466 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -68,7 +68,7 @@ Replicate_Wild_Ignore_Table Last_Errno 1593 Last_Error Fatal error: Not enough memory Skip_Counter 0 -Exec_Master_Log_Pos 325 +Exec_Master_Log_Pos 326 Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result index 2e707fb62c1..59726ea5661 100644 --- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result @@ -31,7 +31,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 594 +Read_Master_Log_Pos 595 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -46,7 +46,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 594 +Exec_Master_Log_Pos 595 Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result index 7920b9a981d..27960be8054 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result @@ -58,12 +58,12 @@ 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 Query 1 260 BEGIN -master-bin.000001 260 Table_map 1 301 table_id: # (test.t1) -master-bin.000001 301 Write_rows 1 340 table_id: # flags: STMT_END_F -master-bin.000001 340 Query 1 409 COMMIT +master-bin.000001 4 Format_desc 1 107 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 107 Query 1 193 use `test`; CREATE TABLE t1 (a INT) +master-bin.000001 193 Query 1 261 BEGIN +master-bin.000001 261 Table_map 1 302 table_id: # (test.t1) +master-bin.000001 302 Write_rows 1 341 table_id: # flags: STMT_END_F +master-bin.000001 341 Query 1 410 COMMIT DROP TABLE t1; ================ Test for BUG#17620 ================ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; diff --git a/mysql-test/suite/rpl/r/rpl_row_conflicts.result b/mysql-test/suite/rpl/r/rpl_row_conflicts.result index 0f15bfc7156..6f98c25c335 100644 --- a/mysql-test/suite/rpl/r/rpl_row_conflicts.result +++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result @@ -24,7 +24,7 @@ a 1 [on slave] ---- Wait until slave stops with an error ---- -Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 346 (expected "duplicate key" error) +Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 347 (expected "duplicate key" error) SELECT * FROM t1; a 1 @@ -50,7 +50,7 @@ SELECT * FROM t1; a [on slave] ---- Wait until slave stops with an error ---- -Last_SQL_Error = Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos 982 (expected "can't find record" error) +Last_SQL_Error = Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos 983 (expected "can't find record" error) SELECT * FROM t1; a ---- Resolve the conflict on the slave and restart SQL thread ---- 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 5bed9106009..acee168baf2 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -13,30 +13,30 @@ 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 106; +SHOW BINLOG EVENTS FROM 107; Log_name # -Pos 106 +Pos 107 Event_type Query Server_id # -End_log_pos 199 +End_log_pos 200 Info use `test`; CREATE TABLE t1 (a INT, b INT) Log_name # -Pos 199 +Pos 200 Event_type Query Server_id # -End_log_pos 305 +End_log_pos 306 Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge Log_name # -Pos 305 +Pos 306 Event_type Query Server_id # -End_log_pos 411 +End_log_pos 412 Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8 Log_name # -Pos 411 +Pos 412 Event_type Query Server_id # -End_log_pos 530 +End_log_pos 531 Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8 **** On Master **** SHOW CREATE TABLE t1; @@ -137,7 +137,7 @@ RESET MASTER; include/start_slave.inc CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; ERROR 23000: Duplicate entry '2' for key 'b' -SHOW BINLOG EVENTS FROM 106; +SHOW BINLOG EVENTS FROM 107; 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; @@ -147,13 +147,13 @@ a b 1 2 2 4 3 6 -SHOW BINLOG EVENTS FROM 106; +SHOW BINLOG EVENTS FROM 107; Log_name Pos Event_type Server_id End_log_pos Info -# 106 Query # 206 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) -# 206 Query # 274 BEGIN -# 274 Table_map # 316 table_id: # (test.t7) -# 316 Write_rows # 372 table_id: # flags: STMT_END_F -# 372 Query # 443 ROLLBACK +# 107 Query # 207 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) +# 207 Query # 275 BEGIN +# 275 Table_map # 317 table_id: # (test.t7) +# 317 Write_rows # 373 table_id: # flags: STMT_END_F +# 373 Query # 444 ROLLBACK SELECT * FROM t7 ORDER BY a,b; a b 1 2 @@ -171,12 +171,12 @@ 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 106; +SHOW BINLOG EVENTS FROM 107; Log_name Pos Event_type Server_id End_log_pos Info -# 106 Query # 174 BEGIN -# 174 Table_map # 216 table_id: # (test.t7) -# 216 Write_rows # 272 table_id: # flags: STMT_END_F -# 272 Query # 343 ROLLBACK +# 107 Query # 175 BEGIN +# 175 Table_map # 217 table_id: # (test.t7) +# 217 Write_rows # 273 table_id: # flags: STMT_END_F +# 273 Query # 344 ROLLBACK SELECT * FROM t7 ORDER BY a,b; a b 1 2 @@ -216,10 +216,10 @@ Create Table CREATE TABLE `t9` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW BINLOG EVENTS FROM 106; +SHOW BINLOG EVENTS FROM 107; Log_name Pos Event_type Server_id End_log_pos Info -# 106 Query # 192 use `test`; CREATE TABLE t8 LIKE t4 -# 192 Query # 331 use `test`; CREATE TABLE `t9` ( +# 107 Query # 193 use `test`; CREATE TABLE t8 LIKE t4 +# 193 Query # 332 use `test`; CREATE TABLE `t9` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) @@ -296,38 +296,38 @@ a 1 2 3 -SHOW BINLOG EVENTS FROM 106; +SHOW BINLOG EVENTS FROM 107; Log_name Pos Event_type Server_id End_log_pos Info -# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) -# 192 Query # 260 BEGIN -# 260 Table_map # 301 table_id: # (test.t1) -# 301 Write_rows # 345 table_id: # flags: STMT_END_F -# 345 Query # 414 COMMIT -# 414 Query # 482 BEGIN -# 482 Query # 607 use `test`; CREATE TABLE `t2` ( +# 107 Query # 193 use `test`; CREATE TABLE t1 (a INT) +# 193 Query # 261 BEGIN +# 261 Table_map # 302 table_id: # (test.t1) +# 302 Write_rows # 346 table_id: # flags: STMT_END_F +# 346 Query # 415 COMMIT +# 415 Query # 483 BEGIN +# 483 Query # 608 use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 607 Table_map # 648 table_id: # (test.t2) -# 648 Write_rows # 692 table_id: # flags: STMT_END_F -# 692 Xid # 719 COMMIT /* XID */ -# 719 Query # 787 BEGIN -# 787 Query # 912 use `test`; CREATE TABLE `t3` ( +# 608 Table_map # 649 table_id: # (test.t2) +# 649 Write_rows # 693 table_id: # flags: STMT_END_F +# 693 Xid # 720 COMMIT /* XID */ +# 720 Query # 788 BEGIN +# 788 Query # 913 use `test`; CREATE TABLE `t3` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 912 Table_map # 953 table_id: # (test.t3) -# 953 Write_rows # 997 table_id: # flags: STMT_END_F -# 997 Xid # 1024 COMMIT /* XID */ -# 1024 Query # 1092 BEGIN -# 1092 Query # 1217 use `test`; CREATE TABLE `t4` ( +# 913 Table_map # 954 table_id: # (test.t3) +# 954 Write_rows # 998 table_id: # flags: STMT_END_F +# 998 Xid # 1025 COMMIT /* XID */ +# 1025 Query # 1093 BEGIN +# 1093 Query # 1218 use `test`; CREATE TABLE `t4` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 1217 Table_map # 1258 table_id: # (test.t4) -# 1258 Write_rows # 1302 table_id: # flags: STMT_END_F -# 1302 Xid # 1329 COMMIT /* XID */ -# 1329 Query # 1397 BEGIN -# 1397 Table_map # 1438 table_id: # (test.t1) -# 1438 Write_rows # 1482 table_id: # flags: STMT_END_F -# 1482 Query # 1553 ROLLBACK +# 1218 Table_map # 1259 table_id: # (test.t4) +# 1259 Write_rows # 1303 table_id: # flags: STMT_END_F +# 1303 Xid # 1330 COMMIT /* XID */ +# 1330 Query # 1398 BEGIN +# 1398 Table_map # 1439 table_id: # (test.t1) +# 1439 Write_rows # 1483 table_id: # flags: STMT_END_F +# 1483 Query # 1554 ROLLBACK SHOW TABLES; Tables_in_test t1 @@ -390,20 +390,20 @@ a 4 6 9 -SHOW BINLOG EVENTS FROM 106; +SHOW BINLOG EVENTS FROM 107; Log_name Pos Event_type Server_id End_log_pos Info -# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) -# 192 Query # 260 BEGIN -# 260 Table_map # 301 table_id: # (test.t1) -# 301 Write_rows # 345 table_id: # flags: STMT_END_F -# 345 Query # 414 COMMIT -# 414 Query # 514 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB -# 514 Query # 582 BEGIN -# 582 Table_map # 623 table_id: # (test.t2) -# 623 Write_rows # 667 table_id: # flags: STMT_END_F -# 667 Table_map # 708 table_id: # (test.t2) -# 708 Write_rows # 747 table_id: # flags: STMT_END_F -# 747 Xid # 774 COMMIT /* XID */ +# 107 Query # 193 use `test`; CREATE TABLE t1 (a INT) +# 193 Query # 261 BEGIN +# 261 Table_map # 302 table_id: # (test.t1) +# 302 Write_rows # 346 table_id: # flags: STMT_END_F +# 346 Query # 415 COMMIT +# 415 Query # 515 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB +# 515 Query # 583 BEGIN +# 583 Table_map # 624 table_id: # (test.t2) +# 624 Write_rows # 668 table_id: # flags: STMT_END_F +# 668 Table_map # 709 table_id: # (test.t2) +# 709 Write_rows # 748 table_id: # flags: STMT_END_F +# 748 Xid # 775 COMMIT /* XID */ SELECT * FROM t2 ORDER BY a; a 1 @@ -429,14 +429,14 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back SELECT * FROM t2 ORDER BY a; a -SHOW BINLOG EVENTS FROM 106; +SHOW BINLOG EVENTS FROM 107; Log_name Pos Event_type Server_id End_log_pos Info -# 106 Query # 174 BEGIN -# 174 Table_map # 215 table_id: # (test.t2) -# 215 Write_rows # 259 table_id: # flags: STMT_END_F -# 259 Table_map # 300 table_id: # (test.t2) -# 300 Write_rows # 339 table_id: # flags: STMT_END_F -# 339 Query # 410 ROLLBACK +# 107 Query # 175 BEGIN +# 175 Table_map # 216 table_id: # (test.t2) +# 216 Write_rows # 260 table_id: # flags: STMT_END_F +# 260 Table_map # 301 table_id: # (test.t2) +# 301 Write_rows # 340 table_id: # flags: STMT_END_F +# 340 Query # 411 ROLLBACK SELECT * FROM t2 ORDER BY a; a DROP TABLE t1,t2; diff --git a/mysql-test/suite/rpl/r/rpl_row_drop.result b/mysql-test/suite/rpl/r/rpl_row_drop.result index 89654ebf165..f1a350b3df0 100644 --- a/mysql-test/suite/rpl/r/rpl_row_drop.result +++ b/mysql-test/suite/rpl/r/rpl_row_drop.result @@ -43,10 +43,10 @@ t2 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 */ +master-bin.000001 4 Format_desc 1 107 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 107 Query 1 193 use `test`; CREATE TABLE t1 (a int) +master-bin.000001 193 Query 1 279 use `test`; CREATE TABLE t2 (a int) +master-bin.000001 279 Query 1 383 use `test`; DROP TABLE `t1` /* generated by server */ SHOW TABLES; Tables_in_test t2 diff --git a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result index 129bad0fbcc..384573c0461 100644 --- a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result +++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result @@ -12,13 +12,13 @@ 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 897 ; +SHOW BINLOG EVENTS FROM 898 ; 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 897 ; +SHOW BINLOG EVENTS FROM 898 ; 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 diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result index 9593b009d1f..ca8fba3b6bd 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log.result +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -30,14 +30,14 @@ master-bin.000001 # Query 1 # 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 # Query 1 # COMMIT -show binlog events from 106 limit 1; +show binlog events from 107 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; +show binlog events from 107 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 # Query 1 # BEGIN -show binlog events from 106 limit 2,1; +show binlog events from 107 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; @@ -251,7 +251,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000002 -Read_Master_Log_Pos 516 +Read_Master_Log_Pos 517 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000002 @@ -266,7 +266,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 516 +Exec_Master_Log_Pos 517 Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result index 8526bad558b..9347f87ef8f 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -30,14 +30,14 @@ master-bin.000001 # Query 1 # 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 # Xid 1 # COMMIT /* XID */ -show binlog events from 106 limit 1; +show binlog events from 107 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; +show binlog events from 107 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 # Query 1 # BEGIN -show binlog events from 106 limit 2,1; +show binlog events from 107 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; @@ -251,7 +251,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000002 -Read_Master_Log_Pos 474 +Read_Master_Log_Pos 475 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000002 @@ -266,7 +266,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 474 +Exec_Master_Log_Pos 475 Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result index 6148de5d954..41076f9fee3 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_skip.result +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -50,7 +50,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 1115 +Read_Master_Log_Pos 1116 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -65,7 +65,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 762 +Exec_Master_Log_Pos 763 Relay_Log_Space # Until_Condition Master Until_Log_File master-bin.000001 @@ -114,7 +114,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 248 +Read_Master_Log_Pos 249 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -129,7 +129,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 248 +Exec_Master_Log_Pos 249 Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 90a362c352b..e2946bb487a 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -409,110 +409,110 @@ return 0; end| use mysqltest; set @a:= mysqltest2.f1(); -show binlog events in 'master-bin.000001' from 106; +show binlog events from ; 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`() +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 # Query # # 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`() +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values ( NAME_CONST('b',8)) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values (unix_timestamp()) +master-bin.000001 # Query # # use `mysqltest1`; delete from t1 +master-bin.000001 # Query # # 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`() +master-bin.000001 # Query # # use `mysqltest1`; alter procedure foo2 contains sql +master-bin.000001 # Query # # use `mysqltest1`; drop table t1 +master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int) +master-bin.000001 # Query # # use `mysqltest1`; create table t2 like t1 +master-bin.000001 # Query # # 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`() +master-bin.000001 # Query # # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query # # use `mysqltest1`; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query # # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query # # 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`() +master-bin.000001 # Query # # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values (15) +master-bin.000001 # Query # # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query # # use `mysqltest1`; alter procedure foo4 sql security invoker +master-bin.000001 # Query # # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values (5) +master-bin.000001 # Query # # use `mysqltest1`; delete from t2 +master-bin.000001 # Query # # use `mysqltest1`; alter table t2 add unique (a) +master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo4 +master-bin.000001 # Query # # 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(11) +master-bin.000001 # Query # # use `mysqltest1`; insert into t2 values(20),(20) +master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo4 +master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo +master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo2 +master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo3 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11) 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(11) +master-bin.000001 # Query # # use `mysqltest1`; delete t1,t2 from t1,t2 +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20) +master-bin.000001 # Query # # use `mysqltest1`; insert into t2 values(fn1(21)) +master-bin.000001 # Query # # use `mysqltest1`; drop function fn1 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`() RETURNS int(11) 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(11) +master-bin.000001 # Query # # use `mysqltest1`; delete from t1 +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(fn1()) +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` FUNCTION `fn2`() RETURNS int(11) NO SQL begin return unix_timestamp(); end -master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS int(11) +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS int(11) 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(11) +master-bin.000001 # Query # # use `mysqltest1`; delete from t2 +master-bin.000001 # Query # # use `mysqltest1`; alter table t2 add unique (a) +master-bin.000001 # Query # # use `mysqltest1`; drop function fn1 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11) 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`() +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(100) +master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20) +master-bin.000001 # Query # # use `mysqltest1`; delete from t1 +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10 +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values (1) +master-bin.000001 # Query # # use `mysqltest1`; delete from t1 +master-bin.000001 # Query # # use `mysqltest1`; drop trigger trg +master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values (1) +master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo`() 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`; drop function if exists f1 -master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) +master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo +master-bin.000001 # Query # # use `mysqltest1`; drop function fn1 +master-bin.000001 # Query # # drop database mysqltest1 +master-bin.000001 # Query # # drop user "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query # # use `test`; drop function if exists f1 +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) READS SQL DATA begin declare var integer; @@ -522,41 +522,41 @@ 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 PROCEDURE IF EXISTS p1 -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)) +master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 as a +master-bin.000001 # Query # # use `test`; create table t1 (a int) +master-bin.000001 # Query # # use `test`; insert into t1 (a) values (f1()) +master-bin.000001 # Query # # use `test`; drop view v1 +master-bin.000001 # Query # # use `test`; drop function f1 +master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS p1 +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1 +master-bin.000001 # Query # # use `test`; CREATE TABLE t1(col VARCHAR(10)) +master-bin.000001 # Query # # 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' COLLATE 'latin1_swedish_ci')) -master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1 -master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE IF EXISTS p1 -master-bin.000001 # Query 1 # use `test`; DROP FUNCTION IF EXISTS f1 -master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test' COLLATE 'latin1_swedish_ci')) +master-bin.000001 # Query # # use `test`; DROP PROCEDURE p1 +master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS p1 +master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS f1 +master-bin.000001 # Query # # 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(11) +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) 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`() +master-bin.000001 # Query # # use `test`; DROP PROCEDURE p1 +master-bin.000001 # Query # # use `test`; DROP FUNCTION f1 +master-bin.000001 # Query # # use `test`; drop table t1 +master-bin.000001 # Query # # drop database if exists mysqltest +master-bin.000001 # Query # # drop database if exists mysqltest2 +master-bin.000001 # Query # # create database mysqltest +master-bin.000001 # Query # # create database mysqltest2 +master-bin.000001 # Query # # use `mysqltest2`; create table t ( t integer ) +master-bin.000001 # Query # # 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(11) +master-bin.000001 # Query # # use `mysqltest2`; insert into t values ( 1 ) +master-bin.000001 # Query # # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) begin insert into t values (1); return 0; end -master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`() +master-bin.000001 # Query # # use `mysqltest`; SELECT `mysqltest2`.`f1`() set @@global.log_bin_trust_routine_creators= @old_log_bin_trust_routine_creators; Warnings: Warning 1287 The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 6.0. Please use '@@log_bin_trust_function_creators' instead diff --git a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result index 74031af1dde..1f6c86768b5 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result +++ b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result @@ -12,13 +12,13 @@ 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 ; +SHOW BINLOG EVENTS FROM 657 ; 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 ; +SHOW BINLOG EVENTS FROM 657 ; 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 diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result index bcefc6f9d3d..61eba2b4b3f 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_log.result +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -26,14 +26,14 @@ 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/words.dat' into table t1 ignore 1 lines ;file_id=1 -show binlog events from 106 limit 1; +show binlog events from 107 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; +show binlog events from 107 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; +show binlog events from 107 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; @@ -233,7 +233,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000002 -Read_Master_Log_Pos 392 +Read_Master_Log_Pos 393 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000002 @@ -248,7 +248,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 392 +Exec_Master_Log_Pos 393 Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/t/rpl_binlog_grant.test b/mysql-test/suite/rpl/t/rpl_binlog_grant.test index 31163927ce2..da14b45d5c3 100644 --- a/mysql-test/suite/rpl/t/rpl_binlog_grant.test +++ b/mysql-test/suite/rpl/t/rpl_binlog_grant.test @@ -25,9 +25,7 @@ grant select on t to x@y; # rollback; show grants for x@y; ---replace_result $VERSION VERSION ---replace_regex /\/\* xid=.* \*\//\/* XID *\// -show binlog events; +source include/show_binlog_events.inc; start transaction; insert into t values (2); revoke select on t from x@y; @@ -37,9 +35,7 @@ revoke select on t from x@y; commit; select * from t; show grants for x@y; ---replace_result $VERSION VERSION ---replace_regex /\/\* xid=.* \*\//\/* XID *\// -show binlog events; +source include/show_binlog_events.inc; drop user x@y; drop database d1; --sync_slave_with_master diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test index 319f9546a81..0d91d855a57 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -38,7 +38,7 @@ 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 106 +--query_vertical SHOW BINLOG EVENTS FROM 107 --echo **** On Master **** --query_vertical SHOW CREATE TABLE t1 --query_vertical SHOW CREATE TABLE t2 @@ -76,7 +76,7 @@ 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 106; +SHOW BINLOG EVENTS FROM 107; # Test that INSERT-SELECT works the same way as for SBR. CREATE TABLE t7 (a INT, b INT UNIQUE); @@ -86,7 +86,7 @@ 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 106; +SHOW BINLOG EVENTS FROM 107; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; @@ -100,7 +100,7 @@ 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 106; +SHOW BINLOG EVENTS FROM 107; SELECT * FROM t7 ORDER BY a,b; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; @@ -118,7 +118,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1; --query_vertical SHOW CREATE TABLE t9 --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 106; +SHOW BINLOG EVENTS FROM 107; sync_slave_with_master; --echo **** On Slave **** --query_vertical SHOW CREATE TABLE t8 @@ -170,7 +170,7 @@ 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 FROM 106; +SHOW BINLOG EVENTS FROM 107; sync_slave_with_master; SHOW TABLES; SELECT TABLE_NAME,ENGINE @@ -216,7 +216,7 @@ 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 FROM 106; +SHOW BINLOG EVENTS FROM 107; sync_slave_with_master; SELECT * FROM t2 ORDER BY a; @@ -239,7 +239,7 @@ 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 106; +SHOW BINLOG EVENTS FROM 107; sync_slave_with_master; SELECT * FROM t2 ORDER BY a; diff --git a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test index 667e1d9a1a8..d2996bbe525 100644 --- a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test +++ b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test @@ -1,7 +1,7 @@ # depends on the binlog output -- source include/have_binlog_format_row.inc -let $rename_event_pos= 897; +let $rename_event_pos= 898; # 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 diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test index 3328d582692..a7967f6643a 100644 --- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test +++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test @@ -164,13 +164,13 @@ remove_file $MYSQLTEST_VARDIR/tmp/master.sql; # this test for position option -# By setting this position to 416, we should only get the create of t3 +# By setting this position to 417, we should only get the create of t3 --disable_query_log select "--- Test 2 position test --" as ""; --enable_query_log let $MYSQLD_DATADIR= `select @@datadir;`; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 --stop-position=569 $MYSQLD_DATADIR/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=417 --stop-position=570 $MYSQLD_DATADIR/master-bin.000001 # These are tests for remote binlog. # They should return the same as previous test. @@ -181,7 +181,7 @@ select "--- Test 3 First Remote test --" as ""; # This is broken now --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=569 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=570 --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 @@ -272,7 +272,7 @@ let $MYSQLD_DATADIR= `select @@datadir;`; 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 --stop-position=569 - < $MYSQLD_DATADIR/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --position=417 --stop-position=569 - < $MYSQLD_DATADIR/master-bin.000001 # Bug#16217 (mysql client did not know how not switch its internal charset) --disable_query_log diff --git a/mysql-test/suite/rpl/t/rpl_sp.test b/mysql-test/suite/rpl/t/rpl_sp.test index 9be630e9ae8..2811db8ef1e 100644 --- a/mysql-test/suite/rpl/t/rpl_sp.test +++ b/mysql-test/suite/rpl/t/rpl_sp.test @@ -568,9 +568,7 @@ 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; +source include/show_binlog_events.inc; # Restore log_bin_trust_function_creators to its original value. diff --git a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test index a8a33d05e8b..f3993f80b90 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test +++ b/mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test @@ -1,7 +1,7 @@ # depends on the binlog output --source include/have_binlog_format_mixed_or_statement.inc -let $rename_event_pos= 656; +let $rename_event_pos= 657; -- source extra/rpl_tests/rpl_flsh_tbls.test # End of 4.1 tests diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result index 540c430e757..86752fbc4b8 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result @@ -34,14 +34,14 @@ 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 -show binlog events from 106 limit 1; +show binlog events from 107 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; +show binlog events from 107 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; +show binlog events from 107 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; @@ -267,7 +267,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000002 -Read_Master_Log_Pos 623 +Read_Master_Log_Pos 624 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000002 @@ -282,7 +282,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 623 +Exec_Master_Log_Pos 624 Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result index d6c57aed41b..6c9e20fd56a 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result @@ -29,16 +29,16 @@ a b 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 330 table_id: # (test.t1) -master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status) -master-bin.000001 392 Write_rows 1 451 table_id: # -master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F -master-bin.000001 498 Query 1 563 COMMIT -master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1 -master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1 +master-bin.000001 4 Format_desc 1 107 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 107 Query 1 224 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 224 Query 1 288 BEGIN +master-bin.000001 288 Table_map 1 331 table_id: # (test.t1) +master-bin.000001 331 Table_map 1 393 table_id: # (mysql.ndb_apply_status) +master-bin.000001 393 Write_rows 1 452 table_id: # +master-bin.000001 452 Write_rows 1 499 table_id: # flags: STMT_END_F +master-bin.000001 499 Query 1 564 COMMIT +master-bin.000001 564 Query 1 644 use `test`; TRUNCATE TABLE t1 +master-bin.000001 644 Query 1 720 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); @@ -65,27 +65,27 @@ a b 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 330 table_id: # (test.t1) -master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status) -master-bin.000001 392 Write_rows 1 451 table_id: # -master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F -master-bin.000001 498 Query 1 563 COMMIT -master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1 -master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1 -master-bin.000001 719 Query 1 836 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB -master-bin.000001 836 Query 1 900 BEGIN -master-bin.000001 900 Table_map 1 943 table_id: # (test.t1) -master-bin.000001 943 Table_map 1 1005 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1005 Write_rows 1 1064 table_id: # -master-bin.000001 1064 Write_rows 1 1111 table_id: # flags: STMT_END_F -master-bin.000001 1111 Query 1 1176 COMMIT -master-bin.000001 1176 Query 1 1240 BEGIN -master-bin.000001 1240 Table_map 1 1283 table_id: # (test.t1) -master-bin.000001 1283 Table_map 1 1345 table_id: # (mysql.ndb_apply_status) -master-bin.000001 1345 Write_rows 1 1404 table_id: # -master-bin.000001 1404 Delete_rows 1 1443 table_id: # flags: STMT_END_F -master-bin.000001 1443 Query 1 1508 COMMIT -master-bin.000001 1508 Query 1 1584 use `test`; DROP TABLE t1 +master-bin.000001 4 Format_desc 1 107 Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 107 Query 1 224 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 224 Query 1 288 BEGIN +master-bin.000001 288 Table_map 1 331 table_id: # (test.t1) +master-bin.000001 331 Table_map 1 393 table_id: # (mysql.ndb_apply_status) +master-bin.000001 393 Write_rows 1 452 table_id: # +master-bin.000001 452 Write_rows 1 499 table_id: # flags: STMT_END_F +master-bin.000001 499 Query 1 564 COMMIT +master-bin.000001 564 Query 1 644 use `test`; TRUNCATE TABLE t1 +master-bin.000001 644 Query 1 720 use `test`; DROP TABLE t1 +master-bin.000001 720 Query 1 837 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB +master-bin.000001 837 Query 1 901 BEGIN +master-bin.000001 901 Table_map 1 944 table_id: # (test.t1) +master-bin.000001 944 Table_map 1 1006 table_id: # (mysql.ndb_apply_status) +master-bin.000001 1006 Write_rows 1 1065 table_id: # +master-bin.000001 1065 Write_rows 1 1112 table_id: # flags: STMT_END_F +master-bin.000001 1112 Query 1 1177 COMMIT +master-bin.000001 1177 Query 1 1241 BEGIN +master-bin.000001 1241 Table_map 1 1284 table_id: # (test.t1) +master-bin.000001 1284 Table_map 1 1346 table_id: # (mysql.ndb_apply_status) +master-bin.000001 1346 Write_rows 1 1405 table_id: # +master-bin.000001 1405 Delete_rows 1 1444 table_id: # flags: STMT_END_F +master-bin.000001 1444 Query 1 1509 COMMIT +master-bin.000001 1509 Query 1 1585 use `test`; DROP TABLE t1 diff --git a/mysql-test/t/ctype_cp932_binlog_stm.test b/mysql-test/t/ctype_cp932_binlog_stm.test index 89df33a6df5..19f44695f28 100644 --- a/mysql-test/t/ctype_cp932_binlog_stm.test +++ b/mysql-test/t/ctype_cp932_binlog_stm.test @@ -22,14 +22,14 @@ CALL bug18293("Foo's a Bar", _cp932 0xED40ED41ED42, 47.93)| SELECT HEX(s1),HEX(s2),d FROM t4| DROP PROCEDURE bug18293| DROP TABLE t4| -SHOW BINLOG EVENTS FROM 370| +SHOW BINLOG EVENTS FROM 371| delimiter ;| --echo End of 5.0 tests # # #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump -# Note: 364 is a magic position (found experimentally, depends on +# Note: 365 is a magic position (found experimentally, depends on # the log's contents) that caused the server crash. --error 1220 diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 7767abe43d0..597c9671053 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -71,7 +71,7 @@ select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=239 $MYSQLD_DATADIR/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=240 $MYSQLD_DATADIR/master-bin.000002 # These are tests for remote binlog. # They should return the same as previous test. @@ -107,7 +107,7 @@ select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=239 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=240 --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 @@ -119,7 +119,7 @@ select "--- reading stdin --" as ""; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ ---exec $MYSQL_BINLOG --short-form --position=79 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 +--exec $MYSQL_BINLOG --short-form --position=80 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 drop table t1,t2; # diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test index d6be029ea56..6089b83e42d 100644 --- a/mysql-test/t/mysqlbinlog2.test +++ b/mysql-test/t/mysqlbinlog2.test @@ -50,15 +50,15 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=608 $MYSQLD_DATADIR/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=609 $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=608 $MYSQLD_DATADIR/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --stop-position=609 $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- start and stop positions ---" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=608 --stop-position 725 $MYSQLD_DATADIR/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=609 --stop-position 726 $MYSQLD_DATADIR/master-bin.000001 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log @@ -84,11 +84,11 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=608 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --start-position=609 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=134 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 +--exec $MYSQL_BINLOG --short-form --stop-position=135 $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log @@ -111,15 +111,15 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=608 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=609 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=608 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--exec $MYSQL_BINLOG --short-form --stop-position=609 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- start and stop positions ---" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=608 --stop-position 725 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--exec $MYSQL_BINLOG --short-form --start-position=609 --stop-position 726 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log @@ -142,11 +142,11 @@ select "--- offset --" as ""; --disable_query_log select "--- start-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --start-position=608 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 +--exec $MYSQL_BINLOG --short-form --start-position=609 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 --disable_query_log select "--- stop-position --" as ""; --enable_query_log ---exec $MYSQL_BINLOG --short-form --stop-position=134 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 +--exec $MYSQL_BINLOG --short-form --stop-position=135 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 --disable_query_log select "--- start-datetime --" as ""; --enable_query_log diff --git a/mysql-test/t/sp_trans_log.test b/mysql-test/t/sp_trans_log.test index 2f2b84a9bef..68467f71ee1 100644 --- a/mysql-test/t/sp_trans_log.test +++ b/mysql-test/t/sp_trans_log.test @@ -35,7 +35,8 @@ reset master| --error ER_DUP_ENTRY insert into t2 values (bug23333(),1)| --replace_column 2 # 5 # 6 # -show binlog events from 106 /* with fixes for #23333 will show there is the query */| +# the following must show there is (are) events after the query */ +source include/show_binlog_events.inc| select count(*),@a from t1 /* must be 1,1 */| delimiter ;| -- cgit v1.2.1 From a029813bf7eb15263d1e0ed2c1b8db2738549fa3 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Tue, 29 Sep 2009 14:18:41 +0300 Subject: WL#342 heartbeat Backporting the basic tests --- mysql-test/suite/rpl/r/rpl_heartbeat.result | 139 +++++++++++++++++++++++ mysql-test/suite/rpl/t/rpl_heartbeat.test | 166 ++++++++++++++++++++++++++++ 2 files changed, 305 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_heartbeat.result create mode 100644 mysql-test/suite/rpl/t/rpl_heartbeat.test (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat.result b/mysql-test/suite/rpl/r/rpl_heartbeat.result new file mode 100644 index 00000000000..5775351c33d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_heartbeat.result @@ -0,0 +1,139 @@ +reset master; +set @@global.slave_net_timeout= 10; +Warnings: +Warning 1624 The currect value for master_heartbeat_period exceeds the new value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout. +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; +show status like 'Slave_heartbeat_period';; +Variable_name Slave_heartbeat_period +Value 5.000 +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4294968; +ERROR HY000: The requested value for the heartbeat period is negative or exceeds the maximum 4294967 seconds +show status like 'Slave_heartbeat_period';; +Variable_name Slave_heartbeat_period +Value 5.000 +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 0.0009999; +Warnings: +Warning 1624 The requested value for the heartbeat period is less than 1 msec. The period is reset to zero which means no heartbeats will be sending +show status like 'Slave_heartbeat_period';; +Variable_name Slave_heartbeat_period +Value 0.000 +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4294967; +Warnings: +Warning 1624 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout. +show status like 'Slave_heartbeat_period';; +Variable_name Slave_heartbeat_period +Value 4294967.000 +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 0.001; +show status like 'Slave_heartbeat_period';; +Variable_name Slave_heartbeat_period +Value 0.001 +reset slave; +set @@global.slave_net_timeout= 5; +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 5.001; +Warnings: +Warning 1624 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout. +show status like 'Slave_heartbeat_period';; +Variable_name Slave_heartbeat_period +Value 5.001 +reset slave; +set @@global.slave_net_timeout= 5; +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4; +show status like 'Slave_heartbeat_period';; +Variable_name Slave_heartbeat_period +Value 4.000 +set @@global.slave_net_timeout= 3 /* must be a warning */; +Warnings: +Warning 1624 The currect value for master_heartbeat_period exceeds the new value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout. +reset slave; +drop table if exists t1; +set @@global.slave_net_timeout= 10; +change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 0.5; +show status like 'Slave_heartbeat_period';; +Variable_name Slave_heartbeat_period +Value 0.500 +start slave; +create table t1 (f1 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 280 +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 280 +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 +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 280 +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 280 +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 +show status like 'Slave_heartbeat_period';; +Variable_name Slave_heartbeat_period +Value 0.500 +A heartbeat has been received by the slave +drop table t1; +End of tests diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat.test b/mysql-test/suite/rpl/t/rpl_heartbeat.test new file mode 100644 index 00000000000..4304888d6a5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_heartbeat.test @@ -0,0 +1,166 @@ +# Testing master to slave heartbeat protocol +# +# Including: +# - user interface, grammar, checking the range and warnings about +# unreasonable values for the heartbeat period; +# - no rotation of relay log if heartbeat is less that slave_net_timeout +# - SHOW STATUS like 'Slave_received_heartbeats' action +# - SHOW STATUS like 'Slave_heartbeat_period' report + +-- source include/have_log_bin.inc + +connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); +connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK); + +connection master; +reset master; + +connection slave; +set @@global.slave_net_timeout= 10; + +### +### Checking the range +### + +# +# default period slave_net_timeout/2 +# +--replace_result $MASTER_MYPORT MASTER_PORT +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root'; +--query_vertical show status like 'Slave_heartbeat_period'; + +# +# the max for the period is ULONG_MAX/1000; an attempt to exceed it is denied +# +--replace_result $MASTER_MYPORT MASTER_PORT +--error ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_heartbeat_period= 4294968; +--query_vertical show status like 'Slave_heartbeat_period'; + +# +# the min value for the period is 1 millisecond an attempt to assign a +# lesser will be warned with treating the value as zero +# +connection slave; +--replace_result $MASTER_MYPORT MASTER_PORT +### 5.1 mtr does not have --warning ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_heartbeat_period= 0.0009999; +--query_vertical show status like 'Slave_heartbeat_period'; + +# +# the actual max and min must be accepted +# +--replace_result $MASTER_MYPORT MASTER_PORT +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_heartbeat_period= 4294967; +--query_vertical show status like 'Slave_heartbeat_period'; + +--replace_result $MASTER_MYPORT MASTER_PORT +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_heartbeat_period= 0.001; +--query_vertical show status like 'Slave_heartbeat_period'; + +reset slave; + +# +# A warning if period greater than slave_net_timeout +# +set @@global.slave_net_timeout= 5; +--replace_result $MASTER_MYPORT MASTER_PORT +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_heartbeat_period= 5.001; +--query_vertical show status like 'Slave_heartbeat_period'; + +reset slave; + +# +# A warning if slave_net_timeout is set to less than the current HB period +# +set @@global.slave_net_timeout= 5; +--replace_result $MASTER_MYPORT MASTER_PORT +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_heartbeat_period= 4; +--query_vertical show status like 'Slave_heartbeat_period'; +set @@global.slave_net_timeout= 3 /* must be a warning */; + +reset slave; + + +### +### checking no rotation +### + +connection master; +--disable_warnings +drop table if exists t1; +--enable_warnings +# +# Even though master_heartbeat_period= 0.5 is 20 times less than +# @@global.slave_net_timeout= 10 in some circumstances master will +# not be able to send any heartbeat during the slave's net timeout +# and slave's relay log will rotate. +# The probability for such a scenario is pretty small so the following +# part is almost deterministic. +# + +connection slave; +set @@global.slave_net_timeout= 10; +--replace_result $MASTER_MYPORT MASTER_PORT +# no error this time but rather a warning +eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master_user='root', master_heartbeat_period= 0.5; +--query_vertical show status like 'Slave_heartbeat_period'; + +start slave; + +connection master; +create table t1 (f1 int); + +#connection slave; +sync_slave_with_master; +source include/show_slave_status.inc; + +# there is an explicit sleep lasting longer than slave_net_timeout +# to ensure that nothing will come to slave from master for that period. +# That would cause reconnecting and relaylog rotation w/o the fix i.e +# without a heartbeat received. + +real_sleep 15; + +# check (compare with the previous show's results) that no rotation happened +source include/show_slave_status.inc; + +### +### SHOW STATUS like 'Slave_heartbeat_period' and 'Slave_received_heartbeats' +### + +--query_vertical show status like 'Slave_heartbeat_period'; + +# +# proof that there has been received at least one heartbeat; +# The exact number of received heartbeat is an indeterministic value +# and therefore it's not recorded into results. +# + +let $slave_wait_param_counter= 300; +let $slave_value= query_get_value("SHOW STATUS like 'Slave_received_heartbeats'", Value, 1); +# Checking the fact that at least one heartbeat is received +while (`select $slave_value = 0`) +{ + dec $slave_wait_param_counter; + if (!$slave_wait_param_counter) + { + --echo ERROR: failed while waiting for slave parameter $slave_param: $slave_param_value + query_vertical show slave status; + SHOW STATUS like 'Slave_received_heartbeats'; + exit; + } + sleep 0.1; + let $slave_value= query_get_value("SHOW STATUS like 'Slave_received_heartbeats'", Value, 1); +} +--echo A heartbeat has been received by the slave +# cleanup + +connection master; +drop table t1; + +#connection slave; +sync_slave_with_master; + + +--echo End of tests -- cgit v1.2.1 From bbc830f7fce965a3aa6055a4bf7bea5712eaebf5 Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Tue, 29 Sep 2009 15:04:21 +0100 Subject: BUG#38173 Field doesn't have a default value with row-based replication NOTE: Backporting the patch to next-mr. The reason of the bug was incompatibile with the master side behaviour. INSERT query on the master is allowed to insert into a table without specifying values of DEFAULT-less fields if sql_mode is not strict. Fixed with checking sql_mode by the sql thread to decide how to react. Non-strict sql_mode should allow Write_rows event to complete. todo: warnings can be shown via show slave status, still this is a separate rather general issue how to show warnings for the slave threads. --- mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test | 35 +++++++++++---- mysql-test/extra/rpl_tests/rpl_row_tabledefs.test | 15 +++---- mysql-test/suite/rpl/r/rpl_extraCol_innodb.result | 52 +++++----------------- mysql-test/suite/rpl/r/rpl_extraCol_myisam.result | 52 +++++----------------- .../suite/rpl/r/rpl_row_tabledefs_2myisam.result | 44 ++---------------- .../suite/rpl/r/rpl_row_tabledefs_3innodb.result | 44 ++---------------- 6 files changed, 58 insertions(+), 184 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test index a7b02065144..1eaefa661f9 100644 --- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test +++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test @@ -407,13 +407,18 @@ sync_slave_with_master; ########################################### # Bug#22234, Bug#23907 Extra Slave Col is not # erroring on extra col with no default values. -######################################################## +############################################################### +# Error reaction is up to sql_mode of the slave sql (bug#38173) #--echo *** Create t9 on slave *** STOP SLAVE; RESET SLAVE; eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), d TIMESTAMP, - e INT NOT NULL) ENGINE=$engine_type; + e INT NOT NULL, + f text not null, + g text, + h blob not null, + i blob) ENGINE=$engine_type; --echo *** Create t9 on Master *** connection master; @@ -431,13 +436,25 @@ set @b1 = 'b1b1b1b1'; set @b1 = concat(@b1,@b1); INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -connection slave; ---source include/wait_for_slave_sql_to_stop.inc ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # ---query_vertical SHOW SLAVE STATUS -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; +# the test would stop slave if @@sql_mode for the sql thread +# was set to strict. Otherwise, as with this tests setup, +# the implicit defaults will be inserted into fields even though +# they are declared without DEFAULT clause. + +sync_slave_with_master; +select * from t9; + +# todo: fix Bug #43992 slave sql thread can't tune own sql_mode ... +# and add/restore waiting for stop test + +#--source include/wait_for_slave_sql_to_stop.inc +#--replace_result $MASTER_MYPORT MASTER_PORT +#--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # +#--query_vertical SHOW SLAVE STATUS +#SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +#START SLAVE; + + #--echo *** Drop t9 *** #connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test index 3b03caee35c..083088f12ff 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test +++ b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test @@ -111,21 +111,18 @@ SELECT a,b,x FROM t1_int ORDER BY a; SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; SELECT a,b,x FROM t1_char ORDER BY a; -# Each of these inserts should generate an error and stop the slave - connection master; INSERT INTO t9 VALUES (2); sync_slave_with_master; # Now slave is guaranteed to be running connection master; INSERT INTO t1_nodef VALUES (1,2); -connection slave; ---source include/wait_for_slave_sql_to_stop.inc ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 4 # 7 # 8 # 9 # 20 22 # 23 # 33 # 35 36 38 ---query_vertical SHOW SLAVE STATUS -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; + +# Last insert on wider slave table succeeds while slave sql sql_mode permits. +# The previous version of the above test expected slave sql to stop. +# bug#38173 relaxed conditions to stop only with the strict mode. +sync_slave_with_master; +select count(*) from t1_nodef; # # Replicating to tables with fewer columns at the end works as of WL#3228 diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result index e2ec78e7adc..63154383e8c 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result @@ -404,7 +404,11 @@ STOP SLAVE; RESET SLAVE; CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), d TIMESTAMP, -e INT NOT NULL) ENGINE='InnoDB'; +e INT NOT NULL, +f text not null, +g text, +h blob not null, +i blob) ENGINE='InnoDB'; *** Create t9 on Master *** CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) ) ENGINE='InnoDB'; @@ -415,47 +419,11 @@ START SLAVE; set @b1 = 'b1b1b1b1'; set @b1 = concat(@b1,@b1); INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -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 1364 -Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 -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 1364 -Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; +select * from t9; +a b c d e f g h i +1 b1b1b1b1b1b1b1b1 Kyle 0000-00-00 00:00:00 0 NULL NULL +2 b1b1b1b1b1b1b1b1 JOE 0000-00-00 00:00:00 0 NULL NULL +3 b1b1b1b1b1b1b1b1 QA 0000-00-00 00:00:00 0 NULL NULL *** Create t10 on slave *** STOP SLAVE; RESET SLAVE; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result index ed5b4eac27d..d80ac5eea2c 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result @@ -404,7 +404,11 @@ STOP SLAVE; RESET SLAVE; CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), d TIMESTAMP, -e INT NOT NULL) ENGINE='MyISAM'; +e INT NOT NULL, +f text not null, +g text, +h blob not null, +i blob) ENGINE='MyISAM'; *** Create t9 on Master *** CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) ) ENGINE='MyISAM'; @@ -415,47 +419,11 @@ START SLAVE; set @b1 = 'b1b1b1b1'; set @b1 = concat(@b1,@b1); INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -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 1364 -Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 -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 1364 -Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; +select * from t9; +a b c d e f g h i +1 b1b1b1b1b1b1b1b1 Kyle 0000-00-00 00:00:00 0 NULL NULL +2 b1b1b1b1b1b1b1b1 JOE 0000-00-00 00:00:00 0 NULL NULL +3 b1b1b1b1b1b1b1b1 QA 0000-00-00 00:00:00 0 NULL NULL *** Create t10 on slave *** STOP SLAVE; RESET SLAVE; 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 a6a2181cd2a..bb9865ab2d1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result @@ -105,47 +105,9 @@ a b x 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 # -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 -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 1364 -Last_SQL_Error -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; +select count(*) from t1_nodef; +count(*) +1 INSERT INTO t9 VALUES (2); **** On Master **** INSERT INTO t2 VALUES (2,4); 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 02e8c074354..f606a28c2d9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result @@ -105,47 +105,9 @@ a b x 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 # -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 -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 1364 -Last_SQL_Error -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; +select count(*) from t1_nodef; +count(*) +1 INSERT INTO t9 VALUES (2); **** On Master **** INSERT INTO t2 VALUES (2,4); -- cgit v1.2.1 From 7cf996223d12dc4049ebccb9ccc80df7ece9e091 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Tue, 29 Sep 2009 15:09:01 +0100 Subject: BUG#23300: Slow query log on slave does not log slow replicated statements NOTE: this is the backport to next-mr. When using replication, the slave will not log any slow query logs queries replicated from the master, even if the option "--log-slow-slave-statements" is set and these take more than "log_query_time" to execute. In order to log slow queries in replicated thread one needs to set the --log-slow-slave-statements, so that the SQL thread is initialized with the correct switch. Although setting this flag correctly configures the slave thread option to log slow queries, there is an issue with the condition that is used to check whether to log the slow query or not. When replaying binlog events the statement contains the SET TIMESTAMP clause which will force the slow logging condition check to fail. Consequently, the slow query logging will not take place. This patch addresses this issue by removing the second condition from the log_slow_statements as it prevents slow queries to be binlogged and seems to be deprecated. --- mysql-test/suite/rpl/r/rpl_slow_query_log.result | 47 ++++++ .../suite/rpl/t/rpl_slow_query_log-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_slow_query_log.test | 187 +++++++++++++++++++++ 3 files changed, 235 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_slow_query_log.result create mode 100644 mysql-test/suite/rpl/t/rpl_slow_query_log-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_slow_query_log.test (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_slow_query_log.result b/mysql-test/suite/rpl/r/rpl_slow_query_log.result new file mode 100644 index 00000000000..ced357b21e9 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_slow_query_log.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; +include/stop_slave.inc +SET @old_log_output= @@log_output; +SET GLOBAL log_output= 'TABLE'; +SET @old_long_query_time= @@long_query_time; +SET GLOBAL long_query_time= 2; +TRUNCATE mysql.slow_log; +include/start_slave.inc +CREATE TABLE t1 (a int, b int); +INSERT INTO t1 values(1, 1); +INSERT INTO t1 values(1, sleep(3)); +TRUNCATE mysql.slow_log; +SELECT 1, sleep(3); +1 sleep(3) +1 0 +SELECT 1; +1 +1 +TRUNCATE mysql.slow_log; +SET TIMESTAMP= 1; +SELECT 2, sleep(3); +2 sleep(3) +2 0 +SELECT 2; +2 +2 +TRUNCATE mysql.slow_log; +SET @old_slow_query_log= @@slow_query_log; +SET GLOBAL slow_query_log= 'OFF'; +SELECT 3, sleep(3); +3 sleep(3) +3 0 +SELECT 3; +3 +3 +TRUNCATE mysql.slow_log; +SET GLOBAL slow_query_log= @old_slow_query_log; +DROP TABLE t1; +include/stop_slave.inc +SET GLOBAL long_query_time= @old_long_query_time; +SET GLOBAL log_output= @old_log_output; +include/start_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log-slave.opt b/mysql-test/suite/rpl/t/rpl_slow_query_log-slave.opt new file mode 100644 index 00000000000..a27d3a0f5a7 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_slow_query_log-slave.opt @@ -0,0 +1 @@ +--force-restart --log-slow-slave-statements --log-slow-queries diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log.test b/mysql-test/suite/rpl/t/rpl_slow_query_log.test new file mode 100644 index 00000000000..1d5fcf950f2 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test @@ -0,0 +1,187 @@ +# +# BUG#23300: Slow query log on slave does not log slow replicated statements +# +# Description: +# The slave should log slow queries replicated from master when +# --log-slow-slave-statements is used. +# +# Test is implemented as follows: +# i) stop slave +# ii) On slave, set long_query_time to a small value. +# ii) start slave so that long_query_time variable is picked by sql thread +# iii) On master, do one short time query and one long time query, on slave +# and check that slow query is logged to slow query log but fast query +# is not. +# iv) On slave, check that slow queries go into the slow log and fast dont, +# when issued through a regular client connection +# v) On slave, check that slow queries go into the slow log and fast dont +# when we use SET TIMESTAMP= 1 on a regular client connection. +# vi) check that when setting slow_query_log= OFF in a connection 'extra2' +# prevents logging slow queries in a connection 'extra' +# +# OBS: +# This test only runs for statement and mixed binlogging firmat because on +# row format slow queries do not get slow query logged. + +source include/master-slave.inc; +source include/have_binlog_format_mixed_or_statement.inc; + + +# Prepare slave for different long_query_time we need to stop the slave +# and restart it as long_query_time variable is dynamic and, after +# setting it, it only takes effect on new connections. +# +# Reference: +# http://dev.mysql.com/doc/refman/6.0/en/set-option.html +connection slave; + +source include/stop_slave.inc; + +SET @old_log_output= @@log_output; +SET GLOBAL log_output= 'TABLE'; +SET @old_long_query_time= @@long_query_time; +SET GLOBAL long_query_time= 2; +TRUNCATE mysql.slow_log; + +source include/start_slave.inc; + +connection master; +CREATE TABLE t1 (a int, b int); + +# test: +# check that slave logs the slow query to the slow log, but not the fast one. + +let $slow_query= INSERT INTO t1 values(1, sleep(3)); +let $fast_query= INSERT INTO t1 values(1, 1); + +eval $fast_query; +eval $slow_query; +sync_slave_with_master; + +let $found_fast_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$fast_query'`; +let $found_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$slow_query'`; + +if ($found_fast_query) +{ + SELECT * FROM mysql.slow_log; + die "Assertion failed! Fast query FOUND in slow query log. Bailing out!"; +} + +if (!$found_slow_query) +{ + SELECT * FROM mysql.slow_log; + die "Assertion failed! Slow query NOT FOUND in slow query log. Bailing out!"; +} +TRUNCATE mysql.slow_log; + +# regular checks for slow query log (using a new connection - 'extra' - to slave) + +# test: +# when using direct connections to the slave, check that slow query is logged +# but not the fast one. + +connect(extra,127.0.0.1,root,,test,$SLAVE_MYPORT); +connection extra; + +let $fast_query= SELECT 1; +let $slow_query= SELECT 1, sleep(3); + +eval $slow_query; +eval $fast_query; + +let $found_fast_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$fast_query'`; +let $found_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$slow_query'`; + +if ($found_fast_query) +{ + SELECT * FROM mysql.slow_log; + die "Assertion failed! Fast query FOUND in slow query log. Bailing out!"; +} + +if (!$found_slow_query) +{ + SELECT * FROM mysql.slow_log; + die "Assertion failed! Slow query NOT FOUND in slow query log. Bailing out!"; +} +TRUNCATE mysql.slow_log; + +# test: +# when using direct connections to the slave, check that when setting timestamp to 1 the +# slow query is logged but the fast one is not. + +let $fast_query= SELECT 2; +let $slow_query= SELECT 2, sleep(3); + +SET TIMESTAMP= 1; +eval $slow_query; +eval $fast_query; + +let $found_fast_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$fast_query'`; +let $found_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$slow_query'`; + +if ($found_fast_query) +{ + SELECT * FROM mysql.slow_log; + die "Assertion failed! Fast query FOUND in slow query log. Bailing out!"; +} + +if (!$found_slow_query) +{ + SELECT * FROM mysql.slow_log; + die "Assertion failed! Slow query NOT FOUND in slow query log. Bailing out!"; +} +TRUNCATE mysql.slow_log; + +# test: +# check that when setting the slow_query_log= OFF on connection 'extra2' +# prevents connection 'extra' from logging to slow query log. + +let $fast_query= SELECT 3; +let $slow_query= SELECT 3, sleep(3); + +connect(extra2,127.0.0.1,root,,test,$SLAVE_MYPORT); +connection extra2; + +SET @old_slow_query_log= @@slow_query_log; +SET GLOBAL slow_query_log= 'OFF'; + +connection extra; + +eval $slow_query; +eval $fast_query; + +let $found_fast_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$fast_query'`; +let $found_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$slow_query'`; + +if ($found_fast_query) +{ + SELECT * FROM mysql.slow_log; + die "Assertion failed! Fast query FOUND in slow query log when slow_query_log= OFF. Bailing out!"; +} + +if ($found_slow_query) +{ + SELECT * FROM mysql.slow_log; + die "Assertion failed! Slow query FOUND in slow query log when slow_query_log= OFF. Bailing out!"; +} +TRUNCATE mysql.slow_log; + +# clean up: drop tables, reset the variables back to the previous value, +# disconnect extra connections +connection extra2; + +SET GLOBAL slow_query_log= @old_slow_query_log; + +connection master; +DROP TABLE t1; +sync_slave_with_master; + +source include/stop_slave.inc; + +SET GLOBAL long_query_time= @old_long_query_time; +SET GLOBAL log_output= @old_log_output; + +source include/start_slave.inc; + +disconnect extra; +disconnect extra2; -- cgit v1.2.1 From 19ac26274b390b722fffac18f2eb67bbe984f2a8 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Tue, 29 Sep 2009 15:09:46 +0100 Subject: BUG#28796: CHANGE MASTER TO MASTER_HOST="" leads to invalid master.info NOTE: this is the backport to next-mr. This patch addresses the bug reported by checking wether host argument is an empty string or not. If empty, an error is reported to the client, otherwise continue normally. This commit is based on the originally proposed patch and adds a test case as requested during review as well as refines comments, and makes test case result file less verbose (compared to previous patch). --- .../suite/rpl/r/rpl_empty_master_host.result | 16 +++++++ mysql-test/suite/rpl/t/rpl_empty_master_host.test | 51 ++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_empty_master_host.result create mode 100644 mysql-test/suite/rpl/t/rpl_empty_master_host.test (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_empty_master_host.result b/mysql-test/suite/rpl/r/rpl_empty_master_host.result new file mode 100644 index 00000000000..46ef32d415b --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_empty_master_host.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; +Master_Host = '127.0.0.1' (expected '127.0.0.1') +CHANGE MASTER TO MASTER_HOST=""; +ERROR HY000: Incorrect arguments to MASTER_HOST +Master_Host = '127.0.0.1' (expected '127.0.0.1') +CHANGE MASTER TO MASTER_HOST="foo"; +Master_Host = 'foo' (expected 'foo') +CHANGE MASTER TO MASTER_HOST="127.0.0.1"; +Master_Host = '127.0.0.1' (expected '127.0.0.1') +START SLAVE; diff --git a/mysql-test/suite/rpl/t/rpl_empty_master_host.test b/mysql-test/suite/rpl/t/rpl_empty_master_host.test new file mode 100644 index 00000000000..7d245b1d5d5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_empty_master_host.test @@ -0,0 +1,51 @@ +# +# BUG +# --- +# BUG#28796: CHANGE MASTER TO MASTER_HOST="" leads to invalid master.info +# +# Description +# ----------- +# +# This test aims at: +# i) verifying that an error is thrown when setting MASTER_HOST='' +# ii) no error is thrown when setting non empty MASTER_HOST +# iii) replication works after setting a correct host name/ip +# +# Implementation is performed by feeding different values (according +# to i), ii) and iii) ) to CHANGE MASTER TO MASTER_HOST= x and checking +# along the way if error/no error is thrown and/or if replication starts +# working when expected. + +--source include/master-slave.inc + +connection slave; +STOP SLAVE; +--source include/wait_for_slave_to_stop.inc + +let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); +--echo Master_Host = '$master_host' (expected '127.0.0.1') + +# attempt to change to an empty master host should +# result in error ER_WRONG_ARGUMENTS: "Incorrect arguments to ..." +error ER_WRONG_ARGUMENTS; +CHANGE MASTER TO MASTER_HOST=""; + +# show slave status still holds previous information +let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); +--echo Master_Host = '$master_host' (expected '127.0.0.1') + +# changing master to other than empty master host succeeds +CHANGE MASTER TO MASTER_HOST="foo"; + +# show slave status should hold "foo" as master host +let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); +--echo Master_Host = '$master_host' (expected 'foo') + +# changing back to localhost +CHANGE MASTER TO MASTER_HOST="127.0.0.1"; +let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1); +--echo Master_Host = '$master_host' (expected '127.0.0.1') + +# start slave must succeed. +START SLAVE; +--source include/wait_for_slave_to_start.inc -- cgit v1.2.1 From ca151daf85f1e5e8af957157855e9c6de20555e3 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Tue, 29 Sep 2009 15:10:37 +0100 Subject: Bug #30703 SHOW STATUS LIKE 'Slave_running' is not compatible with `SHOW SLAVE STATUS' NOTE: this is the backport to next-mr. SHOW SHOW STATUS LIKE 'Slave_running' command believes that if active_mi->slave_running != 0, then io thread is running normally. But it isn't so in fact. When some errors happen to make io thread try to reconnect master, then it will become transitional status (MYSQL_SLAVE_RUN_NOT_CONNECT == 1), which also doesn't equal 0. Yet, "SHOW SLAVE STATUS" believes that only if active_mi->slave_running == MYSQL_SLAVE_RUN_CONNECT, then io thread is running. So "SHOW SLAVE STATUS" can get the correct result. Fixed to make SHOW SHOW STATUS LIKE 'Slave_running' command have the same check condition with "SHOW SLAVE STATUS". It only believe that the io thread is running when active_mi->slave_running == MYSQL_SLAVE_RUN_CONNECT. --- mysql-test/include/test_fieldsize.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/include/test_fieldsize.inc b/mysql-test/include/test_fieldsize.inc index cbe63e26318..606bc63779d 100644 --- a/mysql-test/include/test_fieldsize.inc +++ b/mysql-test/include/test_fieldsize.inc @@ -22,7 +22,7 @@ eval $test_insert; connection slave; START SLAVE; -wait_for_slave_to_stop; +--source include/wait_for_slave_sql_to_stop.inc --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # --query_vertical SHOW SLAVE STATUS -- cgit v1.2.1 From bdacc5622ece6bc5a32e66e4d88b2ecb6fd60e72 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Tue, 29 Sep 2009 15:12:07 +0100 Subject: BUG#40611: MySQL cannot make a binary log after sequential number beyond unsigned long. BUG#44779: binlog.binlog_max_extension may be causing failure on next test in PB NOTE1: this is the backport to next-mr. NOTE2: already includes patch for BUG#44779. Binlog file extensions would turn into negative numbers once the variable used to hold the value reached maximum for signed long. Consequently, incrementing value to the next (negative) number would lead to .000000 extension, causing the server to fail. This patch addresses this issue by not allowing negative extensions and by returning an error on find_uniq_filename, when the limit is reached. Additionally, warnings are printed to the error log when the limit is approaching. FLUSH LOGS will also report warnings to the user, if the extension number has reached the limit. The limit has been set to 0x7FFFFFFF as the maximum. --- .../suite/binlog/r/binlog_max_extension.result | 8 ++ .../suite/binlog/t/binlog_max_extension.test | 92 ++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 mysql-test/suite/binlog/r/binlog_max_extension.result create mode 100644 mysql-test/suite/binlog/t/binlog_max_extension.test (limited to 'mysql-test') diff --git a/mysql-test/suite/binlog/r/binlog_max_extension.result b/mysql-test/suite/binlog/r/binlog_max_extension.result new file mode 100644 index 00000000000..af341db4536 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_max_extension.result @@ -0,0 +1,8 @@ +call mtr.add_suppression("Next log extension: 2147483647. Remaining log filename extensions: 0."); +call mtr.add_suppression("Log filename extension number exhausted:"); +call mtr.add_suppression("Can't generate a unique log-filename"); +RESET MASTER; +FLUSH LOGS; +Warnings: +Warning 1098 Can't generate a unique log-filename master-bin.(1-999) + diff --git a/mysql-test/suite/binlog/t/binlog_max_extension.test b/mysql-test/suite/binlog/t/binlog_max_extension.test new file mode 100644 index 00000000000..9f52d195e21 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_max_extension.test @@ -0,0 +1,92 @@ +# BUG#40611: MySQL cannot make a binary log after sequential number beyond +# unsigned long. +# +# Problem statement +# ================= +# +# Extension for log file names might be created with negative +# numbers (when counter used would wrap around), causing server +# failure when incrementing -00001 (reaching number 000000 +# extension). +# +# Test +# ==== +# This tests aims at testing the a patch that removes negatives +# numbers from log name extensions and checks that the server +# reports gracefully that the limit has been reached. +# +# It instruments index file to point to a log file close to +# the new maximum and calls flush logs to get warning. +# + +call mtr.add_suppression("Next log extension: 2147483647. Remaining log filename extensions: 0."); +call mtr.add_suppression("Log filename extension number exhausted:"); +call mtr.add_suppression("Can't generate a unique log-filename"); + + +-- source include/have_log_bin.inc +RESET MASTER; + +-- let $MYSQLD_DATADIR= `select @@datadir` + +############################################### +# check hitting maximum file name extension: +############################################### + +########## +# Prepare +########## + +# 1. Stop master server +-- write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +wait +EOF +-- shutdown_server 10 +-- source include/wait_until_disconnected.inc + +# 2. Prepare log and index file +-- copy_file $MYSQLD_DATADIR/master-bin.index $MYSQLD_DATADIR/master-bin.index.orig +-- copy_file $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.2147483646 +-- append_file $MYSQLD_DATADIR/master-bin.index +master-bin.2147483646 +EOF + +# 3. Restart the server +-- append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +restart +EOF +-- enable_reconnect +-- source include/wait_until_connected_again.inc + +########### +# Assertion +########### + +# assertion: should throw warning +FLUSH LOGS; + +############## +# Clean up +############## + +# 1. Stop the server +-- write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +wait +EOF +-- shutdown_server 10 +-- source include/wait_until_disconnected.inc + +# 2. Undo changes to index and log files +-- remove_file $MYSQLD_DATADIR/master-bin.index +-- copy_file $MYSQLD_DATADIR/master-bin.index.orig $MYSQLD_DATADIR/master-bin.index +-- remove_file $MYSQLD_DATADIR/master-bin.index.orig + +-- remove_file $MYSQLD_DATADIR/master-bin.2147483646 +-- remove_file $MYSQLD_DATADIR/master-bin.2147483647 + +# 3. Restart the server +-- append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +restart +EOF +-- enable_reconnect +-- source include/wait_until_connected_again.inc -- cgit v1.2.1 From 63278c561cd6b24a622cab9e2674dd272b24f061 Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Tue, 29 Sep 2009 15:18:44 +0100 Subject: BUG#43789 different master/slave table defs cause crash: text/varchar null vs not null NOTE: Backporting the patch to next-mr. The replication was generating corrupted data, warning messages on Valgrind and aborting on debug mode while replicating a "null" to "not null" field. Specifically the unpack_row routine, was considering the slave's table definition and trying to retrieve a field value, where there was nothing to be retrieved, ignoring the fact that the value was defined as "null" by the master. To fix the problem, we proceed as follows: 1 - If it is not STRICT sql_mode, implicit default values are used, regardless if it is multi-row or single-row statement. 2 - However, if it is STRICT mode, then a we do what follows: 2.1 If it is a transactional engine, we do a rollback on the first NULL that is to be set into a NOT NULL column and return an error. 2.2 If it is a non-transactional engine and it is the first row to be inserted with multi-row, we also return the error. Otherwise, we proceed with the execution, use implicit default values and print out warning messages. Unfortunately, the current patch cannot mimic the behavior showed by the master for updates on multi-tables and multi-row inserts. This happens because such statements are unfolded in different row events. For instance, considering the following updates and strict mode: (master) create table t1 (a int); create table t2 (a int not null); insert into t1 values (1); insert into t2 values (2); update t1, t2 SET t1.a=10, t2.a=NULL; t1 would have (10) and t2 would have (0) as this would be handled as a multi-row update. On the other hand, if we had the following updates: (master) create table t1 (a int); create table t2 (a int); (slave) create table t1 (a int); create table t2 (a int not null); (master) insert into t1 values (1); insert into t2 values (2); update t1, t2 SET t1.a=10, t2.a=NULL; On the master t1 would have (10) and t2 would have (NULL). On the slave, t1 would have (10) but the update on t1 would fail. --- mysql-test/extra/rpl_tests/rpl_not_null.test | 364 ++++++++++++++++++++++ mysql-test/suite/rpl/r/rpl_not_null_innodb.result | 202 ++++++++++++ mysql-test/suite/rpl/r/rpl_not_null_myisam.result | 202 ++++++++++++ mysql-test/suite/rpl/t/rpl_not_null_innodb.test | 19 ++ mysql-test/suite/rpl/t/rpl_not_null_myisam.test | 18 ++ 5 files changed, 805 insertions(+) create mode 100644 mysql-test/extra/rpl_tests/rpl_not_null.test create mode 100644 mysql-test/suite/rpl/r/rpl_not_null_innodb.result create mode 100644 mysql-test/suite/rpl/r/rpl_not_null_myisam.result create mode 100644 mysql-test/suite/rpl/t/rpl_not_null_innodb.test create mode 100644 mysql-test/suite/rpl/t/rpl_not_null_myisam.test (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_not_null.test b/mysql-test/extra/rpl_tests/rpl_not_null.test new file mode 100644 index 00000000000..88f37f9a95e --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_not_null.test @@ -0,0 +1,364 @@ +################################################################################# +# This test checks if the replication between "null" fields to either "null" +# fields or "not null" fields works properly. In the first case, the execution +# should work fine. In the second case, it may fail according to the sql_mode +# being used. +# +# The test is devided in three main parts: +# +# 1 - NULL --> NULL (no failures) +# 2 - NULL --> NOT NULL ( sql-mode = STRICT and failures) +# 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures) +# +################################################################################# +connection master; + +SET SQL_LOG_BIN= 0; +eval CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, +`c` INT DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; + +eval CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; + +eval CREATE TABLE t3(`a` INT, `b` DATE DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; + +eval CREATE TABLE t4(`a` INT, `b` DATE DEFAULT NULL, +`c` INT DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +SET SQL_LOG_BIN= 1; + +connection slave; + +eval CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, +`c` INT DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; + +eval CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; + +eval CREATE TABLE t3(`a` INT, `b` DATE DEFAULT '0000-00-00', +`c` INT DEFAULT 500, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; + +eval CREATE TABLE t4(`a` INT, `b` DATE DEFAULT '0000-00-00', +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; + +--echo ************* EXECUTION WITH INSERTS ************* +connection master; +INSERT INTO t1(a,b,c) VALUES (1, null, 1); +INSERT INTO t1(a,b,c) VALUES (2,'1111-11-11', 2); +INSERT INTO t1(a,b) VALUES (3, null); +INSERT INTO t1(a,c) VALUES (4, 4); +INSERT INTO t1(a) VALUES (5); + +INSERT INTO t2(a,b) VALUES (1, null); +INSERT INTO t2(a,b) VALUES (2,'1111-11-11'); +INSERT INTO t2(a) VALUES (3); + +INSERT INTO t3(a,b) VALUES (1, null); +INSERT INTO t3(a,b) VALUES (2,'1111-11-11'); +INSERT INTO t3(a) VALUES (3); + +INSERT INTO t4(a,b,c) VALUES (1, null, 1); +INSERT INTO t4(a,b,c) VALUES (2,'1111-11-11', 2); +INSERT INTO t4(a,b) VALUES (3, null); +INSERT INTO t4(a,c) VALUES (4, 4); +INSERT INTO t4(a) VALUES (5); + +--echo ************* SHOWING THE RESULT SETS WITH INSERTS ************* +sync_slave_with_master; + +--echo TABLES t1 and t2 must be equal otherwise an error will be thrown. +let $diff_table_1=master:test.t1; +let $diff_table_2=slave:test.t1; +source include/diff_tables.inc; + +let $diff_table_1=master:test.t2; +let $diff_table_2=slave:test.t2; +source include/diff_tables.inc; + +--echo TABLES t2 and t3 must be different. +connection master; +SELECT * FROM t3; +connection slave; +SELECT * FROM t3; +connection master; +SELECT * FROM t4; +connection slave; +SELECT * FROM t4; + +--echo ************* EXECUTION WITH UPDATES and REPLACES ************* +connection master; +DELETE FROM t1; +INSERT INTO t1(a,b,c) VALUES (1,'1111-11-11', 1); +REPLACE INTO t1(a,b,c) VALUES (2,'1111-11-11', 2); +UPDATE t1 set b= NULL, c= 300 where a= 1; +REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); + +--echo ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* +sync_slave_with_master; + +--echo TABLES t1 and t2 must be equal otherwise an error will be thrown. +let $diff_table_1=master:test.t1; +let $diff_table_2=slave:test.t1; +source include/diff_tables.inc; + +--echo ************* CLEANING ************* +connection master; + +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE t4; + +sync_slave_with_master; + +connection master; + +SET SQL_LOG_BIN= 0; +eval CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT NULL, `c` BIT DEFAULT NULL, +PRIMARY KEY (`a`)) ENGINE= $engine; +SET SQL_LOG_BIN= 1; + +connection slave; + +eval CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT b'01', `c` BIT DEFAULT NULL, +PRIMARY KEY (`a`)) ENGINE= $engine; + +--echo ************* EXECUTION WITH INSERTS ************* +connection master; +INSERT INTO t1(a,b,c) VALUES (1, null, b'01'); +INSERT INTO t1(a,b,c) VALUES (2,b'00', b'01'); +INSERT INTO t1(a,b) VALUES (3, null); +INSERT INTO t1(a,c) VALUES (4, b'01'); +INSERT INTO t1(a) VALUES (5); + +--echo ************* SHOWING THE RESULT SETS WITH INSERTS ************* +--echo TABLES t1 and t2 must be different. +sync_slave_with_master; +connection master; +SELECT a,b+0,c+0 FROM t1; +connection slave; +SELECT a,b+0,c+0 FROM t1; + +--echo ************* EXECUTION WITH UPDATES and REPLACES ************* +connection master; +DELETE FROM t1; +INSERT INTO t1(a,b,c) VALUES (1,b'00', b'01'); +REPLACE INTO t1(a,b,c) VALUES (2,b'00',b'01'); +UPDATE t1 set b= NULL, c= b'00' where a= 1; +REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); + +--echo ************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* +--echo TABLES t1 and t2 must be equal otherwise an error will be thrown. +sync_slave_with_master; +let $diff_table_1=master:test.t1; +let $diff_table_2=slave:test.t1; +source include/diff_tables.inc; + +connection master; + +DROP TABLE t1; + +sync_slave_with_master; + +--echo ################################################################################ +--echo # NULL ---> NOT NULL (STRICT MODE) +--echo # UNCOMMENT THIS AFTER FIXING BUG#43992 +--echo ################################################################################ +#connection slave; +#SET GLOBAL sql_mode="TRADITIONAL"; +# +#STOP SLAVE; +#--source include/wait_for_slave_to_stop.inc +#START SLAVE; +#--source include/wait_for_slave_to_start.inc +# +#let $y=0; +#while (`select $y < 6`) +#{ +# connection master; +# +# SET SQL_LOG_BIN= 0; +# eval CREATE TABLE t1(`a` INT NOT NULL, `b` INT, +# PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +# eval CREATE TABLE t2(`a` INT NOT NULL, `b` INT, +# PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +# eval CREATE TABLE t3(`a` INT NOT NULL, `b` INT, +# PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +# SET SQL_LOG_BIN= 1; +# +# connection slave; +# +# eval CREATE TABLE t1(`a` INT NOT NULL, `b` INT NOT NULL, +# `c` INT NOT NULL, +# PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +# eval CREATE TABLE t2(`a` INT NOT NULL, `b` INT NOT NULL, +# `c` INT, +# PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +# eval CREATE TABLE t3(`a` INT NOT NULL, `b` INT NOT NULL, +# `c` INT DEFAULT 500, +# PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +# +# if (`select $y=0`) +# { +# --echo ************* EXECUTION WITH INSERTS ************* +# connection master; +# INSERT INTO t1(a) VALUES (1); +# } +# +# if (`select $y=1`) +# { +# --echo ************* EXECUTION WITH INSERTS ************* +# connection master; +# INSERT INTO t1(a, b) VALUES (1, NULL); +# } +# +# if (`select $y=2`) +# { +# --echo ************* EXECUTION WITH UPDATES ************* +# connection master; +# INSERT INTO t3(a, b) VALUES (1, 1); +# INSERT INTO t3(a, b) VALUES (2, 1); +# UPDATE t3 SET b = NULL where a= 1; +# } +# +# if (`select $y=3`) +# { +# --echo ************* EXECUTION WITH INSERTS/REPLACES ************* +# connection master; +# REPLACE INTO t3(a, b) VALUES (1, null); +# } +# +# if (`select $y=4`) +# { +# --echo ************* EXECUTION WITH UPDATES/REPLACES ************* +# connection master; +# INSERT INTO t3(a, b) VALUES (1, 1); +# REPLACE INTO t3(a, b) VALUES (1, null); +# } +# +# if (`select $y=5`) +# { +# --echo ************* EXECUTION WITH MULTI-ROW INSERTS ************* +# connection master; +# +# SET SQL_LOG_BIN= 0; +# INSERT INTO t2(a, b) VALUES (1, 1); +# INSERT INTO t2(a, b) VALUES (2, 1); +# INSERT INTO t2(a, b) VALUES (3, null); +# INSERT INTO t2(a, b) VALUES (4, 1); +# INSERT INTO t2(a, b) VALUES (5, 1); +# SET SQL_LOG_BIN= 1; +# +# INSERT INTO t2 SELECT a + 10, b from t2; +# --echo The statement below is just executed to stop processing +# INSERT INTO t1(a) VALUES (1); +# } +# +# --echo ************* SHOWING THE RESULT SETS ************* +# connection slave; +# --source include/wait_for_slave_sql_to_stop.inc +# connection master; +# SELECT * FROM t1; +# connection slave; +# SELECT * FROM t1; +# connection master; +# SELECT * FROM t2; +# connection slave; +# SELECT * FROM t2; +# connection master; +# SELECT * FROM t3; +# connection slave; +# SELECT * FROM t3; +# --source include/reset_master_and_slave.inc +# +# connection master; +# +# DROP TABLE t1; +# DROP TABLE t2; +# DROP TABLE t3; +# +# sync_slave_with_master; +# +# inc $y; +#} +#connection slave; +#SET GLOBAL sql_mode=""; +# +#STOP SLAVE; +#source include/wait_for_slave_to_stop.inc; +#START SLAVE; +#--source include/wait_for_slave_to_start.inc + +--echo ################################################################################ +--echo # NULL ---> NOT NULL (NON-STRICT MODE) +--echo ################################################################################ +connection master; + +SET SQL_LOG_BIN= 0; +eval CREATE TABLE t1(`a` INT NOT NULL, `b` INT, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +eval CREATE TABLE t2(`a` INT NOT NULL, `b` INT, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +eval CREATE TABLE t3(`a` INT NOT NULL, `b` INT, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +SET SQL_LOG_BIN= 1; + +connection slave; + +eval CREATE TABLE t1(`a` INT NOT NULL, `b` INT NOT NULL, +`c` INT NOT NULL, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +eval CREATE TABLE t2(`a` INT NOT NULL, `b` INT NOT NULL, +`c` INT, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; +eval CREATE TABLE t3(`a` INT NOT NULL, `b` INT NOT NULL, +`c` INT DEFAULT 500, +PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1; + +--echo ************* EXECUTION WITH INSERTS ************* +connection master; +INSERT INTO t1(a) VALUES (1); +INSERT INTO t1(a, b) VALUES (2, NULL); +INSERT INTO t1(a, b) VALUES (3, 1); + +INSERT INTO t2(a) VALUES (1); +INSERT INTO t2(a, b) VALUES (2, NULL); +INSERT INTO t2(a, b) VALUES (3, 1); + +INSERT INTO t3(a) VALUES (1); +INSERT INTO t3(a, b) VALUES (2, NULL); +INSERT INTO t3(a, b) VALUES (3, 1); +INSERT INTO t3(a, b) VALUES (4, 1); +REPLACE INTO t3(a, b) VALUES (5, null); + +REPLACE INTO t3(a, b) VALUES (3, null); +UPDATE t3 SET b = NULL where a = 4; + +--echo ************* SHOWING THE RESULT SETS ************* +connection master; +sync_slave_with_master; + +connection master; +SELECT * FROM t1; +connection slave; +SELECT * FROM t1; +connection master; +SELECT * FROM t2; +connection slave; +SELECT * FROM t2; +connection master; +SELECT * FROM t3; +connection slave; +SELECT * FROM t3; + +connection master; + +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; + +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result new file mode 100644 index 00000000000..7717beb0a47 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result @@ -0,0 +1,202 @@ +stop slave; +drop table if exists t1,t2,t3,t4,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 TABLE t1(`a` INT, `b` DATE DEFAULT NULL, +`c` INT DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +CREATE TABLE t3(`a` INT, `b` DATE DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +CREATE TABLE t4(`a` INT, `b` DATE DEFAULT NULL, +`c` INT DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +SET SQL_LOG_BIN= 1; +CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, +`c` INT DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +CREATE TABLE t3(`a` INT, `b` DATE DEFAULT '0000-00-00', +`c` INT DEFAULT 500, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +CREATE TABLE t4(`a` INT, `b` DATE DEFAULT '0000-00-00', +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +************* EXECUTION WITH INSERTS ************* +INSERT INTO t1(a,b,c) VALUES (1, null, 1); +INSERT INTO t1(a,b,c) VALUES (2,'1111-11-11', 2); +INSERT INTO t1(a,b) VALUES (3, null); +INSERT INTO t1(a,c) VALUES (4, 4); +INSERT INTO t1(a) VALUES (5); +INSERT INTO t2(a,b) VALUES (1, null); +INSERT INTO t2(a,b) VALUES (2,'1111-11-11'); +INSERT INTO t2(a) VALUES (3); +INSERT INTO t3(a,b) VALUES (1, null); +INSERT INTO t3(a,b) VALUES (2,'1111-11-11'); +INSERT INTO t3(a) VALUES (3); +INSERT INTO t4(a,b,c) VALUES (1, null, 1); +INSERT INTO t4(a,b,c) VALUES (2,'1111-11-11', 2); +INSERT INTO t4(a,b) VALUES (3, null); +INSERT INTO t4(a,c) VALUES (4, 4); +INSERT INTO t4(a) VALUES (5); +************* SHOWING THE RESULT SETS WITH INSERTS ************* +TABLES t1 and t2 must be equal otherwise an error will be thrown. +Comparing tables master:test.t1 and slave:test.t1 +Comparing tables master:test.t2 and slave:test.t2 +TABLES t2 and t3 must be different. +SELECT * FROM t3; +a b +1 NULL +2 1111-11-11 +3 NULL +SELECT * FROM t3; +a b c +1 NULL 500 +2 1111-11-11 500 +3 NULL 500 +SELECT * FROM t4; +a b c +1 NULL 1 +2 1111-11-11 2 +3 NULL NULL +4 NULL 4 +5 NULL NULL +SELECT * FROM t4; +a b +1 NULL +2 1111-11-11 +3 NULL +4 NULL +5 NULL +************* EXECUTION WITH UPDATES and REPLACES ************* +DELETE FROM t1; +INSERT INTO t1(a,b,c) VALUES (1,'1111-11-11', 1); +REPLACE INTO t1(a,b,c) VALUES (2,'1111-11-11', 2); +UPDATE t1 set b= NULL, c= 300 where a= 1; +REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); +************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* +TABLES t1 and t2 must be equal otherwise an error will be thrown. +Comparing tables master:test.t1 and slave:test.t1 +************* CLEANING ************* +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE t4; +SET SQL_LOG_BIN= 0; +CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT NULL, `c` BIT DEFAULT NULL, +PRIMARY KEY (`a`)) ENGINE= Innodb; +SET SQL_LOG_BIN= 1; +CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT b'01', `c` BIT DEFAULT NULL, +PRIMARY KEY (`a`)) ENGINE= Innodb; +************* EXECUTION WITH INSERTS ************* +INSERT INTO t1(a,b,c) VALUES (1, null, b'01'); +INSERT INTO t1(a,b,c) VALUES (2,b'00', b'01'); +INSERT INTO t1(a,b) VALUES (3, null); +INSERT INTO t1(a,c) VALUES (4, b'01'); +INSERT INTO t1(a) VALUES (5); +************* SHOWING THE RESULT SETS WITH INSERTS ************* +TABLES t1 and t2 must be different. +SELECT a,b+0,c+0 FROM t1; +a b+0 c+0 +1 NULL 1 +2 0 1 +3 NULL NULL +4 NULL 1 +5 NULL NULL +SELECT a,b+0,c+0 FROM t1; +a b+0 c+0 +1 NULL 1 +2 0 1 +3 NULL NULL +4 NULL 1 +5 NULL NULL +************* EXECUTION WITH UPDATES and REPLACES ************* +DELETE FROM t1; +INSERT INTO t1(a,b,c) VALUES (1,b'00', b'01'); +REPLACE INTO t1(a,b,c) VALUES (2,b'00',b'01'); +UPDATE t1 set b= NULL, c= b'00' where a= 1; +REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); +************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* +TABLES t1 and t2 must be equal otherwise an error will be thrown. +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; +################################################################################ +# NULL ---> NOT NULL (STRICT MODE) +# UNCOMMENT THIS AFTER FIXING BUG#43992 +################################################################################ +################################################################################ +# NULL ---> NOT NULL (NON-STRICT MODE) +################################################################################ +SET SQL_LOG_BIN= 0; +CREATE TABLE t1(`a` INT NOT NULL, `b` INT, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +CREATE TABLE t2(`a` INT NOT NULL, `b` INT, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +CREATE TABLE t3(`a` INT NOT NULL, `b` INT, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +SET SQL_LOG_BIN= 1; +CREATE TABLE t1(`a` INT NOT NULL, `b` INT NOT NULL, +`c` INT NOT NULL, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +CREATE TABLE t2(`a` INT NOT NULL, `b` INT NOT NULL, +`c` INT, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +CREATE TABLE t3(`a` INT NOT NULL, `b` INT NOT NULL, +`c` INT DEFAULT 500, +PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1; +************* EXECUTION WITH INSERTS ************* +INSERT INTO t1(a) VALUES (1); +INSERT INTO t1(a, b) VALUES (2, NULL); +INSERT INTO t1(a, b) VALUES (3, 1); +INSERT INTO t2(a) VALUES (1); +INSERT INTO t2(a, b) VALUES (2, NULL); +INSERT INTO t2(a, b) VALUES (3, 1); +INSERT INTO t3(a) VALUES (1); +INSERT INTO t3(a, b) VALUES (2, NULL); +INSERT INTO t3(a, b) VALUES (3, 1); +INSERT INTO t3(a, b) VALUES (4, 1); +REPLACE INTO t3(a, b) VALUES (5, null); +REPLACE INTO t3(a, b) VALUES (3, null); +UPDATE t3 SET b = NULL where a = 4; +************* SHOWING THE RESULT SETS ************* +SELECT * FROM t1; +a b +1 NULL +2 NULL +3 1 +SELECT * FROM t1; +a b c +1 0 0 +2 0 0 +3 1 0 +SELECT * FROM t2; +a b +1 NULL +2 NULL +3 1 +SELECT * FROM t2; +a b c +1 0 NULL +2 0 NULL +3 1 NULL +SELECT * FROM t3; +a b +1 NULL +2 NULL +3 NULL +4 NULL +5 NULL +SELECT * FROM t3; +a b c +1 0 500 +2 0 500 +3 0 500 +4 0 500 +5 0 500 +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; diff --git a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result new file mode 100644 index 00000000000..57a015367bb --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result @@ -0,0 +1,202 @@ +stop slave; +drop table if exists t1,t2,t3,t4,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 TABLE t1(`a` INT, `b` DATE DEFAULT NULL, +`c` INT DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +CREATE TABLE t3(`a` INT, `b` DATE DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +CREATE TABLE t4(`a` INT, `b` DATE DEFAULT NULL, +`c` INT DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +SET SQL_LOG_BIN= 1; +CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL, +`c` INT DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +CREATE TABLE t3(`a` INT, `b` DATE DEFAULT '0000-00-00', +`c` INT DEFAULT 500, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +CREATE TABLE t4(`a` INT, `b` DATE DEFAULT '0000-00-00', +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +************* EXECUTION WITH INSERTS ************* +INSERT INTO t1(a,b,c) VALUES (1, null, 1); +INSERT INTO t1(a,b,c) VALUES (2,'1111-11-11', 2); +INSERT INTO t1(a,b) VALUES (3, null); +INSERT INTO t1(a,c) VALUES (4, 4); +INSERT INTO t1(a) VALUES (5); +INSERT INTO t2(a,b) VALUES (1, null); +INSERT INTO t2(a,b) VALUES (2,'1111-11-11'); +INSERT INTO t2(a) VALUES (3); +INSERT INTO t3(a,b) VALUES (1, null); +INSERT INTO t3(a,b) VALUES (2,'1111-11-11'); +INSERT INTO t3(a) VALUES (3); +INSERT INTO t4(a,b,c) VALUES (1, null, 1); +INSERT INTO t4(a,b,c) VALUES (2,'1111-11-11', 2); +INSERT INTO t4(a,b) VALUES (3, null); +INSERT INTO t4(a,c) VALUES (4, 4); +INSERT INTO t4(a) VALUES (5); +************* SHOWING THE RESULT SETS WITH INSERTS ************* +TABLES t1 and t2 must be equal otherwise an error will be thrown. +Comparing tables master:test.t1 and slave:test.t1 +Comparing tables master:test.t2 and slave:test.t2 +TABLES t2 and t3 must be different. +SELECT * FROM t3; +a b +1 NULL +2 1111-11-11 +3 NULL +SELECT * FROM t3; +a b c +1 NULL 500 +2 1111-11-11 500 +3 NULL 500 +SELECT * FROM t4; +a b c +1 NULL 1 +2 1111-11-11 2 +3 NULL NULL +4 NULL 4 +5 NULL NULL +SELECT * FROM t4; +a b +1 NULL +2 1111-11-11 +3 NULL +4 NULL +5 NULL +************* EXECUTION WITH UPDATES and REPLACES ************* +DELETE FROM t1; +INSERT INTO t1(a,b,c) VALUES (1,'1111-11-11', 1); +REPLACE INTO t1(a,b,c) VALUES (2,'1111-11-11', 2); +UPDATE t1 set b= NULL, c= 300 where a= 1; +REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); +************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* +TABLES t1 and t2 must be equal otherwise an error will be thrown. +Comparing tables master:test.t1 and slave:test.t1 +************* CLEANING ************* +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE t4; +SET SQL_LOG_BIN= 0; +CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT NULL, `c` BIT DEFAULT NULL, +PRIMARY KEY (`a`)) ENGINE= MyISAM; +SET SQL_LOG_BIN= 1; +CREATE TABLE t1 (`a` INT, `b` BIT DEFAULT b'01', `c` BIT DEFAULT NULL, +PRIMARY KEY (`a`)) ENGINE= MyISAM; +************* EXECUTION WITH INSERTS ************* +INSERT INTO t1(a,b,c) VALUES (1, null, b'01'); +INSERT INTO t1(a,b,c) VALUES (2,b'00', b'01'); +INSERT INTO t1(a,b) VALUES (3, null); +INSERT INTO t1(a,c) VALUES (4, b'01'); +INSERT INTO t1(a) VALUES (5); +************* SHOWING THE RESULT SETS WITH INSERTS ************* +TABLES t1 and t2 must be different. +SELECT a,b+0,c+0 FROM t1; +a b+0 c+0 +1 NULL 1 +2 0 1 +3 NULL NULL +4 NULL 1 +5 NULL NULL +SELECT a,b+0,c+0 FROM t1; +a b+0 c+0 +1 NULL 1 +2 0 1 +3 NULL NULL +4 NULL 1 +5 NULL NULL +************* EXECUTION WITH UPDATES and REPLACES ************* +DELETE FROM t1; +INSERT INTO t1(a,b,c) VALUES (1,b'00', b'01'); +REPLACE INTO t1(a,b,c) VALUES (2,b'00',b'01'); +UPDATE t1 set b= NULL, c= b'00' where a= 1; +REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); +************* SHOWING THE RESULT SETS WITH UPDATES and REPLACES ************* +TABLES t1 and t2 must be equal otherwise an error will be thrown. +Comparing tables master:test.t1 and slave:test.t1 +DROP TABLE t1; +################################################################################ +# NULL ---> NOT NULL (STRICT MODE) +# UNCOMMENT THIS AFTER FIXING BUG#43992 +################################################################################ +################################################################################ +# NULL ---> NOT NULL (NON-STRICT MODE) +################################################################################ +SET SQL_LOG_BIN= 0; +CREATE TABLE t1(`a` INT NOT NULL, `b` INT, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +CREATE TABLE t2(`a` INT NOT NULL, `b` INT, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +CREATE TABLE t3(`a` INT NOT NULL, `b` INT, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +SET SQL_LOG_BIN= 1; +CREATE TABLE t1(`a` INT NOT NULL, `b` INT NOT NULL, +`c` INT NOT NULL, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +CREATE TABLE t2(`a` INT NOT NULL, `b` INT NOT NULL, +`c` INT, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +CREATE TABLE t3(`a` INT NOT NULL, `b` INT NOT NULL, +`c` INT DEFAULT 500, +PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1; +************* EXECUTION WITH INSERTS ************* +INSERT INTO t1(a) VALUES (1); +INSERT INTO t1(a, b) VALUES (2, NULL); +INSERT INTO t1(a, b) VALUES (3, 1); +INSERT INTO t2(a) VALUES (1); +INSERT INTO t2(a, b) VALUES (2, NULL); +INSERT INTO t2(a, b) VALUES (3, 1); +INSERT INTO t3(a) VALUES (1); +INSERT INTO t3(a, b) VALUES (2, NULL); +INSERT INTO t3(a, b) VALUES (3, 1); +INSERT INTO t3(a, b) VALUES (4, 1); +REPLACE INTO t3(a, b) VALUES (5, null); +REPLACE INTO t3(a, b) VALUES (3, null); +UPDATE t3 SET b = NULL where a = 4; +************* SHOWING THE RESULT SETS ************* +SELECT * FROM t1; +a b +1 NULL +2 NULL +3 1 +SELECT * FROM t1; +a b c +1 0 0 +2 0 0 +3 1 0 +SELECT * FROM t2; +a b +1 NULL +2 NULL +3 1 +SELECT * FROM t2; +a b c +1 0 NULL +2 0 NULL +3 1 NULL +SELECT * FROM t3; +a b +1 NULL +2 NULL +3 NULL +4 NULL +5 NULL +SELECT * FROM t3; +a b c +1 0 500 +2 0 500 +3 0 500 +4 0 500 +5 0 500 +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; diff --git a/mysql-test/suite/rpl/t/rpl_not_null_innodb.test b/mysql-test/suite/rpl/t/rpl_not_null_innodb.test new file mode 100644 index 00000000000..dca0ea6589c --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_not_null_innodb.test @@ -0,0 +1,19 @@ +################################################################################# +# This test checks if the replication between "null" fields to either "null" +# fields or "not null" fields works properly. In the first case, the execution +# should work fine. In the second case, it may fail according to the sql_mode +# being used. +# +# The test is devided in three main parts: +# +# 1 - NULL --> NULL (no failures) +# 2 - NULL --> NOT NULL ( sql-mode = STRICT and failures) +# 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures) +# +################################################################################# +--source include/master-slave.inc +--source include/have_innodb.inc +--source include/have_binlog_format_row.inc + +let $engine=Innodb; +--source extra/rpl_tests/rpl_not_null.test diff --git a/mysql-test/suite/rpl/t/rpl_not_null_myisam.test b/mysql-test/suite/rpl/t/rpl_not_null_myisam.test new file mode 100644 index 00000000000..0c036f5bfd7 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_not_null_myisam.test @@ -0,0 +1,18 @@ +################################################################################# +# This test checks if the replication between "null" fields to either "null" +# fields or "not null" fields works properly. In the first case, the execution +# should work fine. In the second case, it may fail according to the sql_mode +# being used. +# +# The test is devided in three main parts: +# +# 1 - NULL --> NULL (no failures) +# 2 - NULL --> NOT NULL ( sql-mode = STRICT and failures) +# 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures) +# +################################################################################# +--source include/master-slave.inc +--source include/have_binlog_format_row.inc + +let $engine=MyISAM; +--source extra/rpl_tests/rpl_not_null.test -- cgit v1.2.1 From a48ff22004594cacc0517d50a631a931f3ce06a9 Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Tue, 29 Sep 2009 15:40:52 +0100 Subject: BUG#40337 Fsyncing master and relay log to disk after every event is too slow NOTE: Backporting the patch to next-mr. The fix proposed in BUG#35542 and BUG#31665 introduces a performance issue when fsyncing the master.info, relay.info and relay-log.bin* after #th events. Although such solution has been proposed to reduce the probability of corrupted files due to a slave-crash, the performance penalty introduced by it has made the approach impractical for highly intensive workloads. In a nutshell, the option --syn-relay-log proposed in BUG#35542 and BUG#31665 simultaneously fsyncs master.info, relay-log.info and relay-log.bin* and this is the main source of performance issues. This patch introduces new options that give more control to the user on what should be fsynced and how often: 1) (--sync-master-info, integer) which syncs the master.info after #th event; 2) (--sync-relay-log, integer) which syncs the relay-log.bin* after #th events. 3) (--sync-relay-log-info, integer) which syncs the relay.info after #th transactions. To provide both performance and increased reliability, we recommend the following setup: 1) --sync-master-info = 0 eventually the operating system will fsync it; 2) --sync-relay-log = 0 eventually the operating system will fsync it; 3) --sync-relay-log-info = 1 fsyncs it after every transaction; Notice, that the previous setup does not reduce the probability of corrupted master.info and relay-log.bin*. To overcome the issue, this patch also introduces a recovery mechanism that right after restart throws away relay-log.bin* retrieved from a master and updates the master.info based on the relay.info: 4) (--relay-log-recovery, boolean) which enables a recovery mechanism that throws away relay-log.bin* after a crash. However, it can only recover the incorrect binlog file and position in master.info, if other informations (host, port password, etc) are corrupted or incorrect, then this recovery mechanism will fail to work. --- mysql-test/suite/rpl/r/rpl_flushlog_loop.result | 1 + mysql-test/suite/rpl/r/rpl_sync.result | 40 +++++++ mysql-test/suite/rpl/t/rpl_sync-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_sync.test | 148 ++++++++++++++++++++++++ 4 files changed, 190 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_sync.result create mode 100644 mysql-test/suite/rpl/t/rpl_sync-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_sync.test (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result index 600ac44fc86..529d1db6cd6 100644 --- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result +++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result @@ -10,6 +10,7 @@ relay_log MYSQLD_DATADIR/relay-log relay_log_index relay_log_info_file relay-log.info relay_log_purge ON +relay_log_recovery OFF relay_log_space_limit 0 stop slave; change master to master_host='127.0.0.1',master_user='root', diff --git a/mysql-test/suite/rpl/r/rpl_sync.result b/mysql-test/suite/rpl/r/rpl_sync.result new file mode 100644 index 00000000000..edc20c46140 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_sync.result @@ -0,0 +1,40 @@ +=====Configuring the enviroment=======; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +call mtr.add_suppression('Attempting backtrace'); +call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001"); +CREATE TABLE t1(a INT, PRIMARY KEY(a)) engine=innodb; +insert into t1(a) values(1); +insert into t1(a) values(2); +insert into t1(a) values(3); +=====Inserting data on the master but without the SQL Thread being running=======; +stop slave SQL_THREAD; +insert into t1(a) values(4); +insert into t1(a) values(5); +insert into t1(a) values(6); +=====Removing relay log files and crashing/recoverying the slave=======; +stop slave IO_THREAD; +SET SESSION debug="d,crash_before_rotate_relaylog"; +FLUSH LOGS; +ERROR HY000: Lost connection to MySQL server during query +=====Dumping and comparing tables=======; +start slave; +Comparing tables master:test.t1 and slave:test.t1 +=====Corrupting the master.info=======; +stop slave; +FLUSH LOGS; +insert into t1(a) values(7); +insert into t1(a) values(8); +insert into t1(a) values(9); +SET SESSION debug="d,crash_before_rotate_relaylog"; +FLUSH LOGS; +ERROR HY000: Lost connection to MySQL server during query +=====Dumping and comparing tables=======; +start slave; +Comparing tables master:test.t1 and slave:test.t1 +=====Clean up=======; +drop table t1; diff --git a/mysql-test/suite/rpl/t/rpl_sync-slave.opt b/mysql-test/suite/rpl/t/rpl_sync-slave.opt new file mode 100644 index 00000000000..77809a42c43 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sync-slave.opt @@ -0,0 +1 @@ +--sync-relay-log-info=1 --relay-log-recovery=1 diff --git a/mysql-test/suite/rpl/t/rpl_sync.test b/mysql-test/suite/rpl/t/rpl_sync.test new file mode 100644 index 00000000000..80b6a144187 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_sync.test @@ -0,0 +1,148 @@ +######################################################################################## +# This test verifies the options --sync-relay-log-info and --relay-log-recovery by +# crashing the slave in two different situations: +# (case-1) - Corrupt the relay log with changes which were not processed by +# the SQL Thread and crashes it. +# (case-2) - Corrupt the master.info with wrong coordinates and crashes it. +# +# Case 1: +# 1 - Stops the SQL Thread +# 2 - Inserts new records into the master. +# 3 - Corrupts the relay-log.bin* which most likely has such changes. +# 4 - Crashes the slave +# 5 - Verifies if the slave is sync with the master which means that the information +# loss was circumvented by the recovery process. +# +# Case 2: +# 1 - Stops the SQL/IO Threads +# 2 - Inserts new records into the master. +# 3 - Corrupts the master.info with wrong coordinates. +# 4 - Crashes the slave +# 5 - Verifies if the slave is sync with the master which means that the information +# loss was circumvented by the recovery process. +######################################################################################## + +######################################################################################## +# Configuring the environment +######################################################################################## +--echo =====Configuring the enviroment=======; +--source include/master-slave.inc +--source include/not_embedded.inc +--source include/not_valgrind.inc +--source include/have_debug.inc +--source include/have_innodb.inc + +call mtr.add_suppression('Attempting backtrace'); +call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001"); +CREATE TABLE t1(a INT, PRIMARY KEY(a)) engine=innodb; + +insert into t1(a) values(1); +insert into t1(a) values(2); +insert into t1(a) values(3); + +######################################################################################## +# Case 1: Corrupt a relay-log.bin* +######################################################################################## +--echo =====Inserting data on the master but without the SQL Thread being running=======; +sync_slave_with_master; + +connection slave; +let $MYSQLD_SLAVE_DATADIR= `select @@datadir`; +--replace_result $MYSQLD_SLAVE_DATADIR MYSQLD_SLAVE_DATADIR +--copy_file $MYSQLD_SLAVE_DATADIR/master.info $MYSQLD_SLAVE_DATADIR/master.backup +stop slave SQL_THREAD; +source include/wait_for_slave_sql_to_stop.inc; + +connection master; +insert into t1(a) values(4); +insert into t1(a) values(5); +insert into t1(a) values(6); + +--echo =====Removing relay log files and crashing/recoverying the slave=======; +connection slave; +stop slave IO_THREAD; +source include/wait_for_slave_io_to_stop.inc; + +let $file= query_get_value("SHOW SLAVE STATUS", Relay_Log_File, 1); +--replace_result $MYSQLD_SLAVE_DATADIR MYSQLD_SLAVE_DATADIR +--exec echo "failure" > $MYSQLD_SLAVE_DATADIR/$file + +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect +SET SESSION debug="d,crash_before_rotate_relaylog"; +--error 2013 +FLUSH LOGS; + +--enable_reconnect +--source include/wait_until_connected_again.inc + +--echo =====Dumping and comparing tables=======; +start slave; +source include/wait_for_slave_to_start.inc; + +connection master; +sync_slave_with_master; + +let $diff_table_1=master:test.t1; +let $diff_table_2=slave:test.t1; +source include/diff_tables.inc; + +######################################################################################## +# Case 2: Corrupt a master.info +######################################################################################## +--echo =====Corrupting the master.info=======; +connection slave; +stop slave; +source include/wait_for_slave_to_stop.inc; + +connection master; +FLUSH LOGS; + +insert into t1(a) values(7); +insert into t1(a) values(8); +insert into t1(a) values(9); + +connection slave; +--replace_result $MYSQLD_SLAVE_DATADIR MYSQLD_SLAVE_DATADIR +--exec cat $MYSQLD_SLAVE_DATADIR/master.backup > $MYSQLD_SLAVE_DATADIR/master.info + +let MYSQLD_SLAVE_DATADIR=`select @@datadir`; + +--perl +use strict; +use warnings; +my $src= "$ENV{'MYSQLD_SLAVE_DATADIR'}/master.backup"; +my $dst= "$ENV{'MYSQLD_SLAVE_DATADIR'}/master.info"; +open(FILE, "<", $src) or die; +my @content= ; +close FILE; +open(FILE, ">", $dst) or die; +binmode FILE; +print FILE @content; +close FILE; +EOF + +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect +SET SESSION debug="d,crash_before_rotate_relaylog"; +--error 2013 +FLUSH LOGS; + +--enable_reconnect +--source include/wait_until_connected_again.inc + +--echo =====Dumping and comparing tables=======; +start slave; +source include/wait_for_slave_to_start.inc; + +connection master; +sync_slave_with_master; + +let $diff_table_1=master:test.t1; +let $diff_table_2=slave:test.t1; +source include/diff_tables.inc; + +######################################################################################## +# Clean up +######################################################################################## +--echo =====Clean up=======; +connection master; +drop table t1; -- cgit v1.2.1 From 7771b90295d13af201e6adb5dd16d4e871b8c3cb Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Wed, 30 Sep 2009 16:09:31 +0800 Subject: Back porting the test case for semi-sync --- mysql-test/include/have_semisync_plugin.inc | 15 + mysql-test/suite/rpl/r/rpl_semi_sync.result | 398 ++++++++++++++++++ mysql-test/suite/rpl/t/rpl_semi_sync-master.opt | 1 + mysql-test/suite/rpl/t/rpl_semi_sync-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_semi_sync.test | 517 ++++++++++++++++++++++++ 5 files changed, 932 insertions(+) create mode 100644 mysql-test/include/have_semisync_plugin.inc create mode 100644 mysql-test/suite/rpl/r/rpl_semi_sync.result create mode 100644 mysql-test/suite/rpl/t/rpl_semi_sync-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_semi_sync-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_semi_sync.test (limited to 'mysql-test') diff --git a/mysql-test/include/have_semisync_plugin.inc b/mysql-test/include/have_semisync_plugin.inc new file mode 100644 index 00000000000..38e2fcd6115 --- /dev/null +++ b/mysql-test/include/have_semisync_plugin.inc @@ -0,0 +1,15 @@ +# +# Check if dynamic loading is supported +# +--require r/have_dynamic_loading.require +disable_query_log; +show variables like 'have_dynamic_loading'; +enable_query_log; + +# +# Check if the variable SEMISYNC_MASTER_PLUGIN is set +# +if (`select LENGTH('$SEMISYNC_MASTER_PLUGIN') = 0`) +{ + skip Need semisync plugins; +} diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync.result b/mysql-test/suite/rpl/r/rpl_semi_sync.result new file mode 100644 index 00000000000..d6f2a3aceff --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_semi_sync.result @@ -0,0 +1,398 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +# +# Uninstall semi-sync plugins on master and slave +# +include/stop_slave.inc +reset slave; +UNINSTALL PLUGIN rpl_semi_sync_slave; +UNINSTALL PLUGIN rpl_semi_sync_master; +reset master; +set sql_log_bin=0; +UNINSTALL PLUGIN rpl_semi_sync_slave; +UNINSTALL PLUGIN rpl_semi_sync_master; +set sql_log_bin=1; +# +# Main test of semi-sync replication start here +# +[ on master ] +[ default state of semi-sync on master should be OFF ] +show variables like 'rpl_semi_sync_master_enabled'; +Variable_name Value +rpl_semi_sync_master_enabled OFF +[ enable semi-sync on master ] +set global rpl_semi_sync_master_enabled = 1; +show variables like 'rpl_semi_sync_master_enabled'; +Variable_name Value +rpl_semi_sync_master_enabled ON +[ status of semi-sync on master should be OFF without any semi-sync slaves ] +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 0 +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status OFF +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 0 +# +# BUG#45672 Semisync repl: ActiveTranx:insert_tranx_node: transaction node allocation failed +# BUG#45673 Semisynch reports correct operation even if no slave is connected +# +[ status of semi-sync on master should be OFF ] +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 0 +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status OFF +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 0 +# +# INSTALL PLUGIN semi-sync on slave +# +[ on slave ] +[ default state of semi-sync on slave should be OFF ] +show variables like 'rpl_semi_sync_slave_enabled'; +Variable_name Value +rpl_semi_sync_slave_enabled OFF +[ enable semi-sync on slave ] +set global rpl_semi_sync_slave_enabled = 1; +show variables like 'rpl_semi_sync_slave_enabled'; +Variable_name Value +rpl_semi_sync_slave_enabled ON +include/start_slave.inc +[ on master ] +[ initial master state after the semi-sync slave connected ] +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +show status like 'Rpl_semi_sync_master_no_tx'; +Variable_name Value +Rpl_semi_sync_master_no_tx 0 +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 0 +create table t1(n int) engine = ENGINE_TYPE; +[ master state after CREATE TABLE statement ] +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +show status like 'Rpl_semi_sync_master_no_tx'; +Variable_name Value +Rpl_semi_sync_master_no_tx 0 +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 1 +[ insert records to table ] +[ master status after inserts ] +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +show status like 'Rpl_semi_sync_master_no_tx'; +Variable_name Value +Rpl_semi_sync_master_no_tx 0 +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 301 +[ on slave ] +[ slave status after replicated inserts ] +show status like 'Rpl_semi_sync_slave_status'; +Variable_name Value +Rpl_semi_sync_slave_status ON +select count(distinct n) from t1; +count(distinct n) +300 +select min(n) from t1; +min(n) +1 +select max(n) from t1; +max(n) +300 +include/stop_slave.inc +[ on master ] +[ master status should be ON ] +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +show status like 'Rpl_semi_sync_master_no_tx'; +Variable_name Value +Rpl_semi_sync_master_no_tx 0 +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 301 +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +[ semi-sync replication of these transactions will fail ] +insert into t1 values (500); +delete from t1 where n < 500; +insert into t1 values (100); +[ master status should be OFF ] +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status OFF +show status like 'Rpl_semi_sync_master_no_tx'; +Variable_name Value +Rpl_semi_sync_master_no_tx 3 +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 301 +[ on slave ] +[ slave status should be OFF ] +show status like 'Rpl_semi_sync_slave_status'; +Variable_name Value +Rpl_semi_sync_slave_status OFF +include/start_slave.inc +[ slave status should be ON ] +show status like 'Rpl_semi_sync_slave_status'; +Variable_name Value +Rpl_semi_sync_slave_status ON +select count(distinct n) from t1; +count(distinct n) +2 +select min(n) from t1; +min(n) +100 +select max(n) from t1; +max(n) +500 +[ on master ] +[ do something to activate semi-sync ] +drop table t1; +[ master status should be ON again ] +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +show status like 'Rpl_semi_sync_master_no_tx'; +Variable_name Value +Rpl_semi_sync_master_no_tx 3 +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 302 +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +[ on slave ] +include/stop_slave.inc +[ on master ] +show master logs; +Log_name master-bin.000001 +File_size # +show variables like 'rpl_semi_sync_master_enabled'; +Variable_name Value +rpl_semi_sync_master_enabled ON +[ disable semi-sync on the fly ] +set global rpl_semi_sync_master_enabled=0; +show variables like 'rpl_semi_sync_master_enabled'; +Variable_name Value +rpl_semi_sync_master_enabled OFF +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status OFF +[ enable semi-sync on the fly ] +set global rpl_semi_sync_master_enabled=1; +show variables like 'rpl_semi_sync_master_enabled'; +Variable_name Value +rpl_semi_sync_master_enabled ON +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +[ on slave ] +include/start_slave.inc +[ on master ] +create table t1 (a int) engine = ENGINE_TYPE; +drop table t1; +show status like 'Rpl_relay%'; +Variable_name Value +[ test reset master ] +[ on master] +reset master; +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +show status like 'Rpl_semi_sync_master_no_tx'; +Variable_name Value +Rpl_semi_sync_master_no_tx 0 +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 0 +[ on slave ] +include/stop_slave.inc +reset slave; +include/start_slave.inc +[ on master ] +create table t1 (a int) engine = ENGINE_TYPE; +insert into t1 values (1); +insert into t1 values (2), (3); +[ on slave ] +select * from t1; +a +1 +2 +3 +[ on master ] +[ master semi-sync status should be ON ] +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +show status like 'Rpl_semi_sync_master_no_tx'; +Variable_name Value +Rpl_semi_sync_master_no_tx 0 +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 3 +# +# Start semi-sync replication without SUPER privilege +# +include/stop_slave.inc +reset slave; +[ on master ] +reset master; +set sql_log_bin=0; +grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; +flush privileges; +set sql_log_bin=1; +[ on slave ] +grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; +flush privileges; +change master to master_user='rpl',master_password='rpl'; +include/start_slave.inc +show status like 'Rpl_semi_sync_slave_status'; +Variable_name Value +Rpl_semi_sync_slave_status ON +[ on master ] +[ master semi-sync should be ON ] +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +show status like 'Rpl_semi_sync_master_no_tx'; +Variable_name Value +Rpl_semi_sync_master_no_tx 0 +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 0 +insert into t1 values (4); +insert into t1 values (5); +[ master semi-sync should be ON ] +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 1 +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status ON +show status like 'Rpl_semi_sync_master_no_tx'; +Variable_name Value +Rpl_semi_sync_master_no_tx 0 +show status like 'Rpl_semi_sync_master_yes_tx'; +Variable_name Value +Rpl_semi_sync_master_yes_tx 2 +# +# Test semi-sync slave connect to non-semi-sync master +# +[ on slave ] +include/stop_slave.inc +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; +Variable_name Value +Rpl_semi_sync_slave_status OFF +[ on master ] +[ Semi-sync status on master should be ON ] +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 0 +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status OFF +set global rpl_semi_sync_master_enabled= 0; +[ on slave ] +SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled'; +Variable_name Value +rpl_semi_sync_slave_enabled ON +include/start_slave.inc +[ on master ] +insert into t1 values (8); +[ master semi-sync clients should be 0, status should be OFF ] +show status like 'Rpl_semi_sync_master_clients'; +Variable_name Value +Rpl_semi_sync_master_clients 0 +show status like 'Rpl_semi_sync_master_status'; +Variable_name Value +Rpl_semi_sync_master_status OFF +[ on slave ] +show status like 'Rpl_semi_sync_slave_status'; +Variable_name Value +Rpl_semi_sync_slave_status OFF +include/stop_slave.inc +[ on master ] +set sql_log_bin=0; +UNINSTALL PLUGIN rpl_semi_sync_master; +set sql_log_bin=1; +SHOW VARIABLES LIKE 'rpl_semi_sync_master_enabled'; +Variable_name Value +[ on slave ] +SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled'; +Variable_name Value +rpl_semi_sync_slave_enabled ON +include/start_slave.inc +[ on master ] +insert into t1 values (10); +[ on slave ] +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; +Variable_name Value +Rpl_semi_sync_slave_status OFF +# +# Test non-semi-sync slave connect to semi-sync master +# +set sql_log_bin=0; +INSTALL PLUGIN rpl_semi_sync_master SONAME 'libsemisync_master.so'; +set global rpl_semi_sync_master_timeout= 5000; +/* 5s */ +set sql_log_bin=1; +set global rpl_semi_sync_master_enabled= 1; +[ on slave ] +include/stop_slave.inc +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; +Variable_name Value +Rpl_semi_sync_slave_status OFF +[ uninstall semi-sync slave plugin ] +UNINSTALL PLUGIN rpl_semi_sync_slave; +SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled'; +Variable_name Value +include/start_slave.inc +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; +Variable_name Value +include/stop_slave.inc +[ reinstall semi-sync slave plugin and disable semi-sync ] +INSTALL PLUGIN rpl_semi_sync_slave SONAME 'libsemisync_slave.so'; +set global rpl_semi_sync_slave_enabled= 0; +SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled'; +Variable_name Value +rpl_semi_sync_slave_enabled OFF +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; +Variable_name Value +Rpl_semi_sync_slave_status OFF +include/start_slave.inc +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; +Variable_name Value +Rpl_semi_sync_slave_status OFF +# +# Clean up +# +include/stop_slave.inc +UNINSTALL PLUGIN rpl_semi_sync_slave; +UNINSTALL PLUGIN rpl_semi_sync_master; +include/start_slave.inc +drop table t1; +drop user rpl@127.0.0.1; +flush privileges; diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync-master.opt b/mysql-test/suite/rpl/t/rpl_semi_sync-master.opt new file mode 100644 index 00000000000..58029d28ace --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_semi_sync-master.opt @@ -0,0 +1 @@ +$SEMISYNC_PLUGIN_OPT diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync-slave.opt b/mysql-test/suite/rpl/t/rpl_semi_sync-slave.opt new file mode 100644 index 00000000000..58029d28ace --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_semi_sync-slave.opt @@ -0,0 +1 @@ +$SEMISYNC_PLUGIN_OPT diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync.test b/mysql-test/suite/rpl/t/rpl_semi_sync.test new file mode 100644 index 00000000000..9798ffdb642 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_semi_sync.test @@ -0,0 +1,517 @@ +source include/have_semisync_plugin.inc; +source include/not_embedded.inc; +source include/not_windows.inc; +source include/have_innodb.inc; +source include/master-slave.inc; + +let $engine_type= InnoDB; +#let $engine_type= MyISAM; + +# Suppress warnings that might be generated during the test +disable_query_log; +connection master; +call mtr.add_suppression("Timeout waiting for reply of binlog"); +connection slave; +call mtr.add_suppression("Master server does not support"); +# These will be removed after fix bug#45852 +call mtr.add_suppression("Set 'rpl_semi_sync_master_reply_log_file_pos' on master failed"); +call mtr.add_suppression("Slave I/O: Fatal error: Failed to run 'after_queue_event' hook, Error_code: 1593"); +enable_query_log; + +--echo # +--echo # Uninstall semi-sync plugins on master and slave +--echo # +connection slave; +disable_query_log; +source include/stop_slave.inc; +reset slave; +disable_warnings; +error 0,1305; +UNINSTALL PLUGIN rpl_semi_sync_slave; +error 0,1305; +UNINSTALL PLUGIN rpl_semi_sync_master; +enable_warnings; + +connection master; +reset master; +set sql_log_bin=0; +disable_warnings; +error 0,1305; +UNINSTALL PLUGIN rpl_semi_sync_slave; +error 0,1305; +UNINSTALL PLUGIN rpl_semi_sync_master; +enable_warnings; +set sql_log_bin=1; +enable_query_log; + +--echo # +--echo # Main test of semi-sync replication start here +--echo # + +connection master; +echo [ on master ]; + +disable_query_log; +let $value = query_get_value(show variables like 'rpl_semi_sync_master_enabled', Value, 1); +if (`select '$value' = 'No such row'`) +{ + set sql_log_bin=0; + INSTALL PLUGIN rpl_semi_sync_master SONAME 'libsemisync_master.so'; + set global rpl_semi_sync_master_timeout= 5000; /* 5s */ + set sql_log_bin=1; +} +enable_query_log; + +echo [ default state of semi-sync on master should be OFF ]; +show variables like 'rpl_semi_sync_master_enabled'; + +echo [ enable semi-sync on master ]; +set global rpl_semi_sync_master_enabled = 1; +show variables like 'rpl_semi_sync_master_enabled'; + +echo [ status of semi-sync on master should be OFF without any semi-sync slaves ]; +show status like 'Rpl_semi_sync_master_clients'; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_yes_tx'; + +--echo # +--echo # BUG#45672 Semisync repl: ActiveTranx:insert_tranx_node: transaction node allocation failed +--echo # BUG#45673 Semisynch reports correct operation even if no slave is connected +--echo # + +# BUG#45672 When semi-sync is enabled on master, it would allocate +# transaction node even without semi-sync slave connected, and would +# finally result in transaction node allocation error. +# +# Semi-sync master will pre-allocate 'max_connections' transaction +# nodes, so here we do more than that much transactions to check if it +# will fail or not. +# select @@global.max_connections + 1; +let $i= `select @@global.max_connections + 1`; +disable_query_log; +eval create table t1 (a int) engine=$engine_type; +while ($i) +{ + eval insert into t1 values ($i); + dec $i; +} +drop table t1; +enable_query_log; + +# BUG#45673 +echo [ status of semi-sync on master should be OFF ]; +show status like 'Rpl_semi_sync_master_clients'; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_yes_tx'; + +disable_query_log; +# reset master to make sure the following test will start with a clean environment +reset master; +enable_query_log; + +--echo # +--echo # INSTALL PLUGIN semi-sync on slave +--echo # + +connection slave; +echo [ on slave ]; + +disable_query_log; +let $value= query_get_value(show variables like 'rpl_semi_sync_slave_enabled', Value, 1); +if (`select '$value' = 'No such row'`) +{ + set sql_log_bin=0; + INSTALL PLUGIN rpl_semi_sync_slave SONAME 'libsemisync_slave.so'; + set sql_log_bin=1; +} +enable_query_log; + +echo [ default state of semi-sync on slave should be OFF ]; +show variables like 'rpl_semi_sync_slave_enabled'; + +echo [ enable semi-sync on slave ]; +set global rpl_semi_sync_slave_enabled = 1; +show variables like 'rpl_semi_sync_slave_enabled'; +source include/start_slave.inc; + +connection master; +echo [ on master ]; + +# NOTE: Rpl_semi_sync_master_client will only be updated when +# semi-sync slave has started binlog dump request +let $status_var= Rpl_semi_sync_master_clients; +let $status_var_value= 1; +source include/wait_for_status_var.inc; + +echo [ initial master state after the semi-sync slave connected ]; +show status like 'Rpl_semi_sync_master_clients'; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_no_tx'; +show status like 'Rpl_semi_sync_master_yes_tx'; + +replace_result $engine_type ENGINE_TYPE; +eval create table t1(n int) engine = $engine_type; + +echo [ master state after CREATE TABLE statement ]; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_no_tx'; +show status like 'Rpl_semi_sync_master_yes_tx'; + +let $i=300; +echo [ insert records to table ]; +disable_query_log; +while ($i) +{ + eval insert into t1 values ($i); + dec $i; +} +enable_query_log; + +echo [ master status after inserts ]; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_no_tx'; +show status like 'Rpl_semi_sync_master_yes_tx'; + +sync_slave_with_master; +echo [ on slave ]; + +echo [ slave status after replicated inserts ]; +show status like 'Rpl_semi_sync_slave_status'; + +select count(distinct n) from t1; +select min(n) from t1; +select max(n) from t1; + +source include/stop_slave.inc; + +connection master; +echo [ on master ]; + +# The first semi-sync check should be on because after slave stop, +# there are no transactions on the master. +echo [ master status should be ON ]; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_no_tx'; +show status like 'Rpl_semi_sync_master_yes_tx'; +show status like 'Rpl_semi_sync_master_clients'; + +echo [ semi-sync replication of these transactions will fail ]; +insert into t1 values (500); +delete from t1 where n < 500; +insert into t1 values (100); + +# The second semi-sync check should be off because one transaction +# times out during waiting. +echo [ master status should be OFF ]; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_no_tx'; +show status like 'Rpl_semi_sync_master_yes_tx'; + +# Save the master position for later use. +save_master_pos; + +connection slave; +echo [ on slave ]; + +echo [ slave status should be OFF ]; +show status like 'Rpl_semi_sync_slave_status'; +source include/start_slave.inc; +sync_with_master; + +echo [ slave status should be ON ]; +show status like 'Rpl_semi_sync_slave_status'; + +select count(distinct n) from t1; +select min(n) from t1; +select max(n) from t1; + +connection master; +echo [ on master ]; + +echo [ do something to activate semi-sync ]; +drop table t1; + +# The third semi-sync check should be on again. +echo [ master status should be ON again ]; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_no_tx'; +show status like 'Rpl_semi_sync_master_yes_tx'; +show status like 'Rpl_semi_sync_master_clients'; + +sync_slave_with_master; +echo [ on slave ]; + +source include/stop_slave.inc; + +connection master; +echo [ on master ]; + +source include/show_master_logs.inc; +show variables like 'rpl_semi_sync_master_enabled'; + +echo [ disable semi-sync on the fly ]; +set global rpl_semi_sync_master_enabled=0; +show variables like 'rpl_semi_sync_master_enabled'; +show status like 'Rpl_semi_sync_master_status'; + +echo [ enable semi-sync on the fly ]; +set global rpl_semi_sync_master_enabled=1; +show variables like 'rpl_semi_sync_master_enabled'; +show status like 'Rpl_semi_sync_master_status'; + +connection slave; +echo [ on slave ]; + +source include/start_slave.inc; + +connection master; +echo [ on master ]; + +replace_result $engine_type ENGINE_TYPE; +eval create table t1 (a int) engine = $engine_type; +drop table t1; + +##show status like 'Rpl_semi_sync_master_status'; + +sync_slave_with_master; +--replace_column 2 # +show status like 'Rpl_relay%'; + +echo [ test reset master ]; +connection master; +echo [ on master]; + +reset master; + +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_no_tx'; +show status like 'Rpl_semi_sync_master_yes_tx'; + +connection slave; +echo [ on slave ]; + +source include/stop_slave.inc; +reset slave; + +# Kill the dump thread on master for previous slave connection and +# wait for it to exit +connection master; +let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`; +if ($_tid) +{ + disable_query_log; + eval kill query $_tid; + enable_query_log; + + # After dump thread exit, Rpl_semi_sync_master_clients will be 0 + let $status_var= Rpl_semi_sync_master_clients; + let $status_var_value= 0; + source include/wait_for_status_var.inc; +} + +connection slave; +source include/start_slave.inc; + +connection master; +echo [ on master ]; + +# Wait for dump thread to start, Rpl_semi_sync_master_clients will be +# 1 after dump thread started. +let $status_var= Rpl_semi_sync_master_clients; +let $status_var_value= 1; +source include/wait_for_status_var.inc; + +replace_result $engine_type ENGINE_TYPE; +eval create table t1 (a int) engine = $engine_type; +insert into t1 values (1); +insert into t1 values (2), (3); + +sync_slave_with_master; +echo [ on slave ]; + +select * from t1; + +connection master; +echo [ on master ]; + +echo [ master semi-sync status should be ON ]; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_no_tx'; +show status like 'Rpl_semi_sync_master_yes_tx'; + +--echo # +--echo # Start semi-sync replication without SUPER privilege +--echo # +connection slave; +source include/stop_slave.inc; +reset slave; +connection master; +echo [ on master ]; +reset master; + +# Kill the dump thread on master for previous slave connection and wait for it to exit +let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`; +if ($_tid) +{ + disable_query_log; + eval kill query $_tid; + enable_query_log; + + # After dump thread exit, Rpl_semi_sync_master_clients will be 0 + let $status_var= Rpl_semi_sync_master_clients; + let $status_var_value= 0; + source include/wait_for_status_var.inc; +} + +# Do not binlog the following statement because it will generate +# different events for ROW and STATEMENT format +set sql_log_bin=0; +grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; +flush privileges; +set sql_log_bin=1; +connection slave; +echo [ on slave ]; +grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl'; +flush privileges; +change master to master_user='rpl',master_password='rpl'; +source include/start_slave.inc; +show status like 'Rpl_semi_sync_slave_status'; +connection master; +echo [ on master ]; + +# Wait for the semi-sync binlog dump thread to start +let $status_var= Rpl_semi_sync_master_clients; +let $status_var_value= 1; +source include/wait_for_status_var.inc; +echo [ master semi-sync should be ON ]; +show status like 'Rpl_semi_sync_master_clients'; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_no_tx'; +show status like 'Rpl_semi_sync_master_yes_tx'; +insert into t1 values (4); +insert into t1 values (5); +echo [ master semi-sync should be ON ]; +show status like 'Rpl_semi_sync_master_clients'; +show status like 'Rpl_semi_sync_master_status'; +show status like 'Rpl_semi_sync_master_no_tx'; +show status like 'Rpl_semi_sync_master_yes_tx'; + +--echo # +--echo # Test semi-sync slave connect to non-semi-sync master +--echo # + +# Disable semi-sync on master +connection slave; +echo [ on slave ]; +source include/stop_slave.inc; +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; + +connection master; +echo [ on master ]; + +# Kill the dump thread on master for previous slave connection and wait for it to exit +let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`; +if ($_tid) +{ + disable_query_log; + eval kill query $_tid; + enable_query_log; + + # After dump thread exit, Rpl_semi_sync_master_clients will be 0 + let $status_var= Rpl_semi_sync_master_clients; + let $status_var_value= 0; + source include/wait_for_status_var.inc; +} + +echo [ Semi-sync status on master should be ON ]; +show status like 'Rpl_semi_sync_master_clients'; +show status like 'Rpl_semi_sync_master_status'; +set global rpl_semi_sync_master_enabled= 0; + +connection slave; +echo [ on slave ]; +SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled'; +source include/start_slave.inc; +connection master; +echo [ on master ]; +insert into t1 values (8); +echo [ master semi-sync clients should be 0, status should be OFF ]; +show status like 'Rpl_semi_sync_master_clients'; +show status like 'Rpl_semi_sync_master_status'; +sync_slave_with_master; +echo [ on slave ]; +show status like 'Rpl_semi_sync_slave_status'; + +# Uninstall semi-sync plugin on master +connection slave; +source include/stop_slave.inc; +connection master; +echo [ on master ]; +set sql_log_bin=0; +UNINSTALL PLUGIN rpl_semi_sync_master; +set sql_log_bin=1; +enable_query_log; +SHOW VARIABLES LIKE 'rpl_semi_sync_master_enabled'; + +connection slave; +echo [ on slave ]; +SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled'; +source include/start_slave.inc; + +connection master; +echo [ on master ]; +insert into t1 values (10); +sync_slave_with_master; +echo [ on slave ]; +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; + +--echo # +--echo # Test non-semi-sync slave connect to semi-sync master +--echo # + +connection master; +set sql_log_bin=0; +INSTALL PLUGIN rpl_semi_sync_master SONAME 'libsemisync_master.so'; +set global rpl_semi_sync_master_timeout= 5000; /* 5s */ +set sql_log_bin=1; +set global rpl_semi_sync_master_enabled= 1; + +connection slave; +echo [ on slave ]; +source include/stop_slave.inc; +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; + +echo [ uninstall semi-sync slave plugin ]; +UNINSTALL PLUGIN rpl_semi_sync_slave; +SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled'; +source include/start_slave.inc; +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; +source include/stop_slave.inc; + +echo [ reinstall semi-sync slave plugin and disable semi-sync ]; +INSTALL PLUGIN rpl_semi_sync_slave SONAME 'libsemisync_slave.so'; +set global rpl_semi_sync_slave_enabled= 0; +SHOW VARIABLES LIKE 'rpl_semi_sync_slave_enabled'; +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; +source include/start_slave.inc; +SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; + +--echo # +--echo # Clean up +--echo # + +connection slave; +source include/stop_slave.inc; +UNINSTALL PLUGIN rpl_semi_sync_slave; + +connection master; +UNINSTALL PLUGIN rpl_semi_sync_master; + +connection slave; +source include/start_slave.inc; + +connection master; +drop table t1; +drop user rpl@127.0.0.1; +flush privileges; +sync_slave_with_master; -- cgit v1.2.1 From b3886f46da6278b511de9f07cbfa884ef09e18bb Mon Sep 17 00:00:00 2001 From: Guilhem Bichot Date: Wed, 30 Sep 2009 12:25:50 +0200 Subject: Fix for BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL and TIMESTAMP": DECIMAL and TIMESTAMP used to have NUM_FLAG, but NEWDECIMAL was forgotten. It's correct that TIMESTAMP does not have the flag nowadays (manual will be updated, connectors developers will be notified). --- mysql-test/r/bigint.result | 2 +- mysql-test/r/metadata.result | 96 ++++++++++++++++++++++++++++++++++- mysql-test/r/mysqldump.result | 10 ++-- mysql-test/r/ps_2myisam.result | 42 +++++++-------- mysql-test/r/ps_3innodb.result | 42 +++++++-------- mysql-test/r/ps_4heap.result | 42 +++++++-------- mysql-test/r/ps_5merge.result | 84 +++++++++++++++--------------- mysql-test/suite/ndb/r/ps_7ndb.result | 42 +++++++-------- mysql-test/t/metadata.test | 57 +++++++++++++++++++++ 9 files changed, 283 insertions(+), 134 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 7c23f1267c2..6b0954655e9 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -385,7 +385,7 @@ def -((9223372036854775808)) 8 20 20 N 32897 0 63 -9223372036854775808 select -(-(9223372036854775808)); Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def -(-(9223372036854775808)) 246 21 19 N 129 0 63 +def -(-(9223372036854775808)) 246 21 19 N 32897 0 63 -(-(9223372036854775808)) 9223372036854775808 select --9223372036854775808, ---9223372036854775808, ----9223372036854775808; diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result index 6b498e55d85..58dd97ee9f3 100644 --- a/mysql-test/r/metadata.result +++ b/mysql-test/r/metadata.result @@ -2,7 +2,7 @@ drop table if exists t1,t2; select 1, 1.0, -1, "hello", NULL; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def 1 8 1 1 N 32897 0 63 -def 1.0 246 4 3 N 129 1 63 +def 1.0 246 4 3 N 32897 1 63 def -1 8 2 2 N 32897 0 63 def hello 253 5 5 N 1 31 8 def NULL 6 0 0 Y 32896 0 63 @@ -18,7 +18,7 @@ def test t1 t1 d d 3 11 0 Y 32768 0 63 def test t1 t1 e e 8 20 0 Y 32768 0 63 def test t1 t1 f f 4 3 0 Y 32768 2 63 def test t1 t1 g g 5 4 0 Y 32768 3 63 -def test t1 t1 h h 246 7 0 Y 0 4 63 +def test t1 t1 h h 246 7 0 Y 32768 4 63 def test t1 t1 i i 13 4 0 Y 32864 0 63 def test t1 t1 j j 10 10 0 Y 128 0 63 def test t1 t1 k k 7 19 0 N 9441 0 63 @@ -199,3 +199,95 @@ def IFNULL(d, d) IFNULL(d, d) 10 10 10 Y 128 0 63 def LEAST(d, d) LEAST(d, d) 10 10 10 Y 128 0 63 DROP TABLE t1; End of 5.0 tests +create table t1( +# numeric types +bool_col bool, +boolean_col boolean, +bit_col bit(5), +tiny tinyint, +tiny_uns tinyint unsigned, +small smallint, +small_uns smallint unsigned, +medium mediumint, +medium_uns mediumint unsigned, +int_col int, +int_col_uns int unsigned, +big bigint, +big_uns bigint unsigned, +decimal_col decimal(10,5), +# synonyms of DECIMAL +numeric_col numeric(10), +fixed_col fixed(10), +dec_col dec(10), +decimal_col_uns decimal(10,5) unsigned, +fcol float, +fcol_uns float unsigned, +dcol double, +double_precision_col double precision, +dcol_uns double unsigned, +# date/time types +date_col date, +time_col time, +timestamp_col timestamp, +year_col year, +datetime_col datetime, +# string types +char_col char(5), +varchar_col varchar(10), +binary_col binary(10), +varbinary_col varbinary(10), +tinyblob_col tinyblob, +blob_col blob, +mediumblob_col mediumblob, +longblob_col longblob, +text_col text, +mediumtext_col mediumtext, +longtext_col longtext, +enum_col enum("A","B","C"), +set_col set("F","E","D") +); +select * from t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def test t1 t1 bool_col bool_col 1 1 0 Y 32768 0 63 +def test t1 t1 boolean_col boolean_col 1 1 0 Y 32768 0 63 +def test t1 t1 bit_col bit_col 16 5 0 Y 32 0 63 +def test t1 t1 tiny tiny 1 4 0 Y 32768 0 63 +def test t1 t1 tiny_uns tiny_uns 1 3 0 Y 32800 0 63 +def test t1 t1 small small 2 6 0 Y 32768 0 63 +def test t1 t1 small_uns small_uns 2 5 0 Y 32800 0 63 +def test t1 t1 medium medium 9 9 0 Y 32768 0 63 +def test t1 t1 medium_uns medium_uns 9 8 0 Y 32800 0 63 +def test t1 t1 int_col int_col 3 11 0 Y 32768 0 63 +def test t1 t1 int_col_uns int_col_uns 3 10 0 Y 32800 0 63 +def test t1 t1 big big 8 20 0 Y 32768 0 63 +def test t1 t1 big_uns big_uns 8 20 0 Y 32800 0 63 +def test t1 t1 decimal_col decimal_col 246 12 0 Y 32768 5 63 +def test t1 t1 numeric_col numeric_col 246 11 0 Y 32768 0 63 +def test t1 t1 fixed_col fixed_col 246 11 0 Y 32768 0 63 +def test t1 t1 dec_col dec_col 246 11 0 Y 32768 0 63 +def test t1 t1 decimal_col_uns decimal_col_uns 246 11 0 Y 32800 5 63 +def test t1 t1 fcol fcol 4 12 0 Y 32768 31 63 +def test t1 t1 fcol_uns fcol_uns 4 12 0 Y 32800 31 63 +def test t1 t1 dcol dcol 5 22 0 Y 32768 31 63 +def test t1 t1 double_precision_col double_precision_col 5 22 0 Y 32768 31 63 +def test t1 t1 dcol_uns dcol_uns 5 22 0 Y 32800 31 63 +def test t1 t1 date_col date_col 10 10 0 Y 128 0 63 +def test t1 t1 time_col time_col 11 8 0 Y 128 0 63 +def test t1 t1 timestamp_col timestamp_col 7 19 0 N 9441 0 63 +def test t1 t1 year_col year_col 13 4 0 Y 32864 0 63 +def test t1 t1 datetime_col datetime_col 12 19 0 Y 128 0 63 +def test t1 t1 char_col char_col 254 5 0 Y 0 0 8 +def test t1 t1 varchar_col varchar_col 253 10 0 Y 0 0 8 +def test t1 t1 binary_col binary_col 254 10 0 Y 128 0 63 +def test t1 t1 varbinary_col varbinary_col 253 10 0 Y 128 0 63 +def test t1 t1 tinyblob_col tinyblob_col 252 255 0 Y 144 0 63 +def test t1 t1 blob_col blob_col 252 65535 0 Y 144 0 63 +def test t1 t1 mediumblob_col mediumblob_col 252 16777215 0 Y 144 0 63 +def test t1 t1 longblob_col longblob_col 252 4294967295 0 Y 144 0 63 +def test t1 t1 text_col text_col 252 65535 0 Y 16 0 8 +def test t1 t1 mediumtext_col mediumtext_col 252 16777215 0 Y 16 0 8 +def test t1 t1 longtext_col longtext_col 252 4294967295 0 Y 16 0 8 +def test t1 t1 enum_col enum_col 254 1 0 Y 256 0 8 +def test t1 t1 set_col set_col 254 5 0 Y 2048 0 8 +bool_col boolean_col bit_col tiny tiny_uns small small_uns medium medium_uns int_col int_col_uns big big_uns decimal_col numeric_col fixed_col dec_col decimal_col_uns fcol fcol_uns dcol double_precision_col dcol_uns date_col time_col timestamp_col year_col datetime_col char_col varchar_col binary_col varbinary_col tinyblob_col blob_col mediumblob_col longblob_col text_col mediumtext_col longtext_col enum_col set_col +drop table t1; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 8162e1aca05..e4889b86987 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -40,7 +40,7 @@ CREATE TABLE `t1` ( `a` decimal(64,20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000'); +INSERT INTO `t1` VALUES (1234567890123456789012345678901234567890.00000000000000000000),(987654321098765432109876543210987654321.00000000000000000000); DROP TABLE t1; # # Bug#2055 mysqldump should replace "-inf" numeric field values with "NULL" @@ -77,7 +77,7 @@ CREATE TABLE `t1` ( `b` float DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456); +INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456); /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -85,7 +85,7 @@ CREATE TABLE `t1` ( `b` float DEFAULT NULL ); /*!40101 SET character_set_client = @saved_cs_client */; -INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456); +INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -108,7 +108,7 @@ CREATE TABLE `t1` ( LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; -INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456); +INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456); /*!40000 ALTER TABLE `t1` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -135,7 +135,7 @@ CREATE TABLE `t1` ( ); /*!40101 SET character_set_client = @saved_cs_client */; -INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456); +INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456); /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index a91d13d11a1..c51863b73f7 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -59,8 +59,8 @@ 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 c11 c11 246 9 6 Y 32768 4 63 +def test t9 t9 c12 c12 246 10 6 Y 32768 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 9441 0 63 @@ -1807,8 +1807,8 @@ 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 const02 const02 246 4 3 N 32769 1 63 +def test t5 t5 param02 param02 246 67 32 Y 32768 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 @@ -1829,7 +1829,7 @@ 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 param13 param13 246 67 0 Y 32768 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 @@ -1927,8 +1927,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -1974,8 +1974,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2024,8 +2024,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2064,8 +2064,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2112,8 +2112,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2156,8 +2156,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2202,8 +2202,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2240,8 +2240,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 50c94d6cc4e..2670451f24e 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -59,8 +59,8 @@ 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 c11 c11 246 9 6 Y 32768 4 63 +def test t9 t9 c12 c12 246 10 6 Y 32768 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 9441 0 63 @@ -1790,8 +1790,8 @@ 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 const02 const02 246 4 3 N 32769 1 63 +def test t5 t5 param02 param02 246 67 32 Y 32768 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 @@ -1812,7 +1812,7 @@ 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 param13 param13 246 67 0 Y 32768 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 @@ -1910,8 +1910,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -1957,8 +1957,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2007,8 +2007,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2047,8 +2047,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2095,8 +2095,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2139,8 +2139,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2185,8 +2185,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2223,8 +2223,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index a85809d3800..4372c470b2d 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -60,8 +60,8 @@ 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 c11 c11 246 9 6 Y 32768 4 63 +def test t9 t9 c12 c12 246 10 6 Y 32768 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 9441 0 63 @@ -1791,8 +1791,8 @@ 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 const02 const02 246 4 3 N 32769 1 63 +def test t5 t5 param02 param02 246 67 32 Y 32768 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 @@ -1813,7 +1813,7 @@ 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 param13 param13 246 67 0 Y 32768 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 @@ -1911,8 +1911,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -1958,8 +1958,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2008,8 +2008,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2048,8 +2048,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2096,8 +2096,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2140,8 +2140,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2186,8 +2186,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2224,8 +2224,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index fd1b69c0ffd..35a43f7c032 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -102,8 +102,8 @@ 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 c11 c11 246 9 6 Y 32768 4 63 +def test t9 t9 c12 c12 246 10 6 Y 32768 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 9441 0 63 @@ -1727,8 +1727,8 @@ 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 const02 const02 246 4 3 N 32769 1 63 +def test t5 t5 param02 param02 246 67 32 Y 32768 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 @@ -1749,7 +1749,7 @@ 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 param13 param13 246 67 0 Y 32768 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 @@ -1847,8 +1847,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -1894,8 +1894,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -1944,8 +1944,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -1984,8 +1984,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2032,8 +2032,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2076,8 +2076,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2122,8 +2122,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2160,8 +2160,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -3124,8 +3124,8 @@ 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 c11 c11 246 9 6 Y 32768 4 63 +def test t9 t9 c12 c12 246 10 6 Y 32768 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 9441 0 63 @@ -4749,8 +4749,8 @@ 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 const02 const02 246 4 3 N 32769 1 63 +def test t5 t5 param02 param02 246 67 32 Y 32768 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 @@ -4771,7 +4771,7 @@ 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 param13 param13 246 67 0 Y 32768 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 @@ -4869,8 +4869,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -4916,8 +4916,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -4966,8 +4966,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -5006,8 +5006,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -5054,8 +5054,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -5098,8 +5098,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -5144,8 +5144,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -5182,8 +5182,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 diff --git a/mysql-test/suite/ndb/r/ps_7ndb.result b/mysql-test/suite/ndb/r/ps_7ndb.result index 73a2e0c1dda..e57fdcb6df6 100644 --- a/mysql-test/suite/ndb/r/ps_7ndb.result +++ b/mysql-test/suite/ndb/r/ps_7ndb.result @@ -59,8 +59,8 @@ 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 c11 c11 246 9 6 Y 32768 4 63 +def test t9 t9 c12 c12 246 10 6 Y 32768 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 9441 0 63 @@ -1790,8 +1790,8 @@ 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 const02 const02 246 4 3 N 32769 1 63 +def test t5 t5 param02 param02 246 67 32 Y 32768 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 @@ -1812,7 +1812,7 @@ 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 param13 param13 246 67 0 Y 32768 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 @@ -1910,8 +1910,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -1957,8 +1957,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2007,8 +2007,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2047,8 +2047,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2095,8 +2095,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2139,8 +2139,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 @@ -2185,8 +2185,8 @@ 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 @arg11 246 83 6 Y 32896 30 63 +def @arg12 246 83 6 Y 32896 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 @@ -2223,8 +2223,8 @@ 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 @arg11 246 83 0 Y 32896 30 63 +def @arg12 246 83 0 Y 32896 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 diff --git a/mysql-test/t/metadata.test b/mysql-test/t/metadata.test index a10767579fb..a42dcfd618d 100644 --- a/mysql-test/t/metadata.test +++ b/mysql-test/t/metadata.test @@ -130,3 +130,60 @@ SELECT COALESCE(d, d), IFNULL(d, d), IF(i, d, d), DROP TABLE t1; --echo End of 5.0 tests + +# Verify that column metadata is correct for all possible data types. +# Originally about BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL" + +create table t1( +# numeric types +bool_col bool, +boolean_col boolean, +bit_col bit(5), +tiny tinyint, +tiny_uns tinyint unsigned, +small smallint, +small_uns smallint unsigned, +medium mediumint, +medium_uns mediumint unsigned, +int_col int, +int_col_uns int unsigned, +big bigint, +big_uns bigint unsigned, +decimal_col decimal(10,5), +# synonyms of DECIMAL +numeric_col numeric(10), +fixed_col fixed(10), +dec_col dec(10), +decimal_col_uns decimal(10,5) unsigned, +fcol float, +fcol_uns float unsigned, +dcol double, +double_precision_col double precision, +dcol_uns double unsigned, +# date/time types +date_col date, +time_col time, +timestamp_col timestamp, +year_col year, +datetime_col datetime, +# string types +char_col char(5), +varchar_col varchar(10), +binary_col binary(10), +varbinary_col varbinary(10), +tinyblob_col tinyblob, +blob_col blob, +mediumblob_col mediumblob, +longblob_col longblob, +text_col text, +mediumtext_col mediumtext, +longtext_col longtext, +enum_col enum("A","B","C"), +set_col set("F","E","D") +); + +--enable_metadata +select * from t1; +--disable_metadata + +drop table t1; -- cgit v1.2.1 From 1e87babb1914c288df06a2dd9c8c4e96c70380df Mon Sep 17 00:00:00 2001 From: Ingo Struewing Date: Wed, 30 Sep 2009 12:28:15 +0200 Subject: Bug#37267 - connect() EINPROGRESS failures mishandled in client library We cann connect() in a non-blocking mode to be able to specify a non-standard timeout. The problem was that we did not fetch the status from the non-blocking connect(). We assumed that poll() would not return a POLLIN flag if the connect failed. But on some platforms this is not true. After a successful poll() we do now retrieve the status value from connect() with getsockopt(...SO_ERROR...). Now we do know if (and how) the connect failed. The test case for my investigation was rpl.rlp_ssl1 on an Ubuntu 9.04 x86_64 machine. Both, IPV4 and IPV6 were active. 'localhost' resolved first for IPV6 and then for IPV4. The connection over IPV6 was blocked. rpl.rlp_ssl1 timed out as it did not notice the failed connect(). The first read() failed, which was interpreted as a master crash and the connection was tried to reestablish with the same result until the retry limit was reached. With the fix, the connect() problem is immediately recognized, and the connect() is retried on the second resolution for 'localhost', which is successful. --- mysql-test/include/wait_for_slave_param.inc | 4 +++- mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/wait_for_slave_param.inc b/mysql-test/include/wait_for_slave_param.inc index 82e57922913..1e690bdfe9c 100644 --- a/mysql-test/include/wait_for_slave_param.inc +++ b/mysql-test/include/wait_for_slave_param.inc @@ -49,6 +49,8 @@ if (!$_slave_timeout_counter) { let $_slave_timeout_counter= 3000; } +# Save resulting counter for later use. +let $slave_tcnt= $_slave_timeout_counter; let $_slave_param_comparison= $slave_param_comparison; if (`SELECT '$_slave_param_comparison' = ''`) @@ -70,7 +72,7 @@ while (`SELECT NOT('$_show_slave_status_value' $_slave_param_comparison '$slave_ # This has to be outside the loop until BUG#41913 has been fixed if (!$_slave_timeout_counter) { - --echo **** ERROR: timeout after $slave_timeout seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value **** + --echo **** ERROR: timeout after $slave_tcnt deci-seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value **** if (`SELECT '$slave_error_message' != ''`) { --echo Message: $slave_error_message diff --git a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result index 99a0fd21f66..3321b9b4969 100644 --- a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result +++ b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result @@ -18,7 +18,7 @@ start slave; SELECT RELEASE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP"); RELEASE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP") 1 -Slave_IO_Errno= 2013 +Slave_IO_Errno= 2003 SELECT IS_FREE_LOCK("debug_lock.before_get_SERVER_ID"); IS_FREE_LOCK("debug_lock.before_get_SERVER_ID") 1 @@ -31,7 +31,7 @@ start slave; SELECT RELEASE_LOCK("debug_lock.before_get_SERVER_ID"); RELEASE_LOCK("debug_lock.before_get_SERVER_ID") 1 -Slave_IO_Errno= 2013 +Slave_IO_Errno= 2003 set global debug= ''; reset master; include/stop_slave.inc -- cgit v1.2.1 From 47599b5db2e7bab305d0ee29ffc7774bb7714ff9 Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Wed, 30 Sep 2009 15:17:15 +0100 Subject: Post-fix for BUG#43789 NOTE: Backporting the patch to next-mr. --- mysql-test/collections/default.experimental | 1 + mysql-test/extra/rpl_tests/rpl_not_null.test | 36 +++++++++++------------ mysql-test/suite/rpl/r/rpl_not_null_innodb.result | 24 +++++++-------- mysql-test/suite/rpl/r/rpl_not_null_myisam.result | 24 +++++++-------- 4 files changed, 43 insertions(+), 42 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 416bf7d9e67..dc51d0cc697 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -6,3 +6,4 @@ rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails rpl_ndb.rpl_ndb_log # Bug#38998 rpl.rpl_innodb_bug28430* @solaris # Bug#46029 rpl.rpl_get_master_version_and_clock* # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31 +rpl_ndb.rpl_ndb_extraCol* # BUG#41369 2008-12-10 alik, BUG#47741 2009-09-30 alfranio diff --git a/mysql-test/extra/rpl_tests/rpl_not_null.test b/mysql-test/extra/rpl_tests/rpl_not_null.test index 88f37f9a95e..58dbd9ce29f 100644 --- a/mysql-test/extra/rpl_tests/rpl_not_null.test +++ b/mysql-test/extra/rpl_tests/rpl_not_null.test @@ -81,13 +81,13 @@ source include/diff_tables.inc; --echo TABLES t2 and t3 must be different. connection master; -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; connection slave; -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; connection master; -SELECT * FROM t4; +SELECT * FROM t4 ORDER BY a; connection slave; -SELECT * FROM t4; +SELECT * FROM t4 ORDER BY a; --echo ************* EXECUTION WITH UPDATES and REPLACES ************* connection master; @@ -139,9 +139,9 @@ INSERT INTO t1(a) VALUES (5); --echo TABLES t1 and t2 must be different. sync_slave_with_master; connection master; -SELECT a,b+0,c+0 FROM t1; +SELECT a,b+0,c+0 FROM t1 ORDER BY a; connection slave; -SELECT a,b+0,c+0 FROM t1; +SELECT a,b+0,c+0 FROM t1 ORDER BY a; --echo ************* EXECUTION WITH UPDATES and REPLACES ************* connection master; @@ -262,17 +262,17 @@ sync_slave_with_master; # connection slave; # --source include/wait_for_slave_sql_to_stop.inc # connection master; -# SELECT * FROM t1; +# SELECT * FROM t1 ORDER BY a; # connection slave; -# SELECT * FROM t1; +# SELECT * FROM t1 ORDER BY a; # connection master; -# SELECT * FROM t2; +# SELECT * FROM t2 ORDER BY a; # connection slave; -# SELECT * FROM t2; +# SELECT * FROM t2 ORDER BY a; # connection master; -# SELECT * FROM t3; +# SELECT * FROM t3 ORDER BY a; # connection slave; -# SELECT * FROM t3; +# SELECT * FROM t3 ORDER BY a; # --source include/reset_master_and_slave.inc # # connection master; @@ -343,17 +343,17 @@ connection master; sync_slave_with_master; connection master; -SELECT * FROM t1; +SELECT * FROM t1 ORDER BY a; connection slave; -SELECT * FROM t1; +SELECT * FROM t1 ORDER BY a; connection master; -SELECT * FROM t2; +SELECT * FROM t2 ORDER BY a; connection slave; -SELECT * FROM t2; +SELECT * FROM t2 ORDER BY a; connection master; -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; connection slave; -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; connection master; diff --git a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result index 7717beb0a47..b09fbab905a 100644 --- a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result @@ -48,24 +48,24 @@ TABLES t1 and t2 must be equal otherwise an error will be thrown. Comparing tables master:test.t1 and slave:test.t1 Comparing tables master:test.t2 and slave:test.t2 TABLES t2 and t3 must be different. -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; a b 1 NULL 2 1111-11-11 3 NULL -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; a b c 1 NULL 500 2 1111-11-11 500 3 NULL 500 -SELECT * FROM t4; +SELECT * FROM t4 ORDER BY a; a b c 1 NULL 1 2 1111-11-11 2 3 NULL NULL 4 NULL 4 5 NULL NULL -SELECT * FROM t4; +SELECT * FROM t4 ORDER BY a; a b 1 NULL 2 1111-11-11 @@ -100,14 +100,14 @@ INSERT INTO t1(a,c) VALUES (4, b'01'); INSERT INTO t1(a) VALUES (5); ************* SHOWING THE RESULT SETS WITH INSERTS ************* TABLES t1 and t2 must be different. -SELECT a,b+0,c+0 FROM t1; +SELECT a,b+0,c+0 FROM t1 ORDER BY a; a b+0 c+0 1 NULL 1 2 0 1 3 NULL NULL 4 NULL 1 5 NULL NULL -SELECT a,b+0,c+0 FROM t1; +SELECT a,b+0,c+0 FROM t1 ORDER BY a; a b+0 c+0 1 NULL 1 2 0 1 @@ -163,34 +163,34 @@ REPLACE INTO t3(a, b) VALUES (5, null); REPLACE INTO t3(a, b) VALUES (3, null); UPDATE t3 SET b = NULL where a = 4; ************* SHOWING THE RESULT SETS ************* -SELECT * FROM t1; +SELECT * FROM t1 ORDER BY a; a b 1 NULL 2 NULL 3 1 -SELECT * FROM t1; +SELECT * FROM t1 ORDER BY a; a b c 1 0 0 2 0 0 3 1 0 -SELECT * FROM t2; +SELECT * FROM t2 ORDER BY a; a b 1 NULL 2 NULL 3 1 -SELECT * FROM t2; +SELECT * FROM t2 ORDER BY a; a b c 1 0 NULL 2 0 NULL 3 1 NULL -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; a b 1 NULL 2 NULL 3 NULL 4 NULL 5 NULL -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; a b c 1 0 500 2 0 500 diff --git a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result index 57a015367bb..09611dc6480 100644 --- a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result @@ -48,24 +48,24 @@ TABLES t1 and t2 must be equal otherwise an error will be thrown. Comparing tables master:test.t1 and slave:test.t1 Comparing tables master:test.t2 and slave:test.t2 TABLES t2 and t3 must be different. -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; a b 1 NULL 2 1111-11-11 3 NULL -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; a b c 1 NULL 500 2 1111-11-11 500 3 NULL 500 -SELECT * FROM t4; +SELECT * FROM t4 ORDER BY a; a b c 1 NULL 1 2 1111-11-11 2 3 NULL NULL 4 NULL 4 5 NULL NULL -SELECT * FROM t4; +SELECT * FROM t4 ORDER BY a; a b 1 NULL 2 1111-11-11 @@ -100,14 +100,14 @@ INSERT INTO t1(a,c) VALUES (4, b'01'); INSERT INTO t1(a) VALUES (5); ************* SHOWING THE RESULT SETS WITH INSERTS ************* TABLES t1 and t2 must be different. -SELECT a,b+0,c+0 FROM t1; +SELECT a,b+0,c+0 FROM t1 ORDER BY a; a b+0 c+0 1 NULL 1 2 0 1 3 NULL NULL 4 NULL 1 5 NULL NULL -SELECT a,b+0,c+0 FROM t1; +SELECT a,b+0,c+0 FROM t1 ORDER BY a; a b+0 c+0 1 NULL 1 2 0 1 @@ -163,34 +163,34 @@ REPLACE INTO t3(a, b) VALUES (5, null); REPLACE INTO t3(a, b) VALUES (3, null); UPDATE t3 SET b = NULL where a = 4; ************* SHOWING THE RESULT SETS ************* -SELECT * FROM t1; +SELECT * FROM t1 ORDER BY a; a b 1 NULL 2 NULL 3 1 -SELECT * FROM t1; +SELECT * FROM t1 ORDER BY a; a b c 1 0 0 2 0 0 3 1 0 -SELECT * FROM t2; +SELECT * FROM t2 ORDER BY a; a b 1 NULL 2 NULL 3 1 -SELECT * FROM t2; +SELECT * FROM t2 ORDER BY a; a b c 1 0 NULL 2 0 NULL 3 1 NULL -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; a b 1 NULL 2 NULL 3 NULL 4 NULL 5 NULL -SELECT * FROM t3; +SELECT * FROM t3 ORDER BY a; a b c 1 0 500 2 0 500 -- cgit v1.2.1 From 2108eea5624b2dcc1cfebc38e86b9585cf4893ff Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Wed, 30 Sep 2009 16:25:01 +0100 Subject: BUG#47741 rpl_ndb_extraCol fails in next-mr (mysql-5.1-rep+2) in RBR This is a temporary fix. NOTE: Backporting the patch to next-mr. --- mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test | 77 +++++++++++----------- mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result | 56 ---------------- 2 files changed, 40 insertions(+), 93 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test index 1eaefa661f9..46168d6b97a 100644 --- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test +++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test @@ -410,51 +410,54 @@ sync_slave_with_master; ############################################################### # Error reaction is up to sql_mode of the slave sql (bug#38173) #--echo *** Create t9 on slave *** -STOP SLAVE; -RESET SLAVE; -eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), - d TIMESTAMP, - e INT NOT NULL, - f text not null, - g text, - h blob not null, - i blob) ENGINE=$engine_type; - ---echo *** Create t9 on Master *** -connection master; -eval CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +# Please, check BUG#47741 to see why you are not testing NDB. +if (`SELECT $engine_type != 'NDB'`) +{ + STOP SLAVE; + RESET SLAVE; + eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), + d TIMESTAMP, + e INT NOT NULL, + f text not null, + g text, + h blob not null, + i blob) ENGINE=$engine_type; + + --echo *** Create t9 on Master *** + connection master; + eval CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) ) ENGINE=$engine_type; -RESET MASTER; + RESET MASTER; ---echo *** Start Slave *** -connection slave; -START SLAVE; + --echo *** Start Slave *** + connection slave; + START SLAVE; ---echo *** Master Data Insert *** -connection master; -set @b1 = 'b1b1b1b1'; -set @b1 = concat(@b1,@b1); -INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); + --echo *** Master Data Insert *** + connection master; + set @b1 = 'b1b1b1b1'; -# the test would stop slave if @@sql_mode for the sql thread -# was set to strict. Otherwise, as with this tests setup, -# the implicit defaults will be inserted into fields even though -# they are declared without DEFAULT clause. + set @b1 = concat(@b1,@b1); + INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -sync_slave_with_master; -select * from t9; + # the test would stop slave if @@sql_mode for the sql thread + # was set to strict. Otherwise, as with this tests setup, + # the implicit defaults will be inserted into fields even though + # they are declared without DEFAULT clause. -# todo: fix Bug #43992 slave sql thread can't tune own sql_mode ... -# and add/restore waiting for stop test - -#--source include/wait_for_slave_sql_to_stop.inc -#--replace_result $MASTER_MYPORT MASTER_PORT -#--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # -#--query_vertical SHOW SLAVE STATUS -#SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -#START SLAVE; + sync_slave_with_master; + select * from t9; + # todo: fix Bug #43992 slave sql thread can't tune own sql_mode ... + # and add/restore waiting for stop test + #--source include/wait_for_slave_sql_to_stop.inc + #--replace_result $MASTER_MYPORT MASTER_PORT + #--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # + #--query_vertical SHOW SLAVE STATUS + #SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; + #START SLAVE; +} #--echo *** Drop t9 *** #connection master; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result index f812509de6f..f514bf7a75b 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result @@ -400,62 +400,6 @@ set @b1 = concat(@b1,@b1); INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); *** Drop t8 *** DROP TABLE t8; -STOP SLAVE; -RESET SLAVE; -CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), -d TIMESTAMP, -e INT NOT NULL) ENGINE='NDB'; -*** Create t9 on Master *** -CREATE TABLE t9 (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 t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -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 1364 -Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 447 -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 1364 -Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 447 -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -START SLAVE; *** Create t10 on slave *** STOP SLAVE; RESET SLAVE; -- cgit v1.2.1 From 9581d6280e4261c6246f53d44a7357a96e98c19e Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Wed, 30 Sep 2009 17:42:25 +0100 Subject: BUG#47749: rpl_slave_skip fails sporadically on PB2 (mysql-5.1-rep+2 tree). rpl_slave_skip fails randomly on PB2. This patch fixes the failure by setting explicit wait for SQL thread to stop, instead of the wait_for_slave_to_stop mysqltest command, after a start until command is executed. --- mysql-test/suite/rpl/t/rpl_slave_skip.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test index f4cb0f69e93..6336e775af1 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_skip.test +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test @@ -27,7 +27,7 @@ connection slave; # Stop when reaching the the first table map event. START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762; -wait_for_slave_to_stop; +-- source include/wait_for_slave_sql_to_stop.inc --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 # query_vertical SHOW SLAVE STATUS; @@ -59,7 +59,7 @@ 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; +-- source include/wait_for_slave_sql_to_stop.inc SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; sync_with_master; -- cgit v1.2.1 From 266d53b5d24a18ef1e8b696feee6fc8953bbec44 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Thu, 1 Oct 2009 00:32:15 +0100 Subject: Partial backport for BUG#41399, more precisely, the changes to wait_until_disconnected.inc. --- mysql-test/include/wait_until_disconnected.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/include/wait_until_disconnected.inc b/mysql-test/include/wait_until_disconnected.inc index a4362e52d01..8a989becc18 100644 --- a/mysql-test/include/wait_until_disconnected.inc +++ b/mysql-test/include/wait_until_disconnected.inc @@ -7,7 +7,7 @@ let $counter= 500; let $mysql_errno= 0; while (!$mysql_errno) { - --error 0,1053,2002,2006,2013 + --error 0,1040,1053,2002,2003,2006,2013 show status; dec $counter; -- cgit v1.2.1 From 1fe164a20e9f8e358f21272f429f5f374f7ec9b2 Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Thu, 1 Oct 2009 15:04:42 +0200 Subject: Changed all no_ to num_ to avoid strange names like no_list_values which is not expected to be number of list values, rather a boolea indicating no list values --- mysql-test/r/partition_column.result | 29 +++++++++++++++++++++++++++++ mysql-test/t/partition_column.test | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result index 5c6464b271d..0aaa4e78f68 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -1,4 +1,33 @@ drop table if exists t1; +create table t1 (a int) +partition by list (a) +( partition p0 values in (1), +partition p1 values in (1)); +ERROR HY000: Multiple definition of same constant in list partitioning +create table t1 (a int) +partition by list (a) +( partition p0 values in (2, 1), +partition p1 values in (4, NULL, 3)); +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +insert into t1 values (4); +insert into t1 values (NULL); +insert into t1 values (5); +ERROR HY000: Table has no partition for value 5 +drop table t1; +create table t1 (a int) +partition by list column_list(a) +( partition p0 values in (column_list(2), column_list(1)), +partition p1 values in (column_list(4), column_list(NULL), column_list(3))); +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +insert into t1 values (4); +insert into t1 values (NULL); +insert into t1 values (5); +ERROR HY000: Table has no partition for value from column_list +drop table t1; create table t1 (a int, b char(10), c varchar(25), d datetime) partition by range column_list(a,b,c,d) subpartition by hash (to_seconds(d)) diff --git a/mysql-test/t/partition_column.test b/mysql-test/t/partition_column.test index b1f5f4abfcf..f551b58119e 100644 --- a/mysql-test/t/partition_column.test +++ b/mysql-test/t/partition_column.test @@ -8,6 +8,38 @@ drop table if exists t1; --enable_warnings +--error ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR +create table t1 (a int) +partition by list (a) +( partition p0 values in (1), + partition p1 values in (1)); + +create table t1 (a int) +partition by list (a) +( partition p0 values in (2, 1), + partition p1 values in (4, NULL, 3)); +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +insert into t1 values (4); +insert into t1 values (NULL); +--error ER_NO_PARTITION_FOR_GIVEN_VALUE +insert into t1 values (5); +drop table t1; + +create table t1 (a int) +partition by list column_list(a) +( partition p0 values in (column_list(2), column_list(1)), + partition p1 values in (column_list(4), column_list(NULL), column_list(3))); +insert into t1 values (1); +insert into t1 values (2); +insert into t1 values (3); +insert into t1 values (4); +insert into t1 values (NULL); +--error ER_NO_PARTITION_FOR_GIVEN_VALUE +insert into t1 values (5); +drop table t1; + create table t1 (a int, b char(10), c varchar(25), d datetime) partition by range column_list(a,b,c,d) subpartition by hash (to_seconds(d)) -- cgit v1.2.1 From 226171ab110bdb9b36255a80b2e8488c543037d1 Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Thu, 1 Oct 2009 16:50:11 +0200 Subject: Added more test cases --- mysql-test/r/partition_column.result | 40 ++++++++++++++++++++++++++++++++++++ mysql-test/t/partition_column.test | 19 +++++++++++++++++ 2 files changed, 59 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result index 0aaa4e78f68..66308321a95 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -1,4 +1,36 @@ drop table if exists t1; +create table t1 (a int, b int) +partition by list column_list(a,b) +( partition p0 values in (column_list(1, NULL), column_list(2, NULL), +column_list(NULL, NULL)), +partition p1 values in (column_list(1,1), column_list(2,2)), +partition p2 values in (column_list(3, NULL), column_list(NULL, 1))); +insert into t1 values (3, NULL); +insert into t1 values (NULL, 1); +insert into t1 values (NULL, NULL); +insert into t1 values (1, NULL); +insert into t1 values (2, NULL); +insert into t1 values (1,1); +insert into t1 values (2,2); +select * from t1 where a = 1; +a b +1 NULL +1 1 +select * from t1 where a = 2; +a b +2 NULL +2 2 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY LIST COLUMN_LIST(a,b) +(PARTITION p0 VALUES IN ( COLUMN_LIST(1,NULL), COLUMN_LIST(2,NULL), COLUMN_LIST(NULL,NULL)) ENGINE = MyISAM, + PARTITION p1 VALUES IN ( COLUMN_LIST(1,1), COLUMN_LIST(2,2)) ENGINE = MyISAM, + PARTITION p2 VALUES IN ( COLUMN_LIST(3,NULL), COLUMN_LIST(NULL,1)) ENGINE = MyISAM) */ +drop table t1; create table t1 (a int) partition by list (a) ( partition p0 values in (1), @@ -27,6 +59,14 @@ insert into t1 values (4); insert into t1 values (NULL); insert into t1 values (5); ERROR HY000: Table has no partition for value from column_list +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY LIST COLUMN_LIST(a) +(PARTITION p0 VALUES IN ( COLUMN_LIST(2), COLUMN_LIST(1)) ENGINE = MyISAM, + PARTITION p1 VALUES IN ( COLUMN_LIST(4), COLUMN_LIST(NULL), COLUMN_LIST(3)) ENGINE = MyISAM) */ drop table t1; create table t1 (a int, b char(10), c varchar(25), d datetime) partition by range column_list(a,b,c,d) diff --git a/mysql-test/t/partition_column.test b/mysql-test/t/partition_column.test index f551b58119e..ff625acdb1d 100644 --- a/mysql-test/t/partition_column.test +++ b/mysql-test/t/partition_column.test @@ -8,6 +8,24 @@ drop table if exists t1; --enable_warnings +create table t1 (a int, b int) +partition by list column_list(a,b) +( partition p0 values in (column_list(1, NULL), column_list(2, NULL), + column_list(NULL, NULL)), + partition p1 values in (column_list(1,1), column_list(2,2)), + partition p2 values in (column_list(3, NULL), column_list(NULL, 1))); +insert into t1 values (3, NULL); +insert into t1 values (NULL, 1); +insert into t1 values (NULL, NULL); +insert into t1 values (1, NULL); +insert into t1 values (2, NULL); +insert into t1 values (1,1); +insert into t1 values (2,2); +select * from t1 where a = 1; +select * from t1 where a = 2; +show create table t1; +drop table t1; + --error ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR create table t1 (a int) partition by list (a) @@ -38,6 +56,7 @@ insert into t1 values (4); insert into t1 values (NULL); --error ER_NO_PARTITION_FOR_GIVEN_VALUE insert into t1 values (5); +show create table t1; drop table t1; create table t1 (a int, b char(10), c varchar(25), d datetime) -- cgit v1.2.1 From f68119a74541479ec38164be788dbc7ace664564 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Thu, 1 Oct 2009 19:44:53 +0300 Subject: backporting bug@27808 fixes --- mysql-test/include/master-slave.inc | 2 + mysql-test/r/ctype_cp932_binlog_stm.result | 14 +- mysql-test/r/flush_block_commit_notembedded.result | 4 +- mysql-test/r/multi_update.result | 4 +- mysql-test/r/outfile_loaddata.result | 20 +- mysql-test/r/strict.result | 2 +- mysql-test/suite/binlog/r/binlog_row_binlog.result | 37 +- mysql-test/suite/binlog/r/binlog_stm_binlog.result | 844 ++++++++++----------- mysql-test/suite/binlog/t/binlog_incident.test | 4 +- mysql-test/suite/rpl/r/rpl_000015.result | 6 + mysql-test/suite/rpl/r/rpl_bug33931.result | 2 + mysql-test/suite/rpl/r/rpl_change_master.result | 4 + mysql-test/suite/rpl/r/rpl_deadlock_innodb.result | 6 + mysql-test/suite/rpl/r/rpl_extraCol_innodb.result | 20 + mysql-test/suite/rpl/r/rpl_extraCol_myisam.result | 20 + .../suite/rpl/r/rpl_extraColmaster_innodb.result | 42 + .../suite/rpl/r/rpl_extraColmaster_myisam.result | 42 + mysql-test/suite/rpl/r/rpl_flushlog_loop.result | 2 + mysql-test/suite/rpl/r/rpl_grant.result | 2 + mysql-test/suite/rpl/r/rpl_heartbeat.result | 4 + mysql-test/suite/rpl/r/rpl_incident.result | 4 + .../suite/rpl/r/rpl_known_bugs_detection.result | 4 + mysql-test/suite/rpl/r/rpl_loaddata.result | 6 + mysql-test/suite/rpl/r/rpl_loaddata_fatal.result | 4 + mysql-test/suite/rpl/r/rpl_log_pos.result | 4 + mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result | 2 + mysql-test/suite/rpl/r/rpl_replicate_do.result | 2 + mysql-test/suite/rpl/r/rpl_rotate_logs.result | 6 + mysql-test/suite/rpl/r/rpl_row_colSize.result | 26 + mysql-test/suite/rpl/r/rpl_row_log.result | 2 + mysql-test/suite/rpl/r/rpl_row_log_innodb.result | 2 + .../suite/rpl/r/rpl_row_max_relay_size.result | 12 + mysql-test/suite/rpl/r/rpl_row_reset_slave.result | 8 + .../suite/rpl/r/rpl_row_tabledefs_2myisam.result | 12 + .../suite/rpl/r/rpl_row_tabledefs_3innodb.result | 12 + mysql-test/suite/rpl/r/rpl_row_until.result | 8 + mysql-test/suite/rpl/r/rpl_skip_error.result | 4 + .../rpl/r/rpl_slave_load_remove_tmpfile.result | 2 + mysql-test/suite/rpl/r/rpl_slave_skip.result | 4 + mysql-test/suite/rpl/r/rpl_ssl.result | 4 + mysql-test/suite/rpl/r/rpl_ssl1.result | 6 + mysql-test/suite/rpl/r/rpl_stm_log.result | 2 + .../suite/rpl/r/rpl_stm_max_relay_size.result | 12 + mysql-test/suite/rpl/r/rpl_stm_reset_slave.result | 8 + mysql-test/suite/rpl/r/rpl_stm_until.result | 8 + mysql-test/suite/rpl/r/rpl_temporary_errors.result | 2 + mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result | 2 + mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result | 4 + .../rpl_ndb/r/rpl_ndb_circular_simplex.result | 4 + mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result | 20 + .../suite/rpl_ndb/r/rpl_ndb_idempotent.result | 12 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result | 2 + mysql-test/t/ctype_cp932_binlog_stm.test | 2 +- mysql-test/t/mysqlbinlog.test | 2 +- 54 files changed, 814 insertions(+), 481 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/master-slave.inc b/mysql-test/include/master-slave.inc index e0eb87f02f7..25e0150dd0a 100644 --- a/mysql-test/include/master-slave.inc +++ b/mysql-test/include/master-slave.inc @@ -8,5 +8,7 @@ connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,); -- source include/master-slave-reset.inc +connection master; +sync_slave_with_master; # Set the default connection to 'master' connection master; diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result index 044885d1ea7..bb971e5453b 100644 --- a/mysql-test/r/ctype_cp932_binlog_stm.result +++ b/mysql-test/r/ctype_cp932_binlog_stm.result @@ -29,22 +29,22 @@ HEX(s1) HEX(s2) d 466F6F2773206120426172 ED40ED41ED42 47.93 DROP PROCEDURE bug18293| DROP TABLE t4| -SHOW BINLOG EVENTS FROM 370| +SHOW BINLOG EVENTS FROM 371| Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 370 Query 1 536 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1, +master-bin.000001 371 Query 1 537 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1, s2 CHAR(50) CHARACTER SET cp932, d DECIMAL(10,2)) -master-bin.000001 536 Query 1 785 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50), +master-bin.000001 537 Query 1 786 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50), IN ins2 CHAR(50) CHARACTER SET cp932, IN ind DECIMAL(10,2)) BEGIN INSERT INTO t4 VALUES (ins1, ins2, ind); END -master-bin.000001 785 Query 1 1049 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93)) -master-bin.000001 1049 Query 1 1138 use `test`; DROP PROCEDURE bug18293 -master-bin.000001 1138 Query 1 1217 use `test`; DROP TABLE t4 +master-bin.000001 786 Query 1 1050 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93)) +master-bin.000001 1050 Query 1 1139 use `test`; DROP PROCEDURE bug18293 +master-bin.000001 1139 Query 1 1218 use `test`; DROP TABLE t4 End of 5.0 tests -SHOW BINLOG EVENTS FROM 365; +SHOW BINLOG EVENTS FROM 366; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment. CREATE TABLE t1 (a varchar(16)) character set cp932; diff --git a/mysql-test/r/flush_block_commit_notembedded.result b/mysql-test/r/flush_block_commit_notembedded.result index c7fd7a11877..4348dbd67e5 100644 --- a/mysql-test/r/flush_block_commit_notembedded.result +++ b/mysql-test/r/flush_block_commit_notembedded.result @@ -9,13 +9,13 @@ INSERT t1 VALUES (1); FLUSH TABLES WITH READ LOCK; SHOW MASTER STATUS; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 106 +master-bin.000001 107 # Switch to connection con1 COMMIT; # Switch to connection con2 SHOW MASTER STATUS; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 106 +master-bin.000001 107 UNLOCK TABLES; # Switch to connection con1 DROP TABLE t1; diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 449333a4ae6..4f22029814c 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -604,7 +604,7 @@ a b 4 4 show master status /* there must be the UPDATE query event */; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 206 +master-bin.000001 207 delete from t1; delete from t2; insert into t1 values (1,2),(3,4),(4,4); @@ -614,7 +614,7 @@ UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a; ERROR 23000: Duplicate entry '4' for key 'PRIMARY' show master status /* there must be the UPDATE query event */; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 221 +master-bin.000001 222 drop table t1, t2; set @@session.binlog_format= @sav_binlog_format; drop table if exists t1, t2, t3; diff --git a/mysql-test/r/outfile_loaddata.result b/mysql-test/r/outfile_loaddata.result index 453e3adb54c..66ff28298ba 100644 --- a/mysql-test/r/outfile_loaddata.result +++ b/mysql-test/r/outfile_loaddata.result @@ -92,14 +92,14 @@ HEX(c1) C3 SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' FIELDS ENCLOSED BY 0xC3 FROM t1; Warnings: -Warning 1638 Non-ASCII separator arguments are not fully supported +Warning 1639 Non-ASCII separator arguments are not fully supported TRUNCATE t1; SELECT HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt')); HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt')) C35CC3C30A LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' INTO TABLE t1 FIELDS ENCLOSED BY 0xC3; Warnings: -Warning 1638 Non-ASCII separator arguments are not fully supported +Warning 1639 Non-ASCII separator arguments are not fully supported SELECT HEX(c1) FROM t1; HEX(c1) C3 @@ -124,17 +124,17 @@ ERROR 42000: Field separator argument is not what is expected; check the manual # LOAD DATA rises error or has unpredictable result -- to be fixed later SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ENCLOSED BY 'ÑŠ'; Warnings: -Warning 1638 Non-ASCII separator arguments are not fully supported +Warning 1639 Non-ASCII separator arguments are not fully supported LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS ENCLOSED BY 'ÑŠ'; ERROR 42000: Field separator argument is not what is expected; check the manual SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ESCAPED BY 'ÑŠ'; Warnings: -Warning 1638 Non-ASCII separator arguments are not fully supported +Warning 1639 Non-ASCII separator arguments are not fully supported LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS ESCAPED BY 'ÑŠ'; ERROR 42000: Field separator argument is not what is expected; check the manual SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS TERMINATED BY 'ÑŠ'; Warnings: -Warning 1638 Non-ASCII separator arguments are not fully supported +Warning 1639 Non-ASCII separator arguments are not fully supported ################################################## 1ÑŠABC-áâ÷ÑŠDEF-ÂÃÄ 2ÑŠ\NÑŠ\N @@ -142,7 +142,7 @@ Warning 1638 Non-ASCII separator arguments are not fully supported TRUNCATE t2; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS TERMINATED BY 'ÑŠ'; Warnings: -Warning 1638 Non-ASCII separator arguments are not fully supported +Warning 1639 Non-ASCII separator arguments are not fully supported Warning 1265 Data truncated for column 'a' at row 1 Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 1 doesn't contain data for all columns @@ -156,7 +156,7 @@ a b c 2 NULL NULL SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' LINES STARTING BY 'ÑŠ'; Warnings: -Warning 1638 Non-ASCII separator arguments are not fully supported +Warning 1639 Non-ASCII separator arguments are not fully supported ################################################## ÑŠ1 ABC-áâ÷ DEF-ÂÃÄ ÑŠ2 \N \N @@ -164,20 +164,20 @@ Warning 1638 Non-ASCII separator arguments are not fully supported TRUNCATE t2; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary LINES STARTING BY 'ÑŠ'; Warnings: -Warning 1638 Non-ASCII separator arguments are not fully supported +Warning 1639 Non-ASCII separator arguments are not fully supported SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c; a b c 1 ABC-ÐБВ DEF-ÂÃÄ 2 NULL NULL SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' LINES TERMINATED BY 'ÑŠ'; Warnings: -Warning 1638 Non-ASCII separator arguments are not fully supported +Warning 1639 Non-ASCII separator arguments are not fully supported ################################################## 1 ABC-áâ÷ DEF-ÂÃÄÑŠ2 \N \NÑŠ################################################## TRUNCATE t2; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary LINES TERMINATED BY 'ÑŠ'; Warnings: -Warning 1638 Non-ASCII separator arguments are not fully supported +Warning 1639 Non-ASCII separator arguments are not fully supported SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c; a b c 1 ABC-ÐБВ DEF-ÂÃÄ diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 241f4198bf7..b11f60792ef 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -1327,7 +1327,7 @@ create table t1 123456789*123456789*123456789*123456789* 123456789*123456789*123456789*123456789*'); Warnings: -Warning 1629 Comment for field 'i' is too long (max = 255) +Warning 1630 Comment for field 'i' is too long (max = 255) select column_name, column_comment from information_schema.columns where table_schema = 'test' and table_name = 't1'; column_name column_comment diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index d2d702b12a0..d6d6c99f00a 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -247,25 +247,8 @@ 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 BEGIN -master-bin.000001 273 Table_map 1 314 table_id: # (test.t1) -master-bin.000001 314 Write_rows 1 348 table_id: # flags: STMT_END_F -master-bin.000001 348 Table_map 1 389 table_id: # (test.t1) -master-bin.000001 389 Write_rows 1 423 table_id: # flags: STMT_END_F -master-bin.000001 423 Table_map 1 464 table_id: # (test.t1) -master-bin.000001 464 Write_rows 1 498 table_id: # flags: STMT_END_F -master-bin.000001 498 Xid 1 525 COMMIT /* XID */ -master-bin.000001 525 Query 1 601 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 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 4 Format_desc 1 107 Server version, Binlog ver: 4 +master-bin.000001 107 Query 1 206 use `test`; create table t1(n int) engine=innodb master-bin.000001 206 Query 1 274 BEGIN master-bin.000001 274 Table_map 1 315 table_id: # (test.t1) master-bin.000001 315 Write_rows 1 349 table_id: # flags: STMT_END_F @@ -283,7 +266,7 @@ show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 107 Server version, Binlog ver: 4 master-bin.000001 107 Query 1 207 use `test`; create table t1 (a int) engine=innodb -master-bin.000001 207 Query 1 275 use `test`; BEGIN +master-bin.000001 207 Query 1 275 BEGIN master-bin.000001 275 Table_map 1 316 table_id: # (test.t1) master-bin.000001 316 Write_rows 1 350 table_id: # flags: STMT_END_F master-bin.000001 350 Table_map 1 391 table_id: # (test.t1) @@ -1100,13 +1083,13 @@ deallocate prepare stmt; 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 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned) -master-bin.000001 227 Query 1 295 BEGIN -master-bin.000001 295 Table_map 1 337 table_id: # (test.t1) -master-bin.000001 337 Write_rows 1 383 table_id: # flags: STMT_END_F -master-bin.000001 383 Query 1 452 COMMIT -master-bin.000001 452 Query 1 528 use `test`; drop table t1 +master-bin.000001 4 Format_desc 1 107 Server version, Binlog ver: 4 +master-bin.000001 107 Query 1 228 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned) +master-bin.000001 228 Query 1 296 BEGIN +master-bin.000001 296 Table_map 1 338 table_id: # (test.t1) +master-bin.000001 338 Write_rows 1 384 table_id: # flags: STMT_END_F +master-bin.000001 384 Query 1 453 COMMIT +master-bin.000001 453 Query 1 529 use `test`; drop table t1 reset master; CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE bug39182; diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index 9df4164b138..c0a87be191b 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -4,11 +4,11 @@ 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 BEGIN -master-bin.000001 281 Query 1 371 use `test`; insert into t1 values (1,2) -master-bin.000001 371 Xid 1 398 COMMIT /* XID */ +master-bin.000001 4 Format_desc 1 107 Server ver: #, Binlog ver: # +master-bin.000001 107 Query 1 214 use `test`; create table t1 (a int, b int) engine=innodb +master-bin.000001 214 Query 1 282 BEGIN +master-bin.000001 282 Query 1 372 use `test`; insert into t1 values (1,2) +master-bin.000001 372 Xid 1 399 COMMIT /* XID */ drop table t1; drop table if exists t1, t2; reset master; @@ -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 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 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 +master-bin.000001 4 Format_desc 1 107 Server version, Binlog ver: 4 +master-bin.000001 107 Query 1 206 use `test`; create table t1(n int) engine=innodb +master-bin.000001 206 Query 1 274 BEGIN +master-bin.000001 274 Query 1 362 use `test`; insert into t1 values (1) +master-bin.000001 362 Query 1 450 use `test`; insert into t1 values (2) +master-bin.000001 450 Query 1 538 use `test`; insert into t1 values (3) +master-bin.000001 538 Xid 1 565 COMMIT /* XID */ +master-bin.000001 565 Query 1 641 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 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 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 +master-bin.000001 4 Format_desc 1 107 Server version, Binlog ver: 4 +master-bin.000001 107 Query 1 207 use `test`; create table t1 (a int) engine=innodb +master-bin.000001 207 Query 1 275 BEGIN +master-bin.000001 275 Query 1 366 use `test`; insert into t1 values( 400 ) +master-bin.000001 366 Query 1 457 use `test`; insert into t1 values( 399 ) +master-bin.000001 457 Query 1 548 use `test`; insert into t1 values( 398 ) +master-bin.000001 548 Query 1 639 use `test`; insert into t1 values( 397 ) +master-bin.000001 639 Query 1 730 use `test`; insert into t1 values( 396 ) +master-bin.000001 730 Query 1 821 use `test`; insert into t1 values( 395 ) +master-bin.000001 821 Query 1 912 use `test`; insert into t1 values( 394 ) +master-bin.000001 912 Query 1 1003 use `test`; insert into t1 values( 393 ) +master-bin.000001 1003 Query 1 1094 use `test`; insert into t1 values( 392 ) +master-bin.000001 1094 Query 1 1185 use `test`; insert into t1 values( 391 ) +master-bin.000001 1185 Query 1 1276 use `test`; insert into t1 values( 390 ) +master-bin.000001 1276 Query 1 1367 use `test`; insert into t1 values( 389 ) +master-bin.000001 1367 Query 1 1458 use `test`; insert into t1 values( 388 ) +master-bin.000001 1458 Query 1 1549 use `test`; insert into t1 values( 387 ) +master-bin.000001 1549 Query 1 1640 use `test`; insert into t1 values( 386 ) +master-bin.000001 1640 Query 1 1731 use `test`; insert into t1 values( 385 ) +master-bin.000001 1731 Query 1 1822 use `test`; insert into t1 values( 384 ) +master-bin.000001 1822 Query 1 1913 use `test`; insert into t1 values( 383 ) +master-bin.000001 1913 Query 1 2004 use `test`; insert into t1 values( 382 ) +master-bin.000001 2004 Query 1 2095 use `test`; insert into t1 values( 381 ) +master-bin.000001 2095 Query 1 2186 use `test`; insert into t1 values( 380 ) +master-bin.000001 2186 Query 1 2277 use `test`; insert into t1 values( 379 ) +master-bin.000001 2277 Query 1 2368 use `test`; insert into t1 values( 378 ) +master-bin.000001 2368 Query 1 2459 use `test`; insert into t1 values( 377 ) +master-bin.000001 2459 Query 1 2550 use `test`; insert into t1 values( 376 ) +master-bin.000001 2550 Query 1 2641 use `test`; insert into t1 values( 375 ) +master-bin.000001 2641 Query 1 2732 use `test`; insert into t1 values( 374 ) +master-bin.000001 2732 Query 1 2823 use `test`; insert into t1 values( 373 ) +master-bin.000001 2823 Query 1 2914 use `test`; insert into t1 values( 372 ) +master-bin.000001 2914 Query 1 3005 use `test`; insert into t1 values( 371 ) +master-bin.000001 3005 Query 1 3096 use `test`; insert into t1 values( 370 ) +master-bin.000001 3096 Query 1 3187 use `test`; insert into t1 values( 369 ) +master-bin.000001 3187 Query 1 3278 use `test`; insert into t1 values( 368 ) +master-bin.000001 3278 Query 1 3369 use `test`; insert into t1 values( 367 ) +master-bin.000001 3369 Query 1 3460 use `test`; insert into t1 values( 366 ) +master-bin.000001 3460 Query 1 3551 use `test`; insert into t1 values( 365 ) +master-bin.000001 3551 Query 1 3642 use `test`; insert into t1 values( 364 ) +master-bin.000001 3642 Query 1 3733 use `test`; insert into t1 values( 363 ) +master-bin.000001 3733 Query 1 3824 use `test`; insert into t1 values( 362 ) +master-bin.000001 3824 Query 1 3915 use `test`; insert into t1 values( 361 ) +master-bin.000001 3915 Query 1 4006 use `test`; insert into t1 values( 360 ) +master-bin.000001 4006 Query 1 4097 use `test`; insert into t1 values( 359 ) +master-bin.000001 4097 Query 1 4188 use `test`; insert into t1 values( 358 ) +master-bin.000001 4188 Query 1 4279 use `test`; insert into t1 values( 357 ) +master-bin.000001 4279 Query 1 4370 use `test`; insert into t1 values( 356 ) +master-bin.000001 4370 Query 1 4461 use `test`; insert into t1 values( 355 ) +master-bin.000001 4461 Query 1 4552 use `test`; insert into t1 values( 354 ) +master-bin.000001 4552 Query 1 4643 use `test`; insert into t1 values( 353 ) +master-bin.000001 4643 Query 1 4734 use `test`; insert into t1 values( 352 ) +master-bin.000001 4734 Query 1 4825 use `test`; insert into t1 values( 351 ) +master-bin.000001 4825 Query 1 4916 use `test`; insert into t1 values( 350 ) +master-bin.000001 4916 Query 1 5007 use `test`; insert into t1 values( 349 ) +master-bin.000001 5007 Query 1 5098 use `test`; insert into t1 values( 348 ) +master-bin.000001 5098 Query 1 5189 use `test`; insert into t1 values( 347 ) +master-bin.000001 5189 Query 1 5280 use `test`; insert into t1 values( 346 ) +master-bin.000001 5280 Query 1 5371 use `test`; insert into t1 values( 345 ) +master-bin.000001 5371 Query 1 5462 use `test`; insert into t1 values( 344 ) +master-bin.000001 5462 Query 1 5553 use `test`; insert into t1 values( 343 ) +master-bin.000001 5553 Query 1 5644 use `test`; insert into t1 values( 342 ) +master-bin.000001 5644 Query 1 5735 use `test`; insert into t1 values( 341 ) +master-bin.000001 5735 Query 1 5826 use `test`; insert into t1 values( 340 ) +master-bin.000001 5826 Query 1 5917 use `test`; insert into t1 values( 339 ) +master-bin.000001 5917 Query 1 6008 use `test`; insert into t1 values( 338 ) +master-bin.000001 6008 Query 1 6099 use `test`; insert into t1 values( 337 ) +master-bin.000001 6099 Query 1 6190 use `test`; insert into t1 values( 336 ) +master-bin.000001 6190 Query 1 6281 use `test`; insert into t1 values( 335 ) +master-bin.000001 6281 Query 1 6372 use `test`; insert into t1 values( 334 ) +master-bin.000001 6372 Query 1 6463 use `test`; insert into t1 values( 333 ) +master-bin.000001 6463 Query 1 6554 use `test`; insert into t1 values( 332 ) +master-bin.000001 6554 Query 1 6645 use `test`; insert into t1 values( 331 ) +master-bin.000001 6645 Query 1 6736 use `test`; insert into t1 values( 330 ) +master-bin.000001 6736 Query 1 6827 use `test`; insert into t1 values( 329 ) +master-bin.000001 6827 Query 1 6918 use `test`; insert into t1 values( 328 ) +master-bin.000001 6918 Query 1 7009 use `test`; insert into t1 values( 327 ) +master-bin.000001 7009 Query 1 7100 use `test`; insert into t1 values( 326 ) +master-bin.000001 7100 Query 1 7191 use `test`; insert into t1 values( 325 ) +master-bin.000001 7191 Query 1 7282 use `test`; insert into t1 values( 324 ) +master-bin.000001 7282 Query 1 7373 use `test`; insert into t1 values( 323 ) +master-bin.000001 7373 Query 1 7464 use `test`; insert into t1 values( 322 ) +master-bin.000001 7464 Query 1 7555 use `test`; insert into t1 values( 321 ) +master-bin.000001 7555 Query 1 7646 use `test`; insert into t1 values( 320 ) +master-bin.000001 7646 Query 1 7737 use `test`; insert into t1 values( 319 ) +master-bin.000001 7737 Query 1 7828 use `test`; insert into t1 values( 318 ) +master-bin.000001 7828 Query 1 7919 use `test`; insert into t1 values( 317 ) +master-bin.000001 7919 Query 1 8010 use `test`; insert into t1 values( 316 ) +master-bin.000001 8010 Query 1 8101 use `test`; insert into t1 values( 315 ) +master-bin.000001 8101 Query 1 8192 use `test`; insert into t1 values( 314 ) +master-bin.000001 8192 Query 1 8283 use `test`; insert into t1 values( 313 ) +master-bin.000001 8283 Query 1 8374 use `test`; insert into t1 values( 312 ) +master-bin.000001 8374 Query 1 8465 use `test`; insert into t1 values( 311 ) +master-bin.000001 8465 Query 1 8556 use `test`; insert into t1 values( 310 ) +master-bin.000001 8556 Query 1 8647 use `test`; insert into t1 values( 309 ) +master-bin.000001 8647 Query 1 8738 use `test`; insert into t1 values( 308 ) +master-bin.000001 8738 Query 1 8829 use `test`; insert into t1 values( 307 ) +master-bin.000001 8829 Query 1 8920 use `test`; insert into t1 values( 306 ) +master-bin.000001 8920 Query 1 9011 use `test`; insert into t1 values( 305 ) +master-bin.000001 9011 Query 1 9102 use `test`; insert into t1 values( 304 ) +master-bin.000001 9102 Query 1 9193 use `test`; insert into t1 values( 303 ) +master-bin.000001 9193 Query 1 9284 use `test`; insert into t1 values( 302 ) +master-bin.000001 9284 Query 1 9375 use `test`; insert into t1 values( 301 ) +master-bin.000001 9375 Query 1 9466 use `test`; insert into t1 values( 300 ) +master-bin.000001 9466 Query 1 9557 use `test`; insert into t1 values( 299 ) +master-bin.000001 9557 Query 1 9648 use `test`; insert into t1 values( 298 ) +master-bin.000001 9648 Query 1 9739 use `test`; insert into t1 values( 297 ) +master-bin.000001 9739 Query 1 9830 use `test`; insert into t1 values( 296 ) +master-bin.000001 9830 Query 1 9921 use `test`; insert into t1 values( 295 ) +master-bin.000001 9921 Query 1 10012 use `test`; insert into t1 values( 294 ) +master-bin.000001 10012 Query 1 10103 use `test`; insert into t1 values( 293 ) +master-bin.000001 10103 Query 1 10194 use `test`; insert into t1 values( 292 ) +master-bin.000001 10194 Query 1 10285 use `test`; insert into t1 values( 291 ) +master-bin.000001 10285 Query 1 10376 use `test`; insert into t1 values( 290 ) +master-bin.000001 10376 Query 1 10467 use `test`; insert into t1 values( 289 ) +master-bin.000001 10467 Query 1 10558 use `test`; insert into t1 values( 288 ) +master-bin.000001 10558 Query 1 10649 use `test`; insert into t1 values( 287 ) +master-bin.000001 10649 Query 1 10740 use `test`; insert into t1 values( 286 ) +master-bin.000001 10740 Query 1 10831 use `test`; insert into t1 values( 285 ) +master-bin.000001 10831 Query 1 10922 use `test`; insert into t1 values( 284 ) +master-bin.000001 10922 Query 1 11013 use `test`; insert into t1 values( 283 ) +master-bin.000001 11013 Query 1 11104 use `test`; insert into t1 values( 282 ) +master-bin.000001 11104 Query 1 11195 use `test`; insert into t1 values( 281 ) +master-bin.000001 11195 Query 1 11286 use `test`; insert into t1 values( 280 ) +master-bin.000001 11286 Query 1 11377 use `test`; insert into t1 values( 279 ) +master-bin.000001 11377 Query 1 11468 use `test`; insert into t1 values( 278 ) +master-bin.000001 11468 Query 1 11559 use `test`; insert into t1 values( 277 ) +master-bin.000001 11559 Query 1 11650 use `test`; insert into t1 values( 276 ) +master-bin.000001 11650 Query 1 11741 use `test`; insert into t1 values( 275 ) +master-bin.000001 11741 Query 1 11832 use `test`; insert into t1 values( 274 ) +master-bin.000001 11832 Query 1 11923 use `test`; insert into t1 values( 273 ) +master-bin.000001 11923 Query 1 12014 use `test`; insert into t1 values( 272 ) +master-bin.000001 12014 Query 1 12105 use `test`; insert into t1 values( 271 ) +master-bin.000001 12105 Query 1 12196 use `test`; insert into t1 values( 270 ) +master-bin.000001 12196 Query 1 12287 use `test`; insert into t1 values( 269 ) +master-bin.000001 12287 Query 1 12378 use `test`; insert into t1 values( 268 ) +master-bin.000001 12378 Query 1 12469 use `test`; insert into t1 values( 267 ) +master-bin.000001 12469 Query 1 12560 use `test`; insert into t1 values( 266 ) +master-bin.000001 12560 Query 1 12651 use `test`; insert into t1 values( 265 ) +master-bin.000001 12651 Query 1 12742 use `test`; insert into t1 values( 264 ) +master-bin.000001 12742 Query 1 12833 use `test`; insert into t1 values( 263 ) +master-bin.000001 12833 Query 1 12924 use `test`; insert into t1 values( 262 ) +master-bin.000001 12924 Query 1 13015 use `test`; insert into t1 values( 261 ) +master-bin.000001 13015 Query 1 13106 use `test`; insert into t1 values( 260 ) +master-bin.000001 13106 Query 1 13197 use `test`; insert into t1 values( 259 ) +master-bin.000001 13197 Query 1 13288 use `test`; insert into t1 values( 258 ) +master-bin.000001 13288 Query 1 13379 use `test`; insert into t1 values( 257 ) +master-bin.000001 13379 Query 1 13470 use `test`; insert into t1 values( 256 ) +master-bin.000001 13470 Query 1 13561 use `test`; insert into t1 values( 255 ) +master-bin.000001 13561 Query 1 13652 use `test`; insert into t1 values( 254 ) +master-bin.000001 13652 Query 1 13743 use `test`; insert into t1 values( 253 ) +master-bin.000001 13743 Query 1 13834 use `test`; insert into t1 values( 252 ) +master-bin.000001 13834 Query 1 13925 use `test`; insert into t1 values( 251 ) +master-bin.000001 13925 Query 1 14016 use `test`; insert into t1 values( 250 ) +master-bin.000001 14016 Query 1 14107 use `test`; insert into t1 values( 249 ) +master-bin.000001 14107 Query 1 14198 use `test`; insert into t1 values( 248 ) +master-bin.000001 14198 Query 1 14289 use `test`; insert into t1 values( 247 ) +master-bin.000001 14289 Query 1 14380 use `test`; insert into t1 values( 246 ) +master-bin.000001 14380 Query 1 14471 use `test`; insert into t1 values( 245 ) +master-bin.000001 14471 Query 1 14562 use `test`; insert into t1 values( 244 ) +master-bin.000001 14562 Query 1 14653 use `test`; insert into t1 values( 243 ) +master-bin.000001 14653 Query 1 14744 use `test`; insert into t1 values( 242 ) +master-bin.000001 14744 Query 1 14835 use `test`; insert into t1 values( 241 ) +master-bin.000001 14835 Query 1 14926 use `test`; insert into t1 values( 240 ) +master-bin.000001 14926 Query 1 15017 use `test`; insert into t1 values( 239 ) +master-bin.000001 15017 Query 1 15108 use `test`; insert into t1 values( 238 ) +master-bin.000001 15108 Query 1 15199 use `test`; insert into t1 values( 237 ) +master-bin.000001 15199 Query 1 15290 use `test`; insert into t1 values( 236 ) +master-bin.000001 15290 Query 1 15381 use `test`; insert into t1 values( 235 ) +master-bin.000001 15381 Query 1 15472 use `test`; insert into t1 values( 234 ) +master-bin.000001 15472 Query 1 15563 use `test`; insert into t1 values( 233 ) +master-bin.000001 15563 Query 1 15654 use `test`; insert into t1 values( 232 ) +master-bin.000001 15654 Query 1 15745 use `test`; insert into t1 values( 231 ) +master-bin.000001 15745 Query 1 15836 use `test`; insert into t1 values( 230 ) +master-bin.000001 15836 Query 1 15927 use `test`; insert into t1 values( 229 ) +master-bin.000001 15927 Query 1 16018 use `test`; insert into t1 values( 228 ) +master-bin.000001 16018 Query 1 16109 use `test`; insert into t1 values( 227 ) +master-bin.000001 16109 Query 1 16200 use `test`; insert into t1 values( 226 ) +master-bin.000001 16200 Query 1 16291 use `test`; insert into t1 values( 225 ) +master-bin.000001 16291 Query 1 16382 use `test`; insert into t1 values( 224 ) +master-bin.000001 16382 Query 1 16473 use `test`; insert into t1 values( 223 ) +master-bin.000001 16473 Query 1 16564 use `test`; insert into t1 values( 222 ) +master-bin.000001 16564 Query 1 16655 use `test`; insert into t1 values( 221 ) +master-bin.000001 16655 Query 1 16746 use `test`; insert into t1 values( 220 ) +master-bin.000001 16746 Query 1 16837 use `test`; insert into t1 values( 219 ) +master-bin.000001 16837 Query 1 16928 use `test`; insert into t1 values( 218 ) +master-bin.000001 16928 Query 1 17019 use `test`; insert into t1 values( 217 ) +master-bin.000001 17019 Query 1 17110 use `test`; insert into t1 values( 216 ) +master-bin.000001 17110 Query 1 17201 use `test`; insert into t1 values( 215 ) +master-bin.000001 17201 Query 1 17292 use `test`; insert into t1 values( 214 ) +master-bin.000001 17292 Query 1 17383 use `test`; insert into t1 values( 213 ) +master-bin.000001 17383 Query 1 17474 use `test`; insert into t1 values( 212 ) +master-bin.000001 17474 Query 1 17565 use `test`; insert into t1 values( 211 ) +master-bin.000001 17565 Query 1 17656 use `test`; insert into t1 values( 210 ) +master-bin.000001 17656 Query 1 17747 use `test`; insert into t1 values( 209 ) +master-bin.000001 17747 Query 1 17838 use `test`; insert into t1 values( 208 ) +master-bin.000001 17838 Query 1 17929 use `test`; insert into t1 values( 207 ) +master-bin.000001 17929 Query 1 18020 use `test`; insert into t1 values( 206 ) +master-bin.000001 18020 Query 1 18111 use `test`; insert into t1 values( 205 ) +master-bin.000001 18111 Query 1 18202 use `test`; insert into t1 values( 204 ) +master-bin.000001 18202 Query 1 18293 use `test`; insert into t1 values( 203 ) +master-bin.000001 18293 Query 1 18384 use `test`; insert into t1 values( 202 ) +master-bin.000001 18384 Query 1 18475 use `test`; insert into t1 values( 201 ) +master-bin.000001 18475 Query 1 18566 use `test`; insert into t1 values( 200 ) +master-bin.000001 18566 Query 1 18657 use `test`; insert into t1 values( 199 ) +master-bin.000001 18657 Query 1 18748 use `test`; insert into t1 values( 198 ) +master-bin.000001 18748 Query 1 18839 use `test`; insert into t1 values( 197 ) +master-bin.000001 18839 Query 1 18930 use `test`; insert into t1 values( 196 ) +master-bin.000001 18930 Query 1 19021 use `test`; insert into t1 values( 195 ) +master-bin.000001 19021 Query 1 19112 use `test`; insert into t1 values( 194 ) +master-bin.000001 19112 Query 1 19203 use `test`; insert into t1 values( 193 ) +master-bin.000001 19203 Query 1 19294 use `test`; insert into t1 values( 192 ) +master-bin.000001 19294 Query 1 19385 use `test`; insert into t1 values( 191 ) +master-bin.000001 19385 Query 1 19476 use `test`; insert into t1 values( 190 ) +master-bin.000001 19476 Query 1 19567 use `test`; insert into t1 values( 189 ) +master-bin.000001 19567 Query 1 19658 use `test`; insert into t1 values( 188 ) +master-bin.000001 19658 Query 1 19749 use `test`; insert into t1 values( 187 ) +master-bin.000001 19749 Query 1 19840 use `test`; insert into t1 values( 186 ) +master-bin.000001 19840 Query 1 19931 use `test`; insert into t1 values( 185 ) +master-bin.000001 19931 Query 1 20022 use `test`; insert into t1 values( 184 ) +master-bin.000001 20022 Query 1 20113 use `test`; insert into t1 values( 183 ) +master-bin.000001 20113 Query 1 20204 use `test`; insert into t1 values( 182 ) +master-bin.000001 20204 Query 1 20295 use `test`; insert into t1 values( 181 ) +master-bin.000001 20295 Query 1 20386 use `test`; insert into t1 values( 180 ) +master-bin.000001 20386 Query 1 20477 use `test`; insert into t1 values( 179 ) +master-bin.000001 20477 Query 1 20568 use `test`; insert into t1 values( 178 ) +master-bin.000001 20568 Query 1 20659 use `test`; insert into t1 values( 177 ) +master-bin.000001 20659 Query 1 20750 use `test`; insert into t1 values( 176 ) +master-bin.000001 20750 Query 1 20841 use `test`; insert into t1 values( 175 ) +master-bin.000001 20841 Query 1 20932 use `test`; insert into t1 values( 174 ) +master-bin.000001 20932 Query 1 21023 use `test`; insert into t1 values( 173 ) +master-bin.000001 21023 Query 1 21114 use `test`; insert into t1 values( 172 ) +master-bin.000001 21114 Query 1 21205 use `test`; insert into t1 values( 171 ) +master-bin.000001 21205 Query 1 21296 use `test`; insert into t1 values( 170 ) +master-bin.000001 21296 Query 1 21387 use `test`; insert into t1 values( 169 ) +master-bin.000001 21387 Query 1 21478 use `test`; insert into t1 values( 168 ) +master-bin.000001 21478 Query 1 21569 use `test`; insert into t1 values( 167 ) +master-bin.000001 21569 Query 1 21660 use `test`; insert into t1 values( 166 ) +master-bin.000001 21660 Query 1 21751 use `test`; insert into t1 values( 165 ) +master-bin.000001 21751 Query 1 21842 use `test`; insert into t1 values( 164 ) +master-bin.000001 21842 Query 1 21933 use `test`; insert into t1 values( 163 ) +master-bin.000001 21933 Query 1 22024 use `test`; insert into t1 values( 162 ) +master-bin.000001 22024 Query 1 22115 use `test`; insert into t1 values( 161 ) +master-bin.000001 22115 Query 1 22206 use `test`; insert into t1 values( 160 ) +master-bin.000001 22206 Query 1 22297 use `test`; insert into t1 values( 159 ) +master-bin.000001 22297 Query 1 22388 use `test`; insert into t1 values( 158 ) +master-bin.000001 22388 Query 1 22479 use `test`; insert into t1 values( 157 ) +master-bin.000001 22479 Query 1 22570 use `test`; insert into t1 values( 156 ) +master-bin.000001 22570 Query 1 22661 use `test`; insert into t1 values( 155 ) +master-bin.000001 22661 Query 1 22752 use `test`; insert into t1 values( 154 ) +master-bin.000001 22752 Query 1 22843 use `test`; insert into t1 values( 153 ) +master-bin.000001 22843 Query 1 22934 use `test`; insert into t1 values( 152 ) +master-bin.000001 22934 Query 1 23025 use `test`; insert into t1 values( 151 ) +master-bin.000001 23025 Query 1 23116 use `test`; insert into t1 values( 150 ) +master-bin.000001 23116 Query 1 23207 use `test`; insert into t1 values( 149 ) +master-bin.000001 23207 Query 1 23298 use `test`; insert into t1 values( 148 ) +master-bin.000001 23298 Query 1 23389 use `test`; insert into t1 values( 147 ) +master-bin.000001 23389 Query 1 23480 use `test`; insert into t1 values( 146 ) +master-bin.000001 23480 Query 1 23571 use `test`; insert into t1 values( 145 ) +master-bin.000001 23571 Query 1 23662 use `test`; insert into t1 values( 144 ) +master-bin.000001 23662 Query 1 23753 use `test`; insert into t1 values( 143 ) +master-bin.000001 23753 Query 1 23844 use `test`; insert into t1 values( 142 ) +master-bin.000001 23844 Query 1 23935 use `test`; insert into t1 values( 141 ) +master-bin.000001 23935 Query 1 24026 use `test`; insert into t1 values( 140 ) +master-bin.000001 24026 Query 1 24117 use `test`; insert into t1 values( 139 ) +master-bin.000001 24117 Query 1 24208 use `test`; insert into t1 values( 138 ) +master-bin.000001 24208 Query 1 24299 use `test`; insert into t1 values( 137 ) +master-bin.000001 24299 Query 1 24390 use `test`; insert into t1 values( 136 ) +master-bin.000001 24390 Query 1 24481 use `test`; insert into t1 values( 135 ) +master-bin.000001 24481 Query 1 24572 use `test`; insert into t1 values( 134 ) +master-bin.000001 24572 Query 1 24663 use `test`; insert into t1 values( 133 ) +master-bin.000001 24663 Query 1 24754 use `test`; insert into t1 values( 132 ) +master-bin.000001 24754 Query 1 24845 use `test`; insert into t1 values( 131 ) +master-bin.000001 24845 Query 1 24936 use `test`; insert into t1 values( 130 ) +master-bin.000001 24936 Query 1 25027 use `test`; insert into t1 values( 129 ) +master-bin.000001 25027 Query 1 25118 use `test`; insert into t1 values( 128 ) +master-bin.000001 25118 Query 1 25209 use `test`; insert into t1 values( 127 ) +master-bin.000001 25209 Query 1 25300 use `test`; insert into t1 values( 126 ) +master-bin.000001 25300 Query 1 25391 use `test`; insert into t1 values( 125 ) +master-bin.000001 25391 Query 1 25482 use `test`; insert into t1 values( 124 ) +master-bin.000001 25482 Query 1 25573 use `test`; insert into t1 values( 123 ) +master-bin.000001 25573 Query 1 25664 use `test`; insert into t1 values( 122 ) +master-bin.000001 25664 Query 1 25755 use `test`; insert into t1 values( 121 ) +master-bin.000001 25755 Query 1 25846 use `test`; insert into t1 values( 120 ) +master-bin.000001 25846 Query 1 25937 use `test`; insert into t1 values( 119 ) +master-bin.000001 25937 Query 1 26028 use `test`; insert into t1 values( 118 ) +master-bin.000001 26028 Query 1 26119 use `test`; insert into t1 values( 117 ) +master-bin.000001 26119 Query 1 26210 use `test`; insert into t1 values( 116 ) +master-bin.000001 26210 Query 1 26301 use `test`; insert into t1 values( 115 ) +master-bin.000001 26301 Query 1 26392 use `test`; insert into t1 values( 114 ) +master-bin.000001 26392 Query 1 26483 use `test`; insert into t1 values( 113 ) +master-bin.000001 26483 Query 1 26574 use `test`; insert into t1 values( 112 ) +master-bin.000001 26574 Query 1 26665 use `test`; insert into t1 values( 111 ) +master-bin.000001 26665 Query 1 26756 use `test`; insert into t1 values( 110 ) +master-bin.000001 26756 Query 1 26847 use `test`; insert into t1 values( 109 ) +master-bin.000001 26847 Query 1 26938 use `test`; insert into t1 values( 108 ) +master-bin.000001 26938 Query 1 27029 use `test`; insert into t1 values( 107 ) +master-bin.000001 27029 Query 1 27120 use `test`; insert into t1 values( 106 ) +master-bin.000001 27120 Query 1 27211 use `test`; insert into t1 values( 105 ) +master-bin.000001 27211 Query 1 27302 use `test`; insert into t1 values( 104 ) +master-bin.000001 27302 Query 1 27393 use `test`; insert into t1 values( 103 ) +master-bin.000001 27393 Query 1 27484 use `test`; insert into t1 values( 102 ) +master-bin.000001 27484 Query 1 27575 use `test`; insert into t1 values( 101 ) +master-bin.000001 27575 Query 1 27666 use `test`; insert into t1 values( 100 ) +master-bin.000001 27666 Query 1 27756 use `test`; insert into t1 values( 99 ) +master-bin.000001 27756 Query 1 27846 use `test`; insert into t1 values( 98 ) +master-bin.000001 27846 Query 1 27936 use `test`; insert into t1 values( 97 ) +master-bin.000001 27936 Query 1 28026 use `test`; insert into t1 values( 96 ) +master-bin.000001 28026 Query 1 28116 use `test`; insert into t1 values( 95 ) +master-bin.000001 28116 Query 1 28206 use `test`; insert into t1 values( 94 ) +master-bin.000001 28206 Query 1 28296 use `test`; insert into t1 values( 93 ) +master-bin.000001 28296 Query 1 28386 use `test`; insert into t1 values( 92 ) +master-bin.000001 28386 Query 1 28476 use `test`; insert into t1 values( 91 ) +master-bin.000001 28476 Query 1 28566 use `test`; insert into t1 values( 90 ) +master-bin.000001 28566 Query 1 28656 use `test`; insert into t1 values( 89 ) +master-bin.000001 28656 Query 1 28746 use `test`; insert into t1 values( 88 ) +master-bin.000001 28746 Query 1 28836 use `test`; insert into t1 values( 87 ) +master-bin.000001 28836 Query 1 28926 use `test`; insert into t1 values( 86 ) +master-bin.000001 28926 Query 1 29016 use `test`; insert into t1 values( 85 ) +master-bin.000001 29016 Query 1 29106 use `test`; insert into t1 values( 84 ) +master-bin.000001 29106 Query 1 29196 use `test`; insert into t1 values( 83 ) +master-bin.000001 29196 Query 1 29286 use `test`; insert into t1 values( 82 ) +master-bin.000001 29286 Query 1 29376 use `test`; insert into t1 values( 81 ) +master-bin.000001 29376 Query 1 29466 use `test`; insert into t1 values( 80 ) +master-bin.000001 29466 Query 1 29556 use `test`; insert into t1 values( 79 ) +master-bin.000001 29556 Query 1 29646 use `test`; insert into t1 values( 78 ) +master-bin.000001 29646 Query 1 29736 use `test`; insert into t1 values( 77 ) +master-bin.000001 29736 Query 1 29826 use `test`; insert into t1 values( 76 ) +master-bin.000001 29826 Query 1 29916 use `test`; insert into t1 values( 75 ) +master-bin.000001 29916 Query 1 30006 use `test`; insert into t1 values( 74 ) +master-bin.000001 30006 Query 1 30096 use `test`; insert into t1 values( 73 ) +master-bin.000001 30096 Query 1 30186 use `test`; insert into t1 values( 72 ) +master-bin.000001 30186 Query 1 30276 use `test`; insert into t1 values( 71 ) +master-bin.000001 30276 Query 1 30366 use `test`; insert into t1 values( 70 ) +master-bin.000001 30366 Query 1 30456 use `test`; insert into t1 values( 69 ) +master-bin.000001 30456 Query 1 30546 use `test`; insert into t1 values( 68 ) +master-bin.000001 30546 Query 1 30636 use `test`; insert into t1 values( 67 ) +master-bin.000001 30636 Query 1 30726 use `test`; insert into t1 values( 66 ) +master-bin.000001 30726 Query 1 30816 use `test`; insert into t1 values( 65 ) +master-bin.000001 30816 Query 1 30906 use `test`; insert into t1 values( 64 ) +master-bin.000001 30906 Query 1 30996 use `test`; insert into t1 values( 63 ) +master-bin.000001 30996 Query 1 31086 use `test`; insert into t1 values( 62 ) +master-bin.000001 31086 Query 1 31176 use `test`; insert into t1 values( 61 ) +master-bin.000001 31176 Query 1 31266 use `test`; insert into t1 values( 60 ) +master-bin.000001 31266 Query 1 31356 use `test`; insert into t1 values( 59 ) +master-bin.000001 31356 Query 1 31446 use `test`; insert into t1 values( 58 ) +master-bin.000001 31446 Query 1 31536 use `test`; insert into t1 values( 57 ) +master-bin.000001 31536 Query 1 31626 use `test`; insert into t1 values( 56 ) +master-bin.000001 31626 Query 1 31716 use `test`; insert into t1 values( 55 ) +master-bin.000001 31716 Query 1 31806 use `test`; insert into t1 values( 54 ) +master-bin.000001 31806 Query 1 31896 use `test`; insert into t1 values( 53 ) +master-bin.000001 31896 Query 1 31986 use `test`; insert into t1 values( 52 ) +master-bin.000001 31986 Query 1 32076 use `test`; insert into t1 values( 51 ) +master-bin.000001 32076 Query 1 32166 use `test`; insert into t1 values( 50 ) +master-bin.000001 32166 Query 1 32256 use `test`; insert into t1 values( 49 ) +master-bin.000001 32256 Query 1 32346 use `test`; insert into t1 values( 48 ) +master-bin.000001 32346 Query 1 32436 use `test`; insert into t1 values( 47 ) +master-bin.000001 32436 Query 1 32526 use `test`; insert into t1 values( 46 ) +master-bin.000001 32526 Query 1 32616 use `test`; insert into t1 values( 45 ) +master-bin.000001 32616 Query 1 32706 use `test`; insert into t1 values( 44 ) +master-bin.000001 32706 Query 1 32796 use `test`; insert into t1 values( 43 ) +master-bin.000001 32796 Query 1 32886 use `test`; insert into t1 values( 42 ) +master-bin.000001 32886 Query 1 32976 use `test`; insert into t1 values( 41 ) +master-bin.000001 32976 Query 1 33066 use `test`; insert into t1 values( 40 ) +master-bin.000001 33066 Query 1 33156 use `test`; insert into t1 values( 39 ) +master-bin.000001 33156 Query 1 33246 use `test`; insert into t1 values( 38 ) +master-bin.000001 33246 Query 1 33336 use `test`; insert into t1 values( 37 ) +master-bin.000001 33336 Query 1 33426 use `test`; insert into t1 values( 36 ) +master-bin.000001 33426 Query 1 33516 use `test`; insert into t1 values( 35 ) +master-bin.000001 33516 Query 1 33606 use `test`; insert into t1 values( 34 ) +master-bin.000001 33606 Query 1 33696 use `test`; insert into t1 values( 33 ) +master-bin.000001 33696 Query 1 33786 use `test`; insert into t1 values( 32 ) +master-bin.000001 33786 Query 1 33876 use `test`; insert into t1 values( 31 ) +master-bin.000001 33876 Query 1 33966 use `test`; insert into t1 values( 30 ) +master-bin.000001 33966 Query 1 34056 use `test`; insert into t1 values( 29 ) +master-bin.000001 34056 Query 1 34146 use `test`; insert into t1 values( 28 ) +master-bin.000001 34146 Query 1 34236 use `test`; insert into t1 values( 27 ) +master-bin.000001 34236 Query 1 34326 use `test`; insert into t1 values( 26 ) +master-bin.000001 34326 Query 1 34416 use `test`; insert into t1 values( 25 ) +master-bin.000001 34416 Query 1 34506 use `test`; insert into t1 values( 24 ) +master-bin.000001 34506 Query 1 34596 use `test`; insert into t1 values( 23 ) +master-bin.000001 34596 Query 1 34686 use `test`; insert into t1 values( 22 ) +master-bin.000001 34686 Query 1 34776 use `test`; insert into t1 values( 21 ) +master-bin.000001 34776 Query 1 34866 use `test`; insert into t1 values( 20 ) +master-bin.000001 34866 Query 1 34956 use `test`; insert into t1 values( 19 ) +master-bin.000001 34956 Query 1 35046 use `test`; insert into t1 values( 18 ) +master-bin.000001 35046 Query 1 35136 use `test`; insert into t1 values( 17 ) +master-bin.000001 35136 Query 1 35226 use `test`; insert into t1 values( 16 ) +master-bin.000001 35226 Query 1 35316 use `test`; insert into t1 values( 15 ) +master-bin.000001 35316 Query 1 35406 use `test`; insert into t1 values( 14 ) +master-bin.000001 35406 Query 1 35496 use `test`; insert into t1 values( 13 ) +master-bin.000001 35496 Query 1 35586 use `test`; insert into t1 values( 12 ) +master-bin.000001 35586 Query 1 35676 use `test`; insert into t1 values( 11 ) +master-bin.000001 35676 Query 1 35766 use `test`; insert into t1 values( 10 ) +master-bin.000001 35766 Query 1 35855 use `test`; insert into t1 values( 9 ) +master-bin.000001 35855 Query 1 35944 use `test`; insert into t1 values( 8 ) +master-bin.000001 35944 Query 1 36033 use `test`; insert into t1 values( 7 ) +master-bin.000001 36033 Query 1 36122 use `test`; insert into t1 values( 6 ) +master-bin.000001 36122 Query 1 36211 use `test`; insert into t1 values( 5 ) +master-bin.000001 36211 Query 1 36300 use `test`; insert into t1 values( 4 ) +master-bin.000001 36300 Query 1 36389 use `test`; insert into t1 values( 3 ) +master-bin.000001 36389 Query 1 36478 use `test`; insert into t1 values( 2 ) +master-bin.000001 36478 Query 1 36567 use `test`; insert into t1 values( 1 ) +master-bin.000001 36567 Xid 1 36594 COMMIT /* XID */ +master-bin.000001 36594 Rotate 1 36638 master-bin.000002;pos=4 drop table t1; set global binlog_cache_size=@bcs; set session autocommit = @ac; @@ -590,10 +590,10 @@ deallocate prepare stmt; 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 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned) -master-bin.000001 227 Query 1 351 use `test`; insert into t1 values (9999999999999999,14632475938453979136) -master-bin.000001 351 Query 1 427 use `test`; drop table t1 +master-bin.000001 4 Format_desc 1 107 Server version, Binlog ver: 4 +master-bin.000001 107 Query 1 228 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned) +master-bin.000001 228 Query 1 352 use `test`; insert into t1 values (9999999999999999,14632475938453979136) +master-bin.000001 352 Query 1 428 use `test`; drop table t1 reset master; CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; USE bug39182; diff --git a/mysql-test/suite/binlog/t/binlog_incident.test b/mysql-test/suite/binlog/t/binlog_incident.test index 208c7f24df2..37566e71b53 100644 --- a/mysql-test/suite/binlog/t/binlog_incident.test +++ b/mysql-test/suite/binlog/t/binlog_incident.test @@ -19,9 +19,9 @@ REPLACE INTO t1 VALUES (4); DROP TABLE t1; FLUSH LOGS; -exec $MYSQL_BINLOG --start-position=106 $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql; +exec $MYSQL_BINLOG --start-position=107 $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql; --disable_query_log eval SELECT cont LIKE '%RELOAD DATABASE; # Shall generate syntax error%' AS `Contain RELOAD DATABASE` FROM (SELECT load_file('$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql') AS cont) AS tbl; --enable_query_log -remove_file $MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql; \ No newline at end of file +remove_file $MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql; diff --git a/mysql-test/suite/rpl/r/rpl_000015.result b/mysql-test/suite/rpl/r/rpl_000015.result index 03b96d5870b..d6cb544df7c 100644 --- a/mysql-test/suite/rpl/r/rpl_000015.result +++ b/mysql-test/suite/rpl/r/rpl_000015.result @@ -44,6 +44,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 0 change master to master_host='127.0.0.1',master_user='root', master_password='',master_port=MASTER_PORT; SHOW SLAVE STATUS; @@ -85,6 +87,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 0 start slave; SHOW SLAVE STATUS; Slave_IO_State # @@ -125,6 +129,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 drop table if exists t1; create table t1 (n int, PRIMARY KEY(n)); insert into t1 values (10),(45),(90); diff --git a/mysql-test/suite/rpl/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result index a17941f6ba9..ba3c3ebafe6 100644 --- a/mysql-test/suite/rpl/r/rpl_bug33931.result +++ b/mysql-test/suite/rpl/r/rpl_bug33931.result @@ -43,4 +43,6 @@ Last_IO_Errno 0 Last_IO_Error Last_SQL_Errno # Last_SQL_Error Failed during slave thread initialization +Replicate_Ignore_Server_Ids +Master_Server_Id 0 SET GLOBAL debug=""; diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result index c06c1201e3d..7bc5473c46e 100644 --- a/mysql-test/suite/rpl/r/rpl_change_master.result +++ b/mysql-test/suite/rpl/r/rpl_change_master.result @@ -50,6 +50,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 change master to master_user='root'; SHOW SLAVE STATUS; Slave_IO_State # @@ -90,6 +92,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 start slave; select * from t1; n diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result index 9b54498d809..25c31675b53 100644 --- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result @@ -89,6 +89,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 *** Test lock wait timeout *** include/stop_slave.inc @@ -151,6 +153,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 *** Test lock wait timeout and purged relay logs *** SET @my_max_relay_log_size= @@global.max_relay_log_size; @@ -218,6 +222,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 *** Clean up *** DROP TABLE t1,t2,t3; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result index fd208055bea..9f30d44eeab 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result @@ -93,6 +93,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; SELECT * FROM t2 ORDER BY a; @@ -160,6 +162,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t3 *** @@ -222,6 +226,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t4 *** @@ -284,6 +290,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t5 *** @@ -345,6 +353,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -454,6 +464,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1364 Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 331 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Create t10 on slave *** @@ -513,6 +525,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t10 *** @@ -574,6 +588,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t11 *** @@ -824,6 +840,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1060 Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; *** Try to insert in master **** @@ -964,6 +982,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; ** 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 index e50caa8861e..6f4dad3628b 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result @@ -93,6 +93,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; SELECT * FROM t2 ORDER BY a; @@ -160,6 +162,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t3 *** @@ -222,6 +226,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t4 *** @@ -284,6 +290,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t5 *** @@ -345,6 +353,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -454,6 +464,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1364 Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 331 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Create t10 on slave *** @@ -513,6 +525,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t10 *** @@ -574,6 +588,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t11 *** @@ -824,6 +840,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1060 Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; *** Try to insert in master **** @@ -964,6 +982,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; ** DROP table t17 *** diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result index ad67f96db71..ffc42c852be 100644 --- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result @@ -133,6 +133,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 ***** Testing Altering table def scenario ***** @@ -509,6 +511,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 **************************************** * columns in master at middle of table * @@ -583,6 +587,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -658,6 +664,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -809,6 +817,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1091 Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -895,6 +905,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1054 Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -981,6 +993,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1072 Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -1274,6 +1288,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 ***** Testing Altering table def scenario ***** @@ -1650,6 +1666,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 **************************************** * columns in master at middle of table * @@ -1724,6 +1742,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -1799,6 +1819,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -1950,6 +1972,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1091 Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -2036,6 +2060,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1054 Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -2122,6 +2148,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1072 Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -2415,6 +2443,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 ***** Testing Altering table def scenario ***** @@ -2791,6 +2821,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 **************************************** * columns in master at middle of table * @@ -2865,6 +2897,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -2940,6 +2974,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -3091,6 +3127,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1091 Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -3177,6 +3215,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1054 Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -3263,6 +3303,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1072 Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result index 8859a8e24e3..0c3dd7ed21d 100644 --- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result @@ -133,6 +133,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 ***** Testing Altering table def scenario ***** @@ -509,6 +511,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 **************************************** * columns in master at middle of table * @@ -583,6 +587,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -658,6 +664,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -809,6 +817,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1091 Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -895,6 +905,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1054 Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -981,6 +993,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1072 Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -1274,6 +1288,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 ***** Testing Altering table def scenario ***** @@ -1650,6 +1666,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 **************************************** * columns in master at middle of table * @@ -1724,6 +1742,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -1799,6 +1819,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -1950,6 +1972,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1091 Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -2036,6 +2060,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1054 Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -2122,6 +2148,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1072 Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -2415,6 +2443,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 ***** Testing Altering table def scenario ***** @@ -2791,6 +2821,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 **************************************** * columns in master at middle of table * @@ -2865,6 +2897,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -2940,6 +2974,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -3091,6 +3127,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1091 Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -3177,6 +3215,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1054 Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -3263,6 +3303,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1072 Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result index 600ac44fc86..3ebd1ac27a4 100644 --- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result +++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result @@ -59,3 +59,5 @@ Last_IO_Errno # Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 2 diff --git a/mysql-test/suite/rpl/r/rpl_grant.result b/mysql-test/suite/rpl/r/rpl_grant.result index 1bed6101e3c..fc32dcefec7 100644 --- a/mysql-test/suite/rpl/r/rpl_grant.result +++ b/mysql-test/suite/rpl/r/rpl_grant.result @@ -80,3 +80,5 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat.result b/mysql-test/suite/rpl/r/rpl_heartbeat.result index 5775351c33d..3bd2ad108ca 100644 --- a/mysql-test/suite/rpl/r/rpl_heartbeat.result +++ b/mysql-test/suite/rpl/r/rpl_heartbeat.result @@ -92,6 +92,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -131,6 +133,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 show status like 'Slave_heartbeat_period';; Variable_name Slave_heartbeat_period Value 0.500 diff --git a/mysql-test/suite/rpl/r/rpl_incident.result b/mysql-test/suite/rpl/r/rpl_incident.result index c3baabbdbc3..a9b641b243b 100644 --- a/mysql-test/suite/rpl/r/rpl_incident.result +++ b/mysql-test/suite/rpl/r/rpl_incident.result @@ -64,6 +64,8 @@ Last_IO_Errno 0 Last_IO_Error Last_SQL_Errno 1590 Last_SQL_Error The incident LOST_EVENTS occured on the master. Message: +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; SELECT * FROM t1; @@ -111,4 +113,6 @@ Last_IO_Errno 0 Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result index 3055216cbd9..7f346070290 100644 --- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result +++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result @@ -50,6 +50,8 @@ Last_IO_Errno 0 Last_IO_Error Last_SQL_Errno 1105 Last_SQL_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' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT * FROM t1; a b stop slave; @@ -141,6 +143,8 @@ SELECT t2.field_a, t2.field_b, t2.field_c FROM t2 ON DUPLICATE KEY UPDATE t1.field_3 = t2.field_c' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT * FROM t1; id field_1 field_2 field_3 drop table t1, t2; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result index 141bbaeb95e..35fac3bd076 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result @@ -73,6 +73,8 @@ Last_IO_Errno 0 Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 set sql_log_bin=0; delete from t1; set sql_log_bin=1; @@ -119,6 +121,8 @@ Last_IO_Errno 0 Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; @@ -166,6 +170,8 @@ Last_IO_Errno 0 Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result index cb2accc86ca..bbf4b9f97d4 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result @@ -45,6 +45,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1; SHOW SLAVE STATUS; Slave_IO_State # @@ -85,6 +87,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1593 Last_SQL_Error Fatal error: Not enough memory +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; 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 index 7b3ebf62959..e490468059d 100644 --- a/mysql-test/suite/rpl/r/rpl_log_pos.result +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -48,6 +48,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 start slave; include/stop_slave.inc SHOW SLAVE STATUS; @@ -89,6 +91,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 # diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result index 59726ea5661..53e8899d27f 100644 --- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result @@ -63,6 +63,8 @@ Last_IO_Errno # Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 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 diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result index 33088ee2ec8..2fbd283a9c8 100644 --- a/mysql-test/suite/rpl/r/rpl_replicate_do.result +++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result @@ -65,6 +65,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 create table t1 (ts timestamp); set one_shot time_zone='met'; insert into t1 values('2005-08-12 00:00:00'); diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result index 013ba87ec0b..b3b1480a740 100644 --- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result @@ -53,6 +53,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 select * from t1; s Could not break slave @@ -132,6 +134,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 select * from t2; m 34 @@ -196,6 +200,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 lock tables t3 read; select count(*) from t3 where n >= 4; count(*) diff --git a/mysql-test/suite/rpl/r/rpl_row_colSize.result b/mysql-test/suite/rpl/r/rpl_row_colSize.result index 6d002a722f1..acda689ca9b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_colSize.result +++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result @@ -57,6 +57,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -111,6 +113,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 12, test.t1 on slave has size 12. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -165,6 +169,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -220,6 +226,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -275,6 +283,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -329,6 +339,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 2. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -384,6 +396,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -439,6 +453,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -525,6 +541,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -580,6 +598,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -634,6 +654,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -688,6 +710,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 @@ -743,6 +767,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT COUNT(*) FROM t1; COUNT(*) 0 diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result index ca8fba3b6bd..789db064eb5 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log.result +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -283,6 +283,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 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; diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result index 9347f87ef8f..fbd9f685ba9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -283,6 +283,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 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; 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 index 2215b34814e..c2554218f73 100644 --- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result +++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result @@ -60,6 +60,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 # # Test 2 # @@ -108,6 +110,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 # # Test 3: max_relay_log_size = 0 # @@ -156,6 +160,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -201,6 +207,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 # # Test 5 # @@ -247,6 +255,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # @@ -291,6 +301,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result index fa40d8760a8..501749e12f9 100644 --- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result @@ -43,6 +43,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 stop slave; change master to master_user='test'; SHOW SLAVE STATUS; @@ -84,6 +86,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 reset slave; SHOW SLAVE STATUS; Slave_IO_State # @@ -124,6 +128,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 start slave; SHOW SLAVE STATUS; Slave_IO_State # @@ -164,6 +170,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 stop slave; reset slave; start slave; 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 a6a2181cd2a..4cb632da9e1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result @@ -144,6 +144,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 1364 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (2); @@ -195,6 +197,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 INSERT INTO t9 VALUES (4); INSERT INTO t4 VALUES (4); SHOW SLAVE STATUS; @@ -236,6 +240,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 1535 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (5); @@ -279,6 +285,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 1535 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -322,6 +330,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 1535 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -364,6 +374,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; 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 02e8c074354..a293bfed0d5 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result @@ -144,6 +144,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 1364 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (2); @@ -195,6 +197,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 INSERT INTO t9 VALUES (4); INSERT INTO t4 VALUES (4); SHOW SLAVE STATUS; @@ -236,6 +240,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 1535 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (5); @@ -279,6 +285,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 1535 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -322,6 +330,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 1535 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -364,6 +374,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result index ad54450af74..e878456e296 100644 --- a/mysql-test/suite/rpl/r/rpl_row_until.result +++ b/mysql-test/suite/rpl/r/rpl_row_until.result @@ -59,6 +59,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=291; SELECT * FROM t1; n @@ -105,6 +107,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=relay_pos_insert1_t2 SELECT * FROM t2; n @@ -149,6 +153,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 START SLAVE; include/stop_slave.inc START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_create_t2 @@ -191,6 +197,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 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; diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result index d955859f030..7b2bd48515d 100644 --- a/mysql-test/suite/rpl/r/rpl_skip_error.result +++ b/mysql-test/suite/rpl/r/rpl_skip_error.result @@ -70,6 +70,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 ==== Clean Up ==== drop table t1; create table t1(a int primary key); @@ -123,6 +125,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 ==== Clean Up ==== drop table t1; ==== Using Innodb ==== diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result index e2efcf08d7a..880fc9e8569 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result @@ -49,6 +49,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 9 Last_SQL_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed +Replicate_Ignore_Server_Ids +Master_Server_Id 1 drop table t1; drop table t1; call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3"); diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result index 41076f9fee3..5a37344cac6 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_skip.result +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -82,6 +82,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; SELECT * FROM t1; @@ -146,6 +148,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 **** On Master **** DROP TABLE t1, t2; SET SESSION BINLOG_FORMAT=ROW; diff --git a/mysql-test/suite/rpl/r/rpl_ssl.result b/mysql-test/suite/rpl/r/rpl_ssl.result index d188dd353ce..c8e9e1a4911 100644 --- a/mysql-test/suite/rpl/r/rpl_ssl.result +++ b/mysql-test/suite/rpl/r/rpl_ssl.result @@ -58,6 +58,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; select * from t1; t @@ -102,6 +104,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 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 index 74d2550cdaf..de255228aff 100644 --- a/mysql-test/suite/rpl/r/rpl_ssl1.result +++ b/mysql-test/suite/rpl/r/rpl_ssl1.result @@ -57,6 +57,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 stop slave; change master to master_user='root',master_password='', master_ssl=0; start slave; @@ -101,6 +103,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 stop slave; change master to master_host="localhost", @@ -155,4 +159,6 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result index 61eba2b4b3f..97dfbb618e2 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_log.result +++ b/mysql-test/suite/rpl/r/rpl_stm_log.result @@ -265,6 +265,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 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; 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 index 2215b34814e..c2554218f73 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result +++ b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result @@ -60,6 +60,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 # # Test 2 # @@ -108,6 +110,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 # # Test 3: max_relay_log_size = 0 # @@ -156,6 +160,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -201,6 +207,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 # # Test 5 # @@ -247,6 +255,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # @@ -291,6 +301,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result index 78d9d7c41eb..d18ca563b7b 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result @@ -43,6 +43,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 stop slave; change master to master_user='test'; SHOW SLAVE STATUS; @@ -84,6 +86,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 reset slave; SHOW SLAVE STATUS; Slave_IO_State # @@ -124,6 +128,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 start slave; SHOW SLAVE STATUS; Slave_IO_State # @@ -164,6 +170,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 stop slave; reset slave; start slave; diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result index 55074f0be0d..6af9be0da3b 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_until.result +++ b/mysql-test/suite/rpl/r/rpl_stm_until.result @@ -63,6 +63,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; select * from t1; n @@ -109,6 +111,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; select * from t2; n @@ -153,6 +157,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 start slave; [on master] [on slave] @@ -197,6 +203,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 ==== Test various error conditions ==== start slave until master_log_file='master-bin', master_log_pos=561; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result index d14380a6369..f4626304fc3 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result +++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result @@ -79,6 +79,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 DROP TABLE t1; **** On Master **** 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 index b16a63ec5ad..6680f3fd70f 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result @@ -179,6 +179,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 set GLOBAL slave_transaction_retries=10; include/start_slave.inc select * from t1 order by nid; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result index 2daacb351a9..aeb9e215d15 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result @@ -56,6 +56,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT * FROM t1 ORDER BY a; a b 1 2 @@ -99,5 +101,7 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 2 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 index 01f8d94da48..19439c4c0e1 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result @@ -53,6 +53,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 2 SELECT * FROM t1 ORDER BY a; a b 1 2 @@ -102,3 +104,5 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result index f812509de6f..771f44e4279 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result @@ -93,6 +93,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; SELECT * FROM t2 ORDER BY a; @@ -160,6 +162,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t3 *** @@ -222,6 +226,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t4 *** @@ -284,6 +290,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t5 *** @@ -345,6 +353,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -454,6 +464,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1364 Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 447 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Create t10 on slave *** @@ -513,6 +525,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t10 *** @@ -574,6 +588,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t11 *** @@ -824,6 +840,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1060 Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; *** Try to insert in master **** @@ -964,6 +982,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; ** DROP table t17 *** diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result index e2fee391bab..2df70ace0c1 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result @@ -33,15 +33,15 @@ 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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No 0 +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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No 0 1 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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 No No 0 0 None 0 No No 0 +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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 No No 0 0 None 0 No No 0 1 START SLAVE; SELECT * FROM t1 ORDER BY c3; c1 c2 c3 @@ -68,6 +68,6 @@ 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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No 0 +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 Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No 0 1 DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result index 3ef5e2b7e53..b61f5550719 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result @@ -107,6 +107,8 @@ Last_IO_Errno Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; hex(c1) hex(c2) c3 1 1 row1 diff --git a/mysql-test/t/ctype_cp932_binlog_stm.test b/mysql-test/t/ctype_cp932_binlog_stm.test index 19f44695f28..af6e6baf92a 100644 --- a/mysql-test/t/ctype_cp932_binlog_stm.test +++ b/mysql-test/t/ctype_cp932_binlog_stm.test @@ -33,7 +33,7 @@ delimiter ;| # the log's contents) that caused the server crash. --error 1220 -SHOW BINLOG EVENTS FROM 365; +SHOW BINLOG EVENTS FROM 366; --echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment. CREATE TABLE t1 (a varchar(16)) character set cp932; diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 597c9671053..015d4d152cb 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -119,7 +119,7 @@ select "--- reading stdin --" as ""; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ ---exec $MYSQL_BINLOG --short-form --position=80 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 +--exec $MYSQL_BINLOG --short-form --position=79 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 drop table t1,t2; # -- cgit v1.2.1 From 15c63309d4da505d171a0856a0404ee20bbd6484 Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Fri, 2 Oct 2009 12:11:50 +0800 Subject: Post fix backporting wl#1720 Fix mtr semisync plugin option paths --- mysql-test/mysql-test-run.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 434896df6a5..d50195c7d16 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1819,9 +1819,13 @@ sub environment_setup { # Add the path where mysqld will find semisync plugins # -------------------------------------------------------------------------- my $lib_semisync_master_plugin= - mtr_file_exists("$basedir/plugin/semisync/.libs/libsemisync_master.so"); + mtr_file_exists(vs_config_dirs('plugin/semisync',"libsemisync_master.so"), + "$basedir/plugin/semisync/.libs/libsemisync_master.so", + "$basedir/lib/mysql/plugin/libsemisync_master.so"); my $lib_semisync_slave_plugin= - mtr_file_exists("$basedir/plugin/semisync/.libs/libsemisync_slave.so"); + mtr_file_exists(vs_config_dirs('plugin/semisync',"libsemisync_slave.so"), + "$basedir/plugin/semisync/.libs/libsemisync_slave.so", + "$basedir/lib/mysql/plugin/libsemisync_slave.so"); if ($lib_semisync_master_plugin && $lib_semisync_slave_plugin) { $ENV{'SEMISYNC_MASTER_PLUGIN'}= basename($lib_semisync_master_plugin); -- cgit v1.2.1 From 4354cfd4043b9b54a3a2923374fc6cb615bf6ab7 Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Fri, 2 Oct 2009 16:18:40 +0800 Subject: Backport BUG#38468 Memory leak detected when using mysqlbinlog utility There were two memory leaks in mysqlbinlog command, one was already fixed by previous patches, another one was that defaults_argv was set to the value of argv after parse_args, in which called handle_options after calling load_defaults and changed the value of argv, and caused the memory allocated for defaults arguments not freed. Fixed the problem by setting defaults_argv right after calling load_defaults. --- mysql-test/t/mysqlbinlog.test | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 015d4d152cb..04fb5486f31 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -380,3 +380,27 @@ FLUSH LOGS; --echo End of 5.0 tests --echo End of 5.1 tests + +# +# BUG#38468 Memory leak detected when using mysqlbinlog utility; +# +disable_query_log; +RESET MASTER; +CREATE TABLE t1 SELECT 1; +FLUSH LOGS; +DROP TABLE t1; +enable_query_log; + +# Write an empty file for comparison +write_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty; +EOF + +# Before fix of BUG#38468, this would generate some warnings +--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 >/dev/null 2> $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn + +# Make sure the command above does not generate any error or warnings +diff_files $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty; + +# Cleanup for this part of test +remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty; +remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn; -- cgit v1.2.1 From 79faadd54d5360ad0d2a480f4dcdc1757fe567f4 Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Fri, 2 Oct 2009 16:35:03 +0800 Subject: Backport BUG#12190 CHANGE MASTER has differ path requiremts on MASTER_LOG_FILE and RELAY_LOG_FILE CHANGE MASTER TO command required the value for RELAY_LOG_FILE to be an absolute path, which was different from the requirement of MASTER_LOG_FILE. This patch fixed the problem by changing the value for RELAY_LOG_FILE to be the basename of the log file as that for MASTER_LOG_FILE. --- mysql-test/include/setup_fake_relay_log.inc | 2 +- .../binlog/t/binlog_auto_increment_bug33029.test | 2 +- mysql-test/suite/rpl/r/rpl_change_master.result | 17 +++++++ mysql-test/suite/rpl/t/rpl_change_master.test | 53 ++++++++++++++++++++++ 4 files changed, 72 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/setup_fake_relay_log.inc b/mysql-test/include/setup_fake_relay_log.inc index f88806e1079..b3df7abba76 100644 --- a/mysql-test/include/setup_fake_relay_log.inc +++ b/mysql-test/include/setup_fake_relay_log.inc @@ -69,7 +69,7 @@ let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`; # Create relay log file. copy_file $fake_relay_log $_fake_relay_log; # Create relay log index. ---exec echo $_fake_filename-fake.000001 > $_fake_relay_index +--exec echo ./$_fake_filename-fake.000001 > $_fake_relay_index # Setup replication from existing relay log. eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_filename-fake.000001', RELAY_LOG_POS=4; diff --git a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test index 5297767675c..1277f6e7ccb 100644 --- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test +++ b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test @@ -26,7 +26,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLD_DATADIR/slave-relay-bin.000001; write_file $MYSQLD_DATADIR/slave-relay-bin.index; -slave-relay-bin.000001 +./slave-relay-bin.000001 EOF change master to diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result index 7bc5473c46e..a51ba50475b 100644 --- a/mysql-test/suite/rpl/r/rpl_change_master.result +++ b/mysql-test/suite/rpl/r/rpl_change_master.result @@ -100,3 +100,20 @@ n 1 2 drop table t1; +stop slave; +drop table if exists t1,t2,t3,t4,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 (1); +flush logs; +insert into t1 values (2); +include/stop_slave.inc +delete from t1 where a=2; +CHANGE MASTER TO relay_log_file='slave-relay-bin.000005', relay_log_pos=4; +start slave sql_thread; +start slave io_thread; +set global relay_log_purge=1; +drop table t1; diff --git a/mysql-test/suite/rpl/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test index d0cd40e2e11..c1ef417ea78 100644 --- a/mysql-test/suite/rpl/t/rpl_change_master.test +++ b/mysql-test/suite/rpl/t/rpl_change_master.test @@ -33,3 +33,56 @@ connection slave; sync_with_master; # End of 4.1 tests + +# +# BUG#12190 CHANGE MASTER has differ path requiremts on MASTER_LOG_FILE and RELAY_LOG_FILE +# + +source include/master-slave-reset.inc; + +connection master; +create table t1 (a int); +insert into t1 values (1); +flush logs; +insert into t1 values (2); + +# Note: the master positon saved by this will also be used by the +# 'sync_with_master' below. +sync_slave_with_master; + +# Check if the table t1 and t2 are identical on master and slave; +let $diff_table_1= master:test.t1 +let $diff_table_2= slave:test.t1 +source include/diff_tables.inc; + +connection slave; +source include/stop_slave.inc; +delete from t1 where a=2; + +# start replication from the second insert, after fix of BUG#12190, +# relay_log_file does not use absolute path, only the filename is +# required +# +# Note: the follow change master will automatically reset +# relay_log_purge to false, save the old value to restore +let $relay_log_purge= `select @@global.relay_log_purge`; +CHANGE MASTER TO relay_log_file='slave-relay-bin.000005', relay_log_pos=4; +start slave sql_thread; +source include/wait_for_slave_sql_to_start.inc; + +# Sync to the same position saved by the 'sync_slave_with_master' above. +sync_with_master; + +# Check if the table t1 and t2 are identical on master and slave; +let $diff_table_1= master:test.t1 +let $diff_table_2= slave:test.t1 +source include/diff_tables.inc; + +# clean up +connection slave; +start slave io_thread; +source include/wait_for_slave_io_to_start.inc; +eval set global relay_log_purge=$relay_log_purge; +connection master; +drop table t1; +sync_slave_with_master; -- cgit v1.2.1 From b92d459d118287f9308a61cecd29bd7656ff811d Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Fri, 2 Oct 2009 16:40:06 +0800 Subject: Backport post fix compiler warnings and test failures for BUG#25192 BUG#12190 --- mysql-test/include/setup_fake_relay_log.inc | 16 +++++++++++++++- .../binlog/t/binlog_auto_increment_bug33029.test | 19 ++++++++++++++++--- 2 files changed, 31 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/setup_fake_relay_log.inc b/mysql-test/include/setup_fake_relay_log.inc index b3df7abba76..b11e6afbeca 100644 --- a/mysql-test/include/setup_fake_relay_log.inc +++ b/mysql-test/include/setup_fake_relay_log.inc @@ -69,7 +69,21 @@ let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`; # Create relay log file. copy_file $fake_relay_log $_fake_relay_log; # Create relay log index. ---exec echo ./$_fake_filename-fake.000001 > $_fake_relay_index + +# After patch for BUG#12190, the filename used in CHANGE MASTER +# RELAY_LOG_FILE will be automatically added the directory of the +# relay log before comparison, thus we need to added the directory +# part (./ on unix .\ on windows) when faking the relay-log-bin.index. + +if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`) +{ + eval select './$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index'; +} + +if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") != 0`) +{ + eval select '.\\\\$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index'; +} # Setup replication from existing relay log. eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_filename-fake.000001', RELAY_LOG_POS=4; diff --git a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test index 1277f6e7ccb..19137066429 100644 --- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test +++ b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test @@ -25,9 +25,22 @@ let $MYSQLD_DATADIR= `select @@datadir`; copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLD_DATADIR/slave-relay-bin.000001; -write_file $MYSQLD_DATADIR/slave-relay-bin.index; -./slave-relay-bin.000001 -EOF + +# After patch for BUG#12190, the filename used in CHANGE MASTER +# RELAY_LOG_FILE will be automatically added the directory of the +# relay log before comparison, thus we need to added the directory +# part (./ on unix .\ on windows) when faking the relay-log-bin.index. +disable_query_log; +if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") = 0`) +{ + eval select './slave-relay-bin.000001\n' into dumpfile '$MYSQLD_DATADIR/slave-relay-bin.index'; +} + +if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") != 0`) +{ + eval select '.\\\\slave-relay-bin.000001\n' into dumpfile '$MYSQLD_DATADIR/slave-relay-bin.index'; +} +enable_query_log; change master to MASTER_HOST='dummy.localdomain', -- cgit v1.2.1 From 1b3300d5e976ff2f05e4924b9120d4ffc4468e9c Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Fri, 2 Oct 2009 16:50:05 +0800 Subject: Backport BUG#34227 Replication permission error message is misleading According to Jon's comment, add (at least one of) to the error message. --- mysql-test/r/mysqldump.result | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 8162e1aca05..b2a4c1ae585 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3554,11 +3554,11 @@ use test; create user mysqltest_1@localhost; create table t1(a int, b varchar(34)); reset master; -mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need the RELOAD privilege for this operation (1227) -mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need the RELOAD privilege for this operation (1227) +mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227) +mysqldump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227) grant RELOAD on *.* to mysqltest_1@localhost; -mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227) -mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227) +mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation (1227) +mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER,REPLICATION CLIENT privilege(s) for this operation (1227) grant REPLICATION CLIENT on *.* to mysqltest_1@localhost; drop table t1; drop user mysqltest_1@localhost; -- cgit v1.2.1 From fa7395c9a1baa795ea0f33110887bb42288f8b65 Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Fri, 2 Oct 2009 17:12:10 +0800 Subject: Backport Post fix of result files after push of BUG#34227 --- mysql-test/r/events_bugs.result | 4 ++-- mysql-test/r/grant2.result | 4 ++-- mysql-test/r/information_schema_db.result | 2 +- mysql-test/r/sp-security.result | 4 ++-- mysql-test/r/trigger_notembedded.result | 4 ++-- mysql-test/r/view_grant.result | 12 ++++++------ mysql-test/suite/binlog/r/binlog_grant.result | 6 +++--- mysql-test/suite/federated/federated_server.result | 8 ++++---- mysql-test/suite/funcs_1/r/innodb_trig_03e.result | 4 ++-- mysql-test/suite/funcs_1/r/memory_trig_03e.result | 4 ++-- mysql-test/suite/funcs_1/r/myisam_trig_03e.result | 4 ++-- mysql-test/suite/funcs_1/r/ndb_trig_03e.result | 4 ++-- mysql-test/suite/rpl/r/rpl_temporary.result | 4 ++-- mysql-test/suite/sys_vars/r/read_only_func.result | 2 +- 14 files changed, 33 insertions(+), 33 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index 50bfa97c59f..15a9e226c39 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -375,7 +375,7 @@ SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; event_name definer e1 mysqltest_u1@localhost ALTER DEFINER=root@localhost EVENT e1 ON SCHEDULE EVERY 1 HOUR; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; event_name definer e1 mysqltest_u1@localhost @@ -386,7 +386,7 @@ event_name definer e1 mysqltest_u1@localhost DROP EVENT e1; CREATE DEFINER=root@localhost EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation DROP EVENT e1; ERROR HY000: Unknown event 'e1' DROP USER mysqltest_u1@localhost; diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index 7c2023127f0..461ad78bbb6 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -121,9 +121,9 @@ mysqltest_5@host5, mysqltest_6@host6, mysqltest_7@host7; create database mysqltest_1; grant select, insert, update on `mysqltest\_1`.* to mysqltest_1@localhost; set sql_log_off = 1; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation set sql_log_bin = 0; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation delete from mysql.user where user like 'mysqltest\_1'; delete from mysql.db where user like 'mysqltest\_1'; drop database mysqltest_1; diff --git a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result index 6305f8cd47a..4cc96d3e9ce 100644 --- a/mysql-test/r/information_schema_db.result +++ b/mysql-test/r/information_schema_db.result @@ -121,7 +121,7 @@ grant insert on v1 to testdb_2@localhost; create view v5 as select f1 from t1; grant show view on v5 to testdb_2@localhost; create definer=`no_such_user`@`no_such_host` view v6 as select f1 from t1; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation use testdb_1; create view v6 as select f1 from t1; grant show view on v6 to testdb_2@localhost; diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result index 65c94577a57..ecac8fed8c4 100644 --- a/mysql-test/r/sp-security.result +++ b/mysql-test/r/sp-security.result @@ -349,9 +349,9 @@ CREATE FUNCTION wl2897_f1() RETURNS INT RETURN 1; ---> connection: mysqltest_1_con USE mysqltest; CREATE DEFINER=root@localhost PROCEDURE wl2897_p2() SELECT 2; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation CREATE DEFINER=root@localhost FUNCTION wl2897_f2() RETURNS INT RETURN 2; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation ---> connection: mysqltest_2_con use mysqltest; diff --git a/mysql-test/r/trigger_notembedded.result b/mysql-test/r/trigger_notembedded.result index 335e6910a3a..f8975cb2ee5 100644 --- a/mysql-test/r/trigger_notembedded.result +++ b/mysql-test/r/trigger_notembedded.result @@ -117,7 +117,7 @@ CREATE DEFINER='mysqltest_inv'@'localhost' TRIGGER trg1 BEFORE INSERT ON t1 FOR EACH ROW SET @new_sum = 0; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation ---> connection: default use mysqltest_db1; @@ -473,7 +473,7 @@ SELECT trigger_name FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_schema = 'db1'; trigger_name SHOW CREATE TRIGGER db1.trg; -ERROR 42000: Access denied; you need the TRIGGER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the TRIGGER privilege(s) for this operation DROP USER 'no_rights'@'localhost'; DROP DATABASE db1; End of 5.1 tests. diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 7e280fa2fe5..982b3b98d9c 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -16,7 +16,7 @@ create table mysqltest.t2 (a int, b int); grant select on mysqltest.t1 to mysqltest_1@localhost; grant create view,select on test.* to mysqltest_1@localhost; create definer=root@localhost view v1 as select * from mysqltest.t1; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation create view v1 as select * from mysqltest.t1; alter view v1 as select * from mysqltest.t1; ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'v1' @@ -779,11 +779,11 @@ GRANT CREATE VIEW ON db26813.v2 TO u26813@localhost; GRANT DROP, CREATE VIEW ON db26813.v3 TO u26813@localhost; GRANT SELECT ON db26813.t1 TO u26813@localhost; ALTER VIEW v1 AS SELECT f2 FROM t1; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation ALTER VIEW v2 AS SELECT f2 FROM t1; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation ALTER VIEW v3 AS SELECT f2 FROM t1; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation SHOW CREATE VIEW v3; View Create View character_set_client collation_connection v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci @@ -807,9 +807,9 @@ GRANT DROP, CREATE VIEW ON mysqltest_29908.v1 TO u29908_2@localhost; GRANT DROP, CREATE VIEW, SHOW VIEW ON mysqltest_29908.v2 TO u29908_2@localhost; GRANT SELECT ON mysqltest_29908.t1 TO u29908_2@localhost; ALTER VIEW v1 AS SELECT f2 FROM t1; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation ALTER VIEW v2 AS SELECT f2 FROM t1; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation SHOW CREATE VIEW v2; View Create View character_set_client collation_connection v2 CREATE ALGORITHM=UNDEFINED DEFINER=`u29908_1`@`localhost` SQL SECURITY INVOKER VIEW `v2` AS select `t1`.`f1` AS `f1` from `t1` latin1 latin1_swedish_ci diff --git a/mysql-test/suite/binlog/r/binlog_grant.result b/mysql-test/suite/binlog/r/binlog_grant.result index 21ebb891103..548013fcbf2 100644 --- a/mysql-test/suite/binlog/r/binlog_grant.result +++ b/mysql-test/suite/binlog/r/binlog_grant.result @@ -13,16 +13,16 @@ set session sql_log_bin = 1; set global sql_log_bin = 1; ERROR HY000: Variable 'sql_log_bin' is a SESSION variable and can't be used with SET GLOBAL set session sql_log_bin = 1; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation **** Variable BINLOG_FORMAT **** [root] set global binlog_format = row; set session binlog_format = row; [plain] set global binlog_format = row; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation set session binlog_format = row; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation **** Clean up **** set global binlog_format = @saved_binlog_format; drop user mysqltest_1@localhost; diff --git a/mysql-test/suite/federated/federated_server.result b/mysql-test/suite/federated/federated_server.result index 2c20d1c1d57..5079a4dcfa0 100644 --- a/mysql-test/suite/federated/federated_server.result +++ b/mysql-test/suite/federated/federated_server.result @@ -197,13 +197,13 @@ select * from federated.t1; id name 1 this is legitimate alter server s1 options (database 'db_bogus'); -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation flush tables; select * from federated.t1; id name 1 this is legitimate alter server s1 options (database 'db_bogus'); -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation flush tables; select * from federated.t1; id name @@ -214,7 +214,7 @@ select * from federated.t1; id name 2 this is bogus drop server if exists 's1'; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation create server 's1' foreign data wrapper 'mysql' options (HOST '127.0.0.1', DATABASE 'db_legitimate', @@ -223,7 +223,7 @@ PASSWORD '', PORT SLAVE_PORT, SOCKET '', OWNER 'root'); -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation drop server 's1'; create server 's1' foreign data wrapper 'mysql' options (HOST '127.0.0.1', diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result index 476ccc6ebd8..25edc0f68bb 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result @@ -1251,7 +1251,7 @@ drop trigger trg1_0; create definer=not_ex_user@localhost trigger trg1_0 before INSERT on t1 for each row set new.f1 = 'trig 1_0-yes'; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation create definer=current_user trigger trg1_1 before INSERT on t1 for each row set new.f1 = 'trig 1_1-yes'; @@ -1284,7 +1284,7 @@ GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'loca create definer=not_ex_user@localhost trigger trg1_3 after UPDATE on t1 for each row set @var1 = 'trig 1_3-yes'; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation select current_user; current_user root@localhost diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result index bbee7d47e7e..462a8858029 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result @@ -1252,7 +1252,7 @@ drop trigger trg1_0; create definer=not_ex_user@localhost trigger trg1_0 before INSERT on t1 for each row set new.f1 = 'trig 1_0-yes'; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation create definer=current_user trigger trg1_1 before INSERT on t1 for each row set new.f1 = 'trig 1_1-yes'; @@ -1285,7 +1285,7 @@ GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'loca create definer=not_ex_user@localhost trigger trg1_3 after UPDATE on t1 for each row set @var1 = 'trig 1_3-yes'; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation select current_user; current_user root@localhost diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result index e4dc67098ad..104db478638 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result @@ -1252,7 +1252,7 @@ drop trigger trg1_0; create definer=not_ex_user@localhost trigger trg1_0 before INSERT on t1 for each row set new.f1 = 'trig 1_0-yes'; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation create definer=current_user trigger trg1_1 before INSERT on t1 for each row set new.f1 = 'trig 1_1-yes'; @@ -1285,7 +1285,7 @@ GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'loca create definer=not_ex_user@localhost trigger trg1_3 after UPDATE on t1 for each row set @var1 = 'trig 1_3-yes'; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation select current_user; current_user root@localhost diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result b/mysql-test/suite/funcs_1/r/ndb_trig_03e.result index 84260822edf..73388680481 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_03e.result @@ -1251,7 +1251,7 @@ drop trigger trg1_0; create definer=not_ex_user@localhost trigger trg1_0 before INSERT on t1 for each row set new.f1 = 'trig 1_0-yes'; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation create definer=current_user trigger trg1_1 before INSERT on t1 for each row set new.f1 = 'trig 1_1-yes'; @@ -1284,7 +1284,7 @@ GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'loca create definer=not_ex_user@localhost trigger trg1_3 after UPDATE on t1 for each row set @var1 = 'trig 1_3-yes'; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation select current_user; current_user root@localhost diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result index 631eb0677b0..b2400a03f63 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary.result +++ b/mysql-test/suite/rpl/r/rpl_temporary.result @@ -27,12 +27,12 @@ Warning 1265 Data truncated for column 'b' at row 1 DROP TABLE t1; 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 +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) 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 +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation SELECT @@session.sql_select_limit = @save_select_limit; @@session.sql_select_limit = @save_select_limit 1 diff --git a/mysql-test/suite/sys_vars/r/read_only_func.result b/mysql-test/suite/sys_vars/r/read_only_func.result index 35b42d468d6..7e98b7adc50 100644 --- a/mysql-test/suite/sys_vars/r/read_only_func.result +++ b/mysql-test/suite/sys_vars/r/read_only_func.result @@ -20,7 +20,7 @@ id name CREATE user sameea; ** Connecting connn using username 'sameea' ** SET Global read_ONLY=ON; -ERROR 42000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation CREATE TABLE t2 ( id INT NOT NULL auto_increment, -- cgit v1.2.1 From 0ec47798fd59c0bb8e6c1ef03e907eccd6161345 Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Fri, 2 Oct 2009 17:24:21 +0800 Subject: Backport fixes for the follow tests binlog_tmp_table rpl_row_sp006_InnoDB rpl_slave_status --- mysql-test/extra/rpl_tests/rpl_row_sp006.test | 3 ++- mysql-test/suite/binlog/r/binlog_tmp_table.result | 1 + mysql-test/suite/binlog/t/binlog_tmp_table.test | 2 ++ mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result | 3 ++- mysql-test/suite/rpl/t/rpl_slave_status.test | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp006.test b/mysql-test/extra/rpl_tests/rpl_row_sp006.test index 897d7e492bf..613ce630f90 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_sp006.test +++ b/mysql-test/extra/rpl_tests/rpl_row_sp006.test @@ -11,7 +11,8 @@ # Begin clean up test section connection master; --disable_warnings -create database if not exists mysqltest1; +drop database if exists mysqltest1; +create database mysqltest1; DROP PROCEDURE IF EXISTS mysqltest1.p1; DROP PROCEDURE IF EXISTS mysqltest1.p2; DROP TABLE IF EXISTS mysqltest1.t2; diff --git a/mysql-test/suite/binlog/r/binlog_tmp_table.result b/mysql-test/suite/binlog/r/binlog_tmp_table.result index e4928432324..b057d24cba9 100644 --- a/mysql-test/suite/binlog/r/binlog_tmp_table.result +++ b/mysql-test/suite/binlog/r/binlog_tmp_table.result @@ -1,3 +1,4 @@ +reset master; create table foo (a int); flush logs; create temporary table tmp1_foo like foo; diff --git a/mysql-test/suite/binlog/t/binlog_tmp_table.test b/mysql-test/suite/binlog/t/binlog_tmp_table.test index 6947959a5e0..cd147149ed1 100644 --- a/mysql-test/suite/binlog/t/binlog_tmp_table.test +++ b/mysql-test/suite/binlog/t/binlog_tmp_table.test @@ -31,6 +31,8 @@ source include/have_binlog_format_mixed_or_statement.inc; connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,); +reset master; + create table foo (a int); flush logs; diff --git a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result index 8339e77d3a0..0f4dd71f389 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result @@ -4,7 +4,8 @@ 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 database if exists mysqltest1; +create database mysqltest1; DROP PROCEDURE IF EXISTS mysqltest1.p1; DROP PROCEDURE IF EXISTS mysqltest1.p2; DROP TABLE IF EXISTS mysqltest1.t2; diff --git a/mysql-test/suite/rpl/t/rpl_slave_status.test b/mysql-test/suite/rpl/t/rpl_slave_status.test index 4edf1802a5d..02fd555d13c 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_status.test +++ b/mysql-test/suite/rpl/t/rpl_slave_status.test @@ -54,6 +54,7 @@ sync_slave_with_master; source include/stop_slave.inc; START SLAVE; source include/wait_for_slave_sql_to_start.inc; +source include/wait_for_slave_io_to_stop.inc; --echo ==== Verify that Slave_IO_Running = No ==== let $result= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); -- cgit v1.2.1 From 08b57e5387dfed356bc1f254e160c118a2174c2e Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Fri, 2 Oct 2009 11:31:05 +0200 Subject: BUG#47754, used number of parts instead of number of list values as end part for list partitioning in column list partitioning --- mysql-test/r/partition_column.result | 9 +++++++++ mysql-test/t/partition_column.test | 5 +++++ 2 files changed, 14 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result index 66308321a95..43538cb7c69 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -20,6 +20,15 @@ select * from t1 where a = 2; a b 2 NULL 2 2 +select * from t1 where a > 8; +a b +select * from t1 where a not between 8 and 8; +a b +2 NULL +2 2 +3 NULL +1 NULL +1 1 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/t/partition_column.test b/mysql-test/t/partition_column.test index ff625acdb1d..4edb03405b5 100644 --- a/mysql-test/t/partition_column.test +++ b/mysql-test/t/partition_column.test @@ -14,6 +14,9 @@ partition by list column_list(a,b) column_list(NULL, NULL)), partition p1 values in (column_list(1,1), column_list(2,2)), partition p2 values in (column_list(3, NULL), column_list(NULL, 1))); +# +# BUG#47754 Crash when selecting using NOT BETWEEN for column list partitioning +# insert into t1 values (3, NULL); insert into t1 values (NULL, 1); insert into t1 values (NULL, NULL); @@ -23,6 +26,8 @@ insert into t1 values (1,1); insert into t1 values (2,2); select * from t1 where a = 1; select * from t1 where a = 2; +select * from t1 where a > 8; +select * from t1 where a not between 8 and 8; show create table t1; drop table t1; -- cgit v1.2.1 From 04c6e8ff0746baa14c0017e2f37e2e2f77786a2b Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Fri, 2 Oct 2009 19:16:06 +0800 Subject: Post fix SEMISYNC_PLUGIN_OPT when semi-sync plugins are not found --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index d50195c7d16..1c14104957d 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1836,7 +1836,7 @@ sub environment_setup { { $ENV{'SEMISYNC_MASTER_PLUGIN'}= ""; $ENV{'SEMISYNC_SLAVE_PLUGIN'}= ""; - $ENV{'SEMISYNC_PLUGIN_OPT'}=""; + $ENV{'SEMISYNC_PLUGIN_OPT'}="--plugin-dir="; } # ---------------------------------------------------- -- cgit v1.2.1 From d0c5656eb8b729fd52583ca6262b348f686665d8 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Fri, 2 Oct 2009 16:15:54 +0300 Subject: fixing tests results: rpl_ndb_log, rpl_ndb_multi, sp_trans_log; adding replicate-ignore_server_ids specific tests --- mysql-test/r/sp_trans_log.result | 10 -- mysql-test/suite/rpl/r/rpl_server_id_ignore.result | 46 +++++++++ .../suite/rpl/t/rpl_server_id_ignore-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_server_id_ignore.test | 114 +++++++++++++++++++++ mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result | 2 + mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result | 4 +- 6 files changed, 165 insertions(+), 12 deletions(-) create mode 100644 mysql-test/suite/rpl/r/rpl_server_id_ignore.result create mode 100644 mysql-test/suite/rpl/t/rpl_server_id_ignore-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_server_id_ignore.test (limited to 'mysql-test') diff --git a/mysql-test/r/sp_trans_log.result b/mysql-test/r/sp_trans_log.result index 3eec6f70063..117f6de754a 100644 --- a/mysql-test/r/sp_trans_log.result +++ b/mysql-test/r/sp_trans_log.result @@ -14,15 +14,5 @@ end| reset master| insert into t2 values (bug23333(),1)| ERROR 23000: Duplicate entry '1' for key 'PRIMARY' -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.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`; ROLLBACK -select count(*),@a from t1 /* must be 1,1 */| -count(*) @a -1 1 drop table t1,t2; drop function if exists bug23333; diff --git a/mysql-test/suite/rpl/r/rpl_server_id_ignore.result b/mysql-test/suite/rpl/r/rpl_server_id_ignore.result new file mode 100644 index 00000000000..cba6571eb1a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_server_id_ignore.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; +master_id: 1 +stop slave; +*** --replicate-same-server-id and change master option can clash *** +change master to IGNORE_SERVER_IDS= (2, 1); +ERROR HY000: The requested server id 2 clashes with the slave startup option --replicate-same-server-id +*** must be empty due to the error *** +ignore server id list: +change master to IGNORE_SERVER_IDS= (10, 100); +*** must be 10, 100 *** +ignore server id list: 10, 100 +reset slave; +*** must be empty due to reset slave *** +ignore server id list: 10, 100 +change master to IGNORE_SERVER_IDS= (10, 100); +*** CHANGE MASTER with IGNORE_SERVER_IDS option overrides (does not increment) the previous setup *** +change master to IGNORE_SERVER_IDS= (5, 1, 4, 3, 1); +*** must be 1, 3, 4, 5 due to overriding policy *** +ignore server id list: 1, 3, 4, 5 +*** ignore master (server 1) queries for a while *** +start slave; +create table t1 (n int); +*** must be empty as the event is to be filtered out *** +show tables; +Tables_in_test +*** allowing events from master *** +stop slave; +reset slave; +change master to IGNORE_SERVER_IDS= (10, 100); +*** the list must remain (10, 100) after reset slave *** +change master to IGNORE_SERVER_IDS= (); +*** must be empty due to IGNORE_SERVER_IDS empty list *** +ignore server id list: +change master to master_host='127.0.0.1', master_port=MASTER_PORT, master_user='root'; +start slave; +*** must have caught create table *** +show tables; +Tables_in_test +t1 +drop table t1; +end of the tests diff --git a/mysql-test/suite/rpl/t/rpl_server_id_ignore-slave.opt b/mysql-test/suite/rpl/t/rpl_server_id_ignore-slave.opt new file mode 100644 index 00000000000..302889525dd --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_server_id_ignore-slave.opt @@ -0,0 +1 @@ +--disable-log-slave-updates --replicate-same-server-id diff --git a/mysql-test/suite/rpl/t/rpl_server_id_ignore.test b/mysql-test/suite/rpl/t/rpl_server_id_ignore.test new file mode 100644 index 00000000000..1b38bd34d3d --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_server_id_ignore.test @@ -0,0 +1,114 @@ +# This test checks that the slave rejects events originating +# by a server from the list of ignored originators (bug#27808 etc) +# +# phases of tests: +# +# 0. master_id new line in show slave status +# 1. syntax related: +# a. error reporting if options clash; +# b. overriding the old IGNORE_SERVER_IDS setup by the following +# CHANGE MASTER ... IGNORE_SERVER_IDS= (list); +# c. the old setup preserving by CHANGE MASTER w/o IGNORE_SERVER_IDS +# d. resetting the ignored server ids with the empty list arg to +# IGNORE_SERVER_IDS=() +# e. RESET SLAVE preserves the list +# 2. run time related: +# a. observing no processing events from a master listed in IGNORE_SERVER_IDS +# b. nullifying the list and resuming of taking binlog from the very beginning with +# executing events this time + +source include/master-slave.inc; + +connection slave; + +# a new line for master_id +let $master_id= query_get_value(SHOW SLAVE STATUS, Master_Server_Id, 1); +echo master_id: $master_id; + +stop slave; +--echo *** --replicate-same-server-id and change master option can clash *** +--error ER_SLAVE_IGNORE_SERVER_IDS +change master to IGNORE_SERVER_IDS= (2, 1); +--echo *** must be empty due to the error *** +let $ignore_list= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1); +echo ignore server id list: $ignore_list; + +change master to IGNORE_SERVER_IDS= (10, 100); +--echo *** must be 10, 100 *** +let $ignore_list= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1); +echo ignore server id list: $ignore_list; +reset slave; +--echo *** must be empty due to reset slave *** +let $ignore_list= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1); +echo ignore server id list: $ignore_list; +change master to IGNORE_SERVER_IDS= (10, 100); +--echo *** CHANGE MASTER with IGNORE_SERVER_IDS option overrides (does not increment) the previous setup *** +change master to IGNORE_SERVER_IDS= (5, 1, 4, 3, 1); +--echo *** must be 1, 3, 4, 5 due to overriding policy *** +let $ignore_list= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1); +echo ignore server id list: $ignore_list; +--echo *** ignore master (server 1) queries for a while *** +start slave; + +connection master; + +#connection slave; +sync_slave_with_master; +let $slave_relay_pos0= query_get_value(SHOW SLAVE STATUS, Relay_Log_Pos, 1); + +connection master; +create table t1 (n int); +let $master_binlog_end= query_get_value(SHOW MASTER STATUS, Position, 1); + +connection slave; +let $slave_param= Exec_Master_Log_Pos; +let $slave_param_value= $master_binlog_end; +source include/wait_for_slave_param.inc; +--echo *** must be empty as the event is to be filtered out *** +show tables; +--echo *** allowing events from master *** +let $slave_relay_pos1= query_get_value(SHOW SLAVE STATUS, Relay_Log_Pos, 1); +# +# checking stability of relay log pos +# +if (`select $slave_relay_pos1 - $slave_relay_pos0`) +{ + --echo Error: relay log position changed: $slave_relay_pos0, $slave_relay_pos1 + query_vertical show slave status; +} + +stop slave; +source include/wait_for_slave_to_stop.inc; +reset slave; +change master to IGNORE_SERVER_IDS= (10, 100); +--echo *** the list must remain (10, 100) after reset slave *** +let $ignore_list= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1); + +change master to IGNORE_SERVER_IDS= (); +--echo *** must be empty due to IGNORE_SERVER_IDS empty list *** +let $ignore_list= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1); +echo ignore server id list: $ignore_list; +--replace_result $MASTER_MYPORT MASTER_PORT +eval change master to master_host='127.0.0.1', master_port=$MASTER_MYPORT, master_user='root'; +start slave; + +connection master; + +#connection slave; +sync_slave_with_master; +--echo *** must have caught create table *** +show tables; + +# cleanup +connection master; +drop table t1; +#connection slave +sync_slave_with_master; + +--echo end of the tests + + + + + + diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result index 86752fbc4b8..301f4c2e45b 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result @@ -299,6 +299,8 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 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; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result index f8eb5ebdd89..66eeaa6357c 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result @@ -26,11 +26,11 @@ 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-bin.000001 +107 master-bin.000001 CHANGE MASTER TO master_port=, master_log_file = 'master-bin.000001', -master_log_pos = 106 ; +master_log_pos = 107 ; start slave; INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); DELETE FROM t1 WHERE c3 = 1; -- cgit v1.2.1 From 87a5e6863438798d23c83f26e23135a1c9cdab3b Mon Sep 17 00:00:00 2001 From: Serge Kozlov Date: Fri, 2 Oct 2009 23:24:40 +0400 Subject: WL#4641 Heartbeat testing This is backport for next-mr. The patch adds new test cases that cover replication heartbeat testing. --- mysql-test/include/have_ssl_communication.inc | 4 + .../suite/rpl/r/rpl_heartbeat_2slaves.result | 55 +++ mysql-test/suite/rpl/r/rpl_heartbeat_basic.result | 304 ++++++++++++ mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result | 27 ++ mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.cnf | 17 + mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test | 142 ++++++ mysql-test/suite/rpl/t/rpl_heartbeat_basic.cnf | 7 + mysql-test/suite/rpl/t/rpl_heartbeat_basic.test | 536 +++++++++++++++++++++ mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test | 54 +++ 9 files changed, 1146 insertions(+) create mode 100644 mysql-test/include/have_ssl_communication.inc create mode 100644 mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result create mode 100644 mysql-test/suite/rpl/r/rpl_heartbeat_basic.result create mode 100644 mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result create mode 100644 mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.cnf create mode 100644 mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test create mode 100644 mysql-test/suite/rpl/t/rpl_heartbeat_basic.cnf create mode 100644 mysql-test/suite/rpl/t/rpl_heartbeat_basic.test create mode 100644 mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test (limited to 'mysql-test') diff --git a/mysql-test/include/have_ssl_communication.inc b/mysql-test/include/have_ssl_communication.inc new file mode 100644 index 00000000000..6f2d5587a75 --- /dev/null +++ b/mysql-test/include/have_ssl_communication.inc @@ -0,0 +1,4 @@ +-- require r/have_ssl.require +disable_query_log; +show variables like 'have_ssl'; +enable_query_log; diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result b/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result new file mode 100644 index 00000000000..ecb7c62c488 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.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; + +*** Preparing *** +[on slave] +include/stop_slave.inc +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='MASTER_BINLOG'; +include/start_slave.inc +[on slave1] +STOP SLAVE; +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='MASTER_BINLOG'; +include/start_slave.inc + +*** 2 slaves *** +Slave has received heartbeat event +Slave1 has received heartbeat event +Slave has received more heartbeats than Slave1 (1 means 'yes'): 1 + +*** Master->data->Slave1->heartbeat->Slave: *** +[on slave1] +RESET MASTER; +[on slave] +include/stop_slave.inc +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE1_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.2, MASTER_LOG_FILE='SLAVE1_BINLOG'; +include/start_slave.inc +Slave has received heartbeat event +[on master] +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT); +INSERT INTO t1 VALUES (1, 'on master', ''); +SHOW TABLES; +Tables_in_test +t1 +[on slave1] +SHOW TABLES; +Tables_in_test +t1 +[on slave] +SHOW TABLES; +Tables_in_test +[on master] +creating updates on master and send to slave1 during 5 second +[on slave] +Slave has received heartbeats (1 means 'yes'): 1 + +*** Clean up *** +DROP TABLE t1; + +End of 6.0 test diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result new file mode 100644 index 00000000000..ddb2122c631 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result @@ -0,0 +1,304 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; + +*** Preparing *** +include/stop_slave.inc +RESET SLAVE; +SET @restore_slave_net_timeout=@@global.slave_net_timeout; +RESET MASTER; +SET @restore_slave_net_timeout=@@global.slave_net_timeout; +SET @restore_event_scheduler=@@global.event_scheduler; + +*** Default value *** +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root'; +slave_net_timeout/slave_heartbeat_timeout=2.0000 +RESET SLAVE; + +*** Reset slave affect *** +SET @@global.slave_net_timeout=30; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=5; +RESET SLAVE; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 15.000 + +*** Default value if slave_net_timeout changed *** +SET @@global.slave_net_timeout=50; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root'; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 25.000 +SET @@global.slave_net_timeout=@restore_slave_net_timeout; +RESET SLAVE; + +*** Warning if updated slave_net_timeout < slave_heartbeat_timeout *** +SET @@global.slave_net_timeout=FLOOR(SLAVE_HEARTBEAT_TIMEOUT)-1; +Warnings: +Warning 1624 The currect value for master_heartbeat_period exceeds the new value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout. +SET @@global.slave_net_timeout=@restore_slave_net_timeout; +RESET SLAVE; + +*** Warning if updated slave_heartbeat_timeout > slave_net_timeout *** +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=SLAVE_NET_TIMEOUT; +Warnings: +Warning 1624 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout. +RESET SLAVE; + +*** CHANGE MASTER statement only updates slave_heartbeat_period *** +SET @@global.slave_net_timeout=20; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=5; +SHOW VARIABLES LIKE 'slave_net_timeout'; +Variable_name Value +slave_net_timeout 20 +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 5.000 +SET @@global.slave_net_timeout=2*@@global.slave_net_timeout; +SHOW VARIABLES LIKE 'slave_net_timeout'; +Variable_name Value +slave_net_timeout 40 +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 5.000 +SET @@global.slave_net_timeout=@restore_slave_net_timeout; +RESET SLAVE; + +*** Update slave_net_timeout on master *** +SET @@global.slave_net_timeout=500; +SET @@global.slave_net_timeout=200; +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root'; +include/start_slave.inc +SHOW VARIABLES LIKE 'slave_net_timeout'; +Variable_name Value +slave_net_timeout 200 +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 100.000 +SET @@global.slave_net_timeout=@restore_slave_net_timeout; +include/stop_slave.inc +RESET SLAVE; +SET @@global.slave_net_timeout=@restore_slave_net_timeout; + +*** Start/stop slave *** +SET @@global.slave_net_timeout=100; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=20; +include/start_slave.inc +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 20.000 +include/stop_slave.inc +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 20.000 + +*** Reload slave *** +SET @@global.slave_net_timeout=50; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=30; +Reload slave +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 30.000 +SET @restore_slave_net_timeout=@@global.slave_net_timeout; + +*** Disable heartbeat *** +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 0.000 +SHOW STATUS LIKE 'slave_received_heartbeats'; +Variable_name Value +Slave_received_heartbeats 0 +include/start_slave.inc +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 0.000 +SHOW STATUS LIKE 'slave_received_heartbeats'; +Variable_name Value +Slave_received_heartbeats 0 +include/stop_slave.inc +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 0.000 +SHOW STATUS LIKE 'slave_received_heartbeats'; +Variable_name Value +Slave_received_heartbeats 0 +RESET SLAVE; +SELECT SLAVE_HEARTBEAT_TIMEOUT = 0 AS Result; +Result +0 + +*** Min slave_heartbeat_timeout *** +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.001; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 0.001 +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.0009; +Warnings: +Warning 1624 The requested value for the heartbeat period is less than 1 msec. The period is reset to zero which means no heartbeats will be sending +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 0.000 +RESET SLAVE; + +*** Max slave_heartbeat_timeout *** +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967; +Warnings: +Warning 1624 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout. +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +Variable_name Value +Slave_heartbeat_period 4294967.000 +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294968; +ERROR HY000: The requested value for the heartbeat period is negative or exceeds the maximum 4294967 seconds +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=8589935; +ERROR HY000: The requested value for the heartbeat period is negative or exceeds the maximum 4294967 seconds +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967296; +ERROR HY000: The requested value for the heartbeat period is negative or exceeds the maximum 4294967 seconds +RESET SLAVE; + +*** Misc incorrect values *** +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD='-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 +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD='123abc'; +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 ''123abc'' at line 1 +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=''; +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 +RESET SLAVE; + +*** Running slave *** +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1; +include/start_slave.inc +Heartbeat event received + +*** Stopped slave *** +include/stop_slave.inc +Number of received heartbeat events while slave stopped: 0 + +*** Started slave *** +include/start_slave.inc +Heartbeat event received + +*** Stopped IO thread *** +STOP SLAVE IO_THREAD; +Number of received heartbeat events while io thread stopped: 0 + +*** Started IO thread *** +START SLAVE IO_THREAD; +Heartbeat event received + +*** Stopped SQL thread *** +STOP SLAVE SQL_THREAD; +Heartbeat events are received while sql thread stopped (1 means 'yes'): 1 + +*** Started SQL thread *** +START SLAVE SQL_THREAD; +Heartbeat event received + +*** Stopped SQL thread by error *** +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT); +INSERT INTO t1 VALUES (1, 'on slave', NULL); +INSERT INTO t1 VALUES (1, 'on master', NULL); +Heartbeat events are received while sql thread stopped (1 means 'yes'): 1 +include/stop_slave.inc +DROP TABLE t1; + +*** Master send to slave *** +CREATE EVENT e1 +ON SCHEDULE EVERY 1 SECOND +DO +BEGIN +UPDATE test.t1 SET a = a + 1 WHERE a < 10; +END| +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1.5; +include/start_slave.inc +SET @@global.event_scheduler=1; +SHOW STATUS LIKE 'slave_received_heartbeats'; +Variable_name Value +Slave_received_heartbeats 0 +SHOW STATUS LIKE 'slave_received_heartbeats'; +Variable_name Value +Slave_received_heartbeats 0 +DELETE FROM t1; +DROP EVENT e1; + +*** Flush logs on slave *** +STOP SLAVE; +RESET SLAVE; +DROP TABLE t1; +DROP TABLE t1; +RESET MASTER; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.5; +include/start_slave.inc +Heartbeat events are received while rotation of relay logs (1 means 'yes'): 1 + +*** Compressed protocol *** +SET @@global.slave_compressed_protocol=1; +include/stop_slave.inc +RESET SLAVE; +SET @@global.slave_compressed_protocol=1; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1; +include/start_slave.inc +Heartbeat event received +SET @@global.slave_compressed_protocol=0; +SET @@global.slave_compressed_protocol=0; + +*** Reset master *** +STOP SLAVE; +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1; +include/start_slave.inc +RESET MASTER; +Heartbeat events are received after reset of master (1 means 'yes'): 1 + +*** Reload master *** +STOP SLAVE; +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1; +include/start_slave.inc +Heartbeat event received +Reload master +Heartbeat event received + +*** Circular replication *** +RESET MASTER; +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); +include/stop_slave.inc +RESET MASTER; +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='MASTER_BINLOG'; +RESET SLAVE; +CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=SLAVE_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='SLAVE_BINLOG'; +include/start_slave.inc +INSERT INTO t1 VALUES(1, 'on master'); +include/start_slave.inc +INSERT INTO t1 VALUES(2, 'on slave'); +SELECT * FROM t1 ORDER BY a; +a b +1 on master +2 on slave +SELECT * FROM t1 ORDER BY a; +a b +1 on master +2 on slave +Heartbeat event received on master +Heartbeat event received on slave +Slave has received more events than master (1 means 'yes'): 1 + +*** Clean up *** +include/stop_slave.inc +DROP TABLE t1; +include/stop_slave.inc +SET @@global.slave_net_timeout=@restore_slave_net_timeout; + +End of 6.0 test diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result b/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.result new file mode 100644 index 00000000000..42de3c459cb --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_heartbeat_ssl.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; + +*** Heartbeat over SSL *** +include/stop_slave.inc +RESET SLAVE; +CHANGE MASTER TO +MASTER_HOST='127.0.0.1', +MASTER_PORT=MASTER_PORT, +MASTER_USER='root', +MASTER_HEARTBEAT_PERIOD=0.1, +MASTER_LOG_FILE='MASTER_BINLOG', +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'; +include/start_slave.inc +Master_SSL_Allowed: Yes +Heartbeat event has received + +*** Clean up *** + +End of 6.0 test diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.cnf b/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.cnf new file mode 100644 index 00000000000..a3ed77c8bd2 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.cnf @@ -0,0 +1,17 @@ +!include ../my.cnf + +[mysqld.1] +server_id=1 + +[mysqld.2] +server_id=2 + +[mysqld.3] +server_id=3 + +[ENV] +SLAVE_MYPORT1= @mysqld.3.port +SLAVE_MYSOCK1= @mysqld.3.socket + + + diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test b/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test new file mode 100644 index 00000000000..81737feea9e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test @@ -0,0 +1,142 @@ +############################################################# +# Author: Serge Kozlov +# Date: 02/19/2009 +# Purpose: Testing heartbeat for schema +# 1 master and 2 slaves +############################################################# +--source include/master-slave.inc +--echo + +--echo *** Preparing *** +--connection master +let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); +--connection slave +--echo [on slave] +--source include/stop_slave.inc +RESET SLAVE; +--replace_result $MASTER_MYPORT MASTER_PORT $binlog_file MASTER_BINLOG +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='$binlog_file'; +--source include/start_slave.inc +--disconnect slave1 +--connect(slave1,127.0.0.1,root,,test,$SLAVE_MYPORT1,) +--connection slave1 +--echo [on slave1] +--disable_warnings +STOP SLAVE; +--enable_warnings +RESET SLAVE; +--replace_result $MASTER_MYPORT MASTER_PORT $binlog_file MASTER_BINLOG +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$binlog_file'; +--source include/start_slave.inc +--echo + +# +# Testing heartbeat +# + +# Check that heartbeat events sent to both slaves with correct periods +--echo *** 2 slaves *** +--connection slave +let $status_var= slave_received_heartbeats; +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $status_var_comparsion= >; +--source include/wait_for_status_var.inc +--echo Slave has received heartbeat event +--connection slave1 +let $status_var= slave_received_heartbeats; +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $status_var_comparsion= >; +--source include/wait_for_status_var.inc +let $slave1_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +--echo Slave1 has received heartbeat event +--connection slave +let $slave_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $result= query_get_value(SELECT ($slave_rcvd_heartbeats DIV $slave1_rcvd_heartbeats) > 1 AS Result, Result, 1); +--echo Slave has received more heartbeats than Slave1 (1 means 'yes'): $result +--echo + + +# Create topology A->B->C and check that C receives heartbeat while B gets data +# Slave1 (B) started w/o --log-slave-updates because B should not send data from A to C +--echo *** Master->data->Slave1->heartbeat->Slave: *** +--connection slave1 +--echo [on slave1] +RESET MASTER; +let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1); +--connection slave +--echo [on slave] +--source include/stop_slave.inc +RESET SLAVE; +--replace_result $SLAVE_MYPORT1 SLAVE1_PORT $binlog_file SLAVE1_BINLOG +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT1, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.2, MASTER_LOG_FILE='$binlog_file'; +--source include/start_slave.inc +# Check heartbeat for new replication channel slave1->slave +let $status_var= slave_received_heartbeats; +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $status_var_comparsion= >; +--source include/wait_for_status_var.inc +--echo Slave has received heartbeat event +--connection master +--echo [on master] +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT); +INSERT INTO t1 VALUES (1, 'on master', ''); +--save_master_pos +SHOW TABLES; +--connection slave1 +--sync_with_master 0 +--echo [on slave1] +SHOW TABLES; +let $slave_pos_before= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); +--save_master_pos +--connection slave +--sync_with_master 0 +--echo [on slave] +SHOW TABLES; +--connection master +--echo [on master] +--echo creating updates on master and send to slave1 during 5 second +# Generate events on master and send to slave1 during 5 second +let $i= 1; +let $j= 1; +let $k= 1; +--disable_query_log +while ($i) { + eval SET @c_text=REPEAT('1234567890', $j); + eval UPDATE t1 SET a=$j, c=@c_text; + --connection slave1 + let $slave_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); + if (`SELECT ($k*($slave_pos - $slave_pos_before)) > 0`) { + --connection slave + let $slave_rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); + let $k= 0; + let $time_before = `SELECT NOW()`; + } + if (`SELECT ((1-$k)*TIMESTAMPDIFF(SECOND,'$time_before',NOW())) > 5`) { + --connection slave + let $slave_rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); + let $i= 0; + } + --connection master + inc $j; + sleep 0.1; +} +--enable_query_log +--connection slave +--echo [on slave] +let $result= query_get_value(SELECT ($slave_rcvd_heartbeats_after - $slave_rcvd_heartbeats_before) > 0 AS Result, Result, 1); +--echo Slave has received heartbeats (1 means 'yes'): $result +--echo + +# +# Clean up +# +--echo *** Clean up *** +--connection master +DROP TABLE t1; +--save_master_pos +--connection slave1 +--sync_with_master 0 +--echo + +# End of 6.0 test +--echo End of 6.0 test diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.cnf b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.cnf new file mode 100644 index 00000000000..a4a291bca79 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.cnf @@ -0,0 +1,7 @@ +!include ../my.cnf + +[mysqld.1] +log-slave-updates + +[mysqld.2] +log-slave-updates diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test new file mode 100644 index 00000000000..198f1208344 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test @@ -0,0 +1,536 @@ +############################################################# +# Author: Serge Kozlov +# Date: 02/19/2009 +# Purpose: Testing basic functionality of heartbeat. +# Description: +# * Testing different values for slave_heartbeat_period. +# * How to affect various statements to slave_heartbeat_period +# * Various states of slave and heartbeat +# * Various states of master and heartbeat +# * Circular replication +############################################################# +--source include/master-slave.inc +--echo + +--echo *** Preparing *** +--connection slave +--source include/stop_slave.inc +RESET SLAVE; +SET @restore_slave_net_timeout=@@global.slave_net_timeout; +let $slave_heartbeat_timeout= query_get_value(SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period', Value, 1); +--disable_query_log +eval SET @restore_slave_heartbeat_timeout=$slave_heartbeat_timeout; +--enable_query_log + +--connection master +RESET MASTER; +SET @restore_slave_net_timeout=@@global.slave_net_timeout; +SET @restore_event_scheduler=@@global.event_scheduler; +--echo + +# +# Test slave_heartbeat_period +# + +--connection slave + +# Default value of slave_heartbeat_timeout = slave_net_timeout/2 +--echo *** Default value *** +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root'; +let $slave_net_timeout= query_get_value(SHOW VARIABLES LIKE 'slave_net_timeout', Value, 1); +let $slave_heartbeat_timeout= query_get_value(SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period', Value, 1); +let $result= query_get_value(SELECT $slave_net_timeout/$slave_heartbeat_timeout AS Result, Result, 1); +--echo slave_net_timeout/slave_heartbeat_timeout=$result +RESET SLAVE; +--echo + +# Reset slave set slave_heartbeat_timeout = slave_net_timeout/2 +--echo *** Reset slave affect *** +--disable_warnings +SET @@global.slave_net_timeout=30; +--enable_warnings +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=5; +RESET SLAVE; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +--echo + +# Check default value of slave_heartbeat_timeout if slave_net_timeout is changed +--echo *** Default value if slave_net_timeout changed *** +--disable_warnings +SET @@global.slave_net_timeout=50; +--enable_warnings +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root'; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +SET @@global.slave_net_timeout=@restore_slave_net_timeout; +RESET SLAVE; +--echo + +# Set slave_net_timeout less than current value of slave_heartbeat_period +--echo *** Warning if updated slave_net_timeout < slave_heartbeat_timeout *** +let $slave_heartbeat_timeout= query_get_value(SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period', Value, 1); +--replace_result $slave_heartbeat_timeout SLAVE_HEARTBEAT_TIMEOUT +eval SET @@global.slave_net_timeout=FLOOR($slave_heartbeat_timeout)-1; +SET @@global.slave_net_timeout=@restore_slave_net_timeout; +RESET SLAVE; +--echo + +# Set value of slave_heartbeat_period greater than slave_net_timeout +--echo *** Warning if updated slave_heartbeat_timeout > slave_net_timeout *** +let $slave_net_timeout= query_get_value(SHOW VARIABLES LIKE 'slave_net_timeout', Value, 1); +inc $slave_net_timeout; +--replace_result $MASTER_MYPORT MASTER_PORT $slave_net_timeout SLAVE_NET_TIMEOUT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=$slave_net_timeout; +RESET SLAVE; +--echo + +# Changing of slave_net_timeout shouldn't affect to current value of slave_heartbeat_period +--echo *** CHANGE MASTER statement only updates slave_heartbeat_period *** +--disable_warnings +SET @@global.slave_net_timeout=20; +--enable_warnings +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=5; +SHOW VARIABLES LIKE 'slave_net_timeout'; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +SET @@global.slave_net_timeout=2*@@global.slave_net_timeout; +SHOW VARIABLES LIKE 'slave_net_timeout'; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +SET @@global.slave_net_timeout=@restore_slave_net_timeout; +RESET SLAVE; +--echo + +# Master value of slave_net_timeout shouldn't affect to slave's slave_heartbeat_period +--echo *** Update slave_net_timeout on master *** +--connection master +--disable_warnings +SET @@global.slave_net_timeout=500; +--enable_warnings +--connection slave +SET @@global.slave_net_timeout=200; +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'; +--source include/start_slave.inc +--sync_with_master +SHOW VARIABLES LIKE 'slave_net_timeout'; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +SET @@global.slave_net_timeout=@restore_slave_net_timeout; +--source include/stop_slave.inc +RESET SLAVE; +--connection master +SET @@global.slave_net_timeout=@restore_slave_net_timeout; +--echo + +# Start/stop slave shouldn't change slave_heartbeat_period +--echo *** Start/stop slave *** +--connection slave +--disable_warnings +SET @@global.slave_net_timeout=100; +--enable_warnings +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=20; +--source include/start_slave.inc +--sync_with_master +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +--source include/stop_slave.inc +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +--echo + +# Reload slave shouldn't change slave_heartbeat_period +--echo *** Reload slave *** +--connection slave +--disable_warnings +SET @@global.slave_net_timeout=50; +--enable_warnings +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=30; +--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect +wait +EOF +--echo Reload slave +--shutdown_server 10 +--source include/wait_until_disconnected.inc +--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect +restart +EOF +--enable_reconnect +--source include/wait_until_connected_again.inc +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +SET @restore_slave_net_timeout=@@global.slave_net_timeout; +--echo + +# Disable heartbeat +--echo *** Disable heartbeat *** +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +SHOW STATUS LIKE 'slave_received_heartbeats'; +--source include/start_slave.inc +--sync_with_master +--sleep 2 +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +SHOW STATUS LIKE 'slave_received_heartbeats'; +--source include/stop_slave.inc +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +SHOW STATUS LIKE 'slave_received_heartbeats'; +RESET SLAVE; +let $slave_heartbeat_timeout= query_get_value(SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period', Value, 1); +--replace_result $slave_heartbeat_timeout SLAVE_HEARTBEAT_TIMEOUT +--eval SELECT $slave_heartbeat_timeout = 0 AS Result +--echo + +# +# Check limits for slave_heartbeat_timeout +# + +--echo *** Min slave_heartbeat_timeout *** +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.001; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +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', MASTER_HEARTBEAT_PERIOD=0.0009; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +RESET SLAVE; +--echo + +--echo *** Max slave_heartbeat_timeout *** +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967; +SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; +RESET SLAVE; +--replace_result $MASTER_MYPORT MASTER_PORT +--error ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294968; +RESET SLAVE; +# Check double size of max allowed value for master_heartbeat_period +--replace_result $MASTER_MYPORT MASTER_PORT +--error ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=8589935; +RESET SLAVE; +# Check 2^32 +--replace_result $MASTER_MYPORT MASTER_PORT +--error ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967296; +RESET SLAVE; +--echo + +--echo *** Misc incorrect values *** +--replace_result $MASTER_MYPORT MASTER_PORT +--error ER_PARSE_ERROR +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD='-1'; +RESET SLAVE; +--replace_result $MASTER_MYPORT MASTER_PORT +--error ER_PARSE_ERROR +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD='123abc'; +RESET SLAVE; +--replace_result $MASTER_MYPORT MASTER_PORT +--error ER_PARSE_ERROR +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=''; +RESET SLAVE; +--echo + +# +# Testing heartbeat +# + +# Check received heartbeat events for running slave +--echo *** Running slave *** +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1; +--source include/start_slave.inc +--sync_with_master +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $status_var= slave_received_heartbeats; +let $status_var_comparsion= >; +--source include/wait_for_status_var.inc +--echo Heartbeat event received +--echo + +# Check received heartbeat events for stopped slave +--echo *** Stopped slave *** +--source include/stop_slave.inc +let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +sleep 2; +let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) AS Result, Result, 1); +--echo Number of received heartbeat events while slave stopped: $result +--echo + +# Check received heartbeat events for started slave +--echo *** Started slave *** +--source include/start_slave.inc +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +--source include/wait_for_status_var.inc +--echo Heartbeat event received +--echo + +# Check received heartbeat events for stopped IO thread +--echo *** Stopped IO thread *** +STOP SLAVE IO_THREAD; +--source include/wait_for_slave_io_to_stop.inc +let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +sleep 2; +let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) AS Result, Result, 1); +--echo Number of received heartbeat events while io thread stopped: $result +--echo + +# Check received heartbeat events for started IO thread +--echo *** Started IO thread *** +START SLAVE IO_THREAD; +--source include/wait_for_slave_io_to_start.inc +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +--source include/wait_for_status_var.inc +--echo Heartbeat event received +--echo + +# Check received heartbeat events for stopped SQL thread +--echo *** Stopped SQL thread *** +STOP SLAVE SQL_THREAD; +--source include/wait_for_slave_sql_to_stop.inc +let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +sleep 2; +let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1); +--echo Heartbeat events are received while sql thread stopped (1 means 'yes'): $result +--echo + +# Check received heartbeat events for started SQL thread +--echo *** Started SQL thread *** +START SLAVE SQL_THREAD; +--source include/wait_for_slave_sql_to_start.inc +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +--source include/wait_for_status_var.inc +--echo Heartbeat event received +--echo + +# Check received heartbeat event for stopped SQL thread by error +--echo *** Stopped SQL thread by error *** +--connection master +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT); +--sync_slave_with_master +INSERT INTO t1 VALUES (1, 'on slave', NULL); +--connection master +INSERT INTO t1 VALUES (1, 'on master', NULL); +--connection slave +let $slave_errno= ER_DUP_ENTRY +--source include/wait_for_slave_sql_error.inc +let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +sleep 2; +let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1); +--echo Heartbeat events are received while sql thread stopped (1 means 'yes'): $result +--source include/stop_slave.inc +DROP TABLE t1; +--echo + +# Check received heartbeat events while master send events to slave +--echo *** Master send to slave *** +--connection master +# Create the event that will update table t1 every second +DELIMITER |; +CREATE EVENT e1 + ON SCHEDULE EVERY 1 SECOND + DO + BEGIN + UPDATE test.t1 SET a = a + 1 WHERE a < 10; + END| +DELIMITER ;| +--connection slave +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', MASTER_HEARTBEAT_PERIOD=1.5; +--source include/start_slave.inc +--connection master +# Enable scheduler +SET @@global.event_scheduler=1; +--connection slave +SHOW STATUS LIKE 'slave_received_heartbeats'; +--sync_with_master +# Wait some updates for table t1 from master +let $wait_condition= SELECT COUNT(*)=1 FROM t1 WHERE a > 5; +--source include/wait_condition.inc +SHOW STATUS LIKE 'slave_received_heartbeats'; +--connection master +DELETE FROM t1; +DROP EVENT e1; +--echo + +# Check received heartbeat events while logs flushed on slave +--connection slave +--echo *** Flush logs on slave *** +STOP SLAVE; +RESET SLAVE; +DROP TABLE t1; +--connection master +DROP TABLE t1; +RESET MASTER; +--connection slave +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.5; +let $slave_param_comparison= =; +--source include/start_slave.inc +let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +# Flush logs every 0.1 second during 5 sec +--disable_query_log +let $i=50; +while ($i) { + FLUSH LOGS; + dec $i; + sleep 0.1; +} +--enable_query_log +let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1); +--echo Heartbeat events are received while rotation of relay logs (1 means 'yes'): $result +--echo + +# Use compressed protocol between master and slave +--echo *** Compressed protocol *** +--connection master +SET @@global.slave_compressed_protocol=1; +--connection slave +--source include/stop_slave.inc +RESET SLAVE; +SET @@global.slave_compressed_protocol=1; +--replace_result $MASTER_MYPORT MASTER_PORT +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1; +--source include/start_slave.inc +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $status_var= slave_received_heartbeats; +let $status_var_comparsion= >; +--source include/wait_for_status_var.inc +--echo Heartbeat event received +SET @@global.slave_compressed_protocol=0; +--connection master +SET @@global.slave_compressed_protocol=0; +--echo + + +# Check received heartbeat events after reset of master +--echo *** Reset master *** +--connection slave +STOP SLAVE; +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', MASTER_HEARTBEAT_PERIOD=0.1; +--source include/start_slave.inc +let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +--connection master +RESET MASTER; +--enable_query_log +--sync_slave_with_master +--sleep 2 +let $rcvd_heartbeats_after= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $result= query_get_value(SELECT ($rcvd_heartbeats_after - $rcvd_heartbeats_before) > 0 AS Result, Result, 1); +--echo Heartbeat events are received after reset of master (1 means 'yes'): $result +--echo + +# Reloaded master should restore heartbeat +--echo *** Reload master *** +--connection slave +STOP SLAVE; +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', MASTER_HEARTBEAT_PERIOD=0.1; +--source include/start_slave.inc +# Wait until slave_received_heartbeats will be incremented +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $status_var= slave_received_heartbeats; +let $status_var_comparsion= >; +--source include/wait_for_status_var.inc +--echo Heartbeat event received +--connection master +--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +wait +EOF +--echo Reload master +--shutdown_server 10 +--source include/wait_until_disconnected.inc +--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +restart +EOF +--enable_reconnect +--source include/wait_until_connected_again.inc +--connection slave +# Wait until slave_received_heartbeats will be incremented +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $status_var= slave_received_heartbeats; +let $status_var_comparsion= >; +--source include/wait_for_status_var.inc +--echo Heartbeat event received +--echo + +# Circular replication +--echo *** Circular replication *** +# Configure circular replication +--connection master +RESET MASTER; +let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1); +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10)); +--sync_slave_with_master +--source include/stop_slave.inc +RESET MASTER; +let $slave_binlog= query_get_value(SHOW MASTER STATUS, File, 1); +RESET SLAVE; +--replace_result $MASTER_MYPORT MASTER_PORT $master_binlog MASTER_BINLOG +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.1, MASTER_LOG_FILE='$master_binlog'; +--connection master +RESET SLAVE; +--replace_result $SLAVE_MYPORT SLAVE_PORT $slave_binlog SLAVE_BINLOG +eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog'; +--source include/start_slave.inc +# Insert data on master and on slave and make sure that it replicated for both directions +INSERT INTO t1 VALUES(1, 'on master'); +--save_master_pos +--connection slave +--source include/start_slave.inc +--sync_with_master +INSERT INTO t1 VALUES(2, 'on slave'); +--save_master_pos +--connection master +--sync_with_master +SELECT * FROM t1 ORDER BY a; +let $master_rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +--connection slave +SELECT * FROM t1 ORDER BY a; +# Wait heartbeat event on master +--connection master +let $status_var= slave_received_heartbeats; +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $status_var_comparsion= >; +--source include/wait_for_status_var.inc +--echo Heartbeat event received on master +let $master_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +# Wait heartbeat event on slave +--connection slave +let $status_var= slave_received_heartbeats; +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $status_var_comparsion= >; +--source include/wait_for_status_var.inc +--echo Heartbeat event received on slave +let $slave_rcvd_heartbeats= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +# Heartbeat period on slave less than on master therefore number of received events on slave +# should be greater than on master +let $result= query_get_value(SELECT ($slave_rcvd_heartbeats DIV $master_rcvd_heartbeats) > 1 AS Result, Result, 1); +--echo Slave has received more events than master (1 means 'yes'): $result +--echo + +# +# Clean up and restore system variables +# +--echo *** Clean up *** +--connection master +--source include/stop_slave.inc +DROP TABLE t1; +--sync_slave_with_master +--source include/stop_slave.inc +SET @@global.slave_net_timeout=@restore_slave_net_timeout; +--echo + +# End of 6.0 test +--echo End of 6.0 test diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test b/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test new file mode 100644 index 00000000000..6460b157b52 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test @@ -0,0 +1,54 @@ +############################################################# +# Author: Serge Kozlov +# Date: 02/19/2009 +# Purpose: Testing basic functionality of heartbeat over SSL +############################################################# +--source include/have_ssl_communication.inc +--source include/master-slave.inc +--echo + +# +# Testing heartbeat over SSL +# + +# Heartbeat over SSL +--echo *** Heartbeat over SSL *** +--connection master +let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1); +--connection slave +--source include/stop_slave.inc +RESET SLAVE; +# Connect to master with SSL +--replace_result $MASTER_MYPORT MASTER_PORT $MYSQL_TEST_DIR MYSQL_TEST_DIR $master_binlog MASTER_BINLOG +eval CHANGE MASTER TO + MASTER_HOST='127.0.0.1', + MASTER_PORT=$MASTER_MYPORT, + MASTER_USER='root', + MASTER_HEARTBEAT_PERIOD=0.1, + MASTER_LOG_FILE='$master_binlog', + 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'; +--source include/start_slave.inc +# Check SSL state of slave +let $slave_ssl_status= query_get_value(SHOW SLAVE STATUS, Master_SSL_Allowed, 1); +--echo Master_SSL_Allowed: $slave_ssl_status +# Wait until hearbeat event will received +let $status_var_value= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1); +let $status_var= slave_received_heartbeats; +let $status_var_comparsion= >; +--source include/wait_for_status_var.inc +--echo Heartbeat event has received +--echo + +# +# Clean up +# +--echo *** Clean up *** +--connection master +--sync_slave_with_master +--echo + +# End of 6.0 test +--echo End of 6.0 test -- cgit v1.2.1 From ab6d244f518079524daf74242921063fd71fc929 Mon Sep 17 00:00:00 2001 From: He Zhenxing Date: Sat, 3 Oct 2009 09:40:32 +0800 Subject: Post fix result file --- mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result index 482d43c8f10..4675216f9a2 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result @@ -4,7 +4,8 @@ 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 database if exists mysqltest1; +create database mysqltest1; DROP PROCEDURE IF EXISTS mysqltest1.p1; DROP PROCEDURE IF EXISTS mysqltest1.p2; DROP TABLE IF EXISTS mysqltest1.t2; -- cgit v1.2.1 From d77bd29c69ef749469faa7fb07294b81152aed46 Mon Sep 17 00:00:00 2001 From: Serge Kozlov Date: Sat, 3 Oct 2009 22:21:44 +0400 Subject: WL#3788 It is backport patch. This adds new test case for testing affects of some variables to replication. --- mysql-test/suite/rpl/r/rpl_spec_variables.result | 225 +++++++++++++++ .../suite/rpl/t/rpl_spec_variables-slave.opt | 1 + mysql-test/suite/rpl/t/rpl_spec_variables.test | 306 +++++++++++++++++++++ 3 files changed, 532 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_spec_variables.result create mode 100644 mysql-test/suite/rpl/t/rpl_spec_variables-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_spec_variables.test (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_spec_variables.result b/mysql-test/suite/rpl/r/rpl_spec_variables.result new file mode 100644 index 00000000000..ea2778bf71c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_spec_variables.result @@ -0,0 +1,225 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; + +* auto_increment_increment, auto_increment_offset * +SET @@global.auto_increment_increment=2; +SET @@session.auto_increment_increment=2; +SET @@global.auto_increment_offset=10; +SET @@session.auto_increment_offset=10; +SET @@global.auto_increment_increment=3; +SET @@session.auto_increment_increment=3; +SET @@global.auto_increment_offset=20; +SET @@session.auto_increment_offset=20; +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t1 (b) VALUES ('master'); +INSERT INTO t1 (b) VALUES ('master'); +SELECT * FROM t1 ORDER BY a; +a b +2 master +4 master +CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t1 (b) VALUES ('slave'); +INSERT INTO t1 (b) VALUES ('slave'); +INSERT INTO t2 (b) VALUES ('slave'); +INSERT INTO t2 (b) VALUES ('slave'); +SELECT * FROM t1 ORDER BY a; +a b +2 master +4 master +7 slave +10 slave +SELECT * FROM t2 ORDER BY a; +a b +1 slave +4 slave +DROP TABLE IF EXISTS t1,t2; +SET @@global.auto_increment_increment=1; +SET @@session.auto_increment_increment=1; +SET @@global.auto_increment_offset=1; +SET @@session.auto_increment_offset=1; +SET @@global.auto_increment_increment=1; +SET @@session.auto_increment_increment=1; +SET @@global.auto_increment_offset=1; +SET @@session.auto_increment_offset=1; +SET auto_increment_increment=1; +SET auto_increment_offset=1; + +* character_set_database, collation_server * +SET @restore_master_character_set_database=@@global.character_set_database; +SET @restore_master_collation_server=@@global.collation_server; +SET @@global.character_set_database=latin1; +SET @@session.character_set_database=latin1; +SET @@global.collation_server=latin1_german1_ci; +SET @@session.collation_server=latin1_german1_ci; +SET @restore_slave_character_set_database=@@global.character_set_database; +SET @restore_slave_collation_server=@@global.collation_server; +SET @@global.character_set_database=utf8; +SET @@session.character_set_database=utf8; +SET @@global.collation_server=utf8_bin; +SET @@session.collation_server=utf8_bin; +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(10) COLLATE latin1_german1_ci DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci +CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(10) COLLATE latin1_german1_ci DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) NOT NULL, + `b` varchar(10) COLLATE utf8_bin DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin +SET @@global.collation_server=latin1_swedish_ci; +SET @@session.collation_server=latin1_swedish_ci; +SET @@global.collation_server=latin1_swedish_ci; +SET @@session.collation_server=latin1_swedish_ci; +DROP TABLE IF EXISTS t1,t2; + +* default_week_format * +SET @@global.default_week_format=0; +SET @@session.default_week_format=0; +SET @@global.default_week_format=1; +SET @@session.default_week_format=1; +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1, 'master ', WEEK('2008-01-07')); +SELECT * FROM t1 ORDER BY a; +a b c +1 master 1 +INSERT INTO t1 VALUES (2, 'slave ', WEEK('2008-01-07')); +SELECT * FROM t1 ORDER BY a; +a b c +1 master 1 +2 slave 2 +DROP TABLE t1; +SET @@global.default_week_format=0; +SET @@session.default_week_format=0; + +* local_infile * +SET @@global.local_infile=0; +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(20), c CHAR(254)) ENGINE=MyISAM; +LOAD DATA LOCAL INFILE 'FILE' INTO TABLE t1 (b); +SELECT COUNT(*) FROM t1; +COUNT(*) +70 +LOAD DATA LOCAL INFILE 'FILE2' INTO TABLE t1 (b); +ERROR 42000: The used command is not allowed with this MySQL version +SELECT COUNT(*) FROM t1; +COUNT(*) +70 +SET @@global.local_infile=1; +DROP TABLE t1; + +* max_heap_table_size * +SET @restore_slave_max_heap_table_size=@@global.max_heap_table_size; +SET @@global.max_heap_table_size=16384; +SET @@session.max_heap_table_size=16384; +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), c CHAR(254)) ENGINE=MEMORY; +SELECT COUNT(*)=2000 FROM t1; +COUNT(*)=2000 +1 +SELECT COUNT(*)=2000 FROM t1 WHERE b='master' GROUP BY b ORDER BY b; +COUNT(*)=2000 +1 +SELECT COUNT(*)<2000 AND COUNT(*)>0 FROM t1 WHERE b='slave' GROUP BY b ORDER BY b; +COUNT(*)<2000 AND COUNT(*)>0 +1 +SELECT COUNT(*)<2000 AND COUNT(*)>0 FROM t2 WHERE b='slave' GROUP BY b ORDER BY b; +COUNT(*)<2000 AND COUNT(*)>0 +1 +DROP TABLE IF EXISTS t1,t2; + +* storage_engine * +SET @restore_master_storage_engine=@@global.storage_engine; +SET @@global.storage_engine=InnoDB; +SET @@session.storage_engine=InnoDB; +SET @restore_slave_storage_engine=@@global.storage_engine; +SET @@global.storage_engine=Memory; +SET @@session.storage_engine=Memory; +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)); +CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB; +CREATE TABLE t3 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(10) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) NOT NULL, + `b` varchar(10) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(10) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) NOT NULL, + `b` varchar(10) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `a` int(11) NOT NULL, + `b` varchar(10) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +SET @@global.storage_engine=InnoDB; +SET @@session.storage_engine=InnoDB; +DROP TABLE IF EXISTS t1,t2,t3; + +* sql_mode * +SET @@global.sql_mode=ANSI; +SET @@session.sql_mode=ANSI; +SET @@global.sql_mode=TRADITIONAL; +SET @@session.sql_mode=TRADITIONAL; +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c DATE); +INSERT INTO t1 VALUES (1, 'master', '0000-00-00'); +SELECT * FROM t1 ORDER BY a; +a b c +1 master 0000-00-00 +INSERT INTO t1 VALUES (1, 'slave', '0000-00-00'); +ERROR 22007: Incorrect date value: '0000-00-00' for column 'c' at row 1 +SELECT * FROM t1 ORDER BY a; +a b c +1 master 0000-00-00 +SET @@global.sql_mode=''; +SET @@session.sql_mode=''; +SET @@global.sql_mode=''; +SET @@session.sql_mode=''; +DROP TABLE t1; + +*** clean up *** +SET @@global.character_set_database=@restore_master_character_set_database; +SET @@global.collation_server=@restore_master_collation_server; +SET @@global.storage_engine=@restore_master_storage_engine; +SET @@global.character_set_database=@restore_slave_character_set_database; +SET @@global.collation_server=@restore_slave_collation_server; +SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size; +SET @@global.storage_engine=@restore_slave_storage_engine; + +call mtr.add_suppression("The table 't[12]' is full"); diff --git a/mysql-test/suite/rpl/t/rpl_spec_variables-slave.opt b/mysql-test/suite/rpl/t/rpl_spec_variables-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_spec_variables-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/suite/rpl/t/rpl_spec_variables.test b/mysql-test/suite/rpl/t/rpl_spec_variables.test new file mode 100644 index 00000000000..a60738316c8 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_spec_variables.test @@ -0,0 +1,306 @@ +############################################################# +# Author: Serge Kozlov +# Date: 07/01/2008 +# Purpose: Testing possible affects of some system dynamic +# variables to the replication. +# Scenario for each variable: +# 1) Set different values for master and slave +# 2) Create and replicate a data from master to slave +# 3) Check results on master and slave: changes on slave +# shouldn't be affected to replicated data. +############################################################# +--source include/have_innodb.inc +--source include/master-slave.inc +--echo + +# +# AUTO_INCREMENT +# +--echo * auto_increment_increment, auto_increment_offset * + +--connection master +SET @@global.auto_increment_increment=2; +SET @@session.auto_increment_increment=2; +SET @@global.auto_increment_offset=10; +SET @@session.auto_increment_offset=10; + +--connection slave +SET @@global.auto_increment_increment=3; +SET @@session.auto_increment_increment=3; +SET @@global.auto_increment_offset=20; +SET @@session.auto_increment_offset=20; + +--connection master +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t1 (b) VALUES ('master'); +INSERT INTO t1 (b) VALUES ('master'); +SELECT * FROM t1 ORDER BY a; + +--sync_slave_with_master +CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; +INSERT INTO t1 (b) VALUES ('slave'); +INSERT INTO t1 (b) VALUES ('slave'); +INSERT INTO t2 (b) VALUES ('slave'); +INSERT INTO t2 (b) VALUES ('slave'); +SELECT * FROM t1 ORDER BY a; +SELECT * FROM t2 ORDER BY a; + +--connection master +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings +SET @@global.auto_increment_increment=1; +SET @@session.auto_increment_increment=1; +SET @@global.auto_increment_offset=1; +SET @@session.auto_increment_offset=1; + +--connection slave +SET @@global.auto_increment_increment=1; +SET @@session.auto_increment_increment=1; +SET @@global.auto_increment_offset=1; +SET @@session.auto_increment_offset=1; + +--connection slave +SET auto_increment_increment=1; +SET auto_increment_offset=1; +--echo + +# +# CHARACTER_SET_DATABASE, COLLATION_SERVER +# +--echo * character_set_database, collation_server * + +--connection master +SET @restore_master_character_set_database=@@global.character_set_database; +SET @restore_master_collation_server=@@global.collation_server; +SET @@global.character_set_database=latin1; +SET @@session.character_set_database=latin1; +SET @@global.collation_server=latin1_german1_ci; +SET @@session.collation_server=latin1_german1_ci; + +--connection slave +SET @restore_slave_character_set_database=@@global.character_set_database; +SET @restore_slave_collation_server=@@global.collation_server; +SET @@global.character_set_database=utf8; +SET @@session.character_set_database=utf8; +SET @@global.collation_server=utf8_bin; +SET @@session.collation_server=utf8_bin; + +--connection master +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; +SHOW CREATE TABLE t1; + +--sync_slave_with_master +CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM; +SHOW CREATE TABLE t1; +SHOW CREATE TABLE t2; + +SET @@global.collation_server=latin1_swedish_ci; +SET @@session.collation_server=latin1_swedish_ci; + +--connection master +SET @@global.collation_server=latin1_swedish_ci; +SET @@session.collation_server=latin1_swedish_ci; + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings +--echo + +# +# DEFAULT_WEEK_FORMAT +# +--echo * default_week_format * + +--connection master +SET @@global.default_week_format=0; +SET @@session.default_week_format=0; + +--connection slave +SET @@global.default_week_format=1; +SET @@session.default_week_format=1; + +--connection master +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1, 'master ', WEEK('2008-01-07')); +SELECT * FROM t1 ORDER BY a; + +--sync_slave_with_master +INSERT INTO t1 VALUES (2, 'slave ', WEEK('2008-01-07')); +SELECT * FROM t1 ORDER BY a; + +--connection master +DROP TABLE t1; + +--connection slave +SET @@global.default_week_format=0; +SET @@session.default_week_format=0; +--echo + +# +# LOCAL_INFILE +# +--echo * local_infile * + +--connection slave +SET @@global.local_infile=0; + +--connection master +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(20), c CHAR(254)) ENGINE=MyISAM; +--copy_file ./std_data/words.dat $MYSQLTEST_VARDIR/tmp/words.dat +--copy_file ./std_data/words2.dat $MYSQLTEST_VARDIR/tmp/words2.dat +--replace_regex /\'.+\'/'FILE'/ +--eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/words.dat' INTO TABLE t1 (b) +SELECT COUNT(*) FROM t1; +--sync_slave_with_master +--replace_regex /\'.+\'/'FILE2'/ +--error 1148 +--eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/words2.dat' INTO TABLE t1 (b) +SELECT COUNT(*) FROM t1; + +SET @@global.local_infile=1; + +--connection master +DROP TABLE t1; +--echo + +# +# MAX_HEAP_TABLE_SIZE +# +--echo * max_heap_table_size * + +--connection slave +SET @restore_slave_max_heap_table_size=@@global.max_heap_table_size; +SET @@global.max_heap_table_size=16384; +SET @@session.max_heap_table_size=16384; + +--connection master +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), c CHAR(254)) ENGINE=MEMORY; +let $counter=2000; +--disable_query_log +while ($counter) { + INSERT INTO t1 (b,c) VALUES ('master', REPEAT('A', 254)); + dec $counter; +} +--enable_query_log +SELECT COUNT(*)=2000 FROM t1; + +--sync_slave_with_master +let $counter=2000; +--disable_query_log +while ($counter) { + --error 0,1114 + INSERT INTO t1 (b,c) VALUES ('slave', REPEAT('A', 254)); + dec $counter; +} +CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), c CHAR(254)) ENGINE=MEMORY; +let $counter=2000; +--disable_query_log +while ($counter) { + --error 0,1114 + INSERT INTO t2 (b,c) VALUES ('slave', REPEAT('A', 254)); + dec $counter; +} +--enable_query_log +# We don't know how many memory used and can't check exact values so need to check following +# conditions +SELECT COUNT(*)=2000 FROM t1 WHERE b='master' GROUP BY b ORDER BY b; +SELECT COUNT(*)<2000 AND COUNT(*)>0 FROM t1 WHERE b='slave' GROUP BY b ORDER BY b; +SELECT COUNT(*)<2000 AND COUNT(*)>0 FROM t2 WHERE b='slave' GROUP BY b ORDER BY b; + +--connection master +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings +--echo + +# +# STORAGE_ENGINE +# +--echo * storage_engine * + +--connection master +SET @restore_master_storage_engine=@@global.storage_engine; +SET @@global.storage_engine=InnoDB; +SET @@session.storage_engine=InnoDB; + +--connection slave +SET @restore_slave_storage_engine=@@global.storage_engine; +SET @@global.storage_engine=Memory; +SET @@session.storage_engine=Memory; + +--connection master +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)); +CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB; + +--sync_slave_with_master +CREATE TABLE t3 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)); + +--connection master +SHOW CREATE TABLE t1; +SHOW CREATE TABLE t2; + +--connection slave +SHOW CREATE TABLE t1; +SHOW CREATE TABLE t2; +SHOW CREATE TABLE t3; + +SET @@global.storage_engine=InnoDB; +SET @@session.storage_engine=InnoDB; + +--connection master +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3; +--enable_warnings +--echo + +# +# SQL_MODE +# +--echo * sql_mode * + +--connection master +SET @@global.sql_mode=ANSI; +SET @@session.sql_mode=ANSI; + +--connection slave +SET @@global.sql_mode=TRADITIONAL; +SET @@session.sql_mode=TRADITIONAL; + +--connection master +CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c DATE); +INSERT INTO t1 VALUES (1, 'master', '0000-00-00'); +SELECT * FROM t1 ORDER BY a; + +--sync_slave_with_master +--error 1292 +INSERT INTO t1 VALUES (1, 'slave', '0000-00-00'); +SELECT * FROM t1 ORDER BY a; +SET @@global.sql_mode=''; +SET @@session.sql_mode=''; + +--connection master +SET @@global.sql_mode=''; +SET @@session.sql_mode=''; +DROP TABLE t1; +--echo + + +# Clean up +--echo *** clean up *** +--connection master +SET @@global.character_set_database=@restore_master_character_set_database; +SET @@global.collation_server=@restore_master_collation_server; +SET @@global.storage_engine=@restore_master_storage_engine; +--sync_slave_with_master +SET @@global.character_set_database=@restore_slave_character_set_database; +SET @@global.collation_server=@restore_slave_collation_server; +SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size; +SET @@global.storage_engine=@restore_slave_storage_engine; + +# Put at the end since the test otherwise emptied the table. + +--echo +call mtr.add_suppression("The table 't[12]' is full"); + +# End of 5.1 test -- cgit v1.2.1 From bd807278330cff50d117fff414a72ecc35a230ee Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Mon, 5 Oct 2009 16:10:18 +0200 Subject: BUG#47776, Fixed character set handling, used wrong length, eventually also found that didn't need to convert to my_strnxfrm-format for column list partitioned tables, also column list partitioned tables can use multi-byte character sets in partition fields as well as where strxfrm multiplies the number of bytes in the string --- mysql-test/r/partition_innodb.result | 24 ++++++++++++++++++++++++ mysql-test/t/partition_innodb.test | 30 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index af277e5ce40..fb991ef5fcc 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -1,4 +1,28 @@ drop table if exists t1; +create table t1 (a varchar(5)) +engine=memory +partition by range column_list(a) +( partition p0 values less than (column_list('m')), +partition p1 values less than (column_list('za'))); +insert into t1 values ('j'); +update t1 set a = 'z' where (a >= 'j'); +drop table t1; +create table t1 (a varchar(5)) +engine=myisam +partition by range column_list(a) +( partition p0 values less than (column_list('m')), +partition p1 values less than (column_list('za'))); +insert into t1 values ('j'); +update t1 set a = 'z' where (a >= 'j'); +drop table t1; +create table t1 (a varchar(5)) +engine=innodb +partition by range column_list(a) +( partition p0 values less than (column_list('m')), +partition p1 values less than (column_list('za'))); +insert into t1 values ('j'); +update t1 set a = 'z' where (a >= 'j'); +drop table t1; CREATE TABLE t1 (id INT PRIMARY KEY, data INT) ENGINE = InnoDB PARTITION BY RANGE(id) ( PARTITION p0 VALUES LESS THAN (5), diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index c6bf0af0b6f..a8758525342 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -5,6 +5,36 @@ drop table if exists t1; --enable_warnings +# +# BUG#47776, Failed to update for MEMORY engine, crash for InnoDB and success for MyISAM +# +create table t1 (a varchar(5)) +engine=memory +partition by range column_list(a) +( partition p0 values less than (column_list('m')), + partition p1 values less than (column_list('za'))); +insert into t1 values ('j'); +update t1 set a = 'z' where (a >= 'j'); +drop table t1; + +create table t1 (a varchar(5)) +engine=myisam +partition by range column_list(a) +( partition p0 values less than (column_list('m')), + partition p1 values less than (column_list('za'))); +insert into t1 values ('j'); +update t1 set a = 'z' where (a >= 'j'); +drop table t1; + +create table t1 (a varchar(5)) +engine=innodb +partition by range column_list(a) +( partition p0 values less than (column_list('m')), + partition p1 values less than (column_list('za'))); +insert into t1 values ('j'); +update t1 set a = 'z' where (a >= 'j'); +drop table t1; + # # Bug#40595: Non-matching rows not released with READ-COMMITTED on tables # with partitions -- cgit v1.2.1 From 843b73b34babef027d093473a181cba440cb3cd0 Mon Sep 17 00:00:00 2001 From: Guilhem Bichot Date: Mon, 5 Oct 2009 16:22:48 +0200 Subject: Port of fix for BUG#42893 "main.information_schema times out sporadically" (from revision konstantin@mysql.com-20080627154042-923m6lzk7z77lrgj ). This moves the slow part (10 seconds over 13) into a separate big test. --- mysql-test/r/information_schema-big.result | 93 ++++++++++++++++++++++++++++++ mysql-test/r/information_schema.result | 88 ---------------------------- mysql-test/t/information_schema-big.test | 48 +++++++++++++++ mysql-test/t/information_schema.test | 35 ----------- 4 files changed, 141 insertions(+), 123 deletions(-) create mode 100644 mysql-test/r/information_schema-big.result create mode 100644 mysql-test/t/information_schema-big.test (limited to 'mysql-test') diff --git a/mysql-test/r/information_schema-big.result b/mysql-test/r/information_schema-big.result new file mode 100644 index 00000000000..248b8d606dc --- /dev/null +++ b/mysql-test/r/information_schema-big.result @@ -0,0 +1,93 @@ +DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5; +DROP VIEW IF EXISTS v1; +# +# Bug#18925: subqueries with MIN/MAX functions on INFORMARTION_SCHEMA +# +SELECT t.table_name, c1.column_name +FROM information_schema.tables t +INNER JOIN +information_schema.columns c1 +ON t.table_schema = c1.table_schema AND +t.table_name = c1.table_name +WHERE t.table_schema = 'information_schema' AND +c1.ordinal_position = +( SELECT COALESCE(MIN(c2.ordinal_position),1) +FROM information_schema.columns c2 +WHERE c2.table_schema = t.table_schema AND +c2.table_name = t.table_name AND +c2.column_name LIKE '%SCHEMA%' + ) +AND t.table_name NOT LIKE 'innodb%'; +table_name column_name +CHARACTER_SETS CHARACTER_SET_NAME +COLLATIONS COLLATION_NAME +COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME +COLUMNS TABLE_SCHEMA +COLUMN_PRIVILEGES TABLE_SCHEMA +ENGINES ENGINE +EVENTS EVENT_SCHEMA +FILES TABLE_SCHEMA +GLOBAL_STATUS VARIABLE_NAME +GLOBAL_VARIABLES VARIABLE_NAME +KEY_COLUMN_USAGE CONSTRAINT_SCHEMA +PARTITIONS TABLE_SCHEMA +PLUGINS PLUGIN_NAME +PROCESSLIST ID +PROFILING QUERY_ID +REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA +ROUTINES ROUTINE_SCHEMA +SCHEMATA SCHEMA_NAME +SCHEMA_PRIVILEGES TABLE_SCHEMA +SESSION_STATUS VARIABLE_NAME +SESSION_VARIABLES VARIABLE_NAME +STATISTICS TABLE_SCHEMA +TABLES TABLE_SCHEMA +TABLE_CONSTRAINTS CONSTRAINT_SCHEMA +TABLE_PRIVILEGES TABLE_SCHEMA +TRIGGERS TRIGGER_SCHEMA +USER_PRIVILEGES GRANTEE +VIEWS TABLE_SCHEMA +SELECT t.table_name, c1.column_name +FROM information_schema.tables t +INNER JOIN +information_schema.columns c1 +ON t.table_schema = c1.table_schema AND +t.table_name = c1.table_name +WHERE t.table_schema = 'information_schema' AND +c1.ordinal_position = +( SELECT COALESCE(MIN(c2.ordinal_position),1) +FROM information_schema.columns c2 +WHERE c2.table_schema = 'information_schema' AND +c2.table_name = t.table_name AND +c2.column_name LIKE '%SCHEMA%' + ) +AND t.table_name NOT LIKE 'innodb%'; +table_name column_name +CHARACTER_SETS CHARACTER_SET_NAME +COLLATIONS COLLATION_NAME +COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME +COLUMNS TABLE_SCHEMA +COLUMN_PRIVILEGES TABLE_SCHEMA +ENGINES ENGINE +EVENTS EVENT_SCHEMA +FILES TABLE_SCHEMA +GLOBAL_STATUS VARIABLE_NAME +GLOBAL_VARIABLES VARIABLE_NAME +KEY_COLUMN_USAGE CONSTRAINT_SCHEMA +PARTITIONS TABLE_SCHEMA +PLUGINS PLUGIN_NAME +PROCESSLIST ID +PROFILING QUERY_ID +REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA +ROUTINES ROUTINE_SCHEMA +SCHEMATA SCHEMA_NAME +SCHEMA_PRIVILEGES TABLE_SCHEMA +SESSION_STATUS VARIABLE_NAME +SESSION_VARIABLES VARIABLE_NAME +STATISTICS TABLE_SCHEMA +TABLES TABLE_SCHEMA +TABLE_CONSTRAINTS CONSTRAINT_SCHEMA +TABLE_PRIVILEGES TABLE_SCHEMA +TRIGGERS TRIGGER_SCHEMA +USER_PRIVILEGES GRANTEE +VIEWS TABLE_SCHEMA diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index ffa9b596d2f..9a66c809226 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1226,94 +1226,6 @@ f1() DROP FUNCTION f1; DROP PROCEDURE p1; DROP USER mysql_bug20230@localhost; -SELECT t.table_name, c1.column_name -FROM information_schema.tables t -INNER JOIN -information_schema.columns c1 -ON t.table_schema = c1.table_schema AND -t.table_name = c1.table_name -WHERE t.table_schema = 'information_schema' AND -c1.ordinal_position = -( SELECT COALESCE(MIN(c2.ordinal_position),1) -FROM information_schema.columns c2 -WHERE c2.table_schema = t.table_schema AND -c2.table_name = t.table_name AND -c2.column_name LIKE '%SCHEMA%' - ) -AND t.table_name not like 'innodb_%'; -table_name column_name -CHARACTER_SETS CHARACTER_SET_NAME -COLLATIONS COLLATION_NAME -COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME -COLUMNS TABLE_SCHEMA -COLUMN_PRIVILEGES TABLE_SCHEMA -ENGINES ENGINE -EVENTS EVENT_SCHEMA -FILES TABLE_SCHEMA -GLOBAL_STATUS VARIABLE_NAME -GLOBAL_VARIABLES VARIABLE_NAME -KEY_COLUMN_USAGE CONSTRAINT_SCHEMA -PARTITIONS TABLE_SCHEMA -PLUGINS PLUGIN_NAME -PROCESSLIST ID -PROFILING QUERY_ID -REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA -ROUTINES ROUTINE_SCHEMA -SCHEMATA SCHEMA_NAME -SCHEMA_PRIVILEGES TABLE_SCHEMA -SESSION_STATUS VARIABLE_NAME -SESSION_VARIABLES VARIABLE_NAME -STATISTICS TABLE_SCHEMA -TABLES TABLE_SCHEMA -TABLE_CONSTRAINTS CONSTRAINT_SCHEMA -TABLE_PRIVILEGES TABLE_SCHEMA -TRIGGERS TRIGGER_SCHEMA -USER_PRIVILEGES GRANTEE -VIEWS TABLE_SCHEMA -SELECT t.table_name, c1.column_name -FROM information_schema.tables t -INNER JOIN -information_schema.columns c1 -ON t.table_schema = c1.table_schema AND -t.table_name = c1.table_name -WHERE t.table_schema = 'information_schema' AND -c1.ordinal_position = -( SELECT COALESCE(MIN(c2.ordinal_position),1) -FROM information_schema.columns c2 -WHERE c2.table_schema = 'information_schema' AND -c2.table_name = t.table_name AND -c2.column_name LIKE '%SCHEMA%' - ) -AND t.table_name not like 'innodb_%'; -table_name column_name -CHARACTER_SETS CHARACTER_SET_NAME -COLLATIONS COLLATION_NAME -COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME -COLUMNS TABLE_SCHEMA -COLUMN_PRIVILEGES TABLE_SCHEMA -ENGINES ENGINE -EVENTS EVENT_SCHEMA -FILES TABLE_SCHEMA -GLOBAL_STATUS VARIABLE_NAME -GLOBAL_VARIABLES VARIABLE_NAME -KEY_COLUMN_USAGE CONSTRAINT_SCHEMA -PARTITIONS TABLE_SCHEMA -PLUGINS PLUGIN_NAME -PROCESSLIST ID -PROFILING QUERY_ID -REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA -ROUTINES ROUTINE_SCHEMA -SCHEMATA SCHEMA_NAME -SCHEMA_PRIVILEGES TABLE_SCHEMA -SESSION_STATUS VARIABLE_NAME -SESSION_VARIABLES VARIABLE_NAME -STATISTICS TABLE_SCHEMA -TABLES TABLE_SCHEMA -TABLE_CONSTRAINTS CONSTRAINT_SCHEMA -TABLE_PRIVILEGES TABLE_SCHEMA -TRIGGERS TRIGGER_SCHEMA -USER_PRIVILEGES GRANTEE -VIEWS TABLE_SCHEMA SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test'); MAX(table_name) VIEWS diff --git a/mysql-test/t/information_schema-big.test b/mysql-test/t/information_schema-big.test new file mode 100644 index 00000000000..c9cd65f0851 --- /dev/null +++ b/mysql-test/t/information_schema-big.test @@ -0,0 +1,48 @@ +# This test uses grants, which can't get tested for embedded server +-- source include/big_test.inc +-- source include/not_embedded.inc + +# check that CSV engine was compiled in, as the result of the test depends +# on the presence of the log tables (which are CSV-based). +--source include/have_csv.inc + +--disable_warnings +DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5; +DROP VIEW IF EXISTS v1; +--enable_warnings + + +--echo # +--echo # Bug#18925: subqueries with MIN/MAX functions on INFORMARTION_SCHEMA +--echo # + +SELECT t.table_name, c1.column_name + FROM information_schema.tables t + INNER JOIN + information_schema.columns c1 + ON t.table_schema = c1.table_schema AND + t.table_name = c1.table_name + WHERE t.table_schema = 'information_schema' AND + c1.ordinal_position = + ( SELECT COALESCE(MIN(c2.ordinal_position),1) + FROM information_schema.columns c2 + WHERE c2.table_schema = t.table_schema AND + c2.table_name = t.table_name AND + c2.column_name LIKE '%SCHEMA%' + ) + AND t.table_name NOT LIKE 'innodb%'; +SELECT t.table_name, c1.column_name + FROM information_schema.tables t + INNER JOIN + information_schema.columns c1 + ON t.table_schema = c1.table_schema AND + t.table_name = c1.table_name + WHERE t.table_schema = 'information_schema' AND + c1.ordinal_position = + ( SELECT COALESCE(MIN(c2.ordinal_position),1) + FROM information_schema.columns c2 + WHERE c2.table_schema = 'information_schema' AND + c2.table_name = t.table_name AND + c2.column_name LIKE '%SCHEMA%' + ) + AND t.table_name NOT LIKE 'innodb%'; diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 6060c78f791..b590ec306d6 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -913,41 +913,6 @@ DROP FUNCTION f1; DROP PROCEDURE p1; DROP USER mysql_bug20230@localhost; -# -# Bug#18925 subqueries with MIN/MAX functions on INFORMARTION_SCHEMA -# - -SELECT t.table_name, c1.column_name - FROM information_schema.tables t - INNER JOIN - information_schema.columns c1 - ON t.table_schema = c1.table_schema AND - t.table_name = c1.table_name - WHERE t.table_schema = 'information_schema' AND - c1.ordinal_position = - ( SELECT COALESCE(MIN(c2.ordinal_position),1) - FROM information_schema.columns c2 - WHERE c2.table_schema = t.table_schema AND - c2.table_name = t.table_name AND - c2.column_name LIKE '%SCHEMA%' - ) - AND t.table_name not like 'innodb_%'; -SELECT t.table_name, c1.column_name - FROM information_schema.tables t - INNER JOIN - information_schema.columns c1 - ON t.table_schema = c1.table_schema AND - t.table_name = c1.table_name - WHERE t.table_schema = 'information_schema' AND - c1.ordinal_position = - ( SELECT COALESCE(MIN(c2.ordinal_position),1) - FROM information_schema.columns c2 - WHERE c2.table_schema = 'information_schema' AND - c2.table_name = t.table_name AND - c2.column_name LIKE '%SCHEMA%' - ) - AND t.table_name not like 'innodb_%'; - # # Bug#2123 query with a simple non-correlated subquery over # INFORMARTION_SCHEMA.TABLES -- cgit v1.2.1 From 21317d5df3033850ae862a8ec6202f059c2ba16b Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Mon, 5 Oct 2009 20:06:04 +0500 Subject: WL#4584 Internationalized number format @ mysql-test/r/func_str.result Adding tests @ mysql-test/t/func_str.test Adding tests @ mysql-test/t/variables.test Fixing error number @ sql/item_create.cc Allowing 2 and 3 arguments to format() @ sql/item_strfunc.cc Adding new formatting code. @ sql/item_strfunc.h Adding new contructors and "locale" member @ sql/mysql_priv.h Adding number formatting members into MY_LOCALE @ sql/sql_locale.cc Adding number formatting data into locale constants @ sql/set_var.cc Using new error message @ sql/share/errmgs.txt Adding new error message --- mysql-test/r/func_str.result | 130 +++++++++++++++++++++++++++++++++++++++++++ mysql-test/t/func_str.test | 42 ++++++++++++++ mysql-test/t/variables.test | 6 +- 3 files changed, 175 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index c87879e13b5..39d11aa3e2c 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2558,3 +2558,133 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY ALL NULL NULL NULL NULL 2 Using join buffer 2 DERIVED t1 ALL NULL NULL NULL NULL 2 drop table t1; +Start of 5.4 tests +SELECT format(12345678901234567890.123, 3); +format(12345678901234567890.123, 3) +12,345,678,901,234,567,890.123 +SELECT format(12345678901234567890.123, 3, NULL); +format(12345678901234567890.123, 3, NULL) +12,345,678,901,234,567,890.123 +Warnings: +Warning 1647 Unknown locale: 'NULL' +SELECT format(12345678901234567890.123, 3, 'ar_AE'); +format(12345678901234567890.123, 3, 'ar_AE') +12,345,678,901,234,567,890.123 +SELECT format(12345678901234567890.123, 3, 'ar_SA'); +format(12345678901234567890.123, 3, 'ar_SA') +12345678901234567890.123 +SELECT format(12345678901234567890.123, 3, 'be_BY'); +format(12345678901234567890.123, 3, 'be_BY') +12.345.678.901.234.567.890,123 +SELECT format(12345678901234567890.123, 3, 'de_DE'); +format(12345678901234567890.123, 3, 'de_DE') +12.345.678.901.234.567.890,123 +SELECT format(12345678901234567890.123, 3, 'en_IN'); +format(12345678901234567890.123, 3, 'en_IN') +1,23,45,67,89,01,23,45,67,890.123 +SELECT format(12345678901234567890.123, 3, 'en_US'); +format(12345678901234567890.123, 3, 'en_US') +12,345,678,901,234,567,890.123 +SELECT format(12345678901234567890.123, 3, 'it_CH'); +format(12345678901234567890.123, 3, 'it_CH') +12'345'678'901'234'567'890,123 +SELECT format(12345678901234567890.123, 3, 'ru_RU'); +format(12345678901234567890.123, 3, 'ru_RU') +12 345 678 901 234 567 890,123 +SELECT format(12345678901234567890.123, 3, 'ta_IN'); +format(12345678901234567890.123, 3, 'ta_IN') +1,23,45,67,89,01,23,45,67,890.123 +CREATE TABLE t1 (fmt CHAR(5) NOT NULL); +INSERT INTO t1 VALUES ('ar_AE'); +INSERT INTO t1 VALUES ('ar_SA'); +INSERT INTO t1 VALUES ('be_BY'); +INSERT INTO t1 VALUES ('de_DE'); +INSERT INTO t1 VALUES ('en_IN'); +INSERT INTO t1 VALUES ('en_US'); +INSERT INTO t1 VALUES ('it_CH'); +INSERT INTO t1 VALUES ('ru_RU'); +INSERT INTO t1 VALUES ('ta_IN'); +SELECT fmt, format(12345678901234567890.123, 3, fmt) FROM t1 ORDER BY fmt; +fmt format(12345678901234567890.123, 3, fmt) +ar_AE 12,345,678,901,234,567,890.123 +ar_SA 12345678901234567890.123 +be_BY 12.345.678.901.234.567.890,123 +de_DE 12.345.678.901.234.567.890,123 +en_IN 1,23,45,67,89,01,23,45,67,890.123 +en_US 12,345,678,901,234,567,890.123 +it_CH 12'345'678'901'234'567'890,123 +ru_RU 12 345 678 901 234 567 890,123 +ta_IN 1,23,45,67,89,01,23,45,67,890.123 +SELECT fmt, format(12345678901234567890.123, 0, fmt) FROM t1 ORDER BY fmt; +fmt format(12345678901234567890.123, 0, fmt) +ar_AE 12,345,678,901,234,567,890 +ar_SA 12345678901234567890 +be_BY 12.345.678.901.234.567.890 +de_DE 12.345.678.901.234.567.890 +en_IN 1,23,45,67,89,01,23,45,67,890 +en_US 12,345,678,901,234,567,890 +it_CH 12'345'678'901'234'567'890 +ru_RU 12 345 678 901 234 567 890 +ta_IN 1,23,45,67,89,01,23,45,67,890 +SELECT fmt, format(12345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +fmt format(12345678901234567890, 3, fmt) +ar_AE 12,345,678,901,234,567,890.000 +ar_SA 12345678901234567890.000 +be_BY 12.345.678.901.234.567.890,000 +de_DE 12.345.678.901.234.567.890,000 +en_IN 1,23,45,67,89,01,23,45,67,890.000 +en_US 12,345,678,901,234,567,890.000 +it_CH 12'345'678'901'234'567'890,000 +ru_RU 12 345 678 901 234 567 890,000 +ta_IN 1,23,45,67,89,01,23,45,67,890.000 +SELECT fmt, format(-12345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +fmt format(-12345678901234567890, 3, fmt) +ar_AE -12,345,678,901,234,567,890.000 +ar_SA -12345678901234567890.000 +be_BY -12.345.678.901.234.567.890,000 +de_DE -12.345.678.901.234.567.890,000 +en_IN -1,23,45,67,89,01,23,45,67,890.000 +en_US -12,345,678,901,234,567,890.000 +it_CH -12'345'678'901'234'567'890,000 +ru_RU -12 345 678 901 234 567 890,000 +ta_IN -1,23,45,67,89,01,23,45,67,890.000 +SELECT fmt, format(-02345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +fmt format(-02345678901234567890, 3, fmt) +ar_AE -2,345,678,901,234,567,890.000 +ar_SA -2345678901234567890.000 +be_BY -2.345.678.901.234.567.890,000 +de_DE -2.345.678.901.234.567.890,000 +en_IN -23,45,67,89,01,23,45,67,890.000 +en_US -2,345,678,901,234,567,890.000 +it_CH -2'345'678'901'234'567'890,000 +ru_RU -2 345 678 901 234 567 890,000 +ta_IN -23,45,67,89,01,23,45,67,890.000 +SELECT fmt, format(-00345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +fmt format(-00345678901234567890, 3, fmt) +ar_AE -345,678,901,234,567,890.000 +ar_SA -345678901234567890.000 +be_BY -345.678.901.234.567.890,000 +de_DE -345.678.901.234.567.890,000 +en_IN -3,45,67,89,01,23,45,67,890.000 +en_US -345,678,901,234,567,890.000 +it_CH -345'678'901'234'567'890,000 +ru_RU -345 678 901 234 567 890,000 +ta_IN -3,45,67,89,01,23,45,67,890.000 +SELECT fmt, format(-00045678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +fmt format(-00045678901234567890, 3, fmt) +ar_AE -45,678,901,234,567,890.000 +ar_SA -45678901234567890.000 +be_BY -45.678.901.234.567.890,000 +de_DE -45.678.901.234.567.890,000 +en_IN -45,67,89,01,23,45,67,890.000 +en_US -45,678,901,234,567,890.000 +it_CH -45'678'901'234'567'890,000 +ru_RU -45 678 901 234 567 890,000 +ta_IN -45,67,89,01,23,45,67,890.000 +DROP TABLE t1; +SELECT format(123, 1, 'Non-existent-locale'); +format(123, 1, 'Non-existent-locale') +123.0 +Warnings: +Warning 1647 Unknown locale: 'Non-existent-locale' +End of 5.4 tests diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 66b9eabd385..032c9ade643 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1318,3 +1318,45 @@ insert into t1 values (-1),(null); explain select 1 as a from t1,(select decode(f1,f1) as b from t1) a; explain select 1 as a from t1,(select encode(f1,f1) as b from t1) a; drop table t1; + + + +--echo Start of 5.4 tests +# +# WL#4584 Internationalized number format +# +SELECT format(12345678901234567890.123, 3); +SELECT format(12345678901234567890.123, 3, NULL); +SELECT format(12345678901234567890.123, 3, 'ar_AE'); +SELECT format(12345678901234567890.123, 3, 'ar_SA'); +SELECT format(12345678901234567890.123, 3, 'be_BY'); +SELECT format(12345678901234567890.123, 3, 'de_DE'); +SELECT format(12345678901234567890.123, 3, 'en_IN'); +SELECT format(12345678901234567890.123, 3, 'en_US'); +SELECT format(12345678901234567890.123, 3, 'it_CH'); +SELECT format(12345678901234567890.123, 3, 'ru_RU'); +SELECT format(12345678901234567890.123, 3, 'ta_IN'); + +CREATE TABLE t1 (fmt CHAR(5) NOT NULL); +INSERT INTO t1 VALUES ('ar_AE'); +INSERT INTO t1 VALUES ('ar_SA'); +INSERT INTO t1 VALUES ('be_BY'); +INSERT INTO t1 VALUES ('de_DE'); +INSERT INTO t1 VALUES ('en_IN'); +INSERT INTO t1 VALUES ('en_US'); +INSERT INTO t1 VALUES ('it_CH'); +INSERT INTO t1 VALUES ('ru_RU'); +INSERT INTO t1 VALUES ('ta_IN'); +SELECT fmt, format(12345678901234567890.123, 3, fmt) FROM t1 ORDER BY fmt; +SELECT fmt, format(12345678901234567890.123, 0, fmt) FROM t1 ORDER BY fmt; +SELECT fmt, format(12345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +SELECT fmt, format(-12345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +SELECT fmt, format(-02345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +SELECT fmt, format(-00345678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +SELECT fmt, format(-00045678901234567890, 3, fmt) FROM t1 ORDER BY fmt; +DROP TABLE t1; + +SELECT format(123, 1, 'Non-existent-locale'); + +--echo End of 5.4 tests + diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 1580d7f36d7..a98163e026c 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -559,7 +559,7 @@ select @@lc_time_names; --echo *** LC_TIME_NAMES: testing with string expressions set lc_time_names=concat('de','_','DE'); select @@lc_time_names; ---error ER_UNKNOWN_ERROR +--error ER_UNKNOWN_LOCALE set lc_time_names=concat('de','+','DE'); select @@lc_time_names; --echo LC_TIME_NAMES: testing with numeric expressions @@ -572,14 +572,14 @@ set lc_time_names=en_US; --echo LC_TIME_NAMES: testing NULL and a negative number: --error ER_WRONG_VALUE_FOR_VAR set lc_time_names=NULL; ---error ER_UNKNOWN_ERROR +--error ER_UNKNOWN_LOCALE set lc_time_names=-1; select @@lc_time_names; --echo LC_TIME_NAMES: testing locale with the last ID: set lc_time_names=108; select @@lc_time_names; --echo LC_TIME_NAMES: testing a number beyond the valid ID range: ---error ER_UNKNOWN_ERROR +--error ER_UNKNOWN_LOCALE set lc_time_names=109; select @@lc_time_names; --echo LC_TIME_NAMES: testing that 0 is en_US: -- cgit v1.2.1 From 528ab7bb11e579cd88c8baad9a935a77e10eb656 Mon Sep 17 00:00:00 2001 From: Guilhem Bichot Date: Mon, 5 Oct 2009 22:59:19 +0200 Subject: Backport of the fix for BUG#33730 "Full table scan instead selected partitions for query more than 10 partitions" from 6.0, made in sergefp@mysql.com-20090205190644-q8632sniogedhtsu --- mysql-test/r/partition_hash.result | 2 +- mysql-test/r/partition_pruning.result | 19 +++++++++++++++++++ mysql-test/t/partition_pruning.test | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_hash.result b/mysql-test/r/partition_hash.result index 19da70db5a0..dcefd70ff43 100644 --- a/mysql-test/r/partition_hash.result +++ b/mysql-test/r/partition_hash.result @@ -93,7 +93,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where explain partitions select * from t1 where a >= 1 and a <= 5; id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where +1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 9 Using where drop table t1; CREATE TABLE t1 ( a int not null, diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index 769d499fc0a..d8bff2cbe01 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -2229,3 +2229,22 @@ explain partitions select * from t1 where recdate < '2006-01-01 00:00:00'; 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 drop table t1; +# +# BUG#33730 Full table scan instead selected partitions for query more than 10 partitions +# +create table t0 (a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (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 select A.a + 10*B.a from t0 A, t0 B; +explain partitions select * from t1 where a between 10 and 13; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 64 Using where +explain partitions select * from t1 where a between 10 and 10+33; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 100 Using where +drop table t0, t1; diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test index 11e65be45fc..ea72cef5b62 100644 --- a/mysql-test/t/partition_pruning.test +++ b/mysql-test/t/partition_pruning.test @@ -1159,3 +1159,22 @@ INSERT INTO t1 VALUES ('2006-03-01 12:00:00'); -- echo must use p0 only: explain partitions select * from t1 where recdate < '2006-01-01 00:00:00'; drop table t1; + +-- echo # +-- echo # BUG#33730 Full table scan instead selected partitions for query more than 10 partitions +-- echo # +create table t0 (a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (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 select A.a + 10*B.a from t0 A, t0 B; + +# this will use interval_via_walking +explain partitions select * from t1 where a between 10 and 13; +explain partitions select * from t1 where a between 10 and 10+33; + +drop table t0, t1; -- cgit v1.2.1 From 1c58e90695a781d32ea4aa49768017ff4d9fab07 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 6 Oct 2009 11:02:51 +0500 Subject: Backporting WL#4642 Greek locale for DAYNAME, MONTHNAME, DATE_FORMAT added: mysql-test/r/locale.result mysql-test/t/locale.test modified: mysql-test/r/variables.result mysql-test/t/variables.test sql/sql_locale.cc --- mysql-test/r/locale.result | 49 +++++++++++++++++++++++++++++++++++++++++++ mysql-test/r/variables.result | 10 ++++----- mysql-test/t/locale.test | 34 ++++++++++++++++++++++++++++++ mysql-test/t/variables.test | 4 ++-- 4 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 mysql-test/r/locale.result create mode 100644 mysql-test/t/locale.test (limited to 'mysql-test') diff --git a/mysql-test/r/locale.result b/mysql-test/r/locale.result new file mode 100644 index 00000000000..467eb97b639 --- /dev/null +++ b/mysql-test/r/locale.result @@ -0,0 +1,49 @@ +DROP TABLE IF EXISTS t1; +Start of 5.4 tests +# +# WL#4642 Greek locale for DAYNAME, MONTHNAME, DATE_FORMAT +# +SET NAMES utf8; +SET @@lc_time_names=109; +SELECT @@lc_time_names; +@@lc_time_names +el_GR +CREATE TABLE t1 (a DATE); +INSERT INTO t1 VALUES +('2006-01-01'),('2006-01-02'),('2006-01-03'), +('2006-01-04'),('2006-01-05'),('2006-01-06'),('2006-01-07'); +SELECT a, date_format(a,'%a') as abday, dayname(a) as day FROM t1 ORDER BY a; +a abday day +2006-01-01 ÎšÏ…Ï ÎšÏ…Ïιακή +2006-01-02 Δευ ΔευτέÏα +2006-01-03 ΤÏί ΤÏίτη +2006-01-04 Τετ ΤετάÏτη +2006-01-05 Πέμ Πέμπτη +2006-01-06 Î Î±Ï Î Î±Ïασκευή +2006-01-07 Σάβ Σάββατο +DROP TABLE t1; +CREATE TABLE t1 (a DATE); +INSERT INTO t1 VALUES +('2006-01-01'),('2006-02-01'),('2006-03-01'), +('2006-04-01'),('2006-05-01'),('2006-06-01'), +('2006-07-01'),('2006-08-01'),('2006-09-01'), +('2006-10-01'),('2006-11-01'),('2006-12-01'); +SELECT a, date_format(a,'%b') as abmon, monthname(a) as mon FROM t1 ORDER BY a; +a abmon mon +2006-01-01 Ιαν ΙανουάÏιος +2006-02-01 Φεβ ΦεβÏουάÏιος +2006-03-01 ÎœÎ¬Ï ÎœÎ¬Ïτιος +2006-04-01 Î‘Ï€Ï Î‘Ï€Ïίλιος +2006-05-01 Μάι Μάιος +2006-06-01 ΙοÏν ΙοÏνιος +2006-07-01 ΙοÏλ ΙοÏλιος +2006-08-01 ΑÏγ ΑÏγουστος +2006-09-01 Σεπ ΣεπτέμβÏιος +2006-10-01 Οκτ ΟκτώβÏιος +2006-11-01 Îοέ ÎοέμβÏιος +2006-12-01 Δεκ ΔεκέμβÏιος +SELECT format(123456.789, 3, 'el_GR'); +format(123456.789, 3, 'el_GR') +123456.789 +DROP TABLE t1; +End of 5.4 tests diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index c1cd1840df8..da833c79bb7 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -812,16 +812,16 @@ select @@lc_time_names; @@lc_time_names en_US LC_TIME_NAMES: testing locale with the last ID: -set lc_time_names=108; +set lc_time_names=109; select @@lc_time_names; @@lc_time_names -zh_HK +el_GR LC_TIME_NAMES: testing a number beyond the valid ID range: -set lc_time_names=109; -ERROR HY000: Unknown locale: '109' +set lc_time_names=110; +ERROR HY000: Unknown locale: '110' select @@lc_time_names; @@lc_time_names -zh_HK +el_GR LC_TIME_NAMES: testing that 0 is en_US: set lc_time_names=0; select @@lc_time_names; diff --git a/mysql-test/t/locale.test b/mysql-test/t/locale.test new file mode 100644 index 00000000000..a6291d9048d --- /dev/null +++ b/mysql-test/t/locale.test @@ -0,0 +1,34 @@ +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--echo Start of 5.4 tests + +--echo # +--echo # WL#4642 Greek locale for DAYNAME, MONTHNAME, DATE_FORMAT +--echo # + +SET NAMES utf8; + +SET @@lc_time_names=109; +SELECT @@lc_time_names; + +CREATE TABLE t1 (a DATE); +INSERT INTO t1 VALUES +('2006-01-01'),('2006-01-02'),('2006-01-03'), +('2006-01-04'),('2006-01-05'),('2006-01-06'),('2006-01-07'); +SELECT a, date_format(a,'%a') as abday, dayname(a) as day FROM t1 ORDER BY a; +DROP TABLE t1; + +CREATE TABLE t1 (a DATE); +INSERT INTO t1 VALUES +('2006-01-01'),('2006-02-01'),('2006-03-01'), +('2006-04-01'),('2006-05-01'),('2006-06-01'), +('2006-07-01'),('2006-08-01'),('2006-09-01'), +('2006-10-01'),('2006-11-01'),('2006-12-01'); +SELECT a, date_format(a,'%b') as abmon, monthname(a) as mon FROM t1 ORDER BY a; + +SELECT format(123456.789, 3, 'el_GR'); +DROP TABLE t1; + +--echo End of 5.4 tests diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index a98163e026c..e7d7d5ca16b 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -576,11 +576,11 @@ set lc_time_names=NULL; set lc_time_names=-1; select @@lc_time_names; --echo LC_TIME_NAMES: testing locale with the last ID: -set lc_time_names=108; +set lc_time_names=109; select @@lc_time_names; --echo LC_TIME_NAMES: testing a number beyond the valid ID range: --error ER_UNKNOWN_LOCALE -set lc_time_names=109; +set lc_time_names=110; select @@lc_time_names; --echo LC_TIME_NAMES: testing that 0 is en_US: set lc_time_names=0; -- cgit v1.2.1 From a16a82d4ebefa437b86252c5fc18b0c476c67506 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 6 Oct 2009 15:34:49 +0500 Subject: Bsckporting WL#3764 Sinhala Collation modified: mysql-test/r/ctype_utf8.result mysql-test/t/ctype_utf8.test mysys/charset-def.c strings/ctype-uca.c --- mysql-test/r/ctype_utf8.result | 112 +++++++++++++++++++++++++++++++++++++++++ mysql-test/t/ctype_utf8.test | 19 +++++++ 2 files changed, 131 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 70f976ee9a7..393625f5192 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1880,3 +1880,115 @@ CONVERT(a, CHAR) CONVERT(b, CHAR) 70000 1092 DROP TABLE t1; End of 5.0 tests +Start of 5.4 tests +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +predicted_order int NOT NULL, +utf8_encoding VARCHAR(10) NOT NULL +) CHARACTER SET utf8; +INSERT INTO t1 VALUES (19, x'E0B696'), (30, x'E0B69AE0B798'), (61, x'E0B6AF'), (93, x'E0B799'), (52, x'E0B6A6'), (73, x'E0B6BBE0B78AE2808D'), (3, x'E0B686'), (56, x'E0B6AA'), (55, x'E0B6A9'), (70, x'E0B6B9'), (94, x'E0B79A'), (80, x'E0B785'), (25, x'E0B69AE0B791'), (48, x'E0B6A2'), (13, x'E0B690'), (86, x'E0B793'), (91, x'E0B79F'), (81, x'E0B786'), (79, x'E0B784'), (14, x'E0B691'), (99, x'E0B78A'), (8, x'E0B68B'), (68, x'E0B6B7'), (22, x'E0B69A'), (16, x'E0B693'), (33, x'E0B69AE0B7B3'), (38, x'E0B69AE0B79D'), (21, x'E0B683'), (11, x'E0B68E'), (77, x'E0B782'), (40, x'E0B69AE0B78A'), (101, x'E0B78AE2808DE0B6BB'), (35, x'E0B69AE0B79A'), (1, x'E0B7B4'), (9, x'E0B68C'), (96, x'E0B79C'), (6, x'E0B689'), (95, x'E0B79B'), (88, x'E0B796'), (64, x'E0B6B3'), (26, x'E0B69AE0B792'), (82, x'E0B78F'), (28, x'E0B69AE0B794'), (39, x'E0B69AE0B79E'), (97, x'E0B79D'), (2, x'E0B685'), (75, x'E0B780'), (34, x'E0B69AE0B799'), (69, x'E0B6B8'), (83, x'E0B790'), (18, x'E0B695'), (90, x'E0B7B2'), (17, x'E0B694'), (72, x'E0B6BB'), (66, x'E0B6B5'), (59, x'E0B6AD'), (44, x'E0B69E'), (15, x'E0B692'), (23, x'E0B69AE0B78F'), (65, x'E0B6B4'), (42, x'E0B69C'), (63, x'E0B6B1'), (85, x'E0B792'), (47, x'E0B6A1'), (49, x'E0B6A3'), (92, x'E0B7B3'), (78, x'E0B783'), (36, x'E0B69AE0B79B'), (4, x'E0B687'), (24, x'E0B69AE0B790'), (87, x'E0B794'), (37, x'E0B69AE0B79C'), (32, x'E0B69AE0B79F'), (29, x'E0B69AE0B796'), (43, x'E0B69D'), (62, x'E0B6B0'), (100, x'E0B78AE2808DE0B6BA'), (60, x'E0B6AE'), (45, x'E0B69F'), (12, x'E0B68F'), (46, x'E0B6A0'), (50, x'E0B6A5'), (51, x'E0B6A4'), (5, x'E0B688'), (76, x'E0B781'), (89, x'E0B798'), (74, x'E0B6BD'), (10, x'E0B68D'), (57, x'E0B6AB'), (71, x'E0B6BA'), (58, x'E0B6AC'), (27, x'E0B69AE0B793'), (54, x'E0B6A8'), (84, x'E0B791'), (31, x'E0B69AE0B7B2'), (98, x'E0B79E'), (53, x'E0B6A7'), (41, x'E0B69B'), (67, x'E0B6B6'), (7, x'E0B68A'), (20, x'E0B682'); +SELECT predicted_order, hex(utf8_encoding) FROM t1 ORDER BY utf8_encoding COLLATE utf8_sinhala_ci; +predicted_order hex(utf8_encoding) +1 E0B7B4 +2 E0B685 +3 E0B686 +4 E0B687 +5 E0B688 +6 E0B689 +7 E0B68A +8 E0B68B +9 E0B68C +10 E0B68D +11 E0B68E +12 E0B68F +13 E0B690 +14 E0B691 +15 E0B692 +16 E0B693 +17 E0B694 +18 E0B695 +19 E0B696 +20 E0B682 +21 E0B683 +22 E0B69A +23 E0B69AE0B78F +24 E0B69AE0B790 +25 E0B69AE0B791 +26 E0B69AE0B792 +27 E0B69AE0B793 +28 E0B69AE0B794 +29 E0B69AE0B796 +30 E0B69AE0B798 +31 E0B69AE0B7B2 +32 E0B69AE0B79F +33 E0B69AE0B7B3 +34 E0B69AE0B799 +35 E0B69AE0B79A +36 E0B69AE0B79B +37 E0B69AE0B79C +38 E0B69AE0B79D +39 E0B69AE0B79E +40 E0B69AE0B78A +41 E0B69B +42 E0B69C +43 E0B69D +44 E0B69E +45 E0B69F +46 E0B6A0 +47 E0B6A1 +48 E0B6A2 +49 E0B6A3 +50 E0B6A5 +51 E0B6A4 +52 E0B6A6 +53 E0B6A7 +54 E0B6A8 +55 E0B6A9 +56 E0B6AA +57 E0B6AB +58 E0B6AC +59 E0B6AD +60 E0B6AE +61 E0B6AF +62 E0B6B0 +63 E0B6B1 +64 E0B6B3 +65 E0B6B4 +66 E0B6B5 +67 E0B6B6 +68 E0B6B7 +69 E0B6B8 +70 E0B6B9 +71 E0B6BA +72 E0B6BB +73 E0B6BBE0B78AE2808D +74 E0B6BD +75 E0B780 +76 E0B781 +77 E0B782 +78 E0B783 +79 E0B784 +80 E0B785 +81 E0B786 +82 E0B78F +83 E0B790 +84 E0B791 +85 E0B792 +86 E0B793 +87 E0B794 +88 E0B796 +89 E0B798 +90 E0B7B2 +91 E0B79F +92 E0B7B3 +93 E0B799 +94 E0B79A +95 E0B79B +96 E0B79C +97 E0B79D +98 E0B79E +99 E0B78A +100 E0B78AE2808DE0B6BA +101 E0B78AE2808DE0B6BB +DROP TABLE t1; +End of 5.4 tests diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index f0c769251cf..7e93b638acb 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -1456,3 +1456,22 @@ SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) from t1 GROUP BY b; DROP TABLE t1; --echo End of 5.0 tests + + +--echo Start of 5.4 tests +# +# Bug#26474: Add Sinhala script (Sri Lanka) collation to MySQL +# +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +CREATE TABLE t1 ( + predicted_order int NOT NULL, + utf8_encoding VARCHAR(10) NOT NULL +) CHARACTER SET utf8; +INSERT INTO t1 VALUES (19, x'E0B696'), (30, x'E0B69AE0B798'), (61, x'E0B6AF'), (93, x'E0B799'), (52, x'E0B6A6'), (73, x'E0B6BBE0B78AE2808D'), (3, x'E0B686'), (56, x'E0B6AA'), (55, x'E0B6A9'), (70, x'E0B6B9'), (94, x'E0B79A'), (80, x'E0B785'), (25, x'E0B69AE0B791'), (48, x'E0B6A2'), (13, x'E0B690'), (86, x'E0B793'), (91, x'E0B79F'), (81, x'E0B786'), (79, x'E0B784'), (14, x'E0B691'), (99, x'E0B78A'), (8, x'E0B68B'), (68, x'E0B6B7'), (22, x'E0B69A'), (16, x'E0B693'), (33, x'E0B69AE0B7B3'), (38, x'E0B69AE0B79D'), (21, x'E0B683'), (11, x'E0B68E'), (77, x'E0B782'), (40, x'E0B69AE0B78A'), (101, x'E0B78AE2808DE0B6BB'), (35, x'E0B69AE0B79A'), (1, x'E0B7B4'), (9, x'E0B68C'), (96, x'E0B79C'), (6, x'E0B689'), (95, x'E0B79B'), (88, x'E0B796'), (64, x'E0B6B3'), (26, x'E0B69AE0B792'), (82, x'E0B78F'), (28, x'E0B69AE0B794'), (39, x'E0B69AE0B79E'), (97, x'E0B79D'), (2, x'E0B685'), (75, x'E0B780'), (34, x'E0B69AE0B799'), (69, x'E0B6B8'), (83, x'E0B790'), (18, x'E0B695'), (90, x'E0B7B2'), (17, x'E0B694'), (72, x'E0B6BB'), (66, x'E0B6B5'), (59, x'E0B6AD'), (44, x'E0B69E'), (15, x'E0B692'), (23, x'E0B69AE0B78F'), (65, x'E0B6B4'), (42, x'E0B69C'), (63, x'E0B6B1'), (85, x'E0B792'), (47, x'E0B6A1'), (49, x'E0B6A3'), (92, x'E0B7B3'), (78, x'E0B783'), (36, x'E0B69AE0B79B'), (4, x'E0B687'), (24, x'E0B69AE0B790'), (87, x'E0B794'), (37, x'E0B69AE0B79C'), (32, x'E0B69AE0B79F'), (29, x'E0B69AE0B796'), (43, x'E0B69D'), (62, x'E0B6B0'), (100, x'E0B78AE2808DE0B6BA'), (60, x'E0B6AE'), (45, x'E0B69F'), (12, x'E0B68F'), (46, x'E0B6A0'), (50, x'E0B6A5'), (51, x'E0B6A4'), (5, x'E0B688'), (76, x'E0B781'), (89, x'E0B798'), (74, x'E0B6BD'), (10, x'E0B68D'), (57, x'E0B6AB'), (71, x'E0B6BA'), (58, x'E0B6AC'), (27, x'E0B69AE0B793'), (54, x'E0B6A8'), (84, x'E0B791'), (31, x'E0B69AE0B7B2'), (98, x'E0B79E'), (53, x'E0B6A7'), (41, x'E0B69B'), (67, x'E0B6B6'), (7, x'E0B68A'), (20, x'E0B682'); +SELECT predicted_order, hex(utf8_encoding) FROM t1 ORDER BY utf8_encoding COLLATE utf8_sinhala_ci; +DROP TABLE t1; + +--echo End of 5.4 tests + -- cgit v1.2.1 From ca8706ff0f9fd98289921219905f684941086293 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Tue, 6 Oct 2009 14:47:04 +0400 Subject: Backport WL#4085: Merge revno:2476.657.219 from 6.0. --- mysql-test/mysql-test-run.pl | 1 - 1 file changed, 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 17102196f42..78b69b26367 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -816,7 +816,6 @@ sub command_line_setup { 'combination=s' => \@opt_combinations, 'skip-combinations' => \&collect_option, 'experimental=s' => \$opt_experimental, - 'skip-im' => \&ignore_option, # Specify ports 'build-thread|mtr-build-thread=i' => \$opt_build_thread, -- cgit v1.2.1 From f952bbe55cbfc0a117f6340ceb64ff83d96e6396 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Tue, 6 Oct 2009 14:56:23 +0400 Subject: Merge revno:2617.31.54 from 6.0. --- mysql-test/suite/im/r/im_cmd_line.result | 47 ---- mysql-test/suite/im/r/im_daemon_life_cycle.result | 26 --- mysql-test/suite/im/r/im_instance_conf.result | 225 -------------------- mysql-test/suite/im/r/im_life_cycle.result | 73 ------- mysql-test/suite/im/r/im_options.result | 151 ------------- mysql-test/suite/im/r/im_utils.result | 96 --------- mysql-test/suite/im/t/disabled.def | 20 -- mysql-test/suite/im/t/im_check_env.inc | 26 --- mysql-test/suite/im/t/im_cmd_line.imtest | 68 ------ mysql-test/suite/im/t/im_daemon_life_cycle-im.opt | 3 - mysql-test/suite/im/t/im_daemon_life_cycle.imtest | 100 --------- mysql-test/suite/im/t/im_instance_conf-im.opt | 1 - mysql-test/suite/im/t/im_instance_conf.imtest | 244 --------------------- mysql-test/suite/im/t/im_life_cycle-im.opt | 1 - mysql-test/suite/im/t/im_life_cycle.imtest | 205 ------------------ mysql-test/suite/im/t/im_options-im.opt | 1 - mysql-test/suite/im/t/im_options.imtest | 248 ---------------------- mysql-test/suite/im/t/im_utils-im.opt | 1 - mysql-test/suite/im/t/im_utils.imtest | 107 ---------- mysql-test/suite/im/t/kill_n_check.sh | 147 ------------- mysql-test/suite/im/t/log.sh | 24 --- mysql-test/suite/im/t/utils.sh | 55 ----- mysql-test/suite/im/t/wait_for_process.sh | 114 ---------- mysql-test/suite/im/t/wait_for_socket.sh | 94 -------- 24 files changed, 2077 deletions(-) delete mode 100644 mysql-test/suite/im/r/im_cmd_line.result delete mode 100644 mysql-test/suite/im/r/im_daemon_life_cycle.result delete mode 100644 mysql-test/suite/im/r/im_instance_conf.result delete mode 100644 mysql-test/suite/im/r/im_life_cycle.result delete mode 100644 mysql-test/suite/im/r/im_options.result delete mode 100644 mysql-test/suite/im/r/im_utils.result delete mode 100644 mysql-test/suite/im/t/disabled.def delete mode 100644 mysql-test/suite/im/t/im_check_env.inc delete mode 100644 mysql-test/suite/im/t/im_cmd_line.imtest delete mode 100644 mysql-test/suite/im/t/im_daemon_life_cycle-im.opt delete mode 100644 mysql-test/suite/im/t/im_daemon_life_cycle.imtest delete mode 100644 mysql-test/suite/im/t/im_instance_conf-im.opt delete mode 100644 mysql-test/suite/im/t/im_instance_conf.imtest delete mode 100644 mysql-test/suite/im/t/im_life_cycle-im.opt delete mode 100644 mysql-test/suite/im/t/im_life_cycle.imtest delete mode 100644 mysql-test/suite/im/t/im_options-im.opt delete mode 100644 mysql-test/suite/im/t/im_options.imtest delete mode 100644 mysql-test/suite/im/t/im_utils-im.opt delete mode 100644 mysql-test/suite/im/t/im_utils.imtest delete mode 100755 mysql-test/suite/im/t/kill_n_check.sh delete mode 100755 mysql-test/suite/im/t/log.sh delete mode 100644 mysql-test/suite/im/t/utils.sh delete mode 100755 mysql-test/suite/im/t/wait_for_process.sh delete mode 100755 mysql-test/suite/im/t/wait_for_socket.sh (limited to 'mysql-test') diff --git a/mysql-test/suite/im/r/im_cmd_line.result b/mysql-test/suite/im/r/im_cmd_line.result deleted file mode 100644 index a862d465904..00000000000 --- a/mysql-test/suite/im/r/im_cmd_line.result +++ /dev/null @@ -1,47 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline ---> Listing users... -im_admin - -==> Adding user 'testuser'... - ---> IM password file: -testuser:*0D3CED9BEC10A777AEC23CCC353A8C08A633045E -im_admin:*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295 ---> EOF - ---> Printing out line for 'testuser'... -testuser:*0D3CED9BEC10A777AEC23CCC353A8C08A633045E - ---> Listing users... -im_admin -testuser - -==> Changing the password of 'testuser'... - ---> IM password file: -im_admin:*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295 -testuser:*39C549BDECFBA8AFC3CE6B948C9359A0ECE08DE2 ---> EOF - ---> Printing out line for 'testuser'... -testuser:*39C549BDECFBA8AFC3CE6B948C9359A0ECE08DE2 - ---> Listing users... -testuser -im_admin - -==> Dropping user 'testuser'... - ---> IM password file: -im_admin:*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295 ---> EOF - ---> Listing users... -im_admin - diff --git a/mysql-test/suite/im/r/im_daemon_life_cycle.result b/mysql-test/suite/im/r/im_daemon_life_cycle.result deleted file mode 100644 index b3afb15f207..00000000000 --- a/mysql-test/suite/im/r/im_daemon_life_cycle.result +++ /dev/null @@ -1,26 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline -Killing the process... -Waiting... -Success: the process was restarted. -Success: server is ready to accept connection on socket. - --------------------------------------------------------------------- --- Test for BUG#12751 --------------------------------------------------------------------- -START INSTANCE mysqld2; -Success: the process has been started. -Killing the process... -Waiting... -Success: the process was restarted. -Success: server is ready to accept connection on socket. -SHOW INSTANCE STATUS mysqld1; -instance_name state version_number version mysqld_compatible -mysqld1 STATE VERSION_NUMBER VERSION no -STOP INSTANCE mysqld2; -Success: the process has been stopped. diff --git a/mysql-test/suite/im/r/im_instance_conf.result b/mysql-test/suite/im/r/im_instance_conf.result deleted file mode 100644 index d04ae0270ab..00000000000 --- a/mysql-test/suite/im/r/im_instance_conf.result +++ /dev/null @@ -1,225 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline --------------------------------------------------------------------- -server_id = 1 -server_id = 2 --------------------------------------------------------------------- -CREATE INSTANCE mysqld3 -server_id = 3, -socket = "$MYSQL_TMP_DIR/mysqld_3.sock"; -SHOW INSTANCES; -instance_name state -mysqld3 offline -mysqld2 offline -mysqld1 online --------------------------------------------------------------------- -server_id = 1 -server_id = 2 -server_id=3 --------------------------------------------------------------------- -CREATE INSTANCE mysqld1; -ERROR HY000: Instance already exists -CREATE INSTANCE mysqld2; -ERROR HY000: Instance already exists -CREATE INSTANCE mysqld3; -ERROR HY000: Instance already exists --------------------------------------------------------------------- -nonguarded --------------------------------------------------------------------- -CREATE INSTANCE mysqld4 -nonguarded, -server_id = 4, -socket = "$MYSQL_TMP_DIR/mysqld_4.sock"; -SHOW INSTANCES; -instance_name state -mysqld3 offline -mysqld4 offline -mysqld1 online -mysqld2 offline --------------------------------------------------------------------- -nonguarded -nonguarded --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -CREATE INSTANCE mysqld5 -test-A = 000, -test-B = test, -server_id = 5, -socket = "$MYSQL_TMP_DIR/mysqld_5.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld4 offline -mysqld5 offline -mysqld2 offline -mysqld3 offline --------------------------------------------------------------------- -test-A=000 --------------------------------------------------------------------- -test-B=test --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -CREATE INSTANCE mysqld6 -test-C1 = 10 , -test-C2 = 02 , -server_id = 6, -socket = "$MYSQL_TMP_DIR/mysqld_6.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline --------------------------------------------------------------------- -test-C1=10 --------------------------------------------------------------------- -test-C2=02 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -CREATE INSTANCE mysqld7 test-D = test-D-value ; -ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -CREATE INSTANCE mysqld8 test-E 0 ; -ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -CREATE INSTANCE mysqld8 test-F = ; -ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -CREATE INSTANCE mysqld9 -test-1=" hello world ", -test-2=' ', -server_id = 9, -socket = "$MYSQL_TMP_DIR/mysqld_9.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -mysqld9 offline -CREATE INSTANCE mysqld10 -test-3='\b\babc\sdef', -server_id = 10, -socket = "$MYSQL_TMP_DIR/mysqld_10.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld9 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -mysqld10 offline -mysqld2 offline -CREATE INSTANCE mysqld11 -test-4='abc\tdef', -test-5='abc\ndef', -server_id = 11, -socket = "$MYSQL_TMP_DIR/mysqld_11.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld11 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -mysqld10 offline -mysqld2 offline -mysqld9 offline -CREATE INSTANCE mysqld12 -test-6="abc\rdef", -test-7="abc\\def", -server_id = 12, -socket = "$MYSQL_TMP_DIR/mysqld_12.sock"; -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld9 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -mysqld10 offline -mysqld2 offline -mysqld12 offline -mysqld11 offline -CREATE INSTANCE mysqld13 test-bad=' \ '; -ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld9 offline -mysqld5 offline -mysqld6 offline -mysqld3 offline -mysqld4 offline -mysqld10 offline -mysqld2 offline -mysqld12 offline -mysqld11 offline --------------------------------------------------------------------- -test-1= hello world --------------------------------------------------------------------- -test-2= --------------------------------------------------------------------- -test-3=abc def --------------------------------------------------------------------- -test-4=abc def --------------------------------------------------------------------- -test-5=abc --------------------------------------------------------------------- -test-6=abc def --------------------------------------------------------------------- -test-7=abc\def --------------------------------------------------------------------- --------------------------------------------------------------------- -CREATE INSTANCE qqq1; -ERROR HY000: Malformed instance name. diff --git a/mysql-test/suite/im/r/im_life_cycle.result b/mysql-test/suite/im/r/im_life_cycle.result deleted file mode 100644 index dcabc8cf4f3..00000000000 --- a/mysql-test/suite/im/r/im_life_cycle.result +++ /dev/null @@ -1,73 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline - --------------------------------------------------------------------- --- 1.1.2. --------------------------------------------------------------------- -START INSTANCE mysqld2; -Success: the process has been started. -SHOW VARIABLES LIKE 'port'; -Variable_name Value -port IM_MYSQLD2_PORT - --------------------------------------------------------------------- --- 1.1.3. --------------------------------------------------------------------- -STOP INSTANCE mysqld2; -Success: the process has been stopped. - --------------------------------------------------------------------- --- 1.1.4. --------------------------------------------------------------------- -START INSTANCE mysqld3; -ERROR HY000: Unknown instance name -START INSTANCE mysqld1; -ERROR HY000: The instance is already started - --------------------------------------------------------------------- --- 1.1.5. --------------------------------------------------------------------- -STOP INSTANCE mysqld3; -ERROR HY000: Unknown instance name - --------------------------------------------------------------------- --- 1.1.6. --------------------------------------------------------------------- -Killing the process... -Waiting... -Success: the process was restarted. -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline - --------------------------------------------------------------------- --- 1.1.7. --------------------------------------------------------------------- -START INSTANCE mysqld2; -Success: the process has been started. -Killing the process... -Waiting... -Success: the process was killed. - --------------------------------------------------------------------- --- 1.1.8. --------------------------------------------------------------------- -SHOW INSTANCE STATUS; -ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use - --------------------------------------------------------------------- --- BUG#12813 --------------------------------------------------------------------- -START INSTANCE mysqld1,mysqld2,mysqld3; -ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use -STOP INSTANCE mysqld1,mysqld2,mysqld3; -ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use -STOP INSTANCE mysqld2; -ERROR HY000: Cannot stop instance. Perhaps the instance is not started, or was started manually, so IM cannot find the pidfile. -End of 5.0 tests diff --git a/mysql-test/suite/im/r/im_options.result b/mysql-test/suite/im/r/im_options.result deleted file mode 100644 index 22bd5d5bdf6..00000000000 --- a/mysql-test/suite/im/r/im_options.result +++ /dev/null @@ -1,151 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline -UNSET mysqld1.server_id; -ERROR HY000: The instance is active. Stop the instance first -SET mysqld1.server_id = 11; -ERROR HY000: The instance is active. Stop the instance first -CREATE INSTANCE mysqld3 -datadir = '/', -server_id = 3, -socket = "$MYSQL_TMP_DIR/mysqld_3.sock"; -START INSTANCE mysqld3; -UNSET mysqld3.server_id; -ERROR HY000: The instance is active. Stop the instance first -SET mysqld3.server_id = 11; -ERROR HY000: The instance is active. Stop the instance first -STOP INSTANCE mysqld3; -SHOW INSTANCE STATUS mysqld3; -instance_name state version_number version mysqld_compatible -mysqld3 offline VERSION_NUMBER VERSION no -UNSET mysqld2.server_id; -UNSET mysqld2.server_id; -SHOW INSTANCE OPTIONS mysqld2; -option_name value -instance_name option_value -socket option_value -pid-file option_value -port option_value -datadir option_value -log option_value -log-error option_value -log-slow-queries option_value -language option_value -character-sets-dir option_value -basedir option_value -shutdown-delay option_value -skip-stack-trace option_value -loose-skip-innodb option_value -loose-skip-ndbcluster option_value -nonguarded option_value -log-output option_value -SET mysqld2.server_id = 2; -SET mysqld2.server_id = 2; -SHOW INSTANCE OPTIONS mysqld2; -option_name value -instance_name option_value -socket option_value -pid-file option_value -port option_value -datadir option_value -log option_value -log-error option_value -log-slow-queries option_value -language option_value -character-sets-dir option_value -basedir option_value -shutdown-delay option_value -skip-stack-trace option_value -loose-skip-innodb option_value -loose-skip-ndbcluster option_value -nonguarded option_value -log-output option_value -server_id option_value -UNSET mysqld2.server_id = 11; -ERROR 42000: You have an error in your command syntax. Check the manual that corresponds to your MySQL Instance Manager version for the right syntax to use -SET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc = 0010, mysqld3.ddd = 0020; --------------------------------------------------------------------- -aaa --------------------------------------------------------------------- -bbb --------------------------------------------------------------------- -ccc=0010 --------------------------------------------------------------------- -ddd=0020 --------------------------------------------------------------------- -UNSET mysqld2.aaa, mysqld3.bbb, mysqld2.ccc, mysqld3.ddd; --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -SET mysqld2.aaa, mysqld3.bbb, mysqld.ccc = 0010; -ERROR HY000: Unknown instance name --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -SET mysqld2.aaa, mysqld3.bbb, mysqld1.ccc = 0010; -ERROR HY000: The instance is active. Stop the instance first --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -UNSET mysqld2.server_id, mysqld3.server_id, mysqld.ccc; -ERROR HY000: Unknown instance name --------------------------------------------------------------------- -server_id = 1 -server_id=2 -server_id=3 --------------------------------------------------------------------- -UNSET mysqld2.server_id, mysqld3.server_id, mysqld1.ccc; -ERROR HY000: The instance is active. Stop the instance first --------------------------------------------------------------------- -server_id = 1 -server_id=2 -server_id=3 --------------------------------------------------------------------- -DROP INSTANCE mysqld3; -SET mysqld2.server_id=222; -SET mysqld2.server_id = 222; -SET mysqld2.server_id = 222 ; -SET mysqld2 . server_id = 222 ; -SET mysqld2 . server_id = 222 , mysqld2 . aaa , mysqld2 . bbb ; --------------------------------------------------------------------- -server_id = 1 -server_id=222 --------------------------------------------------------------------- -aaa --------------------------------------------------------------------- -bbb --------------------------------------------------------------------- -UNSET mysqld2 . aaa , mysqld2 . bbb ; --------------------------------------------------------------------- -server_id = 1 -server_id=222 --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- -server_id = 1 -server_id=222 --------------------------------------------------------------------- -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 online -mysqld2 offline -FLUSH INSTANCES; -ERROR HY000: At least one instance is active. Stop all instances first -STOP INSTANCE mysqld1; -SHOW INSTANCES; -instance_name state -mysqld1 offline -mysqld2 offline -FLUSH INSTANCES; diff --git a/mysql-test/suite/im/r/im_utils.result b/mysql-test/suite/im/r/im_utils.result deleted file mode 100644 index 586a5ab6a8d..00000000000 --- a/mysql-test/suite/im/r/im_utils.result +++ /dev/null @@ -1,96 +0,0 @@ -SHOW VARIABLES LIKE 'server_id'; -Variable_name Value -server_id 1 -SHOW INSTANCES; -instance_name state -mysqld1 XXXXX -mysqld2 offline -SHOW INSTANCE OPTIONS mysqld1; -option_name value -instance_name VALUE -socket VALUE -pid-file VALUE -port VALUE -datadir VALUE -log VALUE -log-error VALUE -log-slow-queries VALUE -language VALUE -character-sets-dir VALUE -basedir VALUE -server_id VALUE -shutdown-delay VALUE -skip-stack-trace VALUE -loose-skip-innodb VALUE -loose-skip-ndbcluster VALUE -log-output VALUE -SHOW INSTANCE OPTIONS mysqld2; -option_name value -instance_name VALUE -socket VALUE -pid-file VALUE -port VALUE -datadir VALUE -log VALUE -log-error VALUE -log-slow-queries VALUE -language VALUE -character-sets-dir VALUE -basedir VALUE -server_id VALUE -shutdown-delay VALUE -skip-stack-trace VALUE -loose-skip-innodb VALUE -loose-skip-ndbcluster VALUE -nonguarded VALUE -log-output VALUE -START INSTANCE mysqld2; -Success: the process has been started. -STOP INSTANCE mysqld2; -Success: the process has been stopped. -SHOW mysqld1 LOG FILES; -Logfile Path File size -ERROR LOG PATH FILE_SIZE -GENERAL LOG PATH FILE_SIZE -SLOW LOG PATH FILE_SIZE -SHOW mysqld2 LOG FILES; -Logfile Path File size -ERROR LOG PATH FILE_SIZE -GENERAL LOG PATH FILE_SIZE -SLOW LOG PATH FILE_SIZE -SHOW mysqld1 LOG ERROR 10; -Log -LOG_DATA -SHOW mysqld1 LOG SLOW 10; -Log -LOG_DATA -SHOW mysqld1 LOG GENERAL 10; -Log -LOG_DATA -SHOW mysqld1 LOG ERROR 10, 2; -Log -LOG_DATA -SHOW mysqld1 LOG SLOW 10, 2; -Log -LOG_DATA -SHOW mysqld1 LOG GENERAL 10, 2; -Log -LOG_DATA -SHOW mysqld2 LOG ERROR 10; -Log -LOG_DATA -SHOW mysqld2 LOG SLOW 10; -Log -LOG_DATA -SHOW mysqld2 LOG GENERAL 10; -Log -LOG_DATA -SHOW mysqld2 LOG ERROR 10, 2; -Log -LOG_DATA -SHOW mysqld2 LOG SLOW 10, 2; -Log -LOG_DATA -SHOW mysqld2 LOG GENERAL 10, 2; -Log -LOG_DATA diff --git a/mysql-test/suite/im/t/disabled.def b/mysql-test/suite/im/t/disabled.def deleted file mode 100644 index 56828810bf1..00000000000 --- a/mysql-test/suite/im/t/disabled.def +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################## -# -# 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. -# -############################################################################## -im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly -im_daemon_life_cycle : Bug#20294 2007-05-14 alik Instance manager tests fail randomly -im_cmd_line : Bug#20294 2007-05-14 alik Instance manager tests fail randomly -im_utils : Bug#20294 2007-05-30 alik Instance manager tests fail randomly -im_instance_conf : Bug#20294 2007-05-30 alik Instance manager tests fail randomly -im_life_cycle : BUG#27851 Instance manager dies on ASSERT in ~Thread_registry() or from not being able to close a mysqld instance. -im_instance_conf : BUG#28743 Instance manager generates warnings in test suite -im_utils : BUG#28743 Instance manager generates warnings in test suite - diff --git a/mysql-test/suite/im/t/im_check_env.inc b/mysql-test/suite/im/t/im_check_env.inc deleted file mode 100644 index 883e5d00fe4..00000000000 --- a/mysql-test/suite/im/t/im_check_env.inc +++ /dev/null @@ -1,26 +0,0 @@ -# This file is intended to be used in each IM-test. It contains stamements, -# that ensure that starting conditions (environment) for the IM-test are as -# expected. - -# Check the running instances. - ---connect (mysql1_con,localhost,root,,mysql,$IM_MYSQLD1_PORT,$IM_MYSQLD1_SOCK) - ---connection mysql1_con - -SHOW VARIABLES LIKE 'server_id'; - ---source include/not_windows.inc - ---connection default - -# Let IM detect that mysqld1 is online. This delay should be longer than -# monitoring interval. - ---sleep 2 - -# Check that IM understands that mysqld1 is online, while mysqld2 is -# offline. - ---replace_result starting XXXXX online XXXXX -SHOW INSTANCES; diff --git a/mysql-test/suite/im/t/im_cmd_line.imtest b/mysql-test/suite/im/t/im_cmd_line.imtest deleted file mode 100644 index e8264b5bb8a..00000000000 --- a/mysql-test/suite/im/t/im_cmd_line.imtest +++ /dev/null @@ -1,68 +0,0 @@ -########################################################################### -# -# Tests for user-management command-line options. -# -########################################################################### - ---source suite/im/t/im_check_env.inc - -########################################################################### - -# List users so we are sure about starting conditions. - ---echo --> Listing users... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null ---echo - -# Add a new user. - ---echo ==> Adding user 'testuser'... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --add-user --username=testuser --password=abc 2>&1 >/dev/null ---echo - ---echo --> IM password file: ---exec cat $IM_PASSWORD_PATH ---echo --> EOF ---echo - ---echo --> Printing out line for 'testuser'... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --print-password-line --username=testuser --password=abc | tail -2 | head -1 ---echo - ---echo --> Listing users... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null ---echo - -# Edit user's attributes. - ---echo ==> Changing the password of 'testuser'... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --edit-user --username=testuser --password=xyz 2>&1 >/dev/null ---echo - ---echo --> IM password file: ---exec cat $IM_PASSWORD_PATH ---echo --> EOF ---echo - ---echo --> Printing out line for 'testuser'... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --print-password-line --username=testuser --password=xyz | tail -2 | head -1 ---echo - ---echo --> Listing users... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null ---echo - -# Drop user. - ---echo ==> Dropping user 'testuser'... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --drop-user --username=testuser 2>&1 >/dev/null ---echo - ---echo --> IM password file: ---exec cat $IM_PASSWORD_PATH ---echo --> EOF ---echo - ---echo --> Listing users... ---exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --list-users 2>&1 >/dev/null ---echo diff --git a/mysql-test/suite/im/t/im_daemon_life_cycle-im.opt b/mysql-test/suite/im/t/im_daemon_life_cycle-im.opt deleted file mode 100644 index 3a45c7a41f7..00000000000 --- a/mysql-test/suite/im/t/im_daemon_life_cycle-im.opt +++ /dev/null @@ -1,3 +0,0 @@ ---run-as-service ---log=$MYSQLTEST_VARDIR/log/im.log ---monitoring-interval=1 diff --git a/mysql-test/suite/im/t/im_daemon_life_cycle.imtest b/mysql-test/suite/im/t/im_daemon_life_cycle.imtest deleted file mode 100644 index c42ab89cc49..00000000000 --- a/mysql-test/suite/im/t/im_daemon_life_cycle.imtest +++ /dev/null @@ -1,100 +0,0 @@ -let $UTIL=$MYSQL_TEST_DIR/suite/im/t; - -########################################################################### -# -# This file contains test for (1.2) test suite. -# -# Consult WL#2789 for more information. -# -########################################################################### - ---exec $UTIL/log.sh im_daemon_life_cycle im_daemon_life_cycle.imtest started. - -########################################################################### - ---source suite/im/t/im_check_env.inc - -# Turn on reconnect, not on by default anymore. ---enable_reconnect - -########################################################################### -# -# The main daemon-life-cycle test case -- check that IM-angel will restart -# IM-main if it got killed: -# - kill IM-main and check that IM-angel will restart it; -# - wait for IM-main to start accepting connections before continue test -# case; -# -# NOTE: timeout is 55 seconds. Timeout should be more than shutdown-delay -# specified for managed MySQL instance. Now shutdown-delay is 10 seconds -# (set in mysql-test-run.pl). So, 55 seconds should be enough to make 5 -# attempts. -# -########################################################################### - ---exec $UTIL/log.sh im_daemon_life_cycle Main-test: starting... - ---exec $UTIL/log.sh im_daemon_life_cycle Killing IM-main... ---exec $UTIL/kill_n_check.sh $IM_PATH_PID restarted 55 im_daemon_life_cycle - ---exec $UTIL/log.sh im_daemon_life_cycle Waiting for IM-main to start accepting connections... ---exec $UTIL/wait_for_socket.sh $EXE_MYSQL $IM_PATH_SOCK $IM_USERNAME $IM_PASSWORD '' 55 im_daemon_life_cycle - ---exec $UTIL/log.sh im_daemon_life_cycle Main-test: done. - -########################################################################### -# -# BUG#12751: Instance Manager: client hangs -# - start nonguarded instance (mysqld2); -# - kill IM-main and get it restarted by IM-angel; -# - check that guarded instance (mysqld1) is accepting connections. -# - check that non-guarded instance (mysqld2) were not stopped. -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- Test for BUG#12751 ---echo -------------------------------------------------------------------- - ---exec $UTIL/log.sh im_daemon_life_cycle BUG12751: starting... - -# 1. Start mysqld; - ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: starting... -START INSTANCE mysqld2; - ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: waiting to start... ---exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 55 started im_daemon_life_cycle - ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: started. - -# 2. Restart IM-main; - ---exec $UTIL/log.sh im_daemon_life_cycle Killing IM-main... ---exec $UTIL/kill_n_check.sh $IM_PATH_PID restarted 55 im_daemon_life_cycle - ---exec $UTIL/log.sh im_daemon_life_cycle Waiting for IM-main to start accepting connections... ---exec $UTIL/wait_for_socket.sh $EXE_MYSQL $IM_PATH_SOCK $IM_USERNAME $IM_PASSWORD '' 55 im_daemon_life_cycle - -# 3. Issue some statement -- connection should be re-established. - ---exec $UTIL/log.sh im_daemon_life_cycle Checking that IM-main processing commands... - ---replace_column 2 STATE 3 VERSION_NUMBER 4 VERSION -SHOW INSTANCE STATUS mysqld1; - -# 4. Stop mysqld2, because it will not be stopped by IM, as it is nonguarded. -# So, if it we do not stop it, it will be stopped by mysql-test-run.pl with -# warning. - ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: stopping... -STOP INSTANCE mysqld2; - ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: waiting to stop... ---exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 55 stopped im_daemon_life_cycle ---exec $UTIL/log.sh im_daemon_life_cycle mysqld2: stopped. - -########################################################################### - ---exec $UTIL/log.sh im_daemon_life_cycle BUG12751: done. diff --git a/mysql-test/suite/im/t/im_instance_conf-im.opt b/mysql-test/suite/im/t/im_instance_conf-im.opt deleted file mode 100644 index 34b74ce0c95..00000000000 --- a/mysql-test/suite/im/t/im_instance_conf-im.opt +++ /dev/null @@ -1 +0,0 @@ ---monitoring-interval=1 diff --git a/mysql-test/suite/im/t/im_instance_conf.imtest b/mysql-test/suite/im/t/im_instance_conf.imtest deleted file mode 100644 index b667df41f98..00000000000 --- a/mysql-test/suite/im/t/im_instance_conf.imtest +++ /dev/null @@ -1,244 +0,0 @@ -########################################################################### -# -# This test suite checks the following statements: -# - CREATE INSTANCE [option1[=option1_value], ...]; -# - DROP INSTANCE ; -# -# For CREATE INSTANCE we check that: -# - CREATE INSTANCE succeeds for non-existing instance; -# - CREATE INSTANCE fails for existing instance; -# - CREATE INSTANCE can get additional options with and w/o values; -# - CREATE INSTANCE parses options and handles grammar errors correctly. -# Check that strings with spaces are handled correctly, unknown (for -# mysqld) options should also be handled; -# - CREATE INSTANCE updates both config file and internal configuration cache; -# - CREATE INSTANCE allows to create instances only with properly formed -# names (mysqld*); -# -# For DROP INSTANCE we check that: -# - DROP INSTANCE succeeds for existing instance; -# - DROP INSTANCE fails for non-existing instance; -# - DROP INSTANCE fails for active instance. -# - DROP INSTANCE updates both config file and internal configuration cache; -# -# NOTE: each CREATE INSTANCE statement must specify socket-file-name, otherwise -# this results of the test can be affected by another running test suite. -# -########################################################################### - ---source suite/im/t/im_check_env.inc - -########################################################################### -# -# Check starting conditions. -# -########################################################################### - -# Check that the configuration file contains only instances that we expect. - ---echo -------------------------------------------------------------------- ---exec grep '^server_id[^a-zA-Z0-9_\-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -########################################################################### -# -# CREATE INSTANCE tests. -# -########################################################################### - -# Check that CREATE INSTANCE succeeds for non-existing instance and also check -# that both config file and internal configuration cache have been updated. - -CREATE INSTANCE mysqld3 - server_id = 3, - socket = "$MYSQL_TMP_DIR/mysqld_3.sock"; - -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep '^server_id[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -# Check that CREATE INSTANCE fails for existing instance. Let's all three -# existing instances (running one, stopped one and just created one). Just in -# case... - ---error 3012 # ER_CREATE_EXISTING_INSTANCE -CREATE INSTANCE mysqld1; - ---error 3012 # ER_CREATE_EXISTING_INSTANCE -CREATE INSTANCE mysqld2; - ---error 3012 # ER_CREATE_EXISTING_INSTANCE -CREATE INSTANCE mysqld3; - -# Check that CREATE INSTANCE can get additional options with and w/o values. -# Ensure that config file is updated properly. - -# - without values; - ---echo -------------------------------------------------------------------- ---exec grep "^nonguarded\$" $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -CREATE INSTANCE mysqld4 - nonguarded, - server_id = 4, - socket = "$MYSQL_TMP_DIR/mysqld_4.sock"; - -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep "^nonguarded\$" $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -# - with value; - ---echo -------------------------------------------------------------------- ---exec grep '^test-A[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-B[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - -CREATE INSTANCE mysqld5 - test-A = 000, - test-B = test, - server_id = 5, - socket = "$MYSQL_TMP_DIR/mysqld_5.sock"; - -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep '^test-A[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-B[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -# Check that CREATE INSTANCE parses options and handles grammar errors -# correctly. Check that strings with spaces are handled correctly, -# unknown (for mysqld) options should also be handled. - -# - check handling of extra spaces; - ---echo -------------------------------------------------------------------- ---exec grep '^test-C1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-C2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - -CREATE INSTANCE mysqld6 - test-C1 = 10 , - test-C2 = 02 , - server_id = 6, - socket = "$MYSQL_TMP_DIR/mysqld_6.sock"; - -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep '^test-C1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-C2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- - -# - check handling of grammar error; - ---echo -------------------------------------------------------------------- ---exec grep '^test-D[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-E[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - ---error ER_SYNTAX_ERROR -CREATE INSTANCE mysqld7 test-D = test-D-value ; -SHOW INSTANCES; - ---error ER_SYNTAX_ERROR -CREATE INSTANCE mysqld8 test-E 0 ; -SHOW INSTANCES; - ---error ER_SYNTAX_ERROR -CREATE INSTANCE mysqld8 test-F = ; -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep '^test-D[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-E[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - -# - check parsing of string option values - ---echo -------------------------------------------------------------------- ---exec grep '^test-1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-3[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-4[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-5[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-6[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- ---exec grep '^test-7[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - -CREATE INSTANCE mysqld9 - test-1=" hello world ", - test-2=' ', - server_id = 9, - socket = "$MYSQL_TMP_DIR/mysqld_9.sock"; -SHOW INSTANCES; - -CREATE INSTANCE mysqld10 - test-3='\b\babc\sdef', - server_id = 10, - socket = "$MYSQL_TMP_DIR/mysqld_10.sock"; -# test-3='abc def' -SHOW INSTANCES; - -CREATE INSTANCE mysqld11 - test-4='abc\tdef', - test-5='abc\ndef', - server_id = 11, - socket = "$MYSQL_TMP_DIR/mysqld_11.sock"; -SHOW INSTANCES; - -CREATE INSTANCE mysqld12 - test-6="abc\rdef", - test-7="abc\\def", - server_id = 12, - socket = "$MYSQL_TMP_DIR/mysqld_12.sock"; -# test-6=abc -SHOW INSTANCES; - ---error ER_SYNTAX_ERROR -CREATE INSTANCE mysqld13 test-bad=' \ '; -SHOW INSTANCES; - ---echo -------------------------------------------------------------------- ---exec grep '^test-1[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-2[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-3[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-4[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-5[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-6[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-7[^a-zA-Z0-9_-]' $MYSQLTEST_VARDIR/im.cnf; ---echo -------------------------------------------------------------------- ---exec grep '^test-bad' $MYSQLTEST_VARDIR/im.cnf || true; ---echo -------------------------------------------------------------------- - - -# Check that CREATE INSTANCE allows to create instances only with properly -# formed names (mysqld*). - ---error 3014 # ER_MALFORMED_INSTANCE_NAME -CREATE INSTANCE qqq1; - diff --git a/mysql-test/suite/im/t/im_life_cycle-im.opt b/mysql-test/suite/im/t/im_life_cycle-im.opt deleted file mode 100644 index 34b74ce0c95..00000000000 --- a/mysql-test/suite/im/t/im_life_cycle-im.opt +++ /dev/null @@ -1 +0,0 @@ ---monitoring-interval=1 diff --git a/mysql-test/suite/im/t/im_life_cycle.imtest b/mysql-test/suite/im/t/im_life_cycle.imtest deleted file mode 100644 index 31f63d82505..00000000000 --- a/mysql-test/suite/im/t/im_life_cycle.imtest +++ /dev/null @@ -1,205 +0,0 @@ -let $UTIL=$MYSQL_TEST_DIR/suite/im/t; - -########################################################################### -# -# This file contains test for (1.1) test suite. -# -# Consult WL#2789 for more information. -# -########################################################################### - ---source suite/im/t/im_check_env.inc - -########################################################################### -# -# 1.1.2. Check 'START INSTANCE' command: -# - start the second instance; -# - check that it is reported as online; -# - execute some SQL-statement on mysqld2 to ensure that it is really up and -# running; -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.2. ---echo -------------------------------------------------------------------- - -START INSTANCE mysqld2; -# FIXME: START INSTANCE should be synchronous. ---exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started im_life_cycle - -# FIXME: Result of SHOW INSTANCES here is not deterministic unless START -# INSTANCE is synchronous. Even waiting for mysqld to start by looking at -# its pid file is not enough, because it is unknown when IM detects that -# mysqld has started. -# SHOW INSTANCES; - ---connect (mysql_con,localhost,root,,mysql,$IM_MYSQLD2_PORT,$IM_MYSQLD2_SOCK) ---connection mysql_con - ---replace_result $IM_MYSQLD2_PORT IM_MYSQLD2_PORT -SHOW VARIABLES LIKE 'port'; - ---connection default ---disconnect mysql_con - -########################################################################### -# -# 1.1.3. Check 'STOP INSTANCE' command: -# - stop the second instance; -# - check that it is reported as offline; -# - TODO: try to execute some SQL-statement to ensure that it is really down; -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.3. ---echo -------------------------------------------------------------------- - -STOP INSTANCE mysqld2; -# FIXME: STOP INSTANCE should be synchronous. ---exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 stopped im_life_cycle - -# FIXME: Result of SHOW INSTANCES here is not deterministic unless START -# INSTANCE is synchronous. Even waiting for mysqld to start by looking at -# its pid file is not enough, because it is unknown when IM detects that -# mysqld has started. -# SHOW INSTANCES; - -########################################################################### -# -# 1.1.4. Check that Instance Manager reports correct errors for 'START -# INSTANCE' command: -# - if the client tries to start unregistered instance; -# - if the client tries to start already started instance; -# - if the client submits invalid arguments; -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.4. ---echo -------------------------------------------------------------------- - ---error 3000 # ER_BAD_INSTANCE_NAME -START INSTANCE mysqld3; - ---error 3002 # ER_INSTANCE_ALREADY_STARTED -START INSTANCE mysqld1; - -########################################################################### -# -# 1.1.5. Check that Instance Manager reports correct errors for -# 'STOP INSTANCE' command: -# - if the client tries to start unregistered instance; -# - if the client tries to start already stopped instance; -# - if the client submits invalid arguments; -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.5. ---echo -------------------------------------------------------------------- - ---error 3000 # ER_BAD_INSTANCE_NAME -STOP INSTANCE mysqld3; - -# TODO: IM should be fixed. -# BUG#12673: Instance Manager allows to stop the instance many times -# --error 3002 # ER_INSTANCE_ALREADY_STARTED -# STOP INSTANCE mysqld2; - -########################################################################### -# -# 1.1.6. Check that Instance Manager is able to restart guarded instances. -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.6. ---echo -------------------------------------------------------------------- - ---exec $UTIL/kill_n_check.sh $IM_MYSQLD1_PATH_PID restarted 30 im_life_cycle - -# Give some time to IM to detect that mysqld was restarted. It should be -# longer than monitoring interval. - ---sleep 3 - -SHOW INSTANCES; - -########################################################################### -# -# 1.1.7. Check that Instance Manager does not restart non-guarded instance. -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.7. ---echo -------------------------------------------------------------------- - -START INSTANCE mysqld2; -# FIXME: START INSTANCE should be synchronous. ---exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started im_life_cycle - -# FIXME: Result of SHOW INSTANCES here is not deterministic unless START -# INSTANCE is synchronous. Even waiting for mysqld to start by looking at -# its pid file is not enough, because it is unknown when IM detects that -# mysqld has started. -# SHOW INSTANCES; - ---exec $UTIL/kill_n_check.sh $IM_MYSQLD2_PATH_PID killed 10 im_life_cycle - -# FIXME: Result of SHOW INSTANCES here is not deterministic unless START -# INSTANCE is synchronous. Even waiting for mysqld to start by looking at -# its pid file is not enough, because it is unknown when IM detects that -# mysqld has started. -# SHOW INSTANCES; - -########################################################################### -# -# 1.1.8. Check that Instance Manager returns an error on -# incomplete SHOW INSTANCE STATUS command. -# -########################################################################### - ---echo ---echo -------------------------------------------------------------------- ---echo -- 1.1.8. ---echo -------------------------------------------------------------------- - ---error ER_SYNTAX_ERROR -SHOW INSTANCE STATUS; - -# -# Tests for bug fixes -# - -# -# Bug #12813 Instance Manager: START/STOP INSTANCE commands accept -# a list as argument. -# - ---echo ---echo -------------------------------------------------------------------- ---echo -- BUG#12813 ---echo -------------------------------------------------------------------- - ---error ER_SYNTAX_ERROR -START INSTANCE mysqld1,mysqld2,mysqld3; - ---error ER_SYNTAX_ERROR -STOP INSTANCE mysqld1,mysqld2,mysqld3; - -# -# Bug #12673: Instance Manager: allows to stop the instance many times -# ---error 3001 -STOP INSTANCE mysqld2; - ---echo End of 5.0 tests diff --git a/mysql-test/suite/im/t/im_options-im.opt b/mysql-test/suite/im/t/im_options-im.opt deleted file mode 100644 index 34b74ce0c95..00000000000 --- a/mysql-test/suite/im/t/im_options-im.opt +++ /dev/null @@ -1 +0,0 @@ ---monitoring-interval=1 diff --git a/mysql-test/suite/im/t/im_options.imtest b/mysql-test/suite/im/t/im_options.imtest deleted file mode 100644 index d251b97d8e7..00000000000 --- a/mysql-test/suite/im/t/im_options.imtest +++ /dev/null @@ -1,248 +0,0 @@ -########################################################################### -# -# This test suite checks the following statements: -# - SET .